apitestcenter 0.4.0 → 0.6.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.
- package/README.md +10 -1
- package/dist/THIRD-PARTY-NOTICES-UI.txt +3239 -0
- package/dist/THIRD-PARTY-NOTICES.txt +1149 -1
- package/dist/cli.mjs +89072 -49882
- package/dist/ui/404/index.html +1 -0
- package/dist/ui/404.html +1 -0
- package/dist/ui/__next.__PAGE__.txt +22 -0
- package/dist/ui/__next._full.txt +20 -0
- package/dist/ui/__next._tree.txt +6 -0
- package/dist/ui/_next/static/chunks/03vwb47zropf0.js +1 -0
- package/dist/ui/_next/static/chunks/065oy54s0-cwr.js +51 -0
- package/dist/ui/_next/static/chunks/08w_94tt7q8fk.js +1 -0
- package/dist/ui/_next/static/chunks/0cz1d0mv5g_q7.js +1 -0
- package/dist/ui/_next/static/chunks/0dscs2dqej_33.css +3 -0
- package/dist/ui/_next/static/chunks/0ezgetg09gtvn.js +1 -0
- package/dist/ui/_next/static/chunks/0kfnlqyz56lid.js +2 -0
- package/dist/ui/_next/static/chunks/0mlyz754peers.js +1 -0
- package/dist/ui/_next/static/chunks/117zwf3ps9-d0.js +1 -0
- package/dist/ui/_next/static/chunks/12eajgls1n2zi.js +291 -0
- package/dist/ui/_next/static/chunks/13hazp8hyksry.js +59 -0
- package/dist/ui/_next/static/chunks/1l0uy37izo74u.js +22 -0
- package/dist/ui/_next/static/chunks/1s74dc_u9f8bv.js +1 -0
- package/dist/ui/_next/static/chunks/1tpf12evb0w6s.js +1 -0
- package/dist/ui/_next/static/chunks/202n35227m-qn.js +119 -0
- package/dist/ui/_next/static/chunks/37izghagcat04.js +1 -0
- package/dist/ui/_next/static/chunks/3eqn1h2-qx894.css +1 -0
- package/dist/ui/_next/static/chunks/3fb2986f7qg9x.js +1 -0
- package/dist/ui/_next/static/chunks/41ad2nnyaestx.js +31 -0
- package/dist/ui/_next/static/chunks/turbopack-2kiaj9_7vlslw.js +1 -0
- package/dist/ui/_next/static/media/02263ebadd758ea4-s.29yke99gs9qpn.woff2 +0 -0
- package/dist/ui/_next/static/media/03fc1b4a8d284b5e-s.p.0wiir8udbzjvx.woff2 +0 -0
- package/dist/ui/_next/static/media/1bcd0e671759a44c-s.2qt3tdwt-y9x_.woff2 +0 -0
- package/dist/ui/_next/static/media/2fe89d53234c61d4-s.1u30mmyq6lnsd.woff2 +0 -0
- package/dist/ui/_next/static/media/57215795b8570f5c-s.2rixgazldzomk.woff2 +0 -0
- package/dist/ui/_next/static/media/59b15b4bcd7b1eb5-s.2vemzm0itqzfy.woff2 +0 -0
- package/dist/ui/_next/static/media/5e05ae5b48faa55e-s.1yd4_i3e35931.woff2 +0 -0
- package/dist/ui/_next/static/media/68757d6cddeff913-s.1i-sca43-qwng.woff2 +0 -0
- package/dist/ui/_next/static/media/7fea77d1d19108bf-s.2y65deuc30pmy.woff2 +0 -0
- package/dist/ui/_next/static/media/90c51ce8fb754fe8-s.02z5rrbg5nt92.woff2 +0 -0
- package/dist/ui/_next/static/media/99e609270109b47d-s.p.40sczeszzbjw1.woff2 +0 -0
- package/dist/ui/_next/static/media/a7afbb44bec2bb18-s.1qc6dx89jd2qv.woff2 +0 -0
- package/dist/ui/_next/static/media/e15f58668ad64cb8-s.3cvcemwuzoywn.woff2 +0 -0
- package/dist/ui/_next/static/media/e390973e931a41c5-s.0rgnxg2b64rzs.woff2 +0 -0
- package/dist/ui/_next/static/media/e532fa1b9921e1cd-s.3cb5lpr2l6xud.woff2 +0 -0
- package/dist/ui/_next/static/media/effe91970fc4db64-s.p.0oace-s_gkfks.woff2 +0 -0
- package/dist/ui/_next/static/nzVJlcyPooozLLxcLfxub/_buildManifest.js +11 -0
- package/dist/ui/_next/static/nzVJlcyPooozLLxcLfxub/_clientMiddlewareManifest.js +1 -0
- package/dist/ui/_next/static/nzVJlcyPooozLLxcLfxub/_ssgManifest.js +1 -0
- package/dist/ui/_not-found/__next._full.txt +17 -0
- package/dist/ui/_not-found/__next._not-found.__PAGE__.txt +23 -0
- package/dist/ui/_not-found/__next._tree.txt +2 -0
- package/dist/ui/_not-found/index.html +1 -0
- package/dist/ui/_not-found/index.txt +17 -0
- package/dist/ui/compare/__next._full.txt +22 -0
- package/dist/ui/compare/__next._tree.txt +6 -0
- package/dist/ui/compare/__next.compare.__PAGE__.txt +25 -0
- package/dist/ui/compare/index.html +1 -0
- package/dist/ui/compare/index.txt +22 -0
- package/dist/ui/history/__next._full.txt +25 -0
- package/dist/ui/history/__next._tree.txt +6 -0
- package/dist/ui/history/__next.history.__PAGE__.txt +28 -0
- package/dist/ui/history/index.html +1 -0
- package/dist/ui/history/index.txt +25 -0
- package/dist/ui/index.html +1 -0
- package/dist/ui/index.txt +20 -0
- package/dist/ui/preview/__next._full.txt +25 -0
- package/dist/ui/preview/__next._tree.txt +6 -0
- package/dist/ui/preview/__next.preview.__PAGE__.txt +28 -0
- package/dist/ui/preview/index.html +1 -0
- package/dist/ui/preview/index.txt +25 -0
- package/dist/ui/suite/__next._full.txt +21 -0
- package/dist/ui/suite/__next._tree.txt +5 -0
- package/dist/ui/suite/__next.suite.__PAGE__.txt +24 -0
- package/dist/ui/suite/index.html +1 -0
- package/dist/ui/suite/index.txt +21 -0
- package/dist/ui/tests/__next._full.txt +21 -0
- package/dist/ui/tests/__next._tree.txt +5 -0
- package/dist/ui/tests/__next.tests.__PAGE__.txt +24 -0
- package/dist/ui/tests/index.html +1 -0
- package/dist/ui/tests/index.txt +21 -0
- package/package.json +5 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,6980,e=>{"use strict";var t=e.i(61666);e.i(24856);var s=e.i(2385),n=e.i(95486),a=e.i(20621),r=e.i(27813),l=e.i(99522);let i=(0,l.default)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]),o=(0,l.default)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]);var c=e.i(3792);let d=(0,l.default)("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"}]]);var u=e.i(50962),m=e.i(66478),p=e.i(83067),h=e.i(63343),x=e.i(44794),f=e.i(31753),b=e.i(29724),g=e.i(60566),y=e.i(39170),v=e.i(13318),j=e.i(68228),w=e.i(59100);let k=(0,l.default)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);var N=e.i(87283),S=e.i(80707),E=e.i(56396);e.i(42674);var R=e.i(5305),q=e.i(6278);let C="\0new";function U(e,t){if(!t.has("baseUrl"))return"baseUrl";let s="api";try{s=new URL(e).hostname.split(".")[0].replace(/[^A-Za-z0-9]/g,"")||"api"}catch{}let n=`${s}Url`;for(let e=2;t.has(n);e++)n=`${s}Url${e}`;return n}function $({draft:e,sent:s,onChange:n}){let{environments:a,activeEnv:r,vars:l}=(0,q.useWorkspace)(),[i,o]=(0,p.useState)(!1),c=function(e){try{let t=new URL(e);if(!/^https?:$/.test(t.protocol)||["localhost","127.0.0.1"].includes(t.hostname))return[];let s=t.origin,n=t.pathname.split("/").filter(Boolean);return n.length>=2?[s,`${s}/${n[0]}`]:[s]}catch{return[]}}(e.url),d=new Set(Object.values(l).map(e=>e.trim().replace(/\/+$/,"")));return!s||!c.length||c.some(e=>d.has(e))?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",onClick:()=>o(!0),className:"inline-flex items-center gap-1 rounded-md px-1.5 py-1 text-accent hover:underline",title:"Keep this server address in an environment",children:[(0,t.jsx)(k,{size:13,"aria-hidden":!0})," Save ",c[0].replace(/^https?:\/\//,"")," as a base URL"]}),i?(0,t.jsx)(L,{draft:e,addresses:c,environments:a,activeEnvId:r?.id??null,onChange:n,onClose:()=>o(!1)}):null]})}function L({draft:e,addresses:s,environments:n,activeEnvId:a,onChange:r,onClose:l}){let i=(0,E.useToast)(),{index:o,saveEnvironments:c,setActiveEnv:d,refresh:u}=(0,q.useWorkspace)(),[m,h]=(0,p.useState)(s[0]),[x,f]=(0,p.useState)(a??n[0]?.id??C),[b,g]=(0,p.useState)(()=>{try{return new URL(s[0]).hostname.split(".").slice(0,2).join(" ")}catch{return"My API"}}),y=n.find(e=>e.id===x)??null,v=(0,p.useMemo)(()=>new Set((y?.variables??[]).map(e=>e.key)),[y]),[j,k]=(0,p.useState)(()=>U(s[0],v)),[$,P]=(0,p.useState)(!0),[T,A]=(0,p.useState)(!1),O=(0,p.useRef)(null);(0,p.useEffect)(()=>O.current?.focus(),[]),(0,p.useEffect)(()=>k(U(m,v)),[m,v]);let M=(o?.requests??[]).filter(t=>t.url.startsWith(m)&&t.url!==e.url),F=y?.variables.find(e=>e.key===j),I=w.VARIABLE_NAME.test(j)&&(x!==C||b.trim());async function z(){if(I&&!T){A(!0);try{let t=x===C?globalThis.crypto?.randomUUID?.()??`env-${Date.now().toString(36)}`:x,s=structuredClone(n),a=s.find(e=>e.id===t);a||(a={id:t,name:b.trim(),variables:[]},s.push(a)),a.variables=[...a.variables.filter(e=>e.key!==j),{key:j,value:m,secret:!1}],await c(s),d(t),r((0,R.withUrl)(e,`{{${j}}}${e.url.slice(m.length)}`));let o=0,p=0;if($){for(let e of M){let t=await q.workspaceApi.get(e.id).catch(()=>null);if(!t||t.secretsMissing?.length){p++;continue}let s=(0,R.requestFromUnknown)(t.request);s.url.startsWith(m)&&(await q.workspaceApi.update(e.id,{name:t.name,collection:t.collection,request:(0,R.withUrl)(s,`{{${j}}}${s.url.slice(m.length)}`)}),o++)}await u()}i(`Saved {{${j}}} in ${a.name}.${o?` ${o} other saved request${1===o?"":"s"} now use it.`:""}${p?` ${p} left as they were (a saved secret isn't available).`:""} Save this request to keep the change.`,"success"),l()}catch(e){i(e instanceof Error?e.message:"Could not save the base URL","error")}finally{A(!1)}}}return(0,t.jsx)("div",{className:"fixed inset-0 z-[75] flex items-start justify-center overflow-y-auto bg-black/50 p-4 sm:p-16",role:"presentation",onMouseDown:e=>e.target===e.currentTarget&&!T&&l(),children:(0,t.jsxs)("form",{role:"dialog","aria-modal":"true","aria-labelledby":"save-base-title",onSubmit:e=>{e.preventDefault(),z()},onKeyDown:e=>"Escape"===e.key&&!T&&l(),className:"w-full max-w-lg space-y-4 rounded-xl border border-line bg-panel p-5 shadow-2xl",children:[(0,t.jsxs)("header",{className:"flex items-center gap-2",children:[(0,t.jsx)("h2",{id:"save-base-title",className:"text-base font-medium text-ink",children:"Save as a base URL"}),(0,t.jsx)("button",{type:"button",onClick:l,"aria-label":"Close",className:"ml-auto rounded p-1 text-mute hover:text-ink",children:(0,t.jsx)(N.X,{size:16})})]}),(0,t.jsx)("p",{className:"text-sm text-mute",children:"Keep the server address in an environment, so you type only the path — and switch servers (UAT, Prod) by switching environments."}),(0,t.jsxs)("fieldset",{className:"space-y-1.5",children:[(0,t.jsx)("legend",{className:"mb-1 text-xs text-mute",children:"Address"}),s.map(e=>(0,t.jsxs)("label",{className:"flex items-center gap-2 text-sm text-ink",children:[(0,t.jsx)("input",{type:"radio",name:"address",checked:m===e,onChange:()=>h(e)}),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e})]},e))]}),(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-mute",children:["Environment",(0,t.jsx)(S.Select,{label:"Environment",value:x,onChange:f,options:[...n.map(e=>({value:e.id,label:e.name,hint:`${e.variables.length} variables`})),{value:C,label:"New environment…"}],className:"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:["Variable name",(0,t.jsx)("input",{ref:O,value:j,onChange:e=>k(e.target.value.replace(/[^\w.-]/g,"")),className:"input py-1.5 font-mono text-sm"})]}),x===C?(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-mute sm:col-span-2",children:["New environment name",(0,t.jsx)("input",{value:b,onChange:e=>g(e.target.value),className:"input py-1.5 text-sm"})]}):null]}),F&&F.value!==m?(0,t.jsxs)("p",{className:"text-xs text-warn",children:[`{{${j}}}`," already exists in this environment (",F.value,") — it will be replaced."]}):null,(0,t.jsxs)("p",{className:"rounded-md bg-panel-2 px-3 py-2 font-mono text-xs text-ink break-all",children:[`{{${j}}}`,(0,t.jsx)("span",{className:"text-mute",children:e.url.slice(m.length)||"/"})]}),M.length?(0,t.jsxs)("label",{className:"flex items-start gap-2 text-sm text-ink",children:[(0,t.jsx)("input",{type:"checkbox",checked:$,onChange:e=>P(e.target.checked),className:"mt-1"}),(0,t.jsxs)("span",{children:["Also switch ",M.length," other saved request",1===M.length?"":"s"," that use this address",(0,t.jsxs)("span",{className:"block text-xs text-mute",children:[M.slice(0,3).map(e=>e.name).join(", "),M.length>3?` and ${M.length-3} more`:""]})]})]}):null,(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",className:"btn btn-secondary",onClick:l,disabled:T,children:"Cancel"}),(0,t.jsx)("button",{type:"submit",className:"btn btn-primary",disabled:!I||T,children:"Save base URL"})]})]})})}var P=e.i(65638),T=e.i(21206),A=e.i(20054);let O="apitestcenter-lab-draft";var M=e.i(59180),F=e.i(88153),I=e.i(2603),z=e.i(46679),D=e.i(727),_=e.i(45672),V=e.i(69578);let B="apitestcenter-lab-saved",H="apitestcenter-requests-panel",W="apitestcenter-last-run";function J(e){try{sessionStorage.setItem(W,e)}catch{}}function K(){return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,t.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-accent opacity-60"}),(0,t.jsx)("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-accent"})]}),"Load running"]})}function Q({title:e,lines:s,action:n}){return(0,t.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center rounded-lg border border-dashed border-line px-6 py-14 text-center",children:[(0,t.jsx)("h2",{className:"text-base font-medium text-ink",children:e}),(0,t.jsx)("div",{className:"mt-2 max-w-md space-y-1.5 text-sm text-mute",children:s.map((e,s)=>(0,t.jsx)("p",{children:e},s))}),n?(0,t.jsx)("div",{className:"mt-5",children:n}):null]})}function G({runs:e,current:a,disabled:r,onPick:l}){let{slo:i}=(0,F.useSlo)(),[o,c]=(0,p.useState)(!1),d=(0,p.useRef)(null),u=(0,p.useMemo)(()=>e.slice(0,30),[e]);return(0,p.useEffect)(()=>{if(!o)return;let e=e=>{d.current?.contains(e.target)||c(!1)},t=e=>"Escape"===e.key&&c(!1);return document.addEventListener("pointerdown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("pointerdown",e),document.removeEventListener("keydown",t)}},[o]),(0,t.jsxs)("div",{ref:d,className:"relative",children:[(0,t.jsxs)("button",{type:"button",disabled:r,"aria-haspopup":"listbox","aria-expanded":o,onClick:()=>c(e=>!e),className:"inline-flex items-center gap-1 rounded-md border border-line px-2 py-1 text-xs text-mute hover:text-ink disabled:opacity-40",children:["Recent runs",(0,t.jsx)(n.ChevronDown,{size:12})]}),o?(0,t.jsx)("ul",{role:"listbox","aria-label":"Recent runs",className:"absolute right-0 z-30 mt-1 max-h-80 w-80 overflow-auto rounded-md border border-line bg-panel p-1 shadow-xl",children:u.map(e=>{let n=(0,s.buildVerdictFromInputs)(e.verdict,{slo:i}).overall,r=a?.id===e.id;return(0,t.jsx)("li",{role:"option","aria-selected":r,children:(0,t.jsxs)("button",{type:"button",onClick:()=>{l(e),c(!1)},className:`flex w-full items-center justify-between gap-2 rounded px-2 py-1.5 text-left text-xs ${r?"bg-accent-dim text-ink":"text-ink hover:bg-panel-2"}`,children:[(0,t.jsxs)("span",{className:"min-w-0 truncate",children:[e.baseline?(0,t.jsx)("span",{className:"mr-1 text-accent",title:"Baseline",children:"◆"}):null,e.name]}),(0,t.jsx)(Y,{level:n})]})},e.id)})}):null]})}function Y({level:e}){let s="pass"===e?"text-ok":"fail"===e?"text-bad":"text-warn";return(0,t.jsxs)("span",{className:`shrink-0 font-mono text-xs uppercase ${s}`,children:[(0,t.jsxs)("span",{"aria-hidden":!0,children:["pass"===e?"✓":"fail"===e?"✕":"!"," "]}),e]})}function X(){let{slo:e,setSlo:s,ready:n}=(0,F.useSlo)(),[a,r]=(0,p.useState)(!1),[l,i]=(0,p.useState)(500),[o,c]=(0,p.useState)(0),[d,u]=(0,p.useState)(1),[m,h]=(0,p.useState)(99),[x,f]=(0,p.useState)(!1),b=(0,p.useRef)(!1);function g(e){let t={on:a,p95:l,p99:o,errPct:d,checksPct:m,abort:x,...e};if(r(t.on),i(t.p95),c(t.p99),u(t.errPct),h(t.checksPct),f(t.abort),!t.on||!(t.p95>0)||t.errPct<0)return s(null);s({p95Ms:t.p95,errorRate:t.errPct/100,p99Ms:t.p99>0?t.p99:void 0,checksRate:Math.min(100,Math.max(0,t.checksPct))/100,abortOnFail:t.abort})}(0,p.useEffect)(()=>{n&&!b.current&&(b.current=!0,e&&(r(!0),i(e.p95Ms),c(e.p99Ms??0),u(Number((100*e.errorRate).toFixed(4))),h(null!=e.checksRate?Number((100*e.checksRate).toFixed(2)):99),f(!0===e.abortOnFail)))},[n,e]);let y=(e,s,n,a)=>(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"mb-1 block text-xs text-mute",children:e}),(0,t.jsx)("input",{type:"number",min:a.min,max:a.max,step:a.step,value:s,onChange:e=>g({[n]:Number(e.target.value)}),className:"input font-mono"}),a.hint?(0,t.jsx)("span",{className:"mt-1 block text-xs text-mute",children:a.hint}):null]});return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("p",{className:"text-sm text-mute",children:"Targets decide whether a load test passes. They are sent to k6 as thresholds, drive the verdict and the report colours, and are remembered on this computer."}),(0,t.jsxs)("label",{className:"flex items-center gap-2 text-sm text-ink",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:e=>g({on:e.target.checked}),className:"accent-[var(--accent)]"}),"Use my own performance targets"]}),a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[y("p95 must stay under (ms)",l,"p95",{min:1}),y("p99 must stay under (ms)",o,"p99",{min:0,hint:"0 = no p99 target"}),y("Error rate must stay under (%)",d,"errPct",{min:0,max:100,step:.1}),y("Checks must pass at least (%)",m,"checksPct",{min:0,max:100,step:.1,hint:"Only used when the request has checks"})]}),(0,t.jsxs)("label",{className:"flex items-start gap-2 rounded-md border border-line px-3 py-2.5 text-sm text-ink",children:[(0,t.jsx)("input",{type:"checkbox",checked:x,onChange:e=>g({abort:e.target.checked}),className:"mt-0.5 accent-[var(--accent)]"}),(0,t.jsxs)("span",{children:["Stop the test early if a target is clearly missed",(0,t.jsx)("span",{className:"block text-xs text-mute",children:"After a 10-second warm-up, k6 ends the run as soon as a target fails — saves time and stops hammering a struggling API."})]})]})]}):(0,t.jsx)("p",{className:"rounded-md bg-panel-2 px-3 py-2 text-sm text-mute",children:"Using built-in defaults: warn at p95 ≥ 500 ms or errors ≥ 1%, fail at p95 ≥ 2 s or errors ≥ 5%. No thresholds are sent to k6."})]})}e.s(["LabPage",0,function(){let e=(0,E.useToast)(),n=(0,y.useConfirm)(),l=(0,A.useEngineHealth)(),w=(0,I.useModKey)(),{slo:k}=(0,F.useSlo)(),{vars:N,activeEnv:S,refresh:C,rememberValues:U}=(0,q.useWorkspace)(),[L,Y]=(0,p.useState)(null),[Z,ee]=(0,p.useState)(!1),[et,es]=(0,p.useState)(!0),en=(0,p.useRef)(null),[ea,er]=(0,p.useState)(R.defaultRequestDraft),[el,ei]=(0,p.useState)(R.DEFAULT_LOAD),[eo,ec]=(0,p.useState)(!1),[ed,eu]=(0,p.useState)(null),[em,ep]=(0,p.useState)(!1),[eh,ex]=(0,p.useState)(!1),[ef,eb]=(0,p.useState)(!1),[eg,ey]=(0,p.useState)(null),[ev,ej]=(0,p.useState)(null),{index:ew,refresh:ek}=(0,M.useHistory)(),eN=ew?.runs??[],[eS,eE]=(0,p.useState)("response"),[eR,eq]=(0,p.useState)(!1),eC=ev?.status==="running"||ev?.status==="queued",eU=(0,R.isReady)(ea),e$=(0,R.loadProblem)(el),eL=em||eh;(0,p.useEffect)(()=>{let e=null;try{e=sessionStorage.getItem(W)}catch{}e&&(0,T.fetchRun)(e).then(async t=>{if(t)return ej(t);let s=await M.historyApi.run(e).catch(()=>null);s&&ej({id:s.report.id,status:s.report.status,report:s.report})});let t=function(){try{let e=sessionStorage.getItem(O);if(!e)return null;let t=JSON.parse(e);if(2===t.v)return{request:(0,R.requestFromUnknown)(t.request),load:(0,R.loadFromUnknown)(t.load)};return{request:(0,R.requestFromUnknown)(t),load:(0,R.loadFromUnknown)(t)}}catch{return null}}();t&&(er(t.request),ei(t.load));try{let e=sessionStorage.getItem(B);e&&Y(JSON.parse(e)),es("closed"!==localStorage.getItem(H))}catch{}ec(!0)},[]),(0,p.useEffect)(()=>{if(!eo)return;let e=window.setTimeout(()=>(function(e){try{sessionStorage.setItem(O,JSON.stringify({v:2,...e}))}catch{}})({request:ea,load:el}),250);return()=>window.clearTimeout(e)},[ea,el,eo]),(0,p.useEffect)(()=>{if(!ev||!eC)return;let t=!1,n=window.setInterval(async()=>{let n=await (0,T.fetchRun)(ev.id);if(n&&!t&&(ej(n),(0,T.isTerminalStatus)(n.status))){ek();let t="completed"===n.status?"finished":n.status;e(`Load test ${t}`,"failed"===n.status?"error":"success");let a=(0,s.buildVerdict)(n.report,{slo:k});(0,D.notifyFinished)({title:`Load test ${t}`,body:`${n.report.testName}
|
|
2
|
+
${"completed"===n.status?a.headline:n.error??"See the report for details."}`,ok:"completed"===n.status&&"fail"!==a.overall})}},500);return()=>{t=!0,window.clearInterval(n)}},[ev?.id,eC]);let eP=!!L&&JSON.stringify(ea)!==L.snapshot;function eT(e){Y(e);try{e?sessionStorage.setItem(B,JSON.stringify(e)):sessionStorage.removeItem(B)}catch{}}function eA(e){es(e);try{localStorage.setItem(H,e?"open":"closed")}catch{}}async function eO(t){try{let s={name:t?.name??L.name,collection:t?.collection??L.collection,request:ea},n=L&&!t?await q.workspaceApi.update(L.id,s):await q.workspaceApi.create(s);eT({id:n.id,name:n.name,collection:n.collection,snapshot:JSON.stringify(ea)}),ee(!1),await C(),e(`Saved “${n.name}”${n.collection?` in ${n.collection}`:""}`,"success")}catch(t){e(t instanceof Error?t.message:"Could not save the request","error")}}async function eM(){return!eP||n({title:`Discard changes to “${L.name}”?`,body:"They have not been saved.",confirmLabel:"Discard",tone:"danger"})}let[eF,eI]=(0,p.useState)(!1);async function ez(){await eM()&&(er({...(0,R.withUrl)((0,R.defaultRequestDraft)(),"{{practiceApi}}/products"),checks:[{type:"status",expect:"2xx"},{type:"json",path:"items[0].name",op:"exists",value:""}]}),eT(null),eu(null),eb(!1),ey(null),eE("response"),e("Practice request ready — press Send","success"))}async function eD(){try{let t=await q.workspaceApi.index(),s=e=>t.requests.find(t=>"Practice"===t.collection&&t.name===e),n=s("Sign in")?.id??(await q.workspaceApi.create({name:"Sign in",collection:"Practice",request:{...(0,R.withUrl)({...(0,R.defaultRequestDraft)(),method:"POST"},"{{practiceApi}}/login"),bodyMode:"json",bodyText:'{\n "username": "you",\n "password": "demo"\n}',checks:[{type:"status",expect:"200"}]}})).id,a=s("My orders"),r=a?await q.workspaceApi.get(a.id):await q.workspaceApi.create({name:"My orders",collection:"Practice",request:{...(0,R.withUrl)((0,R.defaultRequestDraft)(),"{{practiceApi}}/orders"),authMode:"bearer",token:"{{token}}",checks:[{type:"status",expect:"200"}],before:{requestId:n,requestName:"Sign in",extract:[{name:"token",from:"json",path:"data.token"}]}}});await C(),eA(!0),await e_(r),e("Added Practice → Sign in and My orders. Press Send: it signs in first, then uses the token.","success")}catch(t){e(t instanceof Error?t.message:"Could not add the practice requests","error")}}async function e_(e){if(!await eM())return;let t=(0,R.requestFromUnknown)(e.request);er(t),eT({id:e.id,name:e.name,collection:e.collection,snapshot:JSON.stringify(t)}),eu(null),eb(!1),ey(null),eE("response")}async function eV(){await eM()&&(er((0,R.defaultRequestDraft)()),eT(null),eu(null),ey(null),window.setTimeout(()=>en.current?.focus(),0))}async function eB(){try{ey(null);let e=(0,R.resolveDraft)(ea,N,S?.name),t=(0,R.buildPayload)(e,(0,R.toLoadConfig)(el),(0,R.autoRunName)(e,L?.name),(0,R.targetsFromSlo)(k));return await (0,z.withRunFirst)(t,e,N,S?.name)}catch(e){return ey(e instanceof Error?e.message:"Request is not valid"),null}}async function eH(){if(eL||!eU)return;let e=await eB();if(e){ep(!0),eb(!1),eE("response");try{let t=await (0,T.sendRequest)(e);eu(t);let s=(t.saved??[]).flatMap(e=>e.found&&void 0!==e.value?[{name:e.name,value:e.value}]:[]);U(s,L?.name??"the last Send")}finally{ep(!1)}}}async function eW(s=!1){if(eL||eC||!eU||!l.k6Ready)return;if(e$)return void ey(e$);let a=await eB();if(a){if(eb(!1),!s){ex(!0);try{let e=await (0,T.sendRequest)(a);if(eu(e),!(0,T.isSuccess)(e)){eb(!0),eE("response");return}}finally{ex(!1)}}if((0,T.needsLoadConfirm)(el.preset,a.load,a.request.url)&&!await n({title:`Start a ${(0,h.profileSummary)(el)} load test against ${(0,T.hostOf)(a.request.url)}?`,body:(0,t.jsxs)(t.Fragment,{children:["This is a ",(0,t.jsx)("span",{className:"text-ink",children:el.preset})," profile against a non-local host (",(0,h.profileSummary)(el),"). Only load-test systems you own or are allowed to test.",(0,t.jsxs)("span",{className:"mt-2 block",children:["Each simulated user sends its next request as soon as the last one returns, so a few dozen users can mean thousands of requests per second. Public sites and APIs behind a CDN or firewall usually answer that with ",(0,t.jsx)("span",{className:"text-ink",children:"429"})," or"," ",(0,t.jsx)("span",{className:"text-ink",children:"403"})," and may block this computer for a while — test a staging server, or use Requests per second mode with a modest rate."]})]}),confirmLabel:"Start load test",tone:"danger"}))return;try{let e=await (0,T.startLoadRun)(a);J(e.id),ej(e),eE("report")}catch(t){e(t instanceof Error?t.message:"Failed to start load","error")}}}async function eJ(){if(!ev)return;let t=await (0,T.stopLoadRun)(ev.id);t?ej(t):e("Could not reach the engine to stop the run","error")}(0,p.useEffect)(()=>{let e=()=>eI(!(0,_.welcomeHidden)());return e(),window.addEventListener(_.WELCOME_EVENT,e),()=>window.removeEventListener(_.WELCOME_EVENT,e)},[]),(0,p.useEffect)(()=>{let t=()=>{let t=null;try{t=sessionStorage.getItem(V.OPEN_REQUEST_KEY),sessionStorage.removeItem(V.OPEN_REQUEST_KEY)}catch{}t&&q.workspaceApi.get(t).then(e=>void e_(e)).catch(()=>e("That saved request is gone","error"))};return eo&&t(),window.addEventListener(V.OPEN_REQUEST_EVENT,t),()=>window.removeEventListener(V.OPEN_REQUEST_EVENT,t)},[eo]),(0,I.useShortcuts)({send:()=>void eH(),run:()=>void eW(),focusUrl:()=>en.current?.focus(),save:()=>L?void eO():ee(!0)});let eK=l.k6Ready?eU?e$??void 0:"Enter a URL first":l.k6Label,eQ=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button","data-tour":"send",onClick:()=>void eH(),disabled:eL||!eU,title:`Send one request (${w}+Enter)`,className:"btn btn-primary",children:[em?(0,t.jsx)(r.Loader2,{size:16,className:"animate-spin"}):(0,t.jsx)(u.Send,{size:16}),"Send"]}),eC?(0,t.jsxs)("button",{type:"button",onClick:()=>void eJ(),disabled:ev?.stopping,className:"btn btn-danger",children:[ev?.stopping?(0,t.jsx)(r.Loader2,{size:16,className:"animate-spin"}):(0,t.jsx)(m.Square,{size:16}),ev?.stopping?"Stopping…":"Stop"]}):(0,t.jsxs)("button",{type:"button","data-tour":"run",onClick:()=>void eW(),disabled:eL||!!eK,title:eK??`Check the request, then run the load profile (${w}+Shift+Enter)`,className:"btn btn-secondary",children:[eh?(0,t.jsx)(r.Loader2,{size:16,className:"animate-spin"}):(0,t.jsx)(c.Play,{size:16}),eh?"Checking…":"Run load test"]})]});return(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,t.jsxs)("header",{className:"border-b border-line bg-panel px-4 py-3 lg:px-6",children:[(0,t.jsx)("h1",{className:"sr-only",children:"Test an API"}),(0,t.jsx)(x.RequestBar,{ref:en,draft:ea,onChange:e=>{er(e),ey(null)},onImported:t=>e(t,"success"),actions:eQ}),(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-x-4 gap-y-2 text-xs text-mute",children:[et?null:(0,t.jsxs)("button",{type:"button",onClick:()=>eA(!0),className:"inline-flex items-center gap-1 rounded-md px-1.5 py-1 hover:text-ink",children:[(0,t.jsx)(a.FolderOpen,{size:13,"aria-hidden":!0})," Saved requests"]}),(0,t.jsx)(j.EnvironmentBar,{drafts:[ea]}),(0,t.jsx)($,{draft:ea,sent:!!(ed&&ed.status>0),onChange:er}),Z?(0,t.jsx)(P.SaveRequestForm,{initial:{name:L?.name??(0,R.autoRunName)(ea).replace(/ · \d.*$/,""),collection:L?.collection??""},onSave:(e,t)=>void eO({name:e,collection:t}),onCancel:()=>ee(!1)}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-2",children:[L?(0,t.jsxs)("span",{className:"text-ink",title:L.collection?`${L.collection} / ${L.name}`:L.name,children:[L.collection?(0,t.jsxs)("span",{className:"text-mute",children:[L.collection," / "]}):null,L.name,eP?(0,t.jsx)("span",{className:"ml-1 text-warn","aria-label":"unsaved changes",children:"● unsaved"}):null]}):null,(0,t.jsxs)("button",{type:"button",onClick:()=>L?void eO():ee(!0),disabled:!!L&&!eP,title:`Save request (${w}+S)`,className:"inline-flex items-center gap-1 rounded-md border border-line px-2 py-0.5 text-ink hover:border-accent disabled:opacity-40",children:[(0,t.jsx)(d,{size:12,"aria-hidden":!0})," ",L?"Save":"Save request"]}),L?(0,t.jsx)("button",{type:"button",onClick:()=>ee(!0),className:"rounded-md px-1.5 py-0.5 hover:text-ink",children:"Save as…"}):null]}),eg?(0,t.jsx)("span",{className:"text-bad",role:"alert",children:eg}):null,(0,t.jsxs)("span",{className:"ml-auto hidden items-center gap-1.5 sm:inline-flex",children:[(0,t.jsx)("span",{className:"kbd",children:w}),"+",(0,t.jsx)("span",{className:"kbd",children:"Enter"})," send",(0,t.jsx)("span",{className:"kbd ml-2",children:w}),"+",(0,t.jsx)("span",{className:"kbd",children:"Shift"}),"+",(0,t.jsx)("span",{className:"kbd",children:"Enter"})," load",(0,t.jsx)("span",{className:"kbd ml-2",children:"/"})," URL"]})]})]}),(0,t.jsxs)("div",{className:`grid min-h-0 flex-1 overflow-y-auto lg:overflow-hidden ${eR?"":et?"lg:grid-cols-[15rem_minmax(0,1fr)_minmax(0,1fr)] 2xl:grid-cols-[16rem_minmax(0,5fr)_minmax(0,7fr)]":"lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)] 2xl:grid-cols-[minmax(0,5fr)_minmax(0,7fr)]"}`,children:[!eR&&et?(0,t.jsx)(P.RequestsPanel,{activeId:L?.id??null,onOpen:e=>void e_(e),onNew:()=>void eV(),onClose:()=>eA(!1)}):null,eR?null:(0,t.jsx)("section",{"aria-label":"Request",className:"min-w-0 px-4 py-4 lg:overflow-y-auto lg:px-6",children:(0,t.jsx)(f.RequestEditor,{id:"lab-request",draft:ea,onChange:er,checkResults:ed?.checks,setupResult:ed?.setup,savedResults:ed?.saved,currentId:L?.id,extraTabs:[{id:"load",label:"Load",badge:el.stages?.length?"stages":"rate"===el.mode?`${el.rps}/s`:`${el.vus} users \xb7 ${el.duration}`,content:(0,t.jsx)(h.LoadEditor,{load:el,onChange:ei})},{id:"targets",label:"Goals",content:(0,t.jsx)(X,{})}]})}),(0,t.jsxs)("section",{"aria-label":"Results",className:"@container flex min-h-[32rem] min-w-0 flex-col border-line bg-panel/40 px-4 py-4 lg:min-h-0 lg:overflow-y-auto lg:border-l lg:px-6",children:[(0,t.jsx)(v.Tabs,{id:"lab-results",label:"Results",value:eS,onChange:eE,items:[{id:"response",label:"Response",badge:ed?ed.status||"ERR":void 0},{id:"report",label:eC?(0,t.jsx)(K,{}):"Load report",badge:eN.length||void 0}],trailing:(0,t.jsxs)(t.Fragment,{children:["report"===eS&&eN.length>0?(0,t.jsx)(G,{runs:eN,current:ev,disabled:eC,onPick:async t=>{try{let e=await M.historyApi.run(t.id);J(t.id),ej({id:e.report.id,status:e.report.status,report:e.report})}catch(t){e(t instanceof Error?t.message:"Could not open that run","error")}}}):null,(0,t.jsx)("button",{type:"button",onClick:()=>eq(e=>!e),"aria-label":eR?"Show the request editor":"Expand results to full width",title:eR?"Show the request editor":"Expand results",className:"hidden rounded p-1.5 text-mute hover:bg-panel-2 hover:text-ink lg:block",children:eR?(0,t.jsx)(o,{size:14}):(0,t.jsx)(i,{size:14})})]})}),(0,t.jsx)("div",{...(0,v.tabPanelProps)("lab-results",eS),className:"flex min-h-0 flex-1 flex-col pt-4",children:"response"===eS?(0,t.jsxs)(t.Fragment,{children:[ef&&ed?(0,t.jsxs)("div",{role:"alert",className:"mb-4 flex flex-wrap items-center gap-3 rounded-md border border-warn/40 bg-warn/10 px-3 py-2.5",children:[(0,t.jsxs)("p",{className:"min-w-0 flex-1 text-sm text-ink",children:[(0,t.jsx)("span",{className:"font-medium text-warn",children:"Load test not started."})," The check returned"," ",ed.status||"an error",", not 2xx. Fix the request, or run anyway if this status is expected."]}),(0,t.jsx)("button",{type:"button",className:"btn btn-secondary py-1.5 text-xs",onClick:()=>void eW(!0),children:"Run anyway"})]}):null,ed?(0,t.jsx)(g.ResponseViewer,{result:ed}):eF?(0,t.jsx)(_.WelcomeCard,{practiceReady:!!l.demoApi,onSimple:()=>void ez(),onSignIn:()=>void eD(),onHide:()=>(0,_.setWelcomeHidden)(!0)}):(0,t.jsx)(Q,{title:"Send a request to see the response",lines:[(0,t.jsx)(t.Fragment,{children:"Paste a URL — or a whole curl command from your browser's DevTools — into the bar above."}),(0,t.jsxs)(t.Fragment,{children:["Press ",(0,t.jsx)("span",{className:"kbd",children:w}),"+",(0,t.jsx)("span",{className:"kbd",children:"Enter"})," to send it."]})]})]}):ev?(0,t.jsxs)(t.Fragment,{children:[ev.error?(0,t.jsx)("p",{role:"alert",className:"mb-3 rounded-md border border-bad/40 bg-bad/10 px-3 py-2 text-sm text-bad",children:ev.error}):null,(0,t.jsx)(b.ReportView,{report:ev.report,source:"session",live:eC,probe:ed})]}):(0,t.jsx)(Q,{title:"No load test yet",lines:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-ink",children:"Run load test"})," sends one check request first, then runs"," ",(0,t.jsx)("span",{className:"font-mono text-ink",children:(0,h.profileSummary)(el)})," with k6."]}),(0,t.jsx)(t.Fragment,{children:"Change users, duration, and ramps in the Load tab. Set pass/fail goals in Goals."})],action:(0,t.jsxs)("button",{type:"button",className:"btn btn-primary",disabled:eL||!!eK,title:eK,onClick:()=>void eW(),children:[(0,t.jsx)(c.Play,{size:16}),"Run load test"]})})})]})]})]})},"VerdictTag",0,Y],6980)},14168,e=>{"use strict";async function t(e){let t=await e.json().catch(()=>null);if(!e.ok)throw Error(t?.error??`Engine error (${e.status})`);return t}let s=(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(["suiteApi",0,{plan:e=>fetch(`/engine/suites/plan?collection=${encodeURIComponent(e)}`,{cache:"no-store"}).then(e=>t(e)),savePlan:(e,n)=>s("PUT","/engine/suites/plan",{collection:e,...n}).then(e=>t(e)),start:e=>s("POST","/engine/suites/runs",e).then(e=>t(e)),get:e=>fetch(`/engine/suites/runs/${encodeURIComponent(e)}`,{cache:"no-store"}).then(e=>t(e)),stop:e=>s("POST",`/engine/suites/runs/${encodeURIComponent(e)}/stop`).then(e=>t(e))},"suiteHref",0,function(e){return`/suite?c=${encodeURIComponent(e)}`}])},95486,17219,15060,e=>{"use strict";let t=(0,e.i(99522).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",0,t],95486);let s=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 n(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 r(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),s=0;for(let n of e)t.set(n,s),s+=n.length;return t}function l(e,t){let s=URL.createObjectURL(t),n=document.createElement("a");n.href=s,n.download=e,document.body.appendChild(n),n.click(),n.remove(),URL.revokeObjectURL(s)}e.s(["zipStore",0,function(e){let t=new TextEncoder,l=[],i=[],o=0;for(let[c,d]of Object.entries(e)){let e=t.encode(c),u="string"==typeof d?t.encode(d):d,m=function(e){let t=0xffffffff;for(let n of e)t=s[(t^n)&255]^t>>>8;return(0xffffffff^t)>>>0}(u),p=r([a(0x4034b50),n(20),n(0),n(0),n(0),n(0),a(m),a(u.length),a(u.length),n(e.length),n(0),e,u]),h=r([a(0x2014b50),n(20),n(20),n(0),n(0),n(0),n(0),a(m),a(u.length),a(u.length),n(e.length),n(0),n(0),n(0),n(0),a(0),a(o),e]);l.push(p),i.push(h),o+=p.length}let c=r(i),d=r([a(0x6054b50),n(0),n(0),n(Object.keys(e).length),n(Object.keys(e).length),a(c.length),a(o),n(0)]),u=r([...l,c,d]);return new Blob([u.buffer.slice(u.byteOffset,u.byteOffset+u.byteLength)],{type:"application/zip"})}],17219),e.s(["downloadBlob",0,l,"downloadText",0,function(e,t,s){l(e,new Blob([t],{type:s}))}],15060)},60961,e=>{"use strict";let t=(0,e.i(99522).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],60961)},3792,66478,e=>{"use strict";var t=e.i(99522);let s=(0,t.default)("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(["Play",0,s],3792);let n=(0,t.default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",0,n],66478)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33622,e=>{"use strict";var t=e.i(61666);e.i(24856);var r=e.i(48191);function n(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 a=e.i(45404),s=e.i(29724),o=e.i(88153),l=e.i(56396),i=e.i(59180),c=e.i(67938),p=e.i(50804),d=e.i(83067);e.s(["default",0,function(){let[e,u]=(0,d.useState)(null),[x,f]=(0,d.useState)(null),[m,h]=(0,d.useState)(null),[y,b]=(0,d.useState)(null),[j,g]=(0,d.useState)(!1),[v,N]=(0,d.useState)(!1),[w,S]=(0,d.useState)(null),[O,k]=(0,d.useState)(!1),A=(0,l.useToast)(),{refresh:C}=(0,i.useHistory)();async function T(){k(!0);try{await i.historyApi.import(w),await C(),N(!0),A("Saved to History","success")}catch(e){A(e instanceof Error?e.message:"Could not save to History","error")}finally{k(!1)}}let U=(0,d.useCallback)(async e=>{h(null),N(!1),u(null),f(null);let t=e.name.toLowerCase();if(t.endsWith(".html")||t.endsWith(".xlsx")||t.endsWith(".csv")||t.endsWith(".zip")){b(e.name),h("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(),a=JSON.parse(t),s=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&&n(e.report))))throw Error("Not a valid APITestCenter compare export.");return{kind:"compare",doc:{...e,apis:e.apis.map(e=>({...e,report:(0,r.repairSummary)(e.report)}))}}}if(n(e.report))return{kind:"report",report:(0,r.repairSummary)(e.report)};if(n(e))return{kind:"report",report:(0,r.repairSummary)(e)};throw Error("Not an APITestCenter report. Export JSON from the lab (not HTML or Excel).")}(a);S(a),b(e.name),"compare"===s.kind?f(s.doc):u(s.report)}catch(t){b(e.name),h(t instanceof Error?t.message:"Could not read that file.")}},[]);function D(e){e.preventDefault(),g(!0)}function E(e){e.preventDefault(),g(!1);let t=e.dataTransfer.files[0];t&&U(t)}let H=j?"border-accent bg-accent-dim":"border-line bg-panel",L=x?.apis.map(e=>e.title)??[],{slo:R}=(0,o.useSlo)();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||x?(0,t.jsxs)("label",{onDragOver:D,onDragLeave:()=>g(!1),onDrop:E,className:`inline-flex cursor-pointer items-center gap-2 rounded-md border border-dashed px-3 py-2 text-xs ${H}`,children:[(0,t.jsx)(c.FileUp,{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&&U(t),e.target.value=""}})]}):null]}),m?(0,t.jsx)("p",{className:"mt-4 text-sm text-bad",children:m}):null,x?(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 · ",x.mode]}),(0,t.jsx)("button",{type:"button",disabled:v||O,onClick:()=>void T(),className:"rounded-md border border-line px-3 py-1.5 text-xs text-ink hover:border-accent disabled:opacity-40",children:v?"Saved to History":"Keep in History"})]}),(0,t.jsx)(a.Dashboard,{scope:"compare",data:{reports:x.apis.map(e=>e.report),titles:L,slo:R,live:!1}}),(0,t.jsxs)("p",{className:"text-xs text-mute",children:["Open"," ",(0,t.jsx)(p.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:v||O,onClick:()=>void T(),className:"rounded-md border border-line px-3 py-1.5 text-xs text-ink hover:border-accent disabled:opacity-40",children:v?"Saved to History":"Keep in History"})]}),v?(0,t.jsxs)("p",{className:"text-xs text-mute",children:["Open it anytime on"," ",(0,t.jsx)(p.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)(s.ReportView,{report:e,source:"file"})})]}):(0,t.jsxs)("label",{onDragOver:D,onDragLeave:()=>g(!1),onDrop:E,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 ${H}`,children:[(0,t.jsx)(c.FileUp,{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&&U(t),e.target.value=""}})]})]})}],33622)},95486,17219,15060,e=>{"use strict";let t=(0,e.i(99522).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",0,t],95486);let r=new Uint32Array(256).map((e,t)=>{let r=t;for(let e=0;e<8;e++)r=1&r?0xedb88320^r>>>1:r>>>1;return r>>>0});function n(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 s(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}function o(e,t){let r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=e,document.body.appendChild(n),n.click(),n.remove(),URL.revokeObjectURL(r)}e.s(["zipStore",0,function(e){let t=new TextEncoder,o=[],l=[],i=0;for(let[c,p]of Object.entries(e)){let e=t.encode(c),d="string"==typeof p?t.encode(p):p,u=function(e){let t=0xffffffff;for(let n of e)t=r[(t^n)&255]^t>>>8;return(0xffffffff^t)>>>0}(d),x=s([a(0x4034b50),n(20),n(0),n(0),n(0),n(0),a(u),a(d.length),a(d.length),n(e.length),n(0),e,d]),f=s([a(0x2014b50),n(20),n(20),n(0),n(0),n(0),n(0),a(u),a(d.length),a(d.length),n(e.length),n(0),n(0),n(0),n(0),a(0),a(i),e]);o.push(x),l.push(f),i+=x.length}let c=s(l),p=s([a(0x6054b50),n(0),n(0),n(Object.keys(e).length),n(Object.keys(e).length),a(c.length),a(i),n(0)]),d=s([...o,c,p]);return new Blob([d.buffer.slice(d.byteOffset,d.byteOffset+d.byteLength)],{type:"application/zip"})}],17219),e.s(["downloadBlob",0,o,"downloadText",0,function(e,t,r){o(e,new Blob([t],{type:r}))}],15060)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,60459,e=>{"use strict";var t=e.i(61666),r=e.i(99522);let n=(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 a=e.i(86856);let l=(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 o=e.i(84355),s=e.i(67951),i=e.i(91694),u=e.i(29091);let c=(0,r.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),d=(0,r.default)("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]),f=(0,r.default)("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);var p=e.i(87283),h=e.i(50804),m=e.i(46443),y=e.i(83067),x=e.i(69578),b=e.i(78739),g=e.i(20054);function v({collapsed:e=!1}){let{checked:r,online:n,k6Ready:a,k6Label:l,appVersion:o}=(0,g.useEngineHealth)(),s=r?n&&a?"bg-ok":n?"bg-warn":"bg-bad":"bg-mute",i=r?n?a?"Engine ready":"Engine online, k6 missing":"Engine offline":"Checking engine";return e?(0,t.jsx)("div",{className:"flex justify-center py-1",title:i,role:"status","aria-label":i,children:(0,t.jsx)("span",{className:`h-2 w-2 rounded-full ${s}`})}):(0,t.jsxs)("div",{className:"text-xs",role:"status",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-ink",children:[(0,t.jsx)("span",{className:`h-2 w-2 rounded-full ${s}`,"aria-hidden":!0}),i]}),(0,t.jsx)("div",{className:"mt-1 text-xs leading-snug text-mute",children:r?n?l:"Start it with pnpm dev":"…"}),(0,t.jsxs)("button",{type:"button",onClick:b.openAbout,className:"mt-1 text-xs text-mute hover:text-accent",title:"Version, updates, and where your files are",children:[o&&"dev"!==o?`Version ${o}`:"Development build"," · About"]})]})}var j=e.i(68865);function P(){let{items:e,remove:r,clear:n}=(0,j.useCompareTray)(),a=(0,m.usePathname)(),l=(0,m.useRouter)();if(!e.length||a.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.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 ",j.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:()=>r(e.id),className:"rounded-full p-0.5 text-mute hover:text-bad","aria-label":`Remove ${e.name} from compare`,children:(0,t.jsx)(p.X,{size:12})})]},e.id))}),(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:n,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:()=>l.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 _=e.i(7641),C=e.i(5831),k=e.i(67217),S=e.i(51554);let w=(0,r.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),O=(0,r.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var N=e.i(48317);let T=[{id:"system",label:"System",icon:c},{id:"light",label:"Light",icon:O},{id:"dark",label:"Dark",icon:w}];function M({compact:e=!1,collapsed:r=!1}){let{theme:n,setTheme:a}=(0,N.useTheme)(),[l,o]=(0,y.useState)(!1);(0,y.useEffect)(()=>{o(!0)},[]);let s=l?n??"system":"system";if(r){let e=Math.max(0,T.findIndex(e=>e.id===s)),r=T[e]??T[0],n=r.icon;return(0,t.jsx)("button",{type:"button","aria-label":`Theme: ${r.label}. Click to change.`,disabled:!l,onClick:()=>a(T[(e+1)%T.length].id),className:"grid h-8 w-8 place-items-center rounded text-mute hover:bg-panel-2 hover:text-ink",children:(0,t.jsx)(n,{size:14,strokeWidth:1.75})})}return(0,t.jsxs)("div",{children:[e?null:(0,t.jsx)("div",{className:"mb-2 text-xs tracking-wide text-mute uppercase",children:"Appearance"}),(0,t.jsx)("div",{className:"grid grid-cols-3 gap-1 rounded-md border border-line bg-panel-2 p-1",role:"radiogroup","aria-label":"Theme",children:T.map(e=>{let r=e.icon,n=s===e.id;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":n,"aria-label":e.label,disabled:!l,onClick:()=>a(e.id),className:`flex items-center justify-center gap-1 rounded px-2 py-1.5 text-xs transition-colors ${n?"bg-panel text-ink shadow-sm":"text-mute hover:text-ink"}`,children:[(0,t.jsx)(r,{size:13,strokeWidth:1.75}),(0,t.jsx)("span",{children:e.label})]},e.id)})})]})}let E=[{href:"/",label:"Test API",icon:o.FlaskConical},{href:"/suite",label:"Run collection",icon:u.ListChecks},{href:"/compare",label:"Compare",icon:s.GitCompareArrows},{href:"/history",label:"History",icon:i.History},{href:"/preview",label:"Open report",icon:l}],R="apitestcenter-sidebar",A="apitestcenter-phone-notice";e.s(["AppShell",0,function({children:e}){let r=(0,m.usePathname)(),[l,o]=(0,y.useState)(!1),[s,i]=(0,y.useState)(!1);return(0,y.useEffect)(()=>{let e=window.localStorage.getItem(R),t=window.matchMedia("(max-width: 1279px)");o(t.matches||"collapsed"===e);let r=e=>{e.matches?o(!0):o("collapsed"===window.localStorage.getItem(R))};return t.addEventListener("change",r),i(window.matchMedia("(max-width: 767px)").matches&&"dismissed"!==window.sessionStorage.getItem(A)),()=>t.removeEventListener("change",r)},[]),(0,t.jsxs)("div",{className:"flex h-dvh overflow-hidden",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"}),(0,t.jsxs)("aside",{"aria-label":"Main navigation",className:`flex h-full shrink-0 flex-col border-r border-line bg-panel transition-[width] duration-150 ${l?"w-14":"w-56"}`,children:[(0,t.jsxs)("div",{className:`flex items-center border-b border-line ${l?"flex-col gap-2 px-2 py-3":"justify-between gap-2 px-4 py-4"}`,children:[(0,t.jsx)(h.default,{href:"/",className:"min-w-0","aria-label":"APITestCenter home",children:l?(0,t.jsx)("span",{className:"grid h-8 w-8 place-items-center rounded-md bg-accent-dim text-xs font-semibold tracking-wider text-accent",children:"ATC"}):(0,t.jsxs)("span",{className:"block",children:[(0,t.jsx)("span",{className:"block text-sm font-semibold text-ink",children:"APITestCenter"}),(0,t.jsx)("span",{className:"block text-xs text-mute",children:"API & performance lab"})]})}),(0,t.jsx)("button",{type:"button",onClick:function(){let e=!l;o(e),window.localStorage.setItem(R,e?"collapsed":"open")},"aria-label":l?"Expand sidebar":"Collapse sidebar","aria-expanded":!l,className:"shrink-0 rounded-md p-1.5 text-mute hover:bg-panel-2 hover:text-ink",children:l?(0,t.jsx)(f,{size:16}):(0,t.jsx)(d,{size:16})})]}),(0,t.jsx)("nav",{className:`flex flex-1 flex-col gap-0.5 ${l?"p-2":"p-3"}`,children:E.map(e=>{let n="/"===e.href?"/"===r:r===e.href||r.startsWith(`${e.href}/`),a=e.icon;return(0,t.jsxs)(h.default,{href:e.href,title:l?e.label:void 0,"aria-current":n?"page":void 0,className:`flex items-center rounded-md text-sm transition-colors ${l?"justify-center px-0 py-2":"gap-2.5 px-3 py-2"} ${n?"bg-accent-dim text-accent":"text-mute hover:bg-panel-2 hover:text-ink"}`,children:[(0,t.jsx)(a,{size:16,strokeWidth:1.75,"aria-hidden":!0}),l?(0,t.jsx)("span",{className:"sr-only",children:e.label}):e.label]},e.href)})}),(0,t.jsxs)("div",{className:`space-y-3 border-t border-line ${l?"p-2":"p-4"}`,children:[(0,t.jsxs)("button",{type:"button","data-tour":"help",onClick:_.openHelp,title:"What the words mean, and the tour","aria-label":"Help",className:`flex w-full items-center rounded-md border border-line text-xs text-mute hover:border-accent hover:text-ink ${l?"justify-center py-1.5":"gap-2 px-2.5 py-1.5"}`,children:[(0,t.jsx)(n,{size:13,"aria-hidden":!0}),l?null:"Help · what words mean"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>window.dispatchEvent(new Event("atc:palette")),title:"Command palette (Ctrl+K)","aria-label":"Open command palette",className:`flex w-full items-center rounded-md border border-line text-xs text-mute hover:border-accent hover:text-ink ${l?"justify-center py-1.5":"gap-2 px-2.5 py-1.5"}`,children:[(0,t.jsx)(a.Command,{size:13,"aria-hidden":!0}),l?null:(0,t.jsxs)(t.Fragment,{children:["Commands ",(0,t.jsx)("span",{className:"kbd ml-auto",children:"Ctrl K"})]})]}),l?(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)(M,{collapsed:!0})}):(0,t.jsx)(M,{compact:!0}),(0,t.jsx)(v,{collapsed:l})]})]}),(0,t.jsxs)("main",{id:"main",className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto",children:[s?(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)(c,{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. Load 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(A,"dismissed"),i(!1)},children:(0,t.jsx)(p.X,{size:16})})]}):null,e]}),(0,t.jsx)(x.CommandPalette,{}),(0,t.jsx)(_.HelpPanel,{}),(0,t.jsx)(C.Tour,{}),(0,t.jsx)(k.ImportDialog,{}),(0,t.jsx)(b.AboutDialog,{}),(0,t.jsx)(P,{}),(0,t.jsx)(S.UsageConsent,{})]})}],60459)},87329,e=>{"use strict";var t=e.i(61666),r=e.i(48317),n=e.i(39170),a=e.i(68865),l=e.i(56396),o=e.i(20054),s=e.i(59180),i=e.i(48321),u=e.i(6278),c=e.i(88153);e.s(["Providers",0,function({children:e}){return(0,t.jsx)(r.ThemeProvider,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"apitestcenter-theme",children:(0,t.jsx)(o.EngineHealthProvider,{children:(0,t.jsx)(s.HistoryProvider,{children:(0,t.jsx)(i.ViewsProvider,{children:(0,t.jsx)(u.WorkspaceProvider,{children:(0,t.jsx)(c.SloProvider,{children:(0,t.jsx)(l.ToastProvider,{children:(0,t.jsx)(n.ConfirmProvider,{children:(0,t.jsx)(a.CompareTrayProvider,{children:e})})})})})})})})})}])},39170,48321,e=>{"use strict";var t=e.i(61666),r=e.i(53012),n=e.i(83067);let a=(0,n.createContext)(async()=>!1);function l({options:e,onClose:a}){let o=(0,n.useRef)(null),s=(0,n.useRef)(null),i=(0,n.useRef)(null),u="danger"===e.tone;return(0,n.useEffect)(()=>{let e=document.activeElement;return(u?s:i).current?.focus(),()=>e?.focus()},[u]),(0,t.jsx)("div",{className:"fixed inset-0 z-50 grid place-items-center bg-black/50 p-4 backdrop-blur-sm",onMouseDown:e=>{e.target===e.currentTarget&&a(!1)},children:(0,t.jsxs)("div",{ref:o,role:"alertdialog","aria-modal":"true","aria-labelledby":"confirm-title",onKeyDown:function(e){if("Escape"===e.key&&(e.stopPropagation(),a(!1)),"Tab"===e.key){let t=o.current?.querySelectorAll("button");if(!t||0===t.length)return;let r=t[0],n=t[t.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),n.focus()):e.shiftKey||document.activeElement!==n||(e.preventDefault(),r.focus())}},className:"w-full max-w-md rounded-xl border border-line bg-panel p-5 shadow-2xl",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[u?(0,t.jsx)("span",{className:"mt-0.5 grid h-8 w-8 shrink-0 place-items-center rounded-full bg-warn/15 text-warn",children:(0,t.jsx)(r.AlertTriangle,{size:16})}):null,(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h2",{id:"confirm-title",className:"text-base font-medium text-ink",children:e.title}),e.body?(0,t.jsx)("div",{className:"mt-2 text-sm text-mute",children:e.body}):null]})]}),(0,t.jsxs)("div",{className:"mt-5 flex justify-end gap-2",children:[(0,t.jsx)("button",{ref:s,type:"button",className:"btn btn-secondary",onClick:()=>a(!1),children:e.cancelLabel??"Cancel"}),(0,t.jsx)("button",{ref:i,type:"button",className:"btn btn-primary",onClick:()=>a(!0),children:e.confirmLabel??"Continue"})]})]})})}e.s(["ConfirmProvider",0,function({children:e}){let[r,o]=(0,n.useState)(null),s=(0,n.useCallback)(e=>new Promise(t=>o({...e,resolve:t})),[]);return(0,t.jsxs)(a.Provider,{value:s,children:[e,r?(0,t.jsx)(l,{options:r,onClose:function(e){r?.resolve(e),o(null)}}):null]})},"useConfirm",0,function(){return(0,n.useContext)(a)}],39170),e.i(24856);var o=e.i(86483);let s=(0,o.normalizeViewsFile)(null),i=(0,n.createContext)({file:s,ready:!1,viewsFor:e=>o.BUILT_IN_VIEWS.filter(t=>t.scope===e),save:async e=>e});function u(){return(0,n.useContext)(i)}let c=e=>`apitestcenter-last-view-${e}`;e.s(["ViewsProvider",0,function({children:e}){let[r,a]=(0,n.useState)(s),[l,u]=(0,n.useState)(!1);(0,n.useEffect)(()=>{fetch("/engine/settings/views",{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>e&&a((0,o.normalizeViewsFile)(e))).catch(()=>void 0).finally(()=>u(!0))},[]);let c=(0,n.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 n=(0,o.normalizeViewsFile)(r);return a(n),n},[]),d=(0,n.useMemo)(()=>({file:r,ready:l,viewsFor:e=>[...o.BUILT_IN_VIEWS,...r.views].filter(t=>t.scope===e),save:c}),[r,l,c]);return(0,t.jsx)(i.Provider,{value:d,children:e})},"useSelectedView",0,function(e){let{file:t,viewsFor:r}=u(),[a,l]=(0,n.useState)(null);(0,n.useEffect)(()=>{try{l(localStorage.getItem(c(e)))}catch{}},[e]);let o=r(e);return[o.find(e=>e.id===a)??o.find(r=>r.id===t.defaults[e])??o[0],(0,n.useCallback)(t=>{l(t);try{localStorage.setItem(c(e),t)}catch{}},[e])]},"useViews",0,u],48321)},68865,e=>{"use strict";var t=e.i(61666),r=e.i(83067);let n="apitestcenter-compare-tray",a=(0,r.createContext)({items:[],has:()=>!1,toggle:()=>!1,remove:()=>{},clear:()=>{}});e.s(["CompareTrayProvider",0,function({children:e}){let[l,o]=(0,r.useState)([]);(0,r.useEffect)(()=>{try{let e=JSON.parse(localStorage.getItem(n)??"[]");Array.isArray(e)&&o(e.filter(e=>"string"==typeof e?.id&&"string"==typeof e?.name).slice(0,6))}catch{}},[]);let s=(0,r.useCallback)(e=>{o(e);try{localStorage.setItem(n,JSON.stringify(e))}catch{}},[]),i=(0,r.useMemo)(()=>({items:l,has:e=>l.some(t=>t.id===e),toggle:e=>l.some(t=>t.id===e.id)?(s(l.filter(t=>t.id!==e.id)),!0):!(l.length>=6)&&(s([...l,e]),!0),remove:e=>s(l.filter(t=>t.id!==e)),clear:()=>s([])}),[l,s]);return(0,t.jsx)(a.Provider,{value:i,children:e})},"TRAY_MAX",0,6,"useCompareTray",0,function(){return(0,r.useContext)(a)}])},88153,e=>{"use strict";var t=e.i(61666),r=e.i(83067);let n="apitestcenter-session-slo",a=(0,r.createContext)({slo:null,setSlo:()=>{},ready:!1});e.s(["SloProvider",0,function({children:e}){let[l,o]=(0,r.useState)(null),[s,i]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{o(function(){try{let e=localStorage.getItem(n)??sessionStorage.getItem(n);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}}()),i(!0)},[]),(0,t.jsx)(a.Provider,{value:{slo:l,setSlo:function(e){o(e);try{sessionStorage.removeItem(n),e?localStorage.setItem(n,JSON.stringify(e)):localStorage.removeItem(n)}catch{}},ready:s},children:e})},"useSlo",0,function(){return(0,r.useContext)(a)}])},84355,91694,e=>{"use strict";var t=e.i(99522);let r=(0,t.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,r],84355);let n=(0,t.default)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);e.s(["History",0,n],91694)},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)},29091,e=>{"use strict";let t=(0,e.i(99522).default)("list-checks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);e.s(["ListChecks",0,t],29091)},50804,(e,t,r)=>{"use strict";e.i(29694),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return x},useLinkStatus:function(){return g}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let l=e.r(56421),o=e.r(61666),s=l._(e.r(83067)),i=e.r(67478),u=e.r(15489),c=e.r(25977),d=e.r(67670),f=e.r(12624),p=e.r(16051),h=e.r(44137),m=e.r(43102),y=e.r(31039);function x(t){var r;let n,a,l,[x,g]=(0,s.useOptimistic)(h.IDLE_LINK_STATUS),v=(0,s.useRef)(null),{href:j,as:P,children:_,prefetch:C=null,passHref:k,replace:S,shallow:w,scroll:O,onClick:N,onMouseEnter:T,onTouchStart:M,legacyBehavior:E=!1,onNavigate:R,transitionTypes:A,ref:F,unstable_dynamicOnHover:I,...L}=t;n=_,E&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let D=s.default.useContext(u.AppRouterContext),B=!1!==C,$=!1===C?"none":!0===C?"full":"auto",U="none"!==$?"auto"===$?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,H="string"==typeof(r=P||j)?r:(0,i.formatUrl)(r);if(E){if(n?.$$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});a=s.default.Children.only(n)}let z=E?a&&"object"==typeof a&&a.ref:F,V,K=s.default.useCallback(e=>(null!==D&&(v.current=(0,h.mountLinkInstance)(e,H,D,U,B,g,V)),()=>{v.current&&((0,h.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,h.unmountPrefetchableInstance)(e)}),[B,H,D,U,g,V]),W={ref:(0,c.useMergedRef)(K,z),onClick(t){E||"function"!=typeof N||N(t),E&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!D||t.defaultPrevented||function(t,r,n,a,l,o,i,u="none"){if("u">typeof window){let c,{nodeName:d}=t.currentTarget;if("A"===d.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)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99276);s.default.startTransition(()=>{f(r,a?"replace":"push",!1===l?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,i,u)})}}(t,H,v,S,O,R,A,$)},onMouseEnter(e){E||"function"!=typeof T||T(e),E&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),D&&B&&(0,h.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){E||"function"!=typeof M||M(e),E&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),D&&B&&(0,h.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,d.isAbsoluteUrl)(H)?W.href=H:E&&!k&&("a"!==a.type||"href"in a.props)||(W.href=(0,f.addBasePath)(H)),l=E?s.default.cloneElement(a,W):(0,o.jsx)("a",{...L,...W,children:n}),(0,o.jsx)(b.Provider,{value:x,children:l})}let b=(0,s.createContext)(h.IDLE_LINK_STATUS),g=()=>(0,s.useContext)(b);("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)},13199,(e,t,r)=>{"use strict";e.i(29694),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useRouterBFCache",{enumerable:!0,get:function(){return a}});let n=e.r(83067);function a(e,t,r){let[a,l]=(0,n.useState)(()=>({tree:e,cacheNode:t,stateKey:r,next:null}));if(a.tree===e)return a;let o={tree:e,cacheNode:t,stateKey:r,next:null},s=1,i=a,u=o;for(;null!==i&&s<1;){if(i.stateKey===r){u.next=i.next;break}{s++;let e={tree:i.tree,cacheNode:i.cacheNode,stateKey:i.stateKey,next:null};u.next=e,u=e}i=i.next}return l(o),o}("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)},82334,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientPageRoot",{enumerable:!0,get:function(){return u}});let n=e.r(61666),a=e.r(15489),l=e.r(83067),o=e.r(8856),s=e.r(22012),i=e.r(23898);function u({Component:e,serverProvidedParams:t}){let r,c;if(null!==t)r=t.searchParams,c=t.params;else{let e=(0,l.use)(a.LayoutRouterContext);c=null!==e?e.parentParams:{},r=(0,o.urlSearchParamsToParsedUrlQuery)((0,l.use)(s.SearchParamsContext))}let d=(0,i.createClientSearchParams)(r),f=(0,i.createClientParams)(c);return(0,n.jsx)(e,{params:f,searchParams:d})}("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)},44326,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientSegmentRoot",{enumerable:!0,get:function(){return s}});let n=e.r(61666),a=e.r(15489),l=e.r(83067),o=e.r(23898);function s({Component:e,slots:t,serverProvidedParams:r}){let i;if(null!==r)i=r.params;else{let e=(0,l.use)(a.LayoutRouterContext);i=null!==e?e.parentParams:{}}let u=(0,o.createClientParams)(i);return(0,n.jsx)(e,{...t,params: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)},50411,(e,t,r)=>{"use strict";e.i(29694),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HTTPAccessFallbackBoundary",{enumerable:!0,get:function(){return c}});let n=e.r(56421),a=e.r(61666),l=n._(e.r(83067)),o=e.r(79172),s=e.r(81402),i=e.r(15489);class u extends l.default.Component{constructor(e){super(e),this.state={triggeredStatus:void 0,previousPathname:e.pathname}}componentDidCatch(){}static getDerivedStateFromError(e){if((0,s.isHTTPAccessFallbackError)(e))return{triggeredStatus:(0,s.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:l}=this.state,o={[s.HTTPAccessErrorStatus.NOT_FOUND]:e,[s.HTTPAccessErrorStatus.FORBIDDEN]:t,[s.HTTPAccessErrorStatus.UNAUTHORIZED]:r};if(l){let i=l===s.HTTPAccessErrorStatus.NOT_FOUND&&e,u=l===s.HTTPAccessErrorStatus.FORBIDDEN&&t,c=l===s.HTTPAccessErrorStatus.UNAUTHORIZED&&r;return i||u||c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("meta",{name:"robots",content:"noindex"}),!1,o[l]]}):n}return n}}function c({notFound:e,forbidden:t,unauthorized:r,children:n}){let s=(0,o.useUntrackedPathname)(),d=(0,l.useContext)(i.MissingSlotContext);return e||t||r?(0,a.jsx)(u,{pathname:s,notFound:e,forbidden:t,unauthorized:r,missingSlots:d,children:n}):(0,a.jsx)(a.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)},64607,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return l},PlaceValidationBoundaryBelowThisLevel:function(){return o},RenderValidationBoundaryAtThisLevel:function(){return s},SlotMarker:function(){return i}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let l=null,o=null,s=null,i=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)},65838,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return l.InstantValidationBoundaryContext},PlaceValidationBoundaryBelowThisLevel:function(){return l.PlaceValidationBoundaryBelowThisLevel},RenderValidationBoundaryAtThisLevel:function(){return l.RenderValidationBoundaryAtThisLevel},SlotMarker:function(){return l.SlotMarker}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let l=e.r(64607);("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)},32428,(e,t,r)=>{"use strict";e.i(29694),Object.defineProperty(r,"__esModule",{value:!0});var n={LoadingBoundaryProvider:function(){return k},default:function(){return w}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let l=e.r(36437),o=e.r(56421),s=e.r(61666),i=o._(e.r(83067)),u=l._(e.r(65296)),c=e.r(15489),d=e.r(5231),f=e.r(62395),p=e.r(96714),h=e.r(28657),m=e.r(50411);e.r(65838);let y=e.r(18795),x=e.r(13199);e.r(78079);let b=e.r(22012),g=e.r(8856),v=e.r(71009);u.default.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function j(e,t,r){let n=e.getClientRects();if(0===n.length)return 0;let a=1/0;for(let e=0;e<n.length;e++){let t=n[e];t.top<a&&(a=t.top)}return a>=r()&&a<=t?1:2}i.default.Component;let P=function(e){let t=i.default.useRef(null);return(0,i.useLayoutEffect)(()=>{let{focusAndScrollRef:r,cacheNode:n}=e,a=r.forceScroll?r.scrollRef:n.scrollRef;if(null===a||!a.current)return;let l=null,o=r.hashFragment;if(o){var s;if(null===(l="top"===(s=o)?document.body:document.getElementById(s)??document.getElementsByName(s)[0]??null)){a.current=!1,r.onlyHashChange=!1,r.hashFragment=null;return}}else l=t.current;if(null===l)return;let i=!1;(0,p.disableSmoothScrollDuringRouteTransition)(()=>{let e=document.documentElement,t=null,r=null,n=null,s=()=>{var r,a;let l,o;return null===n&&(r=e,a=t,n=!Number.isFinite(o=Number.parseFloat(l=getComputedStyle(r).scrollPaddingTop))||o<0?0:l.endsWith("px")?o:l.endsWith("%")?o/100*a:0),n};(o||(t=e.clientHeight,0!==(r=j(l,t,s))))&&((i=!0,a.current=!1,o)?l.scrollIntoView():1!==r&&(e.scrollTop=0,2===j(l,t,s)&&l.scrollIntoView()))},{dontForceLayout:!0,onlyHashChange:r.onlyHashChange}),i&&(r.onlyHashChange=!1,r.hashFragment=null)},void 0),(0,s.jsx)(i.Fragment,{ref:t,children:e.children})};function _({children:e,cacheNode:t}){let r=(0,i.useContext)(c.GlobalLayoutRouterContext);if(!r)throw Object.defineProperty(Error("invariant global layout router not mounted"),"__NEXT_ERROR_CODE",{value:"E473",enumerable:!1,configurable:!0});return(0,s.jsx)(P,{focusAndScrollRef:r.focusAndScrollRef,cacheNode:t,children:e})}function C({tree:e,segmentPath:t,debugNameContext:r,cacheNode:n,params:a,url:l,isActive:o}){let u,f=(0,i.useContext)(c.GlobalLayoutRouterContext);if((0,i.useContext)(b.NavigationPromisesContext),!f)throw Object.defineProperty(Error("invariant global layout router not mounted"),"__NEXT_ERROR_CODE",{value:"E473",enumerable:!1,configurable:!0});let p=null!==n?n:(0,i.use)(d.unresolvedThenable),h=null!==p.prefetchRsc?p.prefetchRsc:p.rsc,m=(0,i.useDeferredValue)(p.rsc,h);if((0,v.isDeferredRsc)(m)){let e=(0,i.use)(m);null===e&&(0,i.use)(d.unresolvedThenable),u=e}else null===m&&(0,i.use)(d.unresolvedThenable),u=m;let y=u;return(0,s.jsx)(c.LayoutRouterContext.Provider,{value:{parentTree:e,parentCacheNode:p,parentSegmentPath:t,parentParams:a,parentLoadingData:null,debugNameContext:r,url:l,isActive:o},children:y})}function k({loading:e,children:t}){let r=(0,i.use)(c.LayoutRouterContext);return null===r?t:(0,s.jsx)(c.LayoutRouterContext.Provider,{value:{parentTree:r.parentTree,parentCacheNode:r.parentCacheNode,parentSegmentPath:r.parentSegmentPath,parentParams:r.parentParams,parentLoadingData:e,debugNameContext:r.debugNameContext,url:r.url,isActive:r.isActive},children:t})}function S({name:e,loading:t,children:r}){if(null!==t){let n=t[0],a=t[1],l=t[2];return(0,s.jsx)(i.Suspense,{name:e,fallback:(0,s.jsxs)(s.Fragment,{children:[a,l,n]}),children:r})}return(0,s.jsx)(s.Fragment,{children:r})}function w({parallelRouterKey:e,error:t,errorStyles:r,errorScripts:n,templateStyles:a,templateScripts:l,template:o,notFound:u,forbidden:p,unauthorized:b,segmentViewBoundaries:v}){let j=(0,i.useContext)(c.LayoutRouterContext);if(!j)throw Object.defineProperty(Error("invariant expected layout router to be mounted"),"__NEXT_ERROR_CODE",{value:"E56",enumerable:!1,configurable:!0});let{parentTree:P,parentCacheNode:k,parentSegmentPath:O,parentParams:N,parentLoadingData:T,url:M,isActive:E,debugNameContext:R}=j,A=P[0],F=null===O?[e]:O.concat([A,e]),I=P[1][e],L=k.slots;(void 0===I||null===L)&&(0,i.use)(d.unresolvedThenable);let D=I[0],B=L[e]??null,$=(0,y.createRouterCacheKey)(D,!0),U=(0,x.useRouterBFCache)(I,B,$),H=[];do{let e=U.tree,i=U.cacheNode,d=U.stateKey,y=e[0],x=N;if(Array.isArray(y)){let e=y[0],t=y[1],r=y[2],n=(0,g.getParamValueFromCacheKey)(t,r);null!==n&&(x={...N,[e]:n})}let v=function(e){if("/"===e)return"/";if("string"==typeof e)if("(__SLOT__)"===e)return;else return e+"/";return e[1]+"/"}(y),j=v??R,P=void 0===v?void 0:R,k=(0,s.jsxs)(_,{cacheNode:i,children:[(0,s.jsx)(f.ErrorBoundary,{errorComponent:t,errorStyles:r,errorScripts:n,children:(0,s.jsx)(S,{name:P,loading:T,children:(0,s.jsx)(m.HTTPAccessFallbackBoundary,{notFound:u,forbidden:p,unauthorized:b,children:(0,s.jsxs)(h.RedirectBoundary,{children:[(0,s.jsx)(C,{url:M,tree:e,params:x,cacheNode:i,segmentPath:F,debugNameContext:j,isActive:E&&d===$}),null]})})})}),null]}),w=(0,s.jsxs)(c.TemplateContext.Provider,{value:k,children:[a,l,o]},d);H.push(w),U=U.next}while(null!==U)return H}("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)},48549,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s}});let n=e.r(56421),a=e.r(61666),l=n._(e.r(83067)),o=e.r(15489);function s(){let e=(0,l.useContext)(o.TemplateContext);return(0,a.jsx)(a.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)},51588,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return a}});let n=new WeakMap;function a(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return 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)},50937,(e,t,r)=>{"use strict";e.i(29694),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(51588).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)},85434,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return a}});let n=new WeakMap;function a(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return 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)},94448,(e,t,r)=>{"use strict";e.i(29694),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(85434).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)},23898,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={createClientParams:function(){return l.createRenderParamsFromClient},createClientSearchParams:function(){return o.createRenderSearchParamsFromClient}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let l=e.r(50937),o=e.r(94448);("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)},25977,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(83067);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=l(e,n)),t&&(a.current=l(t,n))},[e,t])}function l(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(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)},67670,(e,t,r)=>{"use strict";e.i(29694),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return x},MiddlewareNotFoundError:function(){return j},MissingStaticPage:function(){return v},NormalizeError:function(){return b},PageNotFoundError:function(){return g},SP:function(){return m},ST:function(){return y},WEB_VITALS:function(){return l},execOnce:function(){return o},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return i},isResSent:function(){return f},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return P}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let l=["CLS","FCP","FID","INP","LCP","TTFB"];function o(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,i=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&s.test(e)};function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();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 p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,y=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class x extends Error{}class b extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class v 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 P(e){return JSON.stringify({message:e.message,stack:e.stack})}},22930,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"IconMark",{enumerable:!0,get:function(){return a}});let n=e.r(61666),a=()=>"u">typeof window?null:(0,n.jsx)("meta",{name:"«nxt-icon»"})},96714,(e,t,r)=>{"use strict";function n(e,t={}){if(t.onlyHashChange)return void e();let r=document.documentElement;if("smooth"!==r.dataset.scrollBehavior)return void e();let a=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=a}e.i(29694),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"disableSmoothScrollDuringRouteTransition",{enumerable:!0,get:function(){return n}})},43102,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return l}});let n=e.r(67670),a=e.r(97895);function l(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},32792,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return i},searchParamsToUrlQuery:function(){return l},urlQueryToSearchParams:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});function l(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function o(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,o(e));else t.set(r,o(n));return t}function i(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},67478,(e,t,r)=>{"use strict";e.i(29694),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return i}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let l=e.r(56421)._(e.r(32792)),o=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",s=e.hash||"",i=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),i&&"object"==typeof i&&(i=String(l.urlQueryToSearchParams(i)));let c=e.search||i&&`?${i}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${s}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}}]);
|