@svenroth-ai/shipwright 0.24.6-next.0 → 0.24.7-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/dist/assets/{EmbeddedTerminal-N1SJ3XX7.js → EmbeddedTerminal-D2BLGWdW.js} +1 -1
- package/client/dist/assets/{MarkdownEditorModal-DL5uF6Nn.js → MarkdownEditorModal-CP5yG9OU.js} +1 -1
- package/client/dist/assets/{abnfDiagram-VRR7QNED-BcoPVcm6.js → abnfDiagram-VRR7QNED-C-W_2Jd4.js} +1 -1
- package/client/dist/assets/{arc-BhjELRo0.js → arc-CpqwESP5.js} +1 -1
- package/client/dist/assets/{architectureDiagram-ZJ3FMSHR-DbNXtiqW.js → architectureDiagram-ZJ3FMSHR-DZVZ895V.js} +1 -1
- package/client/dist/assets/{blockDiagram-677ZJIJ3-Bq-jwL4e.js → blockDiagram-677ZJIJ3-CCCZiAA7.js} +1 -1
- package/client/dist/assets/{c4Diagram-LMCZKHZV-CjFKHlUb.js → c4Diagram-LMCZKHZV-Bg1beZAE.js} +1 -1
- package/client/dist/assets/channel-BNXbCvDS.js +1 -0
- package/client/dist/assets/{chunk-2Q5K7J3B-C6RrKKpc.js → chunk-2Q5K7J3B-CoaXSarh.js} +1 -1
- package/client/dist/assets/{chunk-32BRIVSS-BWuO7O6S.js → chunk-32BRIVSS-CeFXS-CM.js} +1 -1
- package/client/dist/assets/{chunk-5VM5RSS4-BjYoiHmo.js → chunk-5VM5RSS4-QyJMVe0m.js} +1 -1
- package/client/dist/assets/{chunk-EX3LRPZG-CyQYieee.js → chunk-EX3LRPZG-BIOtWVF8.js} +1 -1
- package/client/dist/assets/{chunk-JWPE2WC7-CY9fT_5d.js → chunk-JWPE2WC7-Dcq-lWyX.js} +1 -1
- package/client/dist/assets/{chunk-MOJQB5TN-DCcb0M8e.js → chunk-MOJQB5TN-C95323ja.js} +1 -1
- package/client/dist/assets/{chunk-RYQCIY6F-CVd_mjJU.js → chunk-RYQCIY6F-C0HPwpWy.js} +1 -1
- package/client/dist/assets/{chunk-V7JOEXUC-qBo5EfYb.js → chunk-V7JOEXUC-BPrTbZqA.js} +1 -1
- package/client/dist/assets/{chunk-VR4S4FIN-C1TLpczn.js → chunk-VR4S4FIN--BCnNoqt.js} +1 -1
- package/client/dist/assets/{chunk-XXDRQBXY-DePb8ZtI.js → chunk-XXDRQBXY-Dj8vtcXf.js} +1 -1
- package/client/dist/assets/classDiagram-OUVF2IWQ-w-wCtLx3.js +1 -0
- package/client/dist/assets/classDiagram-v2-EOCWNBFH-w-wCtLx3.js +1 -0
- package/client/dist/assets/{cose-bilkent-JH36ORCC-BJNddNgC.js → cose-bilkent-JH36ORCC-y51otZKz.js} +1 -1
- package/client/dist/assets/{cynefin-VYW2F7L2-BtJssOuy.js → cynefin-VYW2F7L2-BRfS3cHo.js} +1 -1
- package/client/dist/assets/{cynefinDiagram-TSTJHNR4-BS8F0pjM.js → cynefinDiagram-TSTJHNR4-Dpg2RtfL.js} +1 -1
- package/client/dist/assets/{dagre-VKFMJZFB-C4A2MxdE.js → dagre-VKFMJZFB-BdZtXgKZ.js} +1 -1
- package/client/dist/assets/{diagram-FQU43EPY-vX6qE1sj.js → diagram-FQU43EPY-K-RCwWxW.js} +1 -1
- package/client/dist/assets/{diagram-G47NLZAW-B5P1Rrem.js → diagram-G47NLZAW-CHNn7F2-.js} +1 -1
- package/client/dist/assets/{diagram-NH7WQ7WH-u7LHeyDa.js → diagram-NH7WQ7WH-B3zu6xib.js} +1 -1
- package/client/dist/assets/{diagram-OA4YK3LP-CZhgtAtD.js → diagram-OA4YK3LP-Wp5ju7L7.js} +1 -1
- package/client/dist/assets/{diagram-WEI45ONY-9k80njcz.js → diagram-WEI45ONY-C94GpsRk.js} +1 -1
- package/client/dist/assets/{ebnfDiagram-CCIWWBDH-B3ES3AxZ.js → ebnfDiagram-CCIWWBDH-DXrTPOrP.js} +1 -1
- package/client/dist/assets/{erDiagram-Q63AITRT-BSLAY2HJ.js → erDiagram-Q63AITRT-CGejnW0f.js} +1 -1
- package/client/dist/assets/{flowDiagram-23GEKE2U-BIse3jvS.js → flowDiagram-23GEKE2U-CFJMM637.js} +1 -1
- package/client/dist/assets/{ganttDiagram-NO4QXBWP-BCV_RM7c.js → ganttDiagram-NO4QXBWP-DnaH94Su.js} +1 -1
- package/client/dist/assets/{gitGraphDiagram-IHSO6WYX-ClkOuEG1.js → gitGraphDiagram-IHSO6WYX-DT-D0gbn.js} +1 -1
- package/client/dist/assets/{index-B1mzucik.js → index-CU2QJgvx.js} +41 -41
- package/client/dist/assets/{index-C-w52nAQ.css → index-ftvVcUT8.css} +1 -1
- package/client/dist/assets/{infoDiagram-FWYZ7A6U-Cu6-m8O7.js → infoDiagram-FWYZ7A6U-DW3Ps00w.js} +1 -1
- package/client/dist/assets/{ishikawaDiagram-FXEZZL3T-D62Cg1g-.js → ishikawaDiagram-FXEZZL3T-DjxjIT3n.js} +1 -1
- package/client/dist/assets/{journeyDiagram-5HDEW3XC-DHMljiqG.js → journeyDiagram-5HDEW3XC-DTQRI93Y.js} +1 -1
- package/client/dist/assets/{kanban-definition-HUTT4EX6-CvELrwMl.js → kanban-definition-HUTT4EX6-BeDvbiEs.js} +1 -1
- package/client/dist/assets/{linear-DpT0hsvX.js → linear-B4foxDlh.js} +1 -1
- package/client/dist/assets/{mermaid.core-CSwHP-lX.js → mermaid.core-c-L4qgSB.js} +4 -4
- package/client/dist/assets/{mindmap-definition-LN4V7U3C-BPaYhqXE.js → mindmap-definition-LN4V7U3C-dh8v0J8T.js} +1 -1
- package/client/dist/assets/{pegDiagram-2B236MQR-Bn0zJHpH.js → pegDiagram-2B236MQR-D5vNrtFh.js} +1 -1
- package/client/dist/assets/{pieDiagram-ENE6RG2P-CpZW49Cw.js → pieDiagram-ENE6RG2P-CIjg_6lR.js} +1 -1
- package/client/dist/assets/{quadrantDiagram-ABIIQ3AL--El8Y1Vr.js → quadrantDiagram-ABIIQ3AL-CF37qWQD.js} +1 -1
- package/client/dist/assets/{railroadDiagram-RFXS5EU6-Bb4L-n6k.js → railroadDiagram-RFXS5EU6-x0Hn30Kj.js} +1 -1
- package/client/dist/assets/{requirementDiagram-TGXJPOKE-BYmMcf0e.js → requirementDiagram-TGXJPOKE-BE2QnVbN.js} +1 -1
- package/client/dist/assets/{sankeyDiagram-HTMAVEWB-C2JWG0lB.js → sankeyDiagram-HTMAVEWB-CUv6cIlV.js} +1 -1
- package/client/dist/assets/{sequenceDiagram-DBY2YBRQ-ck4oQ3Sx.js → sequenceDiagram-DBY2YBRQ-C3ACj5LS.js} +1 -1
- package/client/dist/assets/{sizeCapture-X5ZJPWSS-Cn7ZoV_6.js → sizeCapture-X5ZJPWSS-DTMIb5gX.js} +1 -1
- package/client/dist/assets/{stateDiagram-2N3HPSRC-Cfps2GyX.js → stateDiagram-2N3HPSRC-DI1Z8P74.js} +1 -1
- package/client/dist/assets/stateDiagram-v2-6OUMAXLB-DvwiHlJv.js +1 -0
- package/client/dist/assets/{swimlanes-5IMT3BWC-qzrx_9r_.js → swimlanes-5IMT3BWC-CLSr9w29.js} +2 -2
- package/client/dist/assets/swimlanesDiagram-G3AALYLV-JTQZTlZ3.js +8 -0
- package/client/dist/assets/{timeline-definition-FHXFAJF6-cdJrYjL1.js → timeline-definition-FHXFAJF6-BTWmUhDh.js} +1 -1
- package/client/dist/assets/{vennDiagram-L72KCM5P-CsADhf78.js → vennDiagram-L72KCM5P-Ce1dlLCM.js} +1 -1
- package/client/dist/assets/{wardleyDiagram-EHGQE667-CiIy8tCK.js → wardleyDiagram-EHGQE667-ClOE-aae.js} +1 -1
- package/client/dist/assets/{xychartDiagram-FW5EYKEG-4dCIrB0W.js → xychartDiagram-FW5EYKEG-Fa2pqWKw.js} +1 -1
- package/client/dist/index.html +2 -2
- package/lib/server.mjs +11 -3
- package/lib/util.mjs +70 -1
- package/package.json +1 -1
- package/server/package.json +43 -43
- package/client/dist/assets/channel-DjcCSejz.js +0 -1
- package/client/dist/assets/classDiagram-OUVF2IWQ-SNWikNvk.js +0 -1
- package/client/dist/assets/classDiagram-v2-EOCWNBFH-SNWikNvk.js +0 -1
- package/client/dist/assets/stateDiagram-v2-6OUMAXLB-DF7QbVyC.js +0 -1
- package/client/dist/assets/swimlanesDiagram-G3AALYLV-Dz7OXAbB.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Xa=Object.defineProperty;var Za=(t,e,i)=>e in t?Xa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var ps=(t,e,i)=>Za(t,typeof e!="symbol"?e+"":e,i);import{r as M,a as Ja,h as Qa,T as Xr,b as el,c as tl,d as il,s as sl,j as X,u as rl,e as nl,f as ol}from"./index-B1mzucik.js";const al=5e3,ll=2,hl=4e3,cl=8e3,dl=5e3,ul=5e3,Ao=12,_l=3e4,fl=1e4;function gl(t=ll){let e=0;return{notePong(){e=0},tick(){return e>=t?"terminate":(e+=1,"ping")}}}function pl(t){const e=gl(t.maxMissed),i=t.intervalMs??al,s=t.setIntervalFn??setInterval,r=t.clearIntervalFn??clearInterval;let n=null,o=!1;const l=()=>{o||(o=!0,n!==null&&(r(n),n=null))};return n=s(()=>{if(!o){if(!t.isOpen()){l();return}if(e.tick()==="terminate"){t.onDead(),l();return}t.sendPing()}},i),{notePong:()=>e.notePong(),stop:l}}const vl=2e3,ml=8e3;function Sl(t){const e=t.now??(()=>Date.now()),i=t.intervalMs??vl,s=t.gapMs??ml,r=t.setIntervalFn??setInterval,n=t.clearIntervalFn??clearInterval;let o=e(),l=!1;const h=r(()=>{if(l)return;const a=e(),c=a-o;o=a,c>s&&t.onWake()},i);return{stop(){l||(l=!0,n(h))}}}function wl(t){const e=t.refocusProbeMs??hl,i=t.setTimeoutFn??setTimeout,s=t.clearTimeoutFn??clearTimeout,r=t.nowFn??(()=>Date.now());let n=null,o=null,l=!1,h=r(),a=0;const c=()=>{const B=t.getSocket();if(B)try{B.send(JSON.stringify({type:"ping"}))}catch{}},d=()=>{l=!1,o!==null&&(s(o),o=null)},u=()=>{d(),h=r(),n==null||n.stop(),n=pl({isOpen:()=>{var B;return((B=t.getSocket())==null?void 0:B.readyState)===t.openState},sendPing:c,onDead:()=>{const B=t.getSocket();if(B)try{B.close()}catch{}},intervalMs:t.intervalMs,maxMissed:t.maxMissed,setIntervalFn:t.setIntervalFn,clearIntervalFn:t.clearIntervalFn})},_=()=>{n==null||n.stop(),n=null},f=()=>{h=r(),n==null||n.notePong(),d()},m=()=>{if(t.isReplayOnly())return;t.rearmBudget();const B=t.getSocket();if(!B){t.reconnect();return}if(B.readyState!==t.openState)return;c(),l=!0;const F=B;o!==null&&s(o),o=i(()=>{if(o=null,t.isCancelled()||!l)return;const N=t.getSocket();if(N===F&&N.readyState===t.openState)try{N.close()}catch{}},e)},w=()=>{t.isCancelled()||typeof document<"u"&&document.hidden||m()},y=()=>{t.isCancelled()||m()},C=()=>{if(t.isCancelled())return;const B=r();B-h<=cl||B-a<dl||(a=B,m())},k=Sl({onWake:()=>{t.isCancelled()||m()},now:t.nowFn,intervalMs:t.wakeIntervalMs,gapMs:t.wakeGapMs,setIntervalFn:t.setIntervalFn,clearIntervalFn:t.clearIntervalFn}),g=typeof window<"u",R=typeof document<"u";return g&&(window.addEventListener("focus",w),window.addEventListener("pageshow",w),window.addEventListener("online",y)),R&&(document.addEventListener("visibilitychange",w),document.addEventListener("keydown",C,{capture:!0,passive:!0}),document.addEventListener("pointerdown",C,{capture:!0,passive:!0})),{onConnected:u,onDisconnected:_,noteInbound:f,dispose(){_(),d(),k.stop(),g&&(window.removeEventListener("focus",w),window.removeEventListener("pageshow",w),window.removeEventListener("online",y)),R&&(document.removeEventListener("visibilitychange",w),document.removeEventListener("keydown",C,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}))}}}const Ei=[200,400,800,1600,3200];function bl(t){return t<Ei.length?Ei[t]:t<Ei.length+Ao?ul:_l}function yl(t){return t>=Ei.length+Ao}function Cl(t){const e=t.timeoutMs??fl,i=t.setTimeoutFn??setTimeout,s=t.clearTimeoutFn??clearTimeout;let r=null;const n=()=>{r!==null&&(s(r),r=null)};return{clear:n,arm(o){n(),r=i(()=>{if(r=null,!t.isCancelled()&&t.isCurrent(o)&&o.readyState===t.connectingState)try{o.close()}catch{}},e)}}}function xl(t){const e=t.role==="writer"||t.role==="reader"?t.role:void 0,i=t.shellKind==="pwsh"||t.shellKind==="cmd"||t.shellKind==="posix"?t.shellKind:void 0;return{role:e,shellKind:i,replayOnly:typeof t.replayOnly=="boolean"?t.replayOnly:!1,scrollbackBytes:typeof t.scrollbackBytes=="number"&&t.scrollbackBytes>=0?t.scrollbackBytes:null,retentionDays:typeof t.retentionDays=="number"&&t.retentionDays>0?t.retentionDays:null,scrollbackDir:typeof t.scrollbackDir=="string"&&t.scrollbackDir.length>0?t.scrollbackDir:null,terminalReset:typeof t.terminalReset=="boolean"?t.terminalReset:!1,ptyReused:typeof t.ptyReused=="boolean"?t.ptyReused:!1}}function kl(t){return typeof window>"u"?"":`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/terminal/${encodeURIComponent(t)}/ws`}function Ll(t){const{taskId:e,urlOverride:i,enabled:s=!0,onData:r,onBackpressure:n,onReadOnly:o,onReplaySnapshot:l}=t,h=M.useRef(r),a=M.useRef(n),c=M.useRef(o),d=M.useRef(l);M.useEffect(()=>{h.current=r},[r]),M.useEffect(()=>{a.current=n},[n]),M.useEffect(()=>{c.current=o},[o]),M.useEffect(()=>{d.current=l},[l]);const[u,_]=M.useState(!1),[f,m]=M.useState(null),[w,y]=M.useState(null),[C,k]=M.useState(null),[g,R]=M.useState(null),[B,F]=M.useState(null),[N,V]=M.useState(null),[J,$]=M.useState(null),[S,p]=M.useState(null),[v,b]=M.useState(!1),[L,x]=M.useState(null),[A,E]=M.useState(0),[D,W]=M.useState(!1),[Q,I]=M.useState(!1),U=M.useRef(null),H=M.useRef(null),ee=M.useRef(0),Y=M.useRef(null),j=M.useRef(!1),ie=M.useCallback(()=>{_(!1),m(null),y(null),k(null),R(null),F(null),V(null),$(null),p(null),b(!1),W(!1),I(!1)},[]),Ke=M.useCallback(he=>{const me=U.current;if(!(!me||me.readyState!==WebSocket.OPEN))try{me.send(JSON.stringify(he))}catch{}},[]);return M.useEffect(()=>{if(!s||!e){ie(),Y.current=null,j.current=!1;return}Y.current=null,j.current=!1;let he=!1;const me=Cl({connectingState:WebSocket.CONNECTING,isCancelled:()=>he,isCurrent:Ye=>U.current===Ye}),$e=()=>{if(he)return;Y.current=null;const Ye=i??kl(e);let Ge;try{Ge=new WebSocket(Ye)}catch(nt){x(String(nt)),G();return}U.current=Ge,me.arm(Ge),Ge.addEventListener("open",()=>{he||(me.clear(),b(!0),ee.current=0,E(0),W(!1),I(!1),x(null),rt.onConnected())}),Ge.addEventListener("message",nt=>{var qr,Vr,Yr,Gr;if(he)return;let mt;try{mt=JSON.parse(typeof nt.data=="string"?nt.data:"")}catch{return}if(!mt||typeof mt!="object")return;const Z=mt;if(rt.noteInbound(),Z.type==="ready"){const Te=xl(Z);Te.role&&m(Te.role),Te.shellKind&&y(Te.shellKind),k(Te.replayOnly),Y.current=Te.replayOnly,Te.replayOnly&&(j.current=!0,rt.onDisconnected(),W(!1),I(!1)),R(Te.scrollbackBytes),F(Te.retentionDays),V(Te.scrollbackDir),$(Te.terminalReset),p(Te.ptyReused),_(!0);return}if(Z.type==="data"&&typeof Z.payload=="string"){(qr=h.current)==null||qr.call(h,Z.payload);return}if(Z.type==="backpressure"){const Te=jr=>typeof jr=="number"?jr:0;(Vr=a.current)==null||Vr.call(a,{droppedBytes:Te(Z.droppedBytes),droppedChunks:Te(Z.droppedChunks),totalDroppedBytes:Te(Z.totalDroppedBytes),episode:Te(Z.episode),episodeEnded:Z.episodeEnded===!0});return}if(Z.type==="read_only"){(Yr=c.current)==null||Yr.call(c);return}if(Z.type==="scrollback-meta"){typeof Z.scrollbackBytes=="number"&&Z.scrollbackBytes>=0&&R(Z.scrollbackBytes);return}if(Z.type==="writer-promoted"){m("writer");return}if(Z.type==="replay_snapshot"&&typeof Z.data=="string"&&typeof Z.cols=="number"&&typeof Z.rows=="number"&&typeof Z.terminalVersion=="string"){(Gr=d.current)==null||Gr.call(d,{data:Z.data,cols:Z.cols,rows:Z.rows,terminalVersion:Z.terminalVersion});return}}),Ge.addEventListener("close",nt=>{if(he)return;me.clear(),b(!1),_(!1),U.current=null,rt.onDisconnected();const mt=nt==null?void 0:nt.code,Z=Y.current===!0&&mt===1e3;Y.current=null,!Z&&G()}),Ge.addEventListener("error",()=>{he||x("websocket error")})},G=()=>{if(he||j.current)return;const Ye=ee.current,Ge=bl(Ye);ee.current=Ye+1,Ye<Ei.length&&E(ee.current),W(!0),yl(Ye)&&I(!0),H.current=setTimeout(()=>{he||$e()},Ge)},rt=wl({getSocket:()=>U.current,openState:WebSocket.OPEN,isReplayOnly:()=>j.current,isCancelled:()=>he,rearmBudget:()=>{ee.current=0,E(0)},reconnect:()=>{H.current&&(clearTimeout(H.current),H.current=null),$e()}});return $e(),()=>{he=!0,rt.dispose(),me.clear(),H.current&&(clearTimeout(H.current),H.current=null);const Ye=U.current;if(U.current=null,Ye)try{Ye.close(1e3,"unmount")}catch{}ie(),Y.current=null}},[s,e,i,ie]),{ready:u,role:f,shellKind:w,replayOnly:C,scrollbackBytes:g,retentionDays:B,scrollbackDir:N,terminalReset:J,ptyReused:S,lastError:L,reconnectAttempts:A,reconnecting:D,reconnectStalled:Q,send:Ke,open:v}}function El(t){if(t.type!=="keydown"||t.metaKey||t.altKey)return"passthrough";const e=t.key.toLowerCase(),i=t.key==="Insert";return t.ctrlKey&&!t.shiftKey&&e==="v"||t.shiftKey&&!t.ctrlKey&&i?"paste":"passthrough"}async function Rl(){if(typeof navigator>"u"||!navigator.clipboard||typeof navigator.clipboard.readText!="function")return{ok:!1,reason:"unavailable"};try{return{ok:!0,text:await navigator.clipboard.readText()}}catch{return{ok:!1,reason:"denied"}}}function Ml(t){const{term:e,isDisposed:i,notify:s,readClipboard:r}=t;return n=>El(n)!=="paste"?!0:(n.preventDefault(),n.stopPropagation(),n.repeat||r().then(o=>{i()||(o.ok?o.text&&e.paste(o.text):o.reason==="unavailable"?s("paste-hint"):s("paste-failed"))}),!1)}const Zr=1e6;function Bl(t){if(typeof atob!="function")return null;try{const e=atob(t.trim());try{return decodeURIComponent(Array.from(e).map(i=>"%"+i.charCodeAt(0).toString(16).padStart(2,"0")).join(""))}catch{return e}}catch{return null}}function Tl(t){const e=t.indexOf(";"),i=e>=0?t.slice(e+1):t;if(i==="?")return{kind:"read"};if(i.length>Math.ceil(Zr*4/3)+4)return{kind:"invalid"};const s=Bl(i);return s===null?{kind:"invalid"}:s.length>Zr?{kind:"invalid"}:{kind:"write",text:s}}function Al(t){const{copy:e,isDisposed:i,onError:s}=t;return r=>{const n=Tl(r);return n.kind==="write"&&n.text&&e(n.text).catch(()=>{i!=null&&i()||s==null||s()}),!0}}const Dl="\x1B",Pl=new RegExp("^"+Dl+"\\[<(\\d+);\\d+;\\d+[Mm]$");function Ol(t){const e=Pl.exec(t);if(!e)return!1;const i=Number(e[1]);return i<64&&(i&3)===2}const Il=0;function Fl(){return{active:!1,identifier:null,lastY:0,pixelAccumulator:0}}function $l(t,e,i){if(i<=0)return 0;t.pixelAccumulator+=e;const s=Math.trunc(t.pixelAccumulator/i);return s!==0&&(t.pixelAccumulator-=s*i),s}function Nl(t,e,i={}){const s=Fl(),r=i.getPixelsPerLine??Hl,n=e.style.getPropertyValue("touch-action");e.style.setProperty("touch-action","none");const o=a=>{if(a.touches.length!==1){s.active=!1,s.identifier=null;return}const c=a.touches[0];s.active=!0,s.identifier=c.identifier,s.lastY=c.clientY,s.pixelAccumulator=0},l=a=>{if(!s.active||s.identifier===null)return;let c=null;for(let _=0;_<a.touches.length;_++)if(a.touches[_].identifier===s.identifier){c=a.touches[_];break}if(!c)return;const d=s.lastY-c.clientY;s.lastY=c.clientY;const u=r(t,e);Wl(t,s,d,u,c.clientX,c.clientY),a.cancelable&&a.preventDefault()},h=()=>{s.active=!1,s.identifier=null,s.pixelAccumulator=0};return e.addEventListener("touchstart",o,{passive:!0}),e.addEventListener("touchmove",l,{passive:!1}),e.addEventListener("touchend",h,{passive:!0}),e.addEventListener("touchcancel",h,{passive:!0}),()=>{e.removeEventListener("touchstart",o),e.removeEventListener("touchmove",l),e.removeEventListener("touchend",h),e.removeEventListener("touchcancel",h),n?e.style.setProperty("touch-action",n):e.style.removeProperty("touch-action")}}function Wl(t,e,i,s,r,n){const o=t.element??null,l=t.buffer.active.type==="alternate";if(o&&l){i!==0&&zl(o,i,r,n);return}const h=$l(e,i,s);h!==0&&t.scrollLines(h)}function zl(t,e,i,s){t.dispatchEvent(new WheelEvent("wheel",{deltaY:e,deltaMode:Il,clientX:i,clientY:s,bubbles:!0,cancelable:!0}))}function Hl(t,e){const i=e.querySelector(".xterm-rows");if(i&&i.children.length>0){const r=i.children[0].getBoundingClientRect().height;if(r>0)return r}if(t.rows>0){const s=e.clientHeight/t.rows;if(s>0)return s}return 18}const Ul=150;function Kl(t,e,i,s={}){const r=s.requestFrame??(_=>requestAnimationFrame(_)),n=s.cancelFrame??(_=>cancelAnimationFrame(_)),o=s.setTimer??((_,f)=>setTimeout(_,f)),l=s.clearTimer??(_=>clearTimeout(_));let h=null,a=null;const c=()=>{if(!i())try{t.refresh(0,t.rows-1)}catch{}},d=()=>{i()||(h===null&&(h=r(()=>{h=null,c()})),a!==null&&l(a),a=o(()=>{var _,f;if(a=null,c(),!i())try{(f=(_=s.getHealAtlas)==null?void 0:_.call(s))==null||f()}catch{}},Ul))},u=t.onScroll(d);return e.addEventListener("wheel",d,{passive:!0}),()=>{h!==null&&(n(h),h=null),a!==null&&(l(a),a=null);try{u.dispose()}catch{}e.removeEventListener("wheel",d)}}const ql=450,Vl=3e3;function Yl(t,e,i={}){const s=i.requestFrame??(k=>requestAnimationFrame(k)),r=i.cancelFrame??(k=>cancelAnimationFrame(k)),n=i.setTimer??((k,g)=>setTimeout(k,g)),o=i.clearTimer??(k=>clearTimeout(k));let l=!1,h=null,a=null,c=null;const d=()=>{if(!e())try{t.refresh(0,t.rows-1)}catch{}},u=()=>{h===null&&(h=s(()=>{h=null,d()}))},_=()=>{a!==null&&(o(a),a=null)},f=()=>{l=!1,_(),c!==null&&(o(c),c=null),h!==null&&(r(h),h=null)},m=()=>{e()||(l=!0,_(),c!==null&&o(c),c=n(f,Vl))},w=()=>{!l||e()||(u(),_(),a=n(f,ql))},y=t.onWriteParsed(w),C=t.onResize(m);return{arm:m,dispose(){f();try{y.dispose()}catch{}try{C.dispose()}catch{}}}}/**
|
|
1
|
+
var Xa=Object.defineProperty;var Za=(t,e,i)=>e in t?Xa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var ps=(t,e,i)=>Za(t,typeof e!="symbol"?e+"":e,i);import{r as M,a as Ja,h as Qa,T as Xr,b as el,c as tl,d as il,s as sl,j as X,u as rl,e as nl,f as ol}from"./index-CU2QJgvx.js";const al=5e3,ll=2,hl=4e3,cl=8e3,dl=5e3,ul=5e3,Ao=12,_l=3e4,fl=1e4;function gl(t=ll){let e=0;return{notePong(){e=0},tick(){return e>=t?"terminate":(e+=1,"ping")}}}function pl(t){const e=gl(t.maxMissed),i=t.intervalMs??al,s=t.setIntervalFn??setInterval,r=t.clearIntervalFn??clearInterval;let n=null,o=!1;const l=()=>{o||(o=!0,n!==null&&(r(n),n=null))};return n=s(()=>{if(!o){if(!t.isOpen()){l();return}if(e.tick()==="terminate"){t.onDead(),l();return}t.sendPing()}},i),{notePong:()=>e.notePong(),stop:l}}const vl=2e3,ml=8e3;function Sl(t){const e=t.now??(()=>Date.now()),i=t.intervalMs??vl,s=t.gapMs??ml,r=t.setIntervalFn??setInterval,n=t.clearIntervalFn??clearInterval;let o=e(),l=!1;const h=r(()=>{if(l)return;const a=e(),c=a-o;o=a,c>s&&t.onWake()},i);return{stop(){l||(l=!0,n(h))}}}function wl(t){const e=t.refocusProbeMs??hl,i=t.setTimeoutFn??setTimeout,s=t.clearTimeoutFn??clearTimeout,r=t.nowFn??(()=>Date.now());let n=null,o=null,l=!1,h=r(),a=0;const c=()=>{const B=t.getSocket();if(B)try{B.send(JSON.stringify({type:"ping"}))}catch{}},d=()=>{l=!1,o!==null&&(s(o),o=null)},u=()=>{d(),h=r(),n==null||n.stop(),n=pl({isOpen:()=>{var B;return((B=t.getSocket())==null?void 0:B.readyState)===t.openState},sendPing:c,onDead:()=>{const B=t.getSocket();if(B)try{B.close()}catch{}},intervalMs:t.intervalMs,maxMissed:t.maxMissed,setIntervalFn:t.setIntervalFn,clearIntervalFn:t.clearIntervalFn})},_=()=>{n==null||n.stop(),n=null},f=()=>{h=r(),n==null||n.notePong(),d()},m=()=>{if(t.isReplayOnly())return;t.rearmBudget();const B=t.getSocket();if(!B){t.reconnect();return}if(B.readyState!==t.openState)return;c(),l=!0;const F=B;o!==null&&s(o),o=i(()=>{if(o=null,t.isCancelled()||!l)return;const N=t.getSocket();if(N===F&&N.readyState===t.openState)try{N.close()}catch{}},e)},w=()=>{t.isCancelled()||typeof document<"u"&&document.hidden||m()},y=()=>{t.isCancelled()||m()},C=()=>{if(t.isCancelled())return;const B=r();B-h<=cl||B-a<dl||(a=B,m())},k=Sl({onWake:()=>{t.isCancelled()||m()},now:t.nowFn,intervalMs:t.wakeIntervalMs,gapMs:t.wakeGapMs,setIntervalFn:t.setIntervalFn,clearIntervalFn:t.clearIntervalFn}),g=typeof window<"u",R=typeof document<"u";return g&&(window.addEventListener("focus",w),window.addEventListener("pageshow",w),window.addEventListener("online",y)),R&&(document.addEventListener("visibilitychange",w),document.addEventListener("keydown",C,{capture:!0,passive:!0}),document.addEventListener("pointerdown",C,{capture:!0,passive:!0})),{onConnected:u,onDisconnected:_,noteInbound:f,dispose(){_(),d(),k.stop(),g&&(window.removeEventListener("focus",w),window.removeEventListener("pageshow",w),window.removeEventListener("online",y)),R&&(document.removeEventListener("visibilitychange",w),document.removeEventListener("keydown",C,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}))}}}const Ei=[200,400,800,1600,3200];function bl(t){return t<Ei.length?Ei[t]:t<Ei.length+Ao?ul:_l}function yl(t){return t>=Ei.length+Ao}function Cl(t){const e=t.timeoutMs??fl,i=t.setTimeoutFn??setTimeout,s=t.clearTimeoutFn??clearTimeout;let r=null;const n=()=>{r!==null&&(s(r),r=null)};return{clear:n,arm(o){n(),r=i(()=>{if(r=null,!t.isCancelled()&&t.isCurrent(o)&&o.readyState===t.connectingState)try{o.close()}catch{}},e)}}}function xl(t){const e=t.role==="writer"||t.role==="reader"?t.role:void 0,i=t.shellKind==="pwsh"||t.shellKind==="cmd"||t.shellKind==="posix"?t.shellKind:void 0;return{role:e,shellKind:i,replayOnly:typeof t.replayOnly=="boolean"?t.replayOnly:!1,scrollbackBytes:typeof t.scrollbackBytes=="number"&&t.scrollbackBytes>=0?t.scrollbackBytes:null,retentionDays:typeof t.retentionDays=="number"&&t.retentionDays>0?t.retentionDays:null,scrollbackDir:typeof t.scrollbackDir=="string"&&t.scrollbackDir.length>0?t.scrollbackDir:null,terminalReset:typeof t.terminalReset=="boolean"?t.terminalReset:!1,ptyReused:typeof t.ptyReused=="boolean"?t.ptyReused:!1}}function kl(t){return typeof window>"u"?"":`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/terminal/${encodeURIComponent(t)}/ws`}function Ll(t){const{taskId:e,urlOverride:i,enabled:s=!0,onData:r,onBackpressure:n,onReadOnly:o,onReplaySnapshot:l}=t,h=M.useRef(r),a=M.useRef(n),c=M.useRef(o),d=M.useRef(l);M.useEffect(()=>{h.current=r},[r]),M.useEffect(()=>{a.current=n},[n]),M.useEffect(()=>{c.current=o},[o]),M.useEffect(()=>{d.current=l},[l]);const[u,_]=M.useState(!1),[f,m]=M.useState(null),[w,y]=M.useState(null),[C,k]=M.useState(null),[g,R]=M.useState(null),[B,F]=M.useState(null),[N,V]=M.useState(null),[J,$]=M.useState(null),[S,p]=M.useState(null),[v,b]=M.useState(!1),[L,x]=M.useState(null),[A,E]=M.useState(0),[D,W]=M.useState(!1),[Q,I]=M.useState(!1),U=M.useRef(null),H=M.useRef(null),ee=M.useRef(0),Y=M.useRef(null),j=M.useRef(!1),ie=M.useCallback(()=>{_(!1),m(null),y(null),k(null),R(null),F(null),V(null),$(null),p(null),b(!1),W(!1),I(!1)},[]),Ke=M.useCallback(he=>{const me=U.current;if(!(!me||me.readyState!==WebSocket.OPEN))try{me.send(JSON.stringify(he))}catch{}},[]);return M.useEffect(()=>{if(!s||!e){ie(),Y.current=null,j.current=!1;return}Y.current=null,j.current=!1;let he=!1;const me=Cl({connectingState:WebSocket.CONNECTING,isCancelled:()=>he,isCurrent:Ye=>U.current===Ye}),$e=()=>{if(he)return;Y.current=null;const Ye=i??kl(e);let Ge;try{Ge=new WebSocket(Ye)}catch(nt){x(String(nt)),G();return}U.current=Ge,me.arm(Ge),Ge.addEventListener("open",()=>{he||(me.clear(),b(!0),ee.current=0,E(0),W(!1),I(!1),x(null),rt.onConnected())}),Ge.addEventListener("message",nt=>{var qr,Vr,Yr,Gr;if(he)return;let mt;try{mt=JSON.parse(typeof nt.data=="string"?nt.data:"")}catch{return}if(!mt||typeof mt!="object")return;const Z=mt;if(rt.noteInbound(),Z.type==="ready"){const Te=xl(Z);Te.role&&m(Te.role),Te.shellKind&&y(Te.shellKind),k(Te.replayOnly),Y.current=Te.replayOnly,Te.replayOnly&&(j.current=!0,rt.onDisconnected(),W(!1),I(!1)),R(Te.scrollbackBytes),F(Te.retentionDays),V(Te.scrollbackDir),$(Te.terminalReset),p(Te.ptyReused),_(!0);return}if(Z.type==="data"&&typeof Z.payload=="string"){(qr=h.current)==null||qr.call(h,Z.payload);return}if(Z.type==="backpressure"){const Te=jr=>typeof jr=="number"?jr:0;(Vr=a.current)==null||Vr.call(a,{droppedBytes:Te(Z.droppedBytes),droppedChunks:Te(Z.droppedChunks),totalDroppedBytes:Te(Z.totalDroppedBytes),episode:Te(Z.episode),episodeEnded:Z.episodeEnded===!0});return}if(Z.type==="read_only"){(Yr=c.current)==null||Yr.call(c);return}if(Z.type==="scrollback-meta"){typeof Z.scrollbackBytes=="number"&&Z.scrollbackBytes>=0&&R(Z.scrollbackBytes);return}if(Z.type==="writer-promoted"){m("writer");return}if(Z.type==="replay_snapshot"&&typeof Z.data=="string"&&typeof Z.cols=="number"&&typeof Z.rows=="number"&&typeof Z.terminalVersion=="string"){(Gr=d.current)==null||Gr.call(d,{data:Z.data,cols:Z.cols,rows:Z.rows,terminalVersion:Z.terminalVersion});return}}),Ge.addEventListener("close",nt=>{if(he)return;me.clear(),b(!1),_(!1),U.current=null,rt.onDisconnected();const mt=nt==null?void 0:nt.code,Z=Y.current===!0&&mt===1e3;Y.current=null,!Z&&G()}),Ge.addEventListener("error",()=>{he||x("websocket error")})},G=()=>{if(he||j.current)return;const Ye=ee.current,Ge=bl(Ye);ee.current=Ye+1,Ye<Ei.length&&E(ee.current),W(!0),yl(Ye)&&I(!0),H.current=setTimeout(()=>{he||$e()},Ge)},rt=wl({getSocket:()=>U.current,openState:WebSocket.OPEN,isReplayOnly:()=>j.current,isCancelled:()=>he,rearmBudget:()=>{ee.current=0,E(0)},reconnect:()=>{H.current&&(clearTimeout(H.current),H.current=null),$e()}});return $e(),()=>{he=!0,rt.dispose(),me.clear(),H.current&&(clearTimeout(H.current),H.current=null);const Ye=U.current;if(U.current=null,Ye)try{Ye.close(1e3,"unmount")}catch{}ie(),Y.current=null}},[s,e,i,ie]),{ready:u,role:f,shellKind:w,replayOnly:C,scrollbackBytes:g,retentionDays:B,scrollbackDir:N,terminalReset:J,ptyReused:S,lastError:L,reconnectAttempts:A,reconnecting:D,reconnectStalled:Q,send:Ke,open:v}}function El(t){if(t.type!=="keydown"||t.metaKey||t.altKey)return"passthrough";const e=t.key.toLowerCase(),i=t.key==="Insert";return t.ctrlKey&&!t.shiftKey&&e==="v"||t.shiftKey&&!t.ctrlKey&&i?"paste":"passthrough"}async function Rl(){if(typeof navigator>"u"||!navigator.clipboard||typeof navigator.clipboard.readText!="function")return{ok:!1,reason:"unavailable"};try{return{ok:!0,text:await navigator.clipboard.readText()}}catch{return{ok:!1,reason:"denied"}}}function Ml(t){const{term:e,isDisposed:i,notify:s,readClipboard:r}=t;return n=>El(n)!=="paste"?!0:(n.preventDefault(),n.stopPropagation(),n.repeat||r().then(o=>{i()||(o.ok?o.text&&e.paste(o.text):o.reason==="unavailable"?s("paste-hint"):s("paste-failed"))}),!1)}const Zr=1e6;function Bl(t){if(typeof atob!="function")return null;try{const e=atob(t.trim());try{return decodeURIComponent(Array.from(e).map(i=>"%"+i.charCodeAt(0).toString(16).padStart(2,"0")).join(""))}catch{return e}}catch{return null}}function Tl(t){const e=t.indexOf(";"),i=e>=0?t.slice(e+1):t;if(i==="?")return{kind:"read"};if(i.length>Math.ceil(Zr*4/3)+4)return{kind:"invalid"};const s=Bl(i);return s===null?{kind:"invalid"}:s.length>Zr?{kind:"invalid"}:{kind:"write",text:s}}function Al(t){const{copy:e,isDisposed:i,onError:s}=t;return r=>{const n=Tl(r);return n.kind==="write"&&n.text&&e(n.text).catch(()=>{i!=null&&i()||s==null||s()}),!0}}const Dl="\x1B",Pl=new RegExp("^"+Dl+"\\[<(\\d+);\\d+;\\d+[Mm]$");function Ol(t){const e=Pl.exec(t);if(!e)return!1;const i=Number(e[1]);return i<64&&(i&3)===2}const Il=0;function Fl(){return{active:!1,identifier:null,lastY:0,pixelAccumulator:0}}function $l(t,e,i){if(i<=0)return 0;t.pixelAccumulator+=e;const s=Math.trunc(t.pixelAccumulator/i);return s!==0&&(t.pixelAccumulator-=s*i),s}function Nl(t,e,i={}){const s=Fl(),r=i.getPixelsPerLine??Hl,n=e.style.getPropertyValue("touch-action");e.style.setProperty("touch-action","none");const o=a=>{if(a.touches.length!==1){s.active=!1,s.identifier=null;return}const c=a.touches[0];s.active=!0,s.identifier=c.identifier,s.lastY=c.clientY,s.pixelAccumulator=0},l=a=>{if(!s.active||s.identifier===null)return;let c=null;for(let _=0;_<a.touches.length;_++)if(a.touches[_].identifier===s.identifier){c=a.touches[_];break}if(!c)return;const d=s.lastY-c.clientY;s.lastY=c.clientY;const u=r(t,e);Wl(t,s,d,u,c.clientX,c.clientY),a.cancelable&&a.preventDefault()},h=()=>{s.active=!1,s.identifier=null,s.pixelAccumulator=0};return e.addEventListener("touchstart",o,{passive:!0}),e.addEventListener("touchmove",l,{passive:!1}),e.addEventListener("touchend",h,{passive:!0}),e.addEventListener("touchcancel",h,{passive:!0}),()=>{e.removeEventListener("touchstart",o),e.removeEventListener("touchmove",l),e.removeEventListener("touchend",h),e.removeEventListener("touchcancel",h),n?e.style.setProperty("touch-action",n):e.style.removeProperty("touch-action")}}function Wl(t,e,i,s,r,n){const o=t.element??null,l=t.buffer.active.type==="alternate";if(o&&l){i!==0&&zl(o,i,r,n);return}const h=$l(e,i,s);h!==0&&t.scrollLines(h)}function zl(t,e,i,s){t.dispatchEvent(new WheelEvent("wheel",{deltaY:e,deltaMode:Il,clientX:i,clientY:s,bubbles:!0,cancelable:!0}))}function Hl(t,e){const i=e.querySelector(".xterm-rows");if(i&&i.children.length>0){const r=i.children[0].getBoundingClientRect().height;if(r>0)return r}if(t.rows>0){const s=e.clientHeight/t.rows;if(s>0)return s}return 18}const Ul=150;function Kl(t,e,i,s={}){const r=s.requestFrame??(_=>requestAnimationFrame(_)),n=s.cancelFrame??(_=>cancelAnimationFrame(_)),o=s.setTimer??((_,f)=>setTimeout(_,f)),l=s.clearTimer??(_=>clearTimeout(_));let h=null,a=null;const c=()=>{if(!i())try{t.refresh(0,t.rows-1)}catch{}},d=()=>{i()||(h===null&&(h=r(()=>{h=null,c()})),a!==null&&l(a),a=o(()=>{var _,f;if(a=null,c(),!i())try{(f=(_=s.getHealAtlas)==null?void 0:_.call(s))==null||f()}catch{}},Ul))},u=t.onScroll(d);return e.addEventListener("wheel",d,{passive:!0}),()=>{h!==null&&(n(h),h=null),a!==null&&(l(a),a=null);try{u.dispose()}catch{}e.removeEventListener("wheel",d)}}const ql=450,Vl=3e3;function Yl(t,e,i={}){const s=i.requestFrame??(k=>requestAnimationFrame(k)),r=i.cancelFrame??(k=>cancelAnimationFrame(k)),n=i.setTimer??((k,g)=>setTimeout(k,g)),o=i.clearTimer??(k=>clearTimeout(k));let l=!1,h=null,a=null,c=null;const d=()=>{if(!e())try{t.refresh(0,t.rows-1)}catch{}},u=()=>{h===null&&(h=s(()=>{h=null,d()}))},_=()=>{a!==null&&(o(a),a=null)},f=()=>{l=!1,_(),c!==null&&(o(c),c=null),h!==null&&(r(h),h=null)},m=()=>{e()||(l=!0,_(),c!==null&&o(c),c=n(f,Vl))},w=()=>{!l||e()||(u(),_(),a=n(f,ql))},y=t.onWriteParsed(w),C=t.onResize(m);return{arm:m,dispose(){f();try{y.dispose()}catch{}try{C.dispose()}catch{}}}}/**
|
|
2
2
|
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
3
3
|
* @license MIT
|
|
4
4
|
*
|
package/client/dist/assets/{MarkdownEditorModal-DL5uF6Nn.js → MarkdownEditorModal-CP5yG9OU.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Ld=Object.defineProperty;var Pd=(t,e,n)=>e in t?Ld(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Wo=(t,e,n)=>Pd(t,typeof e!="symbol"?e+"":e,n);import{i as Ee,r as z,R as le,k as zd,g as Bd,l as Vl,m as Wl,j as T,U as $d,L as Hd,A as Uo,n as jd,P as qd,O as Vd,C as Wd,F as Ud,o as Kd,p as Jd,X as Gd,q as Zd,I as Yd,t as Ko,v as Qd}from"./index-
|
|
1
|
+
var Ld=Object.defineProperty;var Pd=(t,e,n)=>e in t?Ld(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Wo=(t,e,n)=>Pd(t,typeof e!="symbol"?e+"":e,n);import{i as Ee,r as z,R as le,k as zd,g as Bd,l as Vl,m as Wl,j as T,U as $d,L as Hd,A as Uo,n as jd,P as qd,O as Vd,C as Wd,F as Ud,o as Kd,p as Jd,X as Gd,q as Zd,I as Yd,t as Ko,v as Qd}from"./index-CU2QJgvx.js";/**
|
|
2
2
|
* @license lucide-react v0.400.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/client/dist/assets/{abnfDiagram-VRR7QNED-BcoPVcm6.js → abnfDiagram-VRR7QNED-C-W_2Jd4.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-
|
|
1
|
+
import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-C95323ja.js";import{p as f}from"./chunk-JWPE2WC7-Dcq-lWyX.js";import{_ as n,l as o}from"./mermaid.core-c-L4qgSB.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-BRfS3cHo.js";import"./index-CU2QJgvx.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},B={parser:R,db:a,renderer:u,styles:p};export{B as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Y as ln,$ as an,a0 as F,a1 as q,a2 as j,a3 as un,a4 as y,a5 as tn,a6 as J,a7 as _,a8 as rn,a9 as o,aa as on,ab as sn,ac as fn}from"./mermaid.core-
|
|
1
|
+
import{Y as ln,$ as an,a0 as F,a1 as q,a2 as j,a3 as un,a4 as y,a5 as tn,a6 as J,a7 as _,a8 as rn,a9 as o,aa as on,ab as sn,ac as fn}from"./mermaid.core-c-L4qgSB.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,z,a){var O=I-l,i=D-h,n=z-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function U(l,h,I,D,v,A,z){var a=l-I,O=h-D,i=(z?A:-A)/J(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,B=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*J(on(0,T*T*R-P*P)),Y=(P*g-m*S)/R,$=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=Y-B,e=$-t,r=w-B,C=p-t;return x*x+e*e>r*r+C*C&&(Y=w,$=p),{cx:Y,cy:$,x01:-n,y01:-d,x11:Y*(v/T-1),y11:$*(v/T-1)}}function hn(){var l=cn,h=yn,I=j(0),D=null,v=gn,A=dn,z=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,B=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(B>tn-y)a.moveTo(s*F(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*F(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=B,S=B,Y=z.apply(this,arguments)/2,$=Y>y&&(D?+D.apply(this,arguments):J(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if($>y){var C=sn($/u*q(Y)),K=sn($/s*q(Y));(P-=C*2)>y?(C*=t?1:-1,R+=C,T-=C):(P=0,R=T=(f+c)/2),(S-=K*2)>y?(K*=t?1:-1,m+=K,g-=K):(S=0,m=g=(f+c)/2)}var G=s*F(m),H=s*q(m),L=u*F(T),M=u*q(T);if(w>y){var N=s*F(g),Q=s*q(g),V=u*F(R),W=u*q(R),E;if(B<an)if(E=pn(G,H,V,W,N,Q,L,M)){var X=G-E[0],Z=H-E[1],b=N-E[0],k=Q-E[1],nn=1/q(fn((X*b+Z*k)/(J(X*X+Z*Z)*J(b*b+k*k)))/2),en=J(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=U(V,W,G,H,s,x,t),r=U(N,Q,L,M,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(G,H),a.arc(0,0,s,m,g,!t)):a.moveTo(G,H),!(u>y)||!(P>y)?a.lineTo(L,M):p>y?(e=U(L,M,N,Q,u,-p,t),r=U(G,H,V,W,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[F(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:j(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:j(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:j(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:j(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:j(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:j(+n),i):A},i.padAngle=function(n){return arguments.length?(z=typeof n=="function"?n:j(+n),i):z},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
|