apitestcenter 0.18.2 → 0.19.0

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 (91) hide show
  1. package/dist/THIRD-PARTY-NOTICES-UI.txt +40 -10
  2. package/dist/THIRD-PARTY-NOTICES.txt +3 -3
  3. package/dist/cli.mjs +341 -335
  4. package/dist/ui/404/index.html +1 -1
  5. package/dist/ui/404.html +1 -1
  6. package/dist/ui/__next.__PAGE__.txt +17 -17
  7. package/dist/ui/__next._full.txt +18 -18
  8. package/dist/ui/__next._tree.txt +2 -2
  9. package/dist/ui/_next/static/chunks/0faedhifzwobh.js +31 -0
  10. package/dist/ui/_next/static/chunks/{0q8iq_7i4ohjr.js → 0glo5t3rr5ux5.js} +2 -2
  11. package/dist/ui/_next/static/chunks/0jksxb6220hcg.js +4 -0
  12. package/dist/ui/_next/static/chunks/0jq6xbzrkaewp.js +2 -0
  13. package/dist/ui/_next/static/chunks/1-9ymrwk2b425.js +1 -0
  14. package/dist/ui/_next/static/chunks/13ez75q2t6tkt.js +51 -0
  15. package/dist/ui/_next/static/chunks/{12whdxhkvkd-y.js → 1s068j2ev364j.js} +1 -1
  16. package/dist/ui/_next/static/chunks/{3wtqdtu331_vc.js → 2-ccpn24ve6pz.js} +3 -3
  17. package/dist/ui/_next/static/chunks/20hgurwocz54g.js +123 -0
  18. package/dist/ui/_next/static/chunks/26cw_brv1ud3e.js +27 -0
  19. package/dist/ui/_next/static/chunks/2at40-h3piqdk.js +50 -0
  20. package/dist/ui/_next/static/chunks/2d4j4s35zfogt.js +3 -0
  21. package/dist/ui/_next/static/chunks/2eitm7108zqkh.js +50 -0
  22. package/dist/ui/_next/static/chunks/{2c1b5jqwxl4ra.js → 2ihpgl_z3eude.js} +87 -86
  23. package/dist/ui/_next/static/chunks/2lr6d098vgexb.js +1 -0
  24. package/dist/ui/_next/static/chunks/2qci5ienr5rb9.css +3 -0
  25. package/dist/ui/_next/static/chunks/33purk5k-9o6l.js +1 -0
  26. package/dist/ui/_next/static/chunks/{0-zga2d528cxt.js → 3ixmudnloab4j.js} +3 -3
  27. package/dist/ui/_next/static/chunks/3ps_0myey2cxz.js +22 -0
  28. package/dist/ui/_next/static/chunks/3rshqqryni7gb.js +2 -0
  29. package/dist/ui/_next/static/chunks/45bkmnyf6ozrx.js +50 -0
  30. package/dist/ui/_not-found/__next._full.txt +13 -13
  31. package/dist/ui/_not-found/__next._not-found.__PAGE__.txt +12 -12
  32. package/dist/ui/_not-found/__next._tree.txt +2 -2
  33. package/dist/ui/_not-found/index.html +1 -1
  34. package/dist/ui/_not-found/index.txt +13 -13
  35. package/dist/ui/compare/__next._full.txt +18 -18
  36. package/dist/ui/compare/__next._tree.txt +2 -2
  37. package/dist/ui/compare/__next.compare.__PAGE__.txt +17 -17
  38. package/dist/ui/compare/index.html +1 -1
  39. package/dist/ui/compare/index.txt +18 -18
  40. package/dist/ui/connections/__next._full.txt +16 -16
  41. package/dist/ui/connections/__next._tree.txt +2 -2
  42. package/dist/ui/connections/__next.connections.__PAGE__.txt +15 -15
  43. package/dist/ui/connections/index.html +2 -2
  44. package/dist/ui/connections/index.txt +16 -16
  45. package/dist/ui/history/__next._full.txt +19 -19
  46. package/dist/ui/history/__next._tree.txt +2 -2
  47. package/dist/ui/history/__next.history.__PAGE__.txt +18 -18
  48. package/dist/ui/history/index.html +1 -1
  49. package/dist/ui/history/index.txt +19 -19
  50. package/dist/ui/home/__next._full.txt +18 -18
  51. package/dist/ui/home/__next._tree.txt +2 -2
  52. package/dist/ui/home/__next.home.__PAGE__.txt +17 -17
  53. package/dist/ui/home/index.html +1 -1
  54. package/dist/ui/home/index.txt +18 -18
  55. package/dist/ui/index.html +1 -1
  56. package/dist/ui/index.txt +18 -18
  57. package/dist/ui/preview/__next._full.txt +17 -17
  58. package/dist/ui/preview/__next._tree.txt +2 -2
  59. package/dist/ui/preview/__next.preview.__PAGE__.txt +16 -16
  60. package/dist/ui/preview/index.html +1 -1
  61. package/dist/ui/preview/index.txt +17 -17
  62. package/dist/ui/suite/__next._full.txt +15 -15
  63. package/dist/ui/suite/__next._tree.txt +2 -2
  64. package/dist/ui/suite/__next.suite.__PAGE__.txt +14 -14
  65. package/dist/ui/suite/index.html +1 -1
  66. package/dist/ui/suite/index.txt +15 -15
  67. package/dist/ui/tests/__next._full.txt +13 -13
  68. package/dist/ui/tests/__next._tree.txt +2 -2
  69. package/dist/ui/tests/__next.tests.__PAGE__.txt +12 -12
  70. package/dist/ui/tests/index.html +1 -1
  71. package/dist/ui/tests/index.txt +13 -13
  72. package/package.json +1 -1
  73. package/dist/ui/_next/static/chunks/03ligbvtk7nsc.js +0 -123
  74. package/dist/ui/_next/static/chunks/03y58w9gmwqc-.js +0 -50
  75. package/dist/ui/_next/static/chunks/08rlo-0gnct9m.js +0 -50
  76. package/dist/ui/_next/static/chunks/0bgmfb8f3pd8e.js +0 -1
  77. package/dist/ui/_next/static/chunks/0g9k0swrer6i5.js +0 -1
  78. package/dist/ui/_next/static/chunks/1-t79a3q7gmjn.js +0 -31
  79. package/dist/ui/_next/static/chunks/14dtemzsvcfmn.js +0 -50
  80. package/dist/ui/_next/static/chunks/1mm60-ywpri7b.js +0 -2
  81. package/dist/ui/_next/static/chunks/20j4wusnbtqa2.js +0 -4
  82. package/dist/ui/_next/static/chunks/243c1-49gb3pr.js +0 -1
  83. package/dist/ui/_next/static/chunks/2sb9zma7ae-_f.js +0 -27
  84. package/dist/ui/_next/static/chunks/2sjog4to0fmbb.css +0 -3
  85. package/dist/ui/_next/static/chunks/2su0ql-zu4q0_.js +0 -3
  86. package/dist/ui/_next/static/chunks/3-rdixjnndtyk.js +0 -51
  87. package/dist/ui/_next/static/chunks/32_tmz8ibsdo3.js +0 -22
  88. package/dist/ui/_next/static/chunks/3wzu1zkfqdmn6.js +0 -2
  89. /package/dist/ui/_next/static/{8uBf4sRL82dkVbEC6zib9 → P0KsXFffpHNOo_vW1PSSr}/_buildManifest.js +0 -0
  90. /package/dist/ui/_next/static/{8uBf4sRL82dkVbEC6zib9 → P0KsXFffpHNOo_vW1PSSr}/_clientMiddlewareManifest.js +0 -0
  91. /package/dist/ui/_next/static/{8uBf4sRL82dkVbEC6zib9 → P0KsXFffpHNOo_vW1PSSr}/_ssgManifest.js +0 -0
