@ai-development-environment/server 0.0.31 → 0.0.32
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/package.json +1 -1
- package/standalone/.next/BUILD_ID +1 -1
- package/standalone/.next/build-manifest.json +3 -3
- package/standalone/.next/prerender-manifest.json +3 -3
- package/standalone/.next/server/app/[locale]/actions/page.js +2 -1
- package/standalone/.next/server/app/[locale]/actions/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/agents/[id]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/agents/[id]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/agents/page.js +2 -1
- package/standalone/.next/server/app/[locale]/agents/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/build-data/page.js +2 -1
- package/standalone/.next/server/app/[locale]/build-data/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page.js +2 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/builds/page.js +2 -1
- package/standalone/.next/server/app/[locale]/builds/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/codebases/page.js +2 -1
- package/standalone/.next/server/app/[locale]/codebases/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/codebases/repositories/[repositoryId]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/codebases/repositories/[repositoryId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/comments/page.js +2 -1
- package/standalone/.next/server/app/[locale]/comments/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/jira/cache/page.js +2 -1
- package/standalone/.next/server/app/[locale]/jira/cache/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/jira/cache/tickets/[issueKey]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/jira/cache/tickets/[issueKey]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/page.js +2 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/jobs/[jobId]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/jobs/[jobId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/pull-requests/page.js +2 -1
- package/standalone/.next/server/app/[locale]/pull-requests/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/settings/page.js +2 -1
- package/standalone/.next/server/app/[locale]/settings/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/skills/[skillId]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/skills/[skillId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/skills/groups/[groupId]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/skills/groups/[groupId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/skills/groups/page.js +2 -1
- package/standalone/.next/server/app/[locale]/skills/groups/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/skills/page.js +2 -1
- package/standalone/.next/server/app/[locale]/skills/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/skills/sync/[runId]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/skills/sync/[runId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/tools/page.js +2 -1
- package/standalone/.next/server/app/[locale]/tools/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/usage/page.js +2 -1
- package/standalone/.next/server/app/[locale]/usage/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page.js +2 -1
- package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/worktrees/page.js +2 -1
- package/standalone/.next/server/app/[locale]/worktrees/page.js.nft.json +1 -1
- package/standalone/.next/server/app/_global-error.html +1 -1
- package/standalone/.next/server/app/_global-error.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.html +1 -1
- package/standalone/.next/server/app/_not-found.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/chunks/[root-of-the-server]__08mnmfs._.js +1 -1
- package/standalone/.next/server/chunks/[root-of-the-server]__1ix62p0._.js +1 -1
- package/standalone/.next/server/chunks/[root-of-the-server]__1j-hk6b._.js +1 -1
- package/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0eghv0a.js +1 -1
- package/standalone/.next/server/chunks/ssr/[root-of-the-server]__1potsqg._.js +1 -1
- package/standalone/.next/server/chunks/ssr/node_modules_0obs0k7._.js +5 -0
- package/standalone/.next/server/chunks/ssr/node_modules_next_1ep9xf4._.js +3 -0
- package/standalone/.next/server/chunks/ssr/src_components_builds_build-detail-page_tsx_0q1lvps._.js +5 -5
- package/standalone/.next/server/functions-config-manifest.json +1 -1
- package/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/standalone/.next/server/pages/404.html +1 -1
- package/standalone/.next/server/pages/500.html +1 -1
- package/standalone/.next/server/server-reference-manifest.js +1 -1
- package/standalone/.next/server/server-reference-manifest.json +1 -1
- package/standalone/.next/static/chunks/{0hwbkceik59kx.js → 17t4ft9o1tqw3.js} +7 -7
- package/standalone/src/services/builds/artifact-cache.test.ts +31 -1
- package/standalone/src/services/builds/artifact-cache.ts +41 -4
- package/standalone/.next/server/chunks/ssr/node_modules_1n5939e._.js +0 -5
- /package/standalone/.next/static/{sJ09NBDjsLncJEkHNWbdR → qUqJkVkzos1XoXFl7PSxx}/_buildManifest.js +0 -0
- /package/standalone/.next/static/{sJ09NBDjsLncJEkHNWbdR → qUqJkVkzos1XoXFl7PSxx}/_clientMiddlewareManifest.js +0 -0
- /package/standalone/.next/static/{sJ09NBDjsLncJEkHNWbdR → qUqJkVkzos1XoXFl7PSxx}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,885325,e=>{"use strict";var t=e.i(843476),s=e.i(876561),i=e.i(711241),a=e.i(131460),n=e.i(456420);let l=(0,n.default)("arrow-up-to-line",[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]]);var r=e.i(689664),d=e.i(508734),o=e.i(762368);let c=(0,n.default)("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]),u=(0,n.default)("chart-no-axes-column",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]]);var m=e.i(716327),x=e.i(867927),p=e.i(929272),h=e.i(573474),g=e.i(861745),f=e.i(948148),j=e.i(271645),v=e.i(340953),b=e.i(929592),y=e.i(487486),S=e.i(519455),N=e.i(515288),C=e.i(82612),T=e.i(987968),w=e.i(677572),A=e.i(784774),I=e.i(520133),E=e.i(462777),k=e.i(637611),P=e.i(90969);let R=["DEBUGGING","RELEASE_TESTING","ENTERPRISE","APP_STORE_CONNECT"],B={DEBUGGING:"DEVELOPMENT",RELEASE_TESTING:"AD_HOC",ENTERPRISE:"ENTERPRISE",APP_STORE_CONNECT:"APP_STORE"};function D(e,t){return"*"===e||(e.endsWith(".*")?t.startsWith(e.slice(0,-1)):e===t)}var L=e.i(776639),O=e.i(110204)
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,885325,e=>{"use strict";var t=e.i(843476),s=e.i(876561),i=e.i(711241),a=e.i(131460),n=e.i(456420);let l=(0,n.default)("arrow-up-to-line",[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]]);var r=e.i(689664),d=e.i(508734),o=e.i(762368);let c=(0,n.default)("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]),u=(0,n.default)("chart-no-axes-column",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]]);var m=e.i(716327),x=e.i(867927),p=e.i(929272),h=e.i(573474),g=e.i(861745),f=e.i(948148),j=e.i(271645),v=e.i(340953),b=e.i(929592),y=e.i(487486),S=e.i(519455),N=e.i(515288),C=e.i(82612),T=e.i(987968),w=e.i(677572),A=e.i(784774),I=e.i(520133),E=e.i(462777),k=e.i(637611),P=e.i(90969);let R=["DEBUGGING","RELEASE_TESTING","ENTERPRISE","APP_STORE_CONNECT"],B={DEBUGGING:"DEVELOPMENT",RELEASE_TESTING:"AD_HOC",ENTERPRISE:"ENTERPRISE",APP_STORE_CONNECT:"APP_STORE"};function D(e,t){return"*"===e||(e.endsWith(".*")?t.startsWith(e.slice(0,-1)):e===t)}var L=e.i(776639),O=e.i(110204),$=e.i(967489);let U=`query BuildSigningOptions($buildId: ID!) {
|
|
2
2
|
buildSigningOptions(buildId: $buildId) {
|
|
3
3
|
teams { id name }
|
|
4
4
|
identities { sha1 name teamId }
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
}
|
|
9
9
|
bundles { bundleId name relativePath embeddedProfileUuid embeddedProfileName }
|
|
10
10
|
}
|
|
11
|
-
}`;function F(e,t,s,i){let a=B[s];return e.filter(e=>e.type===a&&!e.expired&&(0===e.platforms.length||e.platforms.includes("iOS"))&&D(e.bundleId,t)&&(!i||!e.teamId||e.teamId===i))}function M({buildId:e,open:s,onOpenChange:i,onSaved:a}){let n=(0,f.useTranslations)("builds"),[l,r]=(0,j.useState)("DEBUGGING"),[d,o]=(0,j.useState)("AUTOMATIC"),[c,u]=(0,j.useState)(""),[m,x]=(0,j.useState)(""),[p,h]=(0,j.useState)({}),[g,v]=(0,j.useState)(!1),[y,N]=(0,j.useState)(null),[C,w]=(0,j.useState)(!1),[A,I]=(0,j.useState)(!1),[P,B]=(0,j.useState)(null),[_,V]=(0,j.useState)(null),G=(0,j.useCallback)(async()=>{w(!0),V(null);try{let t=await (0,k.controlPlaneRequest)(
|
|
11
|
+
}`;function F(e,t,s,i){let a=B[s];return e.filter(e=>e.type===a&&!e.expired&&(0===e.platforms.length||e.platforms.includes("iOS"))&&D(e.bundleId,t)&&(!i||!e.teamId||e.teamId===i))}function M({buildId:e,open:s,onOpenChange:i,onSaved:a}){let n=(0,f.useTranslations)("builds"),[l,r]=(0,j.useState)("DEBUGGING"),[d,o]=(0,j.useState)("AUTOMATIC"),[c,u]=(0,j.useState)(""),[m,x]=(0,j.useState)(""),[p,h]=(0,j.useState)({}),[g,v]=(0,j.useState)(!1),[y,N]=(0,j.useState)(null),[C,w]=(0,j.useState)(!1),[A,I]=(0,j.useState)(!1),[P,B]=(0,j.useState)(null),[_,V]=(0,j.useState)(null),G=(0,j.useCallback)(async()=>{w(!0),V(null);try{let t=await (0,k.controlPlaneRequest)(U,{buildId:e});N(t.buildSigningOptions);let s=t.buildSigningOptions.bundles.map(e=>t.buildSigningOptions.profiles.find(t=>t.uuid===e.embeddedProfileUuid)).find(e=>e?.teamId);s?.teamId?u(s.teamId):1===t.buildSigningOptions.teams.length&&u(t.buildSigningOptions.teams[0].id)}catch(e){V(e instanceof Error?e.message:String(e))}finally{w(!1)}},[e]);(0,j.useEffect)(()=>{if(!s)return;let e=window.setTimeout(()=>void G(),0);return()=>window.clearTimeout(e)},[s,G]);let q=`${l}:${c}`,[z,H]=(0,j.useState)(q);q!==z&&(H(q),h({}),x(""));let W="MANUAL"===d,J=Object.fromEntries((y?.bundles??[]).flatMap(e=>{let t=F(y?.profiles??[],e.bundleId,l,c),s=p[e.bundleId]??function(e,t){if(!e.length)return null;let s=e.find(e=>e.uuid===t.embeddedProfileUuid);return s||[...e].sort((e,t)=>(t.expiresAt??"").localeCompare(e.expiresAt??""))[0]}(t,e)?.uuid;return s?[[e.bundleId,s]]:[]})),Q=Object.values(J).flatMap(e=>{let t=y?.profiles.find(t=>t.uuid===e);return t?[t]:[]}),K=Q.length>0&&Q.every(e=>e.certificateSha1s?.length),X=(y?.identities??[]).filter(e=>K?Q.every(t=>t.certificateSha1s.includes(e.sha1.toUpperCase())):!c||!e.teamId||e.teamId===c),Y=X.some(e=>e.sha1===m)?m:"",Z=async()=>{I(!0);try{await (0,k.controlPlaneRequest)(`mutation ExportArchive($input: ExportBuildArchiveInput!) {
|
|
12
12
|
exportBuildArchive(input: $input) { id status }
|
|
13
|
-
}`,{input:{buildId:e,requestId:(0,E.createClientId)(),settings:{method:l,signingStyle:d,teamId:c||null,signingCertificate:Y?X.find(e=>e.sha1===Y)?.name??null:null,provisioningProfiles:W?J:{},uploadSymbols:!0,manageAppVersionAndBuildNumber:!0,testFlightInternalTestingOnly:!1}}}),await a(),i(!1)}catch(e){B(e instanceof Error?e.message:String(e))}finally{I(!1)}},ee=W&&(y?.bundles??[]).some(e=>!J[e.bundleId]);return(0,t.jsx)(L.Dialog,{onOpenChange:i,open:s,children:(0,t.jsxs)(L.DialogContent,{className:"max-h-[85vh] grid-cols-[minmax(0,1fr)] overflow-y-auto sm:max-w-2xl",children:[(0,t.jsxs)(L.DialogHeader,{children:[(0,t.jsx)(L.DialogTitle,{children:n("exportArchive")}),(0,t.jsx)(L.DialogDescription,{children:n("exportArchiveDescription")})]}),P&&(0,t.jsx)(b.Alert,{variant:"destructive",children:(0,t.jsx)(b.AlertDescription,{children:P})}),_&&(0,t.jsx)(b.Alert,{variant:"destructive",children:(0,t.jsxs)(b.AlertDescription,{children:[n("signingOptionsFailed")," ",_]})}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(O.Label,{children:n("distributionMethod")}),(0,t.jsxs)(
|
|
13
|
+
}`,{input:{buildId:e,requestId:(0,E.createClientId)(),settings:{method:l,signingStyle:d,teamId:c||null,signingCertificate:Y?X.find(e=>e.sha1===Y)?.name??null:null,provisioningProfiles:W?J:{},uploadSymbols:!0,manageAppVersionAndBuildNumber:!0,testFlightInternalTestingOnly:!1}}}),await a(),i(!1)}catch(e){B(e instanceof Error?e.message:String(e))}finally{I(!1)}},ee=W&&(y?.bundles??[]).some(e=>!J[e.bundleId]);return(0,t.jsx)(L.Dialog,{onOpenChange:i,open:s,children:(0,t.jsxs)(L.DialogContent,{className:"max-h-[85vh] grid-cols-[minmax(0,1fr)] overflow-y-auto sm:max-w-2xl",children:[(0,t.jsxs)(L.DialogHeader,{children:[(0,t.jsx)(L.DialogTitle,{children:n("exportArchive")}),(0,t.jsx)(L.DialogDescription,{children:n("exportArchiveDescription")})]}),P&&(0,t.jsx)(b.Alert,{variant:"destructive",children:(0,t.jsx)(b.AlertDescription,{children:P})}),_&&(0,t.jsx)(b.Alert,{variant:"destructive",children:(0,t.jsxs)(b.AlertDescription,{children:[n("signingOptionsFailed")," ",_]})}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(O.Label,{children:n("distributionMethod")}),(0,t.jsxs)($.Select,{onValueChange:e=>r(e),value:l,children:[(0,t.jsx)($.SelectTrigger,{className:"w-full min-w-0",children:(0,t.jsx)($.SelectValue,{})}),(0,t.jsx)($.SelectContent,{children:R.map(e=>(0,t.jsx)($.SelectItem,{value:e,children:n(`exportMethod.${e}`)},e))})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(O.Label,{children:n("developmentTeam")}),(0,t.jsxs)($.Select,{disabled:C||!y?.teams.length,onValueChange:u,value:c,children:[(0,t.jsx)($.SelectTrigger,{className:"w-full min-w-0",children:C?(0,t.jsx)(T.Spinner,{}):(0,t.jsx)($.SelectValue,{placeholder:n("selectTeam")})}),(0,t.jsx)($.SelectContent,{children:(y?.teams??[]).map(e=>(0,t.jsxs)($.SelectItem,{value:e.id,children:[e.name," (",e.id,")"]},e.id))})]}),!C&&y&&!y.teams.length&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:n("noTeams")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(O.Label,{children:n("signingStyle")}),(0,t.jsxs)($.Select,{onValueChange:o,value:d,children:[(0,t.jsx)($.SelectTrigger,{className:"w-full min-w-0",children:(0,t.jsx)($.SelectValue,{})}),(0,t.jsxs)($.SelectContent,{children:[(0,t.jsx)($.SelectItem,{value:"AUTOMATIC",children:n("automatic")}),(0,t.jsx)($.SelectItem,{value:"MANUAL",children:n("manual")})]})]})]}),W&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(O.Label,{children:n("signingCertificate")}),(0,t.jsxs)($.Select,{disabled:C||!X.length,onValueChange:x,value:Y,children:[(0,t.jsx)($.SelectTrigger,{className:"w-full min-w-0",children:(0,t.jsx)($.SelectValue,{placeholder:n("certificateAutomatic")})}),(0,t.jsx)($.SelectContent,{children:X.map(e=>(0,t.jsx)($.SelectItem,{value:e.sha1,children:e.name},e.sha1))})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)(O.Label,{children:n("provisioningProfiles")}),(0,t.jsx)(S.Button,{onClick:()=>v(e=>!e),size:"sm",type:"button",variant:"ghost",children:g?n("showMatching"):n("showAllProfiles")})]}),C&&(0,t.jsx)(T.Spinner,{}),!C&&!y?.bundles.length&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:n("noArchiveBundles")}),(y?.bundles??[]).map(e=>{let s=F(y?.profiles??[],e.bundleId,l,c),i=g?(y?.profiles??[]).filter(t=>D(t.bundleId,e.bundleId)):s;return(0,t.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,t.jsx)("p",{className:"mb-2 break-all font-mono text-xs text-muted-foreground",children:e.bundleId}),(0,t.jsxs)($.Select,{onValueChange:t=>h(s=>({...s,[e.bundleId]:t})),value:J[e.bundleId]??"",children:[(0,t.jsx)($.SelectTrigger,{className:"w-full min-w-0",children:(0,t.jsx)($.SelectValue,{placeholder:n("selectProfile")})}),(0,t.jsx)($.SelectContent,{children:i.map(e=>{let s;return(0,t.jsxs)($.SelectItem,{value:e.uuid,children:[(s=e.expiresAt?new Date(e.expiresAt).toLocaleDateString():null)?`${e.name} — ${s}`:e.name,e.expired?` (${n("profileExpired")})`:""]},e.uuid)})})]}),!s.length&&(0,t.jsx)("p",{className:"mt-1 text-xs text-destructive",children:n("noMatchingProfiles")})]},e.bundleId)})]})]})]}),(0,t.jsxs)(L.DialogFooter,{children:[(0,t.jsx)(S.Button,{onClick:()=>i(!1),variant:"outline",children:n("cancel")}),(0,t.jsxs)(S.Button,{disabled:A||ee,onClick:()=>void Z(),children:[A&&(0,t.jsx)(T.Spinner,{})," ",n("exportArchive")]})]})]})})}let _=(0,n.default)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);var V=e.i(986206);let G=null;function q(){return G??={origin:window.location.origin,secure:"https:"===window.location.protocol,apple:/iPad|iPhone|iPod/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&(navigator.maxTouchPoints??0)>1}}let z=()=>()=>{};function H({buildId:e,artifactId:s,metadata:i,publicOrigin:a}){let n=(0,f.useTranslations)("builds"),l=(0,j.useSyncExternalStore)(z,q,()=>null),[r,d]=(0,j.useState)(!1),[o,c]=(0,j.useState)(!1),u=`/api/builds/${encodeURIComponent(e)}/artifacts/${encodeURIComponent(s)}`,m=a??l,x=m?`${m.origin}${u}/manifest.plist`:null,p=l?m?.secure?"APP_STORE_CONNECT"===i.exportMethod?n("installNotSupportedForAppStore"):"string"!=typeof i.bundleIdentifier?n("installMissingBundleIdentifier"):null:n("installRequiresHttps"):null,h=!l||!l.apple||null!==p||r,g=async()=>{if(x){d(!0);try{await fetch(u,{method:"HEAD"}).catch(()=>{}),window.location.href=`itms-services://?action=download-manifest&url=${encodeURIComponent(x)}`}finally{d(!1)}}},v=async()=>{let e=m?.origin??window.location.origin;await (0,E.copyText)(`${e}${window.location.pathname}${window.location.search}${window.location.hash}`),c(!0),setTimeout(()=>c(!1),2e3)};return(0,t.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[l&&!l.apple&&!p&&(0,t.jsxs)(S.Button,{onClick:()=>void v(),size:"sm",type:"button",variant:"ghost",children:[(0,t.jsx)(_,{})," ",n(o?"installLinkCopied":"copyInstallLink")]}),(0,t.jsxs)(S.Button,{disabled:h,onClick:()=>void g(),size:"sm",type:"button",variant:"outline",children:[r?(0,t.jsx)(T.Spinner,{}):(0,t.jsx)(V.Smartphone,{}),n(r?"installPreparing":"installOnDevice")]})]}),p&&(0,t.jsx)("p",{className:"text-right text-xs text-muted-foreground",children:p}),!p&&l&&!l.apple&&(0,t.jsx)("p",{className:"text-right text-xs text-muted-foreground",children:n("installOpenOnDevice")})]})}var W=e.i(771777),J=e.i(866026);let Q=`
|
|
14
14
|
id requestId jobId status action destinationType destination snapshot commandSummary artifactDirectory errorCode error outOfDate
|
|
15
15
|
createdAt startedAt finishedAt durationMs updatedAt
|
|
16
16
|
configuration {
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
scriptExecutions { id phase position nameSnapshot status exitCode durationMs causedBuildFailure outputRelativePath error }
|
|
26
26
|
deployments { id batchId destination status commandSummary outputRelativePath error createdAt startedAt finishedAt }
|
|
27
27
|
exports { id status settings commandSummary outputRelativePath error createdAt startedAt finishedAt }
|
|
28
|
-
`,K="id scope scopeId sequence phase level stream message createdAt",X=new Set(["IPA"]);function Y(e){return e.split("_").filter(Boolean).map(e=>X.has(e)?e:`${e.charAt(0).toLocaleUpperCase()}${e.slice(1).toLocaleLowerCase()}`).join(" ")}let Z=["packageResolution","disablePackageRepositoryCache","signingStyle","developmentTeam","codeSignIdentity","provisioningProfileSpecifier","productBundleIdentifier","allowProvisioningUpdates","allowProvisioningDeviceRegistration","testPlan","codeCoverage","parseTestResults","parallelTesting","parallelTestingWorkers","onlyTesting","skipTesting","buildSettingOverrides","priorBuildForTestingId","priorTestProductsPath","priorXctestrunPath"],ee={packageResolution:"DEFAULT",disablePackageRepositoryCache:!1,signingStyle:"PROJECT_DEFAULT",developmentTeam:null,codeSignIdentity:null,provisioningProfileSpecifier:null,productBundleIdentifier:null,allowProvisioningUpdates:!1,allowProvisioningDeviceRegistration:!1,testPlan:null,codeCoverage:!1,parseTestResults:!0,parallelTesting:null,parallelTestingWorkers:null,onlyTesting:[],skipTesting:[],buildSettingOverrides:{},priorBuildForTestingId:null,priorTestProductsPath:null,priorXctestrunPath:null};function et({settings:e}){let s=(0,f.useTranslations)("builds"),i={packageResolution:s("packageResolution"),disablePackageRepositoryCache:s("disablePackageRepositoryCache"),signingStyle:s("signingStyle"),developmentTeam:s("developmentTeam"),codeSignIdentity:s("codeSignIdentity"),provisioningProfileSpecifier:s("provisioningProfileSpecifier"),productBundleIdentifier:s("productBundleIdentifier"),allowProvisioningUpdates:s("allowProvisioningUpdates"),allowProvisioningDeviceRegistration:s("allowProvisioningDeviceRegistration"),testPlan:s("testPlan"),codeCoverage:s("codeCoverage"),parseTestResults:s("parseTestResults"),parallelTesting:s("parallelTesting"),parallelTestingWorkers:s("parallelTestingWorkers"),onlyTesting:s("onlyTesting"),skipTesting:s("skipTesting"),buildSettingOverrides:s("buildSettingOverrides"),priorBuildForTestingId:s("priorBuildForTesting"),priorTestProductsPath:s("priorTestProductsPath"),priorXctestrunPath:s("priorXctestrunPath")},a=new Set(Z),n=e?[...Z.filter(t=>Object.hasOwn(e,t)),...Object.keys(e).filter(e=>!a.has(e)).sort()].filter(t=>{var s;return s=e[t],Object.hasOwn(ee,t)?JSON.stringify(s)!==JSON.stringify(ee[t]):null!=s&&""!==s&&!1!==s&&(Array.isArray(s)?s.length>0:"object"!=typeof s||Object.keys(s).length>0)}):[];return e&&n.length?(0,t.jsxs)(N.Card,{children:[(0,t.jsx)(N.CardHeader,{children:(0,t.jsx)(N.CardTitle,{children:s("advancedSettings")})}),(0,t.jsx)(N.CardContent,{children:(0,t.jsx)("dl",{className:"space-y-3 text-sm",children:n.map(s=>(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs text-muted-foreground",children:i[s]??Y(s.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replaceAll("-","_"))}),(0,t.jsx)("dd",{className:"mt-0.5 min-w-0",children:(0,t.jsx)(es,{value:e[s]})})]},s))})})]}):null}function es({value:e}){let s=(0,f.useTranslations)("builds");if("boolean"==typeof e)return(0,t.jsx)(y.Badge,{variant:e?"default":"secondary",children:s(e?"settingsEnabled":"settingsDisabled")});if(null==e||""===e)return(0,t.jsx)(t.Fragment,{children:"—"});if(Array.isArray(e))return e.length?(0,t.jsx)("span",{className:"break-words font-mono text-xs",children:e.map(String).join(", ")}):(0,t.jsx)(t.Fragment,{children:"—"});if("object"==typeof e){let s=JSON.stringify(e);return s&&"{}"!==s?(0,t.jsx)("span",{className:"break-all font-mono text-xs",children:s}):(0,t.jsx)(t.Fragment,{children:"—"})}return"string"==typeof e&&/^[A-Z][A-Z0-9_]*$/.test(e)?(0,t.jsx)(t.Fragment,{children:Y(e)}):(0,t.jsx)("span",{className:"break-words font-mono text-xs",children:String(e)})}function ei(e){return"string"==typeof e&&e.trim()?e:null}function ea(e,t){return"ALL"===t||String(e.result??"unknown").toLocaleUpperCase()===t}function en({report:e}){let s=(0,f.useTranslations)("builds"),[i,a]=(0,j.useState)("ALL"),n=Array.isArray(e.data.tests)?e.data.tests:[],l=Array.isArray(e.data.devices)?e.data.devices:[],r=t=>"number"==typeof e.summary[t]?Number(e.summary[t]):0,d=(function(e){let t=new Map;for(let s of e){let e=ei(s.bundle),i=ei(s.suite),a=ei(s.plan),n=ei(s.configuration),l=i??e,r=JSON.stringify([a,n,e,l]),d=t.get(r)??{key:r,name:l,bundle:e,plan:a,configuration:n,tests:[]};d.tests.push(s),t.set(r,d)}return[...t.values()].sort((e,t)=>(e.name??"").localeCompare(t.name??"",void 0,{numeric:!0,sensitivity:"base"}))})(n).filter(e=>e.tests.some(e=>ea(e,i)));return(0,t.jsxs)(N.Card,{children:[(0,t.jsx)(N.CardHeader,{children:(0,t.jsx)(N.CardTitle,{children:s("testResults")})}),(0,t.jsx)(N.CardContent,{className:"space-y-4",children:"FAILED"===e.status?(0,t.jsx)(b.Alert,{variant:"destructive",children:(0,t.jsx)(b.AlertDescription,{children:e.error??s("testResultsFailed")})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(y.Badge,{variant:"outline",children:s("testTotal",{count:r("total")})}),(0,t.jsx)(y.Badge,{className:"bg-emerald-600 text-white dark:bg-emerald-700",children:s("testPassed",{count:r("passed")})}),(0,t.jsx)(y.Badge,{variant:r("failed")?"destructive":"outline",children:s("testFailed",{count:r("failed")})}),(0,t.jsx)(y.Badge,{className:"border-amber-500/40 bg-amber-500/10 text-amber-700 dark:text-amber-300",variant:"outline",children:s("testSkipped",{count:r("skipped")})}),l.map((e,s)=>(0,t.jsxs)(y.Badge,{variant:"outline",children:[String(e.deviceName??e.modelName??"Device")," ·"," ",String(e.osVersion??"—")]},s))]}),(0,t.jsx)("div",{className:"overflow-x-auto pb-1",children:(0,t.jsx)(w.Tabs,{onValueChange:e=>a(e),value:i,children:(0,t.jsxs)(w.TabsList,{"aria-label":s("testResultFilters"),children:[(0,t.jsx)(w.TabsTrigger,{value:"ALL",children:s("testFilterAll",{count:n.length})}),(0,t.jsx)(w.TabsTrigger,{value:"PASSED",children:s("testFilterPassed",{count:r("passed")})}),(0,t.jsx)(w.TabsTrigger,{value:"FAILED",children:s("testFilterFailed",{count:r("failed")})}),(0,t.jsx)(w.TabsTrigger,{value:"SKIPPED",children:s("testFilterSkipped",{count:r("skipped")})})]})})}),(0,t.jsx)("div",{className:"divide-y rounded-md border",children:d.map(e=>(0,t.jsx)(el,{filter:i,group:e},e.key))})]})})]})}function el({filter:e,group:s}){let i=(0,f.useTranslations)("builds"),a=(0,g.useLocale)(),[n,l]=(0,j.useState)(!1),r=s.name??i("testsWithoutSuite"),d=s.tests.filter(e=>"Passed"===e.result).length,o=s.tests.length?d/s.tests.length:0,c=new Intl.NumberFormat(a,{style:"percent",maximumFractionDigits:1}).format(o),u=s.tests.filter(t=>ea(t,e)),p=new Map;for(let e of u){let t=function(e){let t=ei(e.file);if(t)return t;let s=ei(e.suite);return s||(ei(e.identifier)?.split("/")[0]??null)}(e)??i("testsWithoutFile");p.set(t,[...p.get(t)??[],e])}let h=[s.bundle,s.configuration,s.plan].filter(Boolean).join(" · ");return(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{"aria-expanded":n,"aria-label":i(n?"collapseTestSuite":"expandTestSuite",{suite:r}),className:"flex min-h-8 w-full items-center gap-2 px-2 py-1.5 text-left hover:bg-muted/40",onClick:()=>l(e=>!e),type:"button",children:[n?(0,t.jsx)(m.ChevronDown,{className:"size-3.5 shrink-0"}):(0,t.jsx)(x.ChevronRight,{className:"size-3.5 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:r}),h&&(0,t.jsx)("span",{className:"hidden shrink-0 text-xs text-muted-foreground sm:inline",children:h}),(0,t.jsx)(y.Badge,{className:1===o?"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":o>=.5?"border-amber-500/40 bg-amber-500/10 text-amber-700 dark:text-amber-300":"",variant:o<.5?"destructive":"outline",children:i("testSuitePassed",{passed:d,total:s.tests.length,percent:c})})]}),n&&(0,t.jsx)("div",{className:"border-t bg-muted/10 p-2",children:(0,t.jsx)("div",{className:"divide-y rounded-md border bg-background",children:[...p.entries()].sort(([e],[t])=>e.localeCompare(t,a,{numeric:!0,sensitivity:"base"})).map(([e,s])=>(0,t.jsx)(er,{file:e,tests:s},e))})})]})}function er({file:e,tests:s}){let i=(0,f.useTranslations)("builds"),[a,n]=(0,j.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{"aria-expanded":a,"aria-label":i(a?"collapseTestFile":"expandTestFile",{file:e}),className:"flex min-h-8 w-full items-center gap-2 px-2 py-1.5 text-left hover:bg-muted/40",onClick:()=>n(e=>!e),type:"button",children:[a?(0,t.jsx)(m.ChevronDown,{className:"size-3.5 shrink-0"}):(0,t.jsx)(x.ChevronRight,{className:"size-3.5 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",title:e,children:e}),(0,t.jsx)(y.Badge,{variant:"outline",children:i("testTotal",{count:s.length})})]}),a&&(0,t.jsx)("div",{className:"border-t overflow-auto",children:(0,t.jsxs)(A.Table,{"aria-label":e,className:"min-w-[38rem] text-xs",children:[(0,t.jsx)(A.TableHeader,{children:(0,t.jsxs)(A.TableRow,{children:[(0,t.jsx)(A.TableHead,{className:"h-8 px-2",children:i("testStatus")}),(0,t.jsx)(A.TableHead,{className:"h-8 px-2",children:i("testName")}),(0,t.jsx)(A.TableHead,{className:"h-8 px-2 text-right",children:i("testDuration")})]})}),(0,t.jsx)(A.TableBody,{children:s.map((e,s)=>{let i=Array.isArray(e.details)?e.details.filter(e=>"string"==typeof e):[],a=Array.isArray(e.tags)?e.tags.filter(e=>"string"==typeof e):[],n=String(e.name??"—"),l=ei(e.identifier);return(0,t.jsxs)(A.TableRow,{children:[(0,t.jsx)(A.TableCell,{className:"px-2 py-1.5",children:(0,t.jsx)(ed,{result:String(e.result??"unknown")})}),(0,t.jsxs)(A.TableCell,{className:"max-w-xl px-2 py-1.5 whitespace-normal",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)("span",{className:"font-mono font-medium",children:n}),a.map(e=>(0,t.jsx)(y.Badge,{variant:"outline",children:e},e))]}),l&&l!==n&&(0,t.jsx)("p",{className:"truncate font-mono text-muted-foreground",title:l,children:l}),i.map((e,s)=>(0,t.jsx)("p",{className:"mt-1 text-destructive",children:e},s))]}),(0,t.jsx)(A.TableCell,{className:"px-2 py-1.5 text-right tabular-nums",children:"number"==typeof e.durationSeconds?`${e.durationSeconds.toFixed(3)}s`:"—"})]},`${l??n}:${s}`)})})]})})]})}function ed({result:e}){let s=e.toLocaleLowerCase();return(0,t.jsx)(y.Badge,{className:"passed"===s?"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":"skipped"===s?"border-amber-500/40 bg-amber-500/10 text-amber-700 dark:text-amber-300":"expected failure"===s?"border-violet-500/40 bg-violet-500/10 text-violet-700 dark:text-violet-300":"",variant:"failed"===s?"destructive":"outline",children:e})}function eo({label:e,value:s,mono:i=!1}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs text-muted-foreground",children:e}),(0,t.jsx)("dd",{className:i?"mt-0.5 break-all font-mono text-xs":"mt-0.5",children:s})]})}e.s(["BuildDetailPage",0,function({buildId:e}){let n=(0,f.useTranslations)("builds"),w=(0,g.useLocale)(),A=(0,I.useRouter)(),[R,B]=(0,j.useState)(null),[D,L]=(0,j.useState)([]),[O,U]=(0,j.useState)(!0),[$,F]=(0,j.useState)(null),[_,V]=(0,j.useState)(!1),[G,q]=(0,j.useState)(null),[z,X]=(0,j.useState)(!1),[Z,ee]=(0,j.useState)(!1),[es,ei]=(0,j.useState)(!1),[ea,el]=(0,j.useState)(!0),er=(0,j.useRef)(null),ed=(0,j.useCallback)(async()=>{try{let t=await (0,k.controlPlaneRequest)(`query BuildDetail($id: ID!) {
|
|
28
|
+
`,K="id scope scopeId sequence phase level stream message createdAt",X=new Set(["IPA"]);function Y(e){return e.split("_").filter(Boolean).map(e=>X.has(e)?e:`${e.charAt(0).toLocaleUpperCase()}${e.slice(1).toLocaleLowerCase()}`).join(" ")}let Z=["packageResolution","disablePackageRepositoryCache","signingStyle","developmentTeam","codeSignIdentity","provisioningProfileSpecifier","productBundleIdentifier","allowProvisioningUpdates","allowProvisioningDeviceRegistration","testPlan","codeCoverage","parseTestResults","parallelTesting","parallelTestingWorkers","onlyTesting","skipTesting","buildSettingOverrides","priorBuildForTestingId","priorTestProductsPath","priorXctestrunPath"],ee={packageResolution:"DEFAULT",disablePackageRepositoryCache:!1,signingStyle:"PROJECT_DEFAULT",developmentTeam:null,codeSignIdentity:null,provisioningProfileSpecifier:null,productBundleIdentifier:null,allowProvisioningUpdates:!1,allowProvisioningDeviceRegistration:!1,testPlan:null,codeCoverage:!1,parseTestResults:!0,parallelTesting:null,parallelTestingWorkers:null,onlyTesting:[],skipTesting:[],buildSettingOverrides:{},priorBuildForTestingId:null,priorTestProductsPath:null,priorXctestrunPath:null};function et({settings:e}){let s=(0,f.useTranslations)("builds"),i={packageResolution:s("packageResolution"),disablePackageRepositoryCache:s("disablePackageRepositoryCache"),signingStyle:s("signingStyle"),developmentTeam:s("developmentTeam"),codeSignIdentity:s("codeSignIdentity"),provisioningProfileSpecifier:s("provisioningProfileSpecifier"),productBundleIdentifier:s("productBundleIdentifier"),allowProvisioningUpdates:s("allowProvisioningUpdates"),allowProvisioningDeviceRegistration:s("allowProvisioningDeviceRegistration"),testPlan:s("testPlan"),codeCoverage:s("codeCoverage"),parseTestResults:s("parseTestResults"),parallelTesting:s("parallelTesting"),parallelTestingWorkers:s("parallelTestingWorkers"),onlyTesting:s("onlyTesting"),skipTesting:s("skipTesting"),buildSettingOverrides:s("buildSettingOverrides"),priorBuildForTestingId:s("priorBuildForTesting"),priorTestProductsPath:s("priorTestProductsPath"),priorXctestrunPath:s("priorXctestrunPath")},a=new Set(Z),n=e?[...Z.filter(t=>Object.hasOwn(e,t)),...Object.keys(e).filter(e=>!a.has(e)).sort()].filter(t=>{var s;return s=e[t],Object.hasOwn(ee,t)?JSON.stringify(s)!==JSON.stringify(ee[t]):null!=s&&""!==s&&!1!==s&&(Array.isArray(s)?s.length>0:"object"!=typeof s||Object.keys(s).length>0)}):[];return e&&n.length?(0,t.jsxs)(N.Card,{children:[(0,t.jsx)(N.CardHeader,{children:(0,t.jsx)(N.CardTitle,{children:s("advancedSettings")})}),(0,t.jsx)(N.CardContent,{children:(0,t.jsx)("dl",{className:"space-y-3 text-sm",children:n.map(s=>(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs text-muted-foreground",children:i[s]??Y(s.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replaceAll("-","_"))}),(0,t.jsx)("dd",{className:"mt-0.5 min-w-0",children:(0,t.jsx)(es,{value:e[s]})})]},s))})})]}):null}function es({value:e}){let s=(0,f.useTranslations)("builds");if("boolean"==typeof e)return(0,t.jsx)(y.Badge,{variant:e?"default":"secondary",children:s(e?"settingsEnabled":"settingsDisabled")});if(null==e||""===e)return(0,t.jsx)(t.Fragment,{children:"—"});if(Array.isArray(e))return e.length?(0,t.jsx)("span",{className:"break-words font-mono text-xs",children:e.map(String).join(", ")}):(0,t.jsx)(t.Fragment,{children:"—"});if("object"==typeof e){let s=JSON.stringify(e);return s&&"{}"!==s?(0,t.jsx)("span",{className:"break-all font-mono text-xs",children:s}):(0,t.jsx)(t.Fragment,{children:"—"})}return"string"==typeof e&&/^[A-Z][A-Z0-9_]*$/.test(e)?(0,t.jsx)(t.Fragment,{children:Y(e)}):(0,t.jsx)("span",{className:"break-words font-mono text-xs",children:String(e)})}function ei(e){return"string"==typeof e&&e.trim()?e:null}function ea(e,t){return"ALL"===t||String(e.result??"unknown").toLocaleUpperCase()===t}function en({report:e}){let s=(0,f.useTranslations)("builds"),[i,a]=(0,j.useState)("ALL"),n=Array.isArray(e.data.tests)?e.data.tests:[],l=Array.isArray(e.data.devices)?e.data.devices:[],r=t=>"number"==typeof e.summary[t]?Number(e.summary[t]):0,d=(function(e){let t=new Map;for(let s of e){let e=ei(s.bundle),i=ei(s.suite),a=ei(s.plan),n=ei(s.configuration),l=i??e,r=JSON.stringify([a,n,e,l]),d=t.get(r)??{key:r,name:l,bundle:e,plan:a,configuration:n,tests:[]};d.tests.push(s),t.set(r,d)}return[...t.values()].sort((e,t)=>(e.name??"").localeCompare(t.name??"",void 0,{numeric:!0,sensitivity:"base"}))})(n).filter(e=>e.tests.some(e=>ea(e,i)));return(0,t.jsxs)(N.Card,{children:[(0,t.jsx)(N.CardHeader,{children:(0,t.jsx)(N.CardTitle,{children:s("testResults")})}),(0,t.jsx)(N.CardContent,{className:"space-y-4",children:"FAILED"===e.status?(0,t.jsx)(b.Alert,{variant:"destructive",children:(0,t.jsx)(b.AlertDescription,{children:e.error??s("testResultsFailed")})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(y.Badge,{variant:"outline",children:s("testTotal",{count:r("total")})}),(0,t.jsx)(y.Badge,{className:"bg-emerald-600 text-white dark:bg-emerald-700",children:s("testPassed",{count:r("passed")})}),(0,t.jsx)(y.Badge,{variant:r("failed")?"destructive":"outline",children:s("testFailed",{count:r("failed")})}),(0,t.jsx)(y.Badge,{className:"border-amber-500/40 bg-amber-500/10 text-amber-700 dark:text-amber-300",variant:"outline",children:s("testSkipped",{count:r("skipped")})}),l.map((e,s)=>(0,t.jsxs)(y.Badge,{variant:"outline",children:[String(e.deviceName??e.modelName??"Device")," ·"," ",String(e.osVersion??"—")]},s))]}),(0,t.jsx)("div",{className:"overflow-x-auto pb-1",children:(0,t.jsx)(w.Tabs,{onValueChange:e=>a(e),value:i,children:(0,t.jsxs)(w.TabsList,{"aria-label":s("testResultFilters"),children:[(0,t.jsx)(w.TabsTrigger,{value:"ALL",children:s("testFilterAll",{count:n.length})}),(0,t.jsx)(w.TabsTrigger,{value:"PASSED",children:s("testFilterPassed",{count:r("passed")})}),(0,t.jsx)(w.TabsTrigger,{value:"FAILED",children:s("testFilterFailed",{count:r("failed")})}),(0,t.jsx)(w.TabsTrigger,{value:"SKIPPED",children:s("testFilterSkipped",{count:r("skipped")})})]})})}),(0,t.jsx)("div",{className:"divide-y rounded-md border",children:d.map(e=>(0,t.jsx)(el,{filter:i,group:e},e.key))})]})})]})}function el({filter:e,group:s}){let i=(0,f.useTranslations)("builds"),a=(0,g.useLocale)(),[n,l]=(0,j.useState)(!1),r=s.name??i("testsWithoutSuite"),d=s.tests.filter(e=>"Passed"===e.result).length,o=s.tests.length?d/s.tests.length:0,c=new Intl.NumberFormat(a,{style:"percent",maximumFractionDigits:1}).format(o),u=s.tests.filter(t=>ea(t,e)),p=new Map;for(let e of u){let t=function(e){let t=ei(e.file);if(t)return t;let s=ei(e.suite);return s||(ei(e.identifier)?.split("/")[0]??null)}(e)??i("testsWithoutFile");p.set(t,[...p.get(t)??[],e])}let h=[s.bundle,s.configuration,s.plan].filter(Boolean).join(" · ");return(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{"aria-expanded":n,"aria-label":i(n?"collapseTestSuite":"expandTestSuite",{suite:r}),className:"flex min-h-8 w-full items-center gap-2 px-2 py-1.5 text-left hover:bg-muted/40",onClick:()=>l(e=>!e),type:"button",children:[n?(0,t.jsx)(m.ChevronDown,{className:"size-3.5 shrink-0"}):(0,t.jsx)(x.ChevronRight,{className:"size-3.5 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:r}),h&&(0,t.jsx)("span",{className:"hidden shrink-0 text-xs text-muted-foreground sm:inline",children:h}),(0,t.jsx)(y.Badge,{className:1===o?"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":o>=.5?"border-amber-500/40 bg-amber-500/10 text-amber-700 dark:text-amber-300":"",variant:o<.5?"destructive":"outline",children:i("testSuitePassed",{passed:d,total:s.tests.length,percent:c})})]}),n&&(0,t.jsx)("div",{className:"border-t bg-muted/10 p-2",children:(0,t.jsx)("div",{className:"divide-y rounded-md border bg-background",children:[...p.entries()].sort(([e],[t])=>e.localeCompare(t,a,{numeric:!0,sensitivity:"base"})).map(([e,s])=>(0,t.jsx)(er,{file:e,tests:s},e))})})]})}function er({file:e,tests:s}){let i=(0,f.useTranslations)("builds"),[a,n]=(0,j.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{"aria-expanded":a,"aria-label":i(a?"collapseTestFile":"expandTestFile",{file:e}),className:"flex min-h-8 w-full items-center gap-2 px-2 py-1.5 text-left hover:bg-muted/40",onClick:()=>n(e=>!e),type:"button",children:[a?(0,t.jsx)(m.ChevronDown,{className:"size-3.5 shrink-0"}):(0,t.jsx)(x.ChevronRight,{className:"size-3.5 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",title:e,children:e}),(0,t.jsx)(y.Badge,{variant:"outline",children:i("testTotal",{count:s.length})})]}),a&&(0,t.jsx)("div",{className:"border-t overflow-auto",children:(0,t.jsxs)(A.Table,{"aria-label":e,className:"min-w-[38rem] text-xs",children:[(0,t.jsx)(A.TableHeader,{children:(0,t.jsxs)(A.TableRow,{children:[(0,t.jsx)(A.TableHead,{className:"h-8 px-2",children:i("testStatus")}),(0,t.jsx)(A.TableHead,{className:"h-8 px-2",children:i("testName")}),(0,t.jsx)(A.TableHead,{className:"h-8 px-2 text-right",children:i("testDuration")})]})}),(0,t.jsx)(A.TableBody,{children:s.map((e,s)=>{let i=Array.isArray(e.details)?e.details.filter(e=>"string"==typeof e):[],a=Array.isArray(e.tags)?e.tags.filter(e=>"string"==typeof e):[],n=String(e.name??"—"),l=ei(e.identifier);return(0,t.jsxs)(A.TableRow,{children:[(0,t.jsx)(A.TableCell,{className:"px-2 py-1.5",children:(0,t.jsx)(ed,{result:String(e.result??"unknown")})}),(0,t.jsxs)(A.TableCell,{className:"max-w-xl px-2 py-1.5 whitespace-normal",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)("span",{className:"font-mono font-medium",children:n}),a.map(e=>(0,t.jsx)(y.Badge,{variant:"outline",children:e},e))]}),l&&l!==n&&(0,t.jsx)("p",{className:"truncate font-mono text-muted-foreground",title:l,children:l}),i.map((e,s)=>(0,t.jsx)("p",{className:"mt-1 text-destructive",children:e},s))]}),(0,t.jsx)(A.TableCell,{className:"px-2 py-1.5 text-right tabular-nums",children:"number"==typeof e.durationSeconds?`${e.durationSeconds.toFixed(3)}s`:"—"})]},`${l??n}:${s}`)})})]})})]})}function ed({result:e}){let s=e.toLocaleLowerCase();return(0,t.jsx)(y.Badge,{className:"passed"===s?"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":"skipped"===s?"border-amber-500/40 bg-amber-500/10 text-amber-700 dark:text-amber-300":"expected failure"===s?"border-violet-500/40 bg-violet-500/10 text-violet-700 dark:text-violet-300":"",variant:"failed"===s?"destructive":"outline",children:e})}function eo({label:e,value:s,mono:i=!1}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs text-muted-foreground",children:e}),(0,t.jsx)("dd",{className:i?"mt-0.5 break-all font-mono text-xs":"mt-0.5",children:s})]})}e.s(["BuildDetailPage",0,function({buildId:e,publicOrigin:n}){let w=(0,f.useTranslations)("builds"),A=(0,g.useLocale)(),R=(0,I.useRouter)(),[B,D]=(0,j.useState)(null),[L,O]=(0,j.useState)([]),[$,U]=(0,j.useState)(!0),[F,_]=(0,j.useState)(null),[V,G]=(0,j.useState)(!1),[q,z]=(0,j.useState)(null),[X,Z]=(0,j.useState)(!1),[ee,es]=(0,j.useState)(!1),[ei,ea]=(0,j.useState)(!1),[el,er]=(0,j.useState)(!0),ed=(0,j.useRef)(null),ec=(0,j.useCallback)(async()=>{try{let t=await (0,k.controlPlaneRequest)(`query BuildDetail($id: ID!) {
|
|
29
29
|
build(id: $id) { ${Q} }
|
|
30
30
|
buildLogs(buildId: $id, first: 5000) { ${K} }
|
|
31
|
-
}`,{id:e});
|
|
31
|
+
}`,{id:e});D(t.build),O(t.buildLogs),_(null)}catch(e){_(e instanceof Error?e.message:String(e))}finally{U(!1)}},[e]);(0,j.useEffect)(()=>{let e=window.setTimeout(()=>void ec(),0);return()=>window.clearTimeout(e)},[ec]),(0,j.useEffect)(()=>{let t=(0,k.controlPlaneSubscriptions)().subscribe({query:"subscription BuildChanged($id: ID!) { buildChanged(id: $id) { id } }",variables:{id:e}},{next:()=>void ec(),error:()=>void 0,complete:()=>void 0}),s=(0,k.controlPlaneSubscriptions)().subscribe({query:`subscription BuildLogAdded($buildId: ID!) {
|
|
32
32
|
buildLogAdded(buildId: $buildId) { ${K} }
|
|
33
|
-
}`,variables:{buildId:e}},{next:e=>{let t=e.data?.buildLogAdded;t&&
|
|
33
|
+
}`,variables:{buildId:e}},{next:e=>{let t=e.data?.buildLogAdded;t&&O(e=>e.some(e=>e.id===t.id)?e:[...e,t])},error:()=>void 0,complete:()=>void 0});return()=>{t(),s()}},[e,ec]);let eu=null!==B&&(["QUEUED","PREPARING","RUNNING"].includes(B.status)||B.deployments.some(e=>["QUEUED","RUNNING"].includes(e.status))||B.exports.some(e=>["QUEUED","RUNNING"].includes(e.status)));(0,j.useEffect)(()=>{if(!eu)return;let e=window.setInterval(()=>void ec(),2e3);return()=>window.clearInterval(e)},[eu,ec]),(0,j.useEffect)(()=>{eu&&ed.current&&(ed.current.scrollTop=ed.current.scrollHeight)},[eu,L]),(0,j.useEffect)(()=>{if(!ei)return;let e=window.setTimeout(()=>ea(!1),2e3);return()=>window.clearTimeout(e)},[ei]);let em=async()=>{G(!0);try{await (0,k.controlPlaneRequest)("mutation CancelBuild($id: ID!) { cancelBuild(id: $id) { id status } }",{id:e}),await ec()}catch(e){_(e instanceof Error?e.message:String(e))}finally{G(!1)}},ex=async()=>{G(!0),_(null);try{await (0,k.controlPlaneRequest)("mutation DeleteBuild($ids: [ID!]!) { deleteBuilds(ids: $ids) }",{ids:[e]}),R.replace("/builds")}catch(e){_(e instanceof Error?e.message:String(e)),es(!1)}finally{G(!1)}},ep=B?.artifacts.some(e=>"RUNNABLE_APP"===e.kind),eh=B?.artifacts.some(e=>"ARCHIVE"===e.kind),eg=B?.reports?.find(e=>"TEST_RESULTS"===e.kind),ef=B?.reports?.find(e=>"CODE_COVERAGE"===e.kind),ej=B?.artifacts.find(e=>"RESULT_BUNDLE"===e.kind),ev=!!B&&["TEST","TEST_WITHOUT_BUILDING"].includes(B.action),eb=B?.snapshot??{},ey=eb.repository,eS=eb.worktree,eN=eb.configuration,eC=ej?.metadata.coverageAvailable===!0||eN?.advancedSettings?.codeCoverage===!0,eT=e=>e?new Date(e).toLocaleString(A):"—",ew=async e=>{try{await (0,E.copyText)(e),ea(!0)}catch{_(w("copyFailed"))}},eA=async t=>{z(t),_(null);try{let s="TEST_RESULTS"===t?"parseBuildTestResults":"generateBuildCoverageReport";await (0,k.controlPlaneRequest)(`mutation GenerateBuildReport($buildId: ID!, $requestId: ID!) {
|
|
34
34
|
${s}(buildId: $buildId, requestId: $requestId) { id status error }
|
|
35
|
-
}`,{buildId:e,requestId:(0,E.createClientId)()}),await ed()}catch(e){F(e instanceof Error?e.message:String(e))}finally{q(null)}},eA=e=>{let t=er.current;t&&t.scrollTo({behavior:"smooth",top:"top"===e?0:t.scrollHeight})};return O?(0,t.jsxs)("p",{className:"mx-auto flex max-w-6xl items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(T.Spinner,{})," ",n("loading")]}):R?(0,t.jsxs)("section",{className:"mx-auto flex min-w-0 w-full max-w-6xl flex-col gap-5",children:[(0,t.jsx)("div",{children:(0,t.jsx)(S.Button,{asChild:!0,className:"-ml-2",size:"sm",variant:"ghost",children:(0,t.jsxs)(I.Link,{href:"/builds",children:[(0,t.jsx)(i.ArrowLeft,{})," ",n("backToBuilds")]})})}),$&&(0,t.jsx)(b.Alert,{variant:"destructive",children:(0,t.jsx)(b.AlertDescription,{children:$})}),R.error&&(0,t.jsx)(b.Alert,{variant:"destructive",children:(0,t.jsxs)(b.AlertDescription,{children:[R.errorCode?`${R.errorCode}: `:"",R.error]})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:eb?.name??"—"}),(0,t.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold",children:eS?.name??R.id}),(0,t.jsx)(y.Badge,{variant:(0,P.buildStatusVariant)(R.status),children:n(`statuses.${R.status}`)}),(0,t.jsx)(y.Badge,{variant:"outline",children:n(`actions.${R.action}`)}),R.outOfDate&&(0,t.jsx)(y.Badge,{className:"border-amber-500/40 text-amber-700 dark:text-amber-300",variant:"outline",children:n("outOfDate")})]}),(0,t.jsxs)("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:[ey?.branch??ey?.folder??"—"," ·"," ",R.destination.name]}),(0,t.jsxs)("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:[n("buildId"),": ",R.id]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(W.RebuildButton,{buildId:R.id,onCompleted:e=>A.push(`/builds/${e.id}`),onError:F}),["QUEUED","PREPARING","RUNNING"].includes(R.status)&&(0,t.jsxs)(S.Button,{disabled:_,onClick:()=>void eu(),variant:"destructive",children:[_?(0,t.jsx)(T.Spinner,{}):(0,t.jsx)(p.Square,{})," ",n("cancelBuild")]}),"SUCCEEDED"===R.status&&ex&&(0,t.jsx)(J.RunBuildControls,{buildId:R.id,destinationType:R.destinationType,onCompleted:ed,onError:F,preferredDestination:R.destination}),"SUCCEEDED"===R.status&&ep&&(0,t.jsxs)(S.Button,{onClick:()=>X(!0),variant:"outline",children:[(0,t.jsx)(s.Archive,{})," ",n("exportArchive")]}),!ec&&ej&&ef&&eh?.status!=="READY"&&(0,t.jsxs)(S.Button,{disabled:null!==G,onClick:()=>void ew("TEST_RESULTS"),variant:"outline",children:["TEST_RESULTS"===G?(0,t.jsx)(T.Spinner,{}):(0,t.jsx)(c,{}),eh?.status==="FAILED"?n("retryParseTestResults"):n("parseTestResultsAction")]}),!ec&&ef&&eN&&eg?.status!=="READY"&&(0,t.jsxs)(S.Button,{disabled:null!==G,onClick:()=>void ew("CODE_COVERAGE"),variant:"outline",children:["CODE_COVERAGE"===G?(0,t.jsx)(T.Spinner,{}):(0,t.jsx)(u,{}),eg?.status==="FAILED"?n("retryCoverageReport"):n("generateCoverageReport")]}),eg?.status==="READY"&&(0,t.jsx)(S.Button,{asChild:!0,variant:"outline",children:(0,t.jsxs)(I.Link,{href:`/builds/${R.id}/coverage`,children:[(0,t.jsx)(u,{})," ",n("viewCoverageReport")]})}),(0,t.jsxs)(S.Button,{disabled:_||["QUEUED","PREPARING","RUNNING"].includes(R.status),onClick:()=>ee(!0),variant:"destructive",children:[(0,t.jsx)(h.Trash2,{})," ",n("deleteBuild")]})]})]}),eh&&(0,t.jsx)(en,{report:eh}),(0,t.jsxs)("div",{className:"grid min-w-0 gap-5 lg:grid-cols-[minmax(0,2fr)_minmax(18rem,1fr)]",children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-5",children:[(0,t.jsxs)(N.Card,{className:"gap-0 py-0",children:[(0,t.jsx)(N.CardHeader,{className:ea?"border-b bg-muted/40 py-3":"bg-muted/40 py-3",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)(S.Button,{"aria-expanded":ea,className:"-m-2 h-auto min-w-0 flex-1 justify-start p-2 text-left aria-expanded:bg-transparent aria-expanded:hover:bg-muted dark:aria-expanded:bg-transparent dark:aria-expanded:hover:bg-muted/50",onClick:()=>el(e=>!e),type:"button",variant:"ghost",children:(0,t.jsx)("span",{className:"truncate font-medium",children:n("logs")})}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[ea&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.Button,{"aria-label":n("scrollLogsToTop"),onClick:()=>eA("top"),size:"icon-xs",type:"button",variant:"outline",children:(0,t.jsx)(l,{})}),(0,t.jsx)(S.Button,{"aria-label":n("scrollLogsToBottom"),onClick:()=>eA("bottom"),size:"icon-xs",type:"button",variant:"outline",children:(0,t.jsx)(a.ArrowDownToLine,{})})]}),(0,t.jsx)(S.Button,{"aria-expanded":ea,"aria-label":n(ea?"collapseLogs":"expandLogs"),onClick:()=>el(e=>!e),size:"icon-sm",title:n(ea?"collapseLogs":"expandLogs"),type:"button",variant:"ghost",children:ea?(0,t.jsx)(m.ChevronDown,{className:"size-5"}):(0,t.jsx)(x.ChevronRight,{className:"size-5"})})]})]})}),ea&&(0,t.jsx)(N.CardContent,{className:"py-4",children:(0,t.jsx)("pre",{className:"max-h-[calc(100svh-8rem)] w-full min-w-0 max-w-full overflow-auto rounded-lg bg-neutral-950 p-3 text-xs whitespace-pre-wrap text-neutral-100 [overflow-wrap:anywhere] sm:max-h-[48rem]",ref:er,children:D.length?D.map(e=>`[${e.phase}] ${e.message}`).join("\n"):n("noLogs")})})]}),(0,t.jsxs)(N.Card,{children:[(0,t.jsxs)(N.CardHeader,{children:[(0,t.jsx)(N.CardTitle,{children:n("commandSummary")}),(0,t.jsx)(N.CardAction,{children:(0,t.jsx)(S.Button,{"aria-label":es?n("commandCopied"):n("copyCommand"),onClick:()=>void eT(R.commandSummary),size:"icon-sm",type:"button",variant:"ghost",children:es?(0,t.jsx)(r.Check,{}):(0,t.jsx)(d.Copy,{})})})]}),(0,t.jsx)(N.CardContent,{children:(0,t.jsx)("pre",{className:"w-full min-w-0 max-w-full overflow-x-auto rounded-lg bg-muted p-3 text-xs whitespace-pre-wrap [overflow-wrap:anywhere]",children:R.commandSummary})})]}),(0,t.jsxs)(N.Card,{children:[(0,t.jsx)(N.CardHeader,{children:(0,t.jsx)(N.CardTitle,{children:n("scripts")})}),(0,t.jsx)(N.CardContent,{className:"space-y-2",children:R.scriptExecutions.length?R.scriptExecutions.map(e=>(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-lg border p-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"text-sm font-medium",children:[e.nameSnapshot," ·"," ",Y(e.phase)]}),e.error&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:e.error})]}),(0,t.jsx)(y.Badge,{variant:"FAILED"===e.status?"destructive":"outline",children:Y(e.status)})]},e.id)):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:n("noScriptExecutions")})})]})]}),(0,t.jsxs)("div",{className:"min-w-0 space-y-5",children:[(0,t.jsxs)(N.Card,{children:[(0,t.jsx)(N.CardHeader,{children:(0,t.jsx)(N.CardTitle,{children:n("overview")})}),(0,t.jsx)(N.CardContent,{children:(0,t.jsxs)("dl",{className:"space-y-3 text-sm",children:[(0,t.jsx)(eo,{label:n("buildId"),value:R.id,mono:!0}),(0,t.jsx)(eo,{label:n("scheme"),value:eS?.scheme??"—",mono:!0}),(0,t.jsx)(eo,{label:n("configuration"),value:eS?.buildConfiguration??"—",mono:!0}),(0,t.jsx)(eo,{label:n("head"),value:ey?.headSha??"—",mono:!0}),(0,t.jsx)(eo,{label:n("startedAt"),value:eC(R.startedAt)}),(0,t.jsx)(eo,{label:n("finishedAt"),value:eC(R.finishedAt)}),(0,t.jsx)(eo,{label:n("artifactDirectory"),value:R.artifactDirectory,mono:!0})]})})]}),(0,t.jsx)(et,{settings:eS?.advancedSettings}),(0,t.jsxs)(N.Card,{children:[(0,t.jsx)(N.CardHeader,{children:(0,t.jsx)(N.CardTitle,{children:n("artifacts")})}),(0,t.jsx)(N.CardContent,{className:"space-y-2",children:R.artifacts.length?R.artifacts.map(e=>{let s="IPA"===e.kind,i=e.metadata??{};return(0,t.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)(y.Badge,{variant:"outline",children:Y(e.kind)}),(0,t.jsx)(S.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,t.jsxs)("a",{download:!0,href:`/api/builds/${encodeURIComponent(R.id)}/artifacts/${encodeURIComponent(e.id)}`,children:[(0,t.jsx)(o.Download,{})," ",s?n("downloadIpa"):n("downloadArtifact")]})})]}),(0,t.jsx)("p",{className:"mt-1 break-all font-mono text-xs text-muted-foreground",children:e.relativePath}),s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("dl",{className:"mt-2 space-y-1 text-xs text-muted-foreground",children:["string"==typeof i.bundleIdentifier&&(0,t.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,t.jsx)("dt",{children:n("ipaBundleIdentifier")}),(0,t.jsx)("dd",{className:"break-all font-mono",children:i.bundleIdentifier})]}),"string"==typeof i.bundleShortVersion&&(0,t.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,t.jsx)("dt",{children:n("ipaBundleVersion")}),(0,t.jsx)("dd",{className:"font-mono",children:i.bundleShortVersion})]})]}),(0,t.jsx)("div",{className:"mt-2 flex justify-end",children:(0,t.jsx)(H,{artifactId:e.id,buildId:R.id,metadata:i})})]})]},e.id)}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:n("noArtifacts")})})]}),(0,t.jsxs)(N.Card,{children:[(0,t.jsx)(N.CardHeader,{children:(0,t.jsx)(N.CardTitle,{children:n("runsAndExports")})}),(0,t.jsxs)(N.CardContent,{className:"space-y-2",children:[R.deployments.map(e=>(0,t.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e.destination.name}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,t.jsx)(y.Badge,{variant:"FAILED"===e.status?"destructive":"outline",children:Y(e.status)}),(0,t.jsx)("time",{className:"text-xs text-muted-foreground",children:eC(e.finishedAt??e.startedAt??e.createdAt)})]})]}),e.error&&(0,t.jsx)("p",{className:"mt-1 text-xs text-destructive",children:e.error})]},e.id)),R.exports.map(e=>(0,t.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:n("archiveExport")}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,t.jsx)(y.Badge,{variant:"FAILED"===e.status?"destructive":"outline",children:Y(e.status)}),(0,t.jsx)("time",{className:"text-xs text-muted-foreground",children:eC(e.finishedAt??e.startedAt??e.createdAt)})]})]}),e.outputRelativePath&&(0,t.jsx)("p",{className:"mt-1 font-mono text-xs",children:e.outputRelativePath}),e.error&&(0,t.jsx)("p",{className:"mt-1 text-xs text-destructive",children:e.error})]},e.id)),!R.deployments.length&&!R.exports.length&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:n("noRunsOrExports")})]})]})]})]}),z&&(0,t.jsx)(M,{buildId:R.id,onOpenChange:X,onSaved:ed,open:z}),(0,t.jsx)(v.ConfirmationDialog,{actionLabel:n("deleteBuild"),cancelLabel:n("cancel"),description:n("deleteBuildDescription"),onConfirm:em,onOpenChange:ee,open:Z,title:n("deleteBuildTitle")})]}):(0,t.jsxs)(C.Empty,{className:"mx-auto max-w-6xl border py-12",children:[(0,t.jsxs)(C.EmptyHeader,{children:[(0,t.jsx)(C.EmptyTitle,{children:n("buildNotFound")}),(0,t.jsx)(C.EmptyDescription,{children:n("buildNotFoundDescription")})]}),(0,t.jsx)(S.Button,{asChild:!0,variant:"outline",children:(0,t.jsxs)(I.Link,{href:"/builds",children:[(0,t.jsx)(i.ArrowLeft,{})," ",n("backToBuilds")]})})]})}],885325)}]);
|
|
35
|
+
}`,{buildId:e,requestId:(0,E.createClientId)()}),await ec()}catch(e){_(e instanceof Error?e.message:String(e))}finally{z(null)}},eI=e=>{let t=ed.current;t&&t.scrollTo({behavior:"smooth",top:"top"===e?0:t.scrollHeight})};return $?(0,t.jsxs)("p",{className:"mx-auto flex max-w-6xl items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(T.Spinner,{})," ",w("loading")]}):B?(0,t.jsxs)("section",{className:"mx-auto flex min-w-0 w-full max-w-6xl flex-col gap-5",children:[(0,t.jsx)("div",{children:(0,t.jsx)(S.Button,{asChild:!0,className:"-ml-2",size:"sm",variant:"ghost",children:(0,t.jsxs)(I.Link,{href:"/builds",children:[(0,t.jsx)(i.ArrowLeft,{})," ",w("backToBuilds")]})})}),F&&(0,t.jsx)(b.Alert,{variant:"destructive",children:(0,t.jsx)(b.AlertDescription,{children:F})}),B.error&&(0,t.jsx)(b.Alert,{variant:"destructive",children:(0,t.jsxs)(b.AlertDescription,{children:[B.errorCode?`${B.errorCode}: `:"",B.error]})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:ey?.name??"—"}),(0,t.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold",children:eN?.name??B.id}),(0,t.jsx)(y.Badge,{variant:(0,P.buildStatusVariant)(B.status),children:w(`statuses.${B.status}`)}),(0,t.jsx)(y.Badge,{variant:"outline",children:w(`actions.${B.action}`)}),B.outOfDate&&(0,t.jsx)(y.Badge,{className:"border-amber-500/40 text-amber-700 dark:text-amber-300",variant:"outline",children:w("outOfDate")})]}),(0,t.jsxs)("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:[eS?.branch??eS?.folder??"—"," ·"," ",B.destination.name]}),(0,t.jsxs)("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:[w("buildId"),": ",B.id]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(W.RebuildButton,{buildId:B.id,onCompleted:e=>R.push(`/builds/${e.id}`),onError:_}),["QUEUED","PREPARING","RUNNING"].includes(B.status)&&(0,t.jsxs)(S.Button,{disabled:V,onClick:()=>void em(),variant:"destructive",children:[V?(0,t.jsx)(T.Spinner,{}):(0,t.jsx)(p.Square,{})," ",w("cancelBuild")]}),"SUCCEEDED"===B.status&&ep&&(0,t.jsx)(J.RunBuildControls,{buildId:B.id,destinationType:B.destinationType,onCompleted:ec,onError:_,preferredDestination:B.destination}),"SUCCEEDED"===B.status&&eh&&(0,t.jsxs)(S.Button,{onClick:()=>Z(!0),variant:"outline",children:[(0,t.jsx)(s.Archive,{})," ",w("exportArchive")]}),!eu&&ev&&ej&&eg?.status!=="READY"&&(0,t.jsxs)(S.Button,{disabled:null!==q,onClick:()=>void eA("TEST_RESULTS"),variant:"outline",children:["TEST_RESULTS"===q?(0,t.jsx)(T.Spinner,{}):(0,t.jsx)(c,{}),eg?.status==="FAILED"?w("retryParseTestResults"):w("parseTestResultsAction")]}),!eu&&ej&&eC&&ef?.status!=="READY"&&(0,t.jsxs)(S.Button,{disabled:null!==q,onClick:()=>void eA("CODE_COVERAGE"),variant:"outline",children:["CODE_COVERAGE"===q?(0,t.jsx)(T.Spinner,{}):(0,t.jsx)(u,{}),ef?.status==="FAILED"?w("retryCoverageReport"):w("generateCoverageReport")]}),ef?.status==="READY"&&(0,t.jsx)(S.Button,{asChild:!0,variant:"outline",children:(0,t.jsxs)(I.Link,{href:`/builds/${B.id}/coverage`,children:[(0,t.jsx)(u,{})," ",w("viewCoverageReport")]})}),(0,t.jsxs)(S.Button,{disabled:V||["QUEUED","PREPARING","RUNNING"].includes(B.status),onClick:()=>es(!0),variant:"destructive",children:[(0,t.jsx)(h.Trash2,{})," ",w("deleteBuild")]})]})]}),eg&&(0,t.jsx)(en,{report:eg}),(0,t.jsxs)("div",{className:"grid min-w-0 gap-5 lg:grid-cols-[minmax(0,2fr)_minmax(18rem,1fr)]",children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-5",children:[(0,t.jsxs)(N.Card,{className:"gap-0 py-0",children:[(0,t.jsx)(N.CardHeader,{className:el?"border-b bg-muted/40 py-3":"bg-muted/40 py-3",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)(S.Button,{"aria-expanded":el,className:"-m-2 h-auto min-w-0 flex-1 justify-start p-2 text-left aria-expanded:bg-transparent aria-expanded:hover:bg-muted dark:aria-expanded:bg-transparent dark:aria-expanded:hover:bg-muted/50",onClick:()=>er(e=>!e),type:"button",variant:"ghost",children:(0,t.jsx)("span",{className:"truncate font-medium",children:w("logs")})}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[el&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.Button,{"aria-label":w("scrollLogsToTop"),onClick:()=>eI("top"),size:"icon-xs",type:"button",variant:"outline",children:(0,t.jsx)(l,{})}),(0,t.jsx)(S.Button,{"aria-label":w("scrollLogsToBottom"),onClick:()=>eI("bottom"),size:"icon-xs",type:"button",variant:"outline",children:(0,t.jsx)(a.ArrowDownToLine,{})})]}),(0,t.jsx)(S.Button,{"aria-expanded":el,"aria-label":w(el?"collapseLogs":"expandLogs"),onClick:()=>er(e=>!e),size:"icon-sm",title:w(el?"collapseLogs":"expandLogs"),type:"button",variant:"ghost",children:el?(0,t.jsx)(m.ChevronDown,{className:"size-5"}):(0,t.jsx)(x.ChevronRight,{className:"size-5"})})]})]})}),el&&(0,t.jsx)(N.CardContent,{className:"py-4",children:(0,t.jsx)("pre",{className:"max-h-[calc(100svh-8rem)] w-full min-w-0 max-w-full overflow-auto rounded-lg bg-neutral-950 p-3 text-xs whitespace-pre-wrap text-neutral-100 [overflow-wrap:anywhere] sm:max-h-[48rem]",ref:ed,children:L.length?L.map(e=>`[${e.phase}] ${e.message}`).join("\n"):w("noLogs")})})]}),(0,t.jsxs)(N.Card,{children:[(0,t.jsxs)(N.CardHeader,{children:[(0,t.jsx)(N.CardTitle,{children:w("commandSummary")}),(0,t.jsx)(N.CardAction,{children:(0,t.jsx)(S.Button,{"aria-label":ei?w("commandCopied"):w("copyCommand"),onClick:()=>void ew(B.commandSummary),size:"icon-sm",type:"button",variant:"ghost",children:ei?(0,t.jsx)(r.Check,{}):(0,t.jsx)(d.Copy,{})})})]}),(0,t.jsx)(N.CardContent,{children:(0,t.jsx)("pre",{className:"w-full min-w-0 max-w-full overflow-x-auto rounded-lg bg-muted p-3 text-xs whitespace-pre-wrap [overflow-wrap:anywhere]",children:B.commandSummary})})]}),(0,t.jsxs)(N.Card,{children:[(0,t.jsx)(N.CardHeader,{children:(0,t.jsx)(N.CardTitle,{children:w("scripts")})}),(0,t.jsx)(N.CardContent,{className:"space-y-2",children:B.scriptExecutions.length?B.scriptExecutions.map(e=>(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-lg border p-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"text-sm font-medium",children:[e.nameSnapshot," ·"," ",Y(e.phase)]}),e.error&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:e.error})]}),(0,t.jsx)(y.Badge,{variant:"FAILED"===e.status?"destructive":"outline",children:Y(e.status)})]},e.id)):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:w("noScriptExecutions")})})]})]}),(0,t.jsxs)("div",{className:"min-w-0 space-y-5",children:[(0,t.jsxs)(N.Card,{children:[(0,t.jsx)(N.CardHeader,{children:(0,t.jsx)(N.CardTitle,{children:w("overview")})}),(0,t.jsx)(N.CardContent,{children:(0,t.jsxs)("dl",{className:"space-y-3 text-sm",children:[(0,t.jsx)(eo,{label:w("buildId"),value:B.id,mono:!0}),(0,t.jsx)(eo,{label:w("scheme"),value:eN?.scheme??"—",mono:!0}),(0,t.jsx)(eo,{label:w("configuration"),value:eN?.buildConfiguration??"—",mono:!0}),(0,t.jsx)(eo,{label:w("head"),value:eS?.headSha??"—",mono:!0}),(0,t.jsx)(eo,{label:w("startedAt"),value:eT(B.startedAt)}),(0,t.jsx)(eo,{label:w("finishedAt"),value:eT(B.finishedAt)}),(0,t.jsx)(eo,{label:w("artifactDirectory"),value:B.artifactDirectory,mono:!0})]})})]}),(0,t.jsx)(et,{settings:eN?.advancedSettings}),(0,t.jsxs)(N.Card,{children:[(0,t.jsx)(N.CardHeader,{children:(0,t.jsx)(N.CardTitle,{children:w("artifacts")})}),(0,t.jsx)(N.CardContent,{className:"space-y-2",children:B.artifacts.length?B.artifacts.map(e=>{let s="IPA"===e.kind,i=e.metadata??{};return(0,t.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)(y.Badge,{variant:"outline",children:Y(e.kind)}),(0,t.jsx)(S.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,t.jsxs)("a",{download:!0,href:`/api/builds/${encodeURIComponent(B.id)}/artifacts/${encodeURIComponent(e.id)}`,children:[(0,t.jsx)(o.Download,{})," ",s?w("downloadIpa"):w("downloadArtifact")]})})]}),(0,t.jsx)("p",{className:"mt-1 break-all font-mono text-xs text-muted-foreground",children:e.relativePath}),s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("dl",{className:"mt-2 space-y-1 text-xs text-muted-foreground",children:["string"==typeof i.bundleIdentifier&&(0,t.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,t.jsx)("dt",{children:w("ipaBundleIdentifier")}),(0,t.jsx)("dd",{className:"break-all font-mono",children:i.bundleIdentifier})]}),"string"==typeof i.bundleShortVersion&&(0,t.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,t.jsx)("dt",{children:w("ipaBundleVersion")}),(0,t.jsx)("dd",{className:"font-mono",children:i.bundleShortVersion})]})]}),(0,t.jsx)("div",{className:"mt-2 flex justify-end",children:(0,t.jsx)(H,{artifactId:e.id,buildId:B.id,metadata:i,publicOrigin:n})})]})]},e.id)}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:w("noArtifacts")})})]}),(0,t.jsxs)(N.Card,{children:[(0,t.jsx)(N.CardHeader,{children:(0,t.jsx)(N.CardTitle,{children:w("runsAndExports")})}),(0,t.jsxs)(N.CardContent,{className:"space-y-2",children:[B.deployments.map(e=>(0,t.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e.destination.name}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,t.jsx)(y.Badge,{variant:"FAILED"===e.status?"destructive":"outline",children:Y(e.status)}),(0,t.jsx)("time",{className:"text-xs text-muted-foreground",children:eT(e.finishedAt??e.startedAt??e.createdAt)})]})]}),e.error&&(0,t.jsx)("p",{className:"mt-1 text-xs text-destructive",children:e.error})]},e.id)),B.exports.map(e=>(0,t.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:w("archiveExport")}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,t.jsx)(y.Badge,{variant:"FAILED"===e.status?"destructive":"outline",children:Y(e.status)}),(0,t.jsx)("time",{className:"text-xs text-muted-foreground",children:eT(e.finishedAt??e.startedAt??e.createdAt)})]})]}),e.outputRelativePath&&(0,t.jsx)("p",{className:"mt-1 font-mono text-xs",children:e.outputRelativePath}),e.error&&(0,t.jsx)("p",{className:"mt-1 text-xs text-destructive",children:e.error})]},e.id)),!B.deployments.length&&!B.exports.length&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:w("noRunsOrExports")})]})]})]})]}),X&&(0,t.jsx)(M,{buildId:B.id,onOpenChange:Z,onSaved:ec,open:X}),(0,t.jsx)(v.ConfirmationDialog,{actionLabel:w("deleteBuild"),cancelLabel:w("cancel"),description:w("deleteBuildDescription"),onConfirm:ex,onOpenChange:es,open:ee,title:w("deleteBuildTitle")})]}):(0,t.jsxs)(C.Empty,{className:"mx-auto max-w-6xl border py-12",children:[(0,t.jsxs)(C.EmptyHeader,{children:[(0,t.jsx)(C.EmptyTitle,{children:w("buildNotFound")}),(0,t.jsx)(C.EmptyDescription,{children:w("buildNotFoundDescription")})]}),(0,t.jsx)(S.Button,{asChild:!0,variant:"outline",children:(0,t.jsxs)(I.Link,{href:"/builds",children:[(0,t.jsx)(i.ArrowLeft,{})," ",w("backToBuilds")]})})]})}],885325)}]);
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
readFile,
|
|
3
|
+
readdir,
|
|
4
|
+
rm,
|
|
5
|
+
stat,
|
|
6
|
+
utimes,
|
|
7
|
+
writeFile,
|
|
8
|
+
} from "node:fs/promises";
|
|
2
9
|
import { tmpdir } from "node:os";
|
|
3
10
|
import { join } from "node:path";
|
|
4
11
|
|
|
@@ -9,6 +16,13 @@ vi.mock("@/services/server-services", () => ({
|
|
|
9
16
|
getServerServices: () => getServerServices(),
|
|
10
17
|
}));
|
|
11
18
|
|
|
19
|
+
const fsMocks = vi.hoisted(() => ({ rename: vi.fn() }));
|
|
20
|
+
vi.mock("node:fs/promises", async (importOriginal) => {
|
|
21
|
+
const actual = await importOriginal<typeof import("node:fs/promises")>();
|
|
22
|
+
fsMocks.rename.mockImplementation(actual.rename);
|
|
23
|
+
return { ...actual, rename: fsMocks.rename };
|
|
24
|
+
});
|
|
25
|
+
|
|
12
26
|
import { receiveArtifactTransfer } from "./artifact-transfer";
|
|
13
27
|
|
|
14
28
|
// Isolated per process so concurrent runs cannot evict each other's entries.
|
|
@@ -86,6 +100,7 @@ beforeEach(async () => {
|
|
|
86
100
|
metadata: {},
|
|
87
101
|
};
|
|
88
102
|
getServerServices.mockImplementation(services);
|
|
103
|
+
fsMocks.rename.mockClear();
|
|
89
104
|
await rm(CACHE_DIRECTORY, { recursive: true, force: true });
|
|
90
105
|
});
|
|
91
106
|
|
|
@@ -107,6 +122,21 @@ describe("materializeArtifact", () => {
|
|
|
107
122
|
await expect(readFile(artifact.path, "utf8")).resolves.toBe("ipa-bytes");
|
|
108
123
|
});
|
|
109
124
|
|
|
125
|
+
test("copies across filesystems and removes transfer staging files", async () => {
|
|
126
|
+
fsMocks.rename.mockRejectedValueOnce(
|
|
127
|
+
Object.assign(new Error("Cross-device link"), { code: "EXDEV" }),
|
|
128
|
+
);
|
|
129
|
+
const { materializeArtifact } = await importCache();
|
|
130
|
+
const artifact = await materializeArtifact("build-1", "artifact-1");
|
|
131
|
+
const source = String(fsMocks.rename.mock.calls[0]?.[0]);
|
|
132
|
+
|
|
133
|
+
await expect(readFile(artifact.path, "utf8")).resolves.toBe("ipa-bytes");
|
|
134
|
+
await expect(stat(source)).rejects.toThrow();
|
|
135
|
+
await expect(readdir(CACHE_DIRECTORY)).resolves.not.toContainEqual(
|
|
136
|
+
expect.stringContaining(".incoming"),
|
|
137
|
+
);
|
|
138
|
+
});
|
|
139
|
+
|
|
110
140
|
test("serves a second request from cache without contacting the agent", async () => {
|
|
111
141
|
const { materializeArtifact } = await importCache();
|
|
112
142
|
const first = await materializeArtifact("build-1", "artifact-1");
|
|
@@ -2,6 +2,7 @@ import "server-only";
|
|
|
2
2
|
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import {
|
|
5
|
+
copyFile,
|
|
5
6
|
mkdir,
|
|
6
7
|
readdir,
|
|
7
8
|
readFile,
|
|
@@ -59,6 +60,30 @@ function transferTimeout(sizeBytes: number | null): number {
|
|
|
59
60
|
return Math.min(30 * 60_000, 120_000 + (sizeBytes ?? 0) / 1_000);
|
|
60
61
|
}
|
|
61
62
|
|
|
63
|
+
/**
|
|
64
|
+
* Uses an atomic rename when possible. A configured cache volume can live on a
|
|
65
|
+
* different filesystem from the upload receiver's temporary directory, in
|
|
66
|
+
* which case the bytes are staged on the cache filesystem before the final
|
|
67
|
+
* rename.
|
|
68
|
+
*/
|
|
69
|
+
async function moveIntoCache(source: string, destination: string) {
|
|
70
|
+
try {
|
|
71
|
+
await rename(source, destination);
|
|
72
|
+
return;
|
|
73
|
+
} catch (error) {
|
|
74
|
+
if ((error as NodeJS.ErrnoException).code !== "EXDEV") throw error;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const staging = `${destination}.${randomUUID()}.incoming`;
|
|
78
|
+
try {
|
|
79
|
+
await copyFile(source, staging);
|
|
80
|
+
await rename(staging, destination);
|
|
81
|
+
await rm(source, { force: true });
|
|
82
|
+
} finally {
|
|
83
|
+
await rm(staging, { force: true }).catch(() => {});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
62
87
|
function cacheKey(artifactId: string, identity: string): string {
|
|
63
88
|
return createHash("sha1").update(`${artifactId}:${identity}`).digest("hex");
|
|
64
89
|
}
|
|
@@ -118,12 +143,21 @@ async function prune(keep: string): Promise<void> {
|
|
|
118
143
|
mtimeMs: number;
|
|
119
144
|
keep: boolean;
|
|
120
145
|
}[] = [];
|
|
146
|
+
const expired = Date.now() - MAX_CACHE_AGE_MS;
|
|
121
147
|
for (const entry of entries) {
|
|
122
148
|
if (entry.endsWith(".json")) continue;
|
|
123
149
|
const path = join(CACHE_DIRECTORY, entry);
|
|
124
150
|
try {
|
|
125
151
|
const information = await stat(path);
|
|
126
152
|
if (!information.isFile()) continue;
|
|
153
|
+
// Cross-filesystem moves are copied into these staging files. Ignore an
|
|
154
|
+
// active copy, but clean up one left behind by a terminated process.
|
|
155
|
+
if (entry.endsWith(".incoming")) {
|
|
156
|
+
if (information.mtimeMs < expired) {
|
|
157
|
+
await rm(path, { force: true }).catch(() => {});
|
|
158
|
+
}
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
127
161
|
files.push({
|
|
128
162
|
path,
|
|
129
163
|
size: information.size,
|
|
@@ -134,7 +168,6 @@ async function prune(keep: string): Promise<void> {
|
|
|
134
168
|
continue;
|
|
135
169
|
}
|
|
136
170
|
}
|
|
137
|
-
const expired = Date.now() - MAX_CACHE_AGE_MS;
|
|
138
171
|
files.sort((left, right) => left.mtimeMs - right.mtimeMs);
|
|
139
172
|
// The kept entry counts against the budget but is never a deletion candidate.
|
|
140
173
|
let total = files.reduce((sum, file) => sum + file.size, 0);
|
|
@@ -159,6 +192,7 @@ async function transfer(
|
|
|
159
192
|
if (!build?.agentId) throw new Error("Build agent is unavailable");
|
|
160
193
|
|
|
161
194
|
const timeoutMs = transferTimeout(sizeBytes);
|
|
195
|
+
let receivedPath: string | null = null;
|
|
162
196
|
try {
|
|
163
197
|
const [received] = await Promise.all([
|
|
164
198
|
expectArtifactTransfer(uploadId, build.agentId, timeoutMs),
|
|
@@ -169,11 +203,11 @@ async function transfer(
|
|
|
169
203
|
timeoutMs,
|
|
170
204
|
),
|
|
171
205
|
]);
|
|
206
|
+
receivedPath = received.path;
|
|
172
207
|
await mkdir(CACHE_DIRECTORY, { recursive: true, mode: 0o700 });
|
|
173
208
|
const path = join(CACHE_DIRECTORY, key);
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
await rename(received.path, path);
|
|
209
|
+
await moveIntoCache(received.path, path);
|
|
210
|
+
receivedPath = null;
|
|
177
211
|
const size = (await stat(path)).size;
|
|
178
212
|
const sidecar: Sidecar = {
|
|
179
213
|
// The agent chooses the filename — it appends .tar.gz when it packages a
|
|
@@ -190,6 +224,9 @@ async function transfer(
|
|
|
190
224
|
return { path, etag: `"${key}"`, ...sidecar };
|
|
191
225
|
} catch (error) {
|
|
192
226
|
cancelArtifactTransfer(uploadId, error);
|
|
227
|
+
if (receivedPath) {
|
|
228
|
+
await rm(receivedPath, { force: true }).catch(() => {});
|
|
229
|
+
}
|
|
193
230
|
throw error;
|
|
194
231
|
}
|
|
195
232
|
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
module.exports=[4712,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ActionDidNotRevalidate:function(){return f},ActionDidRevalidateDynamicOnly:function(){return h},ActionDidRevalidateStaticAndDynamic:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=0,g=1,h=2},114896,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={MutableRequestCookiesAdapter:function(){return o},ReadonlyRequestCookiesError:function(){return j},RequestCookiesAdapter:function(){return k},appendMutableCookies:function(){return n},areCookiesMutableInCurrentPhase:function(){return q},createCookiesWithMutableAccessCheck:function(){return p},getModifiedCookieValues:function(){return m},responseCookiesToRequestCookies:function(){return s}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(563681),g=a.r(751409),h=a.r(556704),i=a.r(4712);class j extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options")}static callable(){throw new j}}class k{static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"clear":case"delete":case"set":return j.callable;default:return g.ReflectAdapter.get(a,b,c)}}})}}let l=Symbol.for("next.mutated.cookies");function m(a){let b=a[l];return b&&Array.isArray(b)&&0!==b.length?b:[]}function n(a,b){let c=m(b);if(0===c.length)return!1;let d=new f.ResponseCookies(a),e=d.getAll();for(let a of c)d.set(a);for(let a of e)d.set(a);return!0}class o{static wrap(a,b){let c=new f.ResponseCookies(new Headers);for(let b of a.getAll())c.set(b);let d=[],e=new Set,j=()=>{let a=h.workAsyncStorage.getStore();if(a&&(a.pathWasRevalidated=i.ActionDidRevalidateStaticAndDynamic),d=c.getAll().filter(a=>e.has(a.name)),b){let a=[];for(let b of d){let c=new f.ResponseCookies(new Headers);c.set(b),a.push(c.toString())}b(a)}},k=new Proxy(c,{get(a,b,c){switch(b){case l:return d;case"delete":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.delete(...b),k}finally{j()}};case"set":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.set(...b),k}finally{j()}};default:return g.ReflectAdapter.get(a,b,c)}}});return k}}function p(a){let b=new Proxy(a.mutableCookies,{get(c,d,e){switch(d){case"delete":return function(...d){return r(a,"cookies().delete"),c.delete(...d),b};case"set":return function(...d){return r(a,"cookies().set"),c.set(...d),b};default:return g.ReflectAdapter.get(c,d,e)}}});return b}function q(a){return"action"===a.phase}function r(a,b){if(!q(a))throw new j}function s(a){let b=new f.RequestCookies(new Headers);for(let c of a.getAll())b.set(c);return b}},608018,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"createDedupedByCallsiteServerErrorLoggerDev",{enumerable:!0,get:function(){return i}});let d=function(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=e(void 0);if(b&&b.has(a))return b.get(a);var c={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!==f&&Object.prototype.hasOwnProperty.call(a,f)){var g=d?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(c,f,g):c[f]=a[f]}return c.default=a,b&&b.set(a,c),c}(a.r(800717));function e(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(e=function(a){return a?c:b})(a)}let f={current:null},g="function"==typeof d.cache?d.cache:a=>a,h=console.warn;function i(a){return function(...b){h(a(...b))}}g(a=>{try{h(f.current)}finally{f.current=null}})},381740,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"cookies",{enumerable:!0,get:function(){return n}});let d=a.r(114896),e=a.r(563681),f=a.r(556704),g=a.r(832319),h=a.r(660384),i=a.r(760312),j=a.r(13091),k=a.r(608018),l=a.r(786309),m=a.r(950640);function n(){let a="cookies",b=f.workAsyncStorage.getStore(),c=g.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,l.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`cookies()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E843",enumerable:!1,configurable:!0});if(b.forceStatic)return p(d.RequestCookiesAdapter.seal(new e.RequestCookies(new Headers({}))));if(b.dynamicShouldError)throw Object.defineProperty(new i.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E849",enumerable:!1,configurable:!0});if(c)switch(c.type){case"cache":let f=Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E831",enumerable:!1,configurable:!0});throw Error.captureStackTrace(f,n),b.invalidDynamicUsageError??=f,f;case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E846",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1123",enumerable:!1,configurable:!0});case"prerender":var k=b,q=c;let r=o.get(q);if(r)return r;let s=(0,j.makeHangingPromise)(q.renderSignal,k.route,"`cookies()`");return o.set(q,s),s;case"prerender-client":case"validation-client":let t="`cookies`";throw Object.defineProperty(new m.InvariantError(`${t} must not be used within a Client Component. Next.js should be preventing ${t} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1037",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,h.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,h.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,j.delayUntilRuntimeStage)(c,p(c.cookies));case"private-cache":return p(c.cookies);case"request":let u;if((0,h.trackDynamicDataInDynamicRender)(c),u=(0,d.areCookiesMutableInCurrentPhase)(c)?c.userspaceMutableCookies:c.cookies,!c.asyncApiPromises)return p(u);{let a=(0,g.isInEarlyRenderStage)(c);if(u===c.mutableCookies)return a?c.asyncApiPromises.earlyMutableCookies:c.asyncApiPromises.mutableCookies;return a?c.asyncApiPromises.earlyCookies:c.asyncApiPromises.cookies}}}(0,g.throwForMissingRequestStore)(a)}a.r(531382);let o=new WeakMap;function p(a){let b=o.get(a);if(b)return b;let c=Promise.resolve(a);return o.set(a,c),c}(0,k.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`cookies()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E830",enumerable:!1,configurable:!0})})},329927,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={HeadersAdapter:function(){return h},ReadonlyHeadersError:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(751409);class g extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new g}}class h extends Headers{constructor(a){super(),this.headers=new Proxy(a,{get(b,c,d){if("symbol"==typeof c)return f.ReflectAdapter.get(b,c,d);let e=c.toLowerCase(),g=Object.keys(a).find(a=>a.toLowerCase()===e);if(void 0!==g)return f.ReflectAdapter.get(b,g,d)},set(b,c,d,e){if("symbol"==typeof c)return f.ReflectAdapter.set(b,c,d,e);let g=c.toLowerCase(),h=Object.keys(a).find(a=>a.toLowerCase()===g);return f.ReflectAdapter.set(b,h??c,d,e)},has(b,c){if("symbol"==typeof c)return f.ReflectAdapter.has(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0!==e&&f.ReflectAdapter.has(b,e)},deleteProperty(b,c){if("symbol"==typeof c)return f.ReflectAdapter.deleteProperty(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0===e||f.ReflectAdapter.deleteProperty(b,e)}})}static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"append":case"delete":case"set":return g.callable;default:return f.ReflectAdapter.get(a,b,c)}}})}merge(a){return Array.isArray(a)?a.join(", "):a}static from(a){return a instanceof Headers?a:new h(a)}append(a,b){let c=this.headers[a];"string"==typeof c?this.headers[a]=[c,b]:Array.isArray(c)?c.push(b):this.headers[a]=b}delete(a){delete this.headers[a]}get(a){let b=this.headers[a];return void 0!==b?this.merge(b):null}has(a){return void 0!==this.headers[a]}set(a,b){this.headers[a]=b}forEach(a,b){for(let[c,d]of this.entries())a.call(b,d,c,this)}*entries(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase(),c=this.get(b);yield[b,c]}}*keys(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase();yield b}}*values(){for(let a of Object.keys(this.headers)){let b=this.get(a);yield b}}[Symbol.iterator](){return this.entries()}}},35754,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"headers",{enumerable:!0,get:function(){return m}});let d=a.r(329927),e=a.r(556704),f=a.r(832319),g=a.r(660384),h=a.r(760312),i=a.r(13091),j=a.r(608018),k=a.r(786309),l=a.r(950640);function m(){let a="headers",b=e.workAsyncStorage.getStore(),c=f.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,k.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`headers()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E839",enumerable:!1,configurable:!0});if(b.forceStatic)return o(d.HeadersAdapter.seal(new Headers({})));if(c)switch(c.type){case"cache":{let a=Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E833",enumerable:!1,configurable:!0});throw Error.captureStackTrace(a,m),b.invalidDynamicUsageError??=a,a}case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E838",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1134",enumerable:!1,configurable:!0})}if(b.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E828",enumerable:!1,configurable:!0});if(c)switch(c.type){case"prerender":var j=b,p=c;let e=n.get(p);if(e)return e;let q=(0,i.makeHangingPromise)(p.renderSignal,j.route,"`headers()`");return n.set(p,q),q;case"prerender-client":case"validation-client":let r="`headers`";throw Object.defineProperty(new l.InvariantError(`${r} must not be used within a client component. Next.js should be preventing ${r} from being included in client components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1017",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,g.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,g.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,i.delayUntilRuntimeStage)(c,o(c.headers));case"private-cache":return o(c.headers);case"request":if((0,g.trackDynamicDataInDynamicRender)(c),c.asyncApiPromises)return(0,f.isInEarlyRenderStage)(c)?c.asyncApiPromises.earlyHeaders:c.asyncApiPromises.headers;return o(c.headers)}}(0,f.throwForMissingRequestStore)(a)}a.r(531382);let n=new WeakMap;function o(a){let b=n.get(a);if(b)return b;let c=Promise.resolve(a);return n.set(a,c),c}(0,j.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`headers()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E836",enumerable:!1,configurable:!0})})},551125,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"draftMode",{enumerable:!0,get:function(){return l}});let d=a.r(832319),e=a.r(556704),f=a.r(660384),g=a.r(608018),h=a.r(760312),i=a.r(696556),j=a.r(950640),k=a.r(13091);function l(){let a="draftMode",b=e.workAsyncStorage.getStore(),c=d.workUnitAsyncStorage.getStore();switch((!b||!c)&&(0,d.throwForMissingRequestStore)(a),c.type){case"prerender-runtime":return(0,k.delayUntilRuntimeStage)(c,m(c.draftMode,b));case"request":return m(c.draftMode,b);case"cache":case"private-cache":case"unstable-cache":let f=(0,d.getDraftModeProviderForCacheScope)(b,c);if(f)return m(f,b);case"prerender":case"prerender-ppr":case"prerender-legacy":return m(null,b);case"prerender-client":case"validation-client":{let a="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${a} must not be used within a Client Component. Next.js should be preventing ${a} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0})}case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`${a}()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1132",enumerable:!1,configurable:!0});default:return c}}function m(a,b){let c=o.get(a??n);return c||Promise.resolve(new p(a))}a.r(751409);let n={},o=new WeakMap;class p{constructor(a){this._provider=a}get isEnabled(){return null!==this._provider&&this._provider.isEnabled}enable(){q("draftMode().enable()",this.enable),null!==this._provider&&this._provider.enable()}disable(){q("draftMode().disable()",this.disable),null!==this._provider&&this._provider.disable()}}function q(a,b){let c=e.workAsyncStorage.getStore(),g=d.workUnitAsyncStorage.getStore();if(c){if((null==g?void 0:g.phase)==="after")throw Object.defineProperty(Error(`Route ${c.route} used "${a}" inside \`after()\`. The enabled status of \`draftMode()\` can be read inside \`after()\` but you cannot enable or disable \`draftMode()\`. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E845",enumerable:!1,configurable:!0});if(c.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${c.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(g)switch(g.type){case"cache":case"private-cache":{let d=Object.defineProperty(Error(`Route ${c.route} used "${a}" inside "use cache". The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E829",enumerable:!1,configurable:!0});throw Error.captureStackTrace(d,b),c.invalidDynamicUsageError??=d,d}case"unstable-cache":throw Object.defineProperty(Error(`Route ${c.route} used "${a}" inside a function cached with \`unstable_cache()\`. The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E844",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":{let b=Object.defineProperty(Error(`Route ${c.route} used ${a} without first calling \`await connection()\`. See more info here: https://nextjs.org/docs/messages/next-prerender-sync-headers`),"__NEXT_ERROR_CODE",{value:"E126",enumerable:!1,configurable:!0});return(0,f.abortAndThrowOnSynchronousRequestDataAccess)(c.route,a,b,g)}case"prerender-client":case"validation-client":let d="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${d} must not be used within a Client Component. Next.js should be preventing ${d} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,f.postponeWithTracking)(c.route,a,g.dynamicTracking);case"prerender-legacy":g.revalidate=0;let e=Object.defineProperty(new i.DynamicServerError(`Route ${c.route} couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw c.dynamicUsageDescription=a,c.dynamicUsageStack=e.stack,e;case"request":(0,f.trackDynamicDataInDynamicRender)(g);break;case"generate-static-params":throw Object.defineProperty(Error(`Route ${c.route} used \`${a}\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1121",enumerable:!1,configurable:!0})}}}(0,g.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`draftMode()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E835",enumerable:!1,configurable:!0})})},905246,(a,b,c)=>{b.exports.cookies=a.r(381740).cookies,b.exports.headers=a.r(35754).headers,b.exports.draftMode=a.r(551125).draftMode},920916,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ReadonlyURLSearchParams",{enumerable:!0,get:function(){return e}});class d extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class e extends URLSearchParams{append(){throw new d}delete(){throw new d}set(){throw new d}sort(){throw new d}}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},21170,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"RedirectStatusCode",{enumerable:!0,get:function(){return e}});var d,e=((d={})[d.SeeOther=303]="SeeOther",d[d.TemporaryRedirect=307]="TemporaryRedirect",d[d.PermanentRedirect=308]="PermanentRedirect",d);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},328859,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={REDIRECT_ERROR_CODE:function(){return g},isRedirectError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(21170),g="NEXT_REDIRECT";function h(a){if("object"!=typeof a||null===a||!("digest"in a)||"string"!=typeof a.digest)return!1;let b=a.digest.split(";"),[c,d]=b,e=b.slice(2,-2).join(";"),h=Number(b.at(-2));return c===g&&("replace"===d||"push"===d)&&"string"==typeof e&&!isNaN(h)&&h in f.RedirectStatusCode}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},844868,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={getRedirectError:function(){return i},getRedirectStatusCodeFromError:function(){return n},getRedirectTypeFromError:function(){return m},getURLFromRedirectError:function(){return l},permanentRedirect:function(){return k},redirect:function(){return j}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(21170),g=a.r(328859),h=a.r(120635).actionAsyncStorage;function i(a,b,c=f.RedirectStatusCode.TemporaryRedirect){let d=Object.defineProperty(Error(g.REDIRECT_ERROR_CODE),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return d.digest=`${g.REDIRECT_ERROR_CODE};${b};${a};${c};`,d}function j(a,b){throw i(a,b??=h?.getStore()?.isAction?"push":"replace",f.RedirectStatusCode.TemporaryRedirect)}function k(a,b="replace"){throw i(a,b,f.RedirectStatusCode.PermanentRedirect)}function l(a){return(0,g.isRedirectError)(a)?a.digest.split(";").slice(2,-2).join(";"):null}function m(a){if(!(0,g.isRedirectError)(a))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return a.digest.split(";",2)[1]}function n(a){if(!(0,g.isRedirectError)(a))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return Number(a.digest.split(";").at(-2))}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},789798,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={HTTPAccessErrorStatus:function(){return f},HTTP_ERROR_FALLBACK_ERROR_CODE:function(){return h},getAccessFallbackErrorTypeByStatus:function(){return k},getAccessFallbackHTTPStatus:function(){return j},isHTTPAccessFallbackError:function(){return i}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f={NOT_FOUND:404,FORBIDDEN:403,UNAUTHORIZED:401},g=new Set(Object.values(f)),h="NEXT_HTTP_ERROR_FALLBACK";function i(a){if("object"!=typeof a||null===a||!("digest"in a)||"string"!=typeof a.digest)return!1;let[b,c]=a.digest.split(";");return b===h&&g.has(Number(c))}function j(a){return Number(a.digest.split(";")[1])}function k(a){switch(a){case 401:return"unauthorized";case 403:return"forbidden";case 404:return"not-found";default:return}}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},416155,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"notFound",{enumerable:!0,get:function(){return f}});let d=a.r(789798),e=`${d.HTTP_ERROR_FALLBACK_ERROR_CODE};404`;function f(){let a=Object.defineProperty(Error(e),"__NEXT_ERROR_CODE",{value:"E1041",enumerable:!1,configurable:!0});throw a.digest=e,a}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},934557,(a,b,c)=>{"use strict";function d(){throw Object.defineProperty(Error("`forbidden()` is experimental and only allowed to be enabled when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E488",enumerable:!1,configurable:!0})}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"forbidden",{enumerable:!0,get:function(){return d}}),a.r(789798).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},493845,(a,b,c)=>{"use strict";function d(){throw Object.defineProperty(Error("`unauthorized()` is experimental and only allowed to be used when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E411",enumerable:!1,configurable:!0})}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unauthorized",{enumerable:!0,get:function(){return d}}),a.r(789798).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},473808,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"isPostpone",{enumerable:!0,get:function(){return e}});let d=Symbol.for("react.postpone");function e(a){return"object"==typeof a&&null!==a&&a.$$typeof===d}},401567,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"isNextRouterError",{enumerable:!0,get:function(){return f}});let d=a.r(789798),e=a.r(328859);function f(a){return(0,e.isRedirectError)(a)||(0,d.isHTTPAccessFallbackError)(a)}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},894783,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unstable_rethrow",{enumerable:!0,get:function(){return function a(b){if((0,g.isNextRouterError)(b)||(0,f.isBailoutToCSRError)(b)||(0,i.isDynamicServerError)(b)||(0,h.isDynamicPostpone)(b)||(0,e.isPostpone)(b)||(0,d.isHangingPromiseRejectionError)(b)||(0,h.isPrerenderInterruptedError)(b))throw b;b instanceof Error&&"cause"in b&&a(b.cause)}}});let d=a.r(13091),e=a.r(473808),f=a.r(149640),g=a.r(401567),h=a.r(660384),i=a.r(696556);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},260968,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unstable_rethrow",{enumerable:!0,get:function(){return d}});let d=a.r(894783).unstable_rethrow;("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},673727,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ReadonlyURLSearchParams:function(){return f.ReadonlyURLSearchParams},RedirectType:function(){return m},forbidden:function(){return i.forbidden},notFound:function(){return h.notFound},permanentRedirect:function(){return g.permanentRedirect},redirect:function(){return g.redirect},unauthorized:function(){return j.unauthorized},unstable_isUnrecognizedActionError:function(){return l},unstable_rethrow:function(){return k.unstable_rethrow}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(920916),g=a.r(844868),h=a.r(416155),i=a.r(934557),j=a.r(493845),k=a.r(260968);function l(){throw Object.defineProperty(Error("`unstable_isUnrecognizedActionError` can only be used on the client."),"__NEXT_ERROR_CODE",{value:"E776",enumerable:!1,configurable:!0})}let m={push:"push",replace:"replace"};("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},570396,a=>{"use strict";a.i(673727),a.s([])},983386,a=>{"use strict";function b(a,b,c,d){let e=null==d||"number"==typeof d||"boolean"==typeof d?d:c(d),f=b.get(e);return void 0===f&&(f=a.call(this,d),b.set(e,f)),f}function c(a,b,c){let d=Array.prototype.slice.call(arguments,3),e=c(d),f=b.get(e);return void 0===f&&(f=a.apply(this,d),b.set(e,f)),f}let d=function(){return JSON.stringify(arguments)};var e=class{constructor(){this.cache=Object.create(null)}get(a){return this.cache[a]}set(a,b){this.cache[a]=b}};let f={create:function(){return new e}};a.s(["memoize",0,function(a,e){let g=e&&e.cache?e.cache:f,h=e&&e.serializer?e.serializer:d;return(e&&e.strategy?e.strategy:function(a,d){var e,f;let g=1===a.length?b:c;return e=d.cache.create(),f=d.serializer,g.bind(this,a,e,f)})(a,{cache:g,serializer:h})},"strategies",0,{variadic:function(a,b){var d,e;return d=b.cache.create(),e=b.serializer,c.bind(this,a,d,e)},monadic:function(a,c){var d,e;return d=c.cache.create(),e=c.serializer,b.bind(this,a,d,e)}}])},118845,a=>{"use strict";var b,c=a.i(983386),d=((b=d||{}).MISSING_MESSAGE="MISSING_MESSAGE",b.MISSING_FORMAT="MISSING_FORMAT",b.ENVIRONMENT_FALLBACK="ENVIRONMENT_FALLBACK",b.INSUFFICIENT_PATH="INSUFFICIENT_PATH",b.INVALID_MESSAGE="INVALID_MESSAGE",b.INVALID_KEY="INVALID_KEY",b.FORMATTING_ERROR="FORMATTING_ERROR",b);function e(a,b){return(0,c.memoize)(a,{cache:{create:()=>({get:a=>b[a],set(a,c){b[a]=c}})},strategy:c.strategies.variadic})}function f(a,b){return e((...b)=>new a(...b),b)}a.s(["I",0,class extends Error{constructor(a,b){let c=a;b&&(c+=": "+b),super(c),this.code=a,b&&(this.originalMessage=b)}},"a",0,d,"b",0,function(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}},"c",0,function(a){return{getDateTimeFormat:f(Intl.DateTimeFormat,a.dateTime),getNumberFormat:f(Intl.NumberFormat,a.number),getPluralRules:f(Intl.PluralRules,a.pluralRules),getRelativeTimeFormat:f(Intl.RelativeTimeFormat,a.relativeTime),getListFormat:f(Intl.ListFormat,a.list),getDisplayNames:f(Intl.DisplayNames,a.displayNames)}},"m",0,e])},731811,a=>{"use strict";var b,c=a.i(983386);let d=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,e=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,f=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,g=/^(@+)?(\+|#+)?[rs]?$/g,h=/(\*)(0+)|(#+)(0+)|(0+)/g,i=/^(0+)$/;function j(a){let b={};return"r"===a[a.length-1]?b.roundingPriority="morePrecision":"s"===a[a.length-1]&&(b.roundingPriority="lessPrecision"),a.replace(g,function(a,c,d){return"string"!=typeof d?(b.minimumSignificantDigits=c.length,b.maximumSignificantDigits=c.length):"+"===d?b.minimumSignificantDigits=c.length:"#"===c[0]?b.maximumSignificantDigits=c.length:(b.minimumSignificantDigits=c.length,b.maximumSignificantDigits=c.length+("string"==typeof d?d.length:0)),""}),b}function k(a){switch(a){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function l(a){let b=k(a);return b||{}}let m=((b={})[b.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",b[b.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",b[b.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",b[b.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",b[b.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",b[b.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",b[b.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",b[b.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",b[b.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",b[b.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",b[b.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",b[b.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",b[b.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",b[b.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",b[b.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",b[b.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",b[b.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",b[b.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",b[b.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",b[b.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",b[b.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",b[b.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",b[b.INVALID_TAG=23]="INVALID_TAG",b[b.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",b[b.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",b[b.UNCLOSED_TAG=27]="UNCLOSED_TAG",b);function n(a){return!!(a&&"object"==typeof a&&0===a.type)}function o(a){return!!(a&&"object"==typeof a&&1===a.type)}let p=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,q={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GS:["H","h","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ku-SY":["H","hB"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]},r=RegExp(`^${p.source}*`),s=RegExp(`${p.source}*$`);function t(a,b){return{start:a,end:b}}let u=!!Object.fromEntries,v=!!String.prototype.trimStart,w=!!String.prototype.trimEnd,x=u?Object.fromEntries:function(a){let b={};for(let[c,d]of a)b[c]=d;return b},y=v?function(a){return a.trimStart()}:function(a){return a.replace(r,"")},z=w?function(a){return a.trimEnd()}:function(a){return a.replace(s,"")},A=RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");var B=class{constructor(a,b={}){this.message=a,this.position={offset:0,line:1,column:1},this.ignoreTag=!!b.ignoreTag,this.locale=b.locale,this.requiresOtherClause=!!b.requiresOtherClause,this.shouldParseSkeletons=!!b.shouldParseSkeletons}parse(){if(0!==this.offset())throw Error("parser can only be used once");if(this.message.length>0){let a=this.message.charCodeAt(0);if(35!==a&&39!==a&&60!==a&&123!==a&&125!==a){let a=function(a){if(0===a.length)return null;let b=1,c=1;for(let d=0;d<a.length;){let e=a.charCodeAt(d);switch(e){case 35:case 39:case 60:case 123:case 125:return null}if(10===e)b++,c=1,d++;else if(c++,e>=55296&&e<=56319&&d+1<a.length){let b=a.charCodeAt(d+1);d+=b>=56320&&b<=57343?2:1}else d++}return{offset:a.length,line:b,column:c}}(this.message);if(a){let b=this.clonePosition();return this.position=a,{val:[{type:0,value:this.message,location:t(b,this.clonePosition())}],err:null}}}}return this.parseMessage(0,"",!1)}parseMessage(a,b,c){let d=[];for(;!this.isEOF();){let e=this.char();if(123===e){let b=this.parseArgument(a,c);if(b.err)return b;d.push(b.val)}else if(125===e&&a>0)break;else if(35===e&&("plural"===b||"selectordinal"===b)){let a=this.clonePosition();this.bump(),d.push({type:7,location:t(a,this.clonePosition())})}else if(60!==e||this.ignoreTag||47!==this.peek())if(60===e&&!this.ignoreTag&&C(this.peek()||0)){let c=this.parseTag(a,b);if(c.err)return c;d.push(c.val)}else{let c=this.parseLiteral(a,b);if(c.err)return c;d.push(c.val)}else if(!c)return this.error(26,t(this.clonePosition(),this.clonePosition()));else break}return{val:d,err:null}}parseTag(a,b){let c=this.clonePosition();this.bump();let d=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:0,value:`<${d}/>`,location:t(c,this.clonePosition())},err:null};if(!this.bumpIf(">"))return this.error(23,t(c,this.clonePosition()));{let e=this.parseMessage(a+1,b,!0);if(e.err)return e;let f=e.val,g=this.clonePosition();if(!this.bumpIf("</"))return this.error(27,t(c,this.clonePosition()));{if(this.isEOF()||!C(this.char()))return this.error(23,t(g,this.clonePosition()));let a=this.clonePosition();return d!==this.parseTagName()?this.error(26,t(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">"))?{val:{type:8,value:d,children:f,location:t(c,this.clonePosition())},err:null}:this.error(23,t(g,this.clonePosition()))}}}parseTagName(){var a;let b=this.offset();for(this.bump();!this.isEOF()&&(45===(a=this.char())||46===a||a>=48&&a<=57||95===a||a>=97&&a<=122||a>=65&&a<=90||183==a||a>=192&&a<=214||a>=216&&a<=246||a>=248&&a<=893||a>=895&&a<=8191||a>=8204&&a<=8205||a>=8255&&a<=8256||a>=8304&&a<=8591||a>=11264&&a<=12271||a>=12289&&a<=55295||a>=63744&&a<=64975||a>=65008&&a<=65533||a>=65536&&a<=983039);)this.bump();return this.message.slice(b,this.offset())}parseLiteral(a,b){let c=this.clonePosition(),d="";for(;;){let c=this.tryParseQuote(b);if(c){d+=c;continue}let e=this.tryParseUnquoted(a,b);if(e){d+=e;continue}let f=this.tryParseLeftAngleBracket();if(f){d+=f;continue}break}return{val:{type:0,value:d,location:t(c,this.clonePosition())},err:null}}tryParseLeftAngleBracket(){var a;return this.isEOF()||60!==this.char()||!this.ignoreTag&&(C(a=this.peek()||0)||47===a)?null:(this.bump(),"<")}tryParseQuote(a){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===a||"selectordinal"===a)break;return null;default:return null}this.bump();let b=[this.char()];for(this.bump();!this.isEOF();){let a=this.char();if(39===a)if(39===this.peek())b.push(39),this.bump();else{this.bump();break}else b.push(a);this.bump()}return String.fromCodePoint(...b)}tryParseUnquoted(a,b){if(this.isEOF())return null;let c=this.char();return 60===c||123===c||35===c&&("plural"===b||"selectordinal"===b)||125===c&&a>0?null:(this.bump(),String.fromCodePoint(c))}parseArgument(a,b){let c=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,t(c,this.clonePosition()));if(125===this.char())return this.bump(),this.error(2,t(c,this.clonePosition()));let d=this.parseIdentifierIfPossible().value;if(!d)return this.error(3,t(c,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,t(c,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:d,location:t(c,this.clonePosition())},err:null};case 44:if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,t(c,this.clonePosition()));return this.parseArgumentOptions(a,b,d,c);default:return this.error(3,t(c,this.clonePosition()))}}parseIdentifierIfPossible(){var a;let b=this.clonePosition(),c=this.offset(),d=(a=this.message,A.lastIndex=c,A.exec(a)[1]??""),e=c+d.length;return this.bumpTo(e),{value:d,location:t(b,this.clonePosition())}}parseArgumentOptions(a,b,c,e){let f=this.clonePosition(),g=this.parseIdentifierIfPossible().value,h=this.clonePosition();switch(g){case"":return this.error(4,t(f,h));case"number":case"date":case"time":{this.bumpSpace();let a=null;if(this.bumpIf(",")){this.bumpSpace();let b=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;let d=z(c.val);if(0===d.length)return this.error(6,t(this.clonePosition(),this.clonePosition()));a={style:d,styleLocation:t(b,this.clonePosition())}}let b=this.tryParseArgumentClose(e);if(b.err)return b;let f=t(e,this.clonePosition());if(a&&a.style.startsWith("::")){let b=y(a.style.slice(2));if("number"===g){let d=this.parseNumberSkeletonFromString(b,a.styleLocation);if(d.err)return d;return{val:{type:2,value:c,location:f,style:d.val},err:null}}{let e;if(0===b.length)return this.error(10,f);let h=b;return this.locale&&(h=function(a,b){let c="";for(let d=0;d<a.length;d++){let e=a.charAt(d);if("j"===e){let f=0;for(;d+1<a.length&&a.charAt(d+1)===e;)f++,d++;let g=1+(1&f),h=f<2?1:3+(f>>1),i=function(a){let b,c=a.hourCycle;if(void 0===c&&a.hourCycles&&a.hourCycles.length&&(c=a.hourCycles[0]),c)switch(c){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw Error("Invalid hourCycle")}let d=a.language;return"root"!==d&&(b=a.maximize().region),(q[b||""]||q[d||""]||q[`${d}-001`]||q["001"])[0]}(b);for(("H"==i||"k"==i)&&(h=0);h-- >0;)c+="a";for(;g-- >0;)c=i+c}else"J"===e?c+="H":c+=e}return c}(b,this.locale)),{val:{type:"date"===g?3:4,value:c,location:f,style:{type:1,pattern:h,location:a.styleLocation,parsedOptions:this.shouldParseSkeletons?(e={},h.replace(d,a=>{let b=a.length;switch(a[0]){case"G":e.era=4===b?"long":5===b?"narrow":"short";break;case"y":e.year=2===b?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][b-1];break;case"w":case"W":throw RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][b-1];break;case"D":case"F":case"g":throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=4===b?"long":5===b?"narrow":"short";break;case"e":if(b<4)throw RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][b-3];break;case"c":if(b<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][b-3];break;case"a":e.hour12=!0;break;case"b":case"B":throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][b-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][b-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][b-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][b-1];break;case"j":case"J":case"C":throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][b-1];break;case"s":e.second=["numeric","2-digit"][b-1];break;case"S":case"A":throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=b<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e):{}}},err:null}}}return{val:{type:"number"===g?2:"date"===g?3:4,value:c,location:f,style:a?.style??null},err:null}}case"plural":case"selectordinal":case"select":{let d=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(12,t(d,{...d}));this.bumpSpace();let f=this.parseIdentifierIfPossible(),h=0;if("select"!==g&&"offset"===f.value){if(!this.bumpIf(":"))return this.error(13,t(this.clonePosition(),this.clonePosition()));this.bumpSpace();let a=this.tryParseDecimalInteger(13,14);if(a.err)return a;this.bumpSpace(),f=this.parseIdentifierIfPossible(),h=a.val}let i=this.tryParsePluralOrSelectOptions(a,g,b,f);if(i.err)return i;let j=this.tryParseArgumentClose(e);if(j.err)return j;let k=t(e,this.clonePosition());if("select"===g)return{val:{type:5,value:c,options:x(i.val),location:k},err:null};return{val:{type:6,value:c,options:x(i.val),offset:h,pluralType:"plural"===g?"cardinal":"ordinal",location:k},err:null}}default:return this.error(5,t(f,h))}}tryParseArgumentClose(a){return this.isEOF()||125!==this.char()?this.error(1,t(a,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let a=0,b=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(11,t(a,this.clonePosition()));this.bump();break}case 123:a+=1,this.bump();break;case 125:if(!(a>0))return{val:this.message.slice(b.offset,this.offset()),err:null};a-=1;break;default:this.bump()}return{val:this.message.slice(b.offset,this.offset()),err:null}}parseNumberSkeletonFromString(a,b){let c=[];try{c=function(a){if(0===a.length)throw Error("Number skeleton cannot be empty");let b=a.split(e).filter(a=>a.length>0),c=[];for(let a of b){let b=a.split("/");if(0===b.length)throw Error("Invalid number skeleton");let[d,...e]=b;for(let a of e)if(0===a.length)throw Error("Invalid number skeleton");c.push({stem:d,options:e})}return c}(a)}catch{return this.error(7,b)}return{val:{type:0,tokens:c,location:b,parsedOptions:this.shouldParseSkeletons?function(a){let b={};for(let c of a){switch(c.stem){case"percent":case"%":b.style="percent";continue;case"%x100":b.style="percent",b.scale=100;continue;case"currency":b.style="currency",b.currency=c.options[0];continue;case"group-off":case",_":b.useGrouping=!1;continue;case"precision-integer":case".":b.maximumFractionDigits=0;continue;case"measure-unit":case"unit":b.style="unit",b.unit=c.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":b.notation="compact",b.compactDisplay="short";continue;case"compact-long":case"KK":b.notation="compact",b.compactDisplay="long";continue;case"scientific":b={...b,notation:"scientific",...c.options.reduce((a,b)=>({...a,...l(b)}),{})};continue;case"engineering":b={...b,notation:"engineering",...c.options.reduce((a,b)=>({...a,...l(b)}),{})};continue;case"notation-simple":b.notation="standard";continue;case"unit-width-narrow":b.currencyDisplay="narrowSymbol",b.unitDisplay="narrow";continue;case"unit-width-short":b.currencyDisplay="code",b.unitDisplay="short";continue;case"unit-width-full-name":b.currencyDisplay="name",b.unitDisplay="long";continue;case"unit-width-iso-code":b.currencyDisplay="symbol";continue;case"scale":b.scale=parseFloat(c.options[0]);continue;case"rounding-mode-floor":b.roundingMode="floor";continue;case"rounding-mode-ceiling":b.roundingMode="ceil";continue;case"rounding-mode-down":b.roundingMode="trunc";continue;case"rounding-mode-up":b.roundingMode="expand";continue;case"rounding-mode-half-even":b.roundingMode="halfEven";continue;case"rounding-mode-half-down":b.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":b.roundingMode="halfExpand";continue;case"integer-width":if(c.options.length>1)throw RangeError("integer-width stems only accept a single optional option");c.options[0].replace(h,function(a,c,d,e,f,g){if(c)b.minimumIntegerDigits=d.length;else if(e&&f)throw Error("We currently do not support maximum integer digits");else if(g)throw Error("We currently do not support exact integer digits");return""});continue}if(i.test(c.stem)){b.minimumIntegerDigits=c.stem.length;continue}if(f.test(c.stem)){if(c.options.length>1)throw RangeError("Fraction-precision stems only accept a single optional option");c.stem.replace(f,function(a,c,d,e,f,g){return"*"===d?b.minimumFractionDigits=c.length:e&&"#"===e[0]?b.maximumFractionDigits=e.length:f&&g?(b.minimumFractionDigits=f.length,b.maximumFractionDigits=f.length+g.length):(b.minimumFractionDigits=c.length,b.maximumFractionDigits=c.length),""});let a=c.options[0];"w"===a?b={...b,trailingZeroDisplay:"stripIfInteger"}:a&&(b={...b,...j(a)});continue}if(g.test(c.stem)){b={...b,...j(c.stem)};continue}let a=k(c.stem);a&&(b={...b,...a});let d=function(a){let b;if("E"===a[0]&&"E"===a[1]?(b={notation:"engineering"},a=a.slice(2)):"E"===a[0]&&(b={notation:"scientific"},a=a.slice(1)),b){let c=a.slice(0,2);if("+!"===c?(b.signDisplay="always",a=a.slice(2)):"+?"===c&&(b.signDisplay="exceptZero",a=a.slice(2)),!i.test(a))throw Error("Malformed concise eng/scientific notation");b.minimumIntegerDigits=a.length}return b}(c.stem);d&&(b={...b,...d})}return b}(c):{}},err:null}}tryParsePluralOrSelectOptions(a,b,c,d){let e=!1,f=[],g=new Set,{value:h,location:i}=d;for(;;){if(0===h.length){let a=this.clonePosition();if("select"!==b&&this.bumpIf("=")){let b=this.tryParseDecimalInteger(16,19);if(b.err)return b;i=t(a,this.clonePosition()),h=this.message.slice(a.offset,this.offset())}else break}if(g.has(h))return this.error("select"===b?21:20,i);"other"===h&&(e=!0),this.bumpSpace();let d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===b?17:18,t(this.clonePosition(),this.clonePosition()));let j=this.parseMessage(a+1,b,c);if(j.err)return j;let k=this.tryParseArgumentClose(d);if(k.err)return k;f.push([h,{value:j.val,location:t(d,this.clonePosition())}]),g.add(h),this.bumpSpace(),{value:h,location:i}=this.parseIdentifierIfPossible()}return 0===f.length?this.error("select"===b?15:16,t(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!e?this.error(22,t(this.clonePosition(),this.clonePosition())):{val:f,err:null}}tryParseDecimalInteger(a,b){let c=1,d=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(c=-1);let e=!1,f=0;for(;!this.isEOF();){let a=this.char();if(a>=48&&a<=57)e=!0,f=10*f+(a-48),this.bump();else break}let g=t(d,this.clonePosition());return e?Number.isSafeInteger(f*=c)?{val:f,err:null}:this.error(b,g):this.error(a,g)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let a=this.position.offset;if(a>=this.message.length)throw Error("out of bound");let b=this.message.codePointAt(a);if(void 0===b)throw Error(`Offset ${a} is at invalid UTF-16 code unit boundary`);return b}error(a,b){return{val:null,err:{kind:a,message:this.message,location:b}}}bump(){if(this.isEOF())return;let a=this.char();10===a?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=a<65536?1:2)}bumpIf(a){if(this.message.startsWith(a,this.offset())){for(let b=0;b<a.length;b++)this.bump();return!0}return!1}bumpUntil(a){let b=this.offset(),c=this.message.indexOf(a,b);return c>=0?(this.bumpTo(c),!0):(this.bumpTo(this.message.length),!1)}bumpTo(a){if(this.offset()>a)throw Error(`targetOffset ${a} must be greater than or equal to the current offset ${this.offset()}`);for(a=Math.min(a,this.message.length);;){let b=this.offset();if(b===a)break;if(b>a)throw Error(`targetOffset ${a} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(var a;!this.isEOF()&&((a=this.char())>=9&&a<=13||32===a||133===a||a>=8206&&a<=8207||8232===a||8233===a);)this.bump()}peek(){if(this.isEOF())return null;let a=this.char(),b=this.offset();return this.message.charCodeAt(b+(a>=65536?2:1))??null}};function C(a){return a>=97&&a<=122||a>=65&&a<=90}function D(a,b={}){let c=new B(a,b={shouldParseSkeletons:!0,requiresOtherClause:!0,...b}).parse();if(c.err){let a=SyntaxError(m[c.err.kind]);throw a.location=c.err.location,a.originalMessage=c.err.message,a}return b?.captureLocation||function a(b){b.forEach(b=>{if(delete b.location,5===b.type||6===b.type)for(let c in b.options)delete b.options[c].location,a(b.options[c].value);else 2===b.type&&n(b.style)||(3===b.type||4===b.type)&&o(b.style)?delete b.style.location:8===b.type&&a(b.children)})}(c.val),c.val}var E=class extends Error{constructor(a,b,c){super(a),this.code=b,this.originalMessage=c}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},F=class extends E{constructor(a,b,c,d){super(`Invalid values for "${a}": "${b}". Options are "${Object.keys(c).join('", "')}"`,"INVALID_VALUE",d)}},G=class extends E{constructor(a,b,c){super(`Value for "${a}" must be of type ${b}`,"INVALID_VALUE",c)}},H=class extends E{constructor(a,b){super(`The intl string context variable "${a}" was not provided to the string "${b}"`,"MISSING_VALUE",b)}};function I(a){return{create:()=>({get:b=>a[b],set(b,c){a[b]=c}})}}var J=class a{constructor(b,d=a.defaultLocale,e,f){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=a=>{let b=this.formatToParts(a);if(1===b.length)return b[0].value;let c=b.reduce((a,b)=>(a.length&&0===b.type&&"string"==typeof a[a.length-1]?a[a.length-1]+=b.value:a.push(b.value),a),[]);return c.length<=1?c[0]||"":c},this.formatToParts=a=>(function a(b,c,d,e,f,g,h){if(1===b.length&&0===b[0].type)return[{type:0,value:b[0].value}];let i=[];for(let j of b){if(0===j.type){i.push({type:0,value:j.value});continue}if(7===j.type){"number"==typeof g&&i.push({type:0,value:d.getNumberFormat(c).format(g)});continue}let{value:b}=j;if(!(f&&b in f))throw new H(b,h);let k=f[b];if(1===j.type){k&&"string"!=typeof k&&"number"!=typeof k&&"bigint"!=typeof k||(k="string"==typeof k||"number"==typeof k||"bigint"==typeof k?String(k):""),i.push({type:+("string"!=typeof k),value:k});continue}if(3===j.type){let a="string"==typeof j.style?e.date[j.style]:o(j.style)?j.style.parsedOptions:void 0;i.push({type:0,value:d.getDateTimeFormat(c,a).format(k)});continue}if(4===j.type){let a="string"==typeof j.style?e.time[j.style]:o(j.style)?j.style.parsedOptions:e.time.medium;i.push({type:0,value:d.getDateTimeFormat(c,a).format(k)});continue}if(2===j.type){let a="string"==typeof j.style?e.number[j.style]:n(j.style)?j.style.parsedOptions:void 0;if(a&&a.scale){let b=a.scale||1;if("bigint"==typeof k){if(!Number.isInteger(b))throw TypeError(`Cannot apply fractional scale ${b} to bigint value. Scale must be an integer when formatting bigint.`);k*=BigInt(b)}else k*=b}i.push({type:0,value:d.getNumberFormat(c,a).format(k)});continue}if(8===j.type){let{children:b,value:k}=j,l=f[k];if("function"!=typeof l)throw new G(k,"function",h);let m=l(a(b,c,d,e,f,g).map(a=>a.value));Array.isArray(m)||(m=[m]),i.push(...m.map(a=>({type:+("string"!=typeof a),value:a})))}if(5===j.type){let b=k,g=(Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0)||j.options.other;if(!g)throw new F(j.value,k,Object.keys(j.options),h);i.push(...a(g.value,c,d,e,f));continue}if(6===j.type){let b=`=${k}`,g=Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0;if(!g){if(!Intl.PluralRules)throw new E(`Intl.PluralRules is not available in this environment.
|
|
2
|
-
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
|
-
`,"MISSING_INTL_API",h);let a="bigint"==typeof k?Number(k):k,b=d.getPluralRules(c,{type:j.pluralType}).select(a-(j.offset||0));g=(Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0)||j.options.other}if(!g)throw new F(j.value,k,Object.keys(j.options),h);let l="bigint"==typeof k?Number(k):k;i.push(...a(g.value,c,d,e,f,l-(j.offset||0)));continue}}return i.length<2?i:i.reduce((a,b)=>{let c=a[a.length-1];return c&&0===c.type&&0===b.type?c.value+=b.value:a.push(b),a},[])})(this.ast,this.locales,this.formatters,this.formats,a,void 0,this.message),this.resolvedOptions=()=>({locale:this.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}),this.getAst=()=>this.ast,this.locales=d,this.resolvedLocale=a.resolveLocale(d),"string"==typeof b){if(this.message=b,!a.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...c}=f||{};this.ast=a.__parse(b,{...c,locale:this.resolvedLocale})}else this.ast=b;if(!Array.isArray(this.ast))throw TypeError("A message must be provided as a String or AST.");this.formats=function(a,b){return b?Object.keys(a).reduce((c,d)=>{var e,f;return c[d]=(e=a[d],(f=b[d])?{...e,...f,...Object.keys(e).reduce((a,b)=>(a[b]={...e[b],...f[b]},a),{})}:e),c},{...a}):a}(a.formats,e),this.formatters=f&&f.formatters||function(a={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:(0,c.memoize)((...a)=>new Intl.NumberFormat(...a),{cache:I(a.number),strategy:c.strategies.variadic}),getDateTimeFormat:(0,c.memoize)((...a)=>new Intl.DateTimeFormat(...a),{cache:I(a.dateTime),strategy:c.strategies.variadic}),getPluralRules:(0,c.memoize)((...a)=>new Intl.PluralRules(...a),{cache:I(a.pluralRules),strategy:c.strategies.variadic})}}(this.formatterCache)}static{this.memoizedDefaultLocale=null}static get defaultLocale(){return a.memoizedDefaultLocale||(a.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),a.memoizedDefaultLocale}static{this.resolveLocale=a=>{if(void 0===Intl.Locale)return;let b=Intl.NumberFormat.supportedLocalesOf(a);return new Intl.Locale(b.length>0?b[0]:"string"==typeof a?a:a[0])}}static{this.__parse=D}static{this.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}};a.s(["IntlMessageFormat",0,J],731811)},836772,a=>{"use strict";var b=a.i(800717),c=a.i(731811),d=a.i(118845);function e(...[a,f,g,h]){let i;if(Array.isArray(f))throw new d.I(d.a.INVALID_MESSAGE,void 0);if("object"==typeof f)throw new d.I(d.a.INSUFFICIENT_PATH,void 0);if("string"==typeof f){let a=g||/'[{}<#|']/.test(f)?void 0:f;if(a)return a}let{cache:j,formats:k,formatters:l,globalFormats:m,locale:n,timeZone:o}=h;l.getMessageFormat||(l.getMessageFormat=(0,d.m)((...a)=>new c.IntlMessageFormat(a[0],a[1],a[2],{formatters:l,...a[3]}),j.message));try{let a,b,d,e;i=l.getMessageFormat(f,n,(a=c.IntlMessageFormat.formats.date,b=c.IntlMessageFormat.formats.time,d={...m?.dateTime,...k?.dateTime},e={date:{...a,...d},time:{...b,...d},number:{...m?.number,...k?.number}},o&&["date","time"].forEach(a=>{let b=e[a];for(let[a,c]of Object.entries(b))b[a]={timeZone:o,...c}}),e),{formatters:{...l,getDateTimeFormat:(a,b)=>l.getDateTimeFormat(a,{...b,timeZone:b?.timeZone??o})}})}catch(a){throw new d.I(d.a.INVALID_MESSAGE,void 0)}let p=i.format(g);return(0,b.isValidElement)(p)||Array.isArray(p)||"string"==typeof p?p:String(p)}function f(...a){return a.filter(Boolean).join(".")}function g(a){return f(a.namespace,a.key)}function h(a){console.error(a)}function i(a,b,c,d){let e=f(d,c);if(!b)throw Error(e);let g=b;return c.split(".").forEach(b=>{let c=g[b];if(null==b||null==c)throw Error(e+` (${a})`);g=c}),g}e.raw=!0,a.s(["a",0,function(a){let c=function(a,b,c){try{if(!b)throw Error(void 0);let d=c?i(a,b,c):b;if(!d)throw Error(c);return d}catch(a){return new d.I(d.a.MISSING_MESSAGE,a.message)}}(a.locale,a.messages,a.namespace);return function({cache:a,formats:c,formatters:h,getMessageFallback:j=g,locale:k,messagesOrError:l,namespace:m,onError:n,timeZone:o}){let p=l instanceof d.I;function q(a,b,c,e){let f=new d.I(b,c);return n(f),e??j({error:f,key:a,namespace:m})}function r(g,r,s,t){let u;if(p){if(!t)return n(l),j({error:l,key:g,namespace:m});u=t}else try{u=i(k,l,g,m)}catch(a){if(!t)return q(g,d.a.MISSING_MESSAGE,a.message,t);u=t}try{let d,i=f(m,g);return e(i,u,r?(d={},Object.keys(r).forEach(a=>{let c,e=0,f=r[a];c="function"==typeof f?c=>{let d=f(c);return(0,b.isValidElement)(d)?(0,b.cloneElement)(d,{key:a+e++}):d}:f,d[a]=c}),d):r,{cache:a,formatters:h,globalFormats:c,formats:s,locale:k,timeZone:o})}catch(c){let a,b;return c instanceof d.I?(a=c.code,b=c.originalMessage):(a=d.a.FORMATTING_ERROR,b=c.message),q(g,a,b,t)}}function s(a,b,c,e){let f=r(a,b,c,e);return"string"!=typeof f?q(a,d.a.INVALID_MESSAGE,void 0):f}return s.rich=r,s.markup=(a,b,c,d)=>r(a,b,c,d),s.raw=a=>{if(p)return n(l),j({error:l,key:a,namespace:m});try{return i(k,l,a,m)}catch(b){return q(a,d.a.MISSING_MESSAGE,b.message)}},s.has=a=>{if(p)return!1;try{return i(k,l,a,m),!0}catch{return!1}},s}({...a,messagesOrError:c})},"b",0,h,"d",0,g,"i",0,function({formats:a,getMessageFallback:b,messages:c,onError:d,...e}){return{...e,formats:a||void 0,messages:c||void 0,onError:d||h,getMessageFallback:b||g}},"r",0,function(a,b){return a===b?void 0:a.slice((b+".").length)}],836772)},303109,a=>{"use strict";var b=a.i(118845),c=a.i(836772);a.s(["createTranslator",0,function({_cache:a=(0,b.b)(),_formatters:d=(0,b.c)(a),getMessageFallback:e=c.d,messages:f,namespace:g,onError:h=c.b,...i}){return function({messages:a,namespace:b,...d}){return a=a["!"],b=(0,c.r)(b,"!"),(0,c.a)({...d,messages:a,namespace:b})}({...i,onError:h,cache:a,formatters:d,getMessageFallback:e,messages:{"!":f},namespace:g?`!.${g}`:"!"})},"hasLocale",0,function(a,b){return a.includes(b)}])},522918,520276,113852,861457,286661,a=>{"use strict";var b=a.i(836772);a.s(["initializeConfig",()=>b.i],522918);var c=a.i(118845);function d(a){let b=function(){try{return"true"===process.env._next_intl_trailing_slash}catch{return!1}}(),[c,...d]=a.split("#"),e=d.join("#"),f=c;if("/"!==f){let a=f.endsWith("/");b&&!a?f+="/":!b&&a&&(f=f.slice(0,-1))}return e&&(f+="#"+e),f}function e(a){return a.includes("[[...")}function f(a){return a.includes("[...")}function g(a){return a.includes("[")}function h(a,b){let c=a.split("/"),d=b.split("/"),h=Math.max(c.length,d.length);for(let a=0;a<h;a++){let b=c[a],h=d[a];if(!b&&h)return -1;if(b&&!h)return 1;if(b||h){if(!g(b)&&g(h))return -1;if(g(b)&&!g(h))return 1;if(!f(b)&&f(h))return -1;if(f(b)&&!f(h))return 1;if(!e(b)&&e(h))return -1;if(e(b)&&!e(h))return 1}}return 0}function i(a){return"function"==typeof a.then}a.s(["_createIntlFormatters",()=>c.c],520276),a.s(["_createCache",()=>c.b],113852),a.s(["getLocalePrefix",0,function(a,b){return"never"!==b.mode&&b.prefixes?.[a]||"/"+a},"getLocalizedTemplate",0,function(a,b,c){return"string"==typeof a?a:a[b]||c},"getSortedPathnames",0,function(a){return a.sort(h)},"isLocalizableHref",0,function(a){let b;return("object"==typeof a?null==a.host&&null==a.hostname:!/^[a-z]+:/i.test(a))&&(null==(b="object"==typeof a?a.pathname:a)||!!b.startsWith("/"))},"isPromise",0,i,"matchesPathname",0,function(a,b){let c,e=d(a),f=d(b);return(c=e.replace(/\/\[\[(\.\.\.[^\]]+)\]\]/g,"(?:/(.*))?").replace(/\[\[(\.\.\.[^\]]+)\]\]/g,"(?:/(.*))?").replace(/\[(\.\.\.[^\]]+)\]/g,"(.+)").replace(/\[([^\]]+)\]/g,"([^/]+)"),RegExp(`^${c}$`)).test(f)},"normalizeTrailingSlash",0,d,"prefixPathname",0,function(a,b){let c=a;return/^\/(\?.*)?$/.test(b)&&(b=b.slice(1)),c+=b}],861457);var j=a.i(905246),k=a.i(800717);let l=(0,k.cache)(function(){return{locale:void 0}}),m=(0,k.cache)(async function(){let a=(0,j.headers)();return i(a)?await a:a}),n=(0,k.cache)(async function(){let a;try{a=(await m()).get("X-NEXT-INTL-LOCALE")||void 0}catch(a){if(a instanceof Error&&"DYNAMIC_SERVER_USAGE"===a.digest){let b=Error("Usage of next-intl APIs in Server Components currently opts into dynamic rendering. This limitation will eventually be lifted, but as a stopgap solution, you can use the `setRequestLocale` API to enable static rendering, see https://next-intl.dev/docs/routing/setup#static-rendering",{cause:a});throw b.digest=a.digest,b}throw a}return a});async function o(){return l().locale||await n()}a.s(["getRequestLocale",0,o],286661)},332776,885221,767228,a=>{"use strict";var b=a.i(800717),c=a.i(522918),d=a.i(520276),e=a.i(113852),f=a.i(861457),g=a.i(286661),h=a.i(303109);let i={locales:["en","es","fr","de"],defaultLocale:"en",localePrefix:"always"};a.s(["routing",0,i],885221);let j=async({requestLocale:b})=>{let c=await b,d=(0,h.hasLocale)(i.locales,c)?c:i.defaultLocale;return{locale:d,messages:(await a.f({"../../messages/de.json":{id:()=>561451,module:()=>a.A(561451)},"../../messages/en.json":{id:()=>412437,module:()=>a.A(412437)},"../../messages/es.json":{id:()=>83578,module:()=>a.A(83578)},"../../messages/fr.json":{id:()=>276111,module:()=>a.A(276111)}}).import(`../../messages/${d}.json`)).default}},k=(0,b.cache)(function(){return Intl.DateTimeFormat().resolvedOptions().timeZone}),l=(0,b.cache)(async function(a,b){let c=a({locale:b,get requestLocale(){return b?Promise.resolve(b):(0,g.getRequestLocale)()}});if((0,f.isPromise)(c)&&(c=await c),!c.locale)throw Error("No locale was returned from `getRequestConfig`.\n\nSee https://next-intl.dev/docs/usage/configuration#i18n-request");return c}),m=(0,b.cache)(d._createIntlFormatters),n=(0,b.cache)(e._createCache),o=(0,b.cache)(async function(a){let b=await l(j,a);return{...(0,c.initializeConfig)(b),_formatters:m(n()),timeZone:b.timeZone||k()}});a.s(["default",0,o],767228);var p=(0,b.cache)(function(a,b){return(0,h.createTranslator)({...a,namespace:b})}),q=(0,b.cache)(async function(a){let b,c;return"string"==typeof a?b=a:a&&(c=a.locale,b=a.namespace),p(await o(c),b)});a.s(["getTranslations",0,q],332776)}];
|
|
4
|
-
|
|
5
|
-
//# sourceMappingURL=node_modules_1n5939e._.js.map
|
/package/standalone/.next/static/{sJ09NBDjsLncJEkHNWbdR → qUqJkVkzos1XoXFl7PSxx}/_buildManifest.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/standalone/.next/static/{sJ09NBDjsLncJEkHNWbdR → qUqJkVkzos1XoXFl7PSxx}/_ssgManifest.js
RENAMED
|
File without changes
|