tower-studio 0.1.11 → 0.1.12
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/cache/.previewinfo +1 -1
- package/.next/cache/.rscinfo +1 -1
- package/.next/diagnostics/route-bundle-stats.json +40 -40
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/_not-found/page/server-reference-manifest.json +25 -25
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +13 -13
- package/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
- package/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
- package/.next/server/app/api/internal/assistant/images/route.js.nft.json +1 -1
- package/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
- package/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
- package/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
- package/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +13 -13
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +13 -13
- package/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/server/app/index.segments/_index.segment.rsc +8 -8
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/missions/page/server-reference-manifest.json +51 -51
- package/.next/server/app/missions/page.js.nft.json +1 -1
- package/.next/server/app/missions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/onboarding/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/onboarding/page/server-reference-manifest.json +25 -25
- package/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/server/app/onboarding.html +1 -1
- package/.next/server/app/onboarding.rsc +15 -15
- package/.next/server/app/onboarding.segments/_full.segment.rsc +15 -15
- package/.next/server/app/onboarding.segments/_head.segment.rsc +4 -4
- package/.next/server/app/onboarding.segments/_index.segment.rsc +8 -8
- package/.next/server/app/onboarding.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
- package/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/page/server-reference-manifest.json +25 -25
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/settings/page/server-reference-manifest.json +34 -34
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +15 -15
- package/.next/server/app/settings.segments/_full.segment.rsc +15 -15
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +8 -8
- package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +77 -77
- package/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +74 -74
- package/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +61 -61
- package/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +53 -53
- package/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +25 -25
- package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +58 -58
- package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/page/server-reference-manifest.json +45 -45
- package/.next/server/app/workspaces/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/0uz~_next_dist_esm_build_templates_app-route_05yec2y.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0~33o~m._.js +1 -1
- package/.next/server/chunks/project_f_tower_0n1s3ym._.js +1 -1
- package/.next/server/chunks/project_f_tower_src_11e.cv5._.js +1 -1
- package/.next/server/chunks/ssr/04uy_src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_01.s1p0._.js +1 -1
- package/.next/server/chunks/ssr/0y0r_f_tower_src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0n4g3bn._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__06qzctf._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__08meal1._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ffdrwp._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0fwuc5u._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0i4rk9v._.js +3 -3
- package/.next/server/chunks/ssr/{[root-of-the-server]__06japut._.js → [root-of-the-server]__0la.lch._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0nmyvwk._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0fu82np._.js → [root-of-the-server]__0p~~40h._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0w7gbe7._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__11j4k9o._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__13cjs8r._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__13eo85g._.js +1 -1
- package/.next/server/chunks/ssr/{project_f_tower_0n6q9zh._.js → project_f_tower_0.k8r5w._.js} +2 -2
- package/.next/server/chunks/ssr/project_f_tower_0.txwd8._.js +1 -1
- package/.next/server/chunks/ssr/{project_f_tower_0jdkold._.js → project_f_tower_0c6n7oo._.js} +2 -2
- package/.next/server/chunks/ssr/project_f_tower_0dfyjgz._.js +3 -0
- package/.next/server/chunks/ssr/project_f_tower_0f0-wva._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0hgtev9._.js +1 -1
- package/.next/server/chunks/ssr/{project_f_tower_0xkqjno._.js → project_f_tower_0ifpw8k._.js} +2 -2
- package/.next/server/chunks/ssr/project_f_tower_0ivvjwd._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0jy~1uf._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0l6ssf8._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0o5.y1e._.js +1 -1
- package/.next/server/chunks/ssr/{project_f_tower_0h79vn0._.js → project_f_tower_0ron~f-._.js} +2 -2
- package/.next/server/chunks/ssr/{project_f_tower_0ghw~2t._.js → project_f_tower_0t0smg9._.js} +2 -2
- package/.next/server/chunks/ssr/project_f_tower_0ym-aea._.js +1 -1
- package/.next/server/chunks/ssr/{project_f_tower_src_0yr8rna._.js → project_f_tower_src_0_g15e8._.js} +2 -2
- package/.next/server/chunks/ssr/project_f_tower_src_actions_agent-actions_ts_0.s4~m-._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_actions_file-actions_ts_02i742t._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_app_missions_missions-client_tsx_0ums4qx._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_app_onboarding_page_tsx_0_9_yoq._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_app_settings_page_tsx_0oo06~d._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_app_workspaces_[workspaceId]_board-page-client_tsx_0jmj1xz._.js +1 -1
- package/.next/server/instrumentation.js.nft.json +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +205 -205
- package/.next/static/chunks/{0dlrmobwx~tvz.js → 0-plp~pgpcel9.js} +1 -1
- package/.next/static/chunks/{06hfc~t6~gtz9.js → 0.do_z22ngnjd.js} +1 -1
- package/.next/static/chunks/00atyrg-7i0hj.js +1 -0
- package/.next/static/chunks/{0kyb0fcxzykkx.js → 01mymnegugktp.js} +1 -1
- package/.next/static/chunks/09hs9w6-77im2.js +1 -0
- package/.next/static/chunks/09hxu-k8oyivu.js +1 -0
- package/.next/static/chunks/{0afji0z13kos5.js → 09p7-kr_vidww.js} +2 -2
- package/.next/static/chunks/{006_yes1e~uq-.js → 0c49o.5w_cw8_.js} +1 -1
- package/.next/static/chunks/{0upxmdjt9neoj.js → 0d.3wv6u.2g~6.js} +1 -1
- package/.next/static/chunks/0im8~yii0.2mn.js +1 -0
- package/.next/static/chunks/0kbuf91gryyo2.js +1 -0
- package/.next/static/chunks/0p~3m91-t6p91.js +1 -0
- package/.next/static/chunks/{06xnbktd_jmb4.js → 0qp~1_kfjklfg.js} +1 -1
- package/.next/static/chunks/{10xx474hrm.03.js → 0vs5vey5ni44t.js} +1 -1
- package/.next/static/chunks/15zclhqyib88_.js +1 -0
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/bin/tower.mjs +9 -0
- package/package.json +1 -1
- package/scripts/generate-prisma-client.js +2 -17
- package/.next/server/chunks/ssr/[root-of-the-server]__0db_p8v._.js +0 -3
- package/.next/server/chunks/ssr/project_f_tower_03k0qr1._.js +0 -3
- package/.next/static/chunks/03~7u57dwxswo.js +0 -1
- package/.next/static/chunks/054pu3m7e37gx.js +0 -1
- package/.next/static/chunks/05fge.5j9lnpa.js +0 -1
- package/.next/static/chunks/0azbwlqgcxx~9.js +0 -1
- package/.next/static/chunks/0g-rx4evmd.pa.js +0 -1
- package/.next/static/chunks/0sa5eiyws1~n0.js +0 -1
- package/.next/static/chunks/16ow8w3exqm6p.js +0 -1
- /package/.next/static/{qVmkMYUuxwdsiFTnn1wfK → jMxcHfsOSldWKgvAjGnAv}/_buildManifest.js +0 -0
- /package/.next/static/{qVmkMYUuxwdsiFTnn1wfK → jMxcHfsOSldWKgvAjGnAv}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{qVmkMYUuxwdsiFTnn1wfK → jMxcHfsOSldWKgvAjGnAv}/_ssgManifest.js +0 -0
|
@@ -80,4 +80,4 @@ out vec4 outColor;
|
|
|
80
80
|
|
|
81
81
|
void main() {
|
|
82
82
|
outColor = v_color;
|
|
83
|
-
}`,o0=8*Float32Array.BYTES_PER_ELEMENT,o1=class{constructor(){this.attributes=new Float32Array(160),this.count=0}},o5=0,o2=0,o3=0,o4=0,o6=0,o8=0,o7=0,o9=class extends np{constructor(e,i,s,r){super(),this._terminal=e,this._gl=i,this._dimensions=s,this._themeService=r,this._vertices=new o1,this._verticesCursor=new o1;let n=this._gl;this._program=n$(oz(n,oJ,oQ)),this._register(nf(()=>n.deleteProgram(this._program))),this._projectionLocation=n$(n.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=n.createVertexArray(),n.bindVertexArray(this._vertexArrayObject);let o=new Float32Array([0,0,1,0,0,1,1,1]),a=n.createBuffer();this._register(nf(()=>n.deleteBuffer(a))),n.bindBuffer(n.ARRAY_BUFFER,a),n.bufferData(n.ARRAY_BUFFER,o,n.STATIC_DRAW),n.enableVertexAttribArray(3),n.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let h=new Uint8Array([0,1,2,3]),l=n.createBuffer();this._register(nf(()=>n.deleteBuffer(l))),n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,l),n.bufferData(n.ELEMENT_ARRAY_BUFFER,h,n.STATIC_DRAW),this._attributesBuffer=n$(n.createBuffer()),this._register(nf(()=>n.deleteBuffer(this._attributesBuffer))),n.bindBuffer(n.ARRAY_BUFFER,this._attributesBuffer),n.enableVertexAttribArray(0),n.vertexAttribPointer(0,2,n.FLOAT,!1,o0,0),n.vertexAttribDivisor(0,1),n.enableVertexAttribArray(1),n.vertexAttribPointer(1,2,n.FLOAT,!1,o0,2*Float32Array.BYTES_PER_ELEMENT),n.vertexAttribDivisor(1,1),n.enableVertexAttribArray(2),n.vertexAttribPointer(2,4,n.FLOAT,!1,o0,4*Float32Array.BYTES_PER_ELEMENT),n.vertexAttribDivisor(2,1),this._updateCachedColors(r.colors),this._register(this._themeService.onChangeColors(e=>{this._updateCachedColors(e),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(e){let i=this._gl;i.useProgram(this._program),i.bindVertexArray(this._vertexArrayObject),i.uniformMatrix4fv(this._projectionLocation,!1,oF),i.bindBuffer(i.ARRAY_BUFFER,this._attributesBuffer),i.bufferData(i.ARRAY_BUFFER,e.attributes,i.DYNAMIC_DRAW),i.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,i.UNSIGNED_BYTE,0,e.count)}handleResize(){this._updateViewportRectangle()}setDimensions(e){this._dimensions=e}_updateCachedColors(e){this._bgFloat=this._colorToFloat32Array(e.background),this._cursorFloat=this._colorToFloat32Array(e.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(e){let i=this._terminal,s=this._vertices,r=1,n,o,a,h,l,c,d,_,u,f,g;for(n=0;n<i.rows;n++){for(a=-1,h=0,l=0,c=!1,o=0;o<i.cols;o++)d=(n*i.cols+o)*4,_=e.cells[d+1],f=!!(0x4000000&(u=e.cells[d+2])),(_!==h||u!==l&&(c||f))&&((0!==h||c&&0!==l)&&(g=8*r++,this._updateRectangle(s,g,l,h,a,o,n)),a=o,h=_,l=u,c=f);(0!==h||c&&0!==l)&&(g=8*r++,this._updateRectangle(s,g,l,h,a,i.cols,n))}s.count=r}updateCursor(e){let i=this._verticesCursor,s=e.cursor;if(!s||"block"===s.style){i.count=0;return}let r,n=0;("bar"===s.style||"outline"===s.style)&&(r=8*n++,this._addRectangleFloat(i.attributes,r,s.x*this._dimensions.device.cell.width,s.y*this._dimensions.device.cell.height,"bar"===s.style?s.dpr*s.cursorWidth:s.dpr,this._dimensions.device.cell.height,this._cursorFloat)),("underline"===s.style||"outline"===s.style)&&(r=8*n++,this._addRectangleFloat(i.attributes,r,s.x*this._dimensions.device.cell.width,(s.y+1)*this._dimensions.device.cell.height-s.dpr,s.width*this._dimensions.device.cell.width,s.dpr,this._cursorFloat)),"outline"===s.style&&(r=8*n++,this._addRectangleFloat(i.attributes,r,s.x*this._dimensions.device.cell.width,s.y*this._dimensions.device.cell.height,s.width*this._dimensions.device.cell.width,s.dpr,this._cursorFloat),r=8*n++,this._addRectangleFloat(i.attributes,r,(s.x+s.width)*this._dimensions.device.cell.width-s.dpr,s.y*this._dimensions.device.cell.height,s.dpr,this._dimensions.device.cell.height,this._cursorFloat)),i.count=n}_updateRectangle(e,i,s,r,n,o,a){if(0x4000000&s)switch(0x3000000&s){case 0x1000000:case 0x2000000:o5=this._themeService.colors.ansi[255&s].rgba;break;case 0x3000000:o5=(0xffffff&s)<<8;break;default:o5=this._themeService.colors.foreground.rgba}else switch(0x3000000&r){case 0x1000000:case 0x2000000:o5=this._themeService.colors.ansi[255&r].rgba;break;case 0x3000000:o5=(0xffffff&r)<<8;break;default:o5=this._themeService.colors.background.rgba}e.attributes.length<i+4&&(e.attributes=function(e,i){let s=new Float32Array(Math.min(2*e.length,i));for(let i=0;i<e.length;i++)s[i]=e[i];return s}(e.attributes,this._terminal.rows*this._terminal.cols*8)),o2=n*this._dimensions.device.cell.width,o3=a*this._dimensions.device.cell.height,o4=(o5>>24&255)/255,o6=(o5>>16&255)/255,o8=(o5>>8&255)/255,o7=1,this._addRectangle(e.attributes,i,o2,o3,(o-n)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,o4,o6,o8,o7)}_addRectangle(e,i,s,r,n,o,a,h,l,c){e[i]=s/this._dimensions.device.canvas.width,e[i+1]=r/this._dimensions.device.canvas.height,e[i+2]=n/this._dimensions.device.canvas.width,e[i+3]=o/this._dimensions.device.canvas.height,e[i+4]=a,e[i+5]=h,e[i+6]=l,e[i+7]=c}_addRectangleFloat(e,i,s,r,n,o,a){e[i]=s/this._dimensions.device.canvas.width,e[i+1]=r/this._dimensions.device.canvas.height,e[i+2]=n/this._dimensions.device.canvas.width,e[i+3]=o/this._dimensions.device.canvas.height,e[i+4]=a[0],e[i+5]=a[1],e[i+6]=a[2],e[i+7]=a[3]}_colorToFloat32Array(e){return new Float32Array([(e.rgba>>24&255)/255,(e.rgba>>16&255)/255,(e.rgba>>8&255)/255,(255&e.rgba)/255])}},ae=class extends np{constructor(e,i,s,r,n,o,a,h){super(),this._container=i,this._alpha=n,this._coreBrowserService=o,this._optionsService=a,this._themeService=h,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${s}-layer`),this._canvas.style.zIndex=r.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(i=>{this._refreshCharAtlas(e,i),this.reset(e)})),this._register(nf(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=n$(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(e){}handleFocus(e){}handleCursorMove(e){}handleGridChanged(e,i,s){}handleSelectionChanged(e,i,s,r=!1){}_setTransparency(e,i){if(i===this._alpha)return;let s=this._canvas;this._alpha=i,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,s),this._refreshCharAtlas(e,this._themeService.colors),this.handleGridChanged(e,0,e.rows-1)}_refreshCharAtlas(e,i){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=oP(e,this._optionsService.rawOptions,i,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(e,i){this._deviceCellWidth=i.device.cell.width,this._deviceCellHeight=i.device.cell.height,this._deviceCharWidth=i.device.char.width,this._deviceCharHeight=i.device.char.height,this._deviceCharLeft=i.device.char.left,this._deviceCharTop=i.device.char.top,this._canvas.width=i.device.canvas.width,this._canvas.height=i.device.canvas.height,this._canvas.style.width=`${i.css.canvas.width}px`,this._canvas.style.height=`${i.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(e,this._themeService.colors)}_fillBottomLineAtCells(e,i,s=1){this._ctx.fillRect(e*this._deviceCellWidth,(i+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,s*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(e,i,s,r){this._alpha?this._ctx.clearRect(e*this._deviceCellWidth,i*this._deviceCellHeight,s*this._deviceCellWidth,r*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(e*this._deviceCellWidth,i*this._deviceCellHeight,s*this._deviceCellWidth,r*this._deviceCellHeight))}_fillCharTrueColor(e,i,s,r){this._ctx.font=this._getFont(e,!1,!1),this._ctx.textBaseline=n4,this._clipCell(s,r,i.getWidth()),this._ctx.fillText(i.getChars(),s*this._deviceCellWidth+this._deviceCharLeft,r*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(e,i,s){this._ctx.beginPath(),this._ctx.rect(e*this._deviceCellWidth,i*this._deviceCellHeight,s*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(e,i,s){let r=i?e.options.fontWeightBold:e.options.fontWeight;return`${s?"italic":""} ${r} ${e.options.fontSize*this._coreBrowserService.dpr}px ${e.options.fontFamily}`}},at=class extends ae{constructor(e,i,s,r,n,o,a){super(s,e,"link",i,!0,n,o,a),this._register(r.onShowLinkUnderline(e=>this._handleShowLinkUnderline(e))),this._register(r.onHideLinkUnderline(e=>this._handleHideLinkUnderline(e)))}resize(e,i){super.resize(e,i),this._state=void 0}reset(e){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(e){var i;if(257===e.fg?this._ctx.fillStyle=this._themeService.colors.background.css:void 0!==e.fg&&((0x3000000&(i=e.fg))==0x1000000||(0x3000000&i)==0x2000000)?this._ctx.fillStyle=this._themeService.colors.ansi[e.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let i=e.y1+1;i<e.y2;i++)this._fillBottomLineAtCells(0,i,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_handleHideLinkUnderline(e){this._clearCurrentLink()}},ai="object"==typeof window?window:globalThis,as=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new ok,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new ok,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,i){if(this.getZoomLevel(i)===e)return;let s=this.getWindowId(i);this.mapWindowIdToZoomLevel.set(s,e),this._onDidChangeZoomLevel.fire(s)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,i){this.mapWindowIdToZoomFactor.set(this.getWindowId(i),e)}setFullscreen(e,i){if(this.isFullscreen(i)===e)return;let s=this.getWindowId(i);this.mapWindowIdToFullScreen.set(s,e),this._onDidChangeFullscreen.fire(s)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};as.INSTANCE=new as,as.INSTANCE.onDidChangeZoomLevel,as.INSTANCE.onDidChangeFullscreen;var ar="object"==typeof navigator?navigator.userAgent:"";ar.indexOf("Firefox"),ar.indexOf("AppleWebKit"),ar.indexOf("Chrome")>=0||ar.indexOf("Safari"),ar.indexOf("Electron/"),ar.indexOf("Android");var an=!1;if("function"==typeof ai.matchMedia){let e=ai.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),i=ai.matchMedia("(display-mode: fullscreen)");an=e.matches,ao=e,"string"==typeof ao&&(ao=ai.matchMedia(ao)),ao.addEventListener("change",({matches:e})=>{an&&i.matches||(an=e)})}var ao,aa,ah,al=!1,ac=!1,ad="en",a_=globalThis;"u">typeof a_.vscode&&"u">typeof a_.vscode.process?ah=a_.vscode.process:"u">typeof x.default&&"string"==typeof x.default?.versions?.node&&(ah=x.default);var au="string"==typeof ah?.versions?.electron&&ah?.type==="renderer";if("object"==typeof ah){ah.platform,ah.platform,"linux"===ah.platform&&ah.env.SNAP&&ah.env.SNAP_REVISION,ah.env.CI||ah.env.BUILD_ARTIFACTSTAGINGDIRECTORY,ad="en";let e=ah.env.VSCODE_NLS_CONFIG;if(e)try{let i=JSON.parse(e);i.userLocale,i.osLocale,ad=i.resolvedLanguage||"en",i.languagePack?.translationsConfigFile}catch{}al=!0}else"object"!=typeof navigator||au?console.error("Unable to resolve platform."):((aa=navigator.userAgent).indexOf("Windows"),aa.indexOf("Macintosh"),(aa.indexOf("Macintosh")>=0||aa.indexOf("iPad")>=0||aa.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,aa.indexOf("Linux"),aa?.indexOf("Mobi"),ac=!0,ad=globalThis._VSCODE_NLS_LANGUAGE||"en",navigator.language.toLowerCase());var af=al;ac&&"function"==typeof a_.importScripts&&a_.origin;var ag,ap=aa,av=ad;(aL=ag||={}).value=function(){return av},aL.isDefaultVariant=function(){return 2===av.length?"en"===av:av.length>=3&&"e"===av[0]&&"n"===av[1]&&"-"===av[2]},aL.isDefault=function(){return"en"===av};var am="function"==typeof a_.postMessage&&!a_.importScripts,aS=(()=>{if(am){let e=[];a_.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let s=0,r=e.length;s<r;s++){let r=e[s];if(r.id===i.data.vscodeScheduleAsyncWork){e.splice(s,1),r.callback();return}}});let i=0;return s=>{let r=++i;e.push({id:r,callback:s}),a_.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})(),aw=!!(ap&&ap.indexOf("Chrome")>=0);ap&&ap.indexOf("Firefox"),!aw&&ap&&ap.indexOf("Safari"),ap&&ap.indexOf("Edg/"),ap&&ap.indexOf("Android");var ab="object"==typeof navigator?navigator:{};af||document.queryCommandSupported&&document.queryCommandSupported("copy")||ab&&ab.clipboard&&ab.clipboard.writeText,af||ab&&ab.clipboard&&ab.clipboard.readText,af||an||ab.keyboard,"ontouchstart"in ai||ab.maxTouchPoints,ai.PointerEvent&&("ontouchstart"in ai||navigator.maxTouchPoints);var aC=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,i){this._keyCodeToStr[e]=i,this._strToKeyCode[i.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},ay=new aC,ax=new aC,ak=new aC;(aM=aE||={}).toString=function(e){return ay.keyCodeToStr(e)},aM.fromString=function(e){return ay.strToKeyCode(e)},aM.toUserSettingsUS=function(e){return ax.keyCodeToStr(e)},aM.toUserSettingsGeneral=function(e){return ak.keyCodeToStr(e)},aM.fromUserSettings=function(e){return ax.strToKeyCode(e)||ak.strToKeyCode(e)},aM.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return ay.keyCodeToStr(e)};var aL,aM,aE,aR,aB=Object.freeze(function(e,i){let s=setTimeout(e.bind(i),0);return{dispose(){clearTimeout(s)}}});(S=aR||={}).isCancellationToken=function(e){return e===S.None||e===S.Cancelled||e instanceof aD||!!e&&"object"==typeof e&&"boolean"==typeof e.isCancellationRequested&&"function"==typeof e.onCancellationRequested},S.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ov.None}),S.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:aB});var aD=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?aB:(this._emitter||(this._emitter=new ok),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};Symbol("MicrotaskDelay"),(w=b||={}).settled=async function(e){let i,s=await Promise.all(e.map(e=>e.then(e=>e,e=>{i||(i=e)})));if("u">typeof i)throw i;return s},w.withAsyncBody=function(e){return new Promise(async(i,s)=>{try{await e(i,s)}catch(e){s(e)}})};var aT=class e{static fromArray(i){return new e(e=>{e.emitMany(i)})}static fromPromise(i){return new e(async e=>{e.emitMany(await i)})}static fromPromises(i){return new e(async e=>{await Promise.all(i.map(async i=>e.emitOne(await i)))})}static merge(i){return new e(async e=>{await Promise.all(i.map(async i=>{for await(let s of i)e.emitOne(s)}))})}constructor(e,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new ok,queueMicrotask(async()=>{let i={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(i)),this.resolve()}catch(e){this.reject(e)}finally{i.emitOne=void 0,i.emitMany=void 0,i.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{for(;;){if(2===this._state)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(1===this._state)return{done:!0,value:void 0};await ov.toPromise(this._onStateChanged.event)}},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(i,s){return new e(async e=>{for await(let r of i)e.emitOne(s(r))})}map(i){return e.map(this,i)}static filter(i,s){return new e(async e=>{for await(let r of i)s(r)&&e.emitOne(r)})}filter(i){return e.filter(this,i)}static coalesce(i){return e.filter(i,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let i=[];for await(let s of e)i.push(s);return i}toPromise(){return e.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}};aT.EMPTY=aT.fromArray([]);function aA(e,i){return(i<<5)-i+e|0}function aP(e,i){i=aA(149417,i);for(let s=0,r=e.length;s<r;s++)i=aA(e.charCodeAt(s),i);return i}new DataView(new ArrayBuffer(320));var{registerWindow:aO,getWindow:aI,getDocument:aW,getWindows:aN,getWindowsCount:aF,getWindowId:az,getWindowById:aH,hasWindow:a$,onDidRegisterWindow:aU,onWillUnregisterWindow:aK,onDidUnregisterWindow:aq}=(f=new Map,g={window:ai,disposables:new ng},f.set(ai.vscodeWindowId,g),p=new ok,v=new ok,m=new ok,{onDidRegisterWindow:p.event,onWillUnregisterWindow:m.event,onDidUnregisterWindow:v.event,registerWindow(e){var i,s;if(f.has(e.vscodeWindowId))return np.None;let r=new ng,n={window:e,disposables:r.add(new ng)};return f.set(e.vscodeWindowId,n),r.add(nf(()=>{f.delete(e.vscodeWindowId),v.fire(e)})),r.add((i=e,s=aG.BEFORE_UNLOAD,new aV(i,s,()=>{m.fire(e)},void 0))),p.fire(n),r},getWindows:()=>f.values(),getWindowsCount:()=>f.size,getWindowId:e=>e.vscodeWindowId,hasWindow:e=>f.has(e),getWindowById:function(e,i){return("number"==typeof e?f.get(e):void 0)??(i?g:void 0)},getWindow:e=>e?.ownerDocument?.defaultView?e.ownerDocument.defaultView.window:e?.view?e.view.window:ai,getDocument:e=>aI(e).document}),aV=class{constructor(e,i,s,r){this._node=e,this._type=i,this._handler=s,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}},aY=class e{constructor(e,i){this.width=e,this.height=i}with(i=this.width,s=this.height){return i!==this.width||s!==this.height?new e(i,s):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(i){return i instanceof e?i:new e(i.width,i.height)}static equals(e,i){return e===i||!!e&&!!i&&e.width===i.width&&e.height===i.height}};aY.None=new aY(0,0),new class{constructor(){this.mutationObservers=new Map}observe(e,i,s){let r=this.mutationObservers.get(e);r||(r=new Map,this.mutationObservers.set(e,r));let n=function e(i,s){switch(typeof i){case"object":var r,n,o,a;return null===i?aA(349,s):Array.isArray(i)?(r=i,n=aA(104579,n=s),r.reduce((i,s)=>e(s,i),n)):(o=i,a=aA(181387,a=s),Object.keys(o).sort().reduce((i,s)=>(i=aP(s,i),e(o[s],i)),a));case"string":return aP(i,s);case"boolean":return aA(i?433:863,s);case"number":return aA(i,s);case"undefined":return aA(937,s);default:return aA(617,s)}}(s,0),o=r.get(n);if(o)o.users+=1;else{let a=new ok,h=new MutationObserver(e=>a.fire(e));h.observe(e,s);let l=o={users:1,observer:h,onDidMutate:a.event};i.add(nf(()=>{l.users-=1,0===l.users&&(a.dispose(),h.disconnect(),r?.delete(n),r?.size===0&&this.mutationObservers.delete(e))})),r.set(n,o)}return o.onDidMutate}};var aG={BEFORE_UNLOAD:"beforeunload"},aj=class extends np{constructor(e,i,s,r,n,o,a,h,l){if(super(),this._terminal=e,this._characterJoinerService=i,this._charSizeService=s,this._coreBrowserService=r,this._coreService=n,this._decorationService=o,this._optionsService=a,this._themeService=h,this._cursorBlinkStateManager=new nv,this._charAtlasDisposable=this._register(new nv),this._observerDisposable=this._register(new nv),this._model=new oZ,this._workCell=new oN,this._workCell2=new oN,this._rectangleRenderer=this._register(new nv),this._glyphRenderer=this._register(new nv),this._onChangeTextureAtlas=this._register(new ok),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new ok),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new ok),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new ok),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new ok),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._gl=this._canvas.getContext("webgl2",{antialias:!1,depth:!1,preserveDrawingBuffer:l}),!this._gl)throw Error("WebGL2 not supported "+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new n3(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new at(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,a,this._themeService)],this.dimensions={css:{canvas:nq(),cell:nq()},device:{canvas:nq(),cell:nq(),char:{width:0,height:0,left:0,top:0}}},this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(a.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(function(e,i,s){return new aV(e,i,s,void 0)}(this._canvas,"webglcontextlost",e=>{console.log("webglcontextlost event received"),e.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(e)},3e3)})),this._register(function(e,i,s){return new aV(e,i,s,void 0)}(this._canvas,"webglcontextrestored",e=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,oO(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=oW(this._canvas,this._coreBrowserService.window,(e,i)=>this._setCanvasDevicePixelDimensions(e,i)),this._register(this._coreBrowserService.onWindowChange(e=>{this._observerDisposable.value=oW(this._canvas,e,(e,i)=>this._setCanvasDevicePixelDimensions(e,i))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(nf(()=>{for(let e of this._renderLayers)e.dispose();this._canvas.parentElement?.removeChild(this._canvas),oO(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(e,i){for(let e of(this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows),this._renderLayers))e.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let e of this._renderLayers)e.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let e of this._renderLayers)e.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(e,i,s){for(let r of this._renderLayers)r.handleSelectionChanged(this._terminal,e,i,s);this._model.selection.update(this._core,e,i,s),this._requestRedrawViewport()}handleCursorMove(){for(let e of this._renderLayers)e.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new o9(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new oj(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let e=oP(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr,this._deviceMaxTextureSize);this._charAtlas!==e&&(this._onChangeTextureAtlas.fire(e.pages[0].canvas),this._charAtlasDisposable.value=nu(ov.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),ov.forward(e.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=e,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(e){this._model.clear(),e&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){for(let e of(this._clearModel(!0),this._renderLayers))e.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(e,i){if(!this._isAttached)if(!this._core.screenElement?.isConnected||!this._charSizeService.width||!this._charSizeService.height)return;else this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;for(let s of this._renderLayers)s.handleGridChanged(this._terminal,e,i);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(e,i),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new oI(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(e,i){let s=this._core,r=this._workCell,n,o,a,h,l,c,d=0,_=!0,u,f,g,p,v,m,S,w,b;e=aZ(e,s.rows-1,0),i=aZ(i,s.rows-1,0);let C=this._coreService.decPrivateModes.cursorStyle??s.options.cursorStyle??"block",y=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,x=y-s.buffer.ydisp,k=Math.min(this._terminal.buffer.active.cursorX,s.cols-1),L=-1,M=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let E=!1;for(o=e;o<=i;o++)for(a=o+s.buffer.ydisp,h=s.buffer.lines.get(a),this._model.lineLengths[o]=0,g=y===a,d=0,l=this._characterJoinerService.getJoinedCharacters(a),w=0;w<s.cols;w++){if(n=this._cellColorResolver.result.bg,h.loadCell(w,r),0===w&&(n=this._cellColorResolver.result.bg),c=!1,_=w>=d,u=w,l.length>0&&w===l[0][0]&&_){f=l.shift();let e=this._model.selection.isCellSelected(this._terminal,f[0],a);for(S=f[0]+1;S<f[1];S++)_&&=e===this._model.selection.isCellSelected(this._terminal,S,a);(_&&=!g||k<f[0]||k>=f[1])?(c=!0,r=new aX(r,h.translateToString(!0,f[0],f[1]),f[1]-f[0]),u=f[1]-1):d=f[1]}if(p=r.getChars(),v=r.getCode(),S=(o*s.cols+w)*4,this._cellColorResolver.resolve(r,w,a,this.dimensions.device.cell.width),M&&a===y&&(w===k&&(this._model.cursor={x:k,y:x,width:r.getWidth(),style:this._coreBrowserService.isFocused?C:s.options.cursorInactiveStyle,cursorWidth:s.options.cursorWidth,dpr:this._devicePixelRatio},L=k+r.getWidth()-1),w>=k&&w<=L&&(this._coreBrowserService.isFocused&&"block"===C||!1===this._coreBrowserService.isFocused&&"block"===s.options.cursorInactiveStyle)&&(this._cellColorResolver.result.fg=0x3000000|this._themeService.colors.cursorAccent.rgba>>8&0xffffff,this._cellColorResolver.result.bg=0x3000000|this._themeService.colors.cursor.rgba>>8&0xffffff)),0!==v&&(this._model.lineLengths[o]=w+1),(this._model.cells[S]!==v||this._model.cells[S+1]!==this._cellColorResolver.result.bg||this._model.cells[S+2]!==this._cellColorResolver.result.fg||this._model.cells[S+3]!==this._cellColorResolver.result.ext)&&(E=!0,p.length>1&&(v|=0x80000000),this._model.cells[S]=v,this._model.cells[S+1]=this._cellColorResolver.result.bg,this._model.cells[S+2]=this._cellColorResolver.result.fg,this._model.cells[S+3]=this._cellColorResolver.result.ext,m=r.getWidth(),this._glyphRenderer.value.updateCell(w,o,v,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,p,m,n),c)){for(r=this._workCell,w++;w<=u;w++)b=(o*s.cols+w)*4,this._glyphRenderer.value.updateCell(w,o,0,0,0,0,"",0,0),this._model.cells[b]=0,this._model.cells[b+1]=this._cellColorResolver.result.bg,this._model.cells[b+2]=this._cellColorResolver.result.fg,this._model.cells[b+3]=this._cellColorResolver.result.ext;w--}}E&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=1===this._optionsService.rawOptions.lineHeight?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(e,i){this._canvas.width===e&&this._canvas.height===i||(this._canvas.width=e,this._canvas.height=i,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let e=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:e,end:e})}},aX=class extends oc{constructor(e,i,s){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=i,this._width=s}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function aZ(e,i,s=0){return Math.max(Math.min(e,i),s)}var aJ="di$target",aQ="di$dependencies",a0=new Map;function a1(e){if(a0.has(e))return a0.get(e);let i=function(e,s,r){var n,o,a;if(3!=arguments.length)throw Error("@IServiceName-decorator can only be used to decorate a parameter");n=i,o=e,a=r,o[aJ]===o?o[aQ].push({id:n,index:a}):(o[aQ]=[{id:n,index:a}],o[aJ]=o)};return i._id=e,a0.set(e,i),i}a1("BufferService"),a1("CoreMouseService"),a1("CoreService"),a1("CharsetService"),a1("InstantiationService"),a1("LogService");var a5=a1("OptionsService");a1("OscLinkService"),a1("UnicodeService"),a1("DecorationService");var a2={trace:0,debug:1,info:2,warn:3,error:4,off:5},a3=class extends np{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=a2[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let i=0;i<e.length;i++)"function"==typeof e[i]&&(e[i]=e[i]())}_log(e,i,s){this._evalLazyOptionalParams(s),e.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+i,...s)}trace(e,...i){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,i)}debug(e,...i){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,i)}info(e,...i){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,i)}warn(e,...i){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,i)}error(e,...i){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,i)}};a3=((e,i,s,r)=>{for(var n,o=r>1?void 0:r?ns(i,s):i,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r?n(i,s,o):n(o))||o);return r&&o&&ni(i,s,o),o})([(e,i)=>a5(e,i,0)],a3);var a4=class extends np{constructor(e){if(ny&&16>function(){if(!ny)return 0;let e=nS.match(/Version\/(\d+)/);return null===e||e.length<2?0:parseInt(e[1])}()&&!document.createElement("canvas").getContext("webgl2",{antialias:!1,depth:!1,preserveDrawingBuffer:!0}))throw Error("Webgl2 is only supported on Safari 16 and above");super(),this._preserveDrawingBuffer=e,this._onChangeTextureAtlas=this._register(new ok),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new ok),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new ok),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new ok),this.onContextLoss=this._onContextLoss.event}activate(e){let i=e._core;if(!e.element)return void this._register(i.onWillOpen(()=>this.activate(e)));this._terminal=e;let s=i.coreService,r=i.optionsService,n=i._renderService,o=i._characterJoinerService,a=i._charSizeService,h=i._coreBrowserService,l=i._decorationService,c=i._logService,d=i._themeService;this._renderer=this._register(new aj(e,o,a,h,s,l,r,d,this._preserveDrawingBuffer)),this._register(ov.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(ov.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(ov.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(ov.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),n.setRenderer(this._renderer),this._register(nf(()=>{if(this._terminal._core._store._isDisposed)return;let i=this._terminal._core._renderService;i.setRenderer(this._terminal._core._createRenderer()),i.handleResize(e.cols,e.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}},a6=class{constructor(e,i,s,r={}){this._terminal=e,this._regex=i,this._handler=s,this._options=r}provideLinks(e,i){let s=a8.computeLink(e,this._regex,this._terminal,this._handler);i(this._addCallbacks(s))}_addCallbacks(e){return e.map(e=>(e.leave=this._options.leave,e.hover=(i,s)=>{if(this._options.hover){let{range:r}=e;this._options.hover(i,s,r)}},e))}},a8=class e{static computeLink(i,s,r,n){let o=RegExp(s.source,(s.flags||"")+"g"),[a,h]=e._getWindowedLineStrings(i-1,r),l=a.join(""),c,d=[];for(;c=o.exec(l);){let i=c[0];if(!function(e){try{let i=new URL(e),s=i.password&&i.username?`${i.protocol}//${i.username}:${i.password}@${i.host}`:i.username?`${i.protocol}//${i.username}@${i.host}`:`${i.protocol}//${i.host}`;return e.toLocaleLowerCase().startsWith(s.toLocaleLowerCase())}catch{return!1}}(i))continue;let[s,o]=e._mapStrIdx(r,h,0,c.index),[a,l]=e._mapStrIdx(r,s,o,i.length);if(-1===s||-1===o||-1===a||-1===l)continue;let _={start:{x:o+1,y:s+1},end:{x:l,y:a+1}};d.push({range:_,text:i,activate:n})}return d}static _getWindowedLineStrings(e,i){let s,r=e,n=e,o=0,a="",h=[];if(s=i.buffer.active.getLine(e)){let e=s.translateToString(!0);if(s.isWrapped&&" "!==e[0]){for(o=0;(s=i.buffer.active.getLine(--r))&&o<2048&&(o+=(a=s.translateToString(!0)).length,h.push(a),!(!s.isWrapped||-1!==a.indexOf(" "))););h.reverse()}for(h.push(e),o=0;(s=i.buffer.active.getLine(++n))&&s.isWrapped&&o<2048&&(o+=(a=s.translateToString(!0)).length,h.push(a),-1===a.indexOf(" ")););}return[h,r]}static _mapStrIdx(e,i,s,r){let n=e.buffer.active,o=n.getNullCell(),a=s;for(;r;){let e=n.getLine(i);if(!e)return[-1,-1];for(let s=a;s<e.length;++s){e.getCell(s,o);let a=o.getChars();if(o.getWidth()&&(r-=a.length||1,s===e.length-1&&""===a)){let e=n.getLine(i+1);e&&e.isWrapped&&(e.getCell(0,o),2===o.getWidth()&&(r+=1))}if(r<0)return[i,s]}i++,a=0}return[i,a]}},a7=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function a9(e,i){let s=window.open();if(s){try{s.opener=null}catch{}s.location.href=i}else console.warn("Opening link blocked as opener could not be cleared")}var he=class{constructor(e=a9,i={}){this._handler=e,this._options=i}activate(e){this._terminal=e;let i=this._options,s=i.urlRegex||a7;this._linkProvider=this._terminal.registerLinkProvider(new a6(this._terminal,s,this._handler,i))}dispose(){this._linkProvider?.dispose()}},ht=e.i(275283);let hi=/(?:\.\.?\/|[a-zA-Z0-9_@][a-zA-Z0-9_\-.]*\/)[a-zA-Z0-9_\-.\/@]+\.\w+/g,hs=/^(?::(\d+)(?::(\d+))?|\((\d+)(?:,\s*(\d+))?\)|\[(\d+)(?:,\s*(\d+))?\])/;class hr{terminal;worktreePath;onFileOpen;constructor(e,i,s){this.terminal=e,this.worktreePath=i,this.onFileOpen=s}provideLinks(e,i){let s=this.terminal.buffer.active.getLine(e);if(!s)return i(void 0);let r=s.translateToString(),n=function(e){let i,s=[];for(hi.lastIndex=0;null!==(i=hi.exec(e));){let r,n,o=i[0],a=i.index,h=e.slice(a+o.length).match(hs),l=o.length;if(h&&0===h.index){l+=h[0].length;let e=h[1]??h[3]??h[5],i=h[2]??h[4]??h[6];r=e?parseInt(e,10):void 0,n=i?parseInt(i,10):void 0}s.push({path:o,startIndex:a,totalLength:l,line:r,col:n})}return s}(r);if(0===n.length)return i(void 0);i(n.map(i=>({range:{start:{x:i.startIndex+1,y:e},end:{x:i.startIndex+i.totalLength+1,y:e}},text:r.slice(i.startIndex,i.startIndex+i.totalLength),activate:()=>{this.onFileOpen(`${this.worktreePath}/${i.path}`,i.line,i.col)}})))}}var hn=e.i(625054),ho=e.i(791357);e.s(["TaskTerminal",0,function({taskId:e,worktreePath:i,onSessionEnd:s,onFileOpen:r,useCanvasRenderer:n=!1}){let{t:o}=(0,hn.useI18n)(),{resolvedTheme:a}=(0,ht.useTheme)(),h=(0,y.useRef)(null),l=(0,y.useRef)(null),c=(0,y.useRef)(null),d=(0,y.useRef)(null),_=(0,y.useRef)(s);_.current=s;let u=(0,y.useRef)(r);u.current=r;let[f,g]=(0,y.useState)("connecting"),[p,v]=(0,y.useState)(!1);if((0,y.useEffect)(()=>{if(!i||!h.current)return;let s=new ne({fontFamily:"Menlo, Monaco, 'Courier New', monospace",fontSize:13,scrollback:5e3,cursorBlink:!0,allowTransparency:!1,theme:"light"!==a?{background:"#0a0a0a",foreground:"#e5e5e5"}:{background:"#fafafa",foreground:"#171717"}}),r=new nt;s.loadAddon(r),s.open(h.current);let o=null;if(!n)try{(o=new a4).onContextLoss(()=>{o?.dispose(),o=null}),s.loadAddon(o)}catch{}let f=new he((e,i)=>{window.open(i,"_blank")});s.loadAddon(f),i&&s.registerLinkProvider(new hr(s,i,(e,i,s)=>{u.current?.(e,i,s)})),r.fit(),s.focus();let p=null,m=null,S=!1,w=null,b=!1;return(0,ho.getActualWsPort)().then(i=>{S||function i(r){if(S||b)return;g("connecting");let n=new WebSocket(`ws://localhost:${r}/terminal?taskId=${encodeURIComponent(e)}`);p=n,n.addEventListener("open",()=>{n.send(JSON.stringify({type:"resize",cols:s.cols,rows:s.rows})),s.focus(),g("connected"),v(!0),setTimeout(()=>v(!1),2e3)}),n.addEventListener("message",e=>{let i=e.data;"string"==typeof i?s.write(i):i instanceof Blob?i.text().then(e=>s.write(e)):i instanceof ArrayBuffer&&s.write(new Uint8Array(i))}),m?.dispose(),m=s.onData(e=>{n.readyState===WebSocket.OPEN&&n.send(e)}),n.addEventListener("close",e=>{if(e.code>=4e3){b=!0,g("disconnected"),_.current?.(e.code-4e3);return}g("disconnected"),S||b||(w=setTimeout(()=>i(r),3e3))}),n.addEventListener("error",()=>{}),c.current=n}(i)}),l.current=s,d.current=r,()=>{S=!0,w&&clearTimeout(w),m?.dispose(),f.dispose(),o?.dispose(),r.dispose(),s.dispose(),p?.close(),l.current=null,c.current=null,d.current=null}},[e,i]),(0,y.useEffect)(()=>{if(!i||!h.current)return;let e=d.current,s=c.current,r=l.current;e&&r&&requestAnimationFrame(()=>{e.fit(),s?.readyState===WebSocket.OPEN&&s.send(JSON.stringify({type:"resize",cols:r.cols,rows:r.rows}))});let n=null,o=h.current,a=new ResizeObserver(()=>{n&&clearTimeout(n),n=setTimeout(()=>{let e=d.current,i=c.current,s=l.current;e&&s&&(e.fit(),i?.readyState===WebSocket.OPEN&&i.send(JSON.stringify({type:"resize",cols:s.cols,rows:s.rows})))},100)});return a.observe(o),()=>{n&&clearTimeout(n),a.disconnect()}},[e,i]),(0,y.useEffect)(()=>{let e=l.current;if(!e)return;let i="light"!==a;e.options.theme=i?{background:"#0a0a0a",foreground:"#e5e5e5"}:{background:"#fafafa",foreground:"#171717"}},[a]),!i)return(0,C.jsxs)("div",{className:"flex h-full w-full flex-col items-center justify-center bg-[#0a0a0a] text-center",children:[(0,C.jsx)("p",{className:"text-sm text-neutral-400",children:o("terminal.noWorktree")}),(0,C.jsx)("p",{className:"text-xs text-neutral-600 mt-1",children:o("terminal.noWorktreeDesc")})]});let m=o("connected"===f?"terminal.connected":"connecting"===f?"terminal.connecting":"terminal.disconnected");return(0,C.jsxs)("div",{className:"relative h-full w-full bg-[#0a0a0a]",children:[(0,C.jsxs)("div",{className:["absolute right-3 top-3 z-10 flex items-center gap-1.5 rounded px-2 py-0.5 text-xs transition-opacity duration-500","connected"===f&&!p?"opacity-0 pointer-events-none":"opacity-100","bg-black/40 backdrop-blur-sm"].join(" "),title:m,children:[(0,C.jsx)("span",{className:`h-2 w-2 rounded-full ${"connected"===f?"bg-green-500":"connecting"===f?"bg-yellow-500":"bg-red-500"}`}),(0,C.jsx)("span",{className:"text-neutral-300",children:m})]}),(0,C.jsx)("div",{ref:h,className:"h-full w-full overflow-hidden"})]})}],714062)},467005,e=>{e.n(e.i(714062))}]);
|
|
83
|
+
}`,o0=8*Float32Array.BYTES_PER_ELEMENT,o1=class{constructor(){this.attributes=new Float32Array(160),this.count=0}},o5=0,o2=0,o3=0,o4=0,o6=0,o8=0,o7=0,o9=class extends np{constructor(e,i,s,r){super(),this._terminal=e,this._gl=i,this._dimensions=s,this._themeService=r,this._vertices=new o1,this._verticesCursor=new o1;let n=this._gl;this._program=n$(oz(n,oJ,oQ)),this._register(nf(()=>n.deleteProgram(this._program))),this._projectionLocation=n$(n.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=n.createVertexArray(),n.bindVertexArray(this._vertexArrayObject);let o=new Float32Array([0,0,1,0,0,1,1,1]),a=n.createBuffer();this._register(nf(()=>n.deleteBuffer(a))),n.bindBuffer(n.ARRAY_BUFFER,a),n.bufferData(n.ARRAY_BUFFER,o,n.STATIC_DRAW),n.enableVertexAttribArray(3),n.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let h=new Uint8Array([0,1,2,3]),l=n.createBuffer();this._register(nf(()=>n.deleteBuffer(l))),n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,l),n.bufferData(n.ELEMENT_ARRAY_BUFFER,h,n.STATIC_DRAW),this._attributesBuffer=n$(n.createBuffer()),this._register(nf(()=>n.deleteBuffer(this._attributesBuffer))),n.bindBuffer(n.ARRAY_BUFFER,this._attributesBuffer),n.enableVertexAttribArray(0),n.vertexAttribPointer(0,2,n.FLOAT,!1,o0,0),n.vertexAttribDivisor(0,1),n.enableVertexAttribArray(1),n.vertexAttribPointer(1,2,n.FLOAT,!1,o0,2*Float32Array.BYTES_PER_ELEMENT),n.vertexAttribDivisor(1,1),n.enableVertexAttribArray(2),n.vertexAttribPointer(2,4,n.FLOAT,!1,o0,4*Float32Array.BYTES_PER_ELEMENT),n.vertexAttribDivisor(2,1),this._updateCachedColors(r.colors),this._register(this._themeService.onChangeColors(e=>{this._updateCachedColors(e),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(e){let i=this._gl;i.useProgram(this._program),i.bindVertexArray(this._vertexArrayObject),i.uniformMatrix4fv(this._projectionLocation,!1,oF),i.bindBuffer(i.ARRAY_BUFFER,this._attributesBuffer),i.bufferData(i.ARRAY_BUFFER,e.attributes,i.DYNAMIC_DRAW),i.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,i.UNSIGNED_BYTE,0,e.count)}handleResize(){this._updateViewportRectangle()}setDimensions(e){this._dimensions=e}_updateCachedColors(e){this._bgFloat=this._colorToFloat32Array(e.background),this._cursorFloat=this._colorToFloat32Array(e.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(e){let i=this._terminal,s=this._vertices,r=1,n,o,a,h,l,c,d,_,u,f,g;for(n=0;n<i.rows;n++){for(a=-1,h=0,l=0,c=!1,o=0;o<i.cols;o++)d=(n*i.cols+o)*4,_=e.cells[d+1],f=!!(0x4000000&(u=e.cells[d+2])),(_!==h||u!==l&&(c||f))&&((0!==h||c&&0!==l)&&(g=8*r++,this._updateRectangle(s,g,l,h,a,o,n)),a=o,h=_,l=u,c=f);(0!==h||c&&0!==l)&&(g=8*r++,this._updateRectangle(s,g,l,h,a,i.cols,n))}s.count=r}updateCursor(e){let i=this._verticesCursor,s=e.cursor;if(!s||"block"===s.style){i.count=0;return}let r,n=0;("bar"===s.style||"outline"===s.style)&&(r=8*n++,this._addRectangleFloat(i.attributes,r,s.x*this._dimensions.device.cell.width,s.y*this._dimensions.device.cell.height,"bar"===s.style?s.dpr*s.cursorWidth:s.dpr,this._dimensions.device.cell.height,this._cursorFloat)),("underline"===s.style||"outline"===s.style)&&(r=8*n++,this._addRectangleFloat(i.attributes,r,s.x*this._dimensions.device.cell.width,(s.y+1)*this._dimensions.device.cell.height-s.dpr,s.width*this._dimensions.device.cell.width,s.dpr,this._cursorFloat)),"outline"===s.style&&(r=8*n++,this._addRectangleFloat(i.attributes,r,s.x*this._dimensions.device.cell.width,s.y*this._dimensions.device.cell.height,s.width*this._dimensions.device.cell.width,s.dpr,this._cursorFloat),r=8*n++,this._addRectangleFloat(i.attributes,r,(s.x+s.width)*this._dimensions.device.cell.width-s.dpr,s.y*this._dimensions.device.cell.height,s.dpr,this._dimensions.device.cell.height,this._cursorFloat)),i.count=n}_updateRectangle(e,i,s,r,n,o,a){if(0x4000000&s)switch(0x3000000&s){case 0x1000000:case 0x2000000:o5=this._themeService.colors.ansi[255&s].rgba;break;case 0x3000000:o5=(0xffffff&s)<<8;break;default:o5=this._themeService.colors.foreground.rgba}else switch(0x3000000&r){case 0x1000000:case 0x2000000:o5=this._themeService.colors.ansi[255&r].rgba;break;case 0x3000000:o5=(0xffffff&r)<<8;break;default:o5=this._themeService.colors.background.rgba}e.attributes.length<i+4&&(e.attributes=function(e,i){let s=new Float32Array(Math.min(2*e.length,i));for(let i=0;i<e.length;i++)s[i]=e[i];return s}(e.attributes,this._terminal.rows*this._terminal.cols*8)),o2=n*this._dimensions.device.cell.width,o3=a*this._dimensions.device.cell.height,o4=(o5>>24&255)/255,o6=(o5>>16&255)/255,o8=(o5>>8&255)/255,o7=1,this._addRectangle(e.attributes,i,o2,o3,(o-n)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,o4,o6,o8,o7)}_addRectangle(e,i,s,r,n,o,a,h,l,c){e[i]=s/this._dimensions.device.canvas.width,e[i+1]=r/this._dimensions.device.canvas.height,e[i+2]=n/this._dimensions.device.canvas.width,e[i+3]=o/this._dimensions.device.canvas.height,e[i+4]=a,e[i+5]=h,e[i+6]=l,e[i+7]=c}_addRectangleFloat(e,i,s,r,n,o,a){e[i]=s/this._dimensions.device.canvas.width,e[i+1]=r/this._dimensions.device.canvas.height,e[i+2]=n/this._dimensions.device.canvas.width,e[i+3]=o/this._dimensions.device.canvas.height,e[i+4]=a[0],e[i+5]=a[1],e[i+6]=a[2],e[i+7]=a[3]}_colorToFloat32Array(e){return new Float32Array([(e.rgba>>24&255)/255,(e.rgba>>16&255)/255,(e.rgba>>8&255)/255,(255&e.rgba)/255])}},ae=class extends np{constructor(e,i,s,r,n,o,a,h){super(),this._container=i,this._alpha=n,this._coreBrowserService=o,this._optionsService=a,this._themeService=h,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${s}-layer`),this._canvas.style.zIndex=r.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(i=>{this._refreshCharAtlas(e,i),this.reset(e)})),this._register(nf(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=n$(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(e){}handleFocus(e){}handleCursorMove(e){}handleGridChanged(e,i,s){}handleSelectionChanged(e,i,s,r=!1){}_setTransparency(e,i){if(i===this._alpha)return;let s=this._canvas;this._alpha=i,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,s),this._refreshCharAtlas(e,this._themeService.colors),this.handleGridChanged(e,0,e.rows-1)}_refreshCharAtlas(e,i){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=oP(e,this._optionsService.rawOptions,i,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(e,i){this._deviceCellWidth=i.device.cell.width,this._deviceCellHeight=i.device.cell.height,this._deviceCharWidth=i.device.char.width,this._deviceCharHeight=i.device.char.height,this._deviceCharLeft=i.device.char.left,this._deviceCharTop=i.device.char.top,this._canvas.width=i.device.canvas.width,this._canvas.height=i.device.canvas.height,this._canvas.style.width=`${i.css.canvas.width}px`,this._canvas.style.height=`${i.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(e,this._themeService.colors)}_fillBottomLineAtCells(e,i,s=1){this._ctx.fillRect(e*this._deviceCellWidth,(i+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,s*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(e,i,s,r){this._alpha?this._ctx.clearRect(e*this._deviceCellWidth,i*this._deviceCellHeight,s*this._deviceCellWidth,r*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(e*this._deviceCellWidth,i*this._deviceCellHeight,s*this._deviceCellWidth,r*this._deviceCellHeight))}_fillCharTrueColor(e,i,s,r){this._ctx.font=this._getFont(e,!1,!1),this._ctx.textBaseline=n4,this._clipCell(s,r,i.getWidth()),this._ctx.fillText(i.getChars(),s*this._deviceCellWidth+this._deviceCharLeft,r*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(e,i,s){this._ctx.beginPath(),this._ctx.rect(e*this._deviceCellWidth,i*this._deviceCellHeight,s*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(e,i,s){let r=i?e.options.fontWeightBold:e.options.fontWeight;return`${s?"italic":""} ${r} ${e.options.fontSize*this._coreBrowserService.dpr}px ${e.options.fontFamily}`}},at=class extends ae{constructor(e,i,s,r,n,o,a){super(s,e,"link",i,!0,n,o,a),this._register(r.onShowLinkUnderline(e=>this._handleShowLinkUnderline(e))),this._register(r.onHideLinkUnderline(e=>this._handleHideLinkUnderline(e)))}resize(e,i){super.resize(e,i),this._state=void 0}reset(e){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(e){var i;if(257===e.fg?this._ctx.fillStyle=this._themeService.colors.background.css:void 0!==e.fg&&((0x3000000&(i=e.fg))==0x1000000||(0x3000000&i)==0x2000000)?this._ctx.fillStyle=this._themeService.colors.ansi[e.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let i=e.y1+1;i<e.y2;i++)this._fillBottomLineAtCells(0,i,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_handleHideLinkUnderline(e){this._clearCurrentLink()}},ai="object"==typeof window?window:globalThis,as=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new ok,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new ok,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,i){if(this.getZoomLevel(i)===e)return;let s=this.getWindowId(i);this.mapWindowIdToZoomLevel.set(s,e),this._onDidChangeZoomLevel.fire(s)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,i){this.mapWindowIdToZoomFactor.set(this.getWindowId(i),e)}setFullscreen(e,i){if(this.isFullscreen(i)===e)return;let s=this.getWindowId(i);this.mapWindowIdToFullScreen.set(s,e),this._onDidChangeFullscreen.fire(s)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};as.INSTANCE=new as,as.INSTANCE.onDidChangeZoomLevel,as.INSTANCE.onDidChangeFullscreen;var ar="object"==typeof navigator?navigator.userAgent:"";ar.indexOf("Firefox"),ar.indexOf("AppleWebKit"),ar.indexOf("Chrome")>=0||ar.indexOf("Safari"),ar.indexOf("Electron/"),ar.indexOf("Android");var an=!1;if("function"==typeof ai.matchMedia){let e=ai.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),i=ai.matchMedia("(display-mode: fullscreen)");an=e.matches,ao=e,"string"==typeof ao&&(ao=ai.matchMedia(ao)),ao.addEventListener("change",({matches:e})=>{an&&i.matches||(an=e)})}var ao,aa,ah,al=!1,ac=!1,ad="en",a_=globalThis;"u">typeof a_.vscode&&"u">typeof a_.vscode.process?ah=a_.vscode.process:"u">typeof x.default&&"string"==typeof x.default?.versions?.node&&(ah=x.default);var au="string"==typeof ah?.versions?.electron&&ah?.type==="renderer";if("object"==typeof ah){ah.platform,ah.platform,"linux"===ah.platform&&ah.env.SNAP&&ah.env.SNAP_REVISION,ah.env.CI||ah.env.BUILD_ARTIFACTSTAGINGDIRECTORY,ad="en";let e=ah.env.VSCODE_NLS_CONFIG;if(e)try{let i=JSON.parse(e);i.userLocale,i.osLocale,ad=i.resolvedLanguage||"en",i.languagePack?.translationsConfigFile}catch{}al=!0}else"object"!=typeof navigator||au?console.error("Unable to resolve platform."):((aa=navigator.userAgent).indexOf("Windows"),aa.indexOf("Macintosh"),(aa.indexOf("Macintosh")>=0||aa.indexOf("iPad")>=0||aa.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,aa.indexOf("Linux"),aa?.indexOf("Mobi"),ac=!0,ad=globalThis._VSCODE_NLS_LANGUAGE||"en",navigator.language.toLowerCase());var af=al;ac&&"function"==typeof a_.importScripts&&a_.origin;var ag,ap=aa,av=ad;(aL=ag||={}).value=function(){return av},aL.isDefaultVariant=function(){return 2===av.length?"en"===av:av.length>=3&&"e"===av[0]&&"n"===av[1]&&"-"===av[2]},aL.isDefault=function(){return"en"===av};var am="function"==typeof a_.postMessage&&!a_.importScripts,aS=(()=>{if(am){let e=[];a_.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let s=0,r=e.length;s<r;s++){let r=e[s];if(r.id===i.data.vscodeScheduleAsyncWork){e.splice(s,1),r.callback();return}}});let i=0;return s=>{let r=++i;e.push({id:r,callback:s}),a_.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})(),aw=!!(ap&&ap.indexOf("Chrome")>=0);ap&&ap.indexOf("Firefox"),!aw&&ap&&ap.indexOf("Safari"),ap&&ap.indexOf("Edg/"),ap&&ap.indexOf("Android");var ab="object"==typeof navigator?navigator:{};af||document.queryCommandSupported&&document.queryCommandSupported("copy")||ab&&ab.clipboard&&ab.clipboard.writeText,af||ab&&ab.clipboard&&ab.clipboard.readText,af||an||ab.keyboard,"ontouchstart"in ai||ab.maxTouchPoints,ai.PointerEvent&&("ontouchstart"in ai||navigator.maxTouchPoints);var aC=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,i){this._keyCodeToStr[e]=i,this._strToKeyCode[i.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},ay=new aC,ax=new aC,ak=new aC;(aM=aE||={}).toString=function(e){return ay.keyCodeToStr(e)},aM.fromString=function(e){return ay.strToKeyCode(e)},aM.toUserSettingsUS=function(e){return ax.keyCodeToStr(e)},aM.toUserSettingsGeneral=function(e){return ak.keyCodeToStr(e)},aM.fromUserSettings=function(e){return ax.strToKeyCode(e)||ak.strToKeyCode(e)},aM.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return ay.keyCodeToStr(e)};var aL,aM,aE,aR,aB=Object.freeze(function(e,i){let s=setTimeout(e.bind(i),0);return{dispose(){clearTimeout(s)}}});(S=aR||={}).isCancellationToken=function(e){return e===S.None||e===S.Cancelled||e instanceof aD||!!e&&"object"==typeof e&&"boolean"==typeof e.isCancellationRequested&&"function"==typeof e.onCancellationRequested},S.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ov.None}),S.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:aB});var aD=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?aB:(this._emitter||(this._emitter=new ok),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};Symbol("MicrotaskDelay"),(w=b||={}).settled=async function(e){let i,s=await Promise.all(e.map(e=>e.then(e=>e,e=>{i||(i=e)})));if("u">typeof i)throw i;return s},w.withAsyncBody=function(e){return new Promise(async(i,s)=>{try{await e(i,s)}catch(e){s(e)}})};var aT=class e{static fromArray(i){return new e(e=>{e.emitMany(i)})}static fromPromise(i){return new e(async e=>{e.emitMany(await i)})}static fromPromises(i){return new e(async e=>{await Promise.all(i.map(async i=>e.emitOne(await i)))})}static merge(i){return new e(async e=>{await Promise.all(i.map(async i=>{for await(let s of i)e.emitOne(s)}))})}constructor(e,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new ok,queueMicrotask(async()=>{let i={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(i)),this.resolve()}catch(e){this.reject(e)}finally{i.emitOne=void 0,i.emitMany=void 0,i.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{for(;;){if(2===this._state)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(1===this._state)return{done:!0,value:void 0};await ov.toPromise(this._onStateChanged.event)}},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(i,s){return new e(async e=>{for await(let r of i)e.emitOne(s(r))})}map(i){return e.map(this,i)}static filter(i,s){return new e(async e=>{for await(let r of i)s(r)&&e.emitOne(r)})}filter(i){return e.filter(this,i)}static coalesce(i){return e.filter(i,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let i=[];for await(let s of e)i.push(s);return i}toPromise(){return e.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}};aT.EMPTY=aT.fromArray([]);function aA(e,i){return(i<<5)-i+e|0}function aP(e,i){i=aA(149417,i);for(let s=0,r=e.length;s<r;s++)i=aA(e.charCodeAt(s),i);return i}new DataView(new ArrayBuffer(320));var{registerWindow:aO,getWindow:aI,getDocument:aW,getWindows:aN,getWindowsCount:aF,getWindowId:az,getWindowById:aH,hasWindow:a$,onDidRegisterWindow:aU,onWillUnregisterWindow:aK,onDidUnregisterWindow:aq}=(f=new Map,g={window:ai,disposables:new ng},f.set(ai.vscodeWindowId,g),p=new ok,v=new ok,m=new ok,{onDidRegisterWindow:p.event,onWillUnregisterWindow:m.event,onDidUnregisterWindow:v.event,registerWindow(e){var i,s;if(f.has(e.vscodeWindowId))return np.None;let r=new ng,n={window:e,disposables:r.add(new ng)};return f.set(e.vscodeWindowId,n),r.add(nf(()=>{f.delete(e.vscodeWindowId),v.fire(e)})),r.add((i=e,s=aG.BEFORE_UNLOAD,new aV(i,s,()=>{m.fire(e)},void 0))),p.fire(n),r},getWindows:()=>f.values(),getWindowsCount:()=>f.size,getWindowId:e=>e.vscodeWindowId,hasWindow:e=>f.has(e),getWindowById:function(e,i){return("number"==typeof e?f.get(e):void 0)??(i?g:void 0)},getWindow:e=>e?.ownerDocument?.defaultView?e.ownerDocument.defaultView.window:e?.view?e.view.window:ai,getDocument:e=>aI(e).document}),aV=class{constructor(e,i,s,r){this._node=e,this._type=i,this._handler=s,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}},aY=class e{constructor(e,i){this.width=e,this.height=i}with(i=this.width,s=this.height){return i!==this.width||s!==this.height?new e(i,s):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(i){return i instanceof e?i:new e(i.width,i.height)}static equals(e,i){return e===i||!!e&&!!i&&e.width===i.width&&e.height===i.height}};aY.None=new aY(0,0),new class{constructor(){this.mutationObservers=new Map}observe(e,i,s){let r=this.mutationObservers.get(e);r||(r=new Map,this.mutationObservers.set(e,r));let n=function e(i,s){switch(typeof i){case"object":var r,n,o,a;return null===i?aA(349,s):Array.isArray(i)?(r=i,n=aA(104579,n=s),r.reduce((i,s)=>e(s,i),n)):(o=i,a=aA(181387,a=s),Object.keys(o).sort().reduce((i,s)=>(i=aP(s,i),e(o[s],i)),a));case"string":return aP(i,s);case"boolean":return aA(i?433:863,s);case"number":return aA(i,s);case"undefined":return aA(937,s);default:return aA(617,s)}}(s,0),o=r.get(n);if(o)o.users+=1;else{let a=new ok,h=new MutationObserver(e=>a.fire(e));h.observe(e,s);let l=o={users:1,observer:h,onDidMutate:a.event};i.add(nf(()=>{l.users-=1,0===l.users&&(a.dispose(),h.disconnect(),r?.delete(n),r?.size===0&&this.mutationObservers.delete(e))})),r.set(n,o)}return o.onDidMutate}};var aG={BEFORE_UNLOAD:"beforeunload"},aj=class extends np{constructor(e,i,s,r,n,o,a,h,l){if(super(),this._terminal=e,this._characterJoinerService=i,this._charSizeService=s,this._coreBrowserService=r,this._coreService=n,this._decorationService=o,this._optionsService=a,this._themeService=h,this._cursorBlinkStateManager=new nv,this._charAtlasDisposable=this._register(new nv),this._observerDisposable=this._register(new nv),this._model=new oZ,this._workCell=new oN,this._workCell2=new oN,this._rectangleRenderer=this._register(new nv),this._glyphRenderer=this._register(new nv),this._onChangeTextureAtlas=this._register(new ok),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new ok),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new ok),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new ok),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new ok),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._gl=this._canvas.getContext("webgl2",{antialias:!1,depth:!1,preserveDrawingBuffer:l}),!this._gl)throw Error("WebGL2 not supported "+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new n3(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new at(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,a,this._themeService)],this.dimensions={css:{canvas:nq(),cell:nq()},device:{canvas:nq(),cell:nq(),char:{width:0,height:0,left:0,top:0}}},this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(a.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(function(e,i,s){return new aV(e,i,s,void 0)}(this._canvas,"webglcontextlost",e=>{console.log("webglcontextlost event received"),e.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(e)},3e3)})),this._register(function(e,i,s){return new aV(e,i,s,void 0)}(this._canvas,"webglcontextrestored",e=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,oO(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=oW(this._canvas,this._coreBrowserService.window,(e,i)=>this._setCanvasDevicePixelDimensions(e,i)),this._register(this._coreBrowserService.onWindowChange(e=>{this._observerDisposable.value=oW(this._canvas,e,(e,i)=>this._setCanvasDevicePixelDimensions(e,i))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(nf(()=>{for(let e of this._renderLayers)e.dispose();this._canvas.parentElement?.removeChild(this._canvas),oO(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(e,i){for(let e of(this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows),this._renderLayers))e.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let e of this._renderLayers)e.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let e of this._renderLayers)e.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(e,i,s){for(let r of this._renderLayers)r.handleSelectionChanged(this._terminal,e,i,s);this._model.selection.update(this._core,e,i,s),this._requestRedrawViewport()}handleCursorMove(){for(let e of this._renderLayers)e.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new o9(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new oj(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let e=oP(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr,this._deviceMaxTextureSize);this._charAtlas!==e&&(this._onChangeTextureAtlas.fire(e.pages[0].canvas),this._charAtlasDisposable.value=nu(ov.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),ov.forward(e.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=e,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(e){this._model.clear(),e&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){for(let e of(this._clearModel(!0),this._renderLayers))e.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(e,i){if(!this._isAttached)if(!this._core.screenElement?.isConnected||!this._charSizeService.width||!this._charSizeService.height)return;else this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;for(let s of this._renderLayers)s.handleGridChanged(this._terminal,e,i);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(e,i),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new oI(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(e,i){let s=this._core,r=this._workCell,n,o,a,h,l,c,d=0,_=!0,u,f,g,p,v,m,S,w,b;e=aZ(e,s.rows-1,0),i=aZ(i,s.rows-1,0);let C=this._coreService.decPrivateModes.cursorStyle??s.options.cursorStyle??"block",y=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,x=y-s.buffer.ydisp,k=Math.min(this._terminal.buffer.active.cursorX,s.cols-1),L=-1,M=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let E=!1;for(o=e;o<=i;o++)for(a=o+s.buffer.ydisp,h=s.buffer.lines.get(a),this._model.lineLengths[o]=0,g=y===a,d=0,l=this._characterJoinerService.getJoinedCharacters(a),w=0;w<s.cols;w++){if(n=this._cellColorResolver.result.bg,h.loadCell(w,r),0===w&&(n=this._cellColorResolver.result.bg),c=!1,_=w>=d,u=w,l.length>0&&w===l[0][0]&&_){f=l.shift();let e=this._model.selection.isCellSelected(this._terminal,f[0],a);for(S=f[0]+1;S<f[1];S++)_&&=e===this._model.selection.isCellSelected(this._terminal,S,a);(_&&=!g||k<f[0]||k>=f[1])?(c=!0,r=new aX(r,h.translateToString(!0,f[0],f[1]),f[1]-f[0]),u=f[1]-1):d=f[1]}if(p=r.getChars(),v=r.getCode(),S=(o*s.cols+w)*4,this._cellColorResolver.resolve(r,w,a,this.dimensions.device.cell.width),M&&a===y&&(w===k&&(this._model.cursor={x:k,y:x,width:r.getWidth(),style:this._coreBrowserService.isFocused?C:s.options.cursorInactiveStyle,cursorWidth:s.options.cursorWidth,dpr:this._devicePixelRatio},L=k+r.getWidth()-1),w>=k&&w<=L&&(this._coreBrowserService.isFocused&&"block"===C||!1===this._coreBrowserService.isFocused&&"block"===s.options.cursorInactiveStyle)&&(this._cellColorResolver.result.fg=0x3000000|this._themeService.colors.cursorAccent.rgba>>8&0xffffff,this._cellColorResolver.result.bg=0x3000000|this._themeService.colors.cursor.rgba>>8&0xffffff)),0!==v&&(this._model.lineLengths[o]=w+1),(this._model.cells[S]!==v||this._model.cells[S+1]!==this._cellColorResolver.result.bg||this._model.cells[S+2]!==this._cellColorResolver.result.fg||this._model.cells[S+3]!==this._cellColorResolver.result.ext)&&(E=!0,p.length>1&&(v|=0x80000000),this._model.cells[S]=v,this._model.cells[S+1]=this._cellColorResolver.result.bg,this._model.cells[S+2]=this._cellColorResolver.result.fg,this._model.cells[S+3]=this._cellColorResolver.result.ext,m=r.getWidth(),this._glyphRenderer.value.updateCell(w,o,v,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,p,m,n),c)){for(r=this._workCell,w++;w<=u;w++)b=(o*s.cols+w)*4,this._glyphRenderer.value.updateCell(w,o,0,0,0,0,"",0,0),this._model.cells[b]=0,this._model.cells[b+1]=this._cellColorResolver.result.bg,this._model.cells[b+2]=this._cellColorResolver.result.fg,this._model.cells[b+3]=this._cellColorResolver.result.ext;w--}}E&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=1===this._optionsService.rawOptions.lineHeight?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(e,i){this._canvas.width===e&&this._canvas.height===i||(this._canvas.width=e,this._canvas.height=i,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let e=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:e,end:e})}},aX=class extends oc{constructor(e,i,s){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=i,this._width=s}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function aZ(e,i,s=0){return Math.max(Math.min(e,i),s)}var aJ="di$target",aQ="di$dependencies",a0=new Map;function a1(e){if(a0.has(e))return a0.get(e);let i=function(e,s,r){var n,o,a;if(3!=arguments.length)throw Error("@IServiceName-decorator can only be used to decorate a parameter");n=i,o=e,a=r,o[aJ]===o?o[aQ].push({id:n,index:a}):(o[aQ]=[{id:n,index:a}],o[aJ]=o)};return i._id=e,a0.set(e,i),i}a1("BufferService"),a1("CoreMouseService"),a1("CoreService"),a1("CharsetService"),a1("InstantiationService"),a1("LogService");var a5=a1("OptionsService");a1("OscLinkService"),a1("UnicodeService"),a1("DecorationService");var a2={trace:0,debug:1,info:2,warn:3,error:4,off:5},a3=class extends np{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=a2[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let i=0;i<e.length;i++)"function"==typeof e[i]&&(e[i]=e[i]())}_log(e,i,s){this._evalLazyOptionalParams(s),e.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+i,...s)}trace(e,...i){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,i)}debug(e,...i){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,i)}info(e,...i){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,i)}warn(e,...i){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,i)}error(e,...i){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,i)}};a3=((e,i,s,r)=>{for(var n,o=r>1?void 0:r?ns(i,s):i,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r?n(i,s,o):n(o))||o);return r&&o&&ni(i,s,o),o})([(e,i)=>a5(e,i,0)],a3);var a4=class extends np{constructor(e){if(ny&&16>function(){if(!ny)return 0;let e=nS.match(/Version\/(\d+)/);return null===e||e.length<2?0:parseInt(e[1])}()&&!document.createElement("canvas").getContext("webgl2",{antialias:!1,depth:!1,preserveDrawingBuffer:!0}))throw Error("Webgl2 is only supported on Safari 16 and above");super(),this._preserveDrawingBuffer=e,this._onChangeTextureAtlas=this._register(new ok),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new ok),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new ok),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new ok),this.onContextLoss=this._onContextLoss.event}activate(e){let i=e._core;if(!e.element)return void this._register(i.onWillOpen(()=>this.activate(e)));this._terminal=e;let s=i.coreService,r=i.optionsService,n=i._renderService,o=i._characterJoinerService,a=i._charSizeService,h=i._coreBrowserService,l=i._decorationService,c=i._logService,d=i._themeService;this._renderer=this._register(new aj(e,o,a,h,s,l,r,d,this._preserveDrawingBuffer)),this._register(ov.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(ov.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(ov.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(ov.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),n.setRenderer(this._renderer),this._register(nf(()=>{if(this._terminal._core._store._isDisposed)return;let i=this._terminal._core._renderService;i.setRenderer(this._terminal._core._createRenderer()),i.handleResize(e.cols,e.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}},a6=class{constructor(e,i,s,r={}){this._terminal=e,this._regex=i,this._handler=s,this._options=r}provideLinks(e,i){let s=a8.computeLink(e,this._regex,this._terminal,this._handler);i(this._addCallbacks(s))}_addCallbacks(e){return e.map(e=>(e.leave=this._options.leave,e.hover=(i,s)=>{if(this._options.hover){let{range:r}=e;this._options.hover(i,s,r)}},e))}},a8=class e{static computeLink(i,s,r,n){let o=RegExp(s.source,(s.flags||"")+"g"),[a,h]=e._getWindowedLineStrings(i-1,r),l=a.join(""),c,d=[];for(;c=o.exec(l);){let i=c[0];if(!function(e){try{let i=new URL(e),s=i.password&&i.username?`${i.protocol}//${i.username}:${i.password}@${i.host}`:i.username?`${i.protocol}//${i.username}@${i.host}`:`${i.protocol}//${i.host}`;return e.toLocaleLowerCase().startsWith(s.toLocaleLowerCase())}catch{return!1}}(i))continue;let[s,o]=e._mapStrIdx(r,h,0,c.index),[a,l]=e._mapStrIdx(r,s,o,i.length);if(-1===s||-1===o||-1===a||-1===l)continue;let _={start:{x:o+1,y:s+1},end:{x:l,y:a+1}};d.push({range:_,text:i,activate:n})}return d}static _getWindowedLineStrings(e,i){let s,r=e,n=e,o=0,a="",h=[];if(s=i.buffer.active.getLine(e)){let e=s.translateToString(!0);if(s.isWrapped&&" "!==e[0]){for(o=0;(s=i.buffer.active.getLine(--r))&&o<2048&&(o+=(a=s.translateToString(!0)).length,h.push(a),!(!s.isWrapped||-1!==a.indexOf(" "))););h.reverse()}for(h.push(e),o=0;(s=i.buffer.active.getLine(++n))&&s.isWrapped&&o<2048&&(o+=(a=s.translateToString(!0)).length,h.push(a),-1===a.indexOf(" ")););}return[h,r]}static _mapStrIdx(e,i,s,r){let n=e.buffer.active,o=n.getNullCell(),a=s;for(;r;){let e=n.getLine(i);if(!e)return[-1,-1];for(let s=a;s<e.length;++s){e.getCell(s,o);let a=o.getChars();if(o.getWidth()&&(r-=a.length||1,s===e.length-1&&""===a)){let e=n.getLine(i+1);e&&e.isWrapped&&(e.getCell(0,o),2===o.getWidth()&&(r+=1))}if(r<0)return[i,s]}i++,a=0}return[i,a]}},a7=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function a9(e,i){let s=window.open();if(s){try{s.opener=null}catch{}s.location.href=i}else console.warn("Opening link blocked as opener could not be cleared")}var he=class{constructor(e=a9,i={}){this._handler=e,this._options=i}activate(e){this._terminal=e;let i=this._options,s=i.urlRegex||a7;this._linkProvider=this._terminal.registerLinkProvider(new a6(this._terminal,s,this._handler,i))}dispose(){this._linkProvider?.dispose()}},ht=e.i(275283);let hi=/(?:\.\.?\/|[a-zA-Z0-9_@][a-zA-Z0-9_\-.]*\/)[a-zA-Z0-9_\-.\/@]+\.\w+/g,hs=/^(?::(\d+)(?::(\d+))?|\((\d+)(?:,\s*(\d+))?\)|\[(\d+)(?:,\s*(\d+))?\])/;class hr{terminal;worktreePath;onFileOpen;constructor(e,i,s){this.terminal=e,this.worktreePath=i,this.onFileOpen=s}provideLinks(e,i){let s=this.terminal.buffer.active.getLine(e);if(!s)return i(void 0);let r=s.translateToString(),n=function(e){let i,s=[];for(hi.lastIndex=0;null!==(i=hi.exec(e));){let r,n,o=i[0],a=i.index,h=e.slice(a+o.length).match(hs),l=o.length;if(h&&0===h.index){l+=h[0].length;let e=h[1]??h[3]??h[5],i=h[2]??h[4]??h[6];r=e?parseInt(e,10):void 0,n=i?parseInt(i,10):void 0}s.push({path:o,startIndex:a,totalLength:l,line:r,col:n})}return s}(r);if(0===n.length)return i(void 0);i(n.map(i=>({range:{start:{x:i.startIndex+1,y:e},end:{x:i.startIndex+i.totalLength+1,y:e}},text:r.slice(i.startIndex,i.startIndex+i.totalLength),activate:()=>{this.onFileOpen(`${this.worktreePath}/${i.path}`,i.line,i.col)}})))}}var hn=e.i(625054),ho=e.i(165896);e.s(["TaskTerminal",0,function({taskId:e,worktreePath:i,onSessionEnd:s,onFileOpen:r,useCanvasRenderer:n=!1}){let{t:o}=(0,hn.useI18n)(),{resolvedTheme:a}=(0,ht.useTheme)(),h=(0,y.useRef)(null),l=(0,y.useRef)(null),c=(0,y.useRef)(null),d=(0,y.useRef)(null),_=(0,y.useRef)(s);_.current=s;let u=(0,y.useRef)(r);u.current=r;let[f,g]=(0,y.useState)("connecting"),[p,v]=(0,y.useState)(!1);if((0,y.useEffect)(()=>{if(!i||!h.current)return;let s=new ne({fontFamily:"Menlo, Monaco, 'Courier New', monospace",fontSize:13,scrollback:5e3,cursorBlink:!0,allowTransparency:!1,theme:"light"!==a?{background:"#0a0a0a",foreground:"#e5e5e5"}:{background:"#fafafa",foreground:"#171717"}}),r=new nt;s.loadAddon(r),s.open(h.current);let o=null;if(!n)try{(o=new a4).onContextLoss(()=>{o?.dispose(),o=null}),s.loadAddon(o)}catch{}let f=new he((e,i)=>{window.open(i,"_blank")});s.loadAddon(f),i&&s.registerLinkProvider(new hr(s,i,(e,i,s)=>{u.current?.(e,i,s)})),r.fit(),s.focus();let p=null,m=null,S=!1,w=null,b=!1;return(0,ho.getActualWsPort)().then(i=>{S||function i(r){if(S||b)return;g("connecting");let n=new WebSocket(`ws://localhost:${r}/terminal?taskId=${encodeURIComponent(e)}`);p=n,n.addEventListener("open",()=>{n.send(JSON.stringify({type:"resize",cols:s.cols,rows:s.rows})),s.focus(),g("connected"),v(!0),setTimeout(()=>v(!1),2e3)}),n.addEventListener("message",e=>{let i=e.data;"string"==typeof i?s.write(i):i instanceof Blob?i.text().then(e=>s.write(e)):i instanceof ArrayBuffer&&s.write(new Uint8Array(i))}),m?.dispose(),m=s.onData(e=>{n.readyState===WebSocket.OPEN&&n.send(e)}),n.addEventListener("close",e=>{if(e.code>=4e3){b=!0,g("disconnected"),_.current?.(e.code-4e3);return}g("disconnected"),S||b||(w=setTimeout(()=>i(r),3e3))}),n.addEventListener("error",()=>{}),c.current=n}(i)}),l.current=s,d.current=r,()=>{S=!0,w&&clearTimeout(w),m?.dispose(),f.dispose(),o?.dispose(),r.dispose(),s.dispose(),p?.close(),l.current=null,c.current=null,d.current=null}},[e,i]),(0,y.useEffect)(()=>{if(!i||!h.current)return;let e=d.current,s=c.current,r=l.current;e&&r&&requestAnimationFrame(()=>{e.fit(),s?.readyState===WebSocket.OPEN&&s.send(JSON.stringify({type:"resize",cols:r.cols,rows:r.rows}))});let n=null,o=h.current,a=new ResizeObserver(()=>{n&&clearTimeout(n),n=setTimeout(()=>{let e=d.current,i=c.current,s=l.current;e&&s&&(e.fit(),i?.readyState===WebSocket.OPEN&&i.send(JSON.stringify({type:"resize",cols:s.cols,rows:s.rows})))},100)});return a.observe(o),()=>{n&&clearTimeout(n),a.disconnect()}},[e,i]),(0,y.useEffect)(()=>{let e=l.current;if(!e)return;let i="light"!==a;e.options.theme=i?{background:"#0a0a0a",foreground:"#e5e5e5"}:{background:"#fafafa",foreground:"#171717"}},[a]),!i)return(0,C.jsxs)("div",{className:"flex h-full w-full flex-col items-center justify-center bg-[#0a0a0a] text-center",children:[(0,C.jsx)("p",{className:"text-sm text-neutral-400",children:o("terminal.noWorktree")}),(0,C.jsx)("p",{className:"text-xs text-neutral-600 mt-1",children:o("terminal.noWorktreeDesc")})]});let m=o("connected"===f?"terminal.connected":"connecting"===f?"terminal.connecting":"terminal.disconnected");return(0,C.jsxs)("div",{className:"relative h-full w-full bg-[#0a0a0a]",children:[(0,C.jsxs)("div",{className:["absolute right-3 top-3 z-10 flex items-center gap-1.5 rounded px-2 py-0.5 text-xs transition-opacity duration-500","connected"===f&&!p?"opacity-0 pointer-events-none":"opacity-100","bg-black/40 backdrop-blur-sm"].join(" "),title:m,children:[(0,C.jsx)("span",{className:`h-2 w-2 rounded-full ${"connected"===f?"bg-green-500":"connecting"===f?"bg-yellow-500":"bg-red-500"}`}),(0,C.jsx)("span",{className:"text-neutral-300",children:m})]}),(0,C.jsx)("div",{ref:h,className:"h-full w-full overflow-hidden"})]})}],714062)},467005,e=>{e.n(e.i(714062))}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,117474,e=>{"use strict";let t=(0,e.i(863961).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],117474)},803041,e=>{"use strict";var t=e.i(422364);e.s(["ChevronRight",()=>t.default])},750986,1156,e=>{"use strict";var t=e.i(419613);e.s(["CheckCircle2",()=>t.default],750986);let s=(0,e.i(863961).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,s],1156)},950211,e=>{"use strict";let t=(0,e.i(863961).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],950211)},864056,e=>{"use strict";let t=(0,e.i(863961).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],864056)},690951,e=>{"use strict";var t=e.i(432377),s=e.i(85212),a=e.i(309542),l=e.i(275283),r=e.i(711296),i=e.i(831349),n=e.i(584685),o=e.i(937756);function d({className:e,size:s="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":s,className:(0,o.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})}function c({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,o.cn)("px-4 group-data-[size=sm]/card:px-3",e),...s})}var m=e.i(946960),x=e.i(893832),h=e.i(996032),u=e.i(950211),p=e.i(750986),g=e.i(1156),f=e.i(625054);function b({adapterType:e,adapterLabel:a,onResult:l}){let[i,n]=(0,s.useState)(!1),[j,v]=(0,s.useState)(null),{t:N}=(0,f.useI18n)();async function y(){if(!i){n(!0),v(null);try{let t=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:e})}),s=await t.json();v(s),l?.(s)}catch{let e={ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]};v(e),l?.(e)}finally{n(!1)}}}return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"rounded-lg bg-emerald-100 dark:bg-emerald-900/30 p-2",children:(0,t.jsx)(u.Terminal,{className:"h-5 w-5 text-emerald-600 dark:text-emerald-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"font-semibold",children:N("settings.aiTools.cliVerification")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:N("settings.aiTools.cliVerificationDesc")})]})]}),(0,t.jsx)(d,{children:(0,t.jsxs)(c,{className:"p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{children:a&&(0,t.jsx)("p",{className:"font-medium",children:a})}),(0,t.jsx)(r.Button,{onClick:y,disabled:i,variant:"outline",children:i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Loader2,{className:"h-4 w-4 animate-spin mr-2"}),N("settings.aiTools.testing")]}):N("settings.aiTools.testConnection")})]}),j&&(0,t.jsxs)("div",{className:(0,o.cn)("rounded-lg border p-4 space-y-3",j.ok?"bg-green-50 border-green-200 dark:bg-green-950/20 dark:border-green-800":"bg-red-50 border-red-200 dark:bg-red-950/20 dark:border-red-800"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[j.ok?(0,t.jsx)(p.CheckCircle2,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):(0,t.jsx)(g.XCircle,{className:"h-4 w-4 text-red-600 dark:text-red-400"}),(0,t.jsx)("span",{className:(0,o.cn)("text-sm font-medium",j.ok?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:N(j.ok?"settings.aiTools.testPassed":"settings.aiTools.testFailed")})]}),(0,t.jsx)("div",{className:"space-y-2",children:j.checks.map(s=>(0,t.jsxs)("div",{className:"flex items-start gap-2 text-sm",children:[s.passed?(0,t.jsx)(x.Check,{className:"h-4 w-4 text-green-500 mt-0.5 shrink-0"}):(0,t.jsx)(h.X,{className:"h-4 w-4 text-red-500 mt-0.5 shrink-0"}),(0,t.jsx)("span",{className:(0,o.cn)(s.passed?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:s.message})]},`${e}-${s.name}`))})]})]})})]})}var j=e.i(543485);let v=(0,j.createServerReference)("4008da5fb2e740b1e3c6df4ff7e170a1140d107426",j.callServer,void 0,j.findSourceMapURL,"completeOnboarding");var N=e.i(885861),y=e.i(117474),k=e.i(357334),w=e.i(864056),C=e.i(803041),T=e.i(811424),S=e.i(809250),L=e.i(863961);let P=(0,L.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),B=(0,L.default)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);var M=e.i(780156),$=e.i(909260);function R({step:e}){let s=[y.User,u.Terminal,k.GitBranch][e-1]??y.User,a=["Profile","Connect","Configure"][e-1]??"";return(0,t.jsxs)("div",{className:"relative h-full w-full overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute inset-0 opacity-[0.07] text-white",style:{backgroundImage:"radial-gradient(circle, currentColor 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{width:"380px",height:"380px",background:"radial-gradient(circle, oklch(0.80 0.14 75 / 0.25) 0%, oklch(0.80 0.14 75 / 0.08) 45%, transparent 70%)",animation:"ob-pulse 6s ease-in-out infinite"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/25",style:{width:"260px",height:"260px",animation:"ob-spin 20s linear infinite"},children:(0,t.jsx)("div",{className:"absolute -top-1.5 left-1/2 -translate-x-1/2 h-3 w-3 rounded-full bg-amber-400",style:{boxShadow:"0 0 16px oklch(0.80 0.14 75 / 0.7)"}})}),(0,t.jsxs)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/15",style:{width:"380px",height:"380px",animation:"ob-spin 30s linear infinite reverse"},children:[(0,t.jsx)("div",{className:"absolute -top-1 left-1/2 -translate-x-1/2 h-2 w-2 rounded-full bg-amber-400/70"}),(0,t.jsx)("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 h-1.5 w-1.5 rounded-full bg-amber-400/50"})]}),(0,t.jsx)("svg",{className:"absolute",style:{top:"18%",right:"22%",animation:"ob-float 8s ease-in-out infinite"},width:"44",height:"50",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.4)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.06)"})}),(0,t.jsx)("svg",{className:"absolute",style:{bottom:"22%",left:"18%",animation:"ob-float 10s ease-in-out 2s infinite"},width:"32",height:"36",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.3)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.05)"})}),(0,t.jsx)("div",{className:"absolute h-3.5 w-3.5 rounded-full bg-amber-400/40",style:{top:"30%",left:"28%",animation:"ob-float 7s ease-in-out 1s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2.5 w-2.5 rounded-full bg-amber-400/30",style:{top:"65%",right:"30%",animation:"ob-float 9s ease-in-out 3s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2 w-2 rounded-full bg-amber-400/20",style:{top:"45%",right:"15%",animation:"ob-float 6s ease-in-out 0.5s infinite"}}),(0,t.jsxs)("svg",{className:"absolute inset-0 h-full w-full text-white opacity-[0.12]",children:[(0,t.jsx)("line",{x1:"30%",y1:"25%",x2:"70%",y2:"45%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 12s linear infinite"}}),(0,t.jsx)("line",{x1:"65%",y1:"30%",x2:"35%",y2:"70%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 15s linear infinite reverse"}})]}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,t.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl border border-amber-400/35 bg-amber-500/10 backdrop-blur-sm transition-all duration-700",style:{boxShadow:"0 0 50px oklch(0.80 0.14 75 / 0.2)"},children:(0,t.jsx)(s,{className:"h-7 w-7 text-amber-400"})})}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 translate-y-12 text-center",children:(0,t.jsx)("p",{className:"text-[11px] font-medium tracking-widest uppercase text-amber-400/60",children:a})})]})}let U={host:"",ownerMatch:"*",localPathTemplate:""};e.s(["default",0,function(){let e,o,d,c=(0,a.useRouter)(),{t:m,locale:h,setLocale:p}=(0,f.useI18n)(),{theme:g,setTheme:j}=(0,l.useTheme)(),[L,z]=(0,s.useState)(!1),[I,H]=(0,s.useState)(1),[F,G]=(0,s.useState)(""),[O,D]=(0,s.useState)(null),[W,_]=(0,s.useState)([]),[q,V]=(0,s.useState)({...U}),[X,A]=(0,s.useState)(!0),[E,K]=(0,s.useState)(0),[Z,J]=(0,s.useState)(!1),[Q,Y]=(0,s.useState)(!1);(0,s.useEffect)(()=>z(!0),[]);let ee=[{value:"light",label:(0,t.jsx)(T.Sun,{className:"h-4 w-4"})},{value:"dark",label:(0,t.jsx)(S.Moon,{className:"h-4 w-4"})},{value:"system",label:(0,t.jsx)(P,{className:"h-4 w-4"})}];function et(){H(e=>e+1)}function es(){H(e=>Math.max(1,e-1))}async function ea(){Y(!0);try{W.length>0&&await (0,N.setConfigValue)("git.pathMappingRules",W),await v(F.trim()),c.replace("/workspaces")}catch{Y(!1)}}let el=[{icon:y.User,label:m("onboarding.step1.title")},{icon:u.Terminal,label:m("onboarding.step2.title")},{icon:k.GitBranch,label:m("onboarding.step3.title")}];return(0,t.jsxs)("div",{className:"flex h-screen bg-background",children:[(0,t.jsx)("div",{className:"hidden xl:block xl:w-3/5 border-r border-border/50 bg-[oklch(0.13_0.006_260)]",children:(0,t.jsx)(R,{step:I})}),(0,t.jsx)("div",{className:"flex w-full flex-col items-center px-8 pt-[10vh] pb-10 xl:w-2/5 xl:px-16 overflow-y-auto",children:(0,t.jsxs)("div",{className:"w-full max-w-lg space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-8 w-8 rounded-lg"}),(0,t.jsx)("span",{className:"text-lg font-semibold tracking-tight",children:"Tower"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:el.map((e,s)=>{let a=s+1,l=a===I,r=a<I,i=e.icon;return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[s>0&&(0,t.jsx)("div",{className:`h-px w-4 transition-colors duration-500 ${r?"bg-primary":"bg-border"}`}),(0,t.jsxs)("div",{className:`flex items-center gap-1 shrink-0 rounded-full px-2 py-1 text-[11px] font-medium whitespace-nowrap transition-all duration-500 ${l?"bg-primary text-primary-foreground shadow-sm":r?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:[r?(0,t.jsx)(x.Check,{className:"h-3 w-3 shrink-0"}):(0,t.jsx)(i,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{children:e.label})]})]},s)})})]}),(0,t.jsxs)("div",{children:[1===I&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:m("onboarding.step1.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:m("onboarding.step1.desc")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"onboarding-username",className:"text-sm font-medium",children:m("onboarding.step1.usernameLabel")}),(0,t.jsx)("input",{id:"onboarding-username",type:"text",value:F,onChange:e=>G(e.target.value),placeholder:m("onboarding.step1.usernamePlaceholder"),className:"flex h-10 w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",maxLength:64,autoFocus:!0,autoComplete:"username"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(B,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:m("settings.language")})]}),(0,t.jsx)(n.SegmentedControl,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}].map(e=>({value:e.value,label:e.label})),value:h,onChange:e=>p(e)})]}),(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(T.Sun,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:m("settings.theme")})]}),L?(0,t.jsx)(n.SegmentedControl,{options:ee.map(e=>({value:e.value,label:e.label})),value:g??"system",onChange:e=>j(e)}):(0,t.jsx)("div",{className:"inline-flex h-8 rounded-md border border-border bg-muted p-1 gap-1 w-[120px]"})]})]}),(0,t.jsx)("div",{className:"flex justify-end pt-3",children:(0,t.jsxs)(r.Button,{onClick:et,disabled:0===F.trim().length,className:"px-5",children:[m("onboarding.step1.next"),(0,t.jsx)(C.ChevronRight,{className:"h-4 w-4 ml-1"})]})})]}),2===I&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:m("onboarding.step2.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:m("onboarding.step2.desc")})]}),(0,t.jsx)(b,{adapterType:"claude_code",adapterLabel:"Claude CLI",onResult:D}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(r.Button,{variant:"ghost",className:"text-muted-foreground",onClick:es,children:[(0,t.jsx)(w.ChevronLeft,{className:"h-4 w-4 mr-1"}),m("onboarding.back")]}),(0,t.jsxs)(r.Button,{onClick:et,disabled:!O?.ok,className:"px-5",children:[m("onboarding.step1.next"),(0,t.jsx)(C.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),3===I&&(0,t.jsxs)("div",{className:"space-y-5 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:m("onboarding.step3.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:m("onboarding.step3.desc")})]}),W.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:m("onboarding.step3.added").replace("{count}",String(W.length))}),W.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("p",{className:"text-sm font-medium truncate",children:[e.host,(0,t.jsx)("span",{className:"text-muted-foreground",children:"*"!==e.ownerMatch?` / ${e.ownerMatch}`:""})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground font-mono truncate",children:e.localPathTemplate})]}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>{var t;return t=e.id,void _(e=>e.filter(e=>e.id!==t))},children:(0,t.jsx)($.Trash2,{className:"h-3.5 w-3.5"})})]},e.id))]}),X?(0,t.jsxs)("div",{className:"space-y-3 rounded-lg border border-border p-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:m("onboarding.step3.hostLabel")}),(0,t.jsx)(i.Input,{value:q.host,onChange:e=>V(t=>({...t,host:e.target.value})),placeholder:m("onboarding.step3.hostPlaceholder"),className:"h-9",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:m("onboarding.step3.ownerLabel")}),(0,t.jsx)(i.Input,{value:q.ownerMatch,onChange:e=>V(t=>({...t,ownerMatch:e.target.value})),placeholder:m("onboarding.step3.ownerPlaceholder"),className:"h-9"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:m("onboarding.step3.pathLabel")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(i.Input,{value:q.localPathTemplate,onChange:e=>V(t=>({...t,localPathTemplate:e.target.value})),placeholder:m("onboarding.step3.pathPlaceholder"),className:"h-9 font-mono text-xs flex-1"}),(0,t.jsx)("button",{type:"button",onClick:()=>{J(e=>(e||K(2),!e))},className:`shrink-0 rounded-full px-2.5 py-1 text-[11px] font-mono font-medium transition-colors ${Z?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:"{path}"})]}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:m(Z?"onboarding.step3.pathHintFull":"onboarding.step3.pathHintRepo")})]}),q.localPathTemplate&&(e=q.localPathTemplate.trim().replace(/\/+$/,""),o=Z?`${e}/{path}`:e,d=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:m("onboarding.step3.previewLabel")}),(0,t.jsx)("div",{className:"flex gap-1 flex-wrap",children:d.map((e,s)=>(0,t.jsx)("button",{type:"button",onClick:()=>K(s),className:`rounded-md px-2 py-1 text-[11px] font-medium transition-colors ${E===s?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e.label},s))}),(0,t.jsxs)("div",{className:"rounded-md bg-muted/50 px-3 py-2 space-y-1",children:[(0,t.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:d[E].url}),(0,t.jsxs)("p",{className:"font-mono text-xs",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,t.jsx)("span",{className:"text-primary",children:function(e,t){if(!e||!t)return"";let s=t.trim(),a=[],l=s.match(/^git@[^:]+:(.+)$/);if(l)a=l[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let e=new URL(s);a=decodeURIComponent(e.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!a.length)return"";let r=a[0],i=a[a.length-1],n=a.join("/");if(e.includes("{path}"))return e.replace("{path}",n).replace("{owner}",r).replace("{repo}",i).replace(/\/+$/,"");let o=e.replace("{owner}",r).replace("{repo}","").replace(/\/+$/,"");return`${o}/${i}`}(o,d[E].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[W.length>0&&(0,t.jsx)(r.Button,{variant:"ghost",onClick:()=>A(!1),children:m("settings.config.git.cancel")}),(0,t.jsxs)(r.Button,{onClick:function(){if(!q.host.trim()||!q.localPathTemplate.trim())return;let e=q.localPathTemplate.trim().replace(/\/+$/,""),t=Z?`${e}/{path}`:e,s={id:crypto.randomUUID(),host:q.host.trim(),ownerMatch:q.ownerMatch.trim()||"*",localPathTemplate:t,priority:W.length};_(e=>[...e,s]),V({...U}),J(!1),A(!1)},disabled:!q.host.trim()||!q.localPathTemplate.trim(),children:[(0,t.jsx)(x.Check,{className:"h-4 w-4 mr-1"}),m("settings.config.git.save")]})]})]}):(0,t.jsxs)(r.Button,{variant:"outline",onClick:()=>{V({...U}),A(!0)},children:[(0,t.jsx)(M.Plus,{className:"h-4 w-4 mr-1"}),m("settings.config.git.addRule")]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(r.Button,{variant:"ghost",className:"text-muted-foreground",onClick:es,children:[(0,t.jsx)(w.ChevronLeft,{className:"h-4 w-4 mr-1"}),m("onboarding.back")]}),(0,t.jsxs)(r.Button,{onClick:ea,disabled:Q,className:"px-5",children:[m("onboarding.complete"),(0,t.jsx)(x.Check,{className:"h-4 w-4 ml-1"})]})]})]})]}),(0,t.jsx)("div",{className:"pt-6 text-xs text-muted-foreground",children:m("onboarding.stepIndicator").replace("{current}",String(I)).replace("{total}",String(3))})]})})]})}],690951)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,117474,e=>{"use strict";let t=(0,e.i(863961).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],117474)},803041,e=>{"use strict";var t=e.i(422364);e.s(["ChevronRight",()=>t.default])},750986,1156,e=>{"use strict";var t=e.i(419613);e.s(["CheckCircle2",()=>t.default],750986);let s=(0,e.i(863961).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,s],1156)},950211,e=>{"use strict";let t=(0,e.i(863961).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],950211)},864056,e=>{"use strict";let t=(0,e.i(863961).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],864056)},690951,e=>{"use strict";var t=e.i(432377),s=e.i(85212),a=e.i(309542),l=e.i(275283),r=e.i(711296),i=e.i(831349),n=e.i(584685),o=e.i(937756);function d({className:e,size:s="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":s,className:(0,o.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})}function c({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,o.cn)("px-4 group-data-[size=sm]/card:px-3",e),...s})}var m=e.i(946960),x=e.i(893832),h=e.i(996032),u=e.i(950211),p=e.i(750986),g=e.i(1156),f=e.i(625054);function b({adapterType:e,adapterLabel:a,onResult:l}){let[i,n]=(0,s.useState)(!1),[j,v]=(0,s.useState)(null),{t:N}=(0,f.useI18n)();async function y(){if(!i){n(!0),v(null);try{let t=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:e})}),s=await t.json();v(s),l?.(s)}catch{let e={ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]};v(e),l?.(e)}finally{n(!1)}}}return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"rounded-lg bg-emerald-100 dark:bg-emerald-900/30 p-2",children:(0,t.jsx)(u.Terminal,{className:"h-5 w-5 text-emerald-600 dark:text-emerald-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"font-semibold",children:N("settings.aiTools.cliVerification")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:N("settings.aiTools.cliVerificationDesc")})]})]}),(0,t.jsx)(d,{children:(0,t.jsxs)(c,{className:"p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{children:a&&(0,t.jsx)("p",{className:"font-medium",children:a})}),(0,t.jsx)(r.Button,{onClick:y,disabled:i,variant:"outline",children:i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Loader2,{className:"h-4 w-4 animate-spin mr-2"}),N("settings.aiTools.testing")]}):N("settings.aiTools.testConnection")})]}),j&&(0,t.jsxs)("div",{className:(0,o.cn)("rounded-lg border p-4 space-y-3",j.ok?"bg-green-50 border-green-200 dark:bg-green-950/20 dark:border-green-800":"bg-red-50 border-red-200 dark:bg-red-950/20 dark:border-red-800"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[j.ok?(0,t.jsx)(p.CheckCircle2,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):(0,t.jsx)(g.XCircle,{className:"h-4 w-4 text-red-600 dark:text-red-400"}),(0,t.jsx)("span",{className:(0,o.cn)("text-sm font-medium",j.ok?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:N(j.ok?"settings.aiTools.testPassed":"settings.aiTools.testFailed")})]}),(0,t.jsx)("div",{className:"space-y-2",children:j.checks.map(s=>(0,t.jsxs)("div",{className:"flex items-start gap-2 text-sm",children:[s.passed?(0,t.jsx)(x.Check,{className:"h-4 w-4 text-green-500 mt-0.5 shrink-0"}):(0,t.jsx)(h.X,{className:"h-4 w-4 text-red-500 mt-0.5 shrink-0"}),(0,t.jsx)("span",{className:(0,o.cn)(s.passed?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:s.message})]},`${e}-${s.name}`))})]})]})})]})}var j=e.i(543485);let v=(0,j.createServerReference)("405e24a96c3040b977262f38c5e06b74894259e0be",j.callServer,void 0,j.findSourceMapURL,"completeOnboarding");var N=e.i(632033),y=e.i(117474),k=e.i(357334),w=e.i(864056),C=e.i(803041),T=e.i(811424),S=e.i(809250),L=e.i(863961);let P=(0,L.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),B=(0,L.default)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);var M=e.i(780156),$=e.i(909260);function R({step:e}){let s=[y.User,u.Terminal,k.GitBranch][e-1]??y.User,a=["Profile","Connect","Configure"][e-1]??"";return(0,t.jsxs)("div",{className:"relative h-full w-full overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute inset-0 opacity-[0.07] text-white",style:{backgroundImage:"radial-gradient(circle, currentColor 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{width:"380px",height:"380px",background:"radial-gradient(circle, oklch(0.80 0.14 75 / 0.25) 0%, oklch(0.80 0.14 75 / 0.08) 45%, transparent 70%)",animation:"ob-pulse 6s ease-in-out infinite"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/25",style:{width:"260px",height:"260px",animation:"ob-spin 20s linear infinite"},children:(0,t.jsx)("div",{className:"absolute -top-1.5 left-1/2 -translate-x-1/2 h-3 w-3 rounded-full bg-amber-400",style:{boxShadow:"0 0 16px oklch(0.80 0.14 75 / 0.7)"}})}),(0,t.jsxs)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/15",style:{width:"380px",height:"380px",animation:"ob-spin 30s linear infinite reverse"},children:[(0,t.jsx)("div",{className:"absolute -top-1 left-1/2 -translate-x-1/2 h-2 w-2 rounded-full bg-amber-400/70"}),(0,t.jsx)("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 h-1.5 w-1.5 rounded-full bg-amber-400/50"})]}),(0,t.jsx)("svg",{className:"absolute",style:{top:"18%",right:"22%",animation:"ob-float 8s ease-in-out infinite"},width:"44",height:"50",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.4)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.06)"})}),(0,t.jsx)("svg",{className:"absolute",style:{bottom:"22%",left:"18%",animation:"ob-float 10s ease-in-out 2s infinite"},width:"32",height:"36",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.3)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.05)"})}),(0,t.jsx)("div",{className:"absolute h-3.5 w-3.5 rounded-full bg-amber-400/40",style:{top:"30%",left:"28%",animation:"ob-float 7s ease-in-out 1s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2.5 w-2.5 rounded-full bg-amber-400/30",style:{top:"65%",right:"30%",animation:"ob-float 9s ease-in-out 3s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2 w-2 rounded-full bg-amber-400/20",style:{top:"45%",right:"15%",animation:"ob-float 6s ease-in-out 0.5s infinite"}}),(0,t.jsxs)("svg",{className:"absolute inset-0 h-full w-full text-white opacity-[0.12]",children:[(0,t.jsx)("line",{x1:"30%",y1:"25%",x2:"70%",y2:"45%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 12s linear infinite"}}),(0,t.jsx)("line",{x1:"65%",y1:"30%",x2:"35%",y2:"70%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 15s linear infinite reverse"}})]}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,t.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl border border-amber-400/35 bg-amber-500/10 backdrop-blur-sm transition-all duration-700",style:{boxShadow:"0 0 50px oklch(0.80 0.14 75 / 0.2)"},children:(0,t.jsx)(s,{className:"h-7 w-7 text-amber-400"})})}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 translate-y-12 text-center",children:(0,t.jsx)("p",{className:"text-[11px] font-medium tracking-widest uppercase text-amber-400/60",children:a})})]})}let U={host:"",ownerMatch:"*",localPathTemplate:""};e.s(["default",0,function(){let e,o,d,c=(0,a.useRouter)(),{t:m,locale:h,setLocale:p}=(0,f.useI18n)(),{theme:g,setTheme:j}=(0,l.useTheme)(),[L,z]=(0,s.useState)(!1),[I,H]=(0,s.useState)(1),[F,G]=(0,s.useState)(""),[O,D]=(0,s.useState)(null),[W,_]=(0,s.useState)([]),[q,V]=(0,s.useState)({...U}),[X,A]=(0,s.useState)(!0),[E,K]=(0,s.useState)(0),[Z,J]=(0,s.useState)(!1),[Q,Y]=(0,s.useState)(!1);(0,s.useEffect)(()=>z(!0),[]);let ee=[{value:"light",label:(0,t.jsx)(T.Sun,{className:"h-4 w-4"})},{value:"dark",label:(0,t.jsx)(S.Moon,{className:"h-4 w-4"})},{value:"system",label:(0,t.jsx)(P,{className:"h-4 w-4"})}];function et(){H(e=>e+1)}function es(){H(e=>Math.max(1,e-1))}async function ea(){Y(!0);try{W.length>0&&await (0,N.setConfigValue)("git.pathMappingRules",W),await v(F.trim()),c.replace("/workspaces")}catch{Y(!1)}}let el=[{icon:y.User,label:m("onboarding.step1.title")},{icon:u.Terminal,label:m("onboarding.step2.title")},{icon:k.GitBranch,label:m("onboarding.step3.title")}];return(0,t.jsxs)("div",{className:"flex h-screen bg-background",children:[(0,t.jsx)("div",{className:"hidden xl:block xl:w-3/5 border-r border-border/50 bg-[oklch(0.13_0.006_260)]",children:(0,t.jsx)(R,{step:I})}),(0,t.jsx)("div",{className:"flex w-full flex-col items-center px-8 pt-[10vh] pb-10 xl:w-2/5 xl:px-16 overflow-y-auto",children:(0,t.jsxs)("div",{className:"w-full max-w-lg space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-8 w-8 rounded-lg"}),(0,t.jsx)("span",{className:"text-lg font-semibold tracking-tight",children:"Tower"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:el.map((e,s)=>{let a=s+1,l=a===I,r=a<I,i=e.icon;return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[s>0&&(0,t.jsx)("div",{className:`h-px w-4 transition-colors duration-500 ${r?"bg-primary":"bg-border"}`}),(0,t.jsxs)("div",{className:`flex items-center gap-1 shrink-0 rounded-full px-2 py-1 text-[11px] font-medium whitespace-nowrap transition-all duration-500 ${l?"bg-primary text-primary-foreground shadow-sm":r?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:[r?(0,t.jsx)(x.Check,{className:"h-3 w-3 shrink-0"}):(0,t.jsx)(i,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{children:e.label})]})]},s)})})]}),(0,t.jsxs)("div",{children:[1===I&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:m("onboarding.step1.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:m("onboarding.step1.desc")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"onboarding-username",className:"text-sm font-medium",children:m("onboarding.step1.usernameLabel")}),(0,t.jsx)("input",{id:"onboarding-username",type:"text",value:F,onChange:e=>G(e.target.value),placeholder:m("onboarding.step1.usernamePlaceholder"),className:"flex h-10 w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",maxLength:64,autoFocus:!0,autoComplete:"username"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(B,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:m("settings.language")})]}),(0,t.jsx)(n.SegmentedControl,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}].map(e=>({value:e.value,label:e.label})),value:h,onChange:e=>p(e)})]}),(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(T.Sun,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:m("settings.theme")})]}),L?(0,t.jsx)(n.SegmentedControl,{options:ee.map(e=>({value:e.value,label:e.label})),value:g??"system",onChange:e=>j(e)}):(0,t.jsx)("div",{className:"inline-flex h-8 rounded-md border border-border bg-muted p-1 gap-1 w-[120px]"})]})]}),(0,t.jsx)("div",{className:"flex justify-end pt-3",children:(0,t.jsxs)(r.Button,{onClick:et,disabled:0===F.trim().length,className:"px-5",children:[m("onboarding.step1.next"),(0,t.jsx)(C.ChevronRight,{className:"h-4 w-4 ml-1"})]})})]}),2===I&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:m("onboarding.step2.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:m("onboarding.step2.desc")})]}),(0,t.jsx)(b,{adapterType:"claude_code",adapterLabel:"Claude CLI",onResult:D}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(r.Button,{variant:"ghost",className:"text-muted-foreground",onClick:es,children:[(0,t.jsx)(w.ChevronLeft,{className:"h-4 w-4 mr-1"}),m("onboarding.back")]}),(0,t.jsxs)(r.Button,{onClick:et,disabled:!O?.ok,className:"px-5",children:[m("onboarding.step1.next"),(0,t.jsx)(C.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),3===I&&(0,t.jsxs)("div",{className:"space-y-5 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:m("onboarding.step3.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:m("onboarding.step3.desc")})]}),W.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:m("onboarding.step3.added").replace("{count}",String(W.length))}),W.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("p",{className:"text-sm font-medium truncate",children:[e.host,(0,t.jsx)("span",{className:"text-muted-foreground",children:"*"!==e.ownerMatch?` / ${e.ownerMatch}`:""})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground font-mono truncate",children:e.localPathTemplate})]}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>{var t;return t=e.id,void _(e=>e.filter(e=>e.id!==t))},children:(0,t.jsx)($.Trash2,{className:"h-3.5 w-3.5"})})]},e.id))]}),X?(0,t.jsxs)("div",{className:"space-y-3 rounded-lg border border-border p-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:m("onboarding.step3.hostLabel")}),(0,t.jsx)(i.Input,{value:q.host,onChange:e=>V(t=>({...t,host:e.target.value})),placeholder:m("onboarding.step3.hostPlaceholder"),className:"h-9",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:m("onboarding.step3.ownerLabel")}),(0,t.jsx)(i.Input,{value:q.ownerMatch,onChange:e=>V(t=>({...t,ownerMatch:e.target.value})),placeholder:m("onboarding.step3.ownerPlaceholder"),className:"h-9"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:m("onboarding.step3.pathLabel")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(i.Input,{value:q.localPathTemplate,onChange:e=>V(t=>({...t,localPathTemplate:e.target.value})),placeholder:m("onboarding.step3.pathPlaceholder"),className:"h-9 font-mono text-xs flex-1"}),(0,t.jsx)("button",{type:"button",onClick:()=>{J(e=>(e||K(2),!e))},className:`shrink-0 rounded-full px-2.5 py-1 text-[11px] font-mono font-medium transition-colors ${Z?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:"{path}"})]}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:m(Z?"onboarding.step3.pathHintFull":"onboarding.step3.pathHintRepo")})]}),q.localPathTemplate&&(e=q.localPathTemplate.trim().replace(/\/+$/,""),o=Z?`${e}/{path}`:e,d=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:m("onboarding.step3.previewLabel")}),(0,t.jsx)("div",{className:"flex gap-1 flex-wrap",children:d.map((e,s)=>(0,t.jsx)("button",{type:"button",onClick:()=>K(s),className:`rounded-md px-2 py-1 text-[11px] font-medium transition-colors ${E===s?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e.label},s))}),(0,t.jsxs)("div",{className:"rounded-md bg-muted/50 px-3 py-2 space-y-1",children:[(0,t.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:d[E].url}),(0,t.jsxs)("p",{className:"font-mono text-xs",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,t.jsx)("span",{className:"text-primary",children:function(e,t){if(!e||!t)return"";let s=t.trim(),a=[],l=s.match(/^git@[^:]+:(.+)$/);if(l)a=l[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let e=new URL(s);a=decodeURIComponent(e.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!a.length)return"";let r=a[0],i=a[a.length-1],n=a.join("/");if(e.includes("{path}"))return e.replace("{path}",n).replace("{owner}",r).replace("{repo}",i).replace(/\/+$/,"");let o=e.replace("{owner}",r).replace("{repo}","").replace(/\/+$/,"");return`${o}/${i}`}(o,d[E].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[W.length>0&&(0,t.jsx)(r.Button,{variant:"ghost",onClick:()=>A(!1),children:m("settings.config.git.cancel")}),(0,t.jsxs)(r.Button,{onClick:function(){if(!q.host.trim()||!q.localPathTemplate.trim())return;let e=q.localPathTemplate.trim().replace(/\/+$/,""),t=Z?`${e}/{path}`:e,s={id:crypto.randomUUID(),host:q.host.trim(),ownerMatch:q.ownerMatch.trim()||"*",localPathTemplate:t,priority:W.length};_(e=>[...e,s]),V({...U}),J(!1),A(!1)},disabled:!q.host.trim()||!q.localPathTemplate.trim(),children:[(0,t.jsx)(x.Check,{className:"h-4 w-4 mr-1"}),m("settings.config.git.save")]})]})]}):(0,t.jsxs)(r.Button,{variant:"outline",onClick:()=>{V({...U}),A(!0)},children:[(0,t.jsx)(M.Plus,{className:"h-4 w-4 mr-1"}),m("settings.config.git.addRule")]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(r.Button,{variant:"ghost",className:"text-muted-foreground",onClick:es,children:[(0,t.jsx)(w.ChevronLeft,{className:"h-4 w-4 mr-1"}),m("onboarding.back")]}),(0,t.jsxs)(r.Button,{onClick:ea,disabled:Q,className:"px-5",children:[m("onboarding.complete"),(0,t.jsx)(x.Check,{className:"h-4 w-4 ml-1"})]})]})]})]}),(0,t.jsx)("div",{className:"pt-6 text-xs text-muted-foreground",children:m("onboarding.stepIndicator").replace("{current}",String(I)).replace("{total}",String(3))})]})})]})}],690951)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,593835,e=>{"use strict";var t=e.i(432377),s=e.i(631325),a=e.i(309542),r=e.i(265826),l=e.i(555159),n=e.i(478430),i=e.i(565037),o=e.i(625054);let d=[{key:"notes",icon:l.FileText},{key:"assets",icon:n.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:l}=(0,o.useI18n)(),n=(0,a.usePathname)(),i=d.find(e=>n.includes(`/${e.key}`))?.key;return(0,t.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4 py-2",children:[(0,t.jsxs)(s.default,{href:`/workspaces/${e}`,className:"mr-2 flex items-center gap-1.5 rounded-md px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,t.jsx)(r.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l("archive.backToBoard")})]}),(0,t.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),d.map(a=>{let r=a.icon,n=i===a.key;return(0,t.jsxs)(s.default,{href:`/workspaces/${e}/${a.key}`,className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${n?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,t.jsx)(r,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l(`sidebar.${a.key}`)})]},a.key)})]})}])},787207,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},99649,e=>{"use strict";var t=e.i(543485);let s=(0,t.createServerReference)("402824ab66f9a2d99e981123aa9da50142d1e9f49c",t.callServer,void 0,t.findSourceMapURL,"deleteAsset");e.s(["deleteAsset",0,s])},215365,739730,e=>{"use strict";let t=(0,e.i(863961).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,t],215365);var s=e.i(543485);let a=(0,s.createServerReference)("4080a7229d9c52869922953b0691c8cfb8683cfd7c",s.callServer,void 0,s.findSourceMapURL,"uploadAsset");e.s(["uploadAsset",0,a],739730)},203529,e=>{"use strict";var t=e.i(337590),s=e.i(793988),a=e.i(164688),r=e.i(937756);let l=(0,a.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:a="default",render:n,...i}){var o;return o={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,r.cn)(l({variant:a}),e)},i),render:n,state:{slot:"badge",variant:a}},(0,s.useRenderElement)(o.defaultTagName??"div",o,o)}],203529)},265826,e=>{"use strict";let t=(0,e.i(863961).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],265826)},726111,e=>{"use strict";var t=e.i(432377),s=e.i(937756);e.s(["EmptyState",0,function({icon:e,title:a,description:r,action:l,className:n}){return(0,t.jsxs)("div",{className:(0,s.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",n),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:a}),r&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:r}),l&&(0,t.jsx)("div",{className:"mt-2",children:l})]})}])},616199,e=>{"use strict";let t=(0,e.i(863961).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,t],616199)},154333,e=>{"use strict";let t=(0,e.i(863961).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],154333)},398784,e=>{"use strict";var t=e.i(432377),s=e.i(85212),a=e.i(946960),r=e.i(593835),l=e.i(625054),n=e.i(99649),i=e.i(543485);let o=(0,i.createServerReference)("4023e55fcbc73de4c49711b7198b753038ecf19f43",i.callServer,void 0,i.findSourceMapURL,"getProjectAssets");var d=e.i(478430),c=e.i(726111),x=e.i(555159),u=e.i(154333),m=e.i(909260),h=e.i(711296);function p(e){let t=e.match(/(?:^|\/)(?:storage|data)\/assets\/([^/]+)\/([^/]+)$/);return t?`/api/files/assets/${t[1]}/${t[2]}`:e}function f({asset:e,onPreview:s,onReveal:a,onDelete:r,onTaskClick:n}){var i;let{t:o}=(0,l.useI18n)(),c=p(e.path),g=e.mimeType?.startsWith("image/");return(0,t.jsxs)("div",{className:"flex items-center gap-4 rounded-lg border border-border bg-card px-4 py-3 transition-colors hover:bg-accent/20",children:[(0,t.jsx)(h.Button,{variant:"ghost",onClick:()=>s(e),className:"flex-shrink-0 cursor-pointer p-0 h-auto",children:g?(0,t.jsx)("img",{src:c,alt:e.filename,className:"h-12 w-12 rounded object-cover border border-border"}):(0,t.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded border border-border bg-muted",children:(0,t.jsx)(x.FileText,{className:"h-6 w-6 text-muted-foreground"})})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("p",{className:"truncate text-sm font-medium text-foreground",children:e.filename}),e.taskTitle&&e.taskId&&(0,t.jsx)(h.Button,{variant:"ghost",onClick:t=>{t.stopPropagation(),n?.(e.taskId)},className:"flex-shrink-0 bg-blue-500/10 text-blue-600 dark:text-blue-400 text-xs px-1.5 py-0.5 rounded cursor-pointer hover:bg-blue-500/20 transition-colors h-auto",children:e.taskTitle.length>20?`[任务: ${e.taskTitle.slice(0,20)}...]`:`[任务: ${e.taskTitle}]`})]}),e.description&&(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:e.description}),(0,t.jsxs)("div",{className:"mt-0.5 flex items-center gap-3 text-xs text-muted-foreground",children:[(0,t.jsx)("span",{children:null===(i=e.size)?"-":i<1024?`${i} B`:i<1048576?`${(i/1024).toFixed(1)} KB`:i<0x40000000?`${(i/1048576).toFixed(1)} MB`:`${(i/0x40000000).toFixed(1)} GB`}),(0,t.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0",children:[(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",onClick:()=>s(e),className:"text-muted-foreground","aria-label":o("assets.preview"),children:(0,t.jsx)(u.Eye,{className:"h-4 w-4"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",onClick:()=>a(e),className:"text-muted-foreground","aria-label":o("assets.revealInFinder"),children:(0,t.jsx)(d.FolderOpen,{className:"h-4 w-4"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",onClick:()=>r(e.id),className:"text-muted-foreground hover:text-rose-400","aria-label":o("assets.delete"),children:(0,t.jsx)(m.Trash2,{className:"h-4 w-4"})})]})]})}function g({assets:e,onPreview:s,onReveal:a,onDelete:r,onTaskClick:n}){let{t:i}=(0,l.useI18n)();return 0===e.length?(0,t.jsx)(c.EmptyState,{icon:d.FolderOpen,title:i("assets.empty"),description:i("assets.emptyHint")}):(0,t.jsx)("div",{className:"flex flex-col gap-3",children:e.map(e=>(0,t.jsx)(f,{asset:e,onPreview:s,onReveal:a,onDelete:r,onTaskClick:n},e.id))})}var j=e.i(215365),v=e.i(996032),b=e.i(739730),y=e.i(540032),N=e.i(610874);function w({allWorkspaces:e,initialWsId:a,initialProjectId:r,onUploaded:n}){let i,{t:o}=(0,l.useI18n)(),d=(0,s.useRef)(null),[c,x]=(0,s.useState)(!1),[u,m]=(0,s.useState)(!1),[p,f]=(0,s.useState)(null),[g,k]=(0,s.useState)(a),[S,C]=(0,s.useState)(r),[T,I]=(0,s.useState)(""),O=e.find(e=>e.id===g),D=O?.projects??[],E=()=>{x(!1),f(null),d.current&&(d.current.value="")},R=async()=>{if(p&&S){m(!0);try{let e=new FormData;e.append("file",p),e.append("projectId",S),e.append("description",T.trim()),await (0,b.uploadAsset)(e),n(S),E()}finally{m(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(h.Button,{onClick:()=>{k(a),C(r),f(null),I(""),x(!0)},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(j.Upload,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:o("assets.upload")})]}),c&&(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50",onClick:E}),(0,t.jsxs)("div",{className:"relative w-full max-w-md rounded-lg border border-border bg-card p-6 shadow-lg",children:[(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:E,className:"absolute right-3 top-3 text-muted-foreground",children:(0,t.jsx)(v.X,{className:"h-4 w-4"})}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-4",children:o("assets.uploadTitle")}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0",children:o("assets.workspace")}),(0,t.jsxs)(N.Select,{value:g,onValueChange:t=>{var s;let a;return k(s=t??""),a=e.find(e=>e.id===s),void C(a?.projects[0]?.id??null)},children:[(0,t.jsx)(N.SelectTrigger,{className:"flex-1 text-xs",children:(0,t.jsx)("span",{className:"truncate",children:O?.name??g})}),(0,t.jsx)(N.SelectContent,{children:e.map(e=>(0,t.jsx)(N.SelectItem,{value:e.id,children:e.name},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0",children:o("assets.project")}),D.length>0?(0,t.jsxs)(N.Select,{value:S??"",onValueChange:e=>C(e??""),children:[(0,t.jsx)(N.SelectTrigger,{className:"flex-1 text-xs",children:(0,t.jsx)("span",{className:"truncate",children:(i=D.find(e=>e.id===S))?i.alias?`${i.name} (${i.alias})`:i.name:S})}),(0,t.jsx)(N.SelectContent,{children:D.map(e=>{let s=e.alias?`${e.name} (${e.alias})`:e.name;return(0,t.jsx)(N.SelectItem,{value:e.id,children:s},e.id)})})]}):(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:o("assets.noProject")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0",children:o("assets.file")}),(0,t.jsx)("input",{type:"file",ref:d,onChange:e=>{f(e.target.files?.[0]??null)},className:"hidden"}),(0,t.jsx)(h.Button,{variant:"outline",onClick:()=>{d.current?.click()},className:"flex-1 border-dashed bg-background px-3 py-2 text-xs text-muted-foreground hover:border-primary/50 hover:text-foreground transition-colors text-left justify-start",children:p?p.name:o("assets.selectFile")})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0 pt-1.5",children:o("assets.description")}),(0,t.jsx)(y.Textarea,{value:T,onChange:e=>I(e.target.value),placeholder:o("assets.descriptionPlaceholder"),className:"flex-1 rounded-md border border-border bg-background px-3 py-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring resize-none h-20"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-end mt-6",children:[(0,t.jsx)(h.Button,{variant:"outline",onClick:E,children:o("notes.cancel")}),(0,t.jsx)(h.Button,{onClick:R,disabled:!p||!S||!T.trim()||u,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:o(u?"assets.uploading":"assets.upload")})]})]})]})]})}var k=e.i(718837);function S({imageUrl:e,filename:a,open:r,onOpenChange:l}){let[n,i]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{i(!1)},[r]),(0,t.jsx)(k.Dialog,{open:r,onOpenChange:l,children:(0,t.jsxs)(k.DialogContent,{showCloseButton:!1,className:"max-w-[90vw] max-h-[90vh] p-0 overflow-hidden bg-black/90 ring-0",children:[(0,t.jsx)(k.DialogClose,{render:(0,t.jsx)(h.Button,{variant:"ghost",className:"absolute top-2 right-2 z-10 h-8 w-8 p-0 text-white hover:bg-white/20 hover:text-white"}),"aria-label":"Close",children:(0,t.jsx)(v.X,{className:"h-4 w-4"})}),e&&(0,t.jsx)(t.Fragment,{children:n?(0,t.jsx)("div",{className:"overflow-auto max-w-[90vw] max-h-[90vh]",children:(0,t.jsx)("img",{src:e,alt:a,onClick:()=>i(!1),className:"w-auto h-auto max-w-none cursor-zoom-out"})}):(0,t.jsx)("img",{src:e,alt:a,onClick:()=>i(!0),className:"max-w-full max-h-[85vh] object-contain cursor-zoom-in mx-auto"})}),(0,t.jsx)("span",{className:"absolute bottom-2 left-3 text-xs text-white/70 truncate max-w-[60%]",children:a})]})})}var C=e.i(788475),T=e.i(67006);function I({url:e,filename:r,open:n,onOpenChange:i}){let{t:o}=(0,l.useI18n)(),[d,c]=(0,s.useState)(null),[x,u]=(0,s.useState)(!1),[m,h]=(0,s.useState)(null);(0,s.useEffect)(()=>{if(!n||!e){c(null),h(null);return}let t=!1;return u(!0),h(null),c(null),fetch(e).then(e=>{let t=e.headers.get("content-length");if(t&&parseInt(t,10)>1048576)throw Error("FILE_TOO_LARGE");return e.text()}).then(e=>{if(e.length>1048576)throw Error("FILE_TOO_LARGE");t||(c(e),u(!1))}).catch(e=>{t||(e instanceof Error&&"FILE_TOO_LARGE"===e.message?h(o("assets.fileTooLarge")):h(o("assets.previewError")),u(!1))}),()=>{t=!0}},[n,e,o]);let p=r.split(".").pop()?.toLowerCase();return(0,t.jsx)(k.Dialog,{open:n,onOpenChange:i,children:(0,t.jsxs)(k.DialogContent,{className:"max-w-3xl max-h-[80vh] flex flex-col",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-4 pt-4",children:r}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-4 pb-4 pt-2",children:(()=>{if(x)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,t.jsx)(a.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:o("assets.loadingPreview")})]});if(m)return(0,t.jsx)("p",{className:"text-sm text-destructive",children:m});if(null===d)return null;if("md"===p)return(0,t.jsx)("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:(0,t.jsx)(C.default,{remarkPlugins:[T.default],children:d})});if("json"===p){let e;try{e=JSON.stringify(JSON.parse(d),null,2)}catch{e=d}return(0,t.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:e})}return(0,t.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:d})})()})]})})}var O=e.i(551160),D=e.i(937756),E=e.i(812356);function R({...e}){return(0,t.jsx)(O.Dialog.Root,{"data-slot":"sheet",...e})}function A({...e}){return(0,t.jsx)(O.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function B({className:e,...s}){return(0,t.jsx)(O.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,D.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...s})}function $({className:e,children:s,side:a="right",showCloseButton:r=!0,...l}){return(0,t.jsxs)(A,{children:[(0,t.jsx)(B,{}),(0,t.jsxs)(O.Dialog.Popup,{"data-slot":"sheet-content","data-side":a,className:(0,D.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...l,children:[s,r&&(0,t.jsxs)(O.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(h.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(E.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function P({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,D.cn)("flex flex-col gap-0.5 p-4",e),...s})}function L({className:e,...s}){return(0,t.jsx)(O.Dialog.Title,{"data-slot":"sheet-title",className:(0,D.cn)("font-heading text-base font-medium text-foreground",e),...s})}function z({className:e,...s}){return(0,t.jsx)(O.Dialog.Description,{"data-slot":"sheet-description",className:(0,D.cn)("text-sm text-muted-foreground",e),...s})}var F=e.i(142124),M=e.i(203529);let _=(0,i.createServerReference)("408bb641755358e099b0f600083d554bdece767654",i.callServer,void 0,i.findSourceMapURL,"getTaskOverview");var U=e.i(787207),G=e.i(863961);let V=(0,G.default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),W=(0,G.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);var H=e.i(616199);function J({open:e,onOpenChange:a,taskId:r}){let{t:n}=(0,l.useI18n)(),[i,o]=(0,s.useState)(null),[d,c]=(0,s.useTransition)();(0,s.useEffect)(()=>{r&&e?c(async()=>{let e=await _(r);e&&o(e)}):o(null)},[r,e]);let x=i?U.BOARD_COLUMNS.find(e=>e.id===i.status):null,u=i?U.PRIORITY_CONFIG[i.priority]:null,m=i?.executions?.[0]??null;return(0,t.jsx)(R,{open:e,onOpenChange:a,children:(0,t.jsxs)($,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(P,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(L,{className:"text-base font-semibold leading-tight pr-8",children:i?.title??""}),(0,t.jsx)(z,{className:"sr-only",children:n("taskDrawer.title")}),i&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[x&&(0,t.jsxs)(M.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${x.color}`}),x.label]}),u&&(0,t.jsx)(M.Badge,{variant:"secondary",className:`text-xs ${u.color}`,children:u.label})]})]}),(0,t.jsx)(F.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:d&&!i?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:n("assets.loading")}):i?(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:n("taskDrawer.description")}),(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:i.description||n("taskDrawer.noDescription")})]}),i.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:n("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:i.labels.map(e=>(0,t.jsx)(M.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(V,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:n("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(i.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(W,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:n("taskDrawer.resources")}),(0,t.jsx)("span",{className:"text-foreground",children:i._count.assets})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(H.PlayCircle,{className:"h-3.5 w-3.5"}),n("taskDrawer.lastExecution")]}),m?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(M.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:m.status}),m.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:m.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:n("taskDrawer.noExecution")})]})]}):null})]})})}var K=e.i(286302);e.s(["AssetsPageClient",0,function({allWorkspaces:e,initialWorkspaceId:i,initialProjectId:d,initialAssets:c}){let x,{t:u}=(0,l.useI18n)(),[m,h]=(0,s.useTransition)(),[f,j]=(0,s.useState)(i),[v,b]=(0,s.useState)(d),[y,k]=(0,s.useState)(c),[C,T]=(0,s.useState)(null),O=e.find(e=>e.id===f),D=O?.projects??[],E=(0,s.useCallback)(e=>{e?h(async()=>{k(await o(e))}):k([])},[h]),[R,A]=(0,s.useState)(null),B=R?R.mimeType?.startsWith("image/")?"image":/\.(txt|md|json)$/i.test(R.filename)?"text":null:null,$=async e=>{try{let t=await fetch("/api/internal/assets/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path})});if(!t.ok){let e=await t.json().catch(()=>({}));K.toast.error(e.error||"Failed to reveal file")}}catch{K.toast.error("Failed to reveal file")}},P=async e=>{let t=y.find(t=>t.id===e);confirm(u("assets.deleteConfirm",{filename:t?.filename??e}))&&(await (0,n.deleteAsset)(e),E(v))};return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsx)(r.SubPageNav,{workspaceId:f}),(0,t.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,t.jsxs)(N.Select,{value:f,onValueChange:t=>t&&(t=>{if(t===f)return;j(t);let s=e.find(e=>e.id===t),a=s?.projects[0]??null;b(a?.id??null),E(a?.id??null)})(t),children:[(0,t.jsx)(N.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===f)?.name??f})}),(0,t.jsx)(N.SelectContent,{children:e.map(e=>(0,t.jsx)(N.SelectItem,{value:e.id,children:e.name},e.id))})]}),D.length>0&&(0,t.jsxs)(N.Select,{value:v??"",onValueChange:e=>e&&void(e!==v&&(b(e),E(e))),children:[(0,t.jsx)(N.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,t.jsx)("span",{className:"truncate",children:(x=D.find(e=>e.id===v))?x.alias?`${x.name} (${x.alias})`:x.name:""})}),(0,t.jsx)(N.SelectContent,{children:D.map(e=>(0,t.jsxs)(N.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),(0,t.jsx)("div",{className:"ml-auto",children:(0,t.jsx)(w,{allWorkspaces:e,initialWsId:f,initialProjectId:v,onUploaded:e=>{e===v&&E(v)}})})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-6 py-4",children:(0,t.jsxs)("div",{className:`relative ${m?"opacity-40 pointer-events-none":""} transition-opacity`,children:[m&&(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,t.jsx)(a.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===D.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:u("assets.noProject")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:u("assets.noProjectHint")})]}):(0,t.jsx)(g,{assets:y.map(e=>({...e,taskId:e.task?.id??null,taskTitle:e.task?.title??null})),onPreview:e=>{let t=e.mimeType?.startsWith("image/"),s=/\.(txt|md|json)$/i.test(e.filename);(t||s)&&A(e)},onReveal:$,onDelete:P,onTaskClick:T})]})}),(0,t.jsx)(S,{imageUrl:"image"===B&&R?p(R.path):null,filename:R?.filename??"",open:"image"===B,onOpenChange:e=>{e||A(null)}}),(0,t.jsx)(I,{url:"text"===B&&R?p(R.path):null,filename:R?.filename??"",open:"text"===B,onOpenChange:e=>{e||A(null)}}),(0,t.jsx)(J,{open:!!C,onOpenChange:e=>{e||T(null)},taskId:C})]})}],398784)}]);
|
package/.next/trace
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
[{"name":"generate-buildid","duration":118,"timestamp":1576059338951,"id":4,"parentId":1,"tags":{},"startTime":1777358572171,"traceId":"4a59455202141294"},{"name":"load-custom-routes","duration":210,"timestamp":1576059339199,"id":5,"parentId":1,"tags":{},"startTime":1777358572171,"traceId":"4a59455202141294"},{"name":"create-dist-dir","duration":237,"timestamp":1576059339425,"id":6,"parentId":1,"tags":{},"startTime":1777358572171,"traceId":"4a59455202141294"},{"name":"clean","duration":151,"timestamp":1576059340427,"id":7,"parentId":1,"tags":{},"startTime":1777358572172,"traceId":"4a59455202141294"},{"name":"discover-routes","duration":12663,"timestamp":1576059347120,"id":8,"parentId":1,"tags":{},"startTime":1777358572179,"traceId":"4a59455202141294"},{"name":"create-root-mapping","duration":49,"timestamp":1576059359816,"id":9,"parentId":1,"tags":{},"startTime":1777358572192,"traceId":"4a59455202141294"},{"name":"generate-route-types","duration":34824,"timestamp":1576059360900,"id":10,"parentId":1,"tags":{},"startTime":1777358572193,"traceId":"4a59455202141294"},{"name":"public-dir-conflict-check","duration":43,"timestamp":1576059395836,"id":11,"parentId":1,"tags":{},"startTime":1777358572228,"traceId":"4a59455202141294"},{"name":"generate-routes-manifest","duration":1648,"timestamp":1576059395917,"id":12,"parentId":1,"tags":{},"startTime":1777358572228,"traceId":"4a59455202141294"},{"name":"run-turbopack","duration":6324051,"timestamp":1576059401189,"id":14,"parentId":1,"tags":{},"startTime":1777358572233,"traceId":"4a59455202141294"},{"name":"turbopack-build-events","duration":42,"timestamp":1576059550865,"id":15,"parentId":1,"tags":{},"startTime":1777358572383,"traceId":"4a59455202141294"},{"name":"run-typescript","duration":6662840,"timestamp":1576065778025,"id":16,"parentId":1,"tags":{},"startTime":1777358578610,"traceId":"4a59455202141294"},{"name":"generate-required-server-files","duration":4161,"timestamp":1576072445966,"id":18,"parentId":1,"tags":{},"startTime":1777358585278,"traceId":"4a59455202141294"},{"name":"check-static-error-page","duration":52441,"timestamp":1576072494090,"id":20,"parentId":19,"tags":{},"startTime":1777358585326,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":219396,"timestamp":1576072550106,"id":61,"parentId":22,"tags":{},"startTime":1777358585382,"traceId":"4a59455202141294"},{"name":"check-page","duration":267349,"timestamp":1576072502302,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1777358585334,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":268849,"timestamp":1576072550177,"id":63,"parentId":24,"tags":{},"startTime":1777358585382,"traceId":"4a59455202141294"},{"name":"check-page","duration":316186,"timestamp":1576072502899,"id":24,"parentId":19,"tags":{"page":"/api/browse-fs"},"startTime":1777358585335,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":275624,"timestamp":1576072550202,"id":64,"parentId":25,"tags":{},"startTime":1777358585382,"traceId":"4a59455202141294"},{"name":"check-page","duration":322990,"timestamp":1576072502961,"id":25,"parentId":19,"tags":{"page":"/api/files/assets/[projectId]/[filename]"},"startTime":1777358585335,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":292314,"timestamp":1576072553225,"id":69,"parentId":45,"tags":{},"startTime":1777358585385,"traceId":"4a59455202141294"},{"name":"check-page","duration":331832,"timestamp":1576072513732,"id":45,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1777358585346,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":298343,"timestamp":1576072553006,"id":68,"parentId":44,"tags":{},"startTime":1777358585385,"traceId":"4a59455202141294"},{"name":"check-page","duration":340248,"timestamp":1576072511211,"id":44,"parentId":19,"tags":{"page":"/apple-icon.png"},"startTime":1777358585343,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":304900,"timestamp":1576072553295,"id":71,"parentId":47,"tags":{},"startTime":1777358585385,"traceId":"4a59455202141294"},{"name":"check-page","duration":319816,"timestamp":1576072538402,"id":47,"parentId":19,"tags":{"page":"/icon1.png"},"startTime":1777358585371,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":307278,"timestamp":1576072553302,"id":72,"parentId":48,"tags":{},"startTime":1777358585385,"traceId":"4a59455202141294"},{"name":"check-page","duration":321352,"timestamp":1576072539250,"id":48,"parentId":19,"tags":{"page":"/manifest.json"},"startTime":1777358585371,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":306658,"timestamp":1576072557799,"id":73,"parentId":28,"tags":{},"startTime":1777358585390,"traceId":"4a59455202141294"},{"name":"check-page","duration":359378,"timestamp":1576072505225,"id":28,"parentId":19,"tags":{"page":"/api/internal/assets/reveal"},"startTime":1777358585337,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":328909,"timestamp":1576072550296,"id":65,"parentId":26,"tags":{},"startTime":1777358585382,"traceId":"4a59455202141294"},{"name":"check-page","duration":376266,"timestamp":1576072503005,"id":26,"parentId":19,"tags":{"page":"/api/git"},"startTime":1777358585335,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":326166,"timestamp":1576072553278,"id":70,"parentId":46,"tags":{},"startTime":1777358585385,"traceId":"4a59455202141294"},{"name":"check-page","duration":365365,"timestamp":1576072514093,"id":46,"parentId":19,"tags":{"page":"/icon0.svg"},"startTime":1777358585347,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":333795,"timestamp":1576072549932,"id":60,"parentId":21,"tags":{},"startTime":1777358585382,"traceId":"4a59455202141294"},{"name":"check-page","duration":385360,"timestamp":1576072498391,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1777358585331,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":335177,"timestamp":1576072550142,"id":62,"parentId":23,"tags":{},"startTime":1777358585382,"traceId":"4a59455202141294"},{"name":"check-page","duration":382594,"timestamp":1576072502765,"id":23,"parentId":19,"tags":{"page":"/api/adapters/test"},"startTime":1777358585335,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":327094,"timestamp":1576072558472,"id":76,"parentId":33,"tags":{},"startTime":1777358585391,"traceId":"4a59455202141294"},{"name":"check-page","duration":377602,"timestamp":1576072507978,"id":33,"parentId":19,"tags":{"page":"/api/internal/cache/[...segments]"},"startTime":1777358585340,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":329870,"timestamp":1576072558285,"id":75,"parentId":32,"tags":{},"startTime":1777358585390,"traceId":"4a59455202141294"},{"name":"check-page","duration":380264,"timestamp":1576072507907,"id":32,"parentId":19,"tags":{"page":"/api/internal/assistant/sessions"},"startTime":1777358585340,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":329442,"timestamp":1576072559160,"id":79,"parentId":27,"tags":{},"startTime":1777358585391,"traceId":"4a59455202141294"},{"name":"check-page","duration":385541,"timestamp":1576072503074,"id":27,"parentId":19,"tags":{"page":"/api/internal/assets/[projectId]/[filename]"},"startTime":1777358585335,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":330745,"timestamp":1576072558133,"id":74,"parentId":31,"tags":{},"startTime":1777358585390,"traceId":"4a59455202141294"},{"name":"check-page","duration":381036,"timestamp":1576072507848,"id":31,"parentId":19,"tags":{"page":"/api/internal/assistant"},"startTime":1777358585340,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":330713,"timestamp":1576072560459,"id":81,"parentId":38,"tags":{},"startTime":1777358585393,"traceId":"4a59455202141294"},{"name":"check-page","duration":382464,"timestamp":1576072508728,"id":38,"parentId":19,"tags":{"page":"/api/internal/notifications/pending"},"startTime":1777358585341,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":356271,"timestamp":1576072550885,"id":66,"parentId":42,"tags":{},"startTime":1777358585383,"traceId":"4a59455202141294"},{"name":"check-page","duration":396239,"timestamp":1576072510946,"id":42,"parentId":19,"tags":{"page":"/api/tasks/[taskId]/diff"},"startTime":1777358585343,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":354472,"timestamp":1576072552764,"id":67,"parentId":43,"tags":{},"startTime":1777358585385,"traceId":"4a59455202141294"},{"name":"check-page","duration":396148,"timestamp":1576072511098,"id":43,"parentId":19,"tags":{"page":"/api/tasks/[taskId]/merge"},"startTime":1777358585343,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":351208,"timestamp":1576072558978,"id":78,"parentId":35,"tags":{},"startTime":1777358585391,"traceId":"4a59455202141294"},{"name":"check-page","duration":401829,"timestamp":1576072508374,"id":35,"parentId":19,"tags":{"page":"/api/internal/hooks/session"},"startTime":1777358585340,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":348349,"timestamp":1576072563910,"id":84,"parentId":37,"tags":{},"startTime":1777358585396,"traceId":"4a59455202141294"},{"name":"check-page","duration":403760,"timestamp":1576072508573,"id":37,"parentId":19,"tags":{"page":"/api/internal/hooks/upload"},"startTime":1777358585341,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":349756,"timestamp":1576072562670,"id":83,"parentId":40,"tags":{},"startTime":1777358585395,"traceId":"4a59455202141294"},{"name":"check-page","duration":401855,"timestamp":1576072510585,"id":40,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/input"},"startTime":1777358585343,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":349399,"timestamp":1576072564718,"id":86,"parentId":29,"tags":{},"startTime":1777358585397,"traceId":"4a59455202141294"},{"name":"check-page","duration":406692,"timestamp":1576072507467,"id":29,"parentId":19,"tags":{"page":"/api/internal/assistant/chat"},"startTime":1777358585340,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":352972,"timestamp":1576072564054,"id":85,"parentId":41,"tags":{},"startTime":1777358585396,"traceId":"4a59455202141294"},{"name":"check-page","duration":406233,"timestamp":1576072510813,"id":41,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/start"},"startTime":1777358585343,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":366218,"timestamp":1576072558777,"id":77,"parentId":34,"tags":{},"startTime":1777358585391,"traceId":"4a59455202141294"},{"name":"check-page","duration":416977,"timestamp":1576072508044,"id":34,"parentId":19,"tags":{"page":"/api/internal/hooks/install"},"startTime":1777358585340,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":363828,"timestamp":1576072561262,"id":82,"parentId":39,"tags":{},"startTime":1777358585393,"traceId":"4a59455202141294"},{"name":"check-page","duration":415265,"timestamp":1576072509832,"id":39,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/buffer"},"startTime":1777358585342,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":377477,"timestamp":1576072559343,"id":80,"parentId":30,"tags":{},"startTime":1777358585391,"traceId":"4a59455202141294"},{"name":"check-page","duration":429093,"timestamp":1576072507747,"id":30,"parentId":19,"tags":{"page":"/api/internal/assistant/images"},"startTime":1777358585340,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":371997,"timestamp":1576072564882,"id":87,"parentId":36,"tags":{},"startTime":1777358585397,"traceId":"4a59455202141294"},{"name":"check-page","duration":428371,"timestamp":1576072508514,"id":36,"parentId":19,"tags":{"page":"/api/internal/hooks/stop"},"startTime":1777358585341,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":384095,"timestamp":1576072566024,"id":89,"parentId":51,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":408142,"timestamp":1576072542023,"id":51,"parentId":19,"tags":{"page":"/"},"startTime":1777358585374,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":388681,"timestamp":1576072566010,"id":88,"parentId":50,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":413834,"timestamp":1576072540881,"id":50,"parentId":19,"tags":{"page":"/onboarding"},"startTime":1777358585373,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":392290,"timestamp":1576072566030,"id":91,"parentId":53,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":416156,"timestamp":1576072542184,"id":53,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/archive"},"startTime":1777358585374,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":393383,"timestamp":1576072566027,"id":90,"parentId":52,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":417307,"timestamp":1576072542141,"id":52,"parentId":19,"tags":{"page":"/settings"},"startTime":1777358585374,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":395236,"timestamp":1576072566102,"id":95,"parentId":58,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":416065,"timestamp":1576072545298,"id":58,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/tasks/[taskId]"},"startTime":1777358585377,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":396596,"timestamp":1576072566116,"id":97,"parentId":57,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":419404,"timestamp":1576072543326,"id":57,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/projects/[projectId]"},"startTime":1777358585375,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":397461,"timestamp":1576072566107,"id":96,"parentId":49,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":424024,"timestamp":1576072539555,"id":49,"parentId":19,"tags":{"page":"/missions"},"startTime":1777358585372,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":408586,"timestamp":1576072566120,"id":98,"parentId":59,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":429271,"timestamp":1576072545466,"id":59,"parentId":19,"tags":{"page":"/workspaces"},"startTime":1777358585378,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":417220,"timestamp":1576072566035,"id":93,"parentId":55,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":440058,"timestamp":1576072543224,"id":55,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/notes"},"startTime":1777358585375,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":420711,"timestamp":1576072566099,"id":94,"parentId":56,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":443546,"timestamp":1576072543282,"id":56,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]"},"startTime":1777358585375,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":427619,"timestamp":1576072566032,"id":92,"parentId":54,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":450805,"timestamp":1576072542861,"id":54,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/assets"},"startTime":1777358585375,"traceId":"4a59455202141294"},{"name":"static-check","duration":503450,"timestamp":1576072490240,"id":19,"parentId":1,"tags":{},"startTime":1777358585322,"traceId":"4a59455202141294"},{"name":"write-routes-manifest","duration":363,"timestamp":1576072994722,"id":100,"parentId":1,"tags":{},"startTime":1777358585827,"traceId":"4a59455202141294"},{"name":"load-dotenv","duration":12,"timestamp":1576073002724,"id":103,"parentId":102,"tags":{},"startTime":1777358585835,"traceId":"4a59455202141294"},{"name":"run-export-path-map","duration":283,"timestamp":1576073004330,"id":104,"parentId":102,"tags":{},"startTime":1777358585836,"traceId":"4a59455202141294"},{"name":"next-export","duration":247582,"timestamp":1576073002123,"id":102,"parentId":1,"tags":{},"startTime":1777358585834,"traceId":"4a59455202141294"},{"name":"move-exported-app-not-found-","duration":344,"timestamp":1576073250890,"id":105,"parentId":101,"tags":{},"startTime":1777358586083,"traceId":"4a59455202141294"},{"name":"move-exported-app-global-error-","duration":200,"timestamp":1576073251267,"id":106,"parentId":101,"tags":{},"startTime":1777358586083,"traceId":"4a59455202141294"},{"name":"static-generation","duration":254645,"timestamp":1576072997449,"id":101,"parentId":1,"tags":{},"startTime":1777358585830,"traceId":"4a59455202141294"},{"name":"write-routes-manifest","duration":216,"timestamp":1576073252190,"id":107,"parentId":1,"tags":{},"startTime":1777358586084,"traceId":"4a59455202141294"}]
|
|
2
|
-
[{"name":"print-tree-view","duration":
|
|
1
|
+
[{"name":"generate-buildid","duration":117,"timestamp":1579331675191,"id":4,"parentId":1,"tags":{},"startTime":1777361844452,"traceId":"cce8371654e64b41"},{"name":"load-custom-routes","duration":206,"timestamp":1579331675430,"id":5,"parentId":1,"tags":{},"startTime":1777361844453,"traceId":"cce8371654e64b41"},{"name":"create-dist-dir","duration":139,"timestamp":1579331675651,"id":6,"parentId":1,"tags":{},"startTime":1777361844453,"traceId":"cce8371654e64b41"},{"name":"clean","duration":131,"timestamp":1579331676460,"id":7,"parentId":1,"tags":{},"startTime":1777361844454,"traceId":"cce8371654e64b41"},{"name":"discover-routes","duration":12353,"timestamp":1579331682909,"id":8,"parentId":1,"tags":{},"startTime":1777361844460,"traceId":"cce8371654e64b41"},{"name":"create-root-mapping","duration":48,"timestamp":1579331695292,"id":9,"parentId":1,"tags":{},"startTime":1777361844472,"traceId":"cce8371654e64b41"},{"name":"generate-route-types","duration":35429,"timestamp":1579331696517,"id":10,"parentId":1,"tags":{},"startTime":1777361844474,"traceId":"cce8371654e64b41"},{"name":"public-dir-conflict-check","duration":39,"timestamp":1579331732053,"id":11,"parentId":1,"tags":{},"startTime":1777361844509,"traceId":"cce8371654e64b41"},{"name":"generate-routes-manifest","duration":1627,"timestamp":1579331732130,"id":12,"parentId":1,"tags":{},"startTime":1777361844509,"traceId":"cce8371654e64b41"},{"name":"run-turbopack","duration":5091398,"timestamp":1579331738168,"id":14,"parentId":1,"tags":{},"startTime":1777361844515,"traceId":"cce8371654e64b41"},{"name":"turbopack-build-events","duration":40,"timestamp":1579331892873,"id":15,"parentId":1,"tags":{},"startTime":1777361844670,"traceId":"cce8371654e64b41"},{"name":"run-typescript","duration":6494001,"timestamp":1579336883951,"id":16,"parentId":1,"tags":{},"startTime":1777361849661,"traceId":"cce8371654e64b41"},{"name":"generate-required-server-files","duration":1462,"timestamp":1579343380096,"id":18,"parentId":1,"tags":{},"startTime":1777361856157,"traceId":"cce8371654e64b41"},{"name":"check-static-error-page","duration":23697,"timestamp":1579343400509,"id":20,"parentId":19,"tags":{},"startTime":1777361856178,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":194436,"timestamp":1579343425570,"id":61,"parentId":22,"tags":{},"startTime":1777361856203,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":213805,"timestamp":1579343406264,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1777361856183,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":230589,"timestamp":1579343425620,"id":63,"parentId":24,"tags":{},"startTime":1777361856203,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":249472,"timestamp":1579343406768,"id":24,"parentId":19,"tags":{"page":"/api/browse-fs"},"startTime":1777361856184,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":234576,"timestamp":1579343425648,"id":64,"parentId":25,"tags":{},"startTime":1777361856203,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":253423,"timestamp":1579343406837,"id":25,"parentId":19,"tags":{"page":"/api/files/assets/[projectId]/[filename]"},"startTime":1777361856184,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":244841,"timestamp":1579343425848,"id":68,"parentId":44,"tags":{},"startTime":1777361856203,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":252193,"timestamp":1579343418524,"id":44,"parentId":19,"tags":{"page":"/apple-icon.png"},"startTime":1777361856196,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":252551,"timestamp":1579343425729,"id":65,"parentId":26,"tags":{},"startTime":1777361856203,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":271430,"timestamp":1579343406877,"id":26,"parentId":19,"tags":{"page":"/api/git"},"startTime":1777361856184,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":263394,"timestamp":1579343425441,"id":60,"parentId":21,"tags":{},"startTime":1777361856203,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":283393,"timestamp":1579343405470,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1777361856183,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":269666,"timestamp":1579343425932,"id":71,"parentId":47,"tags":{},"startTime":1777361856203,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":272834,"timestamp":1579343422788,"id":47,"parentId":19,"tags":{"page":"/icon1.png"},"startTime":1777361856200,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":270422,"timestamp":1579343425927,"id":70,"parentId":46,"tags":{},"startTime":1777361856203,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":276326,"timestamp":1579343420038,"id":46,"parentId":19,"tags":{"page":"/icon0.svg"},"startTime":1777361856197,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":269706,"timestamp":1579343429371,"id":73,"parentId":28,"tags":{},"startTime":1777361856207,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":289393,"timestamp":1579343409712,"id":28,"parentId":19,"tags":{"page":"/api/internal/assets/reveal"},"startTime":1777361856187,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":274626,"timestamp":1579343425910,"id":69,"parentId":45,"tags":{},"startTime":1777361856203,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":280840,"timestamp":1579343419756,"id":45,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1777361856197,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":271423,"timestamp":1579343431450,"id":75,"parentId":32,"tags":{},"startTime":1777361856209,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":292669,"timestamp":1579343410298,"id":32,"parentId":19,"tags":{"page":"/api/internal/assistant/sessions"},"startTime":1777361856187,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":277763,"timestamp":1579343431913,"id":77,"parentId":34,"tags":{},"startTime":1777361856209,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":299280,"timestamp":1579343410419,"id":34,"parentId":19,"tags":{"page":"/api/internal/hooks/install"},"startTime":1777361856188,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":284572,"timestamp":1579343425806,"id":66,"parentId":42,"tags":{},"startTime":1777361856203,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":292001,"timestamp":1579343418398,"id":42,"parentId":19,"tags":{"page":"/api/tasks/[taskId]/diff"},"startTime":1777361856196,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":281838,"timestamp":1579343432106,"id":78,"parentId":33,"tags":{},"startTime":1777361856209,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":303606,"timestamp":1579343410362,"id":33,"parentId":19,"tags":{"page":"/api/internal/cache/[...segments]"},"startTime":1777361856188,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":281365,"timestamp":1579343435574,"id":79,"parentId":27,"tags":{},"startTime":1777361856213,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":310047,"timestamp":1579343406947,"id":27,"parentId":19,"tags":{"page":"/api/internal/assets/[projectId]/[filename]"},"startTime":1777361856184,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":293151,"timestamp":1579343425598,"id":62,"parentId":23,"tags":{},"startTime":1777361856203,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":312124,"timestamp":1579343406676,"id":23,"parentId":19,"tags":{"page":"/api/adapters/test"},"startTime":1777361856184,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":282562,"timestamp":1579343436861,"id":81,"parentId":35,"tags":{},"startTime":1777361856214,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":308718,"timestamp":1579343410727,"id":35,"parentId":19,"tags":{"page":"/api/internal/hooks/session"},"startTime":1777361856188,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":284176,"timestamp":1579343438815,"id":83,"parentId":37,"tags":{},"startTime":1777361856216,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":306066,"timestamp":1579343416946,"id":37,"parentId":19,"tags":{"page":"/api/internal/hooks/upload"},"startTime":1777361856194,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":291462,"timestamp":1579343431612,"id":76,"parentId":31,"tags":{},"startTime":1777361856209,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":312841,"timestamp":1579343410239,"id":31,"parentId":19,"tags":{"page":"/api/internal/assistant"},"startTime":1777361856187,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":294290,"timestamp":1579343431291,"id":74,"parentId":29,"tags":{},"startTime":1777361856208,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":315684,"timestamp":1579343409922,"id":29,"parentId":19,"tags":{"page":"/api/internal/assistant/chat"},"startTime":1777361856187,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":286723,"timestamp":1579343438918,"id":84,"parentId":38,"tags":{},"startTime":1777361856216,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":308320,"timestamp":1579343417327,"id":38,"parentId":19,"tags":{"page":"/api/internal/notifications/pending"},"startTime":1777361856194,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":301420,"timestamp":1579343425934,"id":72,"parentId":48,"tags":{},"startTime":1777361856203,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":303846,"timestamp":1579343423528,"id":48,"parentId":19,"tags":{"page":"/manifest.json"},"startTime":1777361856201,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":291978,"timestamp":1579343440142,"id":88,"parentId":50,"tags":{},"startTime":1777361856217,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":308469,"timestamp":1579343423705,"id":50,"parentId":19,"tags":{"page":"/onboarding"},"startTime":1777361856201,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":309095,"timestamp":1579343425837,"id":67,"parentId":43,"tags":{},"startTime":1777361856203,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":316583,"timestamp":1579343418471,"id":43,"parentId":19,"tags":{"page":"/api/tasks/[taskId]/merge"},"startTime":1777361856196,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":299991,"timestamp":1579343439320,"id":87,"parentId":41,"tags":{},"startTime":1777361856216,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":320988,"timestamp":1579343418352,"id":41,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/start"},"startTime":1777361856195,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":304497,"timestamp":1579343440147,"id":89,"parentId":51,"tags":{},"startTime":1777361856217,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":320886,"timestamp":1579343423808,"id":51,"parentId":19,"tags":{"page":"/"},"startTime":1777361856201,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":306589,"timestamp":1579343439064,"id":85,"parentId":39,"tags":{},"startTime":1777361856216,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":327521,"timestamp":1579343418179,"id":39,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/buffer"},"startTime":1777361856195,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":310802,"timestamp":1579343439202,"id":86,"parentId":40,"tags":{},"startTime":1777361856216,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":331751,"timestamp":1579343418299,"id":40,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/input"},"startTime":1777361856195,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":313969,"timestamp":1579343437162,"id":82,"parentId":36,"tags":{},"startTime":1777361856214,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":335016,"timestamp":1579343416133,"id":36,"parentId":19,"tags":{"page":"/api/internal/hooks/stop"},"startTime":1777361856193,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":323866,"timestamp":1579343436104,"id":80,"parentId":30,"tags":{},"startTime":1777361856213,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":349868,"timestamp":1579343410156,"id":30,"parentId":19,"tags":{"page":"/api/internal/assistant/images"},"startTime":1777361856187,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":337031,"timestamp":1579343440149,"id":90,"parentId":52,"tags":{},"startTime":1777361856217,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":353356,"timestamp":1579343423852,"id":52,"parentId":19,"tags":{"page":"/settings"},"startTime":1777361856201,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":346958,"timestamp":1579343440167,"id":97,"parentId":57,"tags":{},"startTime":1777361856217,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":363113,"timestamp":1579343424041,"id":57,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/projects/[projectId]"},"startTime":1777361856201,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":357868,"timestamp":1579343440160,"id":95,"parentId":58,"tags":{},"startTime":1777361856217,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":374064,"timestamp":1579343424106,"id":58,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/tasks/[taskId]"},"startTime":1777361856201,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":365611,"timestamp":1579343440151,"id":91,"parentId":53,"tags":{},"startTime":1777361856217,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":381915,"timestamp":1579343423902,"id":53,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/archive"},"startTime":1777361856201,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":366524,"timestamp":1579343440156,"id":93,"parentId":55,"tags":{},"startTime":1777361856217,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":382726,"timestamp":1579343423974,"id":55,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/notes"},"startTime":1777361856201,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":366570,"timestamp":1579343440170,"id":98,"parentId":59,"tags":{},"startTime":1777361856217,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":382603,"timestamp":1579343424144,"id":59,"parentId":19,"tags":{"page":"/workspaces"},"startTime":1777361856201,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":367926,"timestamp":1579343440164,"id":96,"parentId":49,"tags":{},"startTime":1777361856217,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":384531,"timestamp":1579343423580,"id":49,"parentId":19,"tags":{"page":"/missions"},"startTime":1777361856201,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":367990,"timestamp":1579343440153,"id":92,"parentId":54,"tags":{},"startTime":1777361856217,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":384211,"timestamp":1579343423941,"id":54,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/assets"},"startTime":1777361856201,"traceId":"cce8371654e64b41"},{"name":"is-page-static","duration":368007,"timestamp":1579343440158,"id":94,"parentId":56,"tags":{},"startTime":1777361856217,"traceId":"cce8371654e64b41"},{"name":"check-page","duration":384165,"timestamp":1579343424005,"id":56,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]"},"startTime":1777361856201,"traceId":"cce8371654e64b41"},{"name":"static-check","duration":408356,"timestamp":1579343399830,"id":19,"parentId":1,"tags":{},"startTime":1777361856177,"traceId":"cce8371654e64b41"},{"name":"write-routes-manifest","duration":400,"timestamp":1579343809322,"id":100,"parentId":1,"tags":{},"startTime":1777361856586,"traceId":"cce8371654e64b41"},{"name":"load-dotenv","duration":17,"timestamp":1579343816717,"id":103,"parentId":102,"tags":{},"startTime":1777361856594,"traceId":"cce8371654e64b41"},{"name":"run-export-path-map","duration":254,"timestamp":1579343818376,"id":104,"parentId":102,"tags":{},"startTime":1777361856596,"traceId":"cce8371654e64b41"},{"name":"next-export","duration":259245,"timestamp":1579343816139,"id":102,"parentId":1,"tags":{},"startTime":1777361856593,"traceId":"cce8371654e64b41"},{"name":"move-exported-app-not-found-","duration":1035,"timestamp":1579344076558,"id":105,"parentId":101,"tags":{},"startTime":1777361856854,"traceId":"cce8371654e64b41"},{"name":"move-exported-app-global-error-","duration":277,"timestamp":1579344077645,"id":106,"parentId":101,"tags":{},"startTime":1777361856855,"traceId":"cce8371654e64b41"},{"name":"static-generation","duration":267109,"timestamp":1579343812088,"id":101,"parentId":1,"tags":{},"startTime":1777361856589,"traceId":"cce8371654e64b41"},{"name":"write-routes-manifest","duration":317,"timestamp":1579344079334,"id":107,"parentId":1,"tags":{},"startTime":1777361856856,"traceId":"cce8371654e64b41"}]
|
|
2
|
+
[{"name":"print-tree-view","duration":2150,"timestamp":1579344086060,"id":108,"parentId":1,"tags":{},"startTime":1777361856863,"traceId":"cce8371654e64b41"},{"name":"write-route-bundle-stats","duration":7256,"timestamp":1579344088226,"id":109,"parentId":1,"tags":{},"startTime":1777361856865,"traceId":"cce8371654e64b41"},{"name":"telemetry-flush","duration":1014378,"timestamp":1579344095497,"id":110,"parentId":1,"tags":{},"startTime":1777361856873,"traceId":"cce8371654e64b41"},{"name":"next-build","duration":13575764,"timestamp":1579331534147,"id":1,"tags":{"buildMode":"default","version":"16.2.1","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1777361844311,"traceId":"cce8371654e64b41"}]
|
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-turbopack","duration":
|
|
1
|
+
[{"name":"run-turbopack","duration":5091398,"timestamp":1579331738168,"id":14,"parentId":1,"tags":{},"startTime":1777361844515,"traceId":"cce8371654e64b41"},{"name":"turbopack-build-events","duration":40,"timestamp":1579331892873,"id":15,"parentId":1,"tags":{},"startTime":1777361844670,"traceId":"cce8371654e64b41"},{"name":"run-typescript","duration":6494001,"timestamp":1579336883951,"id":16,"parentId":1,"tags":{},"startTime":1777361849661,"traceId":"cce8371654e64b41"},{"name":"static-check","duration":408356,"timestamp":1579343399830,"id":19,"parentId":1,"tags":{},"startTime":1777361856177,"traceId":"cce8371654e64b41"},{"name":"static-generation","duration":267109,"timestamp":1579343812088,"id":101,"parentId":1,"tags":{},"startTime":1777361856589,"traceId":"cce8371654e64b41"},{"name":"telemetry-flush","duration":1014378,"timestamp":1579344095497,"id":110,"parentId":1,"tags":{},"startTime":1777361856873,"traceId":"cce8371654e64b41"},{"name":"next-build","duration":13575764,"timestamp":1579331534147,"id":1,"tags":{"buildMode":"default","version":"16.2.1","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1777361844311,"traceId":"cce8371654e64b41"}]
|