@intent-hq/web 2.349.0 → 2.349.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{CXrz3Q9k.js → -1WDZF8N.js} +2 -2
- package/web/app/immutable/chunks/{DQh8iE7C.js → 0GoAT2dR.js} +1 -1
- package/web/app/immutable/chunks/{BIBA0Biz.js → 5eZIrph_.js} +1 -1
- package/web/app/immutable/chunks/{VH54VSPn.js → 5oAr1srr.js} +1 -1
- package/web/app/immutable/chunks/{BTUjIyAV.js → 63MZi8_J.js} +1 -1
- package/web/app/immutable/chunks/{B_Tk6TVS.js → 6px6q2WX.js} +1 -1
- package/web/app/immutable/chunks/{DKkMoi_7.js → 6uyelIKx.js} +1 -1
- package/web/app/immutable/chunks/{Dz1riI3m.js → 749Ye7vh.js} +1 -1
- package/web/app/immutable/chunks/{DCZ5UGy-.js → 8XTh8Ptp.js} +4 -4
- package/web/app/immutable/chunks/{DPevKyzH.js → 8j0kVkRN.js} +4 -4
- package/web/app/immutable/chunks/{BHeDLdQn.js → 9JxbPwvl.js} +1 -1
- package/web/app/immutable/chunks/{BeQfIbwM.js → B0E92Ur8.js} +1 -1
- package/web/app/immutable/chunks/{0vrZgCji.js → B1Q0_YBy.js} +1 -1
- package/web/app/immutable/chunks/{BNS1LCAy.js → B28teA2c.js} +1 -1
- package/web/app/immutable/chunks/{CIOLxD2z.js → B5H_NPK0.js} +1 -1
- package/web/app/immutable/chunks/{Cw7ROLv9.js → B7MNPtN6.js} +1 -1
- package/web/app/immutable/chunks/{D-5Zsg_M.js → B7l4atYS.js} +1 -1
- package/web/app/immutable/chunks/{u2UWf7Y4.js → B8EGWXN0.js} +2 -2
- package/web/app/immutable/chunks/{GpPmLIf8.js → B8O1d-ta.js} +1 -1
- package/web/app/immutable/chunks/{CTA4usCn.js → B9hnPU_k.js} +1 -1
- package/web/app/immutable/chunks/{Ca30sbat.js → BGAqL5Hu.js} +4 -4
- package/web/app/immutable/chunks/{cjWrgEc5.js → BHu-B5kJ.js} +1 -1
- package/web/app/immutable/chunks/{C1HHC_7R.js → BJHGBcTU.js} +1 -1
- package/web/app/immutable/chunks/{D1QW0Kek.js → BKZq4PO0.js} +1 -1
- package/web/app/immutable/chunks/{CbAeWmeg.js → BM4kpWSY.js} +1 -1
- package/web/app/immutable/chunks/{BKawFF96.js → BMQAui7e.js} +2 -2
- package/web/app/immutable/chunks/{BRPmfbNP.js → BMbB6G4j.js} +1 -1
- package/web/app/immutable/chunks/{DDgbK4p-.js → BNGt0CxC.js} +1 -1
- package/web/app/immutable/chunks/{CQk97DU6.js → BPY5RY-8.js} +1 -1
- package/web/app/immutable/chunks/{DOjarwrj.js → BRrfv23s.js} +1 -1
- package/web/app/immutable/chunks/{D8oCNZJt.js → BTUvce_V.js} +3 -3
- package/web/app/immutable/chunks/{Baz0g_kI.js → BaJNSnZt.js} +1 -1
- package/web/app/immutable/chunks/{D1WSBSxV.js → BbjKLyar.js} +1 -1
- package/web/app/immutable/chunks/{PysgAWQl.js → Bc-78-e9.js} +2 -2
- package/web/app/immutable/chunks/{DZ7i3acf.js → Bcs0F47q.js} +1 -1
- package/web/app/immutable/chunks/{BdzBn7bA.js → BdArbG4I.js} +1 -1
- package/web/app/immutable/chunks/{jvSooljK.js → BdRSK1yL.js} +1 -1
- package/web/app/immutable/chunks/{C2XB0GY0.js → BhFOH57c.js} +1 -1
- package/web/app/immutable/chunks/{Bsismerr.js → BhIO_xHl.js} +1 -1
- package/web/app/immutable/chunks/{BRomtsr7.js → Bhi7nqvj.js} +1 -1
- package/web/app/immutable/chunks/{B8MtVUO1.js → BiNDusYZ.js} +1 -1
- package/web/app/immutable/chunks/{Fq8M_XAT.js → BigHY9es.js} +1 -1
- package/web/app/immutable/chunks/{BzXXtRZY.js → BnrJBpBN.js} +1 -1
- package/web/app/immutable/chunks/{UkcaZDPC.js → BnwhVBNM.js} +1 -1
- package/web/app/immutable/chunks/{RAtz5BJe.js → BpDC3EqX.js} +1 -1
- package/web/app/immutable/chunks/{CtnRAN1I.js → BqgkenX2.js} +1 -1
- package/web/app/immutable/chunks/{B0rIXGc4.js → Bre3E0ap.js} +1 -1
- package/web/app/immutable/chunks/{DLyvIErQ.js → Bs3EnmGR.js} +1 -1
- package/web/app/immutable/chunks/{Co3f6qKm.js → BvoDzKGD.js} +1 -1
- package/web/app/immutable/chunks/{DThHr-M9.js → BzJ6PuN9.js} +1 -1
- package/web/app/immutable/chunks/{DK1WtQKR.js → BzWpnIKh.js} +3 -3
- package/web/app/immutable/chunks/{C6liPF0f.js → C0u2gry7.js} +1 -1
- package/web/app/immutable/chunks/{Cu-I2HTr.js → C3n2Uabc.js} +1 -1
- package/web/app/immutable/chunks/{CMDErhcM.js → C4SwxIDn.js} +1 -1
- package/web/app/immutable/chunks/{BfHcmF2O.js → CDRTbTrl.js} +1 -1
- package/web/app/immutable/chunks/{Ch4_kkqM.js → CEvdwZkh.js} +1 -1
- package/web/app/immutable/chunks/{B51DLOiX.js → CFAFichO.js} +1 -1
- package/web/app/immutable/chunks/{mp0CeHil.js → CHdwonoT.js} +1 -1
- package/web/app/immutable/chunks/{Bjp6Z7YT.js → CI2ZJeGm.js} +1 -1
- package/web/app/immutable/chunks/{Bb5T6-Tv.js → CLd6HNgr.js} +2 -2
- package/web/app/immutable/chunks/{wzM9lg7r.js → CMEHU8hk.js} +1 -1
- package/web/app/immutable/chunks/{DZyjGspJ.js → CMd41Hnh.js} +12 -12
- package/web/app/immutable/chunks/{DozUkl5C.js → CN_zBCnB.js} +4 -4
- package/web/app/immutable/chunks/{BwUnz25X.js → CO9-9ia5.js} +1 -1
- package/web/app/immutable/chunks/{B1yX4XGq.js → CRNEQjon.js} +1 -1
- package/web/app/immutable/chunks/{ClBJ4iZ6.js → CTY09YkT.js} +1 -1
- package/web/app/immutable/chunks/{D4nVXLyT.js → CVXiMOvb.js} +1 -1
- package/web/app/immutable/chunks/{EhMQOMj3.js → CX0FMql8.js} +1 -1
- package/web/app/immutable/chunks/{o3xy8uhx.js → CZ2C0Bw1.js} +1 -1
- package/web/app/immutable/chunks/{ndibvDk5.js → CaQqYus5.js} +1 -1
- package/web/app/immutable/chunks/{DNzfQenZ.js → CcBfSx3w.js} +1 -1
- package/web/app/immutable/chunks/{v9ob0vCO.js → CgDK6J9C.js} +1 -1
- package/web/app/immutable/chunks/{CU5gGNrG.js → ClLRB7WU.js} +1 -1
- package/web/app/immutable/chunks/{BLOjz32P.js → Cq0e_D5i.js} +1 -1
- package/web/app/immutable/chunks/{B21_6eW6.js → CrMBXfo1.js} +1 -1
- package/web/app/immutable/chunks/{B7Df-Pbj.js → Cuu_7zcj.js} +2 -2
- package/web/app/immutable/chunks/{BLLsZVvW.js → Cvk4vC60.js} +1 -1
- package/web/app/immutable/chunks/{B9lVck2z.js → Cvl8hYkG.js} +1 -1
- package/web/app/immutable/chunks/{Y7H0Q9T9.js → D3F3BWsi.js} +1 -1
- package/web/app/immutable/chunks/{BWzmS9rr.js → D49N714C.js} +1 -1
- package/web/app/immutable/chunks/{IOLk9WTr.js → D7TRU2iP.js} +1 -1
- package/web/app/immutable/chunks/{ERFmpNRs.js → D9tXiVtR.js} +1 -1
- package/web/app/immutable/chunks/{B4CR5dfb.js → DBHc62lF.js} +1 -1
- package/web/app/immutable/chunks/{NBz8yHrY.js → DEGO3t-C.js} +1 -1
- package/web/app/immutable/chunks/{C-wtKDF4.js → DEsZrW9M.js} +1 -1
- package/web/app/immutable/chunks/{u8LnBJs1.js → DGRH7rrK.js} +1 -1
- package/web/app/immutable/chunks/{Cyu02R5O.js → DMDmyjl-.js} +1 -1
- package/web/app/immutable/chunks/{C5uQZx4q.js → DMhUzoUF.js} +1 -1
- package/web/app/immutable/chunks/{BPrwAqEs.js → DRXhVu5w.js} +1 -1
- package/web/app/immutable/chunks/{CESQT1SZ.js → DT_ABoQZ.js} +1 -1
- package/web/app/immutable/chunks/{C73NY2AB.js → DUoxftgs.js} +1 -1
- package/web/app/immutable/chunks/{DjhrVk-G.js → DXeTlQw4.js} +1 -1
- package/web/app/immutable/chunks/{DZVkFfA6.js → DY7nIM_G.js} +1 -1
- package/web/app/immutable/chunks/{2CGxw1E-.js → DZNKweTG.js} +1 -1
- package/web/app/immutable/chunks/{BeCIalNK.js → D_idmae7.js} +1 -1
- package/web/app/immutable/chunks/{e5cMrke8.js → DanhIRZQ.js} +1 -1
- package/web/app/immutable/chunks/{BbgSAX3i.js → DhNomEqt.js} +1 -1
- package/web/app/immutable/chunks/{C8_8H2HU.js → DitwnI8q.js} +2 -2
- package/web/app/immutable/chunks/{ClKki07I.js → Drfn5RRL.js} +1 -1
- package/web/app/immutable/chunks/{BtKOOSsW.js → DvwGTmJ3.js} +1 -1
- package/web/app/immutable/chunks/{DgOx26JX.js → EuCKSXHB.js} +1 -1
- package/web/app/immutable/chunks/{DxWZwZdx.js → JF_LDwpb.js} +1 -1
- package/web/app/immutable/chunks/{BLAOZHWQ.js → JzdAu8wb.js} +1 -1
- package/web/app/immutable/chunks/{Gq5VdtSX.js → KTJ-30_b.js} +1 -1
- package/web/app/immutable/chunks/{T-UCXbJS.js → MXYIc7_A.js} +1 -1
- package/web/app/immutable/chunks/{Bw6C51Z8.js → NSQu1UJa.js} +1 -1
- package/web/app/immutable/chunks/{BYBv_fLl.js → PMKD3h28.js} +3 -3
- package/web/app/immutable/chunks/{CNttRhcj.js → QHBZjsP5.js} +1 -1
- package/web/app/immutable/chunks/{B2eAyNSi.js → QQQ2Maz-.js} +1 -1
- package/web/app/immutable/chunks/{JzReAjFF.js → Q_fdFY85.js} +1 -1
- package/web/app/immutable/chunks/{BRadcq2w.js → UG14BPPT.js} +2 -2
- package/web/app/immutable/chunks/{BqobArwh.js → UJ1EpVxt.js} +1 -1
- package/web/app/immutable/chunks/{LMNLZ1NY.js → VZSwqvuN.js} +1 -1
- package/web/app/immutable/chunks/{BMOxNEff.js → aMVpjO1H.js} +1 -1
- package/web/app/immutable/chunks/{Dy3Z_3JL.js → lFSDumAY.js} +1 -1
- package/web/app/immutable/chunks/{CFPsFOEM.js → nBuK6q0d.js} +1 -1
- package/web/app/immutable/chunks/{QZ612f-7.js → onT82iSe.js} +1 -1
- package/web/app/immutable/chunks/{CE90SUHM.js → qHfU8eWI.js} +3 -3
- package/web/app/immutable/chunks/{DbxGcVeS.js → snmn_u5-.js} +2 -2
- package/web/app/immutable/chunks/{BJbIj2f5.js → up0Zt_r2.js} +3 -3
- package/web/app/immutable/chunks/{BJm_eT-U.js → vw8GizVl.js} +1 -1
- package/web/app/immutable/chunks/{DJz4QGRL.js → wrzNedDP.js} +1 -1
- package/web/app/immutable/chunks/{C-vkWK8U.js → yIt8dECo.js} +1 -1
- package/web/app/immutable/chunks/{Bpb2sW6o.js → yNVrzlY4.js} +1 -1
- package/web/app/immutable/entry/{app.B5_j9_5M.js → app.DTfx5CuV.js} +2 -2
- package/web/app/immutable/entry/start.DueW1FW9.js +1 -0
- package/web/app/immutable/nodes/{0.DHuGbpUL.js → 0.3GL3qSES.js} +1 -1
- package/web/app/immutable/nodes/{1.WwJLTbbm.js → 1.ez5gI658.js} +1 -1
- package/web/app/immutable/nodes/{10.CPuWWcG0.js → 10.DIxSk9q8.js} +1 -1
- package/web/app/immutable/nodes/{14.BcQJ7NXl.js → 14.MpS-kf0C.js} +1 -1
- package/web/app/immutable/nodes/{18.zJtnTeH6.js → 18.DW5qKw-K.js} +2 -2
- package/web/app/immutable/nodes/{2.0AUsew1o.js → 2.CLq8rIVr.js} +4 -4
- package/web/app/immutable/nodes/{3.BAKoHu3T.js → 3.BSdLkeLH.js} +1 -1
- package/web/app/immutable/nodes/{4.DvgOQOfh.js → 4.DQIk0T0w.js} +1 -1
- package/web/app/immutable/nodes/{5.B3LUyqZc.js → 5.DITRknqM.js} +1 -1
- package/web/app/immutable/nodes/{6.CQSK8GlV.js → 6.3WKk43x0.js} +1 -1
- package/web/app/immutable/nodes/{7.C0YP__gO.js → 7.BJ0R8KFY.js} +1 -1
- package/web/app/immutable/nodes/{8.CCQs8dWr.js → 8.DPgSAVJ2.js} +4 -4
- package/web/app/immutable/nodes/{9.BLr02eF_.js → 9.zTjz59Kl.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/entry/start.mb9UH8tB.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var a1=Object.defineProperty;var i1=(t,e,r)=>e in t?a1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var se=(t,e,r)=>i1(t,typeof e!="symbol"?e+"":e,r);import{cD as ur,aU as s1,ds as _l,_ as R0,Y as ya,Z as o1,X as l1,a1 as c1,ab as u1,U as d1,dT as h1,M as p1,ba as Ll,cG as Lr,dr as Pl,aT as m1,aX as f1,co as g1,cE as v1,c9 as b1,dl as Ka,dN as y1,dG as w1,ay as Fn,al as k1,at as Ti,dq as Ol,dD as x1,dX as $l,dW as S1}from"./DpNO08YA.js";import{D as Ls,by as A1,bQ as T1,a$ as E1}from"./DThHr-M9.js";import{L as M1,F as i0}from"./ggQuSgBM.js";import{yD as gn,Iv as E,ny as ge,nx as Se,aO as C1,i as Bl,E as Re,bf as c0,jT as Ei,lS as vn,al as jt,lR as Ps,l$ as Os,lY as $s,jq as ql,gk as Xa,GT as I1,t3 as z1,z_ as R1,oB as D1,mE as bn,By as N1,iw as _1,m9 as L1,lM as P1}from"./BmagX6n5.js";import{bo as ne}from"./CT36W95j.js";import{t as rt}from"./D-IkFfCX.js";import{k as O1,d as xr}from"./CVc3afbh.js";import{a as u0}from"./BdWqymET.js";import{o as pe,r as Gt,e as d0,s as V,_ as Ke,l as h0,g as $1,n as Le,c as or,b as Ue,u as B1,d as q1}from"./CIyUrgF0.js";import{j as Fl}from"./uXuxG9cN.js";import{v as F1}from"./BFllbeCZ.js";import{b as H1}from"./C20jcbNk.js";import{i as He}from"./DJ8_lZZl.js";import{l as wa,c as Hl}from"./ChTqQfQN.js";import{h as Mi,M as Ul,O as Wl,s as U1,K as Gl,z as W1,D as G1}from"./CmG1GbmA.js";import{e as j1,h as Sr}from"./BDDVFcm3.js";import{h as p0}from"./ClQp3PSY.js";import{i as Bs}from"./D_Kq1QRo.js";const Ge=[];for(let t=0;t<256;++t)Ge.push((t+256).toString(16).slice(1));function V1(t,e=0){return(Ge[t[e+0]]+Ge[t[e+1]]+Ge[t[e+2]]+Ge[t[e+3]]+"-"+Ge[t[e+4]]+Ge[t[e+5]]+"-"+Ge[t[e+6]]+Ge[t[e+7]]+"-"+Ge[t[e+8]]+Ge[t[e+9]]+"-"+Ge[t[e+10]]+Ge[t[e+11]]+Ge[t[e+12]]+Ge[t[e+13]]+Ge[t[e+14]]+Ge[t[e+15]]).toLowerCase()}const Y1=new Uint8Array(16);function K1(){return crypto.getRandomValues(Y1)}function Ci(t,e,r){return crypto.randomUUID?crypto.randomUUID():X1(t)}function X1(t,e,r){t=t||{};const n=t.random??t.rng?.()??K1();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,V1(n)}function Ii(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=Ii({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?M1(r.replace(/\.git\/?$/,""),e):null}function w5(t,e){return t.type==="local"?t.plainFolder?"folder":"local":Ii(t,e)?.provider==="gitlab"?"gitlab":"github"}function jl(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function k5(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=jl(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function x5(t){return t.type==="local"&&t.path?t.path:void 0}const Z1=["/.clones/","/.repo-cache/"];function S5(t){const e=t.replaceAll("\\","/");return Z1.some(r=>e.includes(r))}function A5(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function Q1(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function T5(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??Q1(r)}}function E5(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,jl(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const J1="known-repos",ed=6e4;function td({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=gn(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(gn(s),s);for(const s of e.repos)a.set(gn(s),s)}const i=[...a.values()].filter(s=>!r[gn(s)]);return n==="all"?i:i.slice(0,9)}function M5(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function C5({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<ed?"skip":"load"}function I5(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=Ii(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function rd({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(Ls)?Ls:null;return s===null||!i(s)?null:s}const z5=E.createSelector(t=>t.workspaceInitializer.hydrated),R5=E.createSelector(t=>t.workspaceInitializer.compactFormState),D5=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),N5=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),_5=E.createSelector(t=>t.workspaceInitializer.branchByRepo),L5=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),P5=E.createSelector(t=>ge(t.workspaceInitializer.recentRepos)),O5=E.createSelector((t,e)=>Se(t.workspaceInitializer.recentRepoRefreshes,e)),$5=E.createSelector((t,e)=>Se(t.workspaceInitializer.directoryStatusChecks,e)),B5=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),q5=E.createSelector(t=>ge(t.workspaceInitializer.remoteSetups)),F5=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),H5=E.createSelector(t=>t.workspaceInitializer.agentByRepo),U5=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),W5=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),G5=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),j5=E.createSelector((t,e)=>({restore:Se(t.workspaceInitializer.draftRestores,e),clear:Se(t.workspaceInitializer.draftClears,e)})),V5=E.createSelector((t,e,r)=>{const n=Se(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),Y5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationOutcomes,e)),K5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationResumes,e)),X5=E.createSelector(t=>rd({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:T1.select(t),orchestratorId:A1.select(t)?.id??null})),nd=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=ur.select(t);return e&&r&&s1.select(t)?JSON.stringify([r,e]):null}),Z5=E.createSelector(t=>{const e=nd.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),ad=E.createSelector(t=>{const e=Se(t.workspaceInitializer.recentRepoRefreshes,J1),r=ur.select(t);return td({saved:ge(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),Q5=E.createSelector(t=>_l.select(t)?ad.select(t):[]),J5=E.createSelector(t=>E1.select(t)||void 0),qs="workspace-debug-flags",yn={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class id{constructor(){se(this,"flags");se(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return yn;try{const e=localStorage.getItem(qs);if(e)return{...yn,...JSON.parse(e)}}catch(e){wa.error("Failed to load debug flags:",e)}return yn}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(qs,JSON.stringify(this.flags))}catch(e){wa.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...yn},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),wa.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const ka=new id;function e3(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function sd(t){return t.charAt(0).toUpperCase()+t.slice(1)}function t3(t){if(!t||t.trim().length===0)return ne.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return ne.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return ne.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return ne.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return ne.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return ne.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return ne.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return ne.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return ne.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return ne.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return ne.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return ne.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return ne.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return ne.workspace_sidebarHeader_branchTooLong_error()}function r3(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function Za(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function n3(t,e){return`${e}:${t.agentId??"manual"}`}function od(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function ld(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function cd(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function a3(t,e,r,n){const a=od(t,e),i=n?` (origin/${n})`:"";return r?a===1?ne.workspace_sidebarChanges_addToPr_one({suffix:i}):ne.workspace_sidebarChanges_addToPr_many({count:rt(a),suffix:i}):a===1?ne.workspace_sidebarChanges_pushToRemote_one({suffix:i}):ne.workspace_sidebarChanges_pushToRemote_many({count:rt(a),suffix:i})}function i3(t,e,r){const n=ld(t,e),a=r?` (origin/${r})`:"";return n===1?ne.workspace_sidebarChanges_undoPush_one({suffix:a}):ne.workspace_sidebarChanges_undoPush_many({count:rt(n),suffix:a})}function s3(t,e){const r=cd(t,e);return r===1?ne.workspace_sidebarChanges_undoCommit_one():ne.workspace_sidebarChanges_undoCommit_many({count:rt(r)})}function o3(t,e){return e===0&&t.length>0}function l3(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function c3(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function u3(t,e,r){return r?.path===t&&r?.staged===e}function d3(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function h3(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function ud(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function p3(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=ud(s.url),d=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:Za(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:d,crossRepoDisplay:d?zi(d,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:Za(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function m3(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??C1.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function dd(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function xa(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=R0(i),c=o.toLowerCase(),d=a.find(p=>!!o&&p.url.toLowerCase()===c||(i.resource||i.monitorAvailability?p.monitorIdentity===ya(i):!p.resource&&!p.monitorAvailability&&(s?!p.crossRepo&&p.number===i.prNumber:p.crossRepo===i.repo&&p.number===i.prNumber)));if(d){d.monitorAgentId=i.agentId,d.resource=i.resource,d.monitorAvailability=i.monitorAvailability,d.monitorIdentity=i.resource||i.monitorAvailability?ya(i):void 0,d.monitorSnapshot=i.lastSnapshot??d.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${o1(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?ya(i):void 0,url:o,htmlUrl:o,status:dd(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:zi(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function zi(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function f3(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const S of n)S.repoOwner&&S.repoName&&s.add(`${S.repoOwner}/${S.repoName}`.toLowerCase());let o=t;const c=[],d=[];if(t.some(S=>S.crossRepo)){o=[];for(const S of t)S.crossRepo?s.has(S.crossRepo.toLowerCase())?c.push(S):d.push(S):o.push(S)}const p=[],g=[],v=[];for(const S of e){const C=S.repo.toLowerCase();R0(S)&&o.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&(!i||C===i)?p.push(S):R0(S)&&c.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&s.has(C)?g.push(S):v.push(S)}const w=xa(o,p,r),A=r?.split("/")[0],M=new Set([...w,...c,...d].map(S=>`${(S.crossRepo??r??"").toLowerCase()}#${S.number}`)),D=[...c];for(const S of n){if(!S.repoOwner||!S.repoName)continue;const C=`${S.repoOwner}/${S.repoName}`;for(const W of S.pullRequests??[]){const X=`${C.toLowerCase()}#${W.number}`;if(M.has(X))continue;M.add(X);const K=W.url||`https://github.com/${C}/pull/${W.number}`,T=i!==void 0&&C.toLowerCase()===i;D.push({number:W.number,title:a(W),url:K,htmlUrl:K,status:Za(W.status),createdAt:W.createdAt,updatedAt:W.updatedAt,crossRepo:T?void 0:C,crossRepoDisplay:T?void 0:zi(C,A)})}}return{own:w,otherRoots:xa(D,g,r),otherTracked:xa(d,v,r)}}function Fs(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function g3(t){const e=t.status==="merged"?ne.workspace_prSection_merged_label():t.status==="closed"?ne.workspace_prSection_closed_label():t.status==="draft"?ne.workspace_prSection_statusDraft_label():Fs(t)?ne.workspace_prSection_statusQueued_label():ne.workspace_prSection_statusOpen_label(),r=[l1(t)??e],n=Fs(t)?O1(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(ne.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(ne.workspace_prSection_statusChecks_tooltip({passed:rt(a.checks.passed),failed:rt(a.checks.failed),pending:rt(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?ne.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?ne.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:rt(a.approvals.have),needed:rt(a.approvals.needed)}):ne.workspace_prSection_statusApprovals_tooltip({count:rt(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(ne.workspace_prSection_statusChangesRequested_tooltip({count:rt(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(ne.workspace_prSection_statusUnresolvedThreads_tooltip({count:rt(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(sd(a.mergeBlockedReason))),r.join(`
|
|
1
|
+
var a1=Object.defineProperty;var i1=(t,e,r)=>e in t?a1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var se=(t,e,r)=>i1(t,typeof e!="symbol"?e+"":e,r);import{cD as ur,aU as s1,ds as _l,_ as R0,Y as ya,Z as o1,X as l1,a1 as c1,ab as u1,U as d1,dT as h1,M as p1,ba as Ll,cG as Lr,dr as Pl,aT as m1,aX as f1,co as g1,cE as v1,c9 as b1,dl as Ka,dN as y1,dG as w1,ay as Fn,al as k1,at as Ti,dq as Ol,dD as x1,dX as $l,dW as S1}from"./DpNO08YA.js";import{D as Ls,by as A1,bQ as T1,a$ as E1}from"./BzJ6PuN9.js";import{L as M1,F as i0}from"./ggQuSgBM.js";import{yD as gn,Iv as E,ny as ge,nx as Se,aO as C1,i as Bl,E as Re,bf as c0,jT as Ei,lS as vn,al as jt,lR as Ps,l$ as Os,lY as $s,jq as ql,gk as Xa,GT as I1,t3 as z1,z_ as R1,oB as D1,mE as bn,By as N1,iw as _1,m9 as L1,lM as P1}from"./BmagX6n5.js";import{bo as ne}from"./CT36W95j.js";import{t as rt}from"./D-IkFfCX.js";import{k as O1,d as xr}from"./CVc3afbh.js";import{a as u0}from"./BdWqymET.js";import{o as pe,r as Gt,e as d0,s as V,_ as Ke,l as h0,g as $1,n as Le,c as or,b as Ue,u as B1,d as q1}from"./CIyUrgF0.js";import{j as Fl}from"./uXuxG9cN.js";import{v as F1}from"./BFllbeCZ.js";import{b as H1}from"./C20jcbNk.js";import{i as He}from"./DJ8_lZZl.js";import{l as wa,c as Hl}from"./ChTqQfQN.js";import{h as Mi,M as Ul,O as Wl,s as U1,K as Gl,z as W1,D as G1}from"./CmG1GbmA.js";import{e as j1,h as Sr}from"./BDDVFcm3.js";import{h as p0}from"./ClQp3PSY.js";import{i as Bs}from"./D_Kq1QRo.js";const Ge=[];for(let t=0;t<256;++t)Ge.push((t+256).toString(16).slice(1));function V1(t,e=0){return(Ge[t[e+0]]+Ge[t[e+1]]+Ge[t[e+2]]+Ge[t[e+3]]+"-"+Ge[t[e+4]]+Ge[t[e+5]]+"-"+Ge[t[e+6]]+Ge[t[e+7]]+"-"+Ge[t[e+8]]+Ge[t[e+9]]+"-"+Ge[t[e+10]]+Ge[t[e+11]]+Ge[t[e+12]]+Ge[t[e+13]]+Ge[t[e+14]]+Ge[t[e+15]]).toLowerCase()}const Y1=new Uint8Array(16);function K1(){return crypto.getRandomValues(Y1)}function Ci(t,e,r){return crypto.randomUUID?crypto.randomUUID():X1(t)}function X1(t,e,r){t=t||{};const n=t.random??t.rng?.()??K1();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,V1(n)}function Ii(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=Ii({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?M1(r.replace(/\.git\/?$/,""),e):null}function w5(t,e){return t.type==="local"?t.plainFolder?"folder":"local":Ii(t,e)?.provider==="gitlab"?"gitlab":"github"}function jl(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function k5(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=jl(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function x5(t){return t.type==="local"&&t.path?t.path:void 0}const Z1=["/.clones/","/.repo-cache/"];function S5(t){const e=t.replaceAll("\\","/");return Z1.some(r=>e.includes(r))}function A5(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function Q1(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function T5(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??Q1(r)}}function E5(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,jl(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const J1="known-repos",ed=6e4;function td({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=gn(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(gn(s),s);for(const s of e.repos)a.set(gn(s),s)}const i=[...a.values()].filter(s=>!r[gn(s)]);return n==="all"?i:i.slice(0,9)}function M5(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function C5({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<ed?"skip":"load"}function I5(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=Ii(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function rd({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(Ls)?Ls:null;return s===null||!i(s)?null:s}const z5=E.createSelector(t=>t.workspaceInitializer.hydrated),R5=E.createSelector(t=>t.workspaceInitializer.compactFormState),D5=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),N5=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),_5=E.createSelector(t=>t.workspaceInitializer.branchByRepo),L5=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),P5=E.createSelector(t=>ge(t.workspaceInitializer.recentRepos)),O5=E.createSelector((t,e)=>Se(t.workspaceInitializer.recentRepoRefreshes,e)),$5=E.createSelector((t,e)=>Se(t.workspaceInitializer.directoryStatusChecks,e)),B5=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),q5=E.createSelector(t=>ge(t.workspaceInitializer.remoteSetups)),F5=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),H5=E.createSelector(t=>t.workspaceInitializer.agentByRepo),U5=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),W5=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),G5=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),j5=E.createSelector((t,e)=>({restore:Se(t.workspaceInitializer.draftRestores,e),clear:Se(t.workspaceInitializer.draftClears,e)})),V5=E.createSelector((t,e,r)=>{const n=Se(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),Y5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationOutcomes,e)),K5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationResumes,e)),X5=E.createSelector(t=>rd({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:T1.select(t),orchestratorId:A1.select(t)?.id??null})),nd=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=ur.select(t);return e&&r&&s1.select(t)?JSON.stringify([r,e]):null}),Z5=E.createSelector(t=>{const e=nd.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),ad=E.createSelector(t=>{const e=Se(t.workspaceInitializer.recentRepoRefreshes,J1),r=ur.select(t);return td({saved:ge(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),Q5=E.createSelector(t=>_l.select(t)?ad.select(t):[]),J5=E.createSelector(t=>E1.select(t)||void 0),qs="workspace-debug-flags",yn={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class id{constructor(){se(this,"flags");se(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return yn;try{const e=localStorage.getItem(qs);if(e)return{...yn,...JSON.parse(e)}}catch(e){wa.error("Failed to load debug flags:",e)}return yn}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(qs,JSON.stringify(this.flags))}catch(e){wa.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...yn},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),wa.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const ka=new id;function e3(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function sd(t){return t.charAt(0).toUpperCase()+t.slice(1)}function t3(t){if(!t||t.trim().length===0)return ne.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return ne.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return ne.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return ne.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return ne.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return ne.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return ne.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return ne.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return ne.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return ne.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return ne.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return ne.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return ne.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return ne.workspace_sidebarHeader_branchTooLong_error()}function r3(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function Za(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function n3(t,e){return`${e}:${t.agentId??"manual"}`}function od(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function ld(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function cd(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function a3(t,e,r,n){const a=od(t,e),i=n?` (origin/${n})`:"";return r?a===1?ne.workspace_sidebarChanges_addToPr_one({suffix:i}):ne.workspace_sidebarChanges_addToPr_many({count:rt(a),suffix:i}):a===1?ne.workspace_sidebarChanges_pushToRemote_one({suffix:i}):ne.workspace_sidebarChanges_pushToRemote_many({count:rt(a),suffix:i})}function i3(t,e,r){const n=ld(t,e),a=r?` (origin/${r})`:"";return n===1?ne.workspace_sidebarChanges_undoPush_one({suffix:a}):ne.workspace_sidebarChanges_undoPush_many({count:rt(n),suffix:a})}function s3(t,e){const r=cd(t,e);return r===1?ne.workspace_sidebarChanges_undoCommit_one():ne.workspace_sidebarChanges_undoCommit_many({count:rt(r)})}function o3(t,e){return e===0&&t.length>0}function l3(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function c3(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function u3(t,e,r){return r?.path===t&&r?.staged===e}function d3(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function h3(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function ud(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function p3(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=ud(s.url),d=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:Za(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:d,crossRepoDisplay:d?zi(d,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:Za(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function m3(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??C1.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function dd(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function xa(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=R0(i),c=o.toLowerCase(),d=a.find(p=>!!o&&p.url.toLowerCase()===c||(i.resource||i.monitorAvailability?p.monitorIdentity===ya(i):!p.resource&&!p.monitorAvailability&&(s?!p.crossRepo&&p.number===i.prNumber:p.crossRepo===i.repo&&p.number===i.prNumber)));if(d){d.monitorAgentId=i.agentId,d.resource=i.resource,d.monitorAvailability=i.monitorAvailability,d.monitorIdentity=i.resource||i.monitorAvailability?ya(i):void 0,d.monitorSnapshot=i.lastSnapshot??d.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${o1(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?ya(i):void 0,url:o,htmlUrl:o,status:dd(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:zi(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function zi(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function f3(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const S of n)S.repoOwner&&S.repoName&&s.add(`${S.repoOwner}/${S.repoName}`.toLowerCase());let o=t;const c=[],d=[];if(t.some(S=>S.crossRepo)){o=[];for(const S of t)S.crossRepo?s.has(S.crossRepo.toLowerCase())?c.push(S):d.push(S):o.push(S)}const p=[],g=[],v=[];for(const S of e){const C=S.repo.toLowerCase();R0(S)&&o.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&(!i||C===i)?p.push(S):R0(S)&&c.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&s.has(C)?g.push(S):v.push(S)}const w=xa(o,p,r),A=r?.split("/")[0],M=new Set([...w,...c,...d].map(S=>`${(S.crossRepo??r??"").toLowerCase()}#${S.number}`)),D=[...c];for(const S of n){if(!S.repoOwner||!S.repoName)continue;const C=`${S.repoOwner}/${S.repoName}`;for(const W of S.pullRequests??[]){const X=`${C.toLowerCase()}#${W.number}`;if(M.has(X))continue;M.add(X);const K=W.url||`https://github.com/${C}/pull/${W.number}`,T=i!==void 0&&C.toLowerCase()===i;D.push({number:W.number,title:a(W),url:K,htmlUrl:K,status:Za(W.status),createdAt:W.createdAt,updatedAt:W.updatedAt,crossRepo:T?void 0:C,crossRepoDisplay:T?void 0:zi(C,A)})}}return{own:w,otherRoots:xa(D,g,r),otherTracked:xa(d,v,r)}}function Fs(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function g3(t){const e=t.status==="merged"?ne.workspace_prSection_merged_label():t.status==="closed"?ne.workspace_prSection_closed_label():t.status==="draft"?ne.workspace_prSection_statusDraft_label():Fs(t)?ne.workspace_prSection_statusQueued_label():ne.workspace_prSection_statusOpen_label(),r=[l1(t)??e],n=Fs(t)?O1(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(ne.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(ne.workspace_prSection_statusChecks_tooltip({passed:rt(a.checks.passed),failed:rt(a.checks.failed),pending:rt(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?ne.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?ne.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:rt(a.approvals.have),needed:rt(a.approvals.needed)}):ne.workspace_prSection_statusApprovals_tooltip({count:rt(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(ne.workspace_prSection_statusChangesRequested_tooltip({count:rt(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(ne.workspace_prSection_statusUnresolvedThreads_tooltip({count:rt(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(sd(a.mergeBlockedReason))),r.join(`
|
|
2
2
|
`)}function v3(t,e){return e.has(t??"manual")}function b3(t,e){return{path:t.relativePath,additions:t.stats.additions,deletions:t.stats.deletions,staged:e,status:t.status,attribution:t.attribution?.agent?{agentId:t.attribution.agent.agentId,agentName:t.attribution.agent.agentName,sessionId:t.attribution.agent.sessionId,turnNumber:t.attribution.agent.turnNumber,timestamp:t.attribution.timestamp}:void 0}}const Vl=500;function y3(t,e=Vl){const r=Math.max(0,Math.floor(e));return t.length<=r?{visible:t,shown:t.length,hiddenCount:0}:{visible:t.slice(0,r),shown:r,hiddenCount:t.length-r}}function w3(t,e,r=Vl){let n=Math.max(0,Math.floor(r)),a=0,i=0;return{groups:t.map(o=>{if(e(o))return{group:o,visibleFiles:[]};const c=Math.min(n,o.files.length);return n-=c,a+=c,i+=o.files.length-c,{group:o,visibleFiles:c===o.files.length?o.files:o.files.slice(0,c)}}),shown:a,hiddenCount:i}}function k3(t){if(t.hiddenCount<=0)return"";const e=rt(t.shown),r=rt(t.shown+t.hiddenCount);return t.hiddenCount===1?ne.workspace_fileChanges_hiddenFiles_one({shown:e,total:r}):ne.workspace_fileChanges_hiddenFiles_many({shown:e,total:r,count:rt(t.hiddenCount)})}function hd(t){if(!t)return{};try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function Qa(t){return t.startsWith("@")?t.slice(1):t}function pd(t,e,r,n){const a=t.fullPath||t.path||t.filename;if(a)return Qa(String(a));const i=[r,e,n.trim()].map(Qa).filter(Boolean),s=i.find(o=>o.includes("/"))??i[0];return s?c1(s).path:void 0}function md(t){const e=t.line??t.startLine??t.range?.start;return typeof e=="number"&&Number.isFinite(e)?e:void 0}function fd(t){if(!t||t.getAttribute("data-mention")===null)return null;const e=t.getAttribute("data-type")||"",r=t.getAttribute("data-id")||"",n=t.getAttribute("data-label")||"",a=t.getAttribute("data-uri")||"",i=hd(t.getAttribute("data-meta")),s={type:e,id:r,label:n,uri:a,meta:i},o=a.startsWith("intent://")?a:typeof i.fullUrl=="string"&&i.fullUrl.startsWith("intent://")?i.fullUrl:void 0;if(o&&(s.intentUrl=o),e==="file"||e==="file-range"){const c=pd(i,n,r,t.textContent||"");c&&(s.filePath=c);const d=md(i);d!==void 0&&(s.line=d)}else if(e==="folder"||e==="source-folder"){const c=i.fullPath||i.path||r||n,d=c?Qa(String(c)).replace(/\/+$/,""):"";d&&(s.folderPath=d)}else if(e==="note"||e==="note-range"){const c=i.noteId||r;c&&(s.note=i.isExternalLink&&i.workspaceId?{id:c,workspaceId:String(i.workspaceId)}:{id:c})}return s}function x3(t){return{sidebarTabId:"files",type:"file",filePath:`${t}/`}}function Ri(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Pr=Ri();function Yl(t){Pr=t}var Ir={exec:()=>null};function Kr(t){let e=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),a=e[n];return a||(a=t(n),e[n]=a),a}}function ce(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Ye.caret,"$1"),r=r.replace(a,s),n},getRegex:()=>new RegExp(r,e)};return n}var gd=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),Ye={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Kr(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Kr(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Kr(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Kr(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Kr(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Kr(t=>new RegExp(`^ {0,${t}}>`))},vd=/^(?:[ \t]*(?:\n|$))+/,bd=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,yd=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,W0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,wd=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Di=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Kl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xl=ce(Kl).replace(/bull/g,Di).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),kd=ce(Kl).replace(/bull/g,Di).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ni=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,xd=/^[^\n]+/,_i=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Sd=ce(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_i).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ad=ce(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Di).getRegex(),Hn="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Li=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Td=ce("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Li).replace("tag",Hn).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Zl=t=>ce(Ni).replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hn).getRegex(),Ed=Zl(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Md=Zl(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Cd=ce(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Md).getRegex(),Pi={blockquote:Cd,code:bd,def:Sd,fences:yd,heading:wd,hr:W0,html:Td,lheading:Xl,list:Ad,newline:vd,paragraph:Ed,table:Ir,text:xd},Hs=ce("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hn).getRegex(),Id={...Pi,lheading:kd,table:Hs,paragraph:ce(Ni).replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Hs).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hn).getRegex()},zd={...Pi,html:ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Li).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ir,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ce(Ni).replace("hr",W0).replace("heading",` *#{1,6} *[^
|
|
3
3
|
]`).replace("lheading",Xl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Rd=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Dd=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ql=/^( {2,}|\\)\n(?!\s*$)/,Nd=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Vt=/[\p{P}\p{S}]/u,m0=/[\s\p{P}\p{S}]/u,G0=/[^\s\p{P}\p{S}]/u,_d=ce(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,m0).getRegex(),Ld=/[\p{Pi}\p{Ps}"']/u,Jl=/(?!~)[\p{P}\p{S}]/u,Pd=/(?!~)[\s\p{P}\p{S}]/u,Od=/(?:[^\s\p{P}\p{S}]|~)/u,$d=ce(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",gd?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ec=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Bd=ce(ec,"u").replace(/punct/g,Vt).getRegex(),qd=ce(ec,"u").replace(/punct/g,Jl).getRegex(),Fd=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Hd=ce(Fd,"u").replace(/openQuote/g,Ld).replace(/punct/g,Vt).getRegex(),tc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ud=ce(tc,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Wd=ce(tc,"gu").replace(/notPunctSpace/g,Od).replace(/punctSpace/g,Pd).replace(/punct/g,Jl).getRegex(),Gd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",jd=ce(Gd,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Vd=ce("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Yd="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Kd=ce(Yd,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Xd=ce(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Vt).getRegex(),Zd="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Qd=ce(Zd,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Jd=ce(/\\(punct)/,"gu").replace(/punct/g,Vt).getRegex(),eh=ce(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),th=ce(Li).replace("(?:-->|$)","-->").getRegex(),rh=ce("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",th).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ln=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,nh=ce(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Ln).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rc=ce(/^!?\[(label)\]\[(ref)\]/).replace("label",Ln).replace("ref",_i).getRegex(),nc=ce(/^!?\[(ref)\](?:\[\])?/).replace("ref",_i).getRegex(),ah=ce("reflink|nolink(?!\\()","g").replace("reflink",rc).replace("nolink",nc).getRegex(),Us=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Oi={_backpedal:Ir,anyPunctuation:Jd,autolink:eh,blockSkip:$d,br:Ql,code:Dd,del:Ir,delLDelim:Ir,delRDelim:Ir,emStrongLDelim:Bd,emStrongRDelimAst:Ud,emStrongRDelimUnd:Vd,escape:Rd,link:nh,nolink:nc,punctuation:_d,reflink:rc,reflinkSearch:ah,tag:rh,text:Nd,url:Ir},ih={...Oi,emStrongLDelim:Hd,emStrongRDelimAst:jd,emStrongRDelimUnd:Kd,link:ce(/^!?\[(label)\]\((.*?)\)/).replace("label",Ln).getRegex(),reflink:ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ln).getRegex()},Ja={...Oi,emStrongRDelimAst:Wd,emStrongLDelim:qd,delLDelim:Xd,delRDelim:Qd,url:ce(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Us).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ce(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Us).getRegex()},sh={...Ja,br:ce(Ql).replace("{2,}","*").getRegex(),text:ce(Ja.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},wn={normal:Pi,gfm:Id,pedantic:zd},S0={normal:Oi,gfm:Ja,breaks:sh,pedantic:ih},oh={"&":"&","<":"<",">":">",'"':""","'":"'"},Ws=t=>oh[t];function Dt(t,e){if(e){if(Ye.escapeTest.test(t))return t.replace(Ye.escapeReplace,Ws)}else if(Ye.escapeTestNoEncode.test(t))return t.replace(Ye.escapeReplaceNoEncode,Ws);return t}function Gs(t){try{t=encodeURI(t).replace(Ye.percentDecode,"%")}catch{return null}return t}function js(t,e){let r=t.replace(Ye.findPipe,(i,s,o)=>{let c=!1,d=s;for(;--d>=0&&o[d]==="\\";)c=!c;return c?"|":" |"}),n=r.split(Ye.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(Ye.slashPipe,"|");return n}function tr(t,e,r){let n=t.length;if(n===0)return"";let a=0;for(;a<n&&t.charAt(n-a-1)===e;)a++;return t.slice(0,n-a)}function Vs(t){let e=t.split(`
|
|
4
4
|
`),r=e.length-1;for(;r>=0&&Ye.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Ni}from"./
|
|
1
|
+
import{g as Ni}from"./onT82iSe.js";import{s as Ci}from"./749Ye7vh.js";import{U as Zs,aZ as jt,V as Qs,a_ as Gt,Y as bi,b0 as vi,b as h,aU as je,ay as _i,X as en,a1 as xi,aP as Mi,bh as wi,aV as Ui,r as Pi,O as Di,am as Fi,W as Bi,ab as $i,aG as ji,aA as Gi,aW as Wi}from"./CN_zBCnB.js";function Wt(s){console&&console.error&&console.error(`Error: ${s}`)}function tn(s){console&&console.warn&&console.warn(`Warning: ${s}`)}function sn(s){const e=new Date().getTime(),t=s();return{time:new Date().getTime()-e,value:t}}function nn(s){function e(){}e.prototype=s;const t=new e;function n(){return typeof t.bar}return n(),n(),s}function Ki(s){return Vi(s)?s.LABEL:s.name}function Vi(s){return typeof s.LABEL=="string"&&s.LABEL!==""}class te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),this.definition.forEach(t=>{t.accept(e)})}}class K extends te{constructor(e){super([]),this.idx=1,Object.assign(this,ie(e))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class _e extends te{constructor(e){super(e.definition),this.orgText="",Object.assign(this,ie(e))}}class W extends te{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Object.assign(this,ie(e))}}class G extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class se extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class ne extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class M extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class q extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class Z extends te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,ie(e))}}class k{constructor(e){this.idx=1,Object.assign(this,ie(e))}accept(e){e.visit(this)}}function zi(s){return s.map(at)}function at(s){function e(t){return t.map(at)}if(s instanceof K){const t={type:"NonTerminal",name:s.nonTerminalName,idx:s.idx};return typeof s.label=="string"&&(t.label=s.label),t}else{if(s instanceof W)return{type:"Alternative",definition:e(s.definition)};if(s instanceof G)return{type:"Option",idx:s.idx,definition:e(s.definition)};if(s instanceof se)return{type:"RepetitionMandatory",idx:s.idx,definition:e(s.definition)};if(s instanceof ne)return{type:"RepetitionMandatoryWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof q)return{type:"RepetitionWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof M)return{type:"Repetition",idx:s.idx,definition:e(s.definition)};if(s instanceof Z)return{type:"Alternation",idx:s.idx,definition:e(s.definition)};if(s instanceof k){const t={type:"Terminal",name:s.terminalType.name,label:Ki(s.terminalType),idx:s.idx};typeof s.label=="string"&&(t.terminalLabel=s.label);const n=s.terminalType.PATTERN;return s.terminalType.PATTERN&&(t.pattern=n instanceof RegExp?n.source:n),t}else{if(s instanceof _e)return{type:"Rule",name:s.name,orgText:s.orgText,definition:e(s.definition)};throw Error("non exhaustive match")}}}function ie(s){return Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0))}class xe{visit(e){const t=e;switch(t.constructor){case K:return this.visitNonTerminal(t);case W:return this.visitAlternative(t);case G:return this.visitOption(t);case se:return this.visitRepetitionMandatory(t);case ne:return this.visitRepetitionMandatoryWithSeparator(t);case q:return this.visitRepetitionWithSeparator(t);case M:return this.visitRepetition(t);case Z:return this.visitAlternation(t);case k:return this.visitTerminal(t);case _e:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function Hi(s){return s instanceof W||s instanceof G||s instanceof M||s instanceof se||s instanceof ne||s instanceof q||s instanceof k||s instanceof _e}function Tt(s,e=[]){return s instanceof G||s instanceof M||s instanceof q?!0:s instanceof Z?s.definition.some(n=>Tt(n,e)):s instanceof K&&e.includes(s)?!1:s instanceof te?(s instanceof K&&e.push(s),s.definition.every(n=>Tt(n,e))):!1}function Xi(s){return s instanceof Z}function ee(s){if(s instanceof K)return"SUBRULE";if(s instanceof G)return"OPTION";if(s instanceof Z)return"OR";if(s instanceof se)return"AT_LEAST_ONE";if(s instanceof ne)return"AT_LEAST_ONE_SEP";if(s instanceof q)return"MANY_SEP";if(s instanceof M)return"MANY";if(s instanceof k)return"CONSUME";throw Error("non exhaustive match")}class kt{walk(e,t=[]){e.definition.forEach((n,i)=>{const a=e.definition.slice(i+1);if(n instanceof K)this.walkProdRef(n,a,t);else if(n instanceof k)this.walkTerminal(n,a,t);else if(n instanceof W)this.walkFlat(n,a,t);else if(n instanceof G)this.walkOption(n,a,t);else if(n instanceof se)this.walkAtLeastOne(n,a,t);else if(n instanceof ne)this.walkAtLeastOneSep(n,a,t);else if(n instanceof q)this.walkManySep(n,a,t);else if(n instanceof M)this.walkMany(n,a,t);else if(n instanceof Z)this.walkOr(n,a,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const i=t.concat(n);this.walk(e,i)}walkOption(e,t,n){const i=t.concat(n);this.walk(e,i)}walkAtLeastOne(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkAtLeastOneSep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkMany(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkManySep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkOr(e,t,n){const i=t.concat(n);e.definition.forEach(a=>{const r=new W({definition:[a]});this.walk(r,i)})}}function ys(s,e,t){return[new G({definition:[new k({terminalType:s.separator})].concat(s.definition)})].concat(e,t)}function Je(s){if(s instanceof K)return Je(s.referencedRule);if(s instanceof k)return qi(s);if(Hi(s))return Yi(s);if(Xi(s))return Ji(s);throw Error("non exhaustive match")}function Yi(s){let e=[];const t=s.definition;let n=0,i=t.length>n,a,r=!0;for(;i&&r;)a=t[n],r=Tt(a),e=e.concat(Je(a)),n=n+1,i=t.length>n;return[...new Set(e)]}function Ji(s){const e=s.definition.map(t=>Je(t));return[...new Set(e.flat())]}function qi(s){return[s.terminalType]}const an="_~IN~_";class Zi extends kt{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const i=ea(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(n),r=new W({definition:a}),l=Je(r);this.follows[i]=l}}function Qi(s){const e={};return s.forEach(t=>{const n=new Zi(t).startWalking();Object.assign(e,n)}),e}function ea(s,e){return s.name+e+an}function S(s){return s.charCodeAt(0)}function Pt(s,e){Array.isArray(s)?s.forEach(function(t){e.push(t)}):e.push(s)}function Fe(s,e){if(s[e]===!0)throw"duplicate flag "+e;s[e],s[e]=!0}function Se(s){if(s===void 0)throw Error("Internal Error - Should never get here!");return!0}function ta(){throw Error("Internal Error - Should never get here!")}function Rs(s){return s.type==="Character"}const gt=[];for(let s=S("0");s<=S("9");s++)gt.push(s);const At=[S("_")].concat(gt);for(let s=S("a");s<=S("z");s++)At.push(s);for(let s=S("A");s<=S("Z");s++)At.push(s);const Os=[S(" "),S("\f"),S(`
|
|
2
2
|
`),S("\r"),S(" "),S("\v"),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S("\u2028"),S("\u2029"),S(" "),S(" "),S(" "),S("\uFEFF")],sa=/[0-9a-fA-F]/,tt=/[0-9]/,na=/[1-9]/;class ia{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Fe(n,"global");break;case"i":Fe(n,"ignoreCase");break;case"m":Fe(n,"multiLine");break;case"u":Fe(n,"unicode");break;case"y":Fe(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}break}}Se(t);const n=this.disjunction();return this.consumeChar(")"),{type:t,value:n,loc:this.loc(e)}}return ta()}quantifier(e=!1){let t;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),t={atLeast:i,atMost:a}):t={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;Se(t);break}if(!(e===!0&&t===void 0)&&Se(t))return this.peekChar(0)==="?"?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(n),t}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Se(e))return e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[S(`
|
|
3
3
|
`),S("\r"),S("\u2028"),S("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=gt;break;case"D":e=gt,t=!0;break;case"s":e=Os;break;case"S":e=Os,t=!0;break;case"w":e=At;break;case"W":e=At,t=!0;break}if(Se(e))return{type:"Set",value:e,complement:t}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=S("\f");break;case"n":e=S(`
|
|
4
4
|
`);break;case"r":e=S("\r");break;case"t":e=S(" ");break;case"v":e=S("\v");break}if(Se(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:S("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:S(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
import{_ as Z}from"./CT36W95j.js";import{b as u,ay as o,aD as I,ah as ee,s as te,t as ne,u as se,aL as L,ad as re,ae as ie,a9 as D,Q as S,af as R,X as ae,W as oe,a4 as ce,aR as le,ba as ue,at as de,bh as fe}from"./DozUkl5C.js";import{G as k}from"./-xK_vQQs.js";function P(e,{edgePathsClass:n="edges edgePaths"}={}){const t=e.insert("g").attr("class","root"),r=t.insert("g").attr("class","clusters"),s=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),c=t.insert("g").attr("class","nodes");return{clusters:r,edgePaths:s,edgeLabels:i,nodes:c,rootGroups:t}}u(P,"createLayoutElementGroups");async function T(e,n,t){if(n.label){const{shapeSvg:r,bbox:s}=await de(e,t===void 0?n:{...n,width:t});n.labelBBox={width:s.width,height:s.height},r.remove()}else n.labelBBox={width:0,height:0}}u(T,"measureGroupLabel");async function _(e,n,t){const r=await ee(e,n,t),s=r.node()?.getBBox()??{width:0,height:0};return n.width=s.width,n.height=s.height,r}u(_,"insertMeasuredNode");function B(e,n,t){let r=e;const s=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||s.has(r.parentId))break;s.add(r.parentId),r=n.get(r.parentId)}return t}u(B,"resolveNodeDir");async function M(e,n,t={}){const r=new k({multigraph:!0,compound:!0}),s=[...n.edges],i=ae(),c=P(e),{edgeLabels:f,nodes:a}=c,g=new Map,m=new Map(n.nodes.map(d=>[d.id,d])),C=n.direction,w=e.node()!=null;await Promise.all(n.nodes.map(async d=>{if(d.isGroup){if(w){const b=t.unwrapGroupLabels&&d.labelType!=="markdown";await T(a,d,b?Number.POSITIVE_INFINITY:void 0)}r.setNode(d.id,{...d})}else{if(w){const b=await _(a,d,{config:i,dir:B(d,m,C)});g.set(d.id,b)}r.setNode(d.id,{...d})}}));for(const d of s)w&&D(d)&&await R(f,d),r.setEdge(d.start,d.end,{...d},d.id),n.edges.some(E=>E.id===d.id)||n.edges.push(d);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:d}=await Z(async()=>{const{captureNodeSizes:b}=await import("./BRPmfbNP.js");return{captureNodeSizes:b}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84]),import.meta.url);d(e,n)}return{graph:r,groups:c,nodeElements:g}}u(M,"createGraphWithElements");var l=new Map,h=new Map,A=new Map,ge=u(()=>{h.clear(),A.clear(),l.clear()},"clear"),v=u((e,n)=>{const t=h.get(n)||[];return o.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),be=u((e,n)=>{const t=h.get(n)||[];return o.info("Descendants of ",n," is ",t),o.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||v(e.v,n)||v(e.w,n)||t.includes(e.w):(o.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),X=u((e,n,t,r)=>{o.debug("Copying children of ",e,"root",r,"data",n.node(e),r);const s=n.children(e)||[];e!==r&&s.push(e),o.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(i=>{if(n.children(i).length>0)X(i,n,t,r);else{const c=n.node(i);o.info("cp ",i," to ",r," with parent ",e),t.setNode(i,c),r!==n.parent(i)&&(o.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(o.debug("Setting parent",i,e),t.setParent(i,e)):(o.info("In copy ",e,"root",r,"data",n.node(e),r),o.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const f=n.edges(i);o.debug("Copying Edges",f),f.forEach(a=>{o.info("Edge",a);const g=n.edge(a.v,a.w,a.name);o.info("Edge data",g,r);try{be(a,r)?(o.info("Copying as ",a.v,a.w,g,a.name),t.setEdge(a.v,a.w,g,a.name),o.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):o.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",r," clusterId:",e)}catch(m){o.error(m)}})}o.debug("Removing node",i),n.removeNode(i)})},"copy"),G=u((e,n)=>{const t=n.children(e);let r=[...t];for(const s of t)A.set(s,e),r=[...r,...G(s,n)];return r},"extractDescendants"),he=u((e,n,t)=>{const r=e.edges().filter(a=>a.v===n||a.w===n),s=e.edges().filter(a=>a.v===t||a.w===t),i=r.map(a=>({v:a.v===n?t:a.v,w:a.w===n?n:a.w})),c=s.map(a=>({v:a.v,w:a.w}));return i.filter(a=>c.some(g=>a.v===g.v&&a.w===g.w))},"findCommonEdges"),p=u((e,n,t)=>{const r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return e;let s;for(const i of r){const c=p(i,n,t),f=he(n,t,c);if(c)if(f.length>0)s=c;else return c}return s},"findNonClusterChild"),x=u(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,"getAnchorId"),Ne=u((e,n)=>{if(!e||n>10){o.debug("Opting out, no graph ");return}else o.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(o.debug("Cluster identified",t," Replacement id in edges: ",p(t,e,t)),h.set(t,G(t,e)),l.set(t,{id:p(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),s=e.edges();r.length>0?(o.debug("Cluster identified",t,h),s.forEach(i=>{const c=v(i.v,t),f=v(i.w,t);c^f&&(o.debug("Edge: ",i," leaves cluster ",t),o.debug("Descendants of XXX ",t,": ",h.get(t)),l.get(t).externalConnections=!0)})):o.debug("Not a cluster ",t,h)});for(let t of l.keys()){const r=l.get(t).id,s=e.parent(r);s!==t&&l.has(s)&&!l.get(s).externalConnections&&(l.get(t).id=s);const i=e.edges().some(c=>c.v===t);if(r&&l.get(t)?.externalConnections&&i&&$(e,r,t)){const c=me(e,t,e.parent(r));c&&(l.get(t).id=c)}}e.edges().forEach(function(t){const r=e.edge(t);o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let s=t.v,i=t.w;if(o.debug("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(o.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),s=x(t.v),i=x(t.w),e.removeEdge(t.v,t.w,t.name),s!==t.v){const c=e.parent(s);l.get(c).externalConnections=!0,r.fromCluster=t.v}if(i!==t.w){const c=e.parent(i);l.get(c).externalConnections=!0,r.toCluster=t.w}o.debug("Fix Replacing with XXX",s,i,t.name),e.setEdge(s,i,r,t.name)}}),O(e,0),o.trace(l)},"adjustClustersAndEdges"),O=u((e,n)=>{if(n>10){o.error("Bailing out");return}let t=e.nodes(),r=!1;for(const s of t){const i=e.children(s);r=r||i.length>0}if(!r){o.debug("Done, no node has children",e.nodes());return}o.debug("Nodes = ",t,n);for(const s of t)if(o.debug("Extracting node",s,l,l.has(s)&&!l.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",n),!l.has(s))o.debug("Not a cluster",s,n);else if(!l.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){o.debug("Cluster without external connections, without a parent and with children",s,n);let c=e.graph().rankdir==="TB"?"LR":"TB";l.get(s)?.clusterData?.dir&&(c=l.get(s).clusterData.dir,o.debug("Fixing dir",l.get(s).clusterData.dir,c));const f=new k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});X(s,e,f,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:l.get(s).clusterData,label:l.get(s).label,graph:f})}else o.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!l.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),n),o.debug(l);t=e.nodes(),o.debug("New list of nodes",t);for(const s of t){const i=e.node(s);o.debug(" Now next level",s,i),i?.clusterNode&&O(i.graph,n+1)}},"extractor"),F=u((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(r=>{const s=e.children(r),i=F(e,s);t=[...t,...i]}),t},"sorter"),ye=u(e=>F(e,e.children()),"sortNodesByHierarchy"),$=u((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const s=l.get(r);if(s&&!s.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),me=u((e,n,t)=>{const r=e.children(n)??[];for(const s of r){if(s===t||v(s,t))continue;const i=p(s,e,n);if(i&&!$(e,i,n))return i}return null},"findSafeAnchorNode");function we({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:r,afterPaint:s,paintOptions:i}){const c=n??z;return u(async function(a,g,m,C){const w=g.select("g");(m?.insertMarkers??I)(w,a.markers,a.type,a.diagramId),j();const d={element:w,helpers:m,options:C};d.preparedLayout=await e?.(a,d);const b=await c(a,d),E=await t(a,d),N={...d,measure:b};r?await r(a,N,E):await H(a,N,i),await s?.(a,N,E)},"render")}u(we,"createCommonLayoutRenderer");function j(){te(),ne(),se(),ge()}u(j,"clearLayoutRenderState");async function z(e,{element:n},t){return await M(n,e,t)}u(z,"defaultMeasureLayout");async function H(e,n,t={}){const{measure:r}=n,{groups:s}=r;for(const c of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(c,n)||await W(s,c,n,t);const i=V(e.nodes);for(const c of e.edges)Q(c,t)||await Y(s,c,i,e,t,n)}u(H,"paintLayoutData");async function W(e,n,t,r){n.clusterNode?L(n):J(n,t,r)?await re(e.clusters,n):L(n)}u(W,"paintLayoutNode");function J(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}u(J,"shouldPaintAsCluster");function V(e){const n=new Map;for(const t of e)t?.id&&n.set(t.id,t);return n}u(V,"buildNodeLookup");function Q(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}u(Q,"shouldSkipPaintEdge");async function Y(e,n,t,r,s,i){const c=ie(e.edgePaths,{...n},s.clusterDb??new Map,r.type,y(n.start,n,t,i,s),y(n.end,n,t,i,s),r.diagramId,q(n,s),r.layoutAlgorithm);D(n)&&(S.has(n.id)||await R(e.edgeLabels,n),K(n,c))}u(Y,"paintLayoutEdge");function y(e,n,t,r,s){return s.getEdgeNode?.(e,n,r)??(e?t.get(e)??{}:{})}u(y,"getRenderedNode");function q(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}u(q,"shouldSkipIntersect");function K(e,n){const t=n?.updatedPath??n?.originalPath,r=oe(),{subGraphTitleTotalMargin:s}=ce({flowchart:r.flowchart??{}});if(e.label){const i=S.get(e.id),{x:c,y:f}=le(e,n);i.attr("transform",`translate(${c}, ${f+s/2})`)}for(const[i,c]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(c){const{x:f,y:a}=U(e,i,t);ue.get(e.id)[i].attr("transform",`translate(${f}, ${a})`)}}u(K,"positionRenderedEdgeLabel");var ve={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function U(e,n,t){const r=e.terminalLabelCenters?.[n];if(r)return{...r};if(!t)return{x:e.x,y:e.y};const s=n.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return fe.calcTerminalLabelPosition(s?10:0,ve[n],t)}u(U,"terminalLabelTranslate");export{Ne as a,we as b,l as c,P as d,z as e,p as f,_ as i,ye as s};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BMbB6G4j.js","/app/immutable/chunks/CN_zBCnB.js","/app/immutable/chunks/CT36W95j.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BaJNSnZt.js","/app/immutable/chunks/DpNO08YA.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BmagX6n5.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BgUSjvxc.js","/app/immutable/chunks/DHClt9az.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/ggQuSgBM.js","/app/immutable/chunks/D_rHnmLE.js","/app/immutable/chunks/CgQUkF-P.js","/app/immutable/chunks/Cn5kmzaj.js","/app/immutable/chunks/TRV263rQ.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/Bw5h0b4B.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/ClQp3PSY.js","/app/immutable/chunks/DMJ_kXWl.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BFllbeCZ.js","/app/immutable/chunks/D-IkFfCX.js","/app/immutable/chunks/BzJ6PuN9.js","/app/immutable/chunks/B7lF313M.js","/app/immutable/chunks/D9xzAHI_.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/xKssrPyL.js","/app/immutable/chunks/CJyP11U5.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/DJ8_lZZl.js","/app/immutable/chunks/D_Kq1QRo.js","/app/immutable/chunks/CmG1GbmA.js","/app/immutable/chunks/C20jcbNk.js","/app/immutable/chunks/D4bOZmAv.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/CLd6HNgr.js","/app/immutable/chunks/CVc3afbh.js","/app/immutable/chunks/BDDVFcm3.js","/app/immutable/chunks/UG14BPPT.js","/app/immutable/chunks/MpnM4XaB.js","/app/immutable/chunks/BdyAQuf8.js","/app/immutable/chunks/D9BiEPlJ.js","/app/immutable/chunks/Du0V4O1Q.js","/app/immutable/chunks/C_p41hnk.js","/app/immutable/chunks/BwYW1dkK.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/DBigkuTi.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/BsieX9dN.js","/app/immutable/assets/observe-overflow.CbDLK6fN.css","/app/immutable/chunks/B5G4SPkG.js","/app/immutable/chunks/DJkyIBda.js","/app/immutable/chunks/_639dNbm.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/BeP4UORy.js","/app/immutable/chunks/CUyvQglq.js","/app/immutable/assets/SettingsPage.D8u26cHZ.css","/app/immutable/chunks/DR-BIfRu.js","/app/immutable/chunks/CHJZj-fd.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/BhIO_xHl.js","/app/immutable/chunks/snmn_u5-.js","/app/immutable/chunks/D3F3BWsi.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/EuCKSXHB.js","/app/immutable/assets/directory-picker-service.CzNEA6Ot.css","/app/immutable/chunks/8j0kVkRN.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/lkH5RFQO.js","/app/immutable/chunks/lbBEThX6.js","/app/immutable/assets/AttachmentPreview.BCSCCZGm.css","/app/immutable/chunks/BGAqL5Hu.js","/app/immutable/chunks/BTUvce_V.js","/app/immutable/chunks/vw8GizVl.js","/app/immutable/assets/accessibility.CP-rioAF.css","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as Z}from"./CT36W95j.js";import{b as u,ay as o,aD as I,ah as ee,s as te,t as ne,u as se,aL as L,ad as re,ae as ie,a9 as D,Q as S,af as R,X as ae,W as oe,a4 as ce,aR as le,ba as ue,at as de,bh as fe}from"./CN_zBCnB.js";import{G as k}from"./-xK_vQQs.js";function P(e,{edgePathsClass:n="edges edgePaths"}={}){const t=e.insert("g").attr("class","root"),r=t.insert("g").attr("class","clusters"),s=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),c=t.insert("g").attr("class","nodes");return{clusters:r,edgePaths:s,edgeLabels:i,nodes:c,rootGroups:t}}u(P,"createLayoutElementGroups");async function T(e,n,t){if(n.label){const{shapeSvg:r,bbox:s}=await de(e,t===void 0?n:{...n,width:t});n.labelBBox={width:s.width,height:s.height},r.remove()}else n.labelBBox={width:0,height:0}}u(T,"measureGroupLabel");async function _(e,n,t){const r=await ee(e,n,t),s=r.node()?.getBBox()??{width:0,height:0};return n.width=s.width,n.height=s.height,r}u(_,"insertMeasuredNode");function B(e,n,t){let r=e;const s=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||s.has(r.parentId))break;s.add(r.parentId),r=n.get(r.parentId)}return t}u(B,"resolveNodeDir");async function M(e,n,t={}){const r=new k({multigraph:!0,compound:!0}),s=[...n.edges],i=ae(),c=P(e),{edgeLabels:f,nodes:a}=c,g=new Map,m=new Map(n.nodes.map(d=>[d.id,d])),C=n.direction,w=e.node()!=null;await Promise.all(n.nodes.map(async d=>{if(d.isGroup){if(w){const b=t.unwrapGroupLabels&&d.labelType!=="markdown";await T(a,d,b?Number.POSITIVE_INFINITY:void 0)}r.setNode(d.id,{...d})}else{if(w){const b=await _(a,d,{config:i,dir:B(d,m,C)});g.set(d.id,b)}r.setNode(d.id,{...d})}}));for(const d of s)w&&D(d)&&await R(f,d),r.setEdge(d.start,d.end,{...d},d.id),n.edges.some(E=>E.id===d.id)||n.edges.push(d);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:d}=await Z(async()=>{const{captureNodeSizes:b}=await import("./BMbB6G4j.js");return{captureNodeSizes:b}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84]),import.meta.url);d(e,n)}return{graph:r,groups:c,nodeElements:g}}u(M,"createGraphWithElements");var l=new Map,h=new Map,A=new Map,ge=u(()=>{h.clear(),A.clear(),l.clear()},"clear"),v=u((e,n)=>{const t=h.get(n)||[];return o.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),be=u((e,n)=>{const t=h.get(n)||[];return o.info("Descendants of ",n," is ",t),o.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||v(e.v,n)||v(e.w,n)||t.includes(e.w):(o.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),X=u((e,n,t,r)=>{o.debug("Copying children of ",e,"root",r,"data",n.node(e),r);const s=n.children(e)||[];e!==r&&s.push(e),o.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(i=>{if(n.children(i).length>0)X(i,n,t,r);else{const c=n.node(i);o.info("cp ",i," to ",r," with parent ",e),t.setNode(i,c),r!==n.parent(i)&&(o.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(o.debug("Setting parent",i,e),t.setParent(i,e)):(o.info("In copy ",e,"root",r,"data",n.node(e),r),o.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const f=n.edges(i);o.debug("Copying Edges",f),f.forEach(a=>{o.info("Edge",a);const g=n.edge(a.v,a.w,a.name);o.info("Edge data",g,r);try{be(a,r)?(o.info("Copying as ",a.v,a.w,g,a.name),t.setEdge(a.v,a.w,g,a.name),o.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):o.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",r," clusterId:",e)}catch(m){o.error(m)}})}o.debug("Removing node",i),n.removeNode(i)})},"copy"),G=u((e,n)=>{const t=n.children(e);let r=[...t];for(const s of t)A.set(s,e),r=[...r,...G(s,n)];return r},"extractDescendants"),he=u((e,n,t)=>{const r=e.edges().filter(a=>a.v===n||a.w===n),s=e.edges().filter(a=>a.v===t||a.w===t),i=r.map(a=>({v:a.v===n?t:a.v,w:a.w===n?n:a.w})),c=s.map(a=>({v:a.v,w:a.w}));return i.filter(a=>c.some(g=>a.v===g.v&&a.w===g.w))},"findCommonEdges"),p=u((e,n,t)=>{const r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return e;let s;for(const i of r){const c=p(i,n,t),f=he(n,t,c);if(c)if(f.length>0)s=c;else return c}return s},"findNonClusterChild"),x=u(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,"getAnchorId"),Ne=u((e,n)=>{if(!e||n>10){o.debug("Opting out, no graph ");return}else o.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(o.debug("Cluster identified",t," Replacement id in edges: ",p(t,e,t)),h.set(t,G(t,e)),l.set(t,{id:p(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),s=e.edges();r.length>0?(o.debug("Cluster identified",t,h),s.forEach(i=>{const c=v(i.v,t),f=v(i.w,t);c^f&&(o.debug("Edge: ",i," leaves cluster ",t),o.debug("Descendants of XXX ",t,": ",h.get(t)),l.get(t).externalConnections=!0)})):o.debug("Not a cluster ",t,h)});for(let t of l.keys()){const r=l.get(t).id,s=e.parent(r);s!==t&&l.has(s)&&!l.get(s).externalConnections&&(l.get(t).id=s);const i=e.edges().some(c=>c.v===t);if(r&&l.get(t)?.externalConnections&&i&&$(e,r,t)){const c=me(e,t,e.parent(r));c&&(l.get(t).id=c)}}e.edges().forEach(function(t){const r=e.edge(t);o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let s=t.v,i=t.w;if(o.debug("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(o.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),s=x(t.v),i=x(t.w),e.removeEdge(t.v,t.w,t.name),s!==t.v){const c=e.parent(s);l.get(c).externalConnections=!0,r.fromCluster=t.v}if(i!==t.w){const c=e.parent(i);l.get(c).externalConnections=!0,r.toCluster=t.w}o.debug("Fix Replacing with XXX",s,i,t.name),e.setEdge(s,i,r,t.name)}}),O(e,0),o.trace(l)},"adjustClustersAndEdges"),O=u((e,n)=>{if(n>10){o.error("Bailing out");return}let t=e.nodes(),r=!1;for(const s of t){const i=e.children(s);r=r||i.length>0}if(!r){o.debug("Done, no node has children",e.nodes());return}o.debug("Nodes = ",t,n);for(const s of t)if(o.debug("Extracting node",s,l,l.has(s)&&!l.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",n),!l.has(s))o.debug("Not a cluster",s,n);else if(!l.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){o.debug("Cluster without external connections, without a parent and with children",s,n);let c=e.graph().rankdir==="TB"?"LR":"TB";l.get(s)?.clusterData?.dir&&(c=l.get(s).clusterData.dir,o.debug("Fixing dir",l.get(s).clusterData.dir,c));const f=new k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});X(s,e,f,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:l.get(s).clusterData,label:l.get(s).label,graph:f})}else o.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!l.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),n),o.debug(l);t=e.nodes(),o.debug("New list of nodes",t);for(const s of t){const i=e.node(s);o.debug(" Now next level",s,i),i?.clusterNode&&O(i.graph,n+1)}},"extractor"),F=u((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(r=>{const s=e.children(r),i=F(e,s);t=[...t,...i]}),t},"sorter"),ye=u(e=>F(e,e.children()),"sortNodesByHierarchy"),$=u((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const s=l.get(r);if(s&&!s.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),me=u((e,n,t)=>{const r=e.children(n)??[];for(const s of r){if(s===t||v(s,t))continue;const i=p(s,e,n);if(i&&!$(e,i,n))return i}return null},"findSafeAnchorNode");function we({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:r,afterPaint:s,paintOptions:i}){const c=n??z;return u(async function(a,g,m,C){const w=g.select("g");(m?.insertMarkers??I)(w,a.markers,a.type,a.diagramId),j();const d={element:w,helpers:m,options:C};d.preparedLayout=await e?.(a,d);const b=await c(a,d),E=await t(a,d),N={...d,measure:b};r?await r(a,N,E):await H(a,N,i),await s?.(a,N,E)},"render")}u(we,"createCommonLayoutRenderer");function j(){te(),ne(),se(),ge()}u(j,"clearLayoutRenderState");async function z(e,{element:n},t){return await M(n,e,t)}u(z,"defaultMeasureLayout");async function H(e,n,t={}){const{measure:r}=n,{groups:s}=r;for(const c of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(c,n)||await W(s,c,n,t);const i=V(e.nodes);for(const c of e.edges)Q(c,t)||await Y(s,c,i,e,t,n)}u(H,"paintLayoutData");async function W(e,n,t,r){n.clusterNode?L(n):J(n,t,r)?await re(e.clusters,n):L(n)}u(W,"paintLayoutNode");function J(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}u(J,"shouldPaintAsCluster");function V(e){const n=new Map;for(const t of e)t?.id&&n.set(t.id,t);return n}u(V,"buildNodeLookup");function Q(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}u(Q,"shouldSkipPaintEdge");async function Y(e,n,t,r,s,i){const c=ie(e.edgePaths,{...n},s.clusterDb??new Map,r.type,y(n.start,n,t,i,s),y(n.end,n,t,i,s),r.diagramId,q(n,s),r.layoutAlgorithm);D(n)&&(S.has(n.id)||await R(e.edgeLabels,n),K(n,c))}u(Y,"paintLayoutEdge");function y(e,n,t,r,s){return s.getEdgeNode?.(e,n,r)??(e?t.get(e)??{}:{})}u(y,"getRenderedNode");function q(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}u(q,"shouldSkipIntersect");function K(e,n){const t=n?.updatedPath??n?.originalPath,r=oe(),{subGraphTitleTotalMargin:s}=ce({flowchart:r.flowchart??{}});if(e.label){const i=S.get(e.id),{x:c,y:f}=le(e,n);i.attr("transform",`translate(${c}, ${f+s/2})`)}for(const[i,c]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(c){const{x:f,y:a}=U(e,i,t);ue.get(e.id)[i].attr("transform",`translate(${f}, ${a})`)}}u(K,"positionRenderedEdgeLabel");var ve={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function U(e,n,t){const r=e.terminalLabelCenters?.[n];if(r)return{...r};if(!t)return{x:e.x,y:e.y};const s=n.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return fe.calcTerminalLabelPosition(s?10:0,ve[n],t)}u(U,"terminalLabelTranslate");export{Ne as a,we as b,l as c,P as d,z as e,p as f,_ as i,ye as s};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as e,ay as s,aX as o,B as i}from"./
|
|
1
|
+
import{b as e,ay as s,aX as o,B as i}from"./CN_zBCnB.js";import{p as g}from"./Dgv1nn7D.js";var p={parse:e(async r=>{const a=await g("info",r);s.debug(a)},"parse")},v={version:"12.3.0"},d=e(()=>v.version,"getVersion"),m={getVersion:d},c=e((r,a,n)=>{s.debug(`rendering info diagram
|
|
2
2
|
`+r);const t=o(a);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),f={draw:c},b={parser:p,db:m,renderer:f};export{b as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as M}from"./BvFAWM27.js";import{a as v}from"./BdWqymET.js";import{d as C}from"./CVc3afbh.js";import{Iv as o,Dq as E,CU as _,i as A,uK as O,uk as D,fX as H,Ca as L,Cs as P,Eq as R,Ce as q}from"./BmagX6n5.js";import{aZ as p}from"./DpNO08YA.js";import{d as x}from"./B0Z-1lwJ.js";import{n as B}from"./
|
|
1
|
+
import{C as M}from"./BvFAWM27.js";import{a as v}from"./BdWqymET.js";import{d as C}from"./CVc3afbh.js";import{Iv as o,Dq as E,CU as _,i as A,uK as O,uk as D,fX as H,Ca as L,Cs as P,Eq as R,Ce as q}from"./BmagX6n5.js";import{aZ as p}from"./DpNO08YA.js";import{d as x}from"./B0Z-1lwJ.js";import{n as B}from"./CLd6HNgr.js";import{o as F,e as W}from"./EuCKSXHB.js";const u=new v("OpenMessage"),S=150,y=15e3,N=2,G=[150,400,800,1500,3e3],K=M;let g;function k(e){return new Promise(t=>setTimeout(t,e))}function m(e,t){const s=o.state,n=s.agentSessions?.byAgentId[e]?.messages,a=s.agentSessions?.historySegmentsByAgentId?.[e]?.messages;return!!(n?.some(r=>r.id===t)||a?.some(r=>r.id===t))}function T(e,t){const s=o.state,n=s.agentSessions?.historySegmentsByAgentId?.[e];n?.detachedFromTail!==!0||n.messages.some(r=>r.id===t)||!s.agentSessions?.byAgentId[e]?.messages?.some(r=>r.id===t)||o.dispatch(H(e))}function Y(e){return o.state.chatState?.byAgentId[e]?.transcriptHydration}async function I(e,t,s){const n=Date.now()+y;let a=0;for(;Date.now()<n;){if(s.aborted)return!1;if(m(e,t))return!0;if(a>=N&&Y(e)==="settled"&&!p.select(o.state,e).initialHistoryPending)return!1;a++,await k(S)}return!s.aborted&&m(e,t)}async function U(e,t,s,n){const a=Date.now()+y;for(;p.select(o.state,e).initialHistoryPending;){if(n?.aborted||Date.now()>=a)return!1;await k(S)}const r=o.state.agentSessions?.byAgentId[e];if(!r||n?.aborted)return!1;if(m(e,t))return T(e,t),!0;s??=r.workspaceId;const l=p.select(o.state,e);let c={nextToken:l.scrollbackOlderToken,prevToken:l.scrollbackGapToken,olderAnchorId:l.scrollbackOlderTokenAnchorId};o.dispatch(L(e,"seek"));const d=p.select(o.state,e).scrollbackDiscardEpoch,f=()=>!!o.state.agentSessions?.byAgentId[e]&&p.select(o.state,e).scrollbackDiscardEpoch===d;try{const i=await C.agents.getConversation(e,K,void 0,t,void 0,s);return n?.aborted||!f()||!i.messages.some(h=>h.id===t)?!1:(o.dispatch(P(e,i.messages,i.messages[0]?.seq)),i.nextToken===null&&o.dispatch(R(e)),c={nextToken:i.nextToken,prevToken:i.prevToken,olderAnchorId:i.messages[0]?.id??null},m(e,t))}catch(i){return u.warn("[seekConversationToMessage] Seek fetch failed (message may no longer exist)",{agentId:e,messageId:t,error:i}),!1}finally{f()&&o.dispatch(q(e,c))}}async function ee(e){if(e.signal?.aborted)return;g?.abort(),g=new AbortController;const t=e.signal?AbortSignal.any([g.signal,e.signal]):g.signal,{workspaceId:s,agentId:n,messageId:a,query:r,targetTabId:l}=e;u.info("[openMessage] Deep-opening conversation at message",{workspaceId:s,agentId:n,messageId:a});const c=s===A;c&&!e.contentAlreadyOpen&&(o.dispatch(E(n)),o.dispatch(_(A,n)),o.dispatch(O("chief")));const d=c?"/":W(s);if(!e.contentAlreadyOpen&&typeof window<"u"&&window.location.pathname!==d){try{c?await B(d):await F(s)}catch(w){u.warn("[openMessage] Workspace navigation failed",{workspaceId:s,error:w});return}if(t.aborted)return;if(window.location.pathname!==d){u.warn("[openMessage] Workspace navigation was not confirmed",{workspaceId:s});return}}!e.contentAlreadyOpen&&!c&&o.dispatch(D(s,{agentId:n}));const f=await I(n,a,t);f&&T(n,a);const i=f||await U(n,a,s,t);if(t.aborted)return;if(!i){u.warn("[openMessage] Message not found; conversation opened at tail",{agentId:n,messageId:a});return}const h=`open-message-${Date.now()}-${Math.random().toString(36).slice(2)}`,b={agentId:n,messageId:a,query:r,targetTabId:l,requestId:h,signal:t};for(const w of G)setTimeout(()=>{t.aborted||x("chat:open-message",b)},w)}export{ee as openMessage,U as seekConversationToMessage};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as xt}from"./
|
|
1
|
+
import{p as xt}from"./yIt8dECo.js";import{aZ as gt,U as $t,Y as bt,b0 as wt,V as Ct,a_ as vt,b as s,ay as O,aX as Dt,B as kt,r as Tt,q as U,W as Z,O as At,a6 as ot}from"./CN_zBCnB.js";import{p as Bt}from"./Dgv1nn7D.js";var rt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),H=rt(),St=s(()=>H.domains,"getDomains"),Mt=s(()=>H.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(O.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...At.cynefin,...Z().cynefin}),"getConfig"),Pt=s(()=>{Tt(),H=rt()},"clear"),G={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},Wt=s(t=>{xt(t,G),G.setDomains(t.domains),G.setTransitions(t.transitions)},"populate"),It={parse:s(async t=>{const e=await Bt("cynefin",t);O.debug(e),Wt(e)},"parse")};function E(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(E,"seededRandom");function st(t){let e=0;for(let n=0;n<t.length;n++){const a=t.charCodeAt(n);e=(e<<5)-e+a,e|=0}return e}s(st,"hashString");function it(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:st(e)}s(it,"resolveSeed");function ct(t,e,n,a){const c=t/2,m=a??t*.015,v=7,I=e/v,d=[];for(let o=0;o<=v;o++){const p=E(n+o*17)*m*2-m;d.push({x:c+p,y:o*I})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.y+i.y)/2,b=o%2===0?1:-1,h=m*1.5*b*E(n+o*31+7),R=p.x+h,V=f,_=i.x-h;D+=` C${R},${V} ${_},${f} ${i.x},${i.y}`}return D}s(ct,"generateFoldPath");function lt(t,e,n,a){const c=e/2,m=a??e*.015,v=7,I=t/v,d=[];for(let o=0;o<=v;o++){const p=E(n+o*23)*m*2-m;d.push({x:o*I,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.x+i.x)/2,b=o%2===0?1:-1,h=m*1.5*b*E(n+o*37+11),R=f,V=p.y+h,_=f,z=i.y-h;D+=` C${R},${V} ${_},${z} ${i.x},${i.y}`}return D}s(lt,"generateHorizontalBoundary");function dt(t,e){const n=t/2,a=e*.5,c=e,m=t*.03;return[`M${n},${a}`,`C${n+m},${a+(c-a)*.2}`,`${n-m*1.5},${a+(c-a)*.55}`,`${n+m*.5},${a+(c-a)*.75}`,`C${n-m},${a+(c-a)*.85}`,`${n+m*.3},${a+(c-a)*.95}`,`${n},${c}`].join(" ")}s(dt,"generateCliffPath");function ft(t,e,n,a){return[`M${t-n},${e}`,`A${n},${a} 0 1,1 ${t+n},${e}`,`A${n},${a} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}s(ft,"generateConfusionPath");var at={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Rt=s((t,e)=>{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),Vt=s(()=>{const t=ot(),e=Z();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,_t=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),I=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=Vt();O.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,R=o.boundaryAmplitude,V=i+b*2,_=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,_,V,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${V} ${_}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const T=k.append("g").attr("transform",`translate(${b}, ${b})`),F=Rt(i,f),Q=it(o.seed,e),mt=T.append("g").attr("class","cynefin-backgrounds"),X=["complex","complicated","chaotic","clear"];for(const l of X){const r=F[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=T.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Q,R)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Q+100,R)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=T.append("g").attr("class","cynefin-labels");for(const l of X){const r=F[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=T.append("g").attr("class","cynefin-subtitles");for(const r of X){const u=F[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=T.append("g").attr("class","cynefin-items"),A=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=F[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(A+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const Y=x.getBBox();Y.width>0&&($=Y.width)}const C=$+tt*2,W=u.cx-C/2;M.attr("transform",`translate(${W}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",A/2)}),N>0){const g=B+L.length*(A+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const W=$.getBBox();W.width>0&&(P=W.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",A/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=T.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=F[y.from],N=F[y.to];if(!L||!N)return;if(y.from===y.to){O.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),W=C*.15,Y=-x/C,ht=$/C,et=M+Y*W,nt=P+ht*W;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}I&&T.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(I)},"draw"),Ft={draw:_t},Et=s(()=>{const t=ot(),e=Z();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=s(()=>{const t=Et();return`
|
|
2
2
|
.cynefinDomain {
|
|
3
3
|
stroke: none;
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as ht,bq as _,bo as g,by as bt,b as xt}from"./CT36W95j.js";import{bs as yt,a7 as kt,ay as Q,W as p,bn as At,aA as h,a5 as F,bS as u,bl as S,bA as W,aD as e,b_ as D,bO as x,aB as k,bH as et,c9 as y,bV as at,be as wt,b$ as It}from"./DYhIMPy1.js";import{i as f}from"./Cn5kmzaj.js";import{I as Bt,g as Ct}from"./Bw5h0b4B.js";import{I as Pt,D as zt}from"./D-IkFfCX.js";import{f as M}from"./D9xzAHI_.js";import"./ClQp3PSY.js";import"./TRV263rQ.js";import"./DHClt9az.js";import{F as rt,c9 as Rt,cl as St,aq as Wt}from"./D_rHnmLE.js";import{e as Dt}from"./
|
|
1
|
+
import{t as ht,bq as _,bo as g,by as bt,b as xt}from"./CT36W95j.js";import{bs as yt,a7 as kt,ay as Q,W as p,bn as At,aA as h,a5 as F,bS as u,bl as S,bA as W,aD as e,b_ as D,bO as x,aB as k,bH as et,c9 as y,bV as at,be as wt,b$ as It}from"./DYhIMPy1.js";import{i as f}from"./Cn5kmzaj.js";import{I as Bt,g as Ct}from"./Bw5h0b4B.js";import{I as Pt,D as zt}from"./D-IkFfCX.js";import{f as M}from"./D9xzAHI_.js";import"./ClQp3PSY.js";import"./TRV263rQ.js";import"./DHClt9az.js";import{F as rt,c9 as Rt,cl as St,aq as Wt}from"./D_rHnmLE.js";import{e as Dt}from"./UG14BPPT.js";import{D as Lt}from"./yNVrzlY4.js";import{Iv as $t,uk as qt}from"./BmagX6n5.js";import{g as Ht}from"./-1WDZF8N.js";var Nt=k('<span class="type-caption shrink-0 font-medium text-success"> </span>'),Ft=k('<!> <span class="type-body flex-1 truncate text-left font-medium text-foreground"> </span> <span class="type-caption shrink-0 tabular-nums"><span class="text-success"> </span> <span class="ml-1 text-danger"> </span></span> <!>',1),Mt=k("<!> ",1),Ot=k('<div class="mb-2 flex gap-1"></div>'),Vt=k('<div class="border-t border-border p-2"><!> <!></div>'),jt=k('<div class="ws-block-widget type-body my-2 overflow-hidden rounded-md border border-border bg-card text-foreground shadow-(--elevation-raised)"><div class="flex min-h-9 items-center gap-2 px-3 py-1.5"><!> <!> <!></div> <!></div>'),Et=k('<div class="ws-block-widget type-caption my-2 text-muted-foreground"> </div>');function Tt(U,n){if(new.target)return ht({component:Tt,...U});yt(n,!0);let A=_(n,"patches",7),O=_(n,"label",23,()=>g.ui_patchBlock_label()),V=_(n,"lastApply",7),w=_(n,"linkedAgentId",7),L=_(n,"workspaceId",7),P=_(n,"applying",7,!1),$=_(n,"onApply",7),q=_(n,"onRevert",7),j=at(!1),E=at(0),z=y(()=>A()?.[e(E)]),T=y(()=>V()?.status==="success");function st(t){const o=t.split(`
|
|
2
2
|
`);let v=0,b=0;for(const I of o)I.startsWith("+")&&!I.startsWith("+++")?v++:I.startsWith("-")&&!I.startsWith("---")&&b++;return{addCount:v,removeCount:b}}let X=y(()=>e(z)?st(e(z).diff):{addCount:0,removeCount:0}),G=y(()=>P()?{label:g.ui_patchBlock_applying_label(),icon:null}:e(T)?{label:g.ui_patchBlock_revert_label(),icon:St}:{label:g.ui_patchBlock_apply_label(),icon:Wt}),nt=y(()=>!!($()||q()));function ot(){et(j,!e(j))}function lt(){e(T)?q()?.():$()?.()}var it={get patches(){return A()},set patches(t){A(t),h()},get label(){return O()},set label(t=g.ui_patchBlock_label()){O(t),h()},get lastApply(){return V()},set lastApply(t){V(t),h()},get linkedAgentId(){return w()},set linkedAgentId(t){w(t),h()},get workspaceId(){return L()},set workspaceId(t){L(t),h()},get applying(){return P()},set applying(t=!1){P(t),h()},get onApply(){return $()},set onApply(t){$(t),h()},get onRevert(){return q()},set onRevert(t){q(t),h()},$set:bt,$on:(t,o)=>xt(n,t,o)},Y=kt(),ct=Q(Y);{var dt=t=>{var o=jt(),v=F(o),b=F(v);{var I=a=>{{let c=y(()=>g.ui_patchBlock_viewAgent_tooltip());M(a,{variant:"plain",size:"icon-compact",iconOnly:!0,class:"size-4! shrink-0 rounded-sm! transition-opacity hover:opacity-80",onclick:l=>{L()&&$t.dispatch(qt(L(),{agentId:w(),...Ht(l)}))},get title(){return e(c)},children:(l,m)=>{Dt(l,{get agentId(){return w()},variant:"compact"})},$$slots:{default:!0}})}};f(b,a=>{w()&&a(I)})}var Z=u(b,2);M(Z,{variant:"plain",size:"compact",class:"h-auto! min-w-0 flex-1 shrink items-center justify-start gap-2 px-0! py-0! text-muted-foreground transition-colors hover:text-foreground",truncateLabel:!1,labelClass:"flex min-w-0 flex-1 items-center gap-2",onclick:ot,children:(a,c)=>{var l=Ft(),m=Q(l);{var B=i=>{rt(i,{get icon(){return Rt},size:10,class:"text-muted-foreground"})};f(m,i=>{w()||i(B)})}var C=u(m,2),s=S(C,!0),d=u(C,2),r=F(d),R=S(r),H=u(r,2),J=S(H);W(d);var K=u(d,2);{var tt=i=>{var N=Nt(),_t=S(N,!0);D(gt=>x(_t,gt),[()=>g.ui_patchBlock_applied_label()]),p(i,N)};f(K,i=>{e(T)&&i(tt)})}D(()=>{x(s,O()),x(R,`+${e(X).addCount??""}`),x(J,`-${e(X).removeCount??""}`)}),p(a,l)},$$slots:{default:!0}});var ut=u(Z,2);{var ft=a=>{M(a,{variant:"ghost-light",size:"sm",class:"type-caption shrink-0",onclick:lt,get disabled(){return P()},children:(c,l)=>{var m=Mt(),B=Q(m);{var C=r=>{Bt(r,{size:12})},s=r=>{rt(r,{get icon(){return e(G).icon},size:"xs"})};f(B,r=>{P()?r(C):e(G).icon&&r(s,1)})}var d=u(B);D(()=>x(d,` ${e(G).label??""}`)),p(c,m)},$$slots:{default:!0}})};f(ut,a=>{e(nt)&&a(ft)})}W(v);var vt=u(v,2);{var mt=a=>{var c=Vt(),l=F(c);{var m=s=>{var d=Ot();Ct(d,23,A,(r,R)=>`patch-${R}-${r.filePath}`,(r,R,H)=>{{let J=y(()=>e(H)===e(E)?"default":"ghost-light");M(r,{get variant(){return e(J)},size:"sm",class:"type-caption",onclick:()=>et(E,e(H),!0),children:(K,tt)=>{wt();var i=It();D(N=>x(i,N),[()=>e(R).filePath.split("/").pop()]),p(K,i)},$$slots:{default:!0}})}}),W(d),p(s,d)};f(l,s=>{A().length>1&&s(m)})}var B=u(l,2);{var C=s=>{Lt(s,{get patch(){return e(z).diff},get fileName(){return e(z).filePath},showHeader:!0,showStats:!0,showLineNumbers:!0,maxHeight:"300px",collapsible:!1,class:"overflow-hidden rounded-sm border border-border"})};f(B,s=>{e(z)&&s(C)})}W(c),Pt(3,c,()=>zt,()=>({tier:"moderate"})),p(a,c)};f(vt,a=>{e(j)&&a(mt)})}W(o),p(t,o)},pt=t=>{var o=Et(),v=S(o,!0);D(b=>x(v,b),[()=>g.ui_patchBlock_invalid_error()]),p(t,o)};f(ct,t=>{A()?.length?t(dt):t(pt,-1)})}return p(U,Y),At(it)}export{Tt as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as S}from"./BdWqymET.js";import{aE as l}from"./DYhIMPy1.js";import{g as c}from"./
|
|
1
|
+
import{a as S}from"./BdWqymET.js";import{aE as l}from"./DYhIMPy1.js";import{g as c}from"./snmn_u5-.js";import{p as g}from"./D3F3BWsi.js";import{d as I}from"./B0Z-1lwJ.js";import{dC as f}from"./DpNO08YA.js";import{Bx as u,i as y,Iv as o,gT as A,v0 as m,v1 as N,v3 as b}from"./BmagX6n5.js";import{g as W,n as h}from"./D4bOZmAv.js";import{S as D,a as R,n as E}from"./CLd6HNgr.js";import{n as O,o as v}from"./EuCKSXHB.js";const k="intent:onboarding-skip:v1";function P(e){return u.getItem(h(k,e))==="1"}function re(e){P(e)||u.setItem(h(k,e),"1")}function _(e){return e.connections?.hasReceivedList===!0&&P(W(e))}function F(e,a){return e.some(t=>t.id!==y&&t.id!==a&&t.status!=="Archived"&&t.status!=="Deleted")}function j(e,a,t=!1){return t||F(e,a)?"/":"/workspace/new"}function d(e,a){return j(f.select(e),a,_(e))}const se=Object.freeze(Object.defineProperty({__proto__:null,resolveWindowEmptyDestination:d},Symbol.toStringTag,{value:"Module"})),r=new S("WorkspaceNavigation");async function L(e){r.info(`[navigateToAgent] Navigating to agent: ${e}`);const t=l(g).params.id;if(!t){r.error("[navigateToAgent] No workspace ID found in current page params");return}const n=new URL(window.location.href);n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","agent"),n.searchParams.set("selectedAgent",e),n.searchParams.delete("selectedTerminal"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"agent",e))}async function C(e){r.info(`[navigateToTerminal] Navigating to terminal: ${e}`);const t=l(g).params.id;if(!t){r.error("[navigateToTerminal] No workspace ID found in current page params");return}const n=new URL(window.location.href),i=n.searchParams.get("drawerOpen")==="1",s=n.searchParams.get("drawerType")==="terminal";(!i||!s)&&n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","terminal"),n.searchParams.set("selectedTerminal",e),n.searchParams.delete("selectedAgent"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"terminal",e))}function $(e){return!e||!(e instanceof Element)?void 0:e.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0}async function p(e,a){r.info(`[navigateToNote] Navigating to note: ${e}`,a);const t=l(g),n=a?.workspaceId??t.params.id;if(!n){r.error("[navigateToNote] No workspace ID found in current page params");return}o.dispatch(b(n,e,{openInAdjacentPanel:a?.openInAdjacentPanel??!1,openInNewAdjacentPanel:a?.openInNewAdjacentPanel??!1,sourcePanelId:a?.sourcePanelId}))}async function U(e,a,t){r.info(`[navigateToFile] Navigating to file: ${e}${a?` (line ${a})`:""}`,t);const i=l(g).params.id;if(!i){r.error("[navigateToFile] No workspace ID found in current page params");return}o.dispatch(N(i,e,{line:a,openInAdjacentPanel:t?.openInAdjacentPanel??!1,sourcePanelId:t?.sourcePanelId}))}async function B(){r.info("[navigateToSpec] Navigating to workspace spec"),await p("spec")}async function M(){r.info("[closeDrawer] Closing drawer");const a=l(g).params.id;if(!a){r.error("[closeDrawer] No workspace ID found in current page params");return}const t=new URL(window.location.href);t.searchParams.set("drawerOpen","0"),t.searchParams.delete("selectedAgent"),t.searchParams.delete("selectedTerminal"),await c(t.toString(),{replaceState:!0}),o.dispatch(A(a))}async function K(){r.info("[clearMainContent] Clearing main content");const e=new URL(window.location.href);e.searchParams.set("mainContentType","empty"),e.searchParams.delete("selectedNoteId"),e.searchParams.delete("selectedFile"),e.searchParams.delete("line"),await c(e.toString(),{replaceState:!1})}async function G(e,a,t){r.info("[navigateToTask] Navigating to task",{noteId:e,taskPosition:a,taskText:t}),await p(e);const n=()=>{I("scroll-to-task",{noteId:e,taskPosition:a,taskText:t},{bubbles:!0}),r.debug("[navigateToTask] Dispatched scroll-to-task event",{noteId:e,taskPosition:a})},i=[100,300,600];for(const s of i)setTimeout(n,s)}async function H(e){r.info("[navigateToSettings] Navigating to settings",e);const a=new URL("/settings",window.location.origin),t=window.location.pathname.match(/^\/workspace\/([^/]+)/)?.[1],n=t==="new"?void 0:t,i=e?.workspaceId??n;if(e?.tab&&a.searchParams.set("tab",e.tab),e?.specialist&&a.searchParams.set("specialist",e.specialist),e?.view&&a.searchParams.set("view",e.view),i&&a.searchParams.set("workspaceId",i),e?.hash&&(a.hash=e.hash),typeof window<"u"&&window.location.pathname==="/settings"){if(e?.tab||e?.specialist||e?.view||e?.workspaceId){const s=new URL(window.location.href);e?.tab&&s.searchParams.set("tab",e.tab),e?.specialist&&s.searchParams.set("specialist",e.specialist),e?.view&&s.searchParams.set("view",e.view),e?.workspaceId&&s.searchParams.set("workspaceId",e.workspaceId),e?.hash&&(s.hash=e.hash),await c(s.toString(),{replaceState:!0});return}if(e?.hash){const s=`#${e.hash}`;window.location.hash===s&&(window.location.hash=""),window.location.hash=s;return}return}await E(a.pathname+a.search+a.hash)}function T(){const e=typeof sessionStorage>"u"?null:sessionStorage.getItem(D);if(e&&e!=="/"&&!R(e))return e;const a=w();return a?`/workspace/${a.id}`:d(o.state)}async function z(){const e=T();r.info("[navigateBackFromSettings] Navigating back to:",e),await O(e)}function w(e){return f.select(o.state).find(a=>a.id!==e&&a.status!=="Archived"&&a.status!=="Deleted")}async function Y(){const e=w();if(e){r.info("[navigateToFirstWorkspace] Showing workspace:",e.id),await v(e.id);return}const a=d(o.state);r.info("[navigateToFirstWorkspace] Navigating to:",a),await c(a)}async function x(e){const a=w(e);if(a){r.info("[navigateAfterWorkspaceRemoval] Showing workspace:",a.id),await v(a.id);return}const t=d(o.state,e);r.info("[navigateAfterWorkspaceRemoval] Navigating to:",t),await c(t)}const ie=Object.freeze(Object.defineProperty({__proto__:null,clearMainContent:K,closeDrawer:M,findSourcePanelId:$,getSettingsPreviousPath:T,navigateAfterWorkspaceRemoval:x,navigateBackFromSettings:z,navigateToAgent:L,navigateToFile:U,navigateToFirstWorkspace:Y,navigateToNote:p,navigateToSettings:H,navigateToSpec:B,navigateToTask:G,navigateToTerminal:C},Symbol.toStringTag,{value:"Module"}));export{U as a,Y as b,p as c,H as d,G as e,$ as f,d as g,ie as h,_ as i,z as n,re as r,se as w};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as st}from"./DDgbK4p-.js";import{g as it}from"./QZ612f-7.js";import{s as at}from"./Dz1riI3m.js";import{b as f,ay as we,X as F,a1 as rt,aP as nt,bh as Ve,aW as fe,a_ as lt,V as ut,aZ as ot,U as ct,b0 as ht,Y as dt,z as I,r as pt,$ as At,am as ft,aU as gt,ab as mt,x as Ct,aV as bt,aI as U}from"./DozUkl5C.js";import{c as kt}from"./Cw7ROLv9.js";import{aP as Et}from"./Baz0g_kI.js";var Pe=(function(){var t=f(function(O,c,d,p){for(d=d||{},p=O.length;p--;d[O[p]]=c);return d},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],u=[1,26],h=[1,42],o=[1,24],g=[1,25],m=[1,32],_=[1,33],Y=[1,34],b=[1,45],me=[1,35],Ce=[1,36],be=[1,37],ke=[1,38],Ee=[1,27],Te=[1,28],ye=[1,29],De=[1,30],Fe=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],Be=[1,9],A=[1,8,9],te=[1,58],se=[1,59],ie=[1,60],ae=[1,61],re=[1,62],_e=[1,63],Se=[1,64],S=[1,8,9,41],Me=[1,77],R=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ne=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],le=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],Re=[13,60,68,69,70,71,72,86,100,102,103],ue=[1,103],W=[1,121],Q=[1,117],X=[1,113],j=[1,119],H=[1,114],q=[1,115],J=[1,116],Z=[1,118],$=[1,120],Ge=[22,50,60,61,82,86,87,88,89,90],Ue=[1,128],oe=[12,39],Ne=[1,8,9,39,41,44,46],ce=[1,8,9,22],ze=[1,153],Ye=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Le={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(c,d,p,l,C,e,ee){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(Be,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se}),{39:[1,65]},t(S,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Me,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(R,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(R,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ne,[2,133]),t(ne,[2,134]),t(ne,[2,135]),t(ne,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(Be,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:r,42:n,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se},t(A,[2,64]),{67:93,73:_e,74:Se},t(le,[2,83],{66:94,68:te,69:se,70:ie,71:ae,72:re}),t(K,[2,84]),t(K,[2,85]),t(K,[2,86]),t(K,[2,87]),t(K,[2,88]),t(Re,[2,89]),t(Re,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:h,54:m,56:_},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ue},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:W,50:Q,59:110,60:X,82:j,84:111,85:112,86:H,87:q,88:J,89:Z,90:$},{60:[1,122]},{13:Me,55:123},t(S,[2,72]),t(S,[2,138]),{22:W,50:Q,59:124,60:X,61:[1,125],82:j,84:111,85:112,86:H,87:q,88:J,89:Z,90:$},t(Ge,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),{11:127,12:Ue,39:[2,36]},t(oe,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(oe,[2,10]),t(Ne,[2,55],{11:131,12:Ue}),t(Be,[2,7]),{9:[1,132]},t(ce,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(le,[2,82],{66:136,68:te,69:se,70:ie,71:ae,72:re}),t(le,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:h,54:m,56:_},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(S,[2,48],{39:[1,142]}),{41:[1,143]},t(S,[2,50]),{41:[2,61],45:144,51:ue},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:ze}),t(Ye,[2,107],{85:154,22:W,50:Q,60:X,82:j,86:H,87:q,88:J,89:Z,90:$}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(S,[2,71]),t(A,[2,73],{61:ze}),{60:[1,155]},t(R,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(oe,[2,12]),t(Ne,[2,56]),{1:[2,4]},t(ce,[2,69]),t(ce,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(le,[2,80]),t(S,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:h,54:m,56:_},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:h,54:m,56:_},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:h,54:m,56:_},{45:163,51:ue},t(S,[2,49]),{41:[2,62]},t(S,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:W,50:Q,60:X,82:j,84:169,85:112,86:H,87:q,88:J,89:Z,90:$},t(x,[2,110]),t(Ge,[2,75]),{14:[1,170]},t(oe,[2,11]),t(ce,[2,70]),t(S,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ue},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(Ye,[2,108],{85:154,22:W,50:Q,60:X,82:j,86:H,87:q,88:J,89:Z,90:$}),t(Ne,[2,8]),t(S,[2,51]),{41:[1,175]},t(S,[2,54]),t(A,[2,104]),t(S,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(c,d){if(d.recoverable)this.trace(c);else{var p=new Error(c);throw p.hash=d,p}},"parseError"),parse:f(function(c){var d=this,p=[0],l=[],C=[null],e=[],ee=this.table,s="",de=0,Ke=0,Ze=2,We=1,$e=e.slice.call(arguments,1),D=Object.create(this.lexer),V={yy:{}};for(var xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xe)&&(V.yy[xe]=this.yy[xe]);D.setInput(c,V.yy),V.yy.lexer=D,V.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ve=D.yylloc;e.push(ve);var et=D.options&&D.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tt(N){p.length=p.length-2*N,C.length=C.length-N,e.length=e.length-N}f(tt,"popStack");function Qe(){var N;return N=l.pop()||D.lex()||We,typeof N!="number"&&(N instanceof Array&&(l=N,N=l.pop()),N=d.symbols_[N]||N),N}f(Qe,"lex");for(var B,P,L,Ie,G={},pe,v,Xe,Ae;;){if(P=p[p.length-1],this.defaultActions[P]?L=this.defaultActions[P]:((B===null||typeof B>"u")&&(B=Qe()),L=ee[P]&&ee[P][B]),typeof L>"u"||!L.length||!L[0]){var Oe="";Ae=[];for(pe in ee[P])this.terminals_[pe]&&pe>Ze&&Ae.push("'"+this.terminals_[pe]+"'");D.showPosition?Oe="Parse error on line "+(de+1)+`:
|
|
1
|
+
import{g as st}from"./BNGt0CxC.js";import{g as it}from"./onT82iSe.js";import{s as at}from"./749Ye7vh.js";import{b as f,ay as we,X as F,a1 as rt,aP as nt,bh as Ve,aW as fe,a_ as lt,V as ut,aZ as ot,U as ct,b0 as ht,Y as dt,z as I,r as pt,$ as At,am as ft,aU as gt,ab as mt,x as Ct,aV as bt,aI as U}from"./CN_zBCnB.js";import{c as kt}from"./B7MNPtN6.js";import{aP as Et}from"./BaJNSnZt.js";var Pe=(function(){var t=f(function(O,c,d,p){for(d=d||{},p=O.length;p--;d[O[p]]=c);return d},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],u=[1,26],h=[1,42],o=[1,24],g=[1,25],m=[1,32],_=[1,33],Y=[1,34],b=[1,45],me=[1,35],Ce=[1,36],be=[1,37],ke=[1,38],Ee=[1,27],Te=[1,28],ye=[1,29],De=[1,30],Fe=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],Be=[1,9],A=[1,8,9],te=[1,58],se=[1,59],ie=[1,60],ae=[1,61],re=[1,62],_e=[1,63],Se=[1,64],S=[1,8,9,41],Me=[1,77],R=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ne=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],le=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],Re=[13,60,68,69,70,71,72,86,100,102,103],ue=[1,103],W=[1,121],Q=[1,117],X=[1,113],j=[1,119],H=[1,114],q=[1,115],J=[1,116],Z=[1,118],$=[1,120],Ge=[22,50,60,61,82,86,87,88,89,90],Ue=[1,128],oe=[12,39],Ne=[1,8,9,39,41,44,46],ce=[1,8,9,22],ze=[1,153],Ye=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Le={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(c,d,p,l,C,e,ee){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(Be,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se}),{39:[1,65]},t(S,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Me,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(R,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(R,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ne,[2,133]),t(ne,[2,134]),t(ne,[2,135]),t(ne,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(Be,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:r,42:n,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se},t(A,[2,64]),{67:93,73:_e,74:Se},t(le,[2,83],{66:94,68:te,69:se,70:ie,71:ae,72:re}),t(K,[2,84]),t(K,[2,85]),t(K,[2,86]),t(K,[2,87]),t(K,[2,88]),t(Re,[2,89]),t(Re,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:h,54:m,56:_},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ue},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:W,50:Q,59:110,60:X,82:j,84:111,85:112,86:H,87:q,88:J,89:Z,90:$},{60:[1,122]},{13:Me,55:123},t(S,[2,72]),t(S,[2,138]),{22:W,50:Q,59:124,60:X,61:[1,125],82:j,84:111,85:112,86:H,87:q,88:J,89:Z,90:$},t(Ge,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),{11:127,12:Ue,39:[2,36]},t(oe,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(oe,[2,10]),t(Ne,[2,55],{11:131,12:Ue}),t(Be,[2,7]),{9:[1,132]},t(ce,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(le,[2,82],{66:136,68:te,69:se,70:ie,71:ae,72:re}),t(le,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:h,54:m,56:_},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(S,[2,48],{39:[1,142]}),{41:[1,143]},t(S,[2,50]),{41:[2,61],45:144,51:ue},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:ze}),t(Ye,[2,107],{85:154,22:W,50:Q,60:X,82:j,86:H,87:q,88:J,89:Z,90:$}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(S,[2,71]),t(A,[2,73],{61:ze}),{60:[1,155]},t(R,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(oe,[2,12]),t(Ne,[2,56]),{1:[2,4]},t(ce,[2,69]),t(ce,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(le,[2,80]),t(S,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:h,54:m,56:_},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:h,54:m,56:_},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:h,54:m,56:_},{45:163,51:ue},t(S,[2,49]),{41:[2,62]},t(S,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:W,50:Q,60:X,82:j,84:169,85:112,86:H,87:q,88:J,89:Z,90:$},t(x,[2,110]),t(Ge,[2,75]),{14:[1,170]},t(oe,[2,11]),t(ce,[2,70]),t(S,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ue},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(Ye,[2,108],{85:154,22:W,50:Q,60:X,82:j,86:H,87:q,88:J,89:Z,90:$}),t(Ne,[2,8]),t(S,[2,51]),{41:[1,175]},t(S,[2,54]),t(A,[2,104]),t(S,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(c,d){if(d.recoverable)this.trace(c);else{var p=new Error(c);throw p.hash=d,p}},"parseError"),parse:f(function(c){var d=this,p=[0],l=[],C=[null],e=[],ee=this.table,s="",de=0,Ke=0,Ze=2,We=1,$e=e.slice.call(arguments,1),D=Object.create(this.lexer),V={yy:{}};for(var xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xe)&&(V.yy[xe]=this.yy[xe]);D.setInput(c,V.yy),V.yy.lexer=D,V.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ve=D.yylloc;e.push(ve);var et=D.options&&D.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tt(N){p.length=p.length-2*N,C.length=C.length-N,e.length=e.length-N}f(tt,"popStack");function Qe(){var N;return N=l.pop()||D.lex()||We,typeof N!="number"&&(N instanceof Array&&(l=N,N=l.pop()),N=d.symbols_[N]||N),N}f(Qe,"lex");for(var B,P,L,Ie,G={},pe,v,Xe,Ae;;){if(P=p[p.length-1],this.defaultActions[P]?L=this.defaultActions[P]:((B===null||typeof B>"u")&&(B=Qe()),L=ee[P]&&ee[P][B]),typeof L>"u"||!L.length||!L[0]){var Oe="";Ae=[];for(pe in ee[P])this.terminals_[pe]&&pe>Ze&&Ae.push("'"+this.terminals_[pe]+"'");D.showPosition?Oe="Parse error on line "+(de+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+Ae.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Oe="Parse error on line "+(de+1)+": Unexpected "+(B==We?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Oe,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:ve,expected:Ae})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+B);switch(L[0]){case 1:p.push(B),C.push(D.yytext),e.push(D.yylloc),p.push(L[1]),B=null,Ke=D.yyleng,s=D.yytext,de=D.yylineno,ve=D.yylloc;break;case 2:if(v=this.productions_[L[1]][1],G.$=C[C.length-v],G._$={first_line:e[e.length-(v||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(v||1)].first_column,last_column:e[e.length-1].last_column},et&&(G._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]]),Ie=this.performAction.apply(G,[s,Ke,de,V.yy,L[1],C,e].concat($e)),typeof Ie<"u")return Ie;v&&(p=p.slice(0,-1*v*2),C=C.slice(0,-1*v),e=e.slice(0,-1*v)),p.push(this.productions_[L[1]][0]),C.push(G.$),e.push(G._$),Xe=ee[p[p.length-2]][p[p.length-1]],p.push(Xe);break;case 3:return!0}}return!0},"parse")},Je=(function(){var O={EOF:1,parseError:f(function(d,p){if(this.yy.parser)this.yy.parser.parseError(d,p);else throw new Error(d)},"parseError"),setInput:f(function(c,d){return this.yy=d||this.yy||{},this._input=c,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var d=c.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:f(function(c){var d=c.length,p=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===l.length?this.yylloc.first_column:0)+l[l.length-p.length].length-p[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(c){this.unput(this.match.slice(c))},"less"),pastInput:f(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var c=this.pastInput(),d=new Array(c.length+1).join("-");return c+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as p}from"./CVc3afbh.js";import{J as s,H as l}from"./
|
|
1
|
+
import{d as p}from"./CVc3afbh.js";import{J as s,H as l}from"./BnrJBpBN.js";import{selectScriptOutput as o,selectScriptById as f,selectCanReadScriptDefinition as m}from"./JzdAu8wb.js";async function a(i,t,e,r=100){const n=s(o.select(i,t,e)).slice(-r);if(!t||!e)return n;const u=f.select(i,t,e);if(!m.select(i,t,u))return[];try{const c=l(await p.scripts.output(t,e,r));return c.length>0?c.slice(-r):n}catch{return n}}export{a as readScriptContextOutputLines};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l,r as m,d as n}from"./
|
|
1
|
+
import{g as l,r as m,d as n}from"./DUoxftgs.js";import{p}from"./yIt8dECo.js";import{b as t,ay as o}from"./CN_zBCnB.js";import{M as u,a as f}from"./Dgv1nn7D.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),y=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),d=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(d(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},N={parser:g,db:n,renderer:m,styles:l};export{N as diagram};
|