apitestcenter 0.17.2 → 0.18.1

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 (63) hide show
  1. package/dist/THIRD-PARTY-NOTICES-UI.txt +1 -1
  2. package/dist/THIRD-PARTY-NOTICES.txt +1 -1
  3. package/dist/cli.mjs +311 -311
  4. package/dist/ui/404/index.html +1 -1
  5. package/dist/ui/404.html +1 -1
  6. package/dist/ui/__next.__PAGE__.txt +11 -11
  7. package/dist/ui/__next._full.txt +12 -12
  8. package/dist/ui/__next._tree.txt +2 -2
  9. package/dist/ui/_next/static/chunks/0ktc3lx37s0t5.js +4 -0
  10. package/dist/ui/_next/static/chunks/{2b31vf5n6d6th.js → 1-d6f0jo8p7jc.js} +1 -1
  11. package/dist/ui/_next/static/chunks/109szqnizl8c5.css +3 -0
  12. package/dist/ui/_next/static/chunks/1af6jzcoirzrb.js +27 -0
  13. package/dist/ui/_next/static/chunks/366zannfx6qet.js +1 -0
  14. package/dist/ui/_not-found/__next._full.txt +11 -11
  15. package/dist/ui/_not-found/__next._not-found.__PAGE__.txt +10 -10
  16. package/dist/ui/_not-found/__next._tree.txt +2 -2
  17. package/dist/ui/_not-found/index.html +1 -1
  18. package/dist/ui/_not-found/index.txt +11 -11
  19. package/dist/ui/compare/__next._full.txt +12 -12
  20. package/dist/ui/compare/__next._tree.txt +2 -2
  21. package/dist/ui/compare/__next.compare.__PAGE__.txt +11 -11
  22. package/dist/ui/compare/index.html +1 -1
  23. package/dist/ui/compare/index.txt +12 -12
  24. package/dist/ui/connections/__next._full.txt +12 -12
  25. package/dist/ui/connections/__next._tree.txt +2 -2
  26. package/dist/ui/connections/__next.connections.__PAGE__.txt +11 -11
  27. package/dist/ui/connections/index.html +2 -2
  28. package/dist/ui/connections/index.txt +12 -12
  29. package/dist/ui/history/__next._full.txt +13 -13
  30. package/dist/ui/history/__next._tree.txt +2 -2
  31. package/dist/ui/history/__next.history.__PAGE__.txt +12 -12
  32. package/dist/ui/history/index.html +1 -1
  33. package/dist/ui/history/index.txt +13 -13
  34. package/dist/ui/home/__next._full.txt +12 -12
  35. package/dist/ui/home/__next._tree.txt +2 -2
  36. package/dist/ui/home/__next.home.__PAGE__.txt +11 -11
  37. package/dist/ui/home/index.html +1 -1
  38. package/dist/ui/home/index.txt +12 -12
  39. package/dist/ui/index.html +1 -1
  40. package/dist/ui/index.txt +12 -12
  41. package/dist/ui/preview/__next._full.txt +13 -13
  42. package/dist/ui/preview/__next._tree.txt +2 -2
  43. package/dist/ui/preview/__next.preview.__PAGE__.txt +12 -12
  44. package/dist/ui/preview/index.html +1 -1
  45. package/dist/ui/preview/index.txt +13 -13
  46. package/dist/ui/suite/__next._full.txt +12 -12
  47. package/dist/ui/suite/__next._tree.txt +2 -2
  48. package/dist/ui/suite/__next.suite.__PAGE__.txt +11 -11
  49. package/dist/ui/suite/index.html +1 -1
  50. package/dist/ui/suite/index.txt +12 -12
  51. package/dist/ui/tests/__next._full.txt +11 -11
  52. package/dist/ui/tests/__next._tree.txt +2 -2
  53. package/dist/ui/tests/__next.tests.__PAGE__.txt +10 -10
  54. package/dist/ui/tests/index.html +1 -1
  55. package/dist/ui/tests/index.txt +11 -11
  56. package/package.json +1 -1
  57. package/dist/ui/_next/static/chunks/0a88gfjsl2a31.css +0 -3
  58. package/dist/ui/_next/static/chunks/1519k06vxy4mr.js +0 -4
  59. package/dist/ui/_next/static/chunks/2nsf1ik-sgmcf.js +0 -27
  60. package/dist/ui/_next/static/chunks/3b26__7yusttj.js +0 -1
  61. /package/dist/ui/_next/static/{0pb5ehfBVj_I-XduzZBR3 → -I9ZGWDULRW2FcJsZc5oY}/_buildManifest.js +0 -0
  62. /package/dist/ui/_next/static/{0pb5ehfBVj_I-XduzZBR3 → -I9ZGWDULRW2FcJsZc5oY}/_clientMiddlewareManifest.js +0 -0
  63. /package/dist/ui/_next/static/{0pb5ehfBVj_I-XduzZBR3 → -I9ZGWDULRW2FcJsZc5oY}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,60459,e=>{"use strict";var t=e.i(14368),n=e.i(95486),r=e.i(99522);let i=(0,r.default)("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 s=e.i(84355),a=e.i(67951),o=e.i(91694);let l=(0,r.default)("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(34761),d=e.i(5769),f=e.i(88293);let h=(0,r.default)("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 p=e.i(96659),m=e.i(87283),x=e.i(30099),g=e.i(36994),y=e.i(48317),v=e.i(99181),b=e.i(57515),w=e.i(69578),k=e.i(78739),j=e.i(22079);e.i(24856);var C=e.i(92084),N=e.i(56396),S=e.i(727),E=e.i(43101);function P(){let e=(0,N.useToast)(),t=(0,v.useRef)(null);return(0,v.useEffect)(()=>{let n=!0,r=async()=>{try{let{now:r,results:i}=await E.schedulesApi.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.shouldNotify)(e.schedule.notify,e)))){let t=(0,C.scheduleNotice)(n,n.schedule);e(`${t.title}. ${t.body}`,t.ok?"success":"error"),(0,S.notifyAway)({title:t.title,body:t.body,tag:`atc-schedule-${n.scheduleId}`})}i.length&&window.dispatchEvent(new Event(E.SCHEDULES_CHANGED))}catch{}};r();let i=window.setInterval(()=>void r(),2e4);return()=>{n=!1,window.clearInterval(i)}},[e]),null}var M=e.i(39736),T=e.i(73151),A=e.i(68865),I=e.i(15868);function $(){let{items:e,remove:n,clear:r}=(0,A.useCompareTray)(),i=(0,g.usePathname)(),s=(0,g.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)(a.GitCompareArrows,{size:16,className:"text-accent","aria-hidden":!0}),"Compare",(0,t.jsxs)("span",{className:"text-xs font-normal text-mute",children:[e.length," of ",A.TRAY_MAX]})]}),(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)(m.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,I.startNavProgress)(),s.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 O=e.i(7641),R=e.i(72350),_=e.i(5831),z=e.i(67217),D=e.i(56931),L=e.i(5504),U=e.i(74749),F=e.i(91549),H=e.i(97942);let V=(0,r.default)("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 q=e.i(20054);function B(){let{stopped:e}=(0,q.useEngineHealth)();return((0,v.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)(V,{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 K=e.i(839),W=e.i(11718);let J=(0,r.default)("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 Z=e.i(83316),G=e.i(67938),X=e.i(4488),Y=e.i(73606),Q=e.i(71189);let ee=(0,r.default)("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"}]]),et=(0,r.default)("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 en=e.i(67290),er=e.i(30135),ei=e.i(745),es=e.i(45377),ea=e.i(14865);let eo=[{id:"system",label:"Theme follows the system",icon:u.Monitor},{id:"light",label:"Light theme",icon:ei.Sun},{id:"dark",label:"Dark theme",icon:Y.Moon}];function el({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 ec(){let e=(0,es.useUpdateStatus)();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:T.openUpdate,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)(W.ArrowDownCircle,{size:13,"aria-hidden":!0})," ",r]})}function eu(){let{checked:e,online:n,k6Ready:r,k6Label:i,appVersion:s}=(0,q.useEngineHealth)(),{zoom:a,zoomIn:o,zoomOut:l,resetZoom:c,density:u,setDensity:d}=(0,ea.useViewPrefs)(),{theme:f,setTheme:h}=(0,y.useTheme)(),[p,m]=(0,v.useState)(!1);(0,v.useEffect)(()=>m(!0),[]);let x=Math.max(0,eo.findIndex(e=>e.id===(p?f??"system":"system"))),g=eo[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)(el,{onClick:()=>(0,z.openImport)(),title:"Import requests — Postman, Insomnia, Bruno, OpenAPI, .http, Hurl, HAR",children:[(0,t.jsx)(G.FileUp,{size:13,"aria-hidden":!0})," Import"]}),(0,t.jsxs)(el,{onClick:()=>(0,L.openCookies)(),title:"Cookies kept between requests",children:[(0,t.jsx)(Z.Cookie,{size:13,"aria-hidden":!0})," Cookies"]}),(0,t.jsxs)(el,{onClick:()=>(0,D.openCertificates)(),title:"Client certificates and trusted CAs",children:[(0,t.jsx)(er.ShieldCheck,{size:13,"aria-hidden":!0})," Certificates"]}),(0,t.jsxs)(el,{onClick:()=>(0,U.openMock)(),title:"Answer requests with example responses",children:[(0,t.jsx)(en.Server,{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)(el,{onClick:l,title:"Zoom out (Ctrl −)",label:"Zoom out",children:(0,t.jsx)(X.Minus,{size:13,"aria-hidden":!0})}),(0,t.jsx)(el,{onClick:c,title:"Reset zoom (Ctrl 0)",label:`Zoom ${Math.round(100*a)}%, reset`,children:(0,t.jsxs)("span",{className:"tabular w-9 text-center font-mono",children:[Math.round(100*a),"%"]})}),(0,t.jsx)(el,{onClick:o,title:"Zoom in (Ctrl +)",label:"Zoom in",children:(0,t.jsx)(Q.Plus,{size:13,"aria-hidden":!0})})]}),(0,t.jsxs)(el,{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)(et,{size:13,"aria-hidden":!0}):(0,t.jsx)(ee,{size:13,"aria-hidden":!0}),"compact"===u?"Compact":"Comfortable"]}),(0,t.jsx)(el,{onClick:()=>h(eo[(x+1)%eo.length].id),title:`${eo[x].label} — click to change`,label:`${eo[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)(el,{onClick:O.openHelp,title:"What the words mean, and the tour",children:[(0,t.jsx)(J,{size:13,"aria-hidden":!0})," Help"]})}),(0,t.jsx)(ec,{}),(0,t.jsx)(el,{onClick:k.openAbout,title:"Version, updates, and where your files are",children:s&&"dev"!==s?`v${s}`:"Development build"})]})}var ed=e.i(51554),ef=e.i(21407),eh=e.i(44505),ep=e.i(99822),em=e.i(48181),ex=e.i(2603),eg=e.i(30635),ey=e.i(6278);let ev=[{href:"/home",label:"Home",icon:l},{href:"/",label:"Test API",icon:s.FlaskConical},{href:"/suite",label:"Run collection",icon:c.ListChecks},{href:"/compare",label:"Compare",icon:a.GitCompareArrows},{href:"/connections",label:"Connections",icon:d.Plug},{href:"/history",label:"History",icon:o.History},{href:"/preview",label:"Open report",icon:i}],eb="apitestcenter-phone-notice";function ew({children:e}){let r=(0,g.usePathname)(),i=(0,ex.useModKey)(),{activeEnv:s}=(0,ey.useWorkspace)(),a=(0,em.envKind)(s),o=em.ENV_COLOUR[a],[l,c]=(0,v.useState)(!1),{resolvedTheme:d}=(0,y.useTheme)(),{current:C}=(0,eg.useProjects)();return(0,v.useEffect)(ef.loadAppSettings,[]),(0,v.useEffect)(()=>{let e=(0,eh.desktop)();e?.platform&&(document.documentElement.dataset.desktop=e.platform),e&&(0,ep.installRest)()},[]),(0,v.useEffect)(()=>{let e=(0,eh.desktop)();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)},[d]),(0,v.useEffect)(()=>{c(window.matchMedia("(max-width: 767px)").matches&&"dismissed"!==window.sessionStorage.getItem(eb))},[]),(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)(x.default,{href:"/",className:"flex shrink-0 items-center gap-2 rounded-md px-1 py-1","aria-label":"APITestCenter home",children:[(0,t.jsx)(b.BrandMark,{size:26}),(0,t.jsx)("span",{className:"hidden text-sm font-semibold tracking-tight text-ink sm:inline",children:"APITestCenter"})]}),C?(0,t.jsxs)(x.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,eg.projectTile)(C.id)},"aria-hidden":!0}),(0,t.jsx)("span",{className:"max-w-48 truncate",children:C.name}),(0,t.jsx)(n.ChevronDown,{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)(f.Search,{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:[s?(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 rounded-md border px-2 py-1 text-xs ${"production"===a?"border-bad/50 bg-bad/10 text-bad":"border-line text-mute"}`,title:"production"===a?"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}),s.name]}):null,(0,t.jsx)("button",{type:"button",onClick:()=>(0,K.openSettings)(),"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)(h,{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:ev.map(e=>{let n="/"===e.href?"/"===r:r===e.href||r.startsWith(`${e.href}/`),i=e.icon;return(0,t.jsxs)(x.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:H.openTrash,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)(p.Trash2,{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)(u.Monitor,{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(eb,"dismissed"),c(!1)},children:(0,t.jsx)(m.X,{size:16})})]}):null,e]})]}),(0,t.jsx)(eu,{}),(0,t.jsx)(w.CommandPalette,{}),(0,t.jsx)(O.HelpPanel,{}),(0,t.jsx)(_.Tour,{}),(0,t.jsx)(z.ImportDialog,{}),(0,t.jsx)(D.CertificatesDialog,{}),(0,t.jsx)(L.CookiesDialog,{}),(0,t.jsx)(U.MockDialog,{}),(0,t.jsx)(F.ExportDialog,{}),(0,t.jsx)(H.VersionsDialog,{}),(0,t.jsx)(H.TrashDialog,{}),(0,t.jsx)(B,{}),(0,t.jsx)(I.NavProgress,{}),(0,t.jsx)(k.AboutDialog,{}),(0,t.jsx)(j.ContractsDialog,{}),(0,t.jsx)(P,{}),(0,t.jsx)(M.WhatsNewDialog,{}),(0,t.jsx)(T.UpdateDialog,{}),(0,t.jsx)(R.ShortcutsDialog,{}),(0,t.jsx)(K.SettingsDialog,{}),(0,t.jsx)($,{}),(0,t.jsx)(ed.UsageConsent,{})]})}e.s(["AppShell",0,function({children:e}){return(0,t.jsx)(ea.ViewPrefsProvider,{children:(0,t.jsx)(ew,{children:e})})}],60459)},87329,e=>{"use strict";var t=e.i(14368),n=e.i(48317),r=e.i(39170),i=e.i(68865),s=e.i(56396),a=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.ThemeProvider,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"apitestcenter-theme",children:(0,t.jsx)(a.EngineHealthProvider,{children:(0,t.jsx)(o.HistoryProvider,{children:(0,t.jsx)(l.ViewsProvider,{children:(0,t.jsx)(c.WorkspaceProvider,{children:(0,t.jsx)(u.SloProvider,{children:(0,t.jsx)(s.ToastProvider,{children:(0,t.jsx)(r.ConfirmProvider,{children:(0,t.jsx)(i.CompareTrayProvider,{children:e})})})})})})})})})}])},68865,e=>{"use strict";var t=e.i(14368),n=e.i(99181);let r="apitestcenter-compare-tray",i=(0,n.createContext)({items:[],has:()=>!1,toggle:()=>!1,remove:()=>{},clear:()=>{}});e.s(["CompareTrayProvider",0,function({children:e}){let[s,a]=(0,n.useState)([]);(0,n.useEffect)(()=>{try{let e=JSON.parse(localStorage.getItem(r)??"[]");Array.isArray(e)&&a(e.filter(e=>"string"==typeof e?.id&&"string"==typeof e?.name).slice(0,6))}catch{}},[]);let o=(0,n.useCallback)(e=>{a(e);try{localStorage.setItem(r,JSON.stringify(e))}catch{}},[]),l=(0,n.useMemo)(()=>({items:s,has:e=>s.some(t=>t.id===e),toggle:e=>s.some(t=>t.id===e.id)?(o(s.filter(t=>t.id!==e.id)),!0):!(s.length>=6)&&(o([...s,e]),!0),remove:e=>o(s.filter(t=>t.id!==e)),clear:()=>o([])}),[s,o]);return(0,t.jsx)(i.Provider,{value:l,children:e})},"TRAY_MAX",0,6,"useCompareTray",0,function(){return(0,n.useContext)(i)}])},48181,e=>{"use strict";e.s(["ENV_COLOUR",0,{production:"var(--bad)",other:null},"envKind",0,function(e){return e?.production?"production":"other"},"isReadOnlyMethod",0,e=>/^(GET|HEAD|OPTIONS)$/i.test(e)])},727,e=>{"use strict";var t=e.i(99181),n=e.i(44505);let r="apitestcenter-notify",i="apitestcenter-notify-change";function s(){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 a(e){try{localStorage.setItem(r,e)}catch{}window.dispatchEvent(new Event(i))}async function o(){let e=s();return"ask"===e?"granted"===await Notification.requestPermission()?a("on"):window.dispatchEvent(new Event(i)):("on"===e||"off"===e)&&a("on"===e?"off":"on"),s()}let l=()=>"hidden"===document.visibilityState||!document.hasFocus(),c=null,u=null;function d(){null!==c&&(document.title=c),c=null}e.s(["noticeState",0,s,"notifyAway",0,function({title:e,body:t,tag:r}){if("u">typeof document&&l()&&"on"===s())try{let i=new Notification(e,{body:t,tag:r});i.onclick=()=>{(0,n.desktop)()?.showWindow?.(),window.focus(),i.close()}}catch{}},"notifyFinished",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"===s())try{let r=new Notification(e,{body:t,tag:"apitestcenter-run",silent:!1});r.onclick=()=>{(0,n.desktop)()?.showWindow?.(),window.focus(),r.close()}}catch{}},"toggleNotices",0,o,"useLiveTitle",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())},[])},"useNoticeState",0,function(){let[e,n]=(0,t.useState)("unsupported");return(0,t.useEffect)(()=>{let e=()=>n(s());return e(),window.addEventListener(i,e),window.addEventListener("focus",e),()=>{window.removeEventListener(i,e),window.removeEventListener("focus",e)}},[]),e}])},99822,e=>{"use strict";var t=e.i(99181),n=e.i(727),r=e.i(28950);let i=new Map,s=0;function a(){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.keepForReload)();let t=getComputedStyle(document.body);return{ok:!0,notify:"on"===(0,n.noticeState)(),colours:{bg:t.backgroundColor,fg:t.color}}}e.s(["installRest",0,function(){window.atcRest=a},"useKeepAwake",0,function(e,n){(0,t.useEffect)(()=>{if(!e)return;let t=String(++s);return i.set(t,n),()=>void i.delete(t)},[e,n])}])},88153,e=>{"use strict";var t=e.i(14368),n=e.i(99181);let r="apitestcenter-session-slo",i=(0,n.createContext)({slo:null,setSlo:()=>{},ready:!1});e.s(["SloProvider",0,function({children:e}){let[s,a]=(0,n.useState)(null),[o,l]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{a(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:s,setSlo:function(e){a(e);try{sessionStorage.removeItem(r),e?localStorage.setItem(r,JSON.stringify(e)):localStorage.removeItem(r)}catch{}},ready:o},children:e})},"useSlo",0,function(){return(0,n.useContext)(i)}])},48321,e=>{"use strict";var t=e.i(14368);e.i(24856);var n=e.i(86483),r=e.i(99181);let i=(0,n.normalizeViewsFile)(null),s=(0,r.createContext)({file:i,ready:!1,viewsFor:e=>n.BUILT_IN_VIEWS.filter(t=>t.scope===e),save:async e=>e});function a(){return(0,r.useContext)(s)}let o=e=>`apitestcenter-last-view-${e}`;e.s(["ViewsProvider",0,function({children:e}){let[a,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.normalizeViewsFile)(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.normalizeViewsFile)(r);return o(i),i},[]),d=(0,r.useMemo)(()=>({file:a,ready:l,viewsFor:e=>[...n.BUILT_IN_VIEWS,...a.views].filter(t=>t.scope===e),save:u}),[a,l,u]);return(0,t.jsx)(s.Provider,{value:d,children:e})},"useSelectedView",0,function(e){let{file:t,viewsFor:n}=a(),[i,s]=(0,r.useState)(null);(0,r.useEffect)(()=>{try{s(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=>{s(t);try{localStorage.setItem(o(e),t)}catch{}},[e])]},"useViews",0,a])},84355,e=>{"use strict";let t=(0,e.i(99522).default)("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(["FlaskConical",0,t],84355)},67951,e=>{"use strict";let t=(0,e.i(99522).default)("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(["GitCompareArrows",0,t],67951)},5769,28950,e=>{"use strict";let t=(0,e.i(99522).default)("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(["Plug",0,t],5769);var n=e.i(99181);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(["keepForReload",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{}},"recall",0,function(e){return r.get(e)},"remember",0,function(e,t){r.set(e,t)},"useRemembered",0,function(e,t){let[i,s]=(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,s]}],28950)},30099,(e,t,n)=>{"use strict";e.i(30204),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 s=e.r(56421),a=e.r(14368),o=s._(e.r(99181)),l=e.r(36176),c=e.r(64937),u=e.r(24967),d=e.r(61908),f=e.r(14648),h=e.r(43491),p=e.r(89960),m=e.r(53543),x=e.r(63663);function g(t){var n;let r,i,s,[g,v]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),b=(0,o.useRef)(null),{href:w,as:k,children:j,prefetch:C=null,passHref:N,replace:S,shallow:E,scroll:P,onClick:M,onMouseEnter:T,onTouchStart:A,legacyBehavior:I=!1,onNavigate:$,transitionTypes:O,ref:R,unstable_dynamicOnHover:_,...z}=t;r=j,I&&("string"==typeof r||"number"==typeof r)&&(r=(0,a.jsx)("a",{children:r}));let D=o.default.useContext(c.AppRouterContext),L=!1!==C,U=!1===C?"none":!0===C?"full":"auto",F="none"!==U?"auto"===U?x.FetchStrategy.PPR:x.FetchStrategy.Full:x.FetchStrategy.PPR,H="string"==typeof(n=k||w)?n:(0,l.formatUrl)(n);if(I){if(r?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(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."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=o.default.Children.only(r)}let V=I?i&&"object"==typeof i&&i.ref:R,q,B=o.default.useCallback(e=>(null!==D&&(b.current=(0,p.mountLinkInstance)(e,H,D,F,L,v,q)),()=>{b.current&&((0,p.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,p.unmountPrefetchableInstance)(e)}),[L,H,D,F,v,q]),K={ref:(0,u.useMergedRef)(B,V),onClick(t){I||"function"!=typeof M||M(t),I&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!D||t.defaultPrevented||function(t,n,r,i,s,a,l,c="none"){if("u">typeof window){let u,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||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(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(63059);o.default.startTransition(()=>{f(n,i?"replace":"push",!1===s?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,r.current,l,c)})}}(t,H,b,S,P,$,O,U)},onMouseEnter(e){I||"function"!=typeof T||T(e),I&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),D&&L&&(0,p.onNavigationIntent)(e.currentTarget,!0===_)},onTouchStart:function(e){I||"function"!=typeof A||A(e),I&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),D&&L&&(0,p.onNavigationIntent)(e.currentTarget,!0===_)}};return(0,d.isAbsoluteUrl)(H)?K.href=H:I&&!N&&("a"!==i.type||"href"in i.props)||(K.href=(0,f.addBasePath)(H)),s=I?o.default.cloneElement(i,K):(0,a.jsx)("a",{...z,...K,children:r}),(0,a.jsx)(y.Provider,{value:g,children:s})}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)},24967,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useMergedRef",{enumerable:!0,get:function(){return i}});let r=e.r(99181);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=s(e,r)),t&&(i.current=s(t,r))},[e,t])}function s(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)},61908,(e,t,n)=>{"use strict";e.i(30204),Object.defineProperty(n,"__esModule",{value:!0});var r={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return b},NormalizeError:function(){return y},PageNotFoundError:function(){return v},SP:function(){return m},ST:function(){return x},WEB_VITALS:function(){return s},execOnce:function(){return a},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 k}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let s=["CLS","FCP","FID","INP","LCP","TTFB"];function a(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 Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${r}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});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 w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function k(e){return JSON.stringify({message:e.message,stack:e.stack})}},53543,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isLocalURL",{enumerable:!0,get:function(){return s}});let r=e.r(61908),i=e.r(85594);function s(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}}},62298,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={assign:function(){return l},searchParamsToUrlQuery:function(){return s},urlQueryToSearchParams:function(){return o}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});function s(e){let t={};for(let[n,r]of e.entries()){let e=t[n];void 0===e?t[n]=r:Array.isArray(e)?e.push(r):t[n]=[e,r]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(Array.isArray(r))for(let e of r)t.append(n,a(e));else t.set(n,a(r));return t}function l(e,...t){for(let n of t){for(let t of n.keys())e.delete(t);for(let[t,r]of n.entries())e.append(t,r)}return e}},36176,(e,t,n)=>{"use strict";e.i(30204),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 s=e.r(56421)._(e.r(62298)),a=/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(s.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||a.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)}},92084,43101,e=>{"use strict";e.s(["NOTIFY_LABELS",0,{changes:"When it starts failing, and when it's fixed",failures:"Every failed run",always:"Every run",never:"Never"},"SCHEDULE_EVERY",0,[5,15,30,60,180,360,720,1440],"everyLabel",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`},"nextRunAt",0,function(e){return e.lastRunAt?Date.parse(e.lastRunAt)+6e4*e.everyMinutes:Date.parse(e.createdAt)},"scheduleNotice",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}},"shouldNotify",0,function(e,t){return"never"!==e&&("always"===e||("failures"===e?!t.passed||"fixed"===t.change:null!==t.change))}],92084);var t=e.i(99181);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)}),s=e=>(window.dispatchEvent(new Event(n)),e),a={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(s),update:(e,t)=>i("PUT",`/engine/schedules/${encodeURIComponent(e)}`,t).then(e=>r(e)).then(s),remove:e=>i("DELETE",`/engine/schedules/${encodeURIComponent(e)}`).then(e=>r(e)).then(s),run:e=>i("POST",`/engine/schedules/${encodeURIComponent(e)}/run`).then(e=>r(e)).then(s),since:e=>fetch(`/engine/schedules/results?since=${encodeURIComponent(e)}`,{cache:"no-store"}).then(e=>r(e))};e.s(["SCHEDULES_CHANGED",0,n,"schedulesApi",0,a,"useSchedules",0,function(){let[e,r]=(0,t.useState)(null),i=(0,t.useCallback)(()=>void a.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)}]);