@@ -1,123 +0,0 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,93639,e=>{var t=e.i(72587);e.i(24856);var s=e.i(78451);function a(e){let t=t=>e.filter(e=>e.state===t).length;return{total:e.length,passed:t("passed"),failed:t("failed"),errors:t("error"),skipped:t("skipped"),durationMs:Math.round(e.reduce((e,t)=>e+(t.durationMs??0),0))}}function n(e){let t=a(e.steps);return t.passed>0&&0===t.failed&&0===t.errors}function i(e){let t=a(e.steps),s=t.total-t.skipped;if("running"===e.status)return`Running ${t.passed+t.failed+t.errors+1} of ${s}…`;if(!s)return"Nothing ran";let n=[`${t.passed} of ${s} passed`];return t.failed&&n.push(`${t.failed} failed`),t.errors&&n.push(`${t.errors} could not run`),t.skipped&&n.push(`${t.skipped} skipped`),"stopped"===e.status&&n.push("stopped early"),n.join(" · ")}let l=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),r=e=>((e??0)/1e3).toFixed(3),o=e=>String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),d={passed:"Passed",failed:"Failed",error:"Could not run",skipped:"Skipped",pending:"Not run",running:"Not finished"};var c=e.i(53012),u=e.i(99522);let p=(0,u.f)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),m=(0,u.f)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);var x=e.i(17118),h=e.i(95486),f=e.i(60961),b=e.i(40945),g=e.i(75117);let v=(0,u.f)("file-archive",[["path",{d:"M10 12v-1",key:"v7bkov"}],["path",{d:"M10 18v-2",key:"1cjy8d"}],["path",{d:"M10 7V6",key:"dljcrl"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01",key:"gkbcor"}],["circle",{cx:"10",cy:"20",r:"2",key:"1xzdoj"}]]);var y=e.i(29091),k=e.i(27813);let j=(0,u.f)("circle-minus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]]);var w=e.i(3792),$=e.i(66478),N=e.i(27122),S=e.i(70989),C=e.i(55218),M=e.i(69578),z=e.i(80707),q=e.i(56396);function R({collection:e,environment:t,data:s="api-tests"}){let a=t?` --env ${JSON.stringify(t)}`:"";return`npx --yes apitestcenter suite ${JSON.stringify(e)} --data ${s}${a} --junit atc-results.xml`}var P=e.i(17219);async function A(e,t){var s;let a,n=await fetch(`/engine/suites/export?collection=${encodeURIComponent(e)}`,{cache:"no-store"}),i=await n.json().catch(()=>null);if(!n.ok||!i?.files)throw Error(i?.error??`Engine error (${n.status})`);let l=i.secrets??[],r={};for(let e of i.files)r[`api-tests/${e.path}`]=e.text;r["api-tests/README.md"]=function(e){let{collection:t,environment:s,secrets:a=[],data:n="api-tests"}=e,i=s?` --env ${JSON.stringify(s)}`:"";return`# API checks — ${t||"requests outside a collection"}
2
-
3
- Every request in this collection is sent once, in the saved order, and checked. The run fails
4
- (exit code 1) when any request fails.
5
-
6
- ${R(e)}
7
-
8
- - Nothing to install first: \`npx\` fetches the command line (Node.js 20 or later).
9
- - Edit these tests in a window: \`npx apitestcenter ui --data ${n}\` (or the desktop app).
10
- - \`${n}/requests\` holds the saved requests, \`environments.json\` the environments, and
11
- \`suites.json\` the run order. Secret values are never in these files.
12
- - Pass secrets from your CI's secret store: write \`{{token}}\` in the request, then add
13
- \`--var token=$MY_TOKEN\` to the command.
14
- ${a.length?`
15
- **These requests have a secret typed straight into them, which is not exported** — change it to a
16
- {{variable}} and pass it with --var, or they will not run here:
17
-
18
- ${a.map(e=>`- ${e}`).join("\n")}
19
- `:""}
20
- To check speed too, load-test one request with goals, and compare with a baseline:
21
-
22
- npx --yes apitestcenter run "${t?`${t}/`:""}<request name>" --data ${n}${i} --p95 500 --errors 1 --baseline ${n}/baseline.json --max-slower 10
23
-
24
- Guide: https://apitestcenter.com/docs/ci-walkthrough.html
25
- `}({collection:e,environment:t,secrets:l}),r[".github/workflows/api-checks.yml"]=(a=(s={collection:e,environment:t}).collection||"requests outside a collection",`# Runs the "${a}" API checks on every push. Made by APITestCenter.
26
- # Guide: https://apitestcenter.com/docs/ci-walkthrough.html
27
- name: API checks
28
-
29
- on:
30
- push:
31
- workflow_dispatch:
32
- # Every hour too, even when nobody pushes (a scheduled check that runs while your computer is off):
33
- # remove the # from the next two lines.
34
- # schedule:
35
- # - cron: "0 * * * *"
36
-
37
- jobs:
38
- api-checks:
39
- runs-on: ubuntu-latest
40
- steps:
41
- - uses: actions/checkout@v4
42
-
43
- - uses: actions/setup-node@v4
44
- with:
45
- node-version: 22
46
-
47
- # Fails the job when any request fails. Secrets: add --var name=$\{{ secrets.NAME }}
48
- - name: Check every request
49
- run: ${R(s)}
50
-
51
- - name: Keep the results
52
- if: always()
53
- uses: actions/upload-artifact@v4
54
- with:
55
- name: api-check-results
56
- path: atc-results.xml
57
- `);let o=(e||"requests").replace(/[^\w.-]+/g,"-").replace(/^-|-$/g,"")||"requests";return{blob:(0,P.f)(r),name:`${o}-for-ci.zip`,secrets:l}}var I=e.i(15060),T=e.i(14168),E=e.i(6278),O=e.i(15868),U=e.i(92084),L=e.i(13643);let F=(0,u.f)("bell-ring",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]]),D=(0,u.f)("calendar-clock",[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]),H=(0,u.f)("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]);var J=e.i(49913),Y=e.i(96659),V=e.i(39170),W=e.i(727),B=e.i(44505),G=e.i(43101),K=e.i(60889);let _=e=>{let t=new Date(e);return new Date().toDateString()===t.toDateString()?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):t.toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},X=Object.entries(U.S);function Q({collection:e,environment:s}){let a=(0,q.d)(),n=(0,V.L)(),{environments:i}=(0,E.U)(),l=(0,G.C)(),r=(0,W.I)(),[o,d]=(0,C.useState)(15),[c,u]=(0,C.useState)("changes"),[p,m]=(0,C.useState)(null),x=(0,K.d)(),h=e=>e?i.find(t=>t.id===e)?.name??"an environment that was removed":"no environment",f=l?.find(t=>t.collection===e&&t.environment===s);async function b(e,t,s){m(e);try{let e=await t(),n=s?.(e);n&&a(n,"success")}catch(e){a(e instanceof Error?e.message:"That didn't work","error")}finally{m(null)}}return(0,t.jsxs)("section",{"aria-label":"Scheduled checks",className:"rounded-lg border border-line bg-panel",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-line px-4 py-2 text-xs text-mute",children:[(0,t.jsx)(D,{size:14,"aria-hidden":!0}),(0,t.jsx)("span",{className:"font-medium text-ink",children:"Scheduled checks"}),(0,t.jsxs)("span",{children:["— a collection run every few minutes while the app runs, with a notification when it starts failing.",(0,B.f)()?.background?" Closing the window keeps it running in the tray.":""]}),"ask"===r||"off"===r?(0,t.jsxs)("button",{type:"button",className:"ml-auto inline-flex items-center gap-1 text-accent hover:underline",onClick:()=>void(0,W.y)(),children:[(0,t.jsx)(F,{size:12,"aria-hidden":!0})," Turn on desktop notifications"]}):"blocked"===r?(0,t.jsxs)("span",{className:"ml-auto inline-flex items-center gap-1",children:[(0,t.jsx)(L.f,{size:12,"aria-hidden":!0})," Notifications are blocked — you'll see them in the app only"]}):null]}),null===e||f?null:(0,t.jsxs)("div",{className:"flex flex-wrap items-end gap-3 border-b border-line px-4 py-3",children:[(0,t.jsxs)("p",{className:"w-full text-sm text-ink",children:["Run ",(0,t.jsx)("span",{className:"font-medium",children:e||"requests outside a folder"})," with ",h(s),":"]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-mute",children:["How often",(0,t.jsx)("select",{value:o,onChange:e=>d(Number(e.target.value)),className:"rounded-md border border-line bg-panel-2 px-2 py-1.5 text-sm text-ink",children:U.l.map(e=>(0,t.jsx)("option",{value:e,children:(0,U.s)(e).replace(/^every /,"Every ")},e))})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-mute",children:["Notify me",(0,t.jsx)("select",{value:c,onChange:e=>u(e.target.value),className:"rounded-md border border-line bg-panel-2 px-2 py-1.5 text-sm text-ink",children:X.map(([e,s])=>(0,t.jsx)("option",{value:e,children:s},e))})]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-primary",disabled:"add"===p,onClick:async()=>await x("schedules",(l?.length??0)+1)&&void b("add",()=>G.c.add({collection:e,environment:s,everyMinutes:o,notify:c}),()=>`Scheduled: ${e||"requests outside a folder"} ${(0,U.s)(o)} — the first run starts now`),children:["add"===p?(0,t.jsx)(k.f,{size:14,className:"animate-spin"}):(0,t.jsx)(D,{size:14}),"Schedule it"]})]}),null===l?(0,t.jsx)("p",{className:"px-4 py-3 text-sm text-mute",children:"Loading…"}):l.length?(0,t.jsx)("ul",{className:"divide-y divide-line","aria-label":"Scheduled collections",children:l.map(e=>(0,t.jsx)(Z,{s:e,env:h(e.environment),busy:p,current:e.id===f?.id,act:b,onRemove:async()=>{await n({title:`Stop running ${e.collection||"requests outside a folder"} on a schedule?`,body:"Its results go too. The requests stay.",confirmLabel:"Remove",tone:"danger"})&&await b(`rm:${e.id}`,()=>G.c.remove(e.id))}},e.id))}):(0,t.jsx)("p",{className:"px-4 py-3 text-sm text-mute",children:"None yet. A scheduled check keeps running while you work on something else."})]})}function Z({s:e,env:s,busy:a,current:n,act:i,onRemove:l}){let r=e.results.at(-1),[o,d]=(0,C.useState)(!1),c=e.collection||"Requests outside a folder";return(0,t.jsxs)("li",{className:n?"bg-accent-dim/30":void 0,children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5 px-4 py-2.5",children:[r?r.passed?(0,t.jsx)(x.f,{size:16,className:"shrink-0 text-ok","aria-label":"Last run passed"}):(0,t.jsx)(N.f,{size:16,className:"shrink-0 text-bad","aria-label":"Last run failed"}):(0,t.jsx)(D,{size:16,className:"shrink-0 text-mute","aria-label":"Not run yet"}),(0,t.jsxs)("button",{type:"button",className:"min-w-0 text-left",onClick:()=>d(e=>!e),"aria-expanded":o,children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium text-ink",children:c}),(0,t.jsxs)("span",{className:"block text-xs text-mute",children:[(0,U.s)(e.everyMinutes)," · ",s," · ",e.enabled?r?`next at ${_(Math.max((0,U.K)(e),Date.now()))}`:"first run starting":"paused"]})]}),(0,t.jsx)("span",{className:"flex items-center gap-0.5","aria-label":`Last ${e.results.length} runs`,title:"Oldest on the left",children:e.results.slice(-20).map(e=>(0,t.jsx)("span",{title:`${_(e.at)} — ${e.headline}`,className:`h-3.5 w-1.5 rounded-sm ${e.passed?"bg-ok":"bg-bad"}`},e.at))}),(0,t.jsxs)("span",{className:"ml-auto flex items-center gap-1",children:[r?(0,t.jsxs)("span",{className:"mr-2 hidden text-xs text-mute sm:inline",children:[_(r.at),": ",r.headline]}):null,(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary py-1 text-xs",disabled:a===`run:${e.id}`,onClick:()=>void i(`run:${e.id}`,()=>G.c.run(e.id),e=>e.passed?`${c}: ${e.headline}`:null),title:"Run it now",children:[a===`run:${e.id}`?(0,t.jsx)(k.f,{size:12,className:"animate-spin"}):(0,t.jsx)(J.f,{size:12})," Run now"]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary py-1 text-xs",onClick:()=>void i(`pause:${e.id}`,()=>G.c.update(e.id,{enabled:!e.enabled})),"aria-label":e.enabled?`Pause ${c}`:`Resume ${c}`,children:[e.enabled?(0,t.jsx)(H,{size:12}):(0,t.jsx)(w.f,{size:12})," ",e.enabled?"Pause":"Resume"]}),(0,t.jsx)("button",{type:"button",className:"rounded p-1 text-mute hover:text-bad",onClick:l,"aria-label":`Remove the schedule of ${c}`,children:(0,t.jsx)(Y.f,{size:14})})]})]}),o||r&&!r.passed?(0,t.jsxs)("div",{className:"space-y-2 px-4 pb-3 pl-11 text-xs text-mute",children:[r&&!r.passed?(0,t.jsxs)("div",{className:"rounded-md border border-bad/30 bg-bad/5 px-3 py-2",children:[(0,t.jsx)("p",{className:"text-ink",children:r.headline}),r.failed.length?(0,t.jsx)("ul",{className:"mt-1 list-disc space-y-0.5 pl-4",children:r.failed.map(e=>(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{className:"text-ink",children:e.name}),e.message?` — ${e.message}`:""]},e.name))}):null]}):null,o?(0,t.jsxs)("label",{className:"flex flex-wrap items-center gap-2",children:["Notify me",(0,t.jsx)("select",{value:e.notify,onChange:t=>void i(`notify:${e.id}`,()=>G.c.update(e.id,{notify:t.target.value})),className:"rounded-md border border-line bg-panel-2 px-2 py-1 text-xs text-ink",children:X.map(([e,s])=>(0,t.jsx)("option",{value:e,children:s},e))}),"How often",(0,t.jsx)("select",{value:e.everyMinutes,onChange:t=>void i(`every:${e.id}`,()=>G.c.update(e.id,{everyMinutes:Number(t.target.value)})),className:"rounded-md border border-line bg-panel-2 px-2 py-1 text-xs text-ink",children:[...new Set([...U.l,e.everyMinutes])].sort((e,t)=>e-t).map(e=>(0,t.jsx)("option",{value:e,children:(0,U.s)(e).replace(/^every /,"Every ")},e))})]}):null]}):null]})}let ee={GET:"text-ok",POST:"text-warn",PUT:"text-accent",PATCH:"text-accent",DELETE:"text-bad"},et="apitestcenter-suite-stop-on-fail";function es({state:e}){return"passed"===e?(0,t.jsx)(x.f,{size:16,className:"text-ok","aria-label":"Passed"}):"failed"===e?(0,t.jsx)(N.f,{size:16,className:"text-bad","aria-label":"Failed"}):"error"===e?(0,t.jsx)(c.f,{size:16,className:"text-bad","aria-label":"Could not run"}):"skipped"===e?(0,t.jsx)(j,{size:16,className:"text-mute","aria-label":"Skipped"}):"running"===e?(0,t.jsx)(k.f,{size:16,className:"animate-spin text-accent","aria-label":"Running"}):(0,t.jsx)(b.f,{size:16,className:"text-line","aria-label":"Not run yet"})}let ea=e=>`${(e.collection||"requests").replace(/[^\w.-]+/g,"-")}-${e.startedAt.slice(0,16).replace(/[:T]/g,"-")}`;e.s(["SuitePage",0,function(){let e=(0,S.useRouter)(),c=(0,S.useSearchParams)(),u=(0,q.d)(),{index:b,environments:j,activeEnv:R,setActiveEnv:P}=(0,E.U)(),U=(0,C.useMemo)(()=>b?.requests??[],[b]),L=(0,C.useMemo)(()=>[...new Set(U.flatMap(e=>e.collection?(0,s.W)(e.collection):[""]))].sort((e,t)=>""===e?1:""===t?-1:e.localeCompare(t)),[U]),F=(0,C.useCallback)(e=>U.filter(t=>e?(0,s.T)(t.collection,e):""===t.collection),[U]),D=c.get("c"),H=null!==D&&L.includes(D)?D:L[0]??null,J=(0,C.useMemo)(()=>null===H?[]:F(H),[F,H]),[Y,V]=(0,C.useState)(null),[W,B]=(0,C.useState)(null),[G,K]=(0,C.useState)(!1),[_,X]=(0,C.useState)(new Set),[Z,en]=(0,C.useState)(!1),[ei,el]=(0,C.useState)(!1),er=(0,C.useRef)(null);(0,C.useEffect)(()=>{try{K("1"===localStorage.getItem(et))}catch{}},[]),(0,C.useEffect)(()=>{if(null===H)return;V(null),B(null),X(new Set);let e=!0;return T.Y.plan(H).then(t=>e&&V(t)).catch(()=>e&&V({order:[],skip:[]})),()=>{e=!1}},[H]),(0,C.useEffect)(()=>()=>void(er.current&&window.clearInterval(er.current)),[]);let eo=(0,C.useMemo)(()=>(function(e,t){let s=new Map(e.map(e=>[e.id,e])),a=new Set,n=[];for(let e of t?.order??[]){let t=s.get(e);t&&!a.has(e)&&(n.push(t),a.add(e))}for(let t of e)a.has(t.id)||n.push(t);let i=new Set(t?.skip??[]);return n.map(e=>({item:e,skipped:i.has(e.id)}))})(J,Y),[J,Y]),ed=W?.status==="running";(0,C.useMemo)(()=>new Map((W?.steps??[]).map(e=>[e.id,e])),[W]);let ec=W?W.steps.flatMap(e=>{let t=J.find(t=>t.id===e.id);return t?[{item:t,skipped:"skipped"===e.state&&!!e.message?.startsWith("Left out"),step:e}]:[]}):eo,eu=(0,C.useCallback)(e=>{null!==H&&(V(e),T.Y.savePlan(H,e).catch(e=>u(e instanceof Error?e.message:"Could not save the order","error")))},[H,u]);function ep(e,t){let s=eo.map(e=>e.item.id),a=s.indexOf(e),n=a+t;a<0||n<0||n>=s.length||([s[a],s[n]]=[s[n],s[a]],B(null),eu({order:s,skip:Y?.skip??[]}))}async function em(){if(null!==H&&!Z){en(!0),X(new Set);try{let e=await T.Y.start({collection:H,environmentId:R?.id??null,stopOnFail:G});B(e),er.current&&window.clearInterval(er.current),er.current=window.setInterval(async()=>{try{let t=await T.Y.get(e.id);B(t),"running"!==t.status&&(window.clearInterval(er.current),er.current=null,X(new Set(t.steps.filter(e=>"failed"===e.state||"error"===e.state).map(e=>e.id))))}catch{}},400)}catch(e){u(e instanceof Error?e.message:"Could not start the run","error")}finally{en(!1)}}}async function ex(){if(null!==H){el(!0);try{let{blob:e,name:t,secrets:s}=await A(H,R?.name??null);(0,I.h)(t,e),u(s.length?`Saved ${t}. ${s.length} request${1===s.length?" has":"s have"} a secret typed in — switch to a {{variable}} for CI (see README in the zip).`:`Saved ${t} — unzip it into your repository. No secrets are in it.`,s.length?"info":"success")}catch(e){u(e instanceof Error?e.message:"Could not export","error")}finally{el(!1)}}}async function eh(){W&&await T.Y.stop(W.id).catch(()=>void 0)}let ef=W?a(W.steps):null,eb=W&&"running"!==W.status,eg=eo.filter(e=>!e.skipped).length;return(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,t.jsx)("header",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 border-b border-line bg-panel px-4 py-3 lg:px-6",children:(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h1",{className:"text-lg font-medium text-ink",children:"Run a collection"}),(0,t.jsx)("p",{className:"text-xs text-mute",children:"Sends every request once, in order, and checks each one. Passes when all its checks pass, or on any 2xx/3xx when it has none."})]})}),0===L.length?(0,t.jsx)("div",{className:"m-6 max-w-xl space-y-2 text-sm text-mute",children:(0,t.jsx)("p",{children:"No saved requests yet. Save requests into a collection on the Test API page (Ctrl+S), or import a Postman collection, then come back here to run them all."})}):(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 py-4 lg:px-6",children:(0,t.jsxs)("div",{className:"mx-auto max-w-5xl space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-end gap-3",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-mute",children:["Collection",(0,t.jsx)(z.f,{label:"Collection",value:H??"",disabled:ed,onChange:t=>e.replace((0,T.W)(t)),minWidth:240,buttonContent:null===H?"":`${H||"No collection"} (${J.length})`,options:L.map(e=>({value:e,label:(0,t.jsx)("span",{style:{paddingLeft:`${.9*Math.max(0,(0,s.W)(e).length-1)}rem`},children:e?(0,s.g)(e):"No collection"}),hint:`${F(e).length} request${1===F(e).length?"":"s"}${e.includes("/")?` \xb7 ${e}`:""}`,text:e||"no collection"})),className:"min-w-48 rounded-md border border-line bg-panel-2 px-2 py-1.5 text-sm text-ink"})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-mute",children:["Environment",(0,t.jsxs)("select",{value:R?.id??"",disabled:ed,onChange:e=>P(e.target.value||null),className:"min-w-40 rounded-md border border-line bg-panel-2 px-2 py-1.5 text-sm text-ink",children:[(0,t.jsx)("option",{value:"",children:"None"}),j.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 pb-1.5 text-sm text-ink",children:[(0,t.jsx)("input",{type:"checkbox",checked:G,disabled:ed,onChange:e=>{K(e.target.checked);try{localStorage.setItem(et,e.target.checked?"1":"0")}catch{}}}),"Stop at the first failure"]}),(0,t.jsxs)("span",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary",disabled:ei||null===H,onClick:()=>void ex(),title:"A zip for your repository: this collection's requests, environments and run order (never secrets), plus a ready GitHub Actions pipeline",children:[ei?(0,t.jsx)(k.f,{size:14,className:"animate-spin"}):(0,t.jsx)(v,{size:14}),"Download for CI"]}),ed?(0,t.jsxs)("button",{type:"button",className:"btn btn-danger",onClick:()=>void eh(),children:[(0,t.jsx)($.f,{size:14})," Stop"]}):(0,t.jsxs)("button",{type:"button",className:"btn btn-primary",disabled:!Y||0===eg||Z,onClick:()=>void em(),children:[Z?(0,t.jsx)(k.f,{size:14,className:"animate-spin"}):(0,t.jsx)(w.f,{size:14}),"Run ",eg," request",1===eg?"":"s"]})]})]}),W?(0,t.jsxs)("div",{role:"status",className:`flex flex-wrap items-center gap-x-4 gap-y-2 rounded-lg border px-4 py-3 ${ed?"border-line bg-panel":n(W)?"border-ok/40 bg-ok/10":"border-bad/40 bg-bad/10"}`,children:[(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium text-ink",children:[ed?(0,t.jsx)(k.f,{size:16,className:"animate-spin text-accent"}):n(W)?(0,t.jsx)(x.f,{size:16,className:"text-ok"}):(0,t.jsx)(N.f,{size:16,className:"text-bad"}),ed?"Running…":n(W)?"All requests passed":"Not all requests passed"]}),(0,t.jsx)("span",{className:"text-sm text-mute",children:i(W)}),ef&&eb?(0,t.jsxs)("span",{className:"text-sm text-mute",children:["· ",(ef.durationMs/1e3).toFixed(1)," s of response time"]}):null,eb?(0,t.jsxs)("span",{className:"ml-auto flex flex-wrap items-center gap-1",children:[(0,t.jsx)("span",{className:"mr-1 text-xs text-mute",children:"Save as"}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary py-1 text-xs",onClick:()=>(0,I.N)(`${ea(W)}.html`,function(e,t={}){let s=a(e.steps),l=n(e),r=e.collection||"Saved requests",c=e=>"passed"===e?"ok":"failed"===e||"error"===e?"bad":"mute",u=e.steps.map((e,t)=>{let s=e.checks?.length?`<ul class="checks">${e.checks.map(e=>`<li class="${e.ok?"ok":"bad"}">${e.ok?"✓":"✕"} ${o(e.name)}</li>`).join("")}</ul>`:"",a=e.bodyPreview?`<details><summary>Response body</summary><pre>${o(e.bodyPreview)}</pre></details>`:"",n=e.runFirst?`<div class="sub">Run first: ${o(e.runFirst.label)}${e.runFirst.reused?" (reused)":""}</div>`:"",i=e.saved?.length?`<div class="sub">${e.saved.map(e=>e.found?`Saved {{${o(e.name)}}} = ${o(e.preview??"")}`:`✕ {{${o(e.name)}}} not found`).join(" · ")}</div>`:"";return`<tr>
58
- <td class="n">${t+1}</td>
59
- <td><span class="state ${c(e.state)}">${d[e.state]}</span></td>
60
- <td><div><b class="m">${o(e.method)}</b> ${o(e.name)}</div><div class="sub mono">${o(e.url)}</div>${n}${i}${e.message?`<div class="msg ${c(e.state)}">${o(e.message)}</div>`:""}${s}${a}</td>
61
- <td class="num">${e.status??"–"}</td>
62
- <td class="num">${null!=e.durationMs?`${Math.round(e.durationMs)} ms`:"–"}</td>
63
- </tr>`}).join("\n");return`<!doctype html>
64
- <html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
65
- <title>${o(r)} — collection run</title>
66
- <style>
67
- :root { --ink:#12151c; --mute:#5c6778; --line:#d5dce6; --panel:#fff; --canvas:#f4f6f9; --ok:#137333; --bad:#c62828; --okbg:#e6f4ea; --badbg:#fce8e6; }
68
- * { box-sizing:border-box; }
69
- body { margin:0; background:var(--canvas); color:var(--ink); font:14px/1.5 "Segoe UI",system-ui,-apple-system,sans-serif; }
70
- main { max-width:1000px; margin:0 auto; padding:28px 16px 48px; }
71
- h1 { font-size:22px; margin:0 0 4px; }
72
- .meta { color:var(--mute); font-size:13px; margin-bottom:18px; }
73
- .banner { border-radius:10px; padding:14px 16px; font-weight:600; margin-bottom:16px; }
74
- .banner.ok { background:var(--okbg); color:var(--ok); } .banner.bad { background:var(--badbg); color:var(--bad); }
75
- .tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:10px; margin-bottom:18px; }
76
- .tile { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:10px 14px; }
77
- .tile b { display:block; font-size:24px; }
78
- .tile span { color:var(--mute); font-size:12.5px; }
79
- table { width:100%; border-collapse:collapse; background:var(--panel); border:1px solid var(--line); border-radius:10px; overflow:hidden; }
80
- th, td { text-align:left; vertical-align:top; padding:9px 10px; border-bottom:1px solid var(--line); }
81
- th { font-size:12px; color:var(--mute); font-weight:600; background:#eef1f6; }
82
- .n, .num { white-space:nowrap; font-variant-numeric:tabular-nums; } .num { text-align:right; }
83
- .state { display:inline-block; font-size:12px; font-weight:600; padding:1px 8px; border-radius:999px; white-space:nowrap; }
84
- .state.ok { background:var(--okbg); color:var(--ok); } .state.bad { background:var(--badbg); color:var(--bad); } .state.mute { background:#eef1f6; color:var(--mute); }
85
- .m { font-family:ui-monospace,Consolas,monospace; font-size:12px; }
86
- .sub { color:var(--mute); font-size:12.5px; } .mono { font-family:ui-monospace,Consolas,monospace; word-break:break-all; }
87
- .msg { font-size:13px; margin-top:4px; } .msg.bad { color:var(--bad); } .msg.mute { color:var(--mute); }
88
- .checks { list-style:none; padding:0; margin:6px 0 0; font-size:12.5px; } .checks .ok { color:var(--ok); } .checks .bad { color:var(--bad); }
89
- details { margin-top:6px; font-size:12.5px; } summary { cursor:pointer; color:var(--mute); }
90
- pre { white-space:pre-wrap; word-break:break-all; background:#eef1f6; padding:8px; border-radius:6px; max-height:300px; overflow:auto; }
91
- footer { color:var(--mute); font-size:12px; margin-top:16px; }
92
- </style></head><body><main>
93
- <h1>${o(r)}</h1>
94
- <div class="meta">Collection run \xb7 ${o(new Date(e.startedAt).toLocaleString("en-GB"))}${e.environment?` \xb7 environment ${o(e.environment)}`:""}</div>
95
- <div class="banner ${l?"ok":"bad"}">${l?"✓ All requests passed":"✕ Not all requests passed"} — ${o(i(e))}</div>
96
- <div class="tiles">
97
- <div class="tile"><b>${s.passed}</b><span>passed</span></div>
98
- <div class="tile"><b>${s.failed}</b><span>failed</span></div>
99
- <div class="tile"><b>${s.errors}</b><span>could not run</span></div>
100
- <div class="tile"><b>${s.skipped}</b><span>skipped</span></div>
101
- <div class="tile"><b>${(s.durationMs/1e3).toFixed(1)} s</b><span>total response time</span></div>
102
- </div>
103
- <table>
104
- <thead><tr><th>#</th><th>Result</th><th>Request</th><th class="num">Status</th><th class="num">Time</th></tr></thead>
105
- <tbody>
106
- ${u}
107
- </tbody></table>
108
- <footer>Made with APITestCenter \xb7 ${o(t.generatedAt??new Date().toISOString())}. A request passes when all its checks pass; without checks, on any 2xx or 3xx status.</footer>
109
- </main></body></html>
110
- `}(W),"text/html"),children:[(0,t.jsx)(g.f,{size:12})," HTML"]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary py-1 text-xs",onClick:()=>{let e,t,s,n;return(0,I.N)(`${ea(W)}.xml`,(e=a(W.steps),t=W.collection||"Saved requests",s=W.steps.map(e=>{let s=`${e.method} ${e.name}`,a=` <testcase classname="${l(t)}" name="${l(s)}" time="${r(e.durationMs)}">`;if("passed"===e.state)return`${a}</testcase>`;if("skipped"===e.state||"pending"===e.state||"running"===e.state)return`${a}
111
- <skipped message="${l(e.message??"Not run")}"/>
112
- </testcase>`;let n="error"===e.state?"error":"failure",i=[e.status?`Status ${e.status}`:"",...(e.checks??[]).map(e=>`${e.ok?"✓":"✕"} ${e.name}`),e.bodyPreview?`
113
- Response:
114
- ${e.bodyPreview}`:""].filter(Boolean).join("\n");return`${a}
115
- <${n} message="${l(e.message??e.state)}">${l(i)}</${n}>
116
- </testcase>`}),n=r(e.durationMs),`<?xml version="1.0" encoding="UTF-8"?>
117
- <testsuites name="APITestCenter" tests="${e.total}" failures="${e.failed}" errors="${e.errors}" skipped="${e.skipped}" time="${n}">
118
- <testsuite name="${l(t)}" tests="${e.total}" failures="${e.failed}" errors="${e.errors}" skipped="${e.skipped}" time="${n}" timestamp="${l(W.startedAt)}">
119
- ${s.join("\n")}
120
- </testsuite>
121
- </testsuites>
122
- `),"application/xml")},title:"JUnit XML for CI dashboards",children:[(0,t.jsx)(g.f,{size:12})," JUnit"]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary py-1 text-xs",onClick:()=>(0,I.N)(`${ea(W)}.json`,`${JSON.stringify({kind:"apitestcenter-suite",version:1,...W,totals:a(W.steps),passed:n(W)},null,2)}
123
- `,"application/json"),children:[(0,t.jsx)(g.f,{size:12})," JSON"]})]}):null]}):null,(0,t.jsxs)("section",{"aria-label":"Requests in run order",className:"overflow-hidden rounded-lg border border-line bg-panel",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-line px-4 py-2 text-xs text-mute",children:[(0,t.jsx)(y.f,{size:14,"aria-hidden":!0}),(0,t.jsx)("span",{children:W?"Results":"Run order — untick to leave a request out; use the arrows to reorder. Saved for next time and for the CLI."})]}),Y?(0,t.jsx)("ol",{children:ec.map(({item:s,skipped:a,step:n},i)=>{let l=_.has(s.id),r=n&&(n.message||n.checks?.length||n.bodyPreview||n.runFirst||n.saved?.length);return(0,t.jsxs)("li",{className:"border-b border-line last:border-b-0",children:[(0,t.jsxs)("div",{className:`flex items-center gap-3 px-4 py-2 ${a&&!W?"opacity-50":""}`,children:[W?(0,t.jsx)(es,{state:n?.state??"pending"}):(0,t.jsx)("input",{type:"checkbox",checked:!a,onChange:()=>{var e;let t;return e=s.id,void((t=new Set(Y?.skip??[])).has(e)?t.delete(e):t.add(e),B(null),eu({order:eo.map(e=>e.item.id),skip:[...t]}))},"aria-label":`Include ${s.name}`}),(0,t.jsx)("span",{className:"w-6 shrink-0 text-right font-mono text-xs text-mute",children:i+1}),(0,t.jsxs)("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2 text-left",onClick:()=>r?X(e=>{let t=new Set(e);return t.has(s.id)?t.delete(s.id):t.add(s.id),t}):void 0,"aria-expanded":r?l:void 0,children:[(0,t.jsx)("span",{className:`w-14 shrink-0 font-mono text-xs font-medium ${ee[s.method]??"text-mute"}`,children:s.method}),(0,t.jsxs)("span",{className:"min-w-0",children:[(0,t.jsx)("span",{className:"block truncate text-sm text-ink",children:s.name}),(0,t.jsx)("span",{className:"block truncate font-mono text-[11px] text-mute",children:s.url})]}),r?l?(0,t.jsx)(h.f,{size:14,className:"shrink-0 text-mute"}):(0,t.jsx)(f.f,{size:14,className:"shrink-0 text-mute"}):null]}),n?.status?(0,t.jsx)("span",{className:`font-mono text-xs ${n.status<400?"text-ok":"text-bad"}`,children:n.status}):null,n?.durationMs!=null?(0,t.jsxs)("span",{className:"w-16 text-right font-mono text-xs text-mute",children:[Math.round(n.durationMs)," ms"]}):null,W?null:(0,t.jsxs)("span",{className:"flex items-center",children:[(0,t.jsx)("button",{type:"button",className:"rounded p-1 text-mute hover:text-ink disabled:opacity-30",disabled:0===i,onClick:()=>ep(s.id,-1),"aria-label":`Move ${s.name} up`,children:(0,t.jsx)(m,{size:14})}),(0,t.jsx)("button",{type:"button",className:"rounded p-1 text-mute hover:text-ink disabled:opacity-30",disabled:i===ec.length-1,onClick:()=>ep(s.id,1),"aria-label":`Move ${s.name} down`,children:(0,t.jsx)(p,{size:14})})]})]}),l&&n?(0,t.jsxs)("div",{className:"space-y-2 bg-panel-2 px-4 py-3 pl-[4.75rem] text-sm",children:[n.message?(0,t.jsx)("p",{className:"skipped"===n.state?"text-mute":"text-bad",children:n.message}):null,n.runFirst?(0,t.jsxs)("p",{className:"text-xs text-mute",children:["Run first: ",n.runFirst.label,n.runFirst.reused?" (reused from an earlier request)":""]}):null,n.saved?.length?(0,t.jsx)("p",{className:"text-xs",children:n.saved.map(e=>(0,t.jsx)("span",{className:`mr-3 ${e.found?"text-ok":"text-bad"}`,children:e.found?`Saved {{${e.name}}} = ${e.preview??""}`:`✕ {{${e.name}}} not found`},e.name))}):null,n.checks?.length?(0,t.jsx)("ul",{className:"space-y-0.5 text-xs",children:n.checks.map((e,s)=>(0,t.jsxs)("li",{className:e.ok?"text-ok":"text-bad",children:[e.ok?"✓":"✕"," ",e.name,!e.ok&&e.detail?(0,t.jsxs)("span",{className:"text-mute",children:[" — ",e.detail]}):null]},s))}):null,n.bodyPreview?(0,t.jsx)("pre",{className:"max-h-48 overflow-auto rounded-md border border-line bg-canvas p-2 font-mono text-[11px] whitespace-pre-wrap text-ink",children:n.bodyPreview}):null,(0,t.jsx)("button",{type:"button",className:"text-xs text-accent hover:underline",onClick:()=>(function(t){try{sessionStorage.setItem(M.M,t)}catch{}(0,O.m)(),e.push("/")})(s.id),children:"Open this request"})]}):null]},s.id)})}):(0,t.jsx)("p",{className:"px-4 py-6 text-sm text-mute",children:"Loading…"}),eb?(0,t.jsx)("div",{className:"border-t border-line px-4 py-2 text-right",children:(0,t.jsx)("button",{type:"button",className:"text-xs text-accent hover:underline",onClick:()=>B(null),children:"Edit the run order"})}):null]}),(0,t.jsx)(Q,{collection:H,environment:R?.id??null})]})})]})}],93639)},17219,e=>{let t=new Uint32Array(256).map((e,t)=>{let s=t;for(let e=0;e<8;e++)s=1&s?0xedb88320^s>>>1:s>>>1;return s>>>0});function s(e){let t=new Uint8Array(2);return new DataView(t.buffer).setUint16(0,e,!0),t}function a(e){let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),t}function n(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),s=0;for(let a of e)t.set(a,s),s+=a.length;return t}e.s(["f",0,function(e){let i=new TextEncoder,l=[],r=[],o=0;for(let[d,c]of Object.entries(e)){let e=i.encode(d),u="string"==typeof c?i.encode(c):c,p=function(e){let s=0xffffffff;for(let a of e)s=t[(s^a)&255]^s>>>8;return(0xffffffff^s)>>>0}(u),m=n([a(0x4034b50),s(20),s(0),s(0),s(0),s(0),a(p),a(u.length),a(u.length),s(e.length),s(0),e,u]),x=n([a(0x2014b50),s(20),s(20),s(0),s(0),s(0),s(0),a(p),a(u.length),a(u.length),s(e.length),s(0),s(0),s(0),s(0),a(0),a(o),e]);l.push(m),r.push(x),o+=m.length}let d=n(r),c=n([a(0x6054b50),s(0),s(0),s(Object.keys(e).length),s(Object.keys(e).length),a(d.length),a(o),s(0)]),u=n([...l,d,c]);return new Blob([u.buffer.slice(u.byteOffset,u.byteOffset+u.byteLength)],{type:"application/zip"})}])},13643,e=>{let t=(0,e.i(99522).f)("bell-off",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]);e.s(["f",0,t],13643)},3792,e=>{let t=(0,e.i(99522).f)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["f",0,t],3792)},66478,14168,e=>{let t=(0,e.i(99522).f)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);async function s(e){let t=await e.json().catch(()=>null);if(!e.ok)throw Error(t?.error??`Engine error (${e.status})`);return t}e.s(["f",0,t],66478);let a=(e,t,s)=>fetch(t,{method:e,headers:void 0===s?void 0:{"content-type":"application/json"},body:void 0===s?void 0:JSON.stringify(s)});e.s(["Y",0,{plan:e=>fetch(`/engine/suites/plan?collection=${encodeURIComponent(e)}`,{cache:"no-store"}).then(e=>s(e)),savePlan:(e,t)=>a("PUT","/engine/suites/plan",{collection:e,...t}).then(e=>s(e)),start:e=>a("POST","/engine/suites/runs",e).then(e=>s(e)),get:e=>fetch(`/engine/suites/runs/${encodeURIComponent(e)}`,{cache:"no-store"}).then(e=>s(e)),stop:e=>a("POST",`/engine/suites/runs/${encodeURIComponent(e)}/stop`).then(e=>s(e))},"W",0,function(e){return`/suite?c=${encodeURIComponent(e)}`}],14168)}])})();
@@ -1,50 +0,0 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33622,e=>{var t=e.i(72587);e.i(24856);var s=e.i(48191);function r(e){return!!e&&"object"==typeof e&&"string"==typeof e.id&&"string"==typeof e.testName&&Array.isArray(e.buckets)&&"object"==typeof e.summary&&null!==e.summary}var n=e.i(45404),a=e.i(29724),o=e.i(88153),i=e.i(56396),l=e.i(59180),c=e.i(67938),d=e.i(75998),p=e.i(55218);e.s(["default",0,function(){let[e,m]=(0,p.useState)(null),[h,u]=(0,p.useState)(null),[f,x]=(0,p.useState)(null),[y,v]=(0,p.useState)(null),[b,k]=(0,p.useState)(!1),[g,w]=(0,p.useState)(!1),[_,F]=(0,p.useState)(null),[T,j]=(0,p.useState)(!1),N=(0,i.d)(),{refresh:S}=(0,l.K)();async function C(){j(!0);try{await l.c.import(_),await S(),w(!0),N("Saved to History","success")}catch(e){N(e instanceof Error?e.message:"Could not save to History","error")}finally{j(!1)}}let I=(0,p.useCallback)(async e=>{x(null),w(!1),m(null),u(null);let t=e.name.toLowerCase();if(t.endsWith(".html")||t.endsWith(".xlsx")||t.endsWith(".csv")||t.endsWith(".zip")){v(e.name),x("Preview needs the JSON export from the lab. HTML and Excel are for sharing, not for opening back here.");return}try{let t=await e.text(),n=JSON.parse(t),a=function(e){if(!e||"object"!=typeof e)throw Error("That file is not JSON we can open.");if("compare"===e.kind||Array.isArray(e.apis)&&e.apis.length>0){if(!(e&&"object"==typeof e&&"compare"===e.kind&&Array.isArray(e.apis)&&e.apis.length>=1&&e.apis.every(e=>e&&"object"==typeof e&&r(e.report))))throw Error("Not a valid APITestCenter compare export.");return{kind:"compare",doc:{...e,apis:e.apis.map(e=>({...e,report:(0,s.Q)(e.report)}))}}}if(r(e.report))return{kind:"report",report:(0,s.Q)(e.report)};if(r(e))return{kind:"report",report:(0,s.Q)(e)};throw Error("Not an APITestCenter report. Export JSON from the lab (not HTML or Excel).")}(n);F(n),v(e.name),"compare"===a.kind?u(a.doc):m(a.report)}catch(t){v(e.name),x(t instanceof Error?t.message:"Could not read that file.")}},[]);function M(e){e.preventDefault(),k(!0)}function A(e){e.preventDefault(),k(!1);let t=e.dataTransfer.files[0];t&&I(t)}let $=b?"border-accent bg-accent-dim":"border-line bg-panel",E=h?.apis.map(e=>e.title)??[],{slo:L}=(0,o.G)();return(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col p-6 lg:p-8",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-xl font-medium text-ink",children:"Open a report"}),(0,t.jsx)("p",{className:"mt-1 max-w-xl text-sm text-mute",children:"Reopen a JSON report you exported earlier — a single run or a compare. Excel and HTML exports are for sharing and can't be reopened."})]}),e||h?(0,t.jsxs)("label",{onDragOver:M,onDragLeave:()=>k(!1),onDrop:A,className:`inline-flex cursor-pointer items-center gap-2 rounded-md border border-dashed px-3 py-2 text-xs ${$}`,children:[(0,t.jsx)(c.f,{size:14,className:"text-accent"}),"Replace JSON",(0,t.jsx)("input",{type:"file",accept:"application/json,.json",className:"sr-only",onChange:e=>{let t=e.target.files?.[0];t&&I(t),e.target.value=""}})]}):null]}),f?(0,t.jsx)("p",{className:"mt-4 text-sm text-bad",children:f}):null,h?(0,t.jsxs)("div",{className:"mt-6 space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsxs)("p",{className:"text-xs text-mute",children:[y," · compare · ",h.mode]}),(0,t.jsx)("button",{type:"button",disabled:g||T,onClick:()=>void C(),className:"rounded-md border border-line px-3 py-1.5 text-xs text-ink hover:border-accent disabled:opacity-40",children:g?"Saved to History":"Keep in History"})]}),(0,t.jsx)(n.f,{scope:"compare",data:{reports:h.apis.map(e=>e.report),titles:E,slo:L,live:!1}}),(0,t.jsxs)("p",{className:"text-xs text-mute",children:["Open"," ",(0,t.jsx)(d.default,{href:"/compare",className:"text-accent hover:underline",children:"Compare"})," ","to re-run these APIs live."]})]}):e?(0,t.jsxs)("div",{className:"mt-6 space-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsx)("p",{className:"text-xs text-mute",children:y}),(0,t.jsx)("button",{type:"button",disabled:g||T,onClick:()=>void C(),className:"rounded-md border border-line px-3 py-1.5 text-xs text-ink hover:border-accent disabled:opacity-40",children:g?"Saved to History":"Keep in History"})]}),g?(0,t.jsxs)("p",{className:"text-xs text-mute",children:["Open it anytime on"," ",(0,t.jsx)(d.default,{href:"/history",className:"text-accent hover:underline",children:"History"}),"."]}):null,(0,t.jsx)("div",{className:"rounded-lg border border-line bg-panel p-4",children:(0,t.jsx)(a.f,{report:e,source:"file"})})]}):(0,t.jsxs)("label",{onDragOver:M,onDragLeave:()=>k(!1),onDrop:A,className:`mt-6 flex min-h-0 flex-1 cursor-pointer flex-col items-center justify-center rounded-lg border border-dashed px-8 py-16 text-center ${$}`,children:[(0,t.jsx)(c.f,{size:28,className:"text-accent"}),(0,t.jsx)("span",{className:"mt-4 text-base text-ink",children:"Drop a JSON report here, or click to choose"}),(0,t.jsx)("span",{className:"mt-2 max-w-md text-sm text-mute",children:"Single-run or compare JSON from Export. HTML, Excel, and zip are for sharing — they will not open here."}),(0,t.jsx)("span",{className:"mt-4 font-mono text-xs text-mute",children:"apitestcenter-*.json"}),(0,t.jsx)("input",{type:"file",accept:"application/json,.json",className:"sr-only",onChange:e=>{let t=e.target.files?.[0];t&&I(t),e.target.value=""}})]})]})}],33622)},37837,e=>{var t=e.i(72587),s=e.i(55218),r=e.i(90484),n=e.i(14865);e.s(["f",0,function({anchor:e,open:a,onClose:o,children:i,label:l,width:c=280,role:d="dialog"}){let p=(0,s.useRef)(null),[m,h]=(0,s.useState)(null);return((0,s.useLayoutEffect)(()=>{if(!a)return;let t=()=>{if(!e.current)return;let t=(0,n.C)(e.current),s=(0,n.v)(),r=p.current?.offsetHeight??320,a=s.height-t.bottom-8,o=t.top-8,i=a<Math.min(r,240)&&o>a,l=Math.min(Math.max(8,t.right-c),s.width-c-8);h({top:i?Math.max(8,t.top-Math.min(r,o)-4):t.bottom+4,left:l,maxHeight:Math.max(160,(i?o:a)-4)})};t();let s=window.requestAnimationFrame(t);return window.addEventListener("resize",t),()=>{window.cancelAnimationFrame(s),window.removeEventListener("resize",t)}},[a,e,c]),(0,s.useEffect)(()=>{if(!a)return;let t=t=>{let s=t.target;p.current?.contains(s)||e.current?.contains(s)||o()},s=t=>{"Escape"===t.key&&(t.stopPropagation(),o(),e.current?.focus())},r=e=>{p.current?.contains(e.target)||o()},n=t=>{e.current?.contains(t.target)&&(t.stopPropagation(),t.preventDefault(),o())};return document.addEventListener("pointerdown",t,!0),document.addEventListener("click",n,!0),document.addEventListener("keydown",s,!0),document.addEventListener("scroll",r,!0),()=>{document.removeEventListener("pointerdown",t,!0),document.removeEventListener("click",n,!0),document.removeEventListener("keydown",s,!0),document.removeEventListener("scroll",r,!0)}},[a,o,e]),(0,s.useEffect)(()=>{a&&window.setTimeout(()=>p.current?.querySelector("[role=menuitem], input, select, button")?.focus(),0)},[a]),!a||"u"<typeof document)?null:(0,r.createPortal)((0,t.jsx)("div",{ref:p,role:d,"aria-label":l,style:{top:m?.top??-9999,left:m?.left??-9999,width:c,maxHeight:m?.maxHeight},className:"anim-pop fixed z-[70] overflow-auto rounded-lg border border-line bg-panel p-3 shadow-2xl",children:i}),document.body)}])},30617,e=>{e.i(24856);var t=e.i(46306),s=e.i(36558),r=e.i(2385),n=e.i(17219);let a={base:0,header:1,desc:2,pass:3,warn:4,fail:5};function o(e){return String(e).replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("\n","&#10;")}function i(e,t,s){if("level"===e)return"pass"===t?a.pass:"warn"===t?a.warn:"fail"===t?a.fail:a.base;let r="number"==typeof t?t:Number(t);return"errors"===e?r>=s.errorFail?a.fail:r>=s.errorWarn?a.warn:a.pass:r>=s.p95FailMs?a.fail:r>=s.p95WarnMs?a.warn:a.pass}let l=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
- <styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
3
- <fonts count="3">
4
- <font><sz val="11"/><name val="Calibri"/></font>
5
- <font><b/><sz val="11"/><color rgb="FFFFFFFF"/><name val="Calibri"/></font>
6
- <font><sz val="10"/><color rgb="FF5C6778"/><name val="Calibri"/></font>
7
- </fonts>
8
- <fills count="6">
9
- <fill><patternFill patternType="none"/></fill>
10
- <fill><patternFill patternType="gray125"/></fill>
11
- <fill><patternFill patternType="solid"><fgColor rgb="FF0B8F7C"/></patternFill></fill>
12
- <fill><patternFill patternType="solid"><fgColor rgb="FFDCFCE7"/></patternFill></fill>
13
- <fill><patternFill patternType="solid"><fgColor rgb="FFFEF3C7"/></patternFill></fill>
14
- <fill><patternFill patternType="solid"><fgColor rgb="FFFECACA"/></patternFill></fill>
15
- </fills>
16
- <borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders>
17
- <cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>
18
- <cellXfs count="6">
19
- <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/>
20
- <xf numFmtId="0" fontId="1" fillId="2" borderId="0" xfId="0" applyFont="1" applyFill="1" applyAlignment="1"><alignment horizontal="center" vertical="center"/></xf>
21
- <xf numFmtId="0" fontId="2" fillId="0" borderId="0" xfId="0" applyFont="1" applyAlignment="1"><alignment wrapText="1" vertical="center"/></xf>
22
- <xf numFmtId="0" fontId="0" fillId="3" borderId="0" xfId="0" applyFill="1"/>
23
- <xf numFmtId="0" fontId="0" fillId="4" borderId="0" xfId="0" applyFill="1"/>
24
- <xf numFmtId="0" fontId="0" fillId="5" borderId="0" xfId="0" applyFill="1"/>
25
- </cellXfs>
26
- </styleSheet>`;async function c(e,n,o){let l=(0,r.s)(e,{slo:n}),c=(0,r.v)(n),p=(0,t.$)(o,(0,t.L)(e));return d([{name:"Overview",rows:[[{v:"Key",s:a.header},{v:"Value",s:a.header},{v:"What this means",s:a.header}],...(0,s.E)(e).map(e=>{let t=a.base;return"failed_rate"===e.key&&(t=i("errors",e.value,c)),"latency_p95_ms"===e.key&&(t=i("latency",e.value,c)),(e.key.startsWith("status_5")||"status_0"===e.key)&&(t=Number(e.value)>0?a.fail:a.pass),e.key.startsWith("status_4")&&Number(e.value)>0&&(t=a.warn),e.key.startsWith("threshold:")&&(t="pass"===e.value?a.pass:a.fail),[{v:e.key},{v:e.value,s:t},{v:e.description,s:a.desc}]})]},{name:"Result summary",rows:[[{v:"Field",s:a.header},{v:"Level",s:a.header},{v:"What this means",s:a.header}],[{v:"overall"},{v:l.overall,s:i("level",l.overall,c)},{v:l.headline,s:a.desc}],...l.aspects.map(e=>[{v:e.title},{v:e.level,s:i("level",e.level,c)},{v:e.summary,s:a.desc}]),[{v:"disclaimer"},{v:""},{v:l.disclaimer,s:a.desc}],...p.map((e,s)=>[{v:`chart_${s+1}`},{v:`${e.w}x${e.h}`},{v:t.p[e.id],s:a.desc}])]},{name:"Second by second",rows:[s.V.map(e=>({v:e.header,s:a.header})),...e.buckets.map(e=>(0,s.u)(e).map((e,t)=>{let r=s.V[t]?.key,n=a.base;return"p95_ms"===r&&(n=i("latency",e,c)),"failed_rate"===r&&(n=i("errors",e,c)),"http_5xx"===r&&Number(e)>0&&(n=a.fail),"http_0"===r&&Number(e)>0&&(n=a.fail),"http_4xx"===r&&Number(e)>0&&(n=a.warn),"http_2xx"===r&&Number(e)>0&&(n=a.pass),{v:e,s:n}}))]}])}function d(e){let t={"[Content_Types].xml":`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
27
- <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
28
- <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
29
- <Default Extension="xml" ContentType="application/xml"/>
30
- <Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/>
31
- <Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>
32
- ${e.map((e,t)=>` <Override PartName="/xl/worksheets/sheet${t+1}.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>`).join("\n")}
33
- </Types>`,"_rels/.rels":`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
34
- <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
35
- <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/>
36
- </Relationships>`,"xl/workbook.xml":`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
37
- <workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
38
- <sheets>
39
- ${e.map((e,t)=>` <sheet name="${o(e.name.replace(/[:\\/?*[\]]/g," ").trim().slice(0,31)||"Sheet")}" sheetId="${t+1}" r:id="rId${t+1}"/>`).join("\n")}
40
- </sheets>
41
- </workbook>`,"xl/_rels/workbook.xml.rels":`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
42
- <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
43
- ${e.map((e,t)=>` <Relationship Id="rId${t+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet${t+1}.xml"/>`).join("\n")}
44
- <Relationship Id="rId${e.length+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>
45
- </Relationships>`,"xl/styles.xml":l};return e.forEach((e,s)=>{var r;let n,a,i;return t[`xl/worksheets/sheet${s+1}.xml`]=(r=e.rows,a=Array.from({length:n=r[0]?.length??0},(e,t)=>{let s=function(e,t,s=10,r=48){let n=s;for(let s of e){let e=s[t]?.v;void 0!==e&&(n=Math.max(n,String(e).length+2))}return Math.min(r,n)}(r,t,t===n-1&&n>=3?36:12,t===n-1&&n>=3?72:42);return`<col min="${t+1}" max="${t+1}" width="${s}" customWidth="1"/>`}).join(""),i=r.map((e,t)=>`<row r="${t+1}" ht="${0===t?22:18}" customHeight="1">${e.map((e,s)=>{var r;let n,a;return r=t+1,n=`${function(e){let t=e+1,s="";for(;t>0;)s=String.fromCharCode(65+(t-1)%26)+s,t=Math.floor((t-1)/26);return s}(s)}${r}`,a=void 0!==e.s?` s="${e.s}"`:"","number"==typeof e.v&&Number.isFinite(e.v)?`<c r="${n}"${a}><v>${e.v}</v></c>`:`<c r="${n}"${a} t="inlineStr"><is><t xml:space="preserve">${o(e.v)}</t></is></c>`}).join("")}</row>`).join(""),`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
46
- <worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
47
- <sheetViews><sheetView workbookViewId="0"><pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"/></sheetView></sheetViews>
48
- <cols>${a}</cols>
49
- <sheetData>${i}</sheetData>
50
- </worksheet>`)}),new Blob([(0,n.f)(t)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})}e.s(["S",0,a,"a",0,c,"F",0,d])},17219,e=>{let t=new Uint32Array(256).map((e,t)=>{let s=t;for(let e=0;e<8;e++)s=1&s?0xedb88320^s>>>1:s>>>1;return s>>>0});function s(e){let t=new Uint8Array(2);return new DataView(t.buffer).setUint16(0,e,!0),t}function r(e){let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),t}function n(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),s=0;for(let r of e)t.set(r,s),s+=r.length;return t}e.s(["f",0,function(e){let a=new TextEncoder,o=[],i=[],l=0;for(let[c,d]of Object.entries(e)){let e=a.encode(c),p="string"==typeof d?a.encode(d):d,m=function(e){let s=0xffffffff;for(let r of e)s=t[(s^r)&255]^s>>>8;return(0xffffffff^s)>>>0}(p),h=n([r(0x4034b50),s(20),s(0),s(0),s(0),s(0),r(m),r(p.length),r(p.length),s(e.length),s(0),e,p]),u=n([r(0x2014b50),s(20),s(20),s(0),s(0),s(0),s(0),r(m),r(p.length),r(p.length),s(e.length),s(0),s(0),s(0),s(0),r(0),r(l),e]);o.push(h),i.push(u),l+=h.length}let c=n(i),d=n([r(0x6054b50),s(0),s(0),s(Object.keys(e).length),s(Object.keys(e).length),r(c.length),r(l),s(0)]),p=n([...o,c,d]);return new Blob([p.buffer.slice(p.byteOffset,p.byteOffset+p.byteLength)],{type:"application/zip"})}])},13643,e=>{let t=(0,e.i(99522).f)("bell-off",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]);e.s(["f",0,t],13643)},95211,e=>{let t=(0,e.i(99522).f)("columns-3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);e.s(["f",0,t],95211)},81538,e=>{let t=(0,e.i(99522).f)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["f",0,t],81538)},36558,e=>{function t(e,s=2){if(!Number.isFinite(e))return 0;let r=10**s;return Math.round(e*r)/r}function s(e){return e>=100?Math.round(e):e>=10?t(e,1):t(e,2)}function r(e){return e>=10?Math.round(e):t(e,1)}function n(e,t=e=>e){return null==e?"":t(e)}e.s(["V",0,[{key:"elapsed_s",header:"Seconds into test",description:"Seconds from the start of the run."},{key:"ts",header:"Clock time",description:"Wall-clock time for this one-second sample."},{key:"vus",header:"Concurrent users",description:"Virtual users (VUs) active in this second."},{key:"rps",header:"Requests per second",description:"Completed requests in this second."},{key:"p50_ms",header:"Median latency (ms)",description:"Half of requests this second were faster than this."},{key:"p95_ms",header:"95th percentile (ms)",description:"95% of requests this second were faster than this."},{key:"p99_ms",header:"99th percentile (ms)",description:"The slow tail this second — 1 in 100 was slower."},{key:"failed_rate",header:"Error rate",description:"Share of requests that failed in this second (0–1)."},{key:"http_2xx",header:"Success (2xx)",description:"Successful HTTP responses this second."},{key:"http_4xx",header:"Client errors (4xx)",description:"Client / auth errors this second."},{key:"http_5xx",header:"Server errors (5xx)",description:"Server errors this second."},{key:"http_0",header:"Network failures",description:"No HTTP status (timeout / reset) this second."},{key:"bytes_in",header:"Bytes received",description:"Response bytes this second."},{key:"bytes_out",header:"Bytes sent",description:"Request bytes this second."},{key:"p90_ms",header:"90th percentile (ms)",description:"90% of requests this second were faster than this."},{key:"p999_ms",header:"99.9th percentile (ms)",description:"1 in 1,000 requests this second was slower than this."},{key:"max_ms",header:"Slowest (ms)",description:"Slowest request this second."},{key:"ttfb_ms",header:"Server time (ms)",description:"Average time to first byte this second — the server's own work."},{key:"connect_ms",header:"TCP connect (ms)",description:"Average TCP connect time this second (0 when connections are reused)."},{key:"tls_ms",header:"TLS handshake (ms)",description:"Average TLS handshake time this second."},{key:"checks_passed",header:"Checks passed",description:"Response checks that passed this second."},{key:"checks_failed",header:"Checks failed",description:"Response checks that failed this second."},{key:"dropped",header:"Dropped requests",description:"Rate mode: requests k6 could not start this second."}],"u",0,function(e){return[e.elapsedS,e.ts,t(e.vus,1),s(e.rps),r(e.p50Ms),r(e.p95Ms),r(e.p99Ms),t(e.failedRate,4),e.http2xx,e.http4xx,e.http5xx,e.http0,e.bytesIn,e.bytesOut,n(e.p90Ms,r),n(e.p999Ms,r),n(e.maxMs,r),n(e.ttfbMs,r),n(e.connectMs,r),n(e.tlsMs,r),n(e.checksPassed),n(e.checksFailed),n(e.dropped)]},"E",0,function(e){let{summary:n}=e,a=[{key:"run_id",value:e.id,description:"Id of this run in this browser tab."},{key:"test_name",value:e.testName,description:"Display name (method, path, time)."},{key:"status",value:e.status,description:"completed, failed, cancelled, or still running."},{key:"started_at",value:e.startedAt,description:"When the load test started (UTC)."},{key:"ended_at",value:e.endedAt,description:"When the load test finished (UTC)."},{key:"method",value:e.definition.method,description:"HTTP method that was repeated."},{key:"url",value:e.definition.url,description:"Target URL (secrets are not exported)."},{key:"auth_mode",value:e.definition.auth.mode,description:"Auth used: none, bearer, basic, or api_key. The secret is not exported."},{key:"executor",value:e.definition.load.executor,description:"Load pattern: constant-vus (steady) or ramping-vus (ramp / hold / down)."},{key:"requests",value:n.http.requests,description:"How many HTTP calls finished. Zero usually means the target never answered."},{key:"rps_avg",value:s(n.http.rps.avg),description:"Average requests per second completed by this generator."},{key:"rps_max",value:s(n.http.rps.max),description:"Peak requests per second in any one-second sample."},{key:"failed_count",value:n.http.failed.count,description:"Requests that failed (4xx, 5xx, timeout, or no status)."},{key:"failed_rate",value:t(n.http.failed.rate,4),description:"Failed / total. Default warning bar is 1% (0.01)."},{key:"latency_min_ms",value:r(n.latencyMs.min),description:"Fastest request (milliseconds)."},{key:"latency_mean_ms",value:r(n.latencyMs.mean),description:"Average response time. Slow outliers pull this up."},{key:"latency_p50_ms",value:r(n.latencyMs.median),description:"Median — half of requests were faster than this."},{key:"latency_p95_ms",value:r(n.latencyMs.p95),description:"95th percentile — 95% of requests were faster. Usual headline latency."},{key:"latency_p99_ms",value:r(n.latencyMs.p99),description:"99th percentile — the slow tail (1 in 100 was slower)."},{key:"latency_max_ms",value:r(n.latencyMs.max),description:"Slowest single request."},{key:"vus_max",value:n.vus.max,description:"Peak concurrent users (virtual users / VUs)."},{key:"vus_avg",value:t(n.vus.avg,1),description:"Average concurrent users over the run."},{key:"bytes_in",value:n.data.bytesIn,description:"Response bytes received by the generator."},{key:"bytes_out",value:n.data.bytesOut,description:"Request bytes sent by the generator."},{key:"phase_ttfb_avg_ms",value:r(n.phasesMs.ttfb.avg),description:"Time to first byte — waiting on the server after the connection is up."},{key:"phase_tls_avg_ms",value:r(n.phasesMs.tls.avg),description:"TLS handshake time. High values often mean a far or overloaded endpoint."}];for(let[e,t]of Object.entries(n.http.status)){let s="0"===e?"No HTTP status (timeout / network).":Number(e)>=500?"Server error.":Number(e)>=400?"Client / auth error.":"Success-class response.";a.push({key:`status_${e}`,value:t,description:`How many responses had status ${e}. ${s}`})}for(let e of n.thresholds)a.push({key:`threshold:${e.name}`,value:e.ok?"pass":"fail",description:"k6 threshold result for this run."});return a}])}])})();
@@ -1,50 +0,0 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,92016,e=>{var t=e.i(72587);e.i(24856);var n=e.i(2385),s=e.i(42447),r=e.i(67938),a=e.i(84355),l=e.i(20621),i=e.i(99522);let o=(0,i.f)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);var c=e.i(30197),d=e.i(27813),u=e.i(81538),p=e.i(13163),m=e.i(71189),h=e.i(96659);let f=(0,i.f)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var x=e.i(75998),y=e.i(70989),v=e.i(55218),b=e.i(6980),g=e.i(839),w=e.i(39170),k=e.i(37837),j=e.i(17847),N=e.i(56396),$=e.i(67217),C=e.i(44505),F=e.i(20054),S=e.i(19656),_=e.i(59180),T=e.i(30635),I=e.i(88153);function M({project:e,onOpen:n,onRename:s,onRemove:r,onDelete:a}){let[l,i]=(0,v.useState)(!1),[d,m]=(0,v.useState)(!1),f=(0,v.useRef)(null);return(0,t.jsxs)("div",{className:`group relative flex h-full flex-col gap-3 rounded-xl border p-4 ${e.current?"border-accent/60 bg-accent-dim/40":"border-line bg-panel hover:border-mute"}`,children:[(0,t.jsxs)("button",{type:"button",onClick:n,className:"flex flex-col gap-3 text-left","aria-label":e.current?`Go to ${e.name} (in use)`:`Open ${e.name}`,children:[(0,t.jsxs)("span",{className:"flex items-center gap-3 pr-8",children:[(0,t.jsx)("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg text-sm font-bold text-[#10140a]",style:{background:(0,T.W)(e.id)},"aria-hidden":!0,children:e.name.slice(0,1).toUpperCase()}),(0,t.jsxs)("span",{className:"min-w-0",children:[d?null:(0,t.jsx)("span",{className:"block truncate text-[15px] font-semibold text-ink",children:e.name}),(0,t.jsx)("span",{className:"block truncate font-mono text-[11px] text-mute",title:e.path,children:e.path})]})]}),(0,t.jsx)("span",{className:"flex flex-wrap gap-x-3 gap-y-1 text-xs text-mute",children:e.exists?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{children:[e.requests," request",1===e.requests?"":"s"]}),(0,t.jsxs)("span",{children:[e.environments," environment",1===e.environments?"":"s"]})]}):(0,t.jsx)("span",{className:"text-bad",children:"Folder not found"})}),(0,t.jsxs)("span",{className:"flex items-center gap-2 border-t border-line pt-3 text-xs",children:[e.current?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 font-medium text-accent",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-accent","aria-hidden":!0})," In use"]}):(0,t.jsx)("span",{className:"text-mute",children:function(e){if(!e)return"Not opened yet";let t=Math.round((Date.now()-Date.parse(e))/6e4);if(t<60)return t<2?"Opened just now":`Opened ${t} minutes ago`;let n=Math.round(t/60);if(n<24)return`Opened ${n} hour${1===n?"":"s"} ago`;let s=Math.round(n/24);return 1===s?"Opened yesterday":`Opened ${s} days ago`}(e.lastOpenedAt)}),e.git?(0,t.jsxs)("span",{className:"ml-auto inline-flex items-center gap-1 font-mono text-[11px] text-mute",children:[(0,t.jsx)(o,{size:11,"aria-hidden":!0})," ",e.git]}):null]})]}),d?(0,t.jsx)("input",{autoFocus:!0,defaultValue:e.name,"aria-label":`New name for ${e.name}`,className:"input absolute top-4 right-10 left-16 py-1 text-sm",onKeyDown:e=>{"Enter"===e.key&&(s?.(e.target.value),m(!1)),"Escape"===e.key&&m(!1)},onBlur:e=>{s?.(e.target.value),m(!1)}}):null,s||r||a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{ref:f,type:"button","aria-label":`Actions for ${e.name}`,"aria-haspopup":"menu","aria-expanded":l,onClick:()=>i(e=>!e),className:"absolute top-3 right-3 rounded p-1 text-mute opacity-0 group-hover:opacity-100 hover:text-ink focus:opacity-100",children:(0,t.jsx)(u.f,{size:15})}),(0,t.jsx)(k.f,{anchor:f,open:l,onClose:()=>i(!1),label:`Actions for ${e.name}`,width:200,role:"menu",children:(0,t.jsxs)("div",{className:"-m-2",children:[s?(0,t.jsx)(j.d,{icon:p.f,label:"Rename",onSelect:()=>(i(!1),m(!0))}):null,r?(0,t.jsx)(j.d,{icon:c.f,label:"Take off the list",onSelect:()=>(i(!1),r())}):null,a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.Z,{}),(0,t.jsx)(j.d,{icon:h.f,label:"Delete project…",danger:!0,onSelect:()=>(i(!1),a())})]}):null]})})]}):null]})}function A({href:e,onClick:n,icon:s,title:r,body:a}){let l=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-accent",children:s}),(0,t.jsx)("span",{className:"text-sm font-semibold text-ink",children:r}),(0,t.jsx)("span",{className:"text-xs text-mute",children:a})]}),i="flex h-full flex-col gap-1.5 rounded-xl border border-line bg-panel p-4 text-left hover:border-mute";return e?(0,t.jsx)(x.default,{href:e,className:i,children:l}):(0,t.jsx)("button",{type:"button",onClick:n,className:i,children:l})}e.s(["HomePage",0,function(){let e=(0,N.d)(),i=(0,w.L)(),{slo:o}=(0,I.G)(),{dataDir:c}=(0,F.J)(),{projects:u,refresh:p,supported:h}=(0,T.O)(),{index:k}=(0,_.K)(),[j,E]=(0,v.useState)(!1),[R,L]=(0,v.useState)(""),[q,D]=(0,v.useState)(null),[O,P]=(0,v.useState)(null),z=(0,C.f)()?.projects,U=(0,y.useRouter)();async function H(t){return t.current?U.push("/"):z?t.exists?void(P(t.name),!await z.open(t.id).catch(()=>!1)&&(P(null),e(`Could not open “${t.name}”`,"error"))):e(`The folder for “${t.name}” isn't there any more: ${t.path}`,"error"):void 0}async function V(){if(!z||!R.trim())return;let t=await z.add({name:R.trim(),folder:q??void 0}).catch(()=>null);if(!t)return e("Could not make the project","error");E(!1),L(""),D(null),await p();let n=(await z.list()).find(e=>e.id===t.id);n&&await H(n)}async function B(){if(!z)return;let e=await z.chooseFolder("open");if(!e)return;let t=await z.add({folder:e});await p();let n=t?(await z.list()).find(e=>e.id===t.id):void 0;n&&await H(n)}async function W(e){!z||await i({title:`Take “${e.name}” off the list?`,body:`Its folder and files stay where they are (${e.path}). Open the folder again to bring it back.`,confirmLabel:"Take off the list"})&&(await z.remove(e.id),await p())}async function K(n){if(!z||!await i({title:`Delete the project “${n.name}”?`,body:(0,t.jsxs)(t.Fragment,{children:["Its requests, environments, history, versions and Trash go to the Recycle Bin, so you can still get them back from there. Anything else in"," ",(0,t.jsx)("span",{className:"font-mono text-ink",children:n.path})," is left alone.",n.current?" The app switches to My workspace first.":""]}),confirmLabel:"Delete project",tone:"danger"}))return;n.current&&P("My workspace");let s=await z.delete(n.id).catch(()=>({ok:!1,keptOthers:!1}));if(!s.ok)return P(null),e(`Could not delete “${n.name}”`,"error");e(s.keptOthers?`Deleted “${n.name}” — the folder's other files were kept`:`Deleted “${n.name}” — it's in the Recycle Bin`,"success"),await p()}async function J(e,t){z&&t.trim()&&t.trim()!==e.name&&(await z.rename(e.id,t.trim()),await p())}let X=(k?.runs??[]).slice().sort((e,t)=>t.startedAt.localeCompare(e.startedAt)).slice(0,6);return(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto",children:[O?(0,t.jsx)("div",{role:"status",className:"fixed inset-0 z-[80] grid place-items-center bg-canvas/80 backdrop-blur-sm",children:(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm text-ink",children:[(0,t.jsx)(d.f,{size:16,className:"animate-spin"})," Opening ",O,"…"]})}):null,(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-7xl flex-wrap gap-8 px-6 py-8 lg:px-10",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-[999_1_40rem] flex-col gap-8",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-end gap-3",children:[(0,t.jsxs)("div",{className:"min-w-60 flex-1",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight text-ink",children:"Projects"}),(0,t.jsx)("p",{className:"mt-1 text-sm text-mute",children:"Each project is a folder on this computer — its requests, environments and history, as plain files you can keep in Git."})]}),h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary",onClick:()=>void B(),children:[(0,t.jsx)(l.f,{size:15,"aria-hidden":!0})," Open folder…"]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-primary",onClick:()=>E(!0),children:[(0,t.jsx)(m.f,{size:15,"aria-hidden":!0})," New project"]})]}):null]}),j?(0,t.jsxs)("form",{className:"flex flex-wrap items-end gap-3 rounded-xl border border-line bg-panel p-4",onSubmit:e=>{e.preventDefault(),V()},children:[(0,t.jsxs)("label",{className:"flex min-w-56 flex-1 flex-col gap-1 text-xs text-mute",children:["Name",(0,t.jsx)("input",{autoFocus:!0,value:R,onChange:e=>L(e.target.value),placeholder:"Payments API",className:"input","aria-label":"Project name"})]}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-[2] flex-col gap-1 text-xs text-mute",children:["Folder",(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate rounded-md border border-line bg-panel-2 px-2 py-1.5 font-mono text-xs text-ink",title:q??void 0,children:q??`Documents/APITestCenter Projects/${R.trim()||"…"}`}),(0,t.jsx)("button",{type:"button",className:"btn btn-secondary py-1.5 text-xs",onClick:async()=>D(await z?.chooseFolder("new")??q),children:"Choose…"})]})]}),(0,t.jsx)("button",{type:"submit",className:"btn btn-primary",disabled:!R.trim(),children:"Create and open"}),(0,t.jsx)("button",{type:"button",className:"btn btn-secondary",onClick:()=>E(!1),children:"Cancel"})]}):null,(0,t.jsx)("ul",{className:"grid grid-cols-[repeat(auto-fill,minmax(17rem,1fr))] gap-4",children:(u??(c?[{id:"default",name:"This folder",path:c,lastOpenedAt:"",current:!0,exists:!0,requests:0,environments:0,git:null,builtIn:!0}]:[])).map(e=>(0,t.jsx)("li",{children:(0,t.jsx)(M,{project:e,onOpen:()=>void H(e),onRename:e.builtIn?void 0:t=>void J(e,t),onRemove:e.builtIn||e.current?void 0:()=>void W(e),onDelete:e.builtIn||!h?void 0:()=>void K(e)})},e.id))}),h?null:(0,t.jsxs)("p",{className:"text-sm text-mute",children:["Several projects need the desktop app. On the command line, pick a folder with ",(0,t.jsx)("code",{className:"font-mono text-ink",children:"--data"}),": ",(0,t.jsx)("code",{className:"font-mono text-ink",children:"npx apitestcenter ui --data api-tests"}),"."]}),(0,t.jsxs)("section",{"aria-labelledby":"start-title",children:[(0,t.jsx)("h2",{id:"start-title",className:"mb-3 text-base font-semibold text-ink",children:"Start something"}),(0,t.jsxs)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(14rem,1fr))] gap-3",children:[(0,t.jsx)(A,{href:"/",icon:(0,t.jsx)(a.f,{size:16,"aria-hidden":!0}),title:"Send a request",body:"Try the practice API built in"}),(0,t.jsx)(A,{onClick:()=>(0,$.F)(),icon:(0,t.jsx)(r.f,{size:16,"aria-hidden":!0}),title:"Bring your requests",body:"Postman, Insomnia, Bruno, OpenAPI, .http, Hurl"}),(0,t.jsx)(A,{href:"/",icon:(0,t.jsx)(f,{size:16,"aria-hidden":!0}),title:"Performance test an endpoint",body:"k6 runs it here — nothing is uploaded"}),(0,t.jsx)(A,{onClick:()=>(0,g.j)(),icon:(0,t.jsx)(s.f,{size:16,"aria-hidden":!0}),title:"Connect your AI assistant",body:"MCP for Claude, Cursor, VS Code"})]})]})]}),(0,t.jsxs)("aside",{"aria-labelledby":"recent-title",className:"flex min-w-0 flex-[1_1_18rem] flex-col gap-3",children:[(0,t.jsx)("h2",{id:"recent-title",className:"text-base font-semibold text-ink",children:"Recent performance tests"}),X.length?(0,t.jsx)("ul",{className:"overflow-hidden rounded-xl border border-line bg-panel",children:X.map((e,s)=>(0,t.jsx)("li",{className:s?"border-t border-line":"",children:(0,t.jsxs)(x.default,{href:"/history",className:"flex items-center gap-3 px-4 py-3 hover:bg-panel-2",children:[(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"block truncate text-sm text-ink",children:e.name}),(0,t.jsxs)("span",{className:"block truncate font-mono text-xs text-mute",children:["p95 ",(0,S.E)(e.p95)," · ",new Date(e.startedAt).toLocaleDateString(void 0,{day:"numeric",month:"short"})]})]}),(0,t.jsx)(b.VerdictTag,{level:(0,n.F)(e.verdict,{slo:o}).overall})]})},e.id))}):(0,t.jsx)("p",{className:"rounded-xl border border-dashed border-line px-4 py-6 text-sm text-mute",children:"Performance tests in this project will show here."})]})]})]})}],92016)},37837,e=>{var t=e.i(72587),n=e.i(55218),s=e.i(90484),r=e.i(14865);e.s(["f",0,function({anchor:e,open:a,onClose:l,children:i,label:o,width:c=280,role:d="dialog"}){let u=(0,n.useRef)(null),[p,m]=(0,n.useState)(null);return((0,n.useLayoutEffect)(()=>{if(!a)return;let t=()=>{if(!e.current)return;let t=(0,r.C)(e.current),n=(0,r.v)(),s=u.current?.offsetHeight??320,a=n.height-t.bottom-8,l=t.top-8,i=a<Math.min(s,240)&&l>a,o=Math.min(Math.max(8,t.right-c),n.width-c-8);m({top:i?Math.max(8,t.top-Math.min(s,l)-4):t.bottom+4,left:o,maxHeight:Math.max(160,(i?l:a)-4)})};t();let n=window.requestAnimationFrame(t);return window.addEventListener("resize",t),()=>{window.cancelAnimationFrame(n),window.removeEventListener("resize",t)}},[a,e,c]),(0,n.useEffect)(()=>{if(!a)return;let t=t=>{let n=t.target;u.current?.contains(n)||e.current?.contains(n)||l()},n=t=>{"Escape"===t.key&&(t.stopPropagation(),l(),e.current?.focus())},s=e=>{u.current?.contains(e.target)||l()},r=t=>{e.current?.contains(t.target)&&(t.stopPropagation(),t.preventDefault(),l())};return document.addEventListener("pointerdown",t,!0),document.addEventListener("click",r,!0),document.addEventListener("keydown",n,!0),document.addEventListener("scroll",s,!0),()=>{document.removeEventListener("pointerdown",t,!0),document.removeEventListener("click",r,!0),document.removeEventListener("keydown",n,!0),document.removeEventListener("scroll",s,!0)}},[a,l,e]),(0,n.useEffect)(()=>{a&&window.setTimeout(()=>u.current?.querySelector("[role=menuitem], input, select, button")?.focus(),0)},[a]),!a||"u"<typeof document)?null:(0,s.createPortal)((0,t.jsx)("div",{ref:u,role:d,"aria-label":o,style:{top:p?.top??-9999,left:p?.left??-9999,width:c,maxHeight:p?.maxHeight},className:"anim-pop fixed z-[70] overflow-auto rounded-lg border border-line bg-panel p-3 shadow-2xl",children:i}),document.body)}])},32610,e=>{var t=e.i(72587),n=e.i(55218);e.s(["f",0,function({orientation:e,label:s,value:r,onMove:a,onStep:l,onReset:i,onDragging:o,className:c="",style:d}){let[u,p]=(0,n.useState)(!1);(0,n.useEffect)(()=>o?.(u),[u,o]),(0,n.useEffect)(()=>{if(!u)return;let t=e=>a(e.clientX,e.clientY),n=()=>p(!1);return document.body.style.userSelect="none",document.body.style.cursor="vertical"===e?"col-resize":"row-resize",window.addEventListener("pointermove",t),window.addEventListener("pointerup",n),()=>{document.body.style.userSelect="",document.body.style.cursor="",window.removeEventListener("pointermove",t),window.removeEventListener("pointerup",n)}},[u,a,e]);let m="vertical"===e;return(0,t.jsx)("div",{role:"separator",tabIndex:0,"aria-orientation":e,"aria-label":s,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(r),title:`${s} — drag, or double-click to reset`,onPointerDown:e=>{0===e.button&&(e.preventDefault(),p(!0))},onDoubleClick:i,style:{...d,outline:"none"},onKeyDown:e=>{let t=m?"ArrowLeft":"ArrowUp";e.key===t||e.key===(m?"ArrowRight":"ArrowDown")?(e.preventDefault(),l(e.key===t?-1:1,e.shiftKey)):("Enter"===e.key||"Home"===e.key)&&(e.preventDefault(),i())},className:`group z-20 hidden touch-none outline-none lg:block ${m?"w-2 cursor-col-resize":"h-2 cursor-row-resize"} ${c}`,children:(0,t.jsx)("span",{"aria-hidden":!0,className:`pointer-events-none absolute bg-accent opacity-0 transition-opacity group-hover:opacity-60 group-focus-visible:opacity-100 ${u?"opacity-100":""} ${m?"inset-y-0 left-1/2 w-0.5 -translate-x-1/2":"inset-x-0 top-1/2 h-0.5 -translate-y-1/2"}`})})}])},30617,e=>{e.i(24856);var t=e.i(46306),n=e.i(36558),s=e.i(2385),r=e.i(17219);let a={base:0,header:1,desc:2,pass:3,warn:4,fail:5};function l(e){return String(e).replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("\n","&#10;")}function i(e,t,n){if("level"===e)return"pass"===t?a.pass:"warn"===t?a.warn:"fail"===t?a.fail:a.base;let s="number"==typeof t?t:Number(t);return"errors"===e?s>=n.errorFail?a.fail:s>=n.errorWarn?a.warn:a.pass:s>=n.p95FailMs?a.fail:s>=n.p95WarnMs?a.warn:a.pass}let o=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
- <styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
3
- <fonts count="3">
4
- <font><sz val="11"/><name val="Calibri"/></font>
5
- <font><b/><sz val="11"/><color rgb="FFFFFFFF"/><name val="Calibri"/></font>
6
- <font><sz val="10"/><color rgb="FF5C6778"/><name val="Calibri"/></font>
7
- </fonts>
8
- <fills count="6">
9
- <fill><patternFill patternType="none"/></fill>
10
- <fill><patternFill patternType="gray125"/></fill>
11
- <fill><patternFill patternType="solid"><fgColor rgb="FF0B8F7C"/></patternFill></fill>
12
- <fill><patternFill patternType="solid"><fgColor rgb="FFDCFCE7"/></patternFill></fill>
13
- <fill><patternFill patternType="solid"><fgColor rgb="FFFEF3C7"/></patternFill></fill>
14
- <fill><patternFill patternType="solid"><fgColor rgb="FFFECACA"/></patternFill></fill>
15
- </fills>
16
- <borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders>
17
- <cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>
18
- <cellXfs count="6">
19
- <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/>
20
- <xf numFmtId="0" fontId="1" fillId="2" borderId="0" xfId="0" applyFont="1" applyFill="1" applyAlignment="1"><alignment horizontal="center" vertical="center"/></xf>
21
- <xf numFmtId="0" fontId="2" fillId="0" borderId="0" xfId="0" applyFont="1" applyAlignment="1"><alignment wrapText="1" vertical="center"/></xf>
22
- <xf numFmtId="0" fontId="0" fillId="3" borderId="0" xfId="0" applyFill="1"/>
23
- <xf numFmtId="0" fontId="0" fillId="4" borderId="0" xfId="0" applyFill="1"/>
24
- <xf numFmtId="0" fontId="0" fillId="5" borderId="0" xfId="0" applyFill="1"/>
25
- </cellXfs>
26
- </styleSheet>`;async function c(e,r,l){let o=(0,s.s)(e,{slo:r}),c=(0,s.v)(r),u=(0,t.$)(l,(0,t.L)(e));return d([{name:"Overview",rows:[[{v:"Key",s:a.header},{v:"Value",s:a.header},{v:"What this means",s:a.header}],...(0,n.E)(e).map(e=>{let t=a.base;return"failed_rate"===e.key&&(t=i("errors",e.value,c)),"latency_p95_ms"===e.key&&(t=i("latency",e.value,c)),(e.key.startsWith("status_5")||"status_0"===e.key)&&(t=Number(e.value)>0?a.fail:a.pass),e.key.startsWith("status_4")&&Number(e.value)>0&&(t=a.warn),e.key.startsWith("threshold:")&&(t="pass"===e.value?a.pass:a.fail),[{v:e.key},{v:e.value,s:t},{v:e.description,s:a.desc}]})]},{name:"Result summary",rows:[[{v:"Field",s:a.header},{v:"Level",s:a.header},{v:"What this means",s:a.header}],[{v:"overall"},{v:o.overall,s:i("level",o.overall,c)},{v:o.headline,s:a.desc}],...o.aspects.map(e=>[{v:e.title},{v:e.level,s:i("level",e.level,c)},{v:e.summary,s:a.desc}]),[{v:"disclaimer"},{v:""},{v:o.disclaimer,s:a.desc}],...u.map((e,n)=>[{v:`chart_${n+1}`},{v:`${e.w}x${e.h}`},{v:t.p[e.id],s:a.desc}])]},{name:"Second by second",rows:[n.V.map(e=>({v:e.header,s:a.header})),...e.buckets.map(e=>(0,n.u)(e).map((e,t)=>{let s=n.V[t]?.key,r=a.base;return"p95_ms"===s&&(r=i("latency",e,c)),"failed_rate"===s&&(r=i("errors",e,c)),"http_5xx"===s&&Number(e)>0&&(r=a.fail),"http_0"===s&&Number(e)>0&&(r=a.fail),"http_4xx"===s&&Number(e)>0&&(r=a.warn),"http_2xx"===s&&Number(e)>0&&(r=a.pass),{v:e,s:r}}))]}])}function d(e){let t={"[Content_Types].xml":`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
27
- <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
28
- <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
29
- <Default Extension="xml" ContentType="application/xml"/>
30
- <Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/>
31
- <Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>
32
- ${e.map((e,t)=>` <Override PartName="/xl/worksheets/sheet${t+1}.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>`).join("\n")}
33
- </Types>`,"_rels/.rels":`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
34
- <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
35
- <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/>
36
- </Relationships>`,"xl/workbook.xml":`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
37
- <workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
38
- <sheets>
39
- ${e.map((e,t)=>` <sheet name="${l(e.name.replace(/[:\\/?*[\]]/g," ").trim().slice(0,31)||"Sheet")}" sheetId="${t+1}" r:id="rId${t+1}"/>`).join("\n")}
40
- </sheets>
41
- </workbook>`,"xl/_rels/workbook.xml.rels":`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
42
- <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
43
- ${e.map((e,t)=>` <Relationship Id="rId${t+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet${t+1}.xml"/>`).join("\n")}
44
- <Relationship Id="rId${e.length+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>
45
- </Relationships>`,"xl/styles.xml":o};return e.forEach((e,n)=>{var s;let r,a,i;return t[`xl/worksheets/sheet${n+1}.xml`]=(s=e.rows,a=Array.from({length:r=s[0]?.length??0},(e,t)=>{let n=function(e,t,n=10,s=48){let r=n;for(let n of e){let e=n[t]?.v;void 0!==e&&(r=Math.max(r,String(e).length+2))}return Math.min(s,r)}(s,t,t===r-1&&r>=3?36:12,t===r-1&&r>=3?72:42);return`<col min="${t+1}" max="${t+1}" width="${n}" customWidth="1"/>`}).join(""),i=s.map((e,t)=>`<row r="${t+1}" ht="${0===t?22:18}" customHeight="1">${e.map((e,n)=>{var s;let r,a;return s=t+1,r=`${function(e){let t=e+1,n="";for(;t>0;)n=String.fromCharCode(65+(t-1)%26)+n,t=Math.floor((t-1)/26);return n}(n)}${s}`,a=void 0!==e.s?` s="${e.s}"`:"","number"==typeof e.v&&Number.isFinite(e.v)?`<c r="${r}"${a}><v>${e.v}</v></c>`:`<c r="${r}"${a} t="inlineStr"><is><t xml:space="preserve">${l(e.v)}</t></is></c>`}).join("")}</row>`).join(""),`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
46
- <worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
47
- <sheetViews><sheetView workbookViewId="0"><pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"/></sheetView></sheetViews>
48
- <cols>${a}</cols>
49
- <sheetData>${i}</sheetData>
50
- </worksheet>`)}),new Blob([(0,r.f)(t)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})}e.s(["S",0,a,"a",0,c,"F",0,d])},62766,e=>{var t=e.i(55218);let n="apitestcenter-pane-sizes",s=(e,t,n)=>Math.min(n,Math.max(t,e));function r(e){let[n,s]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{let t=window.matchMedia(e),n=()=>s(t.matches);return n(),t.addEventListener("change",n),()=>t.removeEventListener("change",n)},[e]),n}e.s(["K",0,function(e,{min:a=220,max:l=900,rest:i=360}={}){let o=r("(min-width: 1024px)"),c=(0,t.useRef)(null),d=`${n}:${e}`,[u,p]=(0,t.useState)(null),[m,h]=(0,t.useState)(0);(0,t.useEffect)(()=>{try{let e=Number(JSON.parse(localStorage.getItem(d)??"null"));Number.isFinite(e)&&e>0&&p(e)}catch{}},[d]),(0,t.useEffect)(()=>{let e=[...c.current?.children??[]].find(e=>"separator"!==e.getAttribute("role"));if(!e)return;let t=new ResizeObserver(()=>h(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[o]);let f=(0,t.useCallback)(e=>{let t=c.current?.getBoundingClientRect(),n=null===e?null:Math.round(s(e,a,Math.max(a,Math.min(l,(t?.width??l+i)-i))));p(n);try{null===n?localStorage.removeItem(d):localStorage.setItem(d,JSON.stringify(n))}catch{}},[l,a,i,d]),x=()=>c.current?.getBoundingClientRect();return{wide:o,gridRef:c,gridStyle:o&&null!==u?{gridTemplateColumns:`${u}px minmax(0,1fr)`}:void 0,splitter:{orientation:"vertical",value:(u??m)/Math.max(1,x()?.width??1)*100,onMove:e=>{let t=x();t&&f(e-t.left)},onStep:(e,t)=>f((u??m)+16*e*(t?4:1)),onReset:()=>f(null),className:"absolute inset-y-0 -translate-x-1/2",style:{left:`${m}px`}}}},"f",0,function(e,a){let l=r("(min-width: 1024px)"),i=r("(min-width: 1536px)"),o=(0,t.useRef)(null),[c,d]=(0,t.useState)({panel:null,beside:null,below:null});(0,t.useEffect)(()=>{try{let e=JSON.parse(localStorage.getItem(n)??"null"),t=e=>"number"==typeof e&&Number.isFinite(e)?e:null;e&&d({panel:t(e.panel),beside:t(e.beside),below:t(e.below)})}catch{}},[]);let u=(0,t.useCallback)(e=>{d(t=>{let s={...t,...e};try{localStorage.setItem(n,JSON.stringify(s))}catch{}return s})},[]),p=s(c.panel??(i?256:240),180,480),m=a?p:0,h=s("below"===e?c.below??.5:c.beside??(i?5/12:.5),.2,.8),f=l?"below"===e?{gridTemplateColumns:`${m}px minmax(0,1fr)`,gridTemplateRows:`minmax(0,${h}fr) minmax(0,${1-h}fr)`}:{gridTemplateColumns:`${m}px minmax(0,${h}fr) minmax(0,${1-h}fr)`}:void 0,x=()=>o.current?.getBoundingClientRect(),y=(0,t.useCallback)(e=>{let t=x();t&&u({panel:s(e-t.left,180,Math.min(480,.4*t.width))})},[u]),v=(0,t.useCallback)((t,n)=>{let r=x();r&&("below"===e?u({below:s((n-r.top)/r.height,.2,.8)}):u({beside:s((t-r.left-m)/Math.max(1,r.width-m),.2,.8)}))},[u,e,m]);return{wide:l,gridRef:o,gridStyle:f,panelWidth:l?p:void 0,panel:{value:p/480*100,onMove:e=>y(e),onStep:(e,t)=>u({panel:s(p+16*e*(t?4:1),180,480)}),onReset:()=>u({panel:null}),style:{left:`${m}px`}},split:{value:100*h,onMove:v,onStep:(t,n)=>u("below"===e?{below:s(h+.02*t*(n?5:1),.2,.8)}:{beside:s(h+.02*t*(n?5:1),.2,.8)}),onReset:()=>u("below"===e?{below:null}:{beside:null}),style:"below"===e?{top:`${100*h}%`,left:`${m}px`,right:0}:{left:`calc(${m}px + (100% - ${m}px) * ${h})`,top:0,bottom:0}}}}])},61230,17847,e=>{e.s(["f",0,function(e){try{return decodeURI(e.replace(/\+/g,"%20")).replace(/%2C/gi,",").replace(/%24/g,"$").replace(/%27/g,"'").replace(/%3A/gi,":").replace(/%2F/gi,"/").replace(/%3D/gi,"=")}catch{return e}}],61230);var t=e.i(72587),n=e.i(55218),s=e.i(90484),r=e.i(14865);e.s(["c",0,function({at:e,label:a,onClose:l,children:i}){let o=(0,n.useRef)(null),[c,d]=(0,n.useState)(null);return((0,n.useLayoutEffect)(()=>{let t=o.current;if(!t)return;let n=(0,r.v)();d({left:Math.max(8,Math.min(e.x,n.width-t.offsetWidth-8)),top:Math.max(8,Math.min(e.y,n.height-t.offsetHeight-8))}),t.querySelector('[role="menuitem"]:not(:disabled)')?.focus()},[e]),(0,n.useEffect)(()=>{let e=e=>{o.current?.contains(e.target)||l()},t=e=>{if("Escape"===e.key)e.stopPropagation(),l();else if("ArrowDown"===e.key||"ArrowUp"===e.key){e.preventDefault();let t=[...o.current?.querySelectorAll('[role="menuitem"]:not(:disabled)')??[]],n=t.indexOf(document.activeElement);t[(n+("ArrowDown"===e.key?1:-1)+t.length)%t.length]?.focus()}};return document.addEventListener("pointerdown",e,!0),document.addEventListener("scroll",e,!0),window.addEventListener("resize",l),window.addEventListener("keydown",t,!0),()=>{document.removeEventListener("pointerdown",e,!0),document.removeEventListener("scroll",e,!0),window.removeEventListener("resize",l),window.removeEventListener("keydown",t,!0)}},[l]),"u"<typeof document)?null:(0,s.createPortal)((0,t.jsx)("div",{ref:o,role:"menu","aria-label":a,style:{left:c?.left??-9999,top:c?.top??-9999},className:"fixed z-[80] w-56 rounded-lg border border-line bg-panel p-1 shadow-2xl",children:i}),document.body)},"d",0,function({icon:e,label:n,hint:s,onSelect:r,danger:a=!1,disabled:l=!1}){return(0,t.jsxs)("button",{type:"button",role:"menuitem",disabled:l,onClick:r,className:`flex w-full items-center gap-2.5 rounded-md px-2.5 py-1.5 text-left text-sm disabled:opacity-40 ${a?"text-bad hover:bg-bad/10":"text-ink hover:bg-panel-2"}`,children:[(0,t.jsx)("span",{className:`flex w-4 shrink-0 justify-center ${a?"":"text-mute"}`,"aria-hidden":!0,children:e?(0,t.jsx)(e,{size:14}):null}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:n}),s?(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-mute",children:s}):null]})},"U",0,function({children:e}){return(0,t.jsx)("div",{className:"px-2.5 pt-1.5 pb-1 text-[11px] font-medium tracking-wide text-mute uppercase",children:e})},"Z",0,function(){return(0,t.jsx)("div",{role:"separator",className:"my-1 h-px bg-line"})}],17847)},17219,e=>{let t=new Uint32Array(256).map((e,t)=>{let n=t;for(let e=0;e<8;e++)n=1&n?0xedb88320^n>>>1:n>>>1;return n>>>0});function n(e){let t=new Uint8Array(2);return new DataView(t.buffer).setUint16(0,e,!0),t}function s(e){let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),t}function r(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let s of e)t.set(s,n),n+=s.length;return t}e.s(["f",0,function(e){let a=new TextEncoder,l=[],i=[],o=0;for(let[c,d]of Object.entries(e)){let e=a.encode(c),u="string"==typeof d?a.encode(d):d,p=function(e){let n=0xffffffff;for(let s of e)n=t[(n^s)&255]^n>>>8;return(0xffffffff^n)>>>0}(u),m=r([s(0x4034b50),n(20),n(0),n(0),n(0),n(0),s(p),s(u.length),s(u.length),n(e.length),n(0),e,u]),h=r([s(0x2014b50),n(20),n(20),n(0),n(0),n(0),n(0),s(p),s(u.length),s(u.length),n(e.length),n(0),n(0),n(0),n(0),s(0),s(o),e]);l.push(m),i.push(h),o+=m.length}let c=r(i),d=r([s(0x6054b50),n(0),n(0),n(Object.keys(e).length),n(Object.keys(e).length),s(c.length),s(o),n(0)]),u=r([...l,c,d]);return new Blob([u.buffer.slice(u.byteOffset,u.byteOffset+u.byteLength)],{type:"application/zip"})}])},13643,e=>{let t=(0,e.i(99522).f)("bell-off",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]);e.s(["f",0,t],13643)},95211,e=>{let t=(0,e.i(99522).f)("columns-3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);e.s(["f",0,t],95211)},81538,e=>{let t=(0,e.i(99522).f)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["f",0,t],81538)},13163,e=>{let t=(0,e.i(99522).f)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["f",0,t],13163)},3792,e=>{let t=(0,e.i(99522).f)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["f",0,t],3792)},95927,e=>{let t=(0,e.i(99522).f)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);e.s(["f",0,t],95927)},66478,14168,e=>{let t=(0,e.i(99522).f)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);async function n(e){let t=await e.json().catch(()=>null);if(!e.ok)throw Error(t?.error??`Engine error (${e.status})`);return t}e.s(["f",0,t],66478);let s=(e,t,n)=>fetch(t,{method:e,headers:void 0===n?void 0:{"content-type":"application/json"},body:void 0===n?void 0:JSON.stringify(n)});e.s(["Y",0,{plan:e=>fetch(`/engine/suites/plan?collection=${encodeURIComponent(e)}`,{cache:"no-store"}).then(e=>n(e)),savePlan:(e,t)=>s("PUT","/engine/suites/plan",{collection:e,...t}).then(e=>n(e)),start:e=>s("POST","/engine/suites/runs",e).then(e=>n(e)),get:e=>fetch(`/engine/suites/runs/${encodeURIComponent(e)}`,{cache:"no-store"}).then(e=>n(e)),stop:e=>s("POST",`/engine/suites/runs/${encodeURIComponent(e)}/stop`).then(e=>n(e))},"W",0,function(e){return`/suite?c=${encodeURIComponent(e)}`}],14168)},36558,e=>{function t(e,n=2){if(!Number.isFinite(e))return 0;let s=10**n;return Math.round(e*s)/s}function n(e){return e>=100?Math.round(e):e>=10?t(e,1):t(e,2)}function s(e){return e>=10?Math.round(e):t(e,1)}function r(e,t=e=>e){return null==e?"":t(e)}e.s(["V",0,[{key:"elapsed_s",header:"Seconds into test",description:"Seconds from the start of the run."},{key:"ts",header:"Clock time",description:"Wall-clock time for this one-second sample."},{key:"vus",header:"Concurrent users",description:"Virtual users (VUs) active in this second."},{key:"rps",header:"Requests per second",description:"Completed requests in this second."},{key:"p50_ms",header:"Median latency (ms)",description:"Half of requests this second were faster than this."},{key:"p95_ms",header:"95th percentile (ms)",description:"95% of requests this second were faster than this."},{key:"p99_ms",header:"99th percentile (ms)",description:"The slow tail this second — 1 in 100 was slower."},{key:"failed_rate",header:"Error rate",description:"Share of requests that failed in this second (0–1)."},{key:"http_2xx",header:"Success (2xx)",description:"Successful HTTP responses this second."},{key:"http_4xx",header:"Client errors (4xx)",description:"Client / auth errors this second."},{key:"http_5xx",header:"Server errors (5xx)",description:"Server errors this second."},{key:"http_0",header:"Network failures",description:"No HTTP status (timeout / reset) this second."},{key:"bytes_in",header:"Bytes received",description:"Response bytes this second."},{key:"bytes_out",header:"Bytes sent",description:"Request bytes this second."},{key:"p90_ms",header:"90th percentile (ms)",description:"90% of requests this second were faster than this."},{key:"p999_ms",header:"99.9th percentile (ms)",description:"1 in 1,000 requests this second was slower than this."},{key:"max_ms",header:"Slowest (ms)",description:"Slowest request this second."},{key:"ttfb_ms",header:"Server time (ms)",description:"Average time to first byte this second — the server's own work."},{key:"connect_ms",header:"TCP connect (ms)",description:"Average TCP connect time this second (0 when connections are reused)."},{key:"tls_ms",header:"TLS handshake (ms)",description:"Average TLS handshake time this second."},{key:"checks_passed",header:"Checks passed",description:"Response checks that passed this second."},{key:"checks_failed",header:"Checks failed",description:"Response checks that failed this second."},{key:"dropped",header:"Dropped requests",description:"Rate mode: requests k6 could not start this second."}],"u",0,function(e){return[e.elapsedS,e.ts,t(e.vus,1),n(e.rps),s(e.p50Ms),s(e.p95Ms),s(e.p99Ms),t(e.failedRate,4),e.http2xx,e.http4xx,e.http5xx,e.http0,e.bytesIn,e.bytesOut,r(e.p90Ms,s),r(e.p999Ms,s),r(e.maxMs,s),r(e.ttfbMs,s),r(e.connectMs,s),r(e.tlsMs,s),r(e.checksPassed),r(e.checksFailed),r(e.dropped)]},"E",0,function(e){let{summary:r}=e,a=[{key:"run_id",value:e.id,description:"Id of this run in this browser tab."},{key:"test_name",value:e.testName,description:"Display name (method, path, time)."},{key:"status",value:e.status,description:"completed, failed, cancelled, or still running."},{key:"started_at",value:e.startedAt,description:"When the load test started (UTC)."},{key:"ended_at",value:e.endedAt,description:"When the load test finished (UTC)."},{key:"method",value:e.definition.method,description:"HTTP method that was repeated."},{key:"url",value:e.definition.url,description:"Target URL (secrets are not exported)."},{key:"auth_mode",value:e.definition.auth.mode,description:"Auth used: none, bearer, basic, or api_key. The secret is not exported."},{key:"executor",value:e.definition.load.executor,description:"Load pattern: constant-vus (steady) or ramping-vus (ramp / hold / down)."},{key:"requests",value:r.http.requests,description:"How many HTTP calls finished. Zero usually means the target never answered."},{key:"rps_avg",value:n(r.http.rps.avg),description:"Average requests per second completed by this generator."},{key:"rps_max",value:n(r.http.rps.max),description:"Peak requests per second in any one-second sample."},{key:"failed_count",value:r.http.failed.count,description:"Requests that failed (4xx, 5xx, timeout, or no status)."},{key:"failed_rate",value:t(r.http.failed.rate,4),description:"Failed / total. Default warning bar is 1% (0.01)."},{key:"latency_min_ms",value:s(r.latencyMs.min),description:"Fastest request (milliseconds)."},{key:"latency_mean_ms",value:s(r.latencyMs.mean),description:"Average response time. Slow outliers pull this up."},{key:"latency_p50_ms",value:s(r.latencyMs.median),description:"Median — half of requests were faster than this."},{key:"latency_p95_ms",value:s(r.latencyMs.p95),description:"95th percentile — 95% of requests were faster. Usual headline latency."},{key:"latency_p99_ms",value:s(r.latencyMs.p99),description:"99th percentile — the slow tail (1 in 100 was slower)."},{key:"latency_max_ms",value:s(r.latencyMs.max),description:"Slowest single request."},{key:"vus_max",value:r.vus.max,description:"Peak concurrent users (virtual users / VUs)."},{key:"vus_avg",value:t(r.vus.avg,1),description:"Average concurrent users over the run."},{key:"bytes_in",value:r.data.bytesIn,description:"Response bytes received by the generator."},{key:"bytes_out",value:r.data.bytesOut,description:"Request bytes sent by the generator."},{key:"phase_ttfb_avg_ms",value:s(r.phasesMs.ttfb.avg),description:"Time to first byte — waiting on the server after the connection is up."},{key:"phase_tls_avg_ms",value:s(r.phasesMs.tls.avg),description:"TLS handshake time. High values often mean a far or overloaded endpoint."}];for(let[e,t]of Object.entries(r.http.status)){let n="0"===e?"No HTTP status (timeout / network).":Number(e)>=500?"Server error.":Number(e)>=400?"Client / auth error.":"Success-class response.";a.push({key:`status_${e}`,value:t,description:`How many responses had status ${e}. ${n}`})}for(let e of r.thresholds)a.push({key:`threshold:${e.name}`,value:e.ok?"pass":"fail",description:"k6 threshold result for this run."});return a}])}])})();
@@ -1 +0,0 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,60459,e=>{var t=e.i(72587),n=e.i(95486),r=e.i(99522);let i=(0,r.f)("file-search",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]);var a=e.i(84355),s=e.i(67951),o=e.i(91694);let l=(0,r.f)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);var c=e.i(29091),u=e.i(63966),d=e.i(34761),f=e.i(5769),h=e.i(88293);let p=(0,r.f)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var m=e.i(96659),x=e.i(87283),g=e.i(75998),y=e.i(70989),v=e.i(48317),b=e.i(55218),j=e.i(57515),w=e.i(69578),k=e.i(78739),N=e.i(22079);e.i(24856);var C=e.i(92084),S=e.i(56396),E=e.i(727),$=e.i(43101);function P(){let e=(0,S.d)(),t=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let n=!0,r=async()=>{try{let{now:r,results:i}=await $.c.since(t.current??new Date(Date.now()+31536e6).toISOString());if(!n)return;if(null===t.current){t.current=r;return}for(let n of(t.current=i.at(-1)?.at??t.current,i.filter(e=>e.schedule&&!e.manual&&(0,C.F)(e.schedule.notify,e)))){let t=(0,C.v)(n,n.schedule);e(`${t.title}. ${t.body}`,t.ok?"success":"error"),(0,E.k)({title:t.title,body:t.body,tag:`atc-schedule-${n.scheduleId}`})}i.length&&window.dispatchEvent(new Event($.T))}catch{}};r();let i=window.setInterval(()=>void r(),2e4);return()=>{n=!1,window.clearInterval(i)}},[e]),null}var M=e.i(39736),I=e.i(73151),T=e.i(68865),O=e.i(15868);function A(){let{items:e,remove:n,clear:r}=(0,T.w)(),i=(0,y.usePathname)(),a=(0,y.useRouter)();if(!e.length||i.startsWith("/compare"))return null;let o=e.length>=2;return(0,t.jsx)("div",{role:"region","aria-label":"Runs to compare",className:"fixed bottom-4 left-1/2 z-[60] w-[min(56rem,calc(100%-2rem))] -translate-x-1/2",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 rounded-xl border border-accent/40 bg-panel px-3 py-2.5 shadow-2xl",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-sm font-medium text-ink",children:[(0,t.jsx)(s.f,{size:16,className:"text-accent","aria-hidden":!0}),"Compare",(0,t.jsxs)("span",{className:"text-xs font-normal text-mute",children:[e.length," of ",T.V]})]}),(0,t.jsx)("ul",{className:"flex min-w-0 flex-1 flex-wrap gap-1.5",children:e.map(e=>(0,t.jsxs)("li",{className:"flex max-w-56 items-center gap-1 rounded-full border border-line bg-panel-2 py-0.5 pr-1 pl-2.5 text-xs text-ink",title:`${e.endpoint} \xb7 ${new Date(e.startedAt).toLocaleString()}`,children:[(0,t.jsx)("span",{className:"truncate",children:e.name}),(0,t.jsx)("button",{type:"button",onClick:()=>n(e.id),className:"rounded-full p-0.5 text-mute hover:text-bad","aria-label":`Remove ${e.name} from compare`,children:(0,t.jsx)(x.X,{size:12})})]},e.id))}),(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs text-mute hover:text-ink",children:"Clear"}),(0,t.jsx)("button",{type:"button",disabled:!o,title:o?"Open these runs side by side on Compare":"Add at least two runs",onClick:()=>((0,O.m)(),a.push(`/compare?ids=${e.map(e=>e.id).join(",")}`)),className:"btn btn-primary py-1.5 text-sm",children:o?`Compare ${e.length} runs`:"Add one more run"})]})]})})}var R=e.i(7641),z=e.i(72350),L=e.i(5831),_=e.i(67217),q=e.i(56931),U=e.i(5504),D=e.i(74749),F=e.i(91549),V=e.i(97942);let H=(0,r.f)("power-off",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var J=e.i(20054);function B(){let{stopped:e}=(0,J.J)();return((0,b.useEffect)(()=>{e&&window.close()},[e]),e)?(0,t.jsx)("div",{role:"alertdialog","aria-labelledby":"stopped-title",className:"fixed inset-0 z-[90] grid place-items-center bg-canvas/95 p-6 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"max-w-md space-y-3 text-center",children:[(0,t.jsx)(H,{size:28,className:"mx-auto text-mute","aria-hidden":!0}),(0,t.jsx)("h2",{id:"stopped-title",className:"text-lg font-medium text-ink",children:"APITestCenter was stopped"}),(0,t.jsx)("p",{className:"text-sm text-mute",children:"It was closed from the command line (Ctrl+C). Your saved requests are safe in their folder. You can close this tab."}),(0,t.jsxs)("p",{className:"text-sm text-mute",children:["To open it again, run ",(0,t.jsx)("code",{className:"rounded bg-panel-2 px-1.5 py-0.5 font-mono text-ink",children:"atc ui"})," — this page reconnects by itself if it starts on the same address."]})]})}):null}var W=e.i(839),K=e.i(11718);let Z=(0,r.f)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var G=e.i(83316),X=e.i(67938),Y=e.i(4488),Q=e.i(73606),ee=e.i(71189);let et=(0,r.f)("rows-3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]),en=(0,r.f)("rows-4",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 7.5H3",key:"1hm9pq"}],["path",{d:"M21 12H3",key:"2avoz0"}],["path",{d:"M21 16.5H3",key:"n7jzkj"}]]);var er=e.i(67290),ei=e.i(30135),ea=e.i(745),es=e.i(45377),eo=e.i(14865);let el=[{id:"system",label:"Theme follows the system",icon:d.f},{id:"light",label:"Light theme",icon:ea.f},{id:"dark",label:"Dark theme",icon:Q.f}];function ec({onClick:e,title:n,children:r,label:i}){return(0,t.jsx)("button",{type:"button",onClick:e,title:n,"aria-label":i,className:"inline-flex h-6 shrink-0 items-center gap-1.5 rounded px-2 text-mute hover:bg-panel-2 hover:text-ink",children:r})}function eu(){let e=(0,es.f)();if(!e||"ready"!==e.state&&"available"!==e.state&&"downloading"!==e.state)return null;let n="important"===e.level,r="ready"===e.state?"Restart to update":"downloading"===e.state?`Downloading ${e.percent}%`:n?`Important update: ${e.version}`:`${e.version} available`,i="ready"===e.state?`Version ${e.version} is downloaded: restart to update, or it installs when you close the app`:"downloading"===e.state?`Downloading version ${e.version}`:`Version ${e.version} is available — see what's new`;return(0,t.jsxs)("button",{type:"button",onClick:I.g,title:n&&e.why?`${i}. ${e.why}`:i,className:`inline-flex h-6 shrink-0 items-center gap-1.5 rounded px-2 font-medium ${n?"bg-warn/15 text-warn hover:bg-warn/25":"bg-accent-dim text-accent hover:brightness-110"}`,children:[(0,t.jsx)(K.f,{size:13,"aria-hidden":!0})," ",r]})}function ed(){let{checked:e,online:n,k6Ready:r,k6Label:i,appVersion:a}=(0,J.J)(),{zoom:s,zoomIn:o,zoomOut:l,resetZoom:c,density:u,setDensity:d}=(0,eo.x)(),{theme:f,setTheme:h}=(0,v.i)(),[p,m]=(0,b.useState)(!1);(0,b.useEffect)(()=>m(!0),[]);let x=Math.max(0,el.findIndex(e=>e.id===(p?f??"system":"system"))),g=el[x].icon;return(0,t.jsxs)("footer",{"aria-label":"Status bar",className:"flex h-8 shrink-0 items-center gap-0.5 overflow-x-auto border-t border-line bg-panel px-2 text-xs whitespace-nowrap",children:[(0,t.jsxs)("span",{role:"status",className:"inline-flex shrink-0 items-center gap-2 px-2 text-ink",title:n?i:"Start it with pnpm dev",children:[(0,t.jsx)("span",{className:`h-2 w-2 rounded-full ${e?n&&r?"bg-ok":n?"bg-warn":"bg-bad":"bg-mute"}`,"aria-hidden":!0}),e?n?r?"Engine ready":"Engine online, k6 missing":"Engine offline":"Checking engine"]}),n?(0,t.jsx)("span",{className:"hidden shrink-0 px-1 text-mute md:inline",children:i}):null,(0,t.jsx)("span",{className:"mx-1 h-4 w-px shrink-0 bg-line","aria-hidden":!0}),(0,t.jsxs)(ec,{onClick:()=>(0,_.F)(),title:"Import requests — Postman, Insomnia, Bruno, OpenAPI, .http, Hurl, HAR",children:[(0,t.jsx)(X.f,{size:13,"aria-hidden":!0})," Import"]}),(0,t.jsxs)(ec,{onClick:()=>(0,U.L)(),title:"Cookies kept between requests",children:[(0,t.jsx)(G.f,{size:13,"aria-hidden":!0})," Cookies"]}),(0,t.jsxs)(ec,{onClick:()=>(0,q.j)(),title:"Client certificates and trusted CAs",children:[(0,t.jsx)(ei.f,{size:13,"aria-hidden":!0})," Certificates"]}),(0,t.jsxs)(ec,{onClick:()=>(0,D.o)(),title:"Answer requests with example responses",children:[(0,t.jsx)(er.f,{size:13,"aria-hidden":!0})," Mock server"]}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsxs)("span",{role:"group","aria-label":"Zoom",className:"inline-flex shrink-0 items-center",children:[(0,t.jsx)(ec,{onClick:l,title:"Zoom out (Ctrl −)",label:"Zoom out",children:(0,t.jsx)(Y.f,{size:13,"aria-hidden":!0})}),(0,t.jsx)(ec,{onClick:c,title:"Reset zoom (Ctrl 0)",label:`Zoom ${Math.round(100*s)}%, reset`,children:(0,t.jsxs)("span",{className:"tabular w-9 text-center font-mono",children:[Math.round(100*s),"%"]})}),(0,t.jsx)(ec,{onClick:o,title:"Zoom in (Ctrl +)",label:"Zoom in",children:(0,t.jsx)(ee.f,{size:13,"aria-hidden":!0})})]}),(0,t.jsxs)(ec,{onClick:()=>d("compact"===u?"comfortable":"compact"),title:"compact"===u?"Compact rows — click for comfortable":"Comfortable rows — click for compact",children:["compact"===u?(0,t.jsx)(en,{size:13,"aria-hidden":!0}):(0,t.jsx)(et,{size:13,"aria-hidden":!0}),"compact"===u?"Compact":"Comfortable"]}),(0,t.jsx)(ec,{onClick:()=>h(el[(x+1)%el.length].id),title:`${el[x].label} — click to change`,label:`${el[x].label}. Click to change.`,children:(0,t.jsx)(g,{size:13,"aria-hidden":!0})}),(0,t.jsx)("span",{"data-tour":"help",className:"inline-flex",children:(0,t.jsxs)(ec,{onClick:R.t,title:"What the words mean, and the tour",children:[(0,t.jsx)(Z,{size:13,"aria-hidden":!0})," Help"]})}),(0,t.jsx)(eu,{}),(0,t.jsx)(ec,{onClick:k.J,title:"Version, updates, and where your files are",children:a&&"dev"!==a?`v${a}`:"Development build"})]})}var ef=e.i(51554),eh=e.i(21407),ep=e.i(44505),em=e.i(99822),ex=e.i(48181),eg=e.i(2603),ey=e.i(60889),ev=e.i(30635),eb=e.i(6278);let ej=[{href:"/home",label:"Home",icon:l},{href:"/",label:"Test API",icon:a.f},{href:"/suite",label:"Run collection",icon:c.f},{href:"/compare",label:"Compare",icon:s.f},{href:"/connections",label:"Connections",icon:f.f},{href:"/history",label:"History",icon:o.f},{href:"/preview",label:"Open report",icon:i}],ew="apitestcenter-phone-notice";function ek({children:e}){let r=(0,y.usePathname)(),i=(0,eg.P)(),{activeEnv:a}=(0,eb.U)(),s=(0,ex.v)(a),o=ex.q[s],[l,c]=(0,b.useState)(!1),{resolvedTheme:f}=(0,v.i)(),{current:C}=(0,ev.O)(),{license:S}=(0,ey.f)(),E=S?.account??null;return(0,b.useEffect)(eh.j,[]),(0,b.useEffect)(()=>{let e=(0,ep.f)();e?.platform&&(document.documentElement.dataset.desktop=e.platform),e&&(0,em.x)()},[]),(0,b.useEffect)(()=>{let e=(0,ep.f)();if(!e?.setTitleBarColours)return;let t=requestAnimationFrame(()=>{let t=getComputedStyle(document.documentElement);e.setTitleBarColours(t.getPropertyValue("--panel").trim(),t.getPropertyValue("--ink").trim())});return()=>cancelAnimationFrame(t)},[f]),(0,b.useEffect)(()=>{c(window.matchMedia("(max-width: 767px)").matches&&"dismissed"!==window.sessionStorage.getItem(ew))},[]),(0,t.jsxs)("div",{className:"flex flex-col overflow-hidden",style:{height:"calc(100dvh / var(--zoom, 1))"},children:[(0,t.jsx)("a",{href:"#main",className:"sr-only z-50 rounded-md bg-accent px-3 py-2 text-sm text-canvas focus:not-sr-only focus:fixed focus:top-2 focus:left-2",children:"Skip to content"}),o?(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none fixed inset-x-0 z-[90]",style:{background:o,height:3,top:"calc(48px / var(--zoom, 1) - 3px)"}}):null,(0,t.jsxs)("header",{className:"app-titlebar flex shrink-0 items-center gap-3 border-b border-line bg-panel px-3",style:{height:"calc(48px / var(--zoom, 1))"},children:[(0,t.jsxs)(g.default,{href:"/",className:"flex shrink-0 items-center gap-2 rounded-md px-1 py-1","aria-label":"APITestCenter home",children:[(0,t.jsx)(j.f,{size:26}),(0,t.jsx)("span",{className:"hidden text-sm font-semibold tracking-tight text-ink sm:inline",children:"APITestCenter"})]}),C?(0,t.jsxs)(g.default,{href:"/home",title:`${C.path} — switch project`,className:"flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 text-sm text-ink hover:bg-panel-2",children:[(0,t.jsx)("span",{className:"text-mute","aria-hidden":!0,children:"/"}),(0,t.jsx)("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{background:(0,ev.W)(C.id)},"aria-hidden":!0}),(0,t.jsx)("span",{className:"max-w-48 truncate",children:C.name}),(0,t.jsx)(n.f,{size:13,className:"shrink-0 text-mute","aria-hidden":!0})]}):null,(0,t.jsx)("div",{className:"flex min-w-0 flex-1 justify-center",children:(0,t.jsxs)("button",{type:"button",onClick:()=>window.dispatchEvent(new Event("atc:palette")),"aria-label":"Open command palette",title:`Search, run or jump to anything (${i}+K)`,className:"flex h-8 w-full max-w-md min-w-0 items-center gap-2 rounded-lg border border-line bg-canvas px-3 text-sm text-mute hover:border-mute hover:text-ink",children:[(0,t.jsx)(h.f,{size:14,"aria-hidden":!0,className:"shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-left",children:"Search, run or jump to anything"}),(0,t.jsxs)("span",{className:"kbd shrink-0",children:[i," K"]})]})}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2 sm:min-w-40",children:[a?(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 rounded-md border px-2 py-1 text-xs ${"production"===s?"border-bad/50 bg-bad/10 text-bad":"border-line text-mute"}`,title:"production"===s?"Production: sends that change data ask first":"The environment in use — change it on the right of the request tabs",children:[(0,t.jsx)("span",{className:"h-2 w-2 rounded-full",style:{background:o??"var(--ok)"},"aria-hidden":!0}),a.name]}):null,E?(0,t.jsx)("button",{type:"button",onClick:()=>(0,W.j)("plan"),"aria-label":`Account: ${E.email}`,title:`Signed in as ${E.email}`,className:"flex h-7 w-7 items-center justify-center rounded-full bg-accent-dim text-xs font-semibold text-ink uppercase hover:ring-1 hover:ring-accent",children:E.email.slice(0,1)}):(0,t.jsxs)("button",{type:"button",onClick:()=>(0,W.j)("plan"),title:"Optional: brings a Pro or Team plan to this computer",className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-sm text-mute hover:bg-panel-2 hover:text-ink",children:[(0,t.jsx)(u.f,{size:14,"aria-hidden":!0})," Sign in"]}),(0,t.jsx)("button",{type:"button",onClick:()=>(0,W.j)(),"aria-label":"Settings",title:`Settings (${i}+,)`,className:"rounded-md p-1.5 text-mute hover:bg-panel-2 hover:text-ink",children:(0,t.jsx)(p,{size:16,"aria-hidden":!0})})]})]}),(0,t.jsxs)("div",{className:"flex min-h-0 flex-1",children:[(0,t.jsxs)("aside",{"aria-label":"Main navigation",className:"flex w-[4.75rem] shrink-0 flex-col items-center gap-1 border-r border-line bg-panel py-2",children:[(0,t.jsx)("nav",{className:"flex w-full flex-col items-center gap-1 px-1.5",children:ej.map(e=>{let n="/"===e.href?"/"===r:r===e.href||r.startsWith(`${e.href}/`),i=e.icon;return(0,t.jsxs)(g.default,{href:e.href,"aria-current":n?"page":void 0,className:`flex w-full flex-col items-center gap-1 rounded-lg px-1 py-2 text-center text-[11px] leading-tight transition-colors ${n?"bg-accent-dim text-ink":"text-mute hover:bg-panel-2 hover:text-ink"}`,children:[(0,t.jsx)(i,{size:18,strokeWidth:1.75,"aria-hidden":!0,className:n?"text-accent":void 0}),e.label]},e.href)})}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsxs)("button",{type:"button",onClick:V.V,title:"Deleted requests — restore them for 30 days",className:"flex w-[calc(100%-0.75rem)] flex-col items-center gap-1 rounded-lg px-1 py-2 text-center text-[11px] leading-tight text-mute hover:bg-panel-2 hover:text-ink",children:[(0,t.jsx)(m.f,{size:18,strokeWidth:1.75,"aria-hidden":!0}),"Trash"]})]}),(0,t.jsxs)("main",{id:"main",className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto",children:[l?(0,t.jsxs)("div",{role:"note",className:"flex items-start gap-3 border-b border-line bg-accent-dim px-4 py-3 text-sm text-ink",children:[(0,t.jsx)(d.f,{size:18,className:"mt-0.5 shrink-0 text-accent","aria-hidden":!0}),(0,t.jsx)("p",{className:"min-w-0 flex-1",children:"APITestCenter is built for a computer. Performance tests run from the machine you use, and the editor needs room. You can still read reports here."}),(0,t.jsx)("button",{type:"button","aria-label":"Dismiss",className:"shrink-0 rounded p-1 text-mute hover:text-ink",onClick:()=>{window.sessionStorage.setItem(ew,"dismissed"),c(!1)},children:(0,t.jsx)(x.X,{size:16})})]}):null,e]})]}),(0,t.jsx)(ed,{}),(0,t.jsx)(w.o,{}),(0,t.jsx)(R.S,{}),(0,t.jsx)(L.D,{}),(0,t.jsx)(_.b,{}),(0,t.jsx)(q.t,{}),(0,t.jsx)(U.r,{}),(0,t.jsx)(D.W,{}),(0,t.jsx)(F.m,{}),(0,t.jsx)(V.I,{}),(0,t.jsx)(V.f,{}),(0,t.jsx)(B,{}),(0,t.jsx)(O.f,{}),(0,t.jsx)(k.G,{}),(0,t.jsx)(N.M,{}),(0,t.jsx)(P,{}),(0,t.jsx)(M.q,{}),(0,t.jsx)(I.T,{}),(0,t.jsx)(z._,{}),(0,t.jsx)(W.$,{}),(0,t.jsx)(A,{}),(0,t.jsx)(ef.b,{})]})}e.s(["AppShell",0,function({children:e}){return(0,t.jsx)(eo.c,{children:(0,t.jsx)(ek,{children:e})})}],60459)},87329,e=>{var t=e.i(72587),n=e.i(48317),r=e.i(39170),i=e.i(68865),a=e.i(56396),s=e.i(20054),o=e.i(59180),l=e.i(48321),c=e.i(6278),u=e.i(88153);e.s(["Providers",0,function({children:e}){return(0,t.jsx)(n.J,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"apitestcenter-theme",children:(0,t.jsx)(s.N,{children:(0,t.jsx)(o.w,{children:(0,t.jsx)(l.y,{children:(0,t.jsx)(c.n,{children:(0,t.jsx)(u.e,{children:(0,t.jsx)(a.N,{children:(0,t.jsx)(r.a,{children:(0,t.jsx)(i.P,{children:e})})})})})})})})})}])},68865,e=>{var t=e.i(72587),n=e.i(55218);let r="apitestcenter-compare-tray",i=(0,n.createContext)({items:[],has:()=>!1,toggle:()=>!1,remove:()=>{},clear:()=>{}});e.s(["P",0,function({children:e}){let[a,s]=(0,n.useState)([]);(0,n.useEffect)(()=>{try{let e=JSON.parse(localStorage.getItem(r)??"[]");Array.isArray(e)&&s(e.filter(e=>"string"==typeof e?.id&&"string"==typeof e?.name).slice(0,6))}catch{}},[]);let o=(0,n.useCallback)(e=>{s(e);try{localStorage.setItem(r,JSON.stringify(e))}catch{}},[]),l=(0,n.useMemo)(()=>({items:a,has:e=>a.some(t=>t.id===e),toggle:e=>a.some(t=>t.id===e.id)?(o(a.filter(t=>t.id!==e.id)),!0):!(a.length>=6)&&(o([...a,e]),!0),remove:e=>o(a.filter(t=>t.id!==e)),clear:()=>o([])}),[a,o]);return(0,t.jsx)(i.Provider,{value:l,children:e})},"V",0,6,"w",0,function(){return(0,n.useContext)(i)}])},48181,e=>{e.s(["q",0,{production:"var(--bad)",other:null},"v",0,function(e){return e?.production?"production":"other"},"p",0,e=>/^(GET|HEAD|OPTIONS)$/i.test(e)])},727,e=>{var t=e.i(55218),n=e.i(44505);let r="apitestcenter-notify",i="apitestcenter-notify-change";function a(){let e="Notification"in window?Notification.permission:"unsupported";return"unsupported"===e?"unsupported":"denied"===e?"blocked":"default"===e?"ask":"off"===function(){try{let e=localStorage.getItem(r);return"on"===e||"off"===e?e:null}catch{return null}}()?"off":"on"}function s(e){try{localStorage.setItem(r,e)}catch{}window.dispatchEvent(new Event(i))}async function o(){let e=a();return"ask"===e?"granted"===await Notification.requestPermission()?s("on"):window.dispatchEvent(new Event(i)):("on"===e||"off"===e)&&s("on"===e?"off":"on"),a()}let l=()=>"hidden"===document.visibilityState||!document.hasFocus(),c=null,u=null;function d(){null!==c&&(document.title=c),c=null}e.s(["g",0,a,"k",0,function({title:e,body:t,tag:r}){if("u">typeof document&&l()&&"on"===a())try{let i=new Notification(e,{body:t,tag:r});i.onclick=()=>{(0,n.f)()?.showWindow?.(),window.focus(),i.close()}}catch{}},"G",0,function({title:e,body:t,ok:r}){if("u"<typeof document||!l())return;u=null,c??=document.title,document.title=`${r?"✓":"✕"} ${e} — APITestCenter`;let i=()=>{d(),window.removeEventListener("focus",i)};if(window.addEventListener("focus",i),"on"===a())try{let r=new Notification(e,{body:t,tag:"apitestcenter-run",silent:!1});r.onclick=()=>{(0,n.f)()?.showWindow?.(),window.focus(),r.close()}}catch{}},"y",0,o,"n",0,function(e){(0,t.useEffect)(()=>{e?(c??=document.title,u=e,document.title=`${e} — APITestCenter`):u&&(u=null,d())},[e]),(0,t.useEffect)(()=>()=>{u&&(u=null,d())},[])},"I",0,function(){let[e,n]=(0,t.useState)("unsupported");return(0,t.useEffect)(()=>{let e=()=>n(a());return e(),window.addEventListener(i,e),window.addEventListener("focus",e),()=>{window.removeEventListener(i,e),window.removeEventListener("focus",e)}},[]),e}])},99822,e=>{var t=e.i(55218),n=e.i(727),r=e.i(28950);let i=new Map,a=0;function s(){let e=[...new Set(i.values())];if(document.querySelector('[role="dialog"][aria-modal="true"], [role="alertdialog"]')&&e.push("a dialog is open"),e.length)return{ok:!1,holds:e};(0,r.x)();let t=getComputedStyle(document.body);return{ok:!0,notify:"on"===(0,n.g)(),colours:{bg:t.backgroundColor,fg:t.color}}}e.s(["x",0,function(){window.atcRest=s},"R",0,function(e,n){(0,t.useEffect)(()=>{if(!e)return;let t=String(++a);return i.set(t,n),()=>void i.delete(t)},[e,n])}])},88153,e=>{var t=e.i(72587),n=e.i(55218);let r="apitestcenter-session-slo",i=(0,n.createContext)({slo:null,setSlo:()=>{},ready:!1});e.s(["e",0,function({children:e}){let[a,s]=(0,n.useState)(null),[o,l]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{s(function(){try{let e=localStorage.getItem(r)??sessionStorage.getItem(r);if(!e)return null;let t=JSON.parse(e);if("number"!=typeof t.p95Ms||"number"!=typeof t.errorRate||!(t.p95Ms>0)||t.errorRate<0)return null;return{p95Ms:t.p95Ms,errorRate:t.errorRate,p99Ms:"number"==typeof t.p99Ms&&t.p99Ms>0?t.p99Ms:void 0,checksRate:"number"==typeof t.checksRate?t.checksRate:void 0,abortOnFail:!0===t.abortOnFail}}catch{return null}}()),l(!0)},[]),(0,t.jsx)(i.Provider,{value:{slo:a,setSlo:function(e){s(e);try{sessionStorage.removeItem(r),e?localStorage.setItem(r,JSON.stringify(e)):localStorage.removeItem(r)}catch{}},ready:o},children:e})},"G",0,function(){return(0,n.useContext)(i)}])},48321,e=>{var t=e.i(72587);e.i(24856);var n=e.i(86483),r=e.i(55218);let i=(0,n.e)(null),a=(0,r.createContext)({file:i,ready:!1,viewsFor:e=>n.W.filter(t=>t.scope===e),save:async e=>e});function s(){return(0,r.useContext)(a)}let o=e=>`apitestcenter-last-view-${e}`;e.s(["y",0,function({children:e}){let[s,o]=(0,r.useState)(i),[l,c]=(0,r.useState)(!1);(0,r.useEffect)(()=>{fetch("/engine/settings/views",{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>e&&o((0,n.e)(e))).catch(()=>void 0).finally(()=>c(!0))},[]);let u=(0,r.useCallback)(async e=>{let t=await fetch("/engine/settings/views",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e)}),r=await t.json();if(!t.ok)throw Error(r.error??"Could not save the view");let i=(0,n.e)(r);return o(i),i},[]),d=(0,r.useMemo)(()=>({file:s,ready:l,viewsFor:e=>[...n.W,...s.views].filter(t=>t.scope===e),save:u}),[s,l,u]);return(0,t.jsx)(a.Provider,{value:d,children:e})},"J",0,function(e){let{file:t,viewsFor:n}=s(),[i,a]=(0,r.useState)(null);(0,r.useEffect)(()=>{try{a(localStorage.getItem(o(e)))}catch{}},[e]);let l=n(e);return[l.find(e=>e.id===i)??l.find(n=>n.id===t.defaults[e])??l[0],(0,r.useCallback)(t=>{a(t);try{localStorage.setItem(o(e),t)}catch{}},[e])]},"o",0,s])},84355,e=>{let t=(0,e.i(99522).f)("flask-conical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]);e.s(["f",0,t],84355)},67951,e=>{let t=(0,e.i(99522).f)("git-compare-arrows",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]]);e.s(["f",0,t],67951)},5769,28950,e=>{let t=(0,e.i(99522).f)("plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);e.s(["f",0,t],5769);var n=e.i(55218);let r=new Map,i="apitestcenter-resting-memory";try{let e=sessionStorage.getItem(i);if(sessionStorage.removeItem(i),e)for(let[t,n]of Object.entries(JSON.parse(e)))r.set(t,n)}catch{}e.s(["x",0,function(){let e={},t=0;for(let[n,i]of r)try{let r=JSON.stringify(i);if(void 0===r||t+r.length>4e6)continue;e[n]=i,t+=r.length}catch{}try{sessionStorage.setItem(i,JSON.stringify(e))}catch{}},"q",0,function(e){return r.get(e)},"V",0,function(e,t){r.set(e,t)},"C",0,function(e,t){let[i,a]=(0,n.useState)(()=>r.has(e)?r.get(e):"function"==typeof t?t():t);return(0,n.useEffect)(()=>{r.set(e,i)},[e,i]),[i,a]}],28950)},75998,(e,t,n)=>{e.i(11158),Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return g},useLinkStatus:function(){return v}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let a=e.r(56421),s=e.r(72587),o=a._(e.r(55218)),l=e.r(99306),c=e.r(7716),u=e.r(82859),d=e.r(70295),f=e.r(2747),h=e.r(53492),p=e.r(32963),m=e.r(78736),x=e.r(23012);function g(t){var n;let r,i,a,[g,v]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),b=(0,o.useRef)(null),{href:j,as:w,children:k,prefetch:N=null,passHref:C,replace:S,shallow:E,scroll:$,onClick:P,onMouseEnter:M,onTouchStart:I,legacyBehavior:T=!1,onNavigate:O,transitionTypes:A,ref:R,unstable_dynamicOnHover:z,...L}=t;r=k,T&&("string"==typeof r||"number"==typeof r)&&(r=(0,s.jsx)("a",{children:r}));let _=o.default.useContext(c.AppRouterContext),q=!1!==N,U=!1===N?"none":!0===N?"full":"auto",D="none"!==U?"auto"===U?x.FetchStrategy.PPR:x.FetchStrategy.Full:x.FetchStrategy.PPR,F="string"==typeof(n=w||j)?n:(0,l.formatUrl)(n);if(T){if(r?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");i=o.default.Children.only(r)}let V=T?i&&"object"==typeof i&&i.ref:R,H,J=o.default.useCallback(e=>(null!==_&&(b.current=(0,p.mountLinkInstance)(e,F,_,D,q,v,H)),()=>{b.current&&((0,p.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,p.unmountPrefetchableInstance)(e)}),[q,F,_,D,v,H]),B={ref:(0,u.useMergedRef)(J,V),onClick(t){T||"function"!=typeof P||P(t),T&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!_||t.defaultPrevented||function(t,n,r,i,a,s,o,l="none"){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(n)){i&&(t.preventDefault(),location.replace(n));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{navigate:d}=e.r(9058);d(n,i?"replace":"push",!1===a?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,r.current,o,l)}}(t,F,b,S,$,O,A,U)},onMouseEnter(e){T||"function"!=typeof M||M(e),T&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),_&&q&&(0,p.onNavigationIntent)(e.currentTarget,!0===z)},onTouchStart:function(e){T||"function"!=typeof I||I(e),T&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),_&&q&&(0,p.onNavigationIntent)(e.currentTarget,!0===z)}};return(0,d.isAbsoluteUrl)(F)?B.href=F:T&&!C&&("a"!==i.type||"href"in i.props)||(B.href=(0,f.addBasePath)(F)),a=T?o.default.cloneElement(i,B):(0,s.jsx)("a",{...L,...B,children:r}),(0,s.jsx)(y.Provider,{value:g,children:a})}let y=(0,o.createContext)(p.IDLE_LINK_STATUS),v=()=>(0,o.useContext)(y);("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},82859,(e,t,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useMergedRef",{enumerable:!0,get:function(){return i}});let r=e.r(55218);function i(e,t){let n=(0,r.useRef)(null),i=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=n.current;e&&(n.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(n.current=a(e,r)),t&&(i.current=a(t,r))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},99306,(e,t,n)=>{e.i(11158),Object.defineProperty(n,"__esModule",{value:!0});var r={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let a=e.r(56421)._(e.r(58768)),s=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:n}=e,r=e.protocol||"",i=e.pathname||"",o=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:n&&(c=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||s.test(r))&&!1!==c?(c="//"+(c||""),i&&"/"!==i[0]&&(i="/"+i)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),i=i.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${r}${c}${i}${u}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},78736,(e,t,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isLocalURL",{enumerable:!0,get:function(){return a}});let r=e.r(70295),i=e.r(77582);function a(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,i.hasBasePath)(n.pathname)}catch(e){return!1}}},70295,(e,t,n)=>{e.i(11158),Object.defineProperty(n,"__esModule",{value:!0});var r={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return j},MissingStaticPage:function(){return b},NormalizeError:function(){return y},PageNotFoundError:function(){return v},SP:function(){return m},ST:function(){return x},WEB_VITALS:function(){return a},execOnce:function(){return s},getDisplayName:function(){return d},getLocationOrigin:function(){return c},getURL:function(){return u},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return w}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let a=["CLS","FCP","INP","LCP","TTFB"];function s(e){let t,n=!1;return(...r)=>(n||(n=!0,t=e(...r)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&o.test(e)};function c(){let{protocol:e,hostname:t,port:n}=window.location;return`${e}//${t}${n?":"+n:""}`}function u(){let{href:e}=window.location,t=c();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let r=await e.getInitialProps(t);if(n&&f(n))return r;if(!r)throw Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${r}" instead.`);return r}let m="u">typeof performance,x=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class y extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class b extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class j extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function w(e){return JSON.stringify({message:e.message,stack:e.stack})}},92084,43101,e=>{e.s(["S",0,{changes:"When it starts failing, and when it's fixed",failures:"Every failed run",always:"Every run",never:"Never"},"l",0,[5,15,30,60,180,360,720,1440],"s",0,function(e){return e<60?`every ${e} minutes`:60===e?"every hour":e<1440?`every ${e/60} hours`:1440===e?"every day":`every ${e/1440} days`},"K",0,function(e){return e.lastRunAt?Date.parse(e.lastRunAt)+6e4*e.everyMinutes:Date.parse(e.createdAt)},"v",0,function(e,t){let n=t.collection||"Requests outside a folder";if("fixed"===e.change)return{ok:!0,title:`${n} is passing again`,body:e.headline};if(!e.passed){let t=e.failed[0];return{ok:!1,title:`${n} ${"failing"===e.change?"started failing":"failed again"}`,body:t?`${e.headline} — ${t.name}${t.message?`: ${t.message}`:""}`:e.headline}}return{ok:!0,title:`${n} passed`,body:e.headline}},"F",0,function(e,t){return"never"!==e&&("always"===e||("failures"===e?!t.passed||"fixed"===t.change:null!==t.change))}],92084);var t=e.i(55218);let n="atc:schedules-changed";async function r(e){let t=await e.json().catch(()=>null);if(!e.ok)throw Error(t?.error??`Engine error (${e.status})`);return t}let i=(e,t,n)=>fetch(t,{method:e,headers:void 0===n?void 0:{"content-type":"application/json"},body:void 0===n?void 0:JSON.stringify(n)}),a=e=>(window.dispatchEvent(new Event(n)),e),s={list:()=>fetch("/engine/schedules",{cache:"no-store"}).then(e=>r(e)).then(e=>e.schedules),add:e=>i("POST","/engine/schedules",e).then(e=>r(e)).then(a),update:(e,t)=>i("PUT",`/engine/schedules/${encodeURIComponent(e)}`,t).then(e=>r(e)).then(a),remove:e=>i("DELETE",`/engine/schedules/${encodeURIComponent(e)}`).then(e=>r(e)).then(a),run:e=>i("POST",`/engine/schedules/${encodeURIComponent(e)}/run`).then(e=>r(e)).then(a),since:e=>fetch(`/engine/schedules/results?since=${encodeURIComponent(e)}`,{cache:"no-store"}).then(e=>r(e))};e.s(["T",0,n,"c",0,s,"C",0,function(){let[e,r]=(0,t.useState)(null),i=(0,t.useCallback)(()=>void s.list().then(r,()=>r(e=>e??[])),[]);return(0,t.useEffect)(()=>{i();let e=window.setInterval(i,3e4);return window.addEventListener(n,i),()=>{window.clearInterval(e),window.removeEventListener(n,i)}},[i]),e}],43101)}])})();
@@ -1 +0,0 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55039,(e,t,r)=>{e.i(11158),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useRouterBFCache",{enumerable:!0,get:function(){return l}});let n=e.r(55218);function l(e,t,r){let[l,a]=(0,n.useState)(()=>({tree:e,renderTree:t,stateKey:r,next:null}));if(l.tree===e)return l;let u={tree:e,renderTree:t,stateKey:r,next:null},o=1,d=l,i=u;for(;null!==d&&o<1;){if(d.stateKey===r){i.next=d.next;break}{o++;let e={tree:d.tree,renderTree:d.renderTree,stateKey:d.stateKey,next:null};i.next=e,i=e}d=d.next}return a(u),u}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},36669,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={createClientParams:function(){return a.createRenderParamsFromClient},createClientSearchParams:function(){return u.createRenderSearchParamsFromClient}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(29985),u=e.r(28453);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},35197,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientPageRoot",{enumerable:!0,get:function(){return i}});let n=e.r(72587),l=e.r(7716),a=e.r(55218),u=e.r(54400),o=e.r(51828),d=e.r(36669);function i({Component:e,serverProvidedParams:t}){let r,s;if(null!==t)r=t.searchParams,s=t.params;else{let e=(0,a.use)(l.LayoutRouterContext);s=null!==e?e.parentParams:{},r=(0,u.urlSearchParamsToParsedUrlQuery)((0,a.use)(o.SearchParamsContext))}let f=(0,d.createClientSearchParams)(r),c=(0,d.createClientParams)(s);return(0,n.jsx)(e,{params:c,searchParams:f})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},88051,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientSegmentRoot",{enumerable:!0,get:function(){return o}});let n=e.r(72587),l=e.r(7716),a=e.r(55218),u=e.r(36669);function o({Component:e,slots:t,serverProvidedParams:r}){let d;if(null!==r)d=r.params;else{let e=(0,a.use)(l.LayoutRouterContext);d=null!==e?e.parentParams:{}}let i=(0,u.createClientParams)(d);return(0,n.jsx)(e,{...t,params:i})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},96131,(e,t,r)=>{e.i(11158),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HTTPAccessFallbackBoundary",{enumerable:!0,get:function(){return s}});let n=e.r(56421),l=e.r(72587),a=n._(e.r(55218)),u=e.r(18930),o=e.r(33238),d=e.r(7716);class i extends a.default.Component{constructor(e){super(e),this.state={triggeredStatus:void 0,previousPathname:e.pathname}}componentDidCatch(){}static getDerivedStateFromError(e){if((0,o.isHTTPAccessFallbackError)(e))return{triggeredStatus:(0,o.getAccessFallbackHTTPStatus)(e)};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.triggeredStatus?{triggeredStatus:void 0,previousPathname:e.pathname}:{triggeredStatus:t.triggeredStatus,previousPathname:e.pathname}}render(){let{notFound:e,forbidden:t,unauthorized:r,children:n}=this.props,{triggeredStatus:a}=this.state,u={[o.HTTPAccessErrorStatus.NOT_FOUND]:e,[o.HTTPAccessErrorStatus.FORBIDDEN]:t,[o.HTTPAccessErrorStatus.UNAUTHORIZED]:r};if(a){let d=a===o.HTTPAccessErrorStatus.NOT_FOUND&&e,i=a===o.HTTPAccessErrorStatus.FORBIDDEN&&t,s=a===o.HTTPAccessErrorStatus.UNAUTHORIZED&&r;return d||i||s?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("meta",{name:"robots",content:"noindex"}),!1,u[a]]}):n}return n}}function s({notFound:e,forbidden:t,unauthorized:r,children:n}){let o=(0,u.useUntrackedPathname)(),f=(0,a.useContext)(d.MissingSlotContext);return e||t||r?(0,l.jsx)(i,{pathname:o,notFound:e,forbidden:t,unauthorized:r,missingSlots:f,children:n}):(0,l.jsx)(l.Fragment,{children:n})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},23452,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return a.InstantValidationBoundaryContext},PlaceValidationBoundaryBelowThisLevel:function(){return a.PlaceValidationBoundaryBelowThisLevel},RenderValidationBoundaryAtThisLevel:function(){return a.RenderValidationBoundaryAtThisLevel},SlotMarker:function(){return a.SlotMarker}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(50956);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},50956,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return a},PlaceValidationBoundaryBelowThisLevel:function(){return u},RenderValidationBoundaryAtThisLevel:function(){return o},SlotMarker:function(){return d}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=null,u=null,o=null,d=null;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},80474,(e,t,r)=>{e.i(11158),Object.defineProperty(r,"__esModule",{value:!0});var n={LoadingBoundaryProvider:function(){return x},default:function(){return T}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(56421),u=e.r(72587),o=a._(e.r(55218)),d=e.r(7716),i=e.r(72024),s=e.r(86424),f=e.r(15360),c=e.r(42365),p=e.r(96131);e.r(23452);let y=e.r(10063),m=e.r(55039);e.r(26058);let b=e.r(51828),P=e.r(54400),h=e.r(32905);function v(e,t,r){let n=e.getClientRects();if(0===n.length)return 0;let l=1/0;for(let e=0;e<n.length;e++){let t=n[e];t.top<l&&(l=t.top)}return l>=r()&&l<=t?1:2}function g(e){let t=o.default.useRef(null);return(0,o.useLayoutEffect)(()=>{let{scrollRef:r,renderTree:n}=e,l=r.forceScroll?r.scrollRef:n.data.scrollRef;if(null===l||!l.current)return;let a=null,u=r.hashFragment;if(u){if(null===(a="top"===u?document.body:document.getElementById(u)??document.getElementsByName(u)[0]??null)){l.current=!1,r.onlyHashChange=!1,r.hashFragment=null;return}}else a=t.current;if(null===a)return;let o=!1;(0,f.disableSmoothScrollDuringRouteTransition)(()=>{let e=document.documentElement,t=null,r=null,n=null,d=()=>{var r;let l,a;return null===n&&(r=t,n=!Number.isFinite(a=Number.parseFloat(l=getComputedStyle(e).scrollPaddingTop))||a<0?0:l.endsWith("px")?a:l.endsWith("%")?a/100*r:0),n};(u||(t=e.clientHeight,0!==(r=v(a,t,d))))&&((o=!0,l.current=!1,u)?a.scrollIntoView():1!==r&&(e.scrollTop=0,2===v(a,t,d)&&a.scrollIntoView()))},{dontForceLayout:!0,onlyHashChange:r.onlyHashChange}),o&&(r.onlyHashChange=!1,r.hashFragment=null)},void 0),(0,u.jsx)(o.Fragment,{ref:t,children:e.children})}function j({children:e,renderTree:t}){let r=(0,o.useContext)(d.GlobalLayoutRouterContext);if(!r)throw Error("invariant global layout router not mounted");return(0,u.jsx)(g,{scrollRef:r.scrollRef,renderTree:t,children:e})}function _({tree:e,segmentPath:t,debugNameContext:r,renderTree:n,params:l,url:a,isActive:s}){let f,c=(0,o.useContext)(d.GlobalLayoutRouterContext);if((0,o.useContext)(b.NavigationPromisesContext),!c)throw Error("invariant global layout router not mounted");let p=null!==n.data.prefetchRsc?n.data.prefetchRsc:n.data.rsc,y=(0,o.useDeferredValue)(n.data.rsc,p);if((0,h.isDeferredRsc)(y)){let e=(0,o.use)(y);null===e&&(0,o.use)(i.unresolvedThenable),f=e}else null===y&&(0,o.use)(i.unresolvedThenable),f=y;let m=f;return(0,u.jsx)(d.LayoutRouterContext.Provider,{value:{parentTree:e,parentRenderTree:n,parentSegmentPath:t,parentParams:l,parentLoadingData:null,debugNameContext:r,url:a,isActive:s},children:m})}function x({loading:e,children:t}){let r=(0,o.use)(d.LayoutRouterContext);return null===r?t:(0,u.jsx)(d.LayoutRouterContext.Provider,{value:{parentTree:r.parentTree,parentRenderTree:r.parentRenderTree,parentSegmentPath:r.parentSegmentPath,parentParams:r.parentParams,parentLoadingData:e,debugNameContext:r.debugNameContext,url:r.url,isActive:r.isActive},children:t})}function O({name:e,loading:t,children:r}){if(null!==t){let n=t[0],l=t[1],a=t[2];return(0,u.jsx)(o.Suspense,{name:e,fallback:(0,u.jsxs)(u.Fragment,{children:[l,a,n]}),children:r})}return(0,u.jsx)(u.Fragment,{children:r})}function T({parallelRouterKey:e,error:t,errorStyles:r,errorScripts:n,templateStyles:l,templateScripts:a,template:f,notFound:b,forbidden:h,unauthorized:v,segmentViewBoundaries:g}){let x=(0,o.useContext)(d.LayoutRouterContext);if(!x)throw Error("invariant expected layout router to be mounted");let{parentTree:C,parentRenderTree:M,parentSegmentPath:R,parentParams:S,parentLoadingData:F,url:B,isActive:A,debugNameContext:E}=x,L=C[0],H=null===R?[e]:R.concat([L,e]),D=C[1][e],N=M.slots?.get(e);(void 0===D||void 0===N)&&(0,o.use)(i.unresolvedThenable);let w=D[0],k=(0,y.createSegmentKey)(w),V=(0,m.useRouterBFCache)(D,N,k),I=[];do{let e=V.tree,o=V.renderTree,i=V.stateKey,y=e[0],m=S;if(Array.isArray(y)){let e=y[0],t=y[1],r=y[2],n=(0,P.getParamValueFromCacheKey)(t,r);null!==n&&(m={...S,[e]:n})}let g=function(e){if("/"===e)return"/";if("string"==typeof e)if("(__SLOT__)"===e)return;else return e+"/";return e[1]+"/"}(y),x=g??E,T=void 0===g?void 0:E,C=(0,u.jsxs)(j,{renderTree:o,children:[(0,u.jsx)(s.ErrorBoundary,{errorComponent:t,errorStyles:r,errorScripts:n,children:(0,u.jsx)(O,{name:T,loading:F,children:(0,u.jsx)(p.HTTPAccessFallbackBoundary,{notFound:b,forbidden:h,unauthorized:v,children:(0,u.jsxs)(c.RedirectBoundary,{children:[(0,u.jsx)(_,{url:B,tree:e,params:m,renderTree:o,segmentPath:H,debugNameContext:x,isActive:A&&i===k}),null]})})})}),null]}),M=(0,u.jsxs)(d.TemplateContext.Provider,{value:C,children:[l,a,f]},i);I.push(M),V=V.next}while(null!==V)return I}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},2236,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let n=e.r(56421),l=e.r(72587),a=n._(e.r(55218)),u=e.r(7716);function o(){let e=(0,a.useContext)(u.TemplateContext);return(0,l.jsx)(l.Fragment,{children:e})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},29985,(e,t,r)=>{e.i(11158),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(37047).createRenderParamsFromClient;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},37047,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return l}});let n=new WeakMap;function l(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return r.status="fulfilled",r.value=e,n.set(e,r),r}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},28453,(e,t,r)=>{e.i(11158),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(61915).createRenderSearchParamsFromClient;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},61915,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return l}});let n=new WeakMap;function l(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return r.status="fulfilled",r.value=e,n.set(e,r),r}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},64052,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"IconMark",{enumerable:!0,get:function(){return l}});let n=e.r(72587),l=()=>"u">typeof window?null:(0,n.jsx)("meta",{name:"«nxt-icon»"})},15360,(e,t,r)=>{function n(e,t={}){if(t.onlyHashChange)return void e();let r=document.documentElement;if("smooth"!==r.dataset.scrollBehavior)return void e();let l=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=l}e.i(11158),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"disableSmoothScrollDuringRouteTransition",{enumerable:!0,get:function(){return n}})}])})();