ompchamber 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -6
- package/dist/client/index.html +1 -1
- package/dist/client/static/css/{index.5291f58223.css → index.51f68210a5.css} +1 -1
- package/dist/client/static/js/async/{3y.ededeebde8.js → 3y.4c2596f64c.js} +3 -3
- package/dist/client/static/js/async/73.308dff4da8.js +1 -0
- package/dist/client/static/js/async/{ty.3d93cf5f5f.js → 7g.a7814350c3.js} +1 -1
- package/dist/client/static/js/async/a.bce4542392.js +1 -0
- package/dist/client/static/js/async/g.86e2256a70.js +2 -0
- package/dist/client/static/js/async/hn.b645041e00.js +1 -0
- package/dist/client/static/js/async/{jg.69a4beade8.js → jg.d86ebd4013.js} +1 -1
- package/dist/client/static/js/async/l.12dd34e1be.js +1 -0
- package/dist/client/static/js/async/ls.9d9a01026c.js +104 -0
- package/dist/client/static/js/async/mw.ca1512563c.js +10 -0
- package/dist/client/static/js/async/nk.fc7e58325e.js +1 -0
- package/dist/client/static/js/async/{q.7fb4d2f374.js → q.542c184fec.js} +3 -3
- package/dist/client/static/js/async/t.cda4891526.js +1 -0
- package/dist/client/static/js/async/tr.e878658140.js +309 -0
- package/dist/client/static/js/async/uf.24ca3d49c3.js +2 -0
- package/dist/client/static/js/index.eccad0b70a.js +33 -0
- package/dist/client/static/js/{uy.5f791144ce.js → uy.2e8929ed0c.js} +2 -2
- package/package.json +15 -5
- package/src/cli/lib/args.js +6 -6
- package/src/cli/lib/commands/logs.js +76 -34
- package/src/cli/lib/commands/restart.js +40 -8
- package/src/cli/lib/commands/serve.js +12 -4
- package/src/cli/lib/commands/status.js +40 -18
- package/src/cli/lib/commands/stop.js +12 -7
- package/src/cli/lib/commands/update.js +23 -12
- package/src/cli/lib/paths.js +8 -28
- package/src/cli/lib/runtime.js +121 -108
- package/src/client/components/common/code-editor/index.tsx +5 -1
- package/src/client/components/common/code-surface/index.tsx +49 -1
- package/src/client/components/common/code-surface/measure.ts +99 -0
- package/src/client/components/layout/RightActivityBar.tsx +42 -69
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +5 -6
- package/src/client/components/layout/desktop-layout/index.tsx +11 -9
- package/src/client/components/layout/desktop-layout/resizer/index.tsx +22 -29
- package/src/client/components/layout/desktop-layout/resizer/utils.test.ts +33 -0
- package/src/client/components/layout/desktop-layout/resizer/utils.ts +34 -0
- package/src/client/components/mobile/RightSidebar.tsx +42 -119
- package/src/client/components/mobile/mobile-main-view/Header.tsx +17 -1
- package/src/client/components/workspace/editor/index.tsx +4 -1
- package/src/client/hooks/chat/omp/index.ts +4 -109
- package/src/client/hooks/chat/omp/prompt-send.ts +161 -0
- package/src/client/hooks/chat/timeline/send.ts +3 -2
- package/src/client/hooks/editor/use-file-editor.test.ts +158 -0
- package/src/client/hooks/editor/use-file-editor.ts +35 -19
- package/src/server/index.ts +52 -1
- package/src/server/lib/lifecycle/bun.ts +18 -0
- package/src/server/lib/lifecycle/identity.ts +108 -0
- package/src/server/lib/lifecycle/instance.ts +102 -0
- package/src/server/lib/lifecycle/launch-mode.test.ts +32 -0
- package/src/server/lib/lifecycle/launch-mode.ts +40 -0
- package/src/server/lib/lifecycle/occupant.ts +101 -0
- package/src/server/lib/lifecycle/paths.ts +50 -0
- package/src/server/lib/lifecycle/port-guard.ts +170 -0
- package/src/server/lib/lifecycle/probe.ts +121 -0
- package/src/server/lib/lifecycle/restart.test.ts +21 -0
- package/src/server/lib/lifecycle/restart.ts +111 -0
- package/src/server/lib/omp/rpc/session-commands.ts +15 -1
- package/src/server/lib/updates/apply.ts +8 -5
- package/src/server/lib/updates/install.ts +7 -4
- package/src/server/plugins/static.test.ts +63 -0
- package/src/server/plugins/static.ts +28 -4
- package/src/server/routes/health/probe.ts +9 -0
- package/src/shared/lib/markdown/mermaid.ts +8 -0
- package/src/shared/lib/omp/session/stream-state.server.ts +16 -1
- package/src/shared/lib/workspace/panel-widths.test.ts +5 -5
- package/src/shared/lib/workspace/panel-widths.ts +23 -10
- package/src/shared/lib/workspace/right-panels.ts +10 -4
- package/dist/client/static/js/async/73.50280ce58d.js +0 -1
- package/dist/client/static/js/async/a.e05da304c8.js +0 -10
- package/dist/client/static/js/async/ar.1e14da5588.js +0 -1
- package/dist/client/static/js/async/g.7a4bbd4798.js +0 -2
- package/dist/client/static/js/async/hn.7568bdb58b.js +0 -1
- package/dist/client/static/js/async/l.102a97fce6.js +0 -104
- package/dist/client/static/js/async/l6.c56640c205.js +0 -1
- package/dist/client/static/js/async/nk.6de011832e.js +0 -1
- package/dist/client/static/js/async/t.cb3fcf8615.js +0 -1
- package/dist/client/static/js/async/uf.46ad6209fa.js +0 -2
- package/dist/client/static/js/async/vn.e98e2f3b61.js +0 -309
- package/dist/client/static/js/index.0ac93ee878.js +0 -33
- /package/dist/client/static/js/async/{3y.ededeebde8.js.LICENSE.txt → 3y.4c2596f64c.js.LICENSE.txt} +0 -0
- /package/dist/client/static/js/async/{g.7a4bbd4798.js.LICENSE.txt → g.86e2256a70.js.LICENSE.txt} +0 -0
- /package/dist/client/static/js/async/{a.e05da304c8.js.LICENSE.txt → mw.ca1512563c.js.LICENSE.txt} +0 -0
- /package/dist/client/static/js/async/{q.7fb4d2f374.js.LICENSE.txt → q.542c184fec.js.LICENSE.txt} +0 -0
- /package/dist/client/static/js/async/{uf.46ad6209fa.js.LICENSE.txt → uf.24ca3d49c3.js.LICENSE.txt} +0 -0
- /package/dist/client/static/js/{index.0ac93ee878.js.LICENSE.txt → index.eccad0b70a.js.LICENSE.txt} +0 -0
- /package/dist/client/static/js/{uy.5f791144ce.js.LICENSE.txt → uy.2e8929ed0c.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([[73],{tc(e,r,t){var n=t("I6"),a=t("P0");t("MM"),t("Yr");var s=t("M4"),p=t("Gt"),i=t("Xe"),l=(0,i.WG)().RailroadEbnf.parser.LangiumParser,o=(0,p.K)(e=>{let r=e.alternatives.map(m);return 1===r.length?r[0]:{type:"choice",alternatives:r}},"transformChoice"),m=(0,p.K)(e=>{let r=e.elements.map(f);return 1===r.length?r[0]:{type:"sequence",elements:r}},"transformSequence"),u=(0,p.K)(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 o(e.element);case"EbnfOptional":return{type:"optional",element:o(e.element)};case"EbnfRepetition":return{type:"repetition",element:o(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),c=(0,p.K)((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:"-"},u(r.except)]};default:throw Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),f=(0,p.K)(e=>e.postfixes.reduce((e,r)=>c(e,r),u(e.base)),"transformTerm"),d=(0,p.K)(e=>({name:e.name,definition:o(e.definition)}),"transformRule"),b=(0,p.K)(e=>{(0,a.S)(e,n.db),e.title&&n.db.setTitle(e.title),e.rules.map(e=>n.db.addRule(d(e)))},"populateDb"),y={parser:{parse:(0,p.K)(e=>{n.db.clear(),s.R.debug("[EBNF Parser] Starting Langium parse");let r=l.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new i.zg(r);let t=r.value;s.R.debug("[EBNF Parser] Parsed rules:",t.rules.length),b(t),s.R.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n.db}},db:n.db,renderer:n.U,styles:n.$};t.d(r,{diagram:()=>y})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["ty"],{vy(e,t,r){r.r(t),r.d(t,{applyDagreLayoutResult:()=>rW,getEdgesToRender:()=>rJ,measureDagreLayout:()=>r2,prepareLayoutForDagre:()=>r1,render:()=>r4,runDagreLayoutCore:()=>r3});var n,o,i,a=r("Ag"),u=r("ix"),d=r("LC"),c=r("bQ"),s=r("Ut");r("PF"),r("iV"),r("h5"),r("pK"),r("NH");var f=r("Yr"),l=r("M4"),g=r("Gt"),h=r("yz"),p=r("zL"),v=0,y=function(e){var t=++v;return(0,p.A)(e)+t},b=r("F7"),A=r("Ll"),w=function(e){return(null==e?0:e.length)?(0,A.A)(e,1):[]},m=r("Yk"),x=r("bQs"),E=r("hp"),j=r("xnM"),L=function(e,t){var r=-1,n=(0,j.A)(e)?Array(e.length):[];return(0,E.A)(e,function(e,o,i){n[++r]=t(e,o,i)}),n},k=r("D2"),O=function(e,t){return((0,k.A)(e)?m.A:L)(e,(0,x.A)(t,3))},R=Math.ceil,N=Math.max,P=function(e,t,r,n){for(var o=-1,i=N(R((t-e)/(r||1)),0),a=Array(i);i--;)a[n?i:++o]=e,e+=r;return a},C=r("TK"),S=r("s6"),M=r("cN"),_=function(e,t,r){if(!(0,M.A)(r))return!1;var n=typeof t;return("number"==n?!!((0,j.A)(r)&&(0,S.A)(t,r.length)):"string"==n&&t in r)&&(0,C.A)(r[t],e)},T=/\s/,X=function(e){for(var t=e.length;t--&&T.test(e.charAt(t)););return t},D=/^\s+/,I=r("I6"),B=/^[-+]0x[0-9a-f]+$/i,K=/^0b[01]+$/i,G=/^0o[0-7]+$/i,F=parseInt,U=function(e){if("number"==typeof e)return e;if((0,I.A)(e))return 0/0;if((0,M.A)(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=(0,M.A)(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=(t=e)?t.slice(0,X(t)+1).replace(D,""):t;var n=K.test(e);return n||G.test(e)?F(e.slice(2),n?2:8):B.test(e)?0/0:+e},q=function(e){return e?1/0===(e=U(e))||-1/0===e?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0},z=function(e,t,r){return r&&"number"!=typeof r&&_(e,t,r)&&(t=r=void 0),e=q(e),void 0===t?(t=e,e=0):t=q(t),r=void 0===r?e<t?1:-1:q(r),P(e,t,r,void 0)},J=r("v2");class Y{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return V(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&V(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,H)),r=r._prev;return"["+e.join(", ")+"]"}}function V(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function H(e,t){if("_next"!==e&&"_prev"!==e)return t}var $=b.A(1);function Q(e,t,r,n,o){var i=o?[]:void 0;return h.A(e.inEdges(n.v),function(n){var a=e.edge(n),u=e.node(n.v);o&&i.push({v:n.v,w:n.w}),u.out-=a,W(t,r,u)}),h.A(e.outEdges(n.v),function(n){var o=e.edge(n),i=n.w,a=e.node(i);a.in-=o,W(t,r,a)}),e.removeNode(n.v),i}function W(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}var Z=r("Zw"),ee=r("po"),et=function(e,t,r){"__proto__"==t&&ee.A?(0,ee.A)(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},er=function(e,t,r){(void 0===r||(0,C.A)(e[t],r))&&(void 0!==r||t in e)||et(e,t,r)},en=r("mm"),eo=r("CvH"),ei="object"==typeof exports&&exports&&!exports.nodeType&&exports,ea=ei&&"object"==typeof module&&module&&!module.nodeType&&module,eu=ea&&ea.exports===ei?eo.A.Buffer:void 0,ed=eu?eu.allocUnsafe:void 0,ec=function(e,t){if(t)return e.slice();var r=e.length,n=ed?ed(r):new e.constructor(r);return e.copy(n),n},es=r("XI"),ef=function(e){var t=new e.constructor(e.byteLength);return new es.A(t).set(new es.A(e)),t},el=function(e,t){var r=t?ef(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},eg=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t},eh=Object.create,ep=function(){function e(){}return function(t){if(!(0,M.A)(t))return{};if(eh)return eh(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),ev=(0,r("Tn").A)(Object.getPrototypeOf,Object),ey=r("a0"),eb=function(e){return"function"!=typeof e.constructor||(0,ey.A)(e)?{}:ep(ev(e))},eA=r("rFc"),ew=r("Lc"),em=r("Fr"),ex=r("Kg"),eE=r("qdn"),ej=r("iK"),eL=Object.prototype,ek=Function.prototype.toString,eO=eL.hasOwnProperty,eR=ek.call(Object),eN=function(e){if(!(0,ej.A)(e)||"[object Object]"!=(0,eE.A)(e))return!1;var t=ev(e);if(null===t)return!0;var r=eO.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ek.call(r)==eR},eP=r("Hm"),eC=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},eS=Object.prototype.hasOwnProperty,eM=function(e,t,r){var n=e[t];eS.call(e,t)&&(0,C.A)(n,r)&&(void 0!==r||t in e)||et(e,t,r)},e_=function(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var u=t[i],d=n?n(r[u],e[u],u,r,e):void 0;void 0===d&&(d=e[u]),o?et(r,u,d):eM(r,u,d)}return r},eT=r("cu"),eX=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},eD=Object.prototype.hasOwnProperty,eI=function(e){if(!(0,M.A)(e))return eX(e);var t=(0,ey.A)(e),r=[];for(var n in e)"constructor"==n&&(t||!eD.call(e,n))||r.push(n);return r},eB=function(e){return(0,j.A)(e)?(0,eT.A)(e,!0):eI(e)},eK=function(e,t,r,n,o,i,a){var u=eC(e,r),d=eC(t,r),c=a.get(d);if(c)return void er(e,r,c);var s=i?i(u,d,r+"",e,t,a):void 0,f=void 0===s;if(f){var l=(0,k.A)(d),g=!l&&(0,em.A)(d),h=!l&&!g&&(0,eP.A)(d);(s=d,l||g||h)?(0,k.A)(u)?s=u:(0,ew.A)(u)?s=eg(u):g?(f=!1,s=ec(d,!0)):h?(f=!1,s=el(d,!0)):s=[]:eN(d)||(0,eA.A)(d)?(s=u,(0,eA.A)(u))?s=e_(u,eB(u)):(!(0,M.A)(u)||(0,ex.A)(u))&&(s=eb(d)):f=!1}f&&(a.set(d,s),o(s,d,n,i,a),a.delete(d)),er(e,r,s)},eG=function e(t,r,n,o,i){t!==r&&(0,en.A)(r,function(a,u){if(i||(i=new Z.A),(0,M.A)(a))eK(t,r,u,n,e,o,i);else{var d=o?o(eC(t,u),a,u+"",t,r,i):void 0;void 0===d&&(d=a),er(t,u,d)}},eB)},eF=r("En"),eU=(n=function(e,t,r){eG(e,t,r)},(0,eF.A)(function(e,t){var r=-1,o=t.length,i=o>1?t[o-1]:void 0,a=o>2?t[2]:void 0;for(i=n.length>3&&"function"==typeof i?(o--,i):void 0,a&&_(t[0],t[1],a)&&(i=o<3?void 0:i,o=1),e=Object(e);++r<o;){var u=t[r];u&&n(e,u,r)}return e})),eq=r("sE"),ez=r("JA"),eJ=r("tU"),eY=function(e,t,r,n){if(!(0,M.A)(e))return e;t=(0,ez.A)(t,e);for(var o=-1,i=t.length,a=i-1,u=e;null!=u&&++o<i;){var d=(0,eJ.A)(t[o]),c=r;if("__proto__"===d||"constructor"===d||"prototype"===d)break;if(o!=a){var s=u[d];void 0===(c=n?n(s,d,u):void 0)&&(c=(0,M.A)(s)?s:(0,S.A)(t[o+1])?[]:{})}eM(u,d,c),u=u[d]}return e},eV=function(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],u=(0,eq.A)(e,a);r(u,a)&&eY(i,(0,ez.A)(a,e),u)}return i},eH=r("ABL"),e$=r("rT"),eQ=r("Tl"),eW=(o=function(e,t){return null==e?{}:eV(e,t,function(t,r){return(0,eH.A)(e,r)})},(0,eQ.A)((0,e$.A)(o,void 0,w),o+"")),eZ=Object.prototype,e0=eZ.hasOwnProperty,e1=(0,eF.A)(function(e,t){e=Object(e);var r=-1,n=t.length,o=n>2?t[2]:void 0;for(o&&_(t[0],t[1],o)&&(n=1);++r<n;)for(var i=t[r],a=eB(i),u=-1,d=a.length;++u<d;){var c=a[u],s=e[c];(void 0===s||(0,C.A)(s,eZ[c])&&!e0.call(e,c))&&(e[c]=i[c])}return e}),e2=function(e,t,r){for(var n=-1,o=e.length;++n<o;){var i=e[n],a=t(i);if(null!=a&&(void 0===u?a==a&&!(0,I.A)(a):r(a,u)))var u=a,d=i}return d},e3=function(e,t){return e>t},e6=r("Bo"),e8=function(e){return e&&e.length?e2(e,e6.A,e3):void 0},e4=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},e5=r("c4"),e7=function(e,t){var r={};return t=(0,x.A)(t,3),(0,e5.A)(e,function(e,n,o){et(r,n,t(e,n,o))}),r},e9=r("iO"),te=function(e,t){return e<t},tt=function(e){return e&&e.length?e2(e,e6.A,te):void 0},tr=Object.prototype.hasOwnProperty,tn=function(e,t){return null!=e&&tr.call(e,t)},to=r("n8"),ti=function(e,t){return null!=e&&(0,to.A)(e,t,tn)};function ta(e,t,r,n){var o;do o=y(n);while(e.hasNode(o))return r.dummy=t,e.setNode(o,r),o}function tu(e){var t=new J.T({multigraph:e.isMultigraph()}).setGraph(e.graph());return h.A(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),h.A(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function td(e,t){var r,n,o=e.x,i=e.y,a=t.x-o,u=t.y-i,d=e.width/2,c=e.height/2;if(!a&&!u)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(u)*d>Math.abs(a)*c?(u<0&&(c=-c),r=c*a/u,n=c):(a<0&&(d=-d),r=d,n=d*u/a),{x:o+r,y:i+n}}function tc(e){var t=O(z(tf(e)+1),function(){return[]});return h.A(e.nodes(),function(r){var n=e.node(r),o=n.rank;e9.A(o)||(t[o][n.order]=r)}),t}function ts(e,t,r,n){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=n),ta(e,"border",o,t)}function tf(e){return e8(O(e.nodes(),function(t){var r=e.node(t).rank;if(!e9.A(r))return r}))}function tl(e,t){return t()}function tg(e,t,r,n,o,i){var a=o[t][i-1],u=ta(e,"border",{width:0,height:0,rank:i,borderType:t},r);o[t][i]=u,e.setParent(u,n),a&&e.setEdge(a,u,{weight:1})}function th(e){h.A(e.nodes(),function(t){tp(e.node(t))}),h.A(e.edges(),function(t){tp(e.edge(t))})}function tp(e){var t=e.width;e.width=e.height,e.height=t}function tv(e){e.y=-e.y}function ty(e){var t=e.x;e.x=e.y,e.y=t}var tb=function(e,t){return e&&e.length?e2(e,(0,x.A)(t,2),te):void 0};function tA(e){var t={};h.A(e.sources(),function r(n){var o=e.node(n);if(Object.prototype.hasOwnProperty.call(t,n))return o.rank;t[n]=!0;var i=tt(O(e.outEdges(n),function(t){return r(t.w)-e.edge(t).minlen}));return(1/0===i||null==i)&&(i=0),o.rank=i})}function tw(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}function tm(e){var t,r,n=new J.T({directed:!1}),o=e.nodes()[0],i=e.nodeCount();for(n.setNode(o,{});function(e,t){return h.A(e.nodes(),function r(n){h.A(t.nodeEdges(n),function(o){var i=o.v,a=n===i?o.w:i;e.hasNode(a)||tw(t,o)||(e.setNode(a,{}),e.setEdge(n,a,{}),r(a))})}),e.nodeCount()}(n,e)<i;)t=function(e,t){return tb(t.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return tw(t,r)})}(n,e),r=n.hasNode(t.v)?tw(e,t):-tw(e,t),function(e,t,r){h.A(e.nodes(),function(e){t.node(e).rank+=r})}(n,e,r);return n}var tx=r("Fv"),tE=r("YT"),tj=function(e){var t=q(e),r=t%1;return t==t?r?t-r:t:0},tL=Math.max,tk=(i=function(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var o=null==r?0:tj(r);return o<0&&(o=tL(n+o,0)),(0,tE.A)(e,(0,x.A)(t,3),o)},function(e,t,r){var n=Object(e);if(!(0,j.A)(e)){var o=(0,x.A)(t,3);e=(0,tx.A)(e),t=function(e){return o(n[e],e,n)}}var a=i(e,t,r);return a>-1?n[o?e[a]:a]:void 0}),tO=r("Os6");b.A(1),b.A(1);var tR=r("yg"),tN=r("VB"),tP=(0,r("bl").A)("length"),tC=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),tS="\\ud800-\\udfff",tM="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",t_="\\ud83c[\\udffb-\\udfff]",tT="[^"+tS+"]",tX="(?:\\ud83c[\\udde6-\\uddff]){2}",tD="[\\ud800-\\udbff][\\udc00-\\udfff]",tI="(?:"+tM+"|"+t_+")?",tB="[\\ufe0e\\ufe0f]?",tK="(?:\\u200d(?:"+[tT,tX,tD].join("|")+")"+tB+tI+")*",tG=RegExp(t_+"(?="+t_+")|"+("(?:"+[tT+tM+"?",tM,tX,tD,"["+tS+"]"].join("|"))+")"+(tB+tI+tK),"g");function tF(){}function tU(e,t,r){k.A(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],i={};return h.A(t,function(t){if(!e.hasNode(t))throw Error("Graph does not have node: "+t);!function e(t,r,n,o,i,a){!Object.prototype.hasOwnProperty.call(o,r)&&(o[r]=!0,n||a.push(r),h.A(i(r),function(r){e(t,r,n,o,i,a)}),n&&a.push(r))}(e,t,"post"===r,i,n,o)}),o}function tq(e){t=e,r=new J.T().setGraph(t.graph()),h.A(t.nodes(),function(e){r.setNode(e,t.node(e))}),h.A(t.edges(),function(e){var n=r.edge(e.v,e.w)||{weight:0,minlen:1},o=t.edge(e);r.setEdge(e.v,e.w,{weight:n.weight+o.weight,minlen:Math.max(n.minlen,o.minlen)})}),tA(e=r);var t,r,n,o,i=tm(e);for(tY(i),tz(i,e);n=tV(i);)o=tH(i,e,n),t$(i,e,n,o)}function tz(e,t){var r=tU(e,e.nodes(),"post");r=r.slice(0,r.length-1),h.A(r,function(r){var n,o,i,a;n=e,o=t,i=r,a=n.node(i).parent,n.edge(i,a).cutvalue=tJ(n,o,i)})}function tJ(e,t,r){var n=e.node(r).parent,o=!0,i=t.edge(r,n),a=0;return i||(o=!1,i=t.edge(n,r)),a=i.weight,h.A(t.nodeEdges(r),function(i){var u=i.v===r,d=u?i.w:i.v;if(d!==n){var c,s,f,l=u===o,g=t.edge(i).weight;if(a+=l?g:-g,c=e,s=r,f=d,c.hasEdge(s,f)){var h=e.edge(r,d).cutvalue;a+=l?-h:h}}}),a}function tY(e,t){arguments.length<2&&(t=e.nodes()[0]),function e(t,r,n,o,i){var a=n,u=t.node(o);return r[o]=!0,h.A(t.neighbors(o),function(i){Object.prototype.hasOwnProperty.call(r,i)||(n=e(t,r,n,i,o))}),u.low=a,u.lim=n++,i?u.parent=i:delete u.parent,n}(e,{},1,t)}function tV(e){return tk(e.edges(),function(t){return e.edge(t).cutvalue<0})}function tH(e,t,r){var n=r.v,o=r.w;t.hasEdge(n,o)||(n=r.w,o=r.v);var i=e.node(n),a=e.node(o),u=i,d=!1;return i.lim>a.lim&&(u=a,d=!0),tb(tO.A(t.edges(),function(t){return d===tQ(e,e.node(t.v),u)&&d!==tQ(e,e.node(t.w),u)}),function(e){return tw(t,e)})}function t$(e,t,r,n){var o,i,a,u,d=r.v,c=r.w;e.removeEdge(d,c),e.setEdge(n.v,n.w,{}),tY(e),tz(e,t),o=e,i=t,a=tk(o.nodes(),function(e){return!i.node(e).parent}),u=(u=tU(o,a,"pre")).slice(1),h.A(u,function(e){var t=o.node(e).parent,r=i.edge(e,t),n=!1;r||(r=i.edge(t,e),n=!0),i.node(e).rank=i.node(t).rank+(n?r.minlen:-r.minlen)})}function tQ(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}tF.prototype=Error(),r("nB"),tq.initLowLimValues=tY,tq.initCutValues=tz,tq.calcCutValue=tJ,tq.leaveEdge=tV,tq.enterEdge=tH,tq.exchangeEdges=t$;var tW=r("wF"),tZ=r("Ep"),t0=r("C0"),t1=r("FI"),t2=r("sA"),t3=r("MX"),t6=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,t2.A)(t,(0,t1.A)(e)),e=ev(e);return t}:t3.A,t8=r("uN"),t4=r("Qz"),t5=function(e){return(0,t4.A)(e,eB,t6)},t7=Object.prototype.hasOwnProperty,t9=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&t7.call(e,"index")&&(r.index=e.index,r.input=e.input),r},re=function(e,t){var r=t?ef(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},rt=/\w*$/,rr=function(e){var t=new e.constructor(e.source,rt.exec(e));return t.lastIndex=e.lastIndex,t},rn=r("Iu"),ro=rn.A?rn.A.prototype:void 0,ri=ro?ro.valueOf:void 0,ra=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return ef(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return re(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return el(e,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return rr(e);case"[object Symbol]":return ri?Object(ri.call(e)):{}}},ru=r("kj"),rd=r("LP"),rc=rd.A&&rd.A.isMap,rs=rc?(0,ru.A)(rc):function(e){return(0,ej.A)(e)&&"[object Map]"==(0,tN.A)(e)},rf=rd.A&&rd.A.isSet,rl=rf?(0,ru.A)(rf):function(e){return(0,ej.A)(e)&&"[object Set]"==(0,tN.A)(e)},rg="[object Arguments]",rh="[object Function]",rp="[object Object]",rv={};rv[rg]=rv["[object Array]"]=rv["[object ArrayBuffer]"]=rv["[object DataView]"]=rv["[object Boolean]"]=rv["[object Date]"]=rv["[object Float32Array]"]=rv["[object Float64Array]"]=rv["[object Int8Array]"]=rv["[object Int16Array]"]=rv["[object Int32Array]"]=rv["[object Map]"]=rv["[object Number]"]=rv[rp]=rv["[object RegExp]"]=rv["[object Set]"]=rv["[object String]"]=rv["[object Symbol]"]=rv["[object Uint8Array]"]=rv["[object Uint8ClampedArray]"]=rv["[object Uint16Array]"]=rv["[object Uint32Array]"]=!0,rv["[object Error]"]=rv[rh]=rv["[object WeakMap]"]=!1;var ry=function e(t,r,n,o,i,a){var u,d=1&r,c=2&r,s=4&r;if(n&&(u=i?n(t,o,i,a):n(t)),void 0!==u)return u;if(!(0,M.A)(t))return t;var f=(0,k.A)(t);if(f){if(u=t9(t),!d)return eg(t,u)}else{var l,g,h,p,v=(0,tN.A)(t),y=v==rh||"[object GeneratorFunction]"==v;if((0,em.A)(t))return ec(t,d);if(v==rp||v==rg||y&&!i){if(u=c||y?{}:eb(t),!d)return c?(g=(l=u)&&e_(t,eB(t),l),e_(t,t6(t),g)):(p=(h=u)&&e_(t,(0,tx.A)(t),h),e_(t,(0,t1.A)(t),p))}else{if(!rv[v])return i?t:{};u=ra(t,v,d)}}a||(a=new Z.A);var b=a.get(t);if(b)return b;a.set(t,u),rl(t)?t.forEach(function(o){u.add(e(o,r,n,o,t,a))}):rs(t)&&t.forEach(function(o,i){u.set(i,e(o,r,n,i,t,a))});var A=s?c?t5:t8.A:c?eB:tx.A,w=f?void 0:A(t);return(0,t0.A)(w||t,function(o,i){w&&(o=t[i=o]),eM(u,i,e(o,r,n,i,t,a))}),u},rb=function(e,t,r){for(var n=-1,o=e.length,i=t.length,a={};++n<o;){var u=n<i?t[n]:void 0;r(a,e[n],u)}return a},rA=function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e},rw=function(e,t){if(e!==t){var r=void 0!==e,n=null===e,o=e==e,i=(0,I.A)(e),a=void 0!==t,u=null===t,d=t==t,c=(0,I.A)(t);if(!u&&!c&&!i&&e>t||i&&a&&d&&!u&&!c||n&&a&&d||!r&&d||!o)return 1;if(!n&&!i&&!c&&e<t||c&&r&&o&&!n&&!i||u&&r&&o||!a&&o||!d)return -1}return 0},rm=function(e,t,r){for(var n=-1,o=e.criteria,i=t.criteria,a=o.length,u=r.length;++n<a;){var d=rw(o[n],i[n]);if(d){if(n>=u)return d;return d*("desc"==r[n]?-1:1)}}return e.index-t.index},rx=function(e,t,r){t=t.length?(0,m.A)(t,function(e){return(0,k.A)(e)?function(t){return(0,eq.A)(t,1===e.length?e[0]:e)}:e}):[e6.A];var n=-1;return t=(0,m.A)(t,(0,ru.A)(x.A)),rA(L(e,function(e,r,o){return{criteria:(0,m.A)(t,function(t){return t(e)}),index:++n,value:e}}),function(e,t){return rm(e,t,r)})},rE=(0,eF.A)(function(e,t){if(null==e)return[];var r=t.length;return r>1&&_(e,t[0],t[1])?t=[]:r>2&&_(t[0],t[1],t[2])&&(t=[t[0]]),rx(e,(0,A.A)(t,1),[])});function rj(e,t,r){for(var n;t.length&&(n=e4(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function rL(e,t,r){return O(t,function(t){var n,o;return n=function(e){for(var t;e.hasNode(t=y("_root")););return t}(e),o=new J.T({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(t){return e.node(t)}),h.A(e.nodes(),function(i){var a=e.node(i),u=e.parent(i);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(o.setNode(i),o.setParent(i,u||n),h.A(e[r](i),function(t){var r=t.v===i?t.w:t.v,n=o.edge(r,i),a=e9.A(n)?0:n.weight;o.setEdge(r,i,{weight:e.edge(t).weight+a})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&o.setNode(i,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))}),o})}function rk(e,t){h.A(t,function(t){h.A(t,function(t,r){e.node(t).order=r})})}var rO=r("jC");function rR(e,t,r){if(t>r){var n=t;t=r,r=n}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0}),Object.defineProperty(e[t],r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}var rN=["nodesep","edgesep","ranksep","marginx","marginy"],rP={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},rC=["acyclicer","ranker","rankdir","align"],rS=["width","height"],rM={width:0,height:0},r_=["minlen","weight","width","height","labeloffset"],rT={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},rX=["labelpos"];function rD(e,t){return e7(eW(e,t),Number)}function rI(e){var t={};return h.A(e,function(e,r){t[r.toLowerCase()]=e}),t}var rB=(0,g.K)((e,t,r)=>Math.max(t,Math.min(r,e)),"clamp"),rK=(0,g.K)((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";default:return"top"}},"getDefaultSelfLoopSide"),rG=(0,g.K)(e=>"flowchart"===e||"flowchart-v2"===e||"stateDiagram"===e||"er"===e||"classDiagram"===e,"shouldMergeSelfLoopSegments"),rF=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],rU=(0,g.K)((e,t,r,n,o)=>{let i=[],a=new Set;if(r.forEach(({start:e,end:t})=>{e!==n&&a.add(e),t!==n&&a.add(t)}),a.forEach(t=>{let r=e.node(t);"number"==typeof r?.x&&"number"==typeof r?.y&&i.push(r)}),0===i.length&&r.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{"number"==typeof e?.x&&"number"==typeof e?.y&&i.push(e)})}),0===i.length)return rK(o);let u=i.reduce((e,t)=>({x:e.x+t.x/i.length,y:e.y+t.y/i.length}),{x:0,y:0}),d=u.x-t.x,c=u.y-t.y;return Math.abs(d)>Math.abs(c)?d>0?"right":"left":Math.abs(c)>0?c>0?"bottom":"top":rK(o)},"getSelfLoopSide"),rq=(0,g.K)((e,t="top",r=0,n=0)=>{let o=e.x,i=e.y-r,a=e.width/2,u=e.height/2,d=Math.max(36,Math.min(100,.8*e.width)),c=rB(Math.max(n,.35*e.width),36,d),s=rB(.45*Math.min(e.width,e.height),24,48);switch(t){case"bottom":{let e=i+u;return[{x:o-c/2,y:e},{x:o-c/2,y:e+s},{x:o+c/2,y:e+s},{x:o+c/2,y:e}]}case"right":{let e=o+a;return[{x:e,y:i-c/2},{x:e+s,y:i-c/2},{x:e+s,y:i+c/2},{x:e,y:i+c/2}]}case"left":{let e=o-a;return[{x:e,y:i-c/2},{x:e-s,y:i-c/2},{x:e-s,y:i+c/2},{x:e,y:i+c/2}]}default:{let e=i-u;return[{x:o-c/2,y:e},{x:o-c/2,y:e-s},{x:o+c/2,y:e-s},{x:o+c/2,y:e}]}}},"getSelfLoopPoints"),rz=(0,g.K)((e,t,r="top",n=0,o={})=>{let i=e.x,a=e.y-n,u=o.width??0,d=o.height??0;switch(r){case"bottom":return{x:i,y:Math.max(...t.map(e=>e.y))+d/2+4};case"right":return{x:Math.max(...t.map(e=>e.x))+u/2+4,y:a};case"left":return{x:Math.min(...t.map(e=>e.x))-u/2-4,y:a};default:return{x:i,y:Math.min(...t.map(e=>e.y))-d/2-4}}},"getSelfLoopLabelPosition"),rJ=(0,g.K)((e,t=0,{mergeSelfLoops:r=!0}={})=>{let n=new Map,o=[],i=e.graph()?.rankdir;return e.edges().forEach(t=>{let i=e.edge(t);if(r&&i.selfLoop){let e=i.selfLoop.id;n.has(e)||n.set(e,[]),n.get(e).push({edge:i,start:t.v,end:t.w})}else o.push({edge:i,start:t.v,end:t.w})}),n.forEach(r=>{if(3!==r.length)return void r.forEach(e=>o.push(e));r.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[n,a,u]=r,d=n.edge.originalEdge??a.edge.originalEdge??u.edge.originalEdge??a.edge,c=e.node(d.start);if(!c)return void r.forEach(e=>o.push(e));let s={width:a.edge.width,height:a.edge.height},f=rU(e,c,r,d.start,i),l=rq(c,f,t,s.width??0),g=rz(c,l,f,t,s),h={...a.edge,...d,id:d.id,points:l,start:d.start,end:d.end,x:g.x,y:g.y,width:s.width,height:s.height,labelStyle:a.edge.labelStyle,fromCluster:n.edge.fromCluster??a.edge.fromCluster??u.edge.fromCluster,toCluster:n.edge.toCluster??a.edge.toCluster??u.edge.toCluster};delete h.selfLoop,delete h.originalEdge,o.push({edge:h,start:h.start,end:h.end})}),o},"getEdgesToRender"),rY=(0,g.K)(async({element:e,graph:t,diagramType:r,id:n,parentCluster:o,siteConfig:i})=>{let u=t.graph().rankdir;l.R.trace("Dir in recursive render - dir:",u);let{clusters:f,edgePaths:h,edgeLabels:p,nodes:v,rootGroups:y}=(0,a.B)(e,{edgePathsClass:"edgePaths"});t.nodes()?l.R.info("Recursive render XXX",t.nodes()):l.R.info("No nodes found for",t),t.edges().length>0&&l.R.info("Recursive edges",t.edge(t.edges()[0]));let b=rG(r);await Promise.all(t.nodes().map(async function(e){let d=t.node(e);if(void 0!==o){let r=JSON.parse(JSON.stringify(o.clusterData));l.R.trace("Setting data for parent cluster XXX\n Node.id = ",e,"\n data=",r.height,"\nParent cluster",o.height),t.setNode(o.id,r),t.parent(e)||(l.R.trace("Setting parent",e,o.id),t.setParent(e,o.id,r))}if(l.R.info("(Insert) Node XXX"+e+": "+JSON.stringify(t.node(e))),d?.clusterNode){l.R.info("Cluster identified XBX",e,d.width,t.node(e));let{ranksep:o,nodesep:a}=t.graph();d.graph.setGraph({...d.graph.graph(),ranksep:o+25,nodesep:a});let u=await r0({element:v,graph:d.graph,diagramType:r,id:n,parentCluster:t.node(e),siteConfig:i}),f=u.elem;(0,s.lC)(d,f),d.diff=u.diff||0,l.R.info("New compound node after recursive render XAX",e,"width",d.width,"height",d.height),(0,c.U7)(f,d)}else t.children(e).length>0?(l.R.trace("Cluster - the non recursive path XBX",e,d.id,d,d.width,"Graph:",t),l.R.trace((0,a.dc)(d.id,t)),a.ju.set(d.id,{id:(0,a.dc)(d.id,t),node:d})):(l.R.trace("Node - the non recursive path XAX",e,v,t.node(e),u),await (0,a.sv)(v,t.node(e),{config:i,dir:u}))}));let A=(0,g.K)(async()=>{let e=t.edges().map(async function(e){let r=t.edge(e.v,e.w,e.name);if(l.R.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),l.R.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),l.R.info("Fix",a.ju,"ids:",e.v,e.w,"Translating: ",a.ju.get(e.v),a.ju.get(e.w)),b&&r.selfLoop){if(1!==r.selfLoop.order)return;let e={...r.originalEdge,...r,id:r.selfLoop.id,startLabelLeft:r.originalEdge?.startLabelLeft??r.startLabelLeft,startLabelRight:r.originalEdge?.startLabelRight??r.startLabelRight,endLabelLeft:r.originalEdge?.endLabelLeft??r.endLabelLeft,endLabelRight:r.originalEdge?.endLabelRight??r.endLabelRight};await (0,d.jP)(p,e),r.width=e.width,r.height=e.height,r.labelStyle=e.labelStyle;return}await (0,d.jP)(p,r)});await Promise.all(e)},"processEdges");await A();let{subGraphTitleTotalMargin:w}=(0,c.Oi)(i);return{elem:y,graph:t,groups:{clusters:f,edgePaths:h,edgeLabels:p,nodes:v,rootGroups:y},diagramType:r,id:n,mergeSelfLoops:b,subGraphTitleTotalMargin:w}},"measureDagreGraph"),rV=(0,g.K)(e=>{l.R.info("############################################# XXX"),l.R.info("### Layout ### XXX"),l.R.info("############################################# XXX"),tl("layout",()=>{var t=tl(" buildLayoutGraph",()=>{var t,r,n;return t=e,r=new J.T({multigraph:!0,compound:!0}),n=rI(t.graph()),r.setGraph(eU({},rP,rD(n,rN),eW(n,rC))),h.A(t.nodes(),function(e){var n=rI(t.node(e));r.setNode(e,e1(rD(n,rS),rM)),r.setParent(e,t.parent(e))}),h.A(t.edges(),function(e){var n=rI(t.edge(e));r.setEdge(e,eU({},rT,rD(n,r_),eW(n,rX)))}),r});tl(" runLayout",()=>{var e,r;return e=t,void((r=tl)(" makeSpaceForEdgeLabels",()=>{var t,r;return r=(t=e).graph(),void(r.ranksep/=2,h.A(t.edges(),function(e){var n=t.edge(e);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)}))}),r(" removeSelfEdges",()=>{var t;return t=e,void h.A(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}),r(" acyclic",()=>{var t,r,n,o,i,a;return t="greedy"===e.graph().acyclicer?function(e,t){if(1>=e.nodeCount())return[];var r,n,o,i,a,u,d,c=(r=e,n=t||$,o=new J.T,i=0,a=0,h.A(r.nodes(),function(e){o.setNode(e,{v:e,in:0,out:0})}),h.A(r.edges(),function(e){var t=o.edge(e.v,e.w)||0,r=n(e);o.setEdge(e.v,e.w,t+r),a=Math.max(a,o.node(e.v).out+=r),i=Math.max(i,o.node(e.w).in+=r)}),u=z(a+i+3).map(function(){return new Y}),d=i+1,h.A(o.nodes(),function(e){W(u,d,o.node(e))}),{graph:o,buckets:u,zeroIdx:d});return w(O(function(e,t,r){for(var n,o=[],i=t[t.length-1],a=t[0];e.nodeCount();){for(;n=a.dequeue();)Q(e,t,r,n);for(;n=i.dequeue();)Q(e,t,r,n);if(e.nodeCount()){for(var u=t.length-2;u>0;--u)if(n=t[u].dequeue()){o=o.concat(Q(e,t,r,n,!0));break}}}return o}(c.graph,c.buckets,c.zeroIdx),function(t){return e.outEdges(t.v,t.w)}))}(e,(r=e,function(e){return r.edge(e).weight})):(n=e,o=[],i={},a={},h.A(n.nodes(),function e(t){Object.prototype.hasOwnProperty.call(a,t)||(a[t]=!0,i[t]=!0,h.A(n.outEdges(t),function(t){Object.prototype.hasOwnProperty.call(i,t.w)?o.push(t):e(t.w)}),delete i[t])}),o),void h.A(t,function(t){var r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,y("rev"))})}),r(" nestingGraph.run",()=>{var t,r,n,o,i,a,u,d;return t=ta(e,"root",{},"_root"),a=e,u={},h.A(a.children(),function(e){!function e(t,r){var n=a.children(t);n&&n.length&&h.A(n,function(t){e(t,r+1)}),u[t]=r}(e,1)}),r=u,o=2*(n=e8(tW.A(r))-1)+1,e.graph().nestingRoot=t,h.A(e.edges(),function(t){e.edge(t).minlen*=o}),i=(d=e,tZ.A(d.edges(),function(e,t){return e+d.edge(t).weight},0)+1),void(h.A(e.children(),function(a){!function e(t,r,n,o,i,a,u){var d=t.children(u);if(!d.length){u!==r&&t.setEdge(r,u,{weight:0,minlen:n});return}var c=ts(t,"_bt"),s=ts(t,"_bb"),f=t.node(u);t.setParent(c,u),f.borderTop=c,t.setParent(s,u),f.borderBottom=s,h.A(d,function(d){e(t,r,n,o,i,a,d);var f=t.node(d),l=f.borderTop?f.borderTop:d,g=f.borderBottom?f.borderBottom:d,h=f.borderTop?o:2*o,p=l!==g?1:i-a[u]+1;t.setEdge(c,l,{weight:h,minlen:p,nestingEdge:!0}),t.setEdge(g,s,{weight:h,minlen:p,nestingEdge:!0})}),t.parent(u)||t.setEdge(r,c,{weight:0,minlen:i+a[u]})}(e,t,o,i,n,r,a)}),e.graph().nodeRankFactor=o)}),r(" rank",()=>(function(e){switch(e.graph().ranker){case"network-simplex":default:tq(e);break;case"tight-tree":var t;tA(t=e),tm(t);break;case"longest-path":tA(e)}})(tu(e))),r(" injectEdgeLabelProxies",()=>{var t;return t=e,void h.A(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),o={rank:(t.node(e.w).rank-n.rank)/2+n.rank,e:e};ta(t,"edge-proxy",o,"_ep")}})}),r(" removeEmptyRanks",()=>{var t,r,n,o;return t=tt(O(e.nodes(),function(t){return e.node(t).rank})),r=[],h.A(e.nodes(),function(n){var o=e.node(n).rank-t;r[o]||(r[o]=[]),r[o].push(n)}),n=0,o=e.graph().nodeRankFactor,void h.A(r,function(t,r){e9.A(t)&&r%o!=0?--n:n&&h.A(t,function(t){e.node(t).rank+=n})})}),r(" nestingGraph.cleanup",()=>{var t;return t=e.graph(),void(e.removeNode(t.nestingRoot),delete t.nestingRoot,h.A(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}),r(" normalizeRanks",()=>{var t;return t=tt(O(e.nodes(),function(t){return e.node(t).rank})),void h.A(e.nodes(),function(r){var n=e.node(r);ti(n,"rank")&&(n.rank-=t)})}),r(" assignRankMinMax",()=>{var t,r;return t=e,r=0,void(h.A(t.nodes(),function(e){var n=t.node(e);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,r=e8(r,n.maxRank))}),t.graph().maxRank=r)}),r(" removeEdgeLabelProxies",()=>{var t;return t=e,void h.A(t.nodes(),function(e){var r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}),r(" normalize.run",()=>{e.graph().dummyChains=[],h.A(e.edges(),function(t){!function(e,t){var r,n,o=t.v,i=e.node(o).rank,a=t.w,u=e.node(a).rank,d=t.name,c=e.edge(t),s=c.labelRank;if(u!==i+1){e.removeEdge(t);var f=void 0;for(n=0,++i;i<u;++n,++i)c.points=[],r=ta(e,"edge",f={width:0,height:0,edgeLabel:c,edgeObj:t,rank:i},"_d"),i===s&&(f.width=c.width,f.height=c.height,f.dummy="edge-label",f.labelpos=c.labelpos),e.setEdge(o,r,{weight:c.weight},d),0===n&&e.graph().dummyChains.push(r),o=r;e.setEdge(o,a,{weight:c.weight},d)}}(e,t)})}),r(" parentDummyChains",()=>{var t,r,n,o;return r=e,n={},o=0,h.A(r.children(),function e(t){var i=o;h.A(r.children(t),e),n[t]={low:i,lim:o++}}),t=n,void h.A(e.graph().dummyChains,function(r){for(var n=e.node(r),o=n.edgeObj,i=function(e,t,r,n){var o,i,a=[],u=[],d=Math.min(t[r].low,t[n].low),c=Math.max(t[r].lim,t[n].lim);o=r;do a.push(o=e.parent(o));while(o&&(t[o].low>d||c>t[o].lim))for(i=o,o=n;(o=e.parent(o))!==i;)u.push(o);return{path:a.concat(u.reverse()),lca:i}}(e,t,o.v,o.w),a=i.path,u=i.lca,d=0,c=a[0],s=!0;r!==o.w;){if(n=e.node(r),s){for(;(c=a[d])!==u&&e.node(c).maxRank<n.rank;)d++;c===u&&(s=!1)}if(!s){for(;d<a.length-1&&e.node(c=a[d+1]).minRank<=n.rank;)d++;c=a[d]}e.setParent(r,c),r=e.successors(r)[0]}})}),r(" addBorderSegments",()=>{h.A(e.children(),function t(r){var n=e.children(r),o=e.node(r);if(n.length&&h.A(n,t),Object.prototype.hasOwnProperty.call(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var i=o.minRank,a=o.maxRank+1;i<a;++i)tg(e,"borderLeft","_bl",r,o,i),tg(e,"borderRight","_br",r,o,i)}})}),r(" order",()=>(function(e){var t=tf(e),r=rL(e,z(1,t+1),"inEdges"),n=rL(e,z(t-1,-1,-1),"outEdges"),o=(i={},u=e8(O(a=tO.A(e.nodes(),function(t){return!e.children(t).length}),function(t){return e.node(t).rank})),d=O(z(u+1),function(){return[]}),c=rE(a,function(t){return e.node(t).rank}),h.A(c,function t(r){ti(i,r)||(i[r]=!0,d[e.node(r).rank].push(r),h.A(e.successors(r),t))}),d);rk(e,o);for(var i,a,u,d,c,s,f=1/0,l=0,g=0;g<4;++l,++g){(function(e,t){var r=new J.T;h.A(e,function(e){var n,o,i,a=e.graph().root,u=function e(t,r,n,o){var i,a,u,d,c,s,f,l,g,p,v,y=t.children(r),b=t.node(r),A=b?b.borderLeft:void 0,m=b?b.borderRight:void 0,x={};A&&(y=tO.A(y,function(e){return e!==A&&e!==m}));var E=O(y,function(e){var r=t.inEdges(e);if(!r.length)return{v:e};var n=tZ.A(r,function(e,r){var n=t.edge(r),o=t.node(r.v);return{sum:e.sum+n.weight*o.order,weight:e.weight+n.weight}},{sum:0,weight:0});return{v:e,barycenter:n.sum/n.weight,weight:n.weight}});h.A(E,function(r){if(t.children(r.v).length){var i,a,u=e(t,r.v,n,o);x[r.v]=u,Object.prototype.hasOwnProperty.call(u,"barycenter")&&(i=r,a=u,e9.A(i.barycenter)?(i.barycenter=a.barycenter,i.weight=a.weight):(i.barycenter=(i.barycenter*i.weight+a.barycenter*a.weight)/(i.weight+a.weight),i.weight+=a.weight))}});var j=(i={},h.A(E,function(e,t){var r=i[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};e9.A(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)}),h.A(n.edges(),function(e){var t=i[e.v],r=i[e.w];e9.A(t)||e9.A(r)||(r.indegree++,t.out.push(i[e.w]))}),function(e){for(var t=[];e.length;){var r=e.pop();t.push(r),h.A(r.in.reverse(),function(e){return function(t){!t.merged&&(e9.A(t.barycenter)||e9.A(e.barycenter)||t.barycenter>=e.barycenter)&&function(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}(r)),h.A(r.out,function(t){return function(r){r.in.push(t),0==--r.indegree&&e.push(r)}}(r))}return O(tO.A(t,function(e){return!e.merged}),function(e){return eW(e,["vs","i","barycenter","weight"])})}(tO.A(i,function(e){return!e.indegree})));!function(e,t){h.A(e,function(e){e.vs=w(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}(j,x);var L=(c=(a=function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")},u={lhs:[],rhs:[]},h.A(j,function(e){a(e)?u.lhs.push(e):u.rhs.push(e)}),d=u).lhs,s=rE(d.rhs,function(e){return-e.i}),f=[],l=0,g=0,p=0,c.sort(function(e){return function(t,r){return t.barycenter<r.barycenter?-1:t.barycenter>r.barycenter?1:e?r.i-t.i:t.i-r.i}}(!!o)),p=rj(f,s,p),h.A(c,function(e){p+=e.vs.length,f.push(e.vs),l+=e.barycenter*e.weight,g+=e.weight,p=rj(f,s,p)}),v={vs:w(f)},g&&(v.barycenter=l/g,v.weight=g),v);if(A&&(L.vs=w([A,L.vs,m]),t.predecessors(A).length)){var k=t.node(t.predecessors(A)[0]),R=t.node(t.predecessors(m)[0]);Object.prototype.hasOwnProperty.call(L,"barycenter")||(L.barycenter=0,L.weight=0),L.barycenter=(L.barycenter*L.weight+k.order+R.order)/(L.weight+2),L.weight+=2}return L}(e,a,r,t);h.A(u.vs,function(t,r){e.node(t).order=r}),n=u.vs,i={},h.A(n,function(t){for(var n,a,u=e.parent(t);u;){if((n=e.parent(u))?(a=i[n],i[n]=u):(a=o,o=u),a&&a!==u)return void r.setEdge(a,u);u=n}})})})(l%2?r:n,l%4>=2),o=tc(e);var p=function(e,t){for(var r=0,n=1;n<t.length;++n)r+=function(e,t,r){for(var n=rb(r||[],O(r,function(e,t){return t})||[],eM),o=w(O(t,function(t){return rE(O(e.outEdges(t),function(t){return{pos:n[t.w],weight:e.edge(t).weight}}),"pos")})),i=1;i<r.length;)i<<=1;var a=2*i-1;i-=1;var u=O(Array(a),function(){return 0}),d=0;return h.A(o.forEach(function(e){var t=e.pos+i;u[t]+=e.weight;for(var r=0;t>0;)t%2&&(r+=u[t+1]),t=t-1>>1,u[t]+=e.weight;d+=e.weight*r})),d}(e,t[n-1],t[n]);return r}(e,o);p<f&&(g=0,s=ry(o,5),f=p)}rk(e,s)})(e)),r(" insertSelfEdges",()=>{var t,r;return r=tc(t=e),void h.A(r,function(e){var r=0;h.A(e,function(e,n){var o=t.node(e);o.order=n+r,h.A(o.selfEdges,function(e){ta(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:n+ ++r,e:e.e,label:e.label},"_se")}),delete o.selfEdges})})}),r(" adjustCoordinateSystem",()=>{var t;("lr"===(t=e.graph().rankdir.toLowerCase())||"rl"===t)&&th(e)}),r(" position",()=>{var t,r,n,o,i,a,u,d,c,s,f,l,g,p,v,y,b;v=tc(p=t=tu(t=e)),y=p.graph().ranksep,b=0,h.A(v,function(e){var t=e8(O(e,function(e){return p.node(e).height}));h.A(e,function(e){p.node(e).y=b+t/2}),b+=t+y}),o=tc(r=t),a=eU((i={},tZ.A(o,function(e,t){var n=0,o=0,a=e.length,u=e4(t);return h.A(t,function(e,d){var c=function(e,t){if(e.node(t).dummy)return tk(e.predecessors(t),function(t){return e.node(t).dummy})}(r,e),s=c?r.node(c).order:a;(c||e===u)&&(h.A(t.slice(o,d+1),function(e){h.A(r.predecessors(e),function(t){var o=r.node(t),a=o.order;(a<n||s<a)&&!(o.dummy&&r.node(e).dummy)&&rR(i,t,e)})}),o=d+1,n=s)}),t}),i),function(e,t){var r={};function n(t,n,o,i,a){var u;h.A(z(n,o),function(n){u=t[n],e.node(u).dummy&&h.A(e.predecessors(u),function(t){var n=e.node(t);n.dummy&&(n.order<i||n.order>a)&&rR(r,t,u)})})}return tZ.A(t,function(t,r){var o,i=-1,a=0;return h.A(r,function(u,d){if("border"===e.node(u).dummy){var c=e.predecessors(u);c.length&&(o=e.node(c[0]).order,n(r,a,d,i,o),a=d,i=o)}n(r,a,r.length,o,t.length)}),r}),r}(r,o)),u={},h.A(["u","d"],function(e){n="u"===e?o:tW.A(o).reverse(),h.A(["l","r"],function(t){"r"===t&&(n=O(n,function(e){return tW.A(e).reverse()}));var o,i,d,c,s=("u"===e?r.predecessors:r.successors).bind(r),f=(o=n,i={},d={},c={},h.A(o,function(e){h.A(e,function(e,t){i[e]=e,d[e]=e,c[e]=t})}),h.A(o,function(e){var t=-1;h.A(e,function(e){var r=s(e);if(r.length)for(var n=((r=rE(r,function(e){return c[e]})).length-1)/2,o=Math.floor(n),u=Math.ceil(n);o<=u;++o){var f=r[o];d[e]===e&&t<c[f]&&!function(e,t,r){if(t>r){var n=t;t=r,r=n}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}(a,e,f)&&(d[f]=e,d[e]=i[e]=i[f],t=c[f])}})}),{root:i,align:d}),l=function(e,t,r,n,o){var i,a,u,d,c,s,f,l,g,p,v={},y=(i=e,a=t,u=r,d=o,l=new J.T,p=(c=(g=i.graph()).nodesep,s=g.edgesep,f=d,function(e,t,r){var n,o,i=e.node(t),a=e.node(r);if(n=0+i.width/2,Object.prototype.hasOwnProperty.call(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":o=-i.width/2;break;case"r":o=i.width/2}if(o&&(n+=f?o:-o),o=0,n+=(i.dummy?s:c)/2,n+=(a.dummy?s:c)/2,n+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":o=a.width/2;break;case"r":o=-a.width/2}return o&&(n+=f?o:-o),o=0,n}),h.A(a,function(e){var t;h.A(e,function(e){var r=u[e];if(l.setNode(r),t){var n=u[t],o=l.edge(n,r);l.setEdge(n,r,Math.max(p(i,e,t),o||0))}t=e})}),l),b=o?"borderLeft":"borderRight";function A(e,t){for(var r=y.nodes(),n=r.pop(),o={};n;)o[n]?e(n):(o[n]=!0,r.push(n),r=r.concat(t(n))),n=r.pop()}return A(function(e){v[e]=y.inEdges(e).reduce(function(e,t){return Math.max(e,v[t.v]+y.edge(t))},0)},y.predecessors.bind(y)),A(function(t){var r=y.outEdges(t).reduce(function(e,t){return Math.min(e,v[t.w]-y.edge(t))},1/0),n=e.node(t);1/0!==r&&n.borderType!==b&&(v[t]=Math.max(v[t],r))},y.successors.bind(y)),h.A(n,function(e){v[e]=v[r[e]]}),v}(r,n,f.root,f.align,"r"===t);"r"===t&&(l=e7(l,function(e){return-e})),u[e+t]=l})}),d=tb(tW.A(u),function(e){var t,n=-1/0,o=1/0;return t=function(e,t){var i,a,u=(i=r,a=t,i.node(a).width/2);n=Math.max(e+u,n),o=Math.min(e-u,o)},null==e||(0,en.A)(e,(0,rO.A)(t),eB),n-o}),s=tt(c=tW.A(d)),f=e8(c),h.A(["u","d"],function(e){h.A(["l","r"],function(t){var r,n=e+t,o=u[n];if(o!==d){var i=tW.A(o);(r="l"===t?s-tt(i):f-e8(i))&&(u[n]=e7(o,function(e){return e+r}))}})}),l=r.graph().align,g=e7(u.ul,function(e,t){if(l)return u[l.toLowerCase()][t];var r=rE(O(u,t));return(r[1]+r[2])/2}),g&&(0,e5.A)(g,(0,rO.A)(function(e,r){t.node(r).x=e}))}),r(" positionSelfEdges",()=>{var t;return t=e,void h.A(t.nodes(),function(e){var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),o=n.x+n.width/2,i=n.y,a=r.x-o,u=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:o+2*a/3,y:i-u},{x:o+5*a/6,y:i-u},{x:o+a,y:i},{x:o+5*a/6,y:i+u},{x:o+2*a/3,y:i+u}],r.label.x=r.x,r.label.y=r.y}})}),r(" removeBorderNodes",()=>{var t;return t=e,void(h.A(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),o=t.node(r.borderBottom),i=t.node(e4(r.borderLeft)),a=t.node(e4(r.borderRight));r.width=Math.abs(a.x-i.x),r.height=Math.abs(o.y-n.y),r.x=i.x+r.width/2,r.y=n.y+r.height/2}}),h.A(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}),r(" normalize.undo",()=>{h.A(e.graph().dummyChains,function(t){var r,n=e.node(t),o=n.edgeLabel;for(e.setEdge(n.edgeObj,o);n.dummy;)r=e.successors(t)[0],e.removeNode(t),o.points.push({x:n.x,y:n.y}),"edge-label"===n.dummy&&(o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height),t=r,n=e.node(t)})}),r(" fixupEdgeLabelCoords",()=>{var t;return t=e,void h.A(t.edges(),function(e){var r=t.edge(e);if(Object.prototype.hasOwnProperty.call(r,"x"))switch(("l"===r.labelpos||"r"===r.labelpos)&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}),r(" undoCoordinateSystem",()=>{var t,r,n;("bt"===(t=e.graph().rankdir.toLowerCase())||"rl"===t)&&(r=e,h.A(r.nodes(),function(e){tv(r.node(e))}),h.A(r.edges(),function(e){var t=r.edge(e);h.A(t.points,tv),Object.prototype.hasOwnProperty.call(t,"y")&&tv(t)})),("lr"===t||"rl"===t)&&(n=e,h.A(n.nodes(),function(e){ty(n.node(e))}),h.A(n.edges(),function(e){var t=n.edge(e);h.A(t.points,ty),Object.prototype.hasOwnProperty.call(t,"x")&&ty(t)}),th(e))}),r(" translateGraph",()=>(function(e){var t=1/0,r=0,n=1/0,o=0,i=e.graph(),a=i.marginx||0,u=i.marginy||0;function d(e){var i=e.x,a=e.y,u=e.width,d=e.height;t=Math.min(t,i-u/2),r=Math.max(r,i+u/2),n=Math.min(n,a-d/2),o=Math.max(o,a+d/2)}h.A(e.nodes(),function(t){d(e.node(t))}),h.A(e.edges(),function(t){var r=e.edge(t);Object.prototype.hasOwnProperty.call(r,"x")&&d(r)}),t-=a,n-=u,h.A(e.nodes(),function(r){var o=e.node(r);o.x-=t,o.y-=n}),h.A(e.edges(),function(r){var o=e.edge(r);h.A(o.points,function(e){e.x-=t,e.y-=n}),Object.prototype.hasOwnProperty.call(o,"x")&&(o.x-=t),Object.prototype.hasOwnProperty.call(o,"y")&&(o.y-=n)}),i.width=r-t+a,i.height=o-n+u})(e)),r(" assignNodeIntersects",()=>{var t;return t=e,void h.A(t.edges(),function(e){var r,n,o=t.edge(e),i=t.node(e.v),a=t.node(e.w);o.points?(r=o.points[0],n=o.points[o.points.length-1]):(o.points=[],r=a,n=i),o.points.unshift(td(i,r)),o.points.push(td(a,n))})}),r(" reversePoints",()=>{var t;return t=e,void h.A(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}),r(" acyclic.undo",()=>{h.A(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}))}),tl(" updateInputGraph",()=>{var r,n;return r=e,n=t,void(h.A(r.nodes(),function(e){var t=r.node(e),o=n.node(e);t&&(t.x=o.x,t.y=o.y,n.children(e).length&&(t.width=o.width,t.height=o.height))}),h.A(r.edges(),function(e){var t=r.edge(e),o=n.edge(e);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)}),r.graph().width=n.graph().width,r.graph().height=n.graph().height)})})},"runDagreGraphLayout"),rH=(0,g.K)((e,t,r)=>{let n=e.node(t);if(!n)return;let o={...n};return n?.clusterNode?o.y=(n.y??0)+r:e.children(t).length>0?o.height=(n.height??0)+r:o.y=(n.y??0)+r/2,o},"normalizeDagreNode"),r$=(0,g.K)((e,t)=>{rF.forEach(r=>{void 0!==t[r]&&(e[r]=t[r])})},"applyDagreNodeLayout"),rQ=(0,g.K)((e,t,r,n)=>({...e,start:e.start??t,end:e.end??r,points:(e.points??[]).map(e=>({...e,y:"number"==typeof e.y?e.y+n:e.y}))}),"normalizeDagreEdge"),rW=(0,g.K)((e,t)=>{let{graph:r,mergeSelfLoops:n,subGraphTitleTotalMargin:o=0}=t,i=new Map(e.nodes.map(e=>[e.id,e]));(0,a.sc)(r).forEach(e=>{let t=rH(r,e,o);if(!t)return;r$(r.node(e),t);let n=i.get(e);n&&r$(n,t)});let u=o/2;return e.edges=rJ(r,u,{mergeSelfLoops:n}).map(({edge:e,start:t,end:r})=>rQ(e,t,r,u)),e},"applyDagreLayoutResult"),rZ=(0,g.K)(async({elem:e,graph:t,groups:{clusters:r,edgePaths:n},diagramType:o,id:i,mergeSelfLoops:s,subGraphTitleTotalMargin:f})=>{let g=0;await Promise.all((0,a.sc)(t).map(async function(e){let n=t.node(e);if(l.R.info("Position XBX => "+e+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n?.clusterNode)n.y+=f,l.R.info("A tainted cluster node XBX1",e,n.id,n.width,n.height,n.x,n.y,t.parent(e)),a.ju.get(n.id).node=n,(0,c.U_)(n);else if(t.children(e).length>0){l.R.info("A pure cluster node XBX1",e,n.id,n.x,n.y,n.width,n.height,t.parent(e)),n.height+=f,t.node(n.parentId);let o=n?.padding/2||0,i=n?.labelBBox?.height||0;l.R.debug("OffsetY",i-o||0,"labelHeight",i,"halfPadding",o),await (0,u.U)(r,n),a.ju.get(n.id).node=n}else{let e=t.node(n.parentId);n.y+=f/2,l.R.info("A regular node XBX1 - using the padding",n.id,"parent",n.parentId,n.width,n.height,n.x,n.y,"offsetY",n.offsetY,"parent",e,e?.offsetY,n),(0,c.U_)(n)}}));let h=f/2;return rJ(t,h,{mergeSelfLoops:s}).forEach(function({edge:e,start:r,end:u}){l.R.info("Edge "+r+" -> "+u+": "+JSON.stringify(e),e),e.points.forEach(e=>e.y+=h);let c=t.node(r),s=t.node(u),f=(0,d.Jo)(n,e,a.ju,o,c,s,i);(0,d.T_)(e,f)}),t.nodes().forEach(function(e){let r=t.node(e);l.R.info(e,r.type,r.diff),r.isGroup&&(g=r.diff)}),l.R.warn("Returning from recursive render XAX",e,g),{elem:e,diff:g}},"paintDagreLayoutCore"),r0=(0,g.K)(async e=>{let t=await rY(e);return rV(t.graph),await rZ(t)},"renderDagreSubgraph"),r1=(0,g.K)(e=>{let t=new J.T({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.nodeSpacing||e.config?.flowchart?.nodeSpacing,ranksep:e.config?.rankSpacing||e.rankSpacing||e.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(e=>{t.setNode(e.id,{...e}),e.parentId&&t.setParent(e.id,e.parentId)}),l.R.debug("Edges:",e.edges),e.edges.forEach(e=>{if(e.start===e.end){let r=e.start,n=r+"---"+r+"---1",o=r+"---"+r+"---2",i=t.node(r);t.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setParent(n,i.parentId),t.setNode(o,{domId:o,id:o,parentId:i.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),t.setParent(o,i.parentId);let a=structuredClone(e),u=structuredClone(e),d=structuredClone(e),c=structuredClone(e);u.originalEdge=a,u.selfLoop={id:a.id,order:0},d.originalEdge=a,d.selfLoop={id:a.id,order:1},c.originalEdge=a,c.selfLoop={id:a.id,order:2},u.label="",u.arrowTypeEnd="none",u.endLabelLeft="",u.endLabelRight="",u.startLabelLeft="",u.id=r+"-cyclic-special-1",d.startLabelRight="",d.startLabelLeft="",d.endLabelLeft="",d.endLabelRight="",d.arrowTypeStart="none",d.arrowTypeEnd="none",d.id=r+"-cyclic-special-mid",c.label="",c.startLabelRight="",c.startLabelLeft="",c.arrowTypeStart="none",i.isGroup&&(u.fromCluster=r,c.toCluster=r),c.id=r+"-cyclic-special-2",c.arrowTypeStart="none",t.setEdge(r,n,u,r+"-cyclic-special-0"),t.setEdge(n,o,d,r+"-cyclic-special-1"),t.setEdge(o,r,c,r+"-cyclic-special-2")}else t.setEdge(e.start,e.end,{...e},e.id)}),(0,a.OS)(t),{graph:t}},"prepareLayoutForDagre"),r2=(0,g.K)(async(e,{element:t,preparedLayout:r})=>{let n=r??r1(e),o=(0,f.D7)(),i=await rY({element:t,graph:n.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:o});return n.measuredLayout=i,i},"measureDagreLayout"),r3=(0,g.K)((e,t)=>{let r=t.preparedLayout?.measuredLayout;if(!r)throw Error("runDagreLayoutCore requires measureDagreLayout to run first");return rV(r.graph),rW(e,r),r},"runDagreLayoutCore"),r6=(0,g.K)((e,{measure:t})=>(0,a.sc)(t.graph).map(e=>t.graph.node(e)).filter(Boolean),"getDagrePaintNodes"),r8=(0,g.K)((e,t,{measure:r})=>e?r.graph.node(e):void 0,"getDagreEdgeNode"),r4=(0,a.xY)({prepareLayout:r1,measureLayout:r2,runLayoutCore:r3,paintOptions:{clusterDb:a.ju,getNodes:r6,getEdgeNode:r8,skipNode:(0,g.K)((e,{measure:t})=>!t.graph.hasNode(e.id),"skipNode"),isCluster:(0,g.K)((e,{measure:t})=>t.graph.hasNode(e.id)&&(t.graph.children(e.id)??[]).length>0,"isCluster")}})}}]);
|
|
1
|
+
"use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["7g"],{xs(e,t,r){r.r(t),r.d(t,{applyDagreLayoutResult:()=>rH,getEdgesToRender:()=>rY,measureDagreLayout:()=>r2,prepareLayoutForDagre:()=>r1,render:()=>r6,runDagreLayoutCore:()=>r3});var n,o,i,a=r("Ag"),u=r("ix"),d=r("LC"),c=r("bQ"),s=r("Ut");r("PF"),r("iV"),r("h5"),r("pK"),r("NH");var f=r("Yr"),l=r("M4"),g=r("Gt"),h=r("Y7"),p=r("DS"),v=0,y=function(e){var t=++v;return(0,p.A)(e)+t},b=r("QU"),A=r("tS"),w=function(e){return(null==e?0:e.length)?(0,A.A)(e,1):[]},m=r("Ka"),x=r("n8"),E=r("CZ"),j=r("Riw"),L=function(e,t){var r=-1,n=(0,j.A)(e)?Array(e.length):[];return(0,E.A)(e,function(e,o,i){n[++r]=t(e,o,i)}),n},k=r("FI"),O=function(e,t){return((0,k.A)(e)?m.A:L)(e,(0,x.A)(t,3))},R=Math.ceil,N=Math.max,P=function(e,t,r,n){for(var o=-1,i=N(R((t-e)/(r||1)),0),a=Array(i);i--;)a[n?i:++o]=e,e+=r;return a},C=r("cN"),S=r("wAQ"),_=r("uD"),M=function(e,t,r){if(!(0,_.A)(r))return!1;var n=typeof t;return("number"==n?!!((0,j.A)(r)&&(0,S.A)(t,r.length)):"string"==n&&t in r)&&(0,C.A)(r[t],e)},X=/\s/,D=function(e){for(var t=e.length;t--&&X.test(e.charAt(t)););return t},T=/^\s+/,I=r("B7"),B=/^[-+]0x[0-9a-f]+$/i,K=/^0b[01]+$/i,G=/^0o[0-7]+$/i,F=parseInt,U=function(e){if("number"==typeof e)return e;if((0,I.A)(e))return 0/0;if((0,_.A)(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=(0,_.A)(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=(t=e)?t.slice(0,D(t)+1).replace(T,""):t;var n=K.test(e);return n||G.test(e)?F(e.slice(2),n?2:8):B.test(e)?0/0:+e},J=function(e){return e?1/0===(e=U(e))||-1/0===e?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0},q=function(e,t,r){return r&&"number"!=typeof r&&M(e,t,r)&&(t=r=void 0),e=J(e),void 0===t?(t=e,e=0):t=J(t),r=void 0===r?e<t?1:-1:J(r),P(e,t,r,void 0)},Y=r("v2");class V{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return z(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&z(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,Q)),r=r._prev;return"["+e.join(", ")+"]"}}function z(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Q(e,t){if("_next"!==e&&"_prev"!==e)return t}var W=b.A(1);function $(e,t,r,n,o){var i=o?[]:void 0;return h.A(e.inEdges(n.v),function(n){var a=e.edge(n),u=e.node(n.v);o&&i.push({v:n.v,w:n.w}),u.out-=a,H(t,r,u)}),h.A(e.outEdges(n.v),function(n){var o=e.edge(n),i=n.w,a=e.node(i);a.in-=o,H(t,r,a)}),e.removeNode(n.v),i}function H(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}var Z=r("pb"),ee=r("Jy"),et=function(e,t,r){"__proto__"==t&&ee.A?(0,ee.A)(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},er=function(e,t,r){(void 0===r||(0,C.A)(e[t],r))&&(void 0!==r||t in e)||et(e,t,r)},en=r("Yj"),eo=r("W0m"),ei="object"==typeof exports&&exports&&!exports.nodeType&&exports,ea=ei&&"object"==typeof module&&module&&!module.nodeType&&module,eu=ea&&ea.exports===ei?eo.A.Buffer:void 0,ed=eu?eu.allocUnsafe:void 0,ec=function(e,t){if(t)return e.slice();var r=e.length,n=ed?ed(r):new e.constructor(r);return e.copy(n),n},es=r("Ry"),ef=function(e){var t=new e.constructor(e.byteLength);return new es.A(t).set(new es.A(e)),t},el=function(e,t){var r=t?ef(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},eg=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t},eh=Object.create,ep=function(){function e(){}return function(t){if(!(0,_.A)(t))return{};if(eh)return eh(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),ev=(0,r("oP").A)(Object.getPrototypeOf,Object),ey=r("YrZ"),eb=function(e){return"function"!=typeof e.constructor||(0,ey.A)(e)?{}:ep(ev(e))},eA=r("PP"),ew=r("Fm"),em=r("sA"),ex=r("UR"),eE=r("FA"),ej=r("ic"),eL=Object.prototype,ek=Function.prototype.toString,eO=eL.hasOwnProperty,eR=ek.call(Object),eN=function(e){if(!(0,ej.A)(e)||"[object Object]"!=(0,eE.A)(e))return!1;var t=ev(e);if(null===t)return!0;var r=eO.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ek.call(r)==eR},eP=r("z1"),eC=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},eS=Object.prototype.hasOwnProperty,e_=function(e,t,r){var n=e[t];eS.call(e,t)&&(0,C.A)(n,r)&&(void 0!==r||t in e)||et(e,t,r)},eM=function(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var u=t[i],d=n?n(r[u],e[u],u,r,e):void 0;void 0===d&&(d=e[u]),o?et(r,u,d):e_(r,u,d)}return r},eX=r("jJ"),eD=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},eT=Object.prototype.hasOwnProperty,eI=function(e){if(!(0,_.A)(e))return eD(e);var t=(0,ey.A)(e),r=[];for(var n in e)"constructor"==n&&(t||!eT.call(e,n))||r.push(n);return r},eB=function(e){return(0,j.A)(e)?(0,eX.A)(e,!0):eI(e)},eK=function(e,t,r,n,o,i,a){var u=eC(e,r),d=eC(t,r),c=a.get(d);if(c)return void er(e,r,c);var s=i?i(u,d,r+"",e,t,a):void 0,f=void 0===s;if(f){var l=(0,k.A)(d),g=!l&&(0,em.A)(d),h=!l&&!g&&(0,eP.A)(d);(s=d,l||g||h)?(0,k.A)(u)?s=u:(0,ew.A)(u)?s=eg(u):g?(f=!1,s=ec(d,!0)):h?(f=!1,s=el(d,!0)):s=[]:eN(d)||(0,eA.A)(d)?(s=u,(0,eA.A)(u))?s=eM(u,eB(u)):(!(0,_.A)(u)||(0,ex.A)(u))&&(s=eb(d)):f=!1}f&&(a.set(d,s),o(s,d,n,i,a),a.delete(d)),er(e,r,s)},eG=function e(t,r,n,o,i){t!==r&&(0,en.A)(r,function(a,u){if(i||(i=new Z.A),(0,_.A)(a))eK(t,r,u,n,e,o,i);else{var d=o?o(eC(t,u),a,u+"",t,r,i):void 0;void 0===d&&(d=a),er(t,u,d)}},eB)},eF=r("ln"),eU=(n=function(e,t,r){eG(e,t,r)},(0,eF.A)(function(e,t){var r=-1,o=t.length,i=o>1?t[o-1]:void 0,a=o>2?t[2]:void 0;for(i=n.length>3&&"function"==typeof i?(o--,i):void 0,a&&M(t[0],t[1],a)&&(i=o<3?void 0:i,o=1),e=Object(e);++r<o;){var u=t[r];u&&n(e,u,r)}return e})),eJ=r("hW"),eq=r("eX"),eY=r("ZR"),eV=function(e,t,r,n){if(!(0,_.A)(e))return e;t=(0,eq.A)(t,e);for(var o=-1,i=t.length,a=i-1,u=e;null!=u&&++o<i;){var d=(0,eY.A)(t[o]),c=r;if("__proto__"===d||"constructor"===d||"prototype"===d)break;if(o!=a){var s=u[d];void 0===(c=n?n(s,d,u):void 0)&&(c=(0,_.A)(s)?s:(0,S.A)(t[o+1])?[]:{})}e_(u,d,c),u=u[d]}return e},ez=function(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],u=(0,eJ.A)(e,a);r(u,a)&&eV(i,(0,eq.A)(a,e),u)}return i},eQ=r("Qs"),eW=r("Rs"),e$=r("dN"),eH=(o=function(e,t){return null==e?{}:ez(e,t,function(t,r){return(0,eQ.A)(e,r)})},(0,e$.A)((0,eW.A)(o,void 0,w),o+"")),eZ=Object.prototype,e0=eZ.hasOwnProperty,e1=(0,eF.A)(function(e,t){e=Object(e);var r=-1,n=t.length,o=n>2?t[2]:void 0;for(o&&M(t[0],t[1],o)&&(n=1);++r<n;)for(var i=t[r],a=eB(i),u=-1,d=a.length;++u<d;){var c=a[u],s=e[c];(void 0===s||(0,C.A)(s,eZ[c])&&!e0.call(e,c))&&(e[c]=i[c])}return e}),e2=function(e,t,r){for(var n=-1,o=e.length;++n<o;){var i=e[n],a=t(i);if(null!=a&&(void 0===u?a==a&&!(0,I.A)(a):r(a,u)))var u=a,d=i}return d},e3=function(e,t){return e>t},e8=r("LP"),e4=function(e){return e&&e.length?e2(e,e8.A,e3):void 0},e6=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},e5=r("rw"),e7=function(e,t){var r={};return t=(0,x.A)(t,3),(0,e5.A)(e,function(e,n,o){et(r,n,t(e,n,o))}),r},e9=r("Dm"),te=function(e,t){return e<t},tt=function(e){return e&&e.length?e2(e,e8.A,te):void 0},tr=Object.prototype.hasOwnProperty,tn=function(e,t){return null!=e&&tr.call(e,t)},to=r("gd"),ti=function(e,t){return null!=e&&(0,to.A)(e,t,tn)};function ta(e,t,r,n){var o;do o=y(n);while(e.hasNode(o))return r.dummy=t,e.setNode(o,r),o}function tu(e){var t=new Y.T({multigraph:e.isMultigraph()}).setGraph(e.graph());return h.A(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),h.A(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function td(e,t){var r,n,o=e.x,i=e.y,a=t.x-o,u=t.y-i,d=e.width/2,c=e.height/2;if(!a&&!u)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(u)*d>Math.abs(a)*c?(u<0&&(c=-c),r=c*a/u,n=c):(a<0&&(d=-d),r=d,n=d*u/a),{x:o+r,y:i+n}}function tc(e){var t=O(q(tf(e)+1),function(){return[]});return h.A(e.nodes(),function(r){var n=e.node(r),o=n.rank;e9.A(o)||(t[o][n.order]=r)}),t}function ts(e,t,r,n){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=n),ta(e,"border",o,t)}function tf(e){return e4(O(e.nodes(),function(t){var r=e.node(t).rank;if(!e9.A(r))return r}))}function tl(e,t){return t()}function tg(e,t,r,n,o,i){var a=o[t][i-1],u=ta(e,"border",{width:0,height:0,rank:i,borderType:t},r);o[t][i]=u,e.setParent(u,n),a&&e.setEdge(a,u,{weight:1})}function th(e){h.A(e.nodes(),function(t){tp(e.node(t))}),h.A(e.edges(),function(t){tp(e.edge(t))})}function tp(e){var t=e.width;e.width=e.height,e.height=t}function tv(e){e.y=-e.y}function ty(e){var t=e.x;e.x=e.y,e.y=t}var tb=function(e,t){return e&&e.length?e2(e,(0,x.A)(t,2),te):void 0};function tA(e){var t={};h.A(e.sources(),function r(n){var o=e.node(n);if(Object.prototype.hasOwnProperty.call(t,n))return o.rank;t[n]=!0;var i=tt(O(e.outEdges(n),function(t){return r(t.w)-e.edge(t).minlen}));return(1/0===i||null==i)&&(i=0),o.rank=i})}function tw(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}function tm(e){var t,r,n=new Y.T({directed:!1}),o=e.nodes()[0],i=e.nodeCount();for(n.setNode(o,{});function(e,t){return h.A(e.nodes(),function r(n){h.A(t.nodeEdges(n),function(o){var i=o.v,a=n===i?o.w:i;e.hasNode(a)||tw(t,o)||(e.setNode(a,{}),e.setEdge(n,a,{}),r(a))})}),e.nodeCount()}(n,e)<i;)t=function(e,t){return tb(t.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return tw(t,r)})}(n,e),r=n.hasNode(t.v)?tw(e,t):-tw(e,t),function(e,t,r){h.A(e.nodes(),function(e){t.node(e).rank+=r})}(n,e,r);return n}var tx=r("Hs"),tE=r("TQ"),tj=function(e){var t=J(e),r=t%1;return t==t?r?t-r:t:0},tL=Math.max,tk=(i=function(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var o=null==r?0:tj(r);return o<0&&(o=tL(n+o,0)),(0,tE.A)(e,(0,x.A)(t,3),o)},function(e,t,r){var n=Object(e);if(!(0,j.A)(e)){var o=(0,x.A)(t,3);e=(0,tx.A)(e),t=function(e){return o(n[e],e,n)}}var a=i(e,t,r);return a>-1?n[o?e[a]:a]:void 0}),tO=r("q9");b.A(1),b.A(1);var tR=r("Y4"),tN=r("j7V"),tP=(0,r("kd").A)("length"),tC=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),tS="\\ud800-\\udfff",t_="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",tM="\\ud83c[\\udffb-\\udfff]",tX="[^"+tS+"]",tD="(?:\\ud83c[\\udde6-\\uddff]){2}",tT="[\\ud800-\\udbff][\\udc00-\\udfff]",tI="(?:"+t_+"|"+tM+")?",tB="[\\ufe0e\\ufe0f]?",tK="(?:\\u200d(?:"+[tX,tD,tT].join("|")+")"+tB+tI+")*",tG=RegExp(tM+"(?="+tM+")|"+("(?:"+[tX+t_+"?",t_,tD,tT,"["+tS+"]"].join("|"))+")"+(tB+tI+tK),"g");function tF(){}function tU(e,t,r){k.A(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],i={};return h.A(t,function(t){if(!e.hasNode(t))throw Error("Graph does not have node: "+t);!function e(t,r,n,o,i,a){!Object.prototype.hasOwnProperty.call(o,r)&&(o[r]=!0,n||a.push(r),h.A(i(r),function(r){e(t,r,n,o,i,a)}),n&&a.push(r))}(e,t,"post"===r,i,n,o)}),o}function tJ(e){t=e,r=new Y.T().setGraph(t.graph()),h.A(t.nodes(),function(e){r.setNode(e,t.node(e))}),h.A(t.edges(),function(e){var n=r.edge(e.v,e.w)||{weight:0,minlen:1},o=t.edge(e);r.setEdge(e.v,e.w,{weight:n.weight+o.weight,minlen:Math.max(n.minlen,o.minlen)})}),tA(e=r);var t,r,n,o,i=tm(e);for(tV(i),tq(i,e);n=tz(i);)o=tQ(i,e,n),tW(i,e,n,o)}function tq(e,t){var r=tU(e,e.nodes(),"post");r=r.slice(0,r.length-1),h.A(r,function(r){var n,o,i,a;n=e,o=t,i=r,a=n.node(i).parent,n.edge(i,a).cutvalue=tY(n,o,i)})}function tY(e,t,r){var n=e.node(r).parent,o=!0,i=t.edge(r,n),a=0;return i||(o=!1,i=t.edge(n,r)),a=i.weight,h.A(t.nodeEdges(r),function(i){var u=i.v===r,d=u?i.w:i.v;if(d!==n){var c,s,f,l=u===o,g=t.edge(i).weight;if(a+=l?g:-g,c=e,s=r,f=d,c.hasEdge(s,f)){var h=e.edge(r,d).cutvalue;a+=l?-h:h}}}),a}function tV(e,t){arguments.length<2&&(t=e.nodes()[0]),function e(t,r,n,o,i){var a=n,u=t.node(o);return r[o]=!0,h.A(t.neighbors(o),function(i){Object.prototype.hasOwnProperty.call(r,i)||(n=e(t,r,n,i,o))}),u.low=a,u.lim=n++,i?u.parent=i:delete u.parent,n}(e,{},1,t)}function tz(e){return tk(e.edges(),function(t){return e.edge(t).cutvalue<0})}function tQ(e,t,r){var n=r.v,o=r.w;t.hasEdge(n,o)||(n=r.w,o=r.v);var i=e.node(n),a=e.node(o),u=i,d=!1;return i.lim>a.lim&&(u=a,d=!0),tb(tO.A(t.edges(),function(t){return d===t$(e,e.node(t.v),u)&&d!==t$(e,e.node(t.w),u)}),function(e){return tw(t,e)})}function tW(e,t,r,n){var o,i,a,u,d=r.v,c=r.w;e.removeEdge(d,c),e.setEdge(n.v,n.w,{}),tV(e),tq(e,t),o=e,i=t,a=tk(o.nodes(),function(e){return!i.node(e).parent}),u=(u=tU(o,a,"pre")).slice(1),h.A(u,function(e){var t=o.node(e).parent,r=i.edge(e,t),n=!1;r||(r=i.edge(t,e),n=!0),i.node(e).rank=i.node(t).rank+(n?r.minlen:-r.minlen)})}function t$(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}tF.prototype=Error(),r("DW"),tJ.initLowLimValues=tV,tJ.initCutValues=tq,tJ.calcCutValue=tY,tJ.leaveEdge=tz,tJ.enterEdge=tQ,tJ.exchangeEdges=tW;var tH=r("Ol"),tZ=r("ja6"),t0=r("X2"),t1=r("Fe"),t2=r("LE"),t3=r("Jx"),t8=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,t2.A)(t,(0,t1.A)(e)),e=ev(e);return t}:t3.A,t4=r("JJ"),t6=r("V8"),t5=function(e){return(0,t6.A)(e,eB,t8)},t7=Object.prototype.hasOwnProperty,t9=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&t7.call(e,"index")&&(r.index=e.index,r.input=e.input),r},re=function(e,t){var r=t?ef(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},rt=/\w*$/,rr=function(e){var t=new e.constructor(e.source,rt.exec(e));return t.lastIndex=e.lastIndex,t},rn=r("er"),ro=rn.A?rn.A.prototype:void 0,ri=ro?ro.valueOf:void 0,ra=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return ef(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return re(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return el(e,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return rr(e);case"[object Symbol]":return ri?Object(ri.call(e)):{}}},ru=r("mX3"),rd=r("Vl"),rc=rd.A&&rd.A.isMap,rs=rc?(0,ru.A)(rc):function(e){return(0,ej.A)(e)&&"[object Map]"==(0,tN.A)(e)},rf=rd.A&&rd.A.isSet,rl=rf?(0,ru.A)(rf):function(e){return(0,ej.A)(e)&&"[object Set]"==(0,tN.A)(e)},rg="[object Arguments]",rh="[object Function]",rp="[object Object]",rv={};rv[rg]=rv["[object Array]"]=rv["[object ArrayBuffer]"]=rv["[object DataView]"]=rv["[object Boolean]"]=rv["[object Date]"]=rv["[object Float32Array]"]=rv["[object Float64Array]"]=rv["[object Int8Array]"]=rv["[object Int16Array]"]=rv["[object Int32Array]"]=rv["[object Map]"]=rv["[object Number]"]=rv[rp]=rv["[object RegExp]"]=rv["[object Set]"]=rv["[object String]"]=rv["[object Symbol]"]=rv["[object Uint8Array]"]=rv["[object Uint8ClampedArray]"]=rv["[object Uint16Array]"]=rv["[object Uint32Array]"]=!0,rv["[object Error]"]=rv[rh]=rv["[object WeakMap]"]=!1;var ry=function e(t,r,n,o,i,a){var u,d=1&r,c=2&r,s=4&r;if(n&&(u=i?n(t,o,i,a):n(t)),void 0!==u)return u;if(!(0,_.A)(t))return t;var f=(0,k.A)(t);if(f){if(u=t9(t),!d)return eg(t,u)}else{var l,g,h,p,v=(0,tN.A)(t),y=v==rh||"[object GeneratorFunction]"==v;if((0,em.A)(t))return ec(t,d);if(v==rp||v==rg||y&&!i){if(u=c||y?{}:eb(t),!d)return c?(g=(l=u)&&eM(t,eB(t),l),eM(t,t8(t),g)):(p=(h=u)&&eM(t,(0,tx.A)(t),h),eM(t,(0,t1.A)(t),p))}else{if(!rv[v])return i?t:{};u=ra(t,v,d)}}a||(a=new Z.A);var b=a.get(t);if(b)return b;a.set(t,u),rl(t)?t.forEach(function(o){u.add(e(o,r,n,o,t,a))}):rs(t)&&t.forEach(function(o,i){u.set(i,e(o,r,n,i,t,a))});var A=s?c?t5:t4.A:c?eB:tx.A,w=f?void 0:A(t);return(0,t0.A)(w||t,function(o,i){w&&(o=t[i=o]),e_(u,i,e(o,r,n,i,t,a))}),u},rb=function(e,t,r){for(var n=-1,o=e.length,i=t.length,a={};++n<o;){var u=n<i?t[n]:void 0;r(a,e[n],u)}return a},rA=function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e},rw=function(e,t){if(e!==t){var r=void 0!==e,n=null===e,o=e==e,i=(0,I.A)(e),a=void 0!==t,u=null===t,d=t==t,c=(0,I.A)(t);if(!u&&!c&&!i&&e>t||i&&a&&d&&!u&&!c||n&&a&&d||!r&&d||!o)return 1;if(!n&&!i&&!c&&e<t||c&&r&&o&&!n&&!i||u&&r&&o||!a&&o||!d)return -1}return 0},rm=function(e,t,r){for(var n=-1,o=e.criteria,i=t.criteria,a=o.length,u=r.length;++n<a;){var d=rw(o[n],i[n]);if(d){if(n>=u)return d;return d*("desc"==r[n]?-1:1)}}return e.index-t.index},rx=function(e,t,r){t=t.length?(0,m.A)(t,function(e){return(0,k.A)(e)?function(t){return(0,eJ.A)(t,1===e.length?e[0]:e)}:e}):[e8.A];var n=-1;return t=(0,m.A)(t,(0,ru.A)(x.A)),rA(L(e,function(e,r,o){return{criteria:(0,m.A)(t,function(t){return t(e)}),index:++n,value:e}}),function(e,t){return rm(e,t,r)})},rE=(0,eF.A)(function(e,t){if(null==e)return[];var r=t.length;return r>1&&M(e,t[0],t[1])?t=[]:r>2&&M(t[0],t[1],t[2])&&(t=[t[0]]),rx(e,(0,A.A)(t,1),[])});function rj(e,t,r){for(var n;t.length&&(n=e6(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function rL(e,t,r){return O(t,function(t){var n,o;return n=function(e){for(var t;e.hasNode(t=y("_root")););return t}(e),o=new Y.T({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(t){return e.node(t)}),h.A(e.nodes(),function(i){var a=e.node(i),u=e.parent(i);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(o.setNode(i),o.setParent(i,u||n),h.A(e[r](i),function(t){var r=t.v===i?t.w:t.v,n=o.edge(r,i),a=e9.A(n)?0:n.weight;o.setEdge(r,i,{weight:e.edge(t).weight+a})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&o.setNode(i,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))}),o})}function rk(e,t){h.A(t,function(t){h.A(t,function(t,r){e.node(t).order=r})})}var rO=r("uh");function rR(e,t,r){if(t>r){var n=t;t=r,r=n}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0}),Object.defineProperty(e[t],r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}var rN=["nodesep","edgesep","ranksep","marginx","marginy"],rP={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},rC=["acyclicer","ranker","rankdir","align"],rS=["width","height"],r_={width:0,height:0},rM=["minlen","weight","width","height","labeloffset"],rX={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},rD=["labelpos"];function rT(e,t){return e7(eH(e,t),Number)}function rI(e){var t={};return h.A(e,function(e,r){t[r.toLowerCase()]=e}),t}var rB=(0,g.K)((e,t,r)=>Math.max(t,Math.min(r,e)),"clamp"),rK=(0,g.K)((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";default:return"top"}},"getDefaultSelfLoopSide"),rG=(0,g.K)(e=>"flowchart"===e||"flowchart-v2"===e||"stateDiagram"===e||"er"===e||"classDiagram"===e,"shouldMergeSelfLoopSegments"),rF=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],rU=(0,g.K)((e,t,r,n,o)=>{let i=[],a=new Set;if(r.forEach(({start:e,end:t})=>{e!==n&&a.add(e),t!==n&&a.add(t)}),a.forEach(t=>{let r=e.node(t);"number"==typeof r?.x&&"number"==typeof r?.y&&i.push(r)}),0===i.length&&r.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{"number"==typeof e?.x&&"number"==typeof e?.y&&i.push(e)})}),0===i.length)return rK(o);let u=i.reduce((e,t)=>({x:e.x+t.x/i.length,y:e.y+t.y/i.length}),{x:0,y:0}),d=u.x-t.x,c=u.y-t.y;return Math.abs(d)>Math.abs(c)?d>0?"right":"left":Math.abs(c)>0?c>0?"bottom":"top":rK(o)},"getSelfLoopSide"),rJ=(0,g.K)((e,t="top",r=0,n=0)=>{let o=e.x,i=e.y-r,a=e.width/2,u=e.height/2,d=Math.max(36,Math.min(100,.8*e.width)),c=rB(Math.max(n,.35*e.width),36,d),s=rB(.45*Math.min(e.width,e.height),24,48);switch(t){case"bottom":{let e=i+u;return[{x:o-c/2,y:e},{x:o-c/2,y:e+s},{x:o+c/2,y:e+s},{x:o+c/2,y:e}]}case"right":{let e=o+a;return[{x:e,y:i-c/2},{x:e+s,y:i-c/2},{x:e+s,y:i+c/2},{x:e,y:i+c/2}]}case"left":{let e=o-a;return[{x:e,y:i-c/2},{x:e-s,y:i-c/2},{x:e-s,y:i+c/2},{x:e,y:i+c/2}]}default:{let e=i-u;return[{x:o-c/2,y:e},{x:o-c/2,y:e-s},{x:o+c/2,y:e-s},{x:o+c/2,y:e}]}}},"getSelfLoopPoints"),rq=(0,g.K)((e,t,r="top",n=0,o={})=>{let i=e.x,a=e.y-n,u=o.width??0,d=o.height??0;switch(r){case"bottom":return{x:i,y:Math.max(...t.map(e=>e.y))+d/2+4};case"right":return{x:Math.max(...t.map(e=>e.x))+u/2+4,y:a};case"left":return{x:Math.min(...t.map(e=>e.x))-u/2-4,y:a};default:return{x:i,y:Math.min(...t.map(e=>e.y))-d/2-4}}},"getSelfLoopLabelPosition"),rY=(0,g.K)((e,t=0,{mergeSelfLoops:r=!0}={})=>{let n=new Map,o=[],i=e.graph()?.rankdir;return e.edges().forEach(t=>{let i=e.edge(t);if(r&&i.selfLoop){let e=i.selfLoop.id;n.has(e)||n.set(e,[]),n.get(e).push({edge:i,start:t.v,end:t.w})}else o.push({edge:i,start:t.v,end:t.w})}),n.forEach(r=>{if(3!==r.length)return void r.forEach(e=>o.push(e));r.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[n,a,u]=r,d=n.edge.originalEdge??a.edge.originalEdge??u.edge.originalEdge??a.edge,c=e.node(d.start);if(!c)return void r.forEach(e=>o.push(e));let s={width:a.edge.width,height:a.edge.height},f=rU(e,c,r,d.start,i),l=rJ(c,f,t,s.width??0),g=rq(c,l,f,t,s),h={...a.edge,...d,id:d.id,points:l,start:d.start,end:d.end,x:g.x,y:g.y,width:s.width,height:s.height,labelStyle:a.edge.labelStyle,fromCluster:n.edge.fromCluster??a.edge.fromCluster??u.edge.fromCluster,toCluster:n.edge.toCluster??a.edge.toCluster??u.edge.toCluster};delete h.selfLoop,delete h.originalEdge,o.push({edge:h,start:h.start,end:h.end})}),o},"getEdgesToRender"),rV=(0,g.K)(async({element:e,graph:t,diagramType:r,id:n,parentCluster:o,siteConfig:i})=>{let u=t.graph().rankdir;l.R.trace("Dir in recursive render - dir:",u);let{clusters:f,edgePaths:h,edgeLabels:p,nodes:v,rootGroups:y}=(0,a.B)(e,{edgePathsClass:"edgePaths"});t.nodes()?l.R.info("Recursive render XXX",t.nodes()):l.R.info("No nodes found for",t),t.edges().length>0&&l.R.info("Recursive edges",t.edge(t.edges()[0]));let b=rG(r);await Promise.all(t.nodes().map(async function(e){let d=t.node(e);if(void 0!==o){let r=JSON.parse(JSON.stringify(o.clusterData));l.R.trace("Setting data for parent cluster XXX\n Node.id = ",e,"\n data=",r.height,"\nParent cluster",o.height),t.setNode(o.id,r),t.parent(e)||(l.R.trace("Setting parent",e,o.id),t.setParent(e,o.id,r))}if(l.R.info("(Insert) Node XXX"+e+": "+JSON.stringify(t.node(e))),d?.clusterNode){l.R.info("Cluster identified XBX",e,d.width,t.node(e));let{ranksep:o,nodesep:a}=t.graph();d.graph.setGraph({...d.graph.graph(),ranksep:o+25,nodesep:a});let u=await r0({element:v,graph:d.graph,diagramType:r,id:n,parentCluster:t.node(e),siteConfig:i}),f=u.elem;(0,s.lC)(d,f),d.diff=u.diff||0,l.R.info("New compound node after recursive render XAX",e,"width",d.width,"height",d.height),(0,c.U7)(f,d)}else t.children(e).length>0?(l.R.trace("Cluster - the non recursive path XBX",e,d.id,d,d.width,"Graph:",t),l.R.trace((0,a.dc)(d.id,t)),a.ju.set(d.id,{id:(0,a.dc)(d.id,t),node:d})):(l.R.trace("Node - the non recursive path XAX",e,v,t.node(e),u),await (0,a.sv)(v,t.node(e),{config:i,dir:u}))}));let A=(0,g.K)(async()=>{let e=t.edges().map(async function(e){let r=t.edge(e.v,e.w,e.name);if(l.R.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),l.R.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),l.R.info("Fix",a.ju,"ids:",e.v,e.w,"Translating: ",a.ju.get(e.v),a.ju.get(e.w)),b&&r.selfLoop){if(1!==r.selfLoop.order)return;let e={...r.originalEdge,...r,id:r.selfLoop.id,startLabelLeft:r.originalEdge?.startLabelLeft??r.startLabelLeft,startLabelRight:r.originalEdge?.startLabelRight??r.startLabelRight,endLabelLeft:r.originalEdge?.endLabelLeft??r.endLabelLeft,endLabelRight:r.originalEdge?.endLabelRight??r.endLabelRight};await (0,d.jP)(p,e),r.width=e.width,r.height=e.height,r.labelStyle=e.labelStyle;return}await (0,d.jP)(p,r)});await Promise.all(e)},"processEdges");await A();let{subGraphTitleTotalMargin:w}=(0,c.Oi)(i);return{elem:y,graph:t,groups:{clusters:f,edgePaths:h,edgeLabels:p,nodes:v,rootGroups:y},diagramType:r,id:n,mergeSelfLoops:b,subGraphTitleTotalMargin:w}},"measureDagreGraph"),rz=(0,g.K)(e=>{l.R.info("############################################# XXX"),l.R.info("### Layout ### XXX"),l.R.info("############################################# XXX"),tl("layout",()=>{var t=tl(" buildLayoutGraph",()=>{var t,r,n;return t=e,r=new Y.T({multigraph:!0,compound:!0}),n=rI(t.graph()),r.setGraph(eU({},rP,rT(n,rN),eH(n,rC))),h.A(t.nodes(),function(e){var n=rI(t.node(e));r.setNode(e,e1(rT(n,rS),r_)),r.setParent(e,t.parent(e))}),h.A(t.edges(),function(e){var n=rI(t.edge(e));r.setEdge(e,eU({},rX,rT(n,rM),eH(n,rD)))}),r});tl(" runLayout",()=>{var e,r;return e=t,void((r=tl)(" makeSpaceForEdgeLabels",()=>{var t,r;return r=(t=e).graph(),void(r.ranksep/=2,h.A(t.edges(),function(e){var n=t.edge(e);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)}))}),r(" removeSelfEdges",()=>{var t;return t=e,void h.A(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}),r(" acyclic",()=>{var t,r,n,o,i,a;return t="greedy"===e.graph().acyclicer?function(e,t){if(1>=e.nodeCount())return[];var r,n,o,i,a,u,d,c=(r=e,n=t||W,o=new Y.T,i=0,a=0,h.A(r.nodes(),function(e){o.setNode(e,{v:e,in:0,out:0})}),h.A(r.edges(),function(e){var t=o.edge(e.v,e.w)||0,r=n(e);o.setEdge(e.v,e.w,t+r),a=Math.max(a,o.node(e.v).out+=r),i=Math.max(i,o.node(e.w).in+=r)}),u=q(a+i+3).map(function(){return new V}),d=i+1,h.A(o.nodes(),function(e){H(u,d,o.node(e))}),{graph:o,buckets:u,zeroIdx:d});return w(O(function(e,t,r){for(var n,o=[],i=t[t.length-1],a=t[0];e.nodeCount();){for(;n=a.dequeue();)$(e,t,r,n);for(;n=i.dequeue();)$(e,t,r,n);if(e.nodeCount()){for(var u=t.length-2;u>0;--u)if(n=t[u].dequeue()){o=o.concat($(e,t,r,n,!0));break}}}return o}(c.graph,c.buckets,c.zeroIdx),function(t){return e.outEdges(t.v,t.w)}))}(e,(r=e,function(e){return r.edge(e).weight})):(n=e,o=[],i={},a={},h.A(n.nodes(),function e(t){Object.prototype.hasOwnProperty.call(a,t)||(a[t]=!0,i[t]=!0,h.A(n.outEdges(t),function(t){Object.prototype.hasOwnProperty.call(i,t.w)?o.push(t):e(t.w)}),delete i[t])}),o),void h.A(t,function(t){var r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,y("rev"))})}),r(" nestingGraph.run",()=>{var t,r,n,o,i,a,u,d;return t=ta(e,"root",{},"_root"),a=e,u={},h.A(a.children(),function(e){!function e(t,r){var n=a.children(t);n&&n.length&&h.A(n,function(t){e(t,r+1)}),u[t]=r}(e,1)}),r=u,o=2*(n=e4(tH.A(r))-1)+1,e.graph().nestingRoot=t,h.A(e.edges(),function(t){e.edge(t).minlen*=o}),i=(d=e,tZ.A(d.edges(),function(e,t){return e+d.edge(t).weight},0)+1),void(h.A(e.children(),function(a){!function e(t,r,n,o,i,a,u){var d=t.children(u);if(!d.length){u!==r&&t.setEdge(r,u,{weight:0,minlen:n});return}var c=ts(t,"_bt"),s=ts(t,"_bb"),f=t.node(u);t.setParent(c,u),f.borderTop=c,t.setParent(s,u),f.borderBottom=s,h.A(d,function(d){e(t,r,n,o,i,a,d);var f=t.node(d),l=f.borderTop?f.borderTop:d,g=f.borderBottom?f.borderBottom:d,h=f.borderTop?o:2*o,p=l!==g?1:i-a[u]+1;t.setEdge(c,l,{weight:h,minlen:p,nestingEdge:!0}),t.setEdge(g,s,{weight:h,minlen:p,nestingEdge:!0})}),t.parent(u)||t.setEdge(r,c,{weight:0,minlen:i+a[u]})}(e,t,o,i,n,r,a)}),e.graph().nodeRankFactor=o)}),r(" rank",()=>(function(e){switch(e.graph().ranker){case"network-simplex":default:tJ(e);break;case"tight-tree":var t;tA(t=e),tm(t);break;case"longest-path":tA(e)}})(tu(e))),r(" injectEdgeLabelProxies",()=>{var t;return t=e,void h.A(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),o={rank:(t.node(e.w).rank-n.rank)/2+n.rank,e:e};ta(t,"edge-proxy",o,"_ep")}})}),r(" removeEmptyRanks",()=>{var t,r,n,o;return t=tt(O(e.nodes(),function(t){return e.node(t).rank})),r=[],h.A(e.nodes(),function(n){var o=e.node(n).rank-t;r[o]||(r[o]=[]),r[o].push(n)}),n=0,o=e.graph().nodeRankFactor,void h.A(r,function(t,r){e9.A(t)&&r%o!=0?--n:n&&h.A(t,function(t){e.node(t).rank+=n})})}),r(" nestingGraph.cleanup",()=>{var t;return t=e.graph(),void(e.removeNode(t.nestingRoot),delete t.nestingRoot,h.A(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}),r(" normalizeRanks",()=>{var t;return t=tt(O(e.nodes(),function(t){return e.node(t).rank})),void h.A(e.nodes(),function(r){var n=e.node(r);ti(n,"rank")&&(n.rank-=t)})}),r(" assignRankMinMax",()=>{var t,r;return t=e,r=0,void(h.A(t.nodes(),function(e){var n=t.node(e);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,r=e4(r,n.maxRank))}),t.graph().maxRank=r)}),r(" removeEdgeLabelProxies",()=>{var t;return t=e,void h.A(t.nodes(),function(e){var r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}),r(" normalize.run",()=>{e.graph().dummyChains=[],h.A(e.edges(),function(t){!function(e,t){var r,n,o=t.v,i=e.node(o).rank,a=t.w,u=e.node(a).rank,d=t.name,c=e.edge(t),s=c.labelRank;if(u!==i+1){e.removeEdge(t);var f=void 0;for(n=0,++i;i<u;++n,++i)c.points=[],r=ta(e,"edge",f={width:0,height:0,edgeLabel:c,edgeObj:t,rank:i},"_d"),i===s&&(f.width=c.width,f.height=c.height,f.dummy="edge-label",f.labelpos=c.labelpos),e.setEdge(o,r,{weight:c.weight},d),0===n&&e.graph().dummyChains.push(r),o=r;e.setEdge(o,a,{weight:c.weight},d)}}(e,t)})}),r(" parentDummyChains",()=>{var t,r,n,o;return r=e,n={},o=0,h.A(r.children(),function e(t){var i=o;h.A(r.children(t),e),n[t]={low:i,lim:o++}}),t=n,void h.A(e.graph().dummyChains,function(r){for(var n=e.node(r),o=n.edgeObj,i=function(e,t,r,n){var o,i,a=[],u=[],d=Math.min(t[r].low,t[n].low),c=Math.max(t[r].lim,t[n].lim);o=r;do a.push(o=e.parent(o));while(o&&(t[o].low>d||c>t[o].lim))for(i=o,o=n;(o=e.parent(o))!==i;)u.push(o);return{path:a.concat(u.reverse()),lca:i}}(e,t,o.v,o.w),a=i.path,u=i.lca,d=0,c=a[0],s=!0;r!==o.w;){if(n=e.node(r),s){for(;(c=a[d])!==u&&e.node(c).maxRank<n.rank;)d++;c===u&&(s=!1)}if(!s){for(;d<a.length-1&&e.node(c=a[d+1]).minRank<=n.rank;)d++;c=a[d]}e.setParent(r,c),r=e.successors(r)[0]}})}),r(" addBorderSegments",()=>{h.A(e.children(),function t(r){var n=e.children(r),o=e.node(r);if(n.length&&h.A(n,t),Object.prototype.hasOwnProperty.call(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var i=o.minRank,a=o.maxRank+1;i<a;++i)tg(e,"borderLeft","_bl",r,o,i),tg(e,"borderRight","_br",r,o,i)}})}),r(" order",()=>(function(e){var t=tf(e),r=rL(e,q(1,t+1),"inEdges"),n=rL(e,q(t-1,-1,-1),"outEdges"),o=(i={},u=e4(O(a=tO.A(e.nodes(),function(t){return!e.children(t).length}),function(t){return e.node(t).rank})),d=O(q(u+1),function(){return[]}),c=rE(a,function(t){return e.node(t).rank}),h.A(c,function t(r){ti(i,r)||(i[r]=!0,d[e.node(r).rank].push(r),h.A(e.successors(r),t))}),d);rk(e,o);for(var i,a,u,d,c,s,f=1/0,l=0,g=0;g<4;++l,++g){(function(e,t){var r=new Y.T;h.A(e,function(e){var n,o,i,a=e.graph().root,u=function e(t,r,n,o){var i,a,u,d,c,s,f,l,g,p,v,y=t.children(r),b=t.node(r),A=b?b.borderLeft:void 0,m=b?b.borderRight:void 0,x={};A&&(y=tO.A(y,function(e){return e!==A&&e!==m}));var E=O(y,function(e){var r=t.inEdges(e);if(!r.length)return{v:e};var n=tZ.A(r,function(e,r){var n=t.edge(r),o=t.node(r.v);return{sum:e.sum+n.weight*o.order,weight:e.weight+n.weight}},{sum:0,weight:0});return{v:e,barycenter:n.sum/n.weight,weight:n.weight}});h.A(E,function(r){if(t.children(r.v).length){var i,a,u=e(t,r.v,n,o);x[r.v]=u,Object.prototype.hasOwnProperty.call(u,"barycenter")&&(i=r,a=u,e9.A(i.barycenter)?(i.barycenter=a.barycenter,i.weight=a.weight):(i.barycenter=(i.barycenter*i.weight+a.barycenter*a.weight)/(i.weight+a.weight),i.weight+=a.weight))}});var j=(i={},h.A(E,function(e,t){var r=i[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};e9.A(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)}),h.A(n.edges(),function(e){var t=i[e.v],r=i[e.w];e9.A(t)||e9.A(r)||(r.indegree++,t.out.push(i[e.w]))}),function(e){for(var t=[];e.length;){var r=e.pop();t.push(r),h.A(r.in.reverse(),function(e){return function(t){!t.merged&&(e9.A(t.barycenter)||e9.A(e.barycenter)||t.barycenter>=e.barycenter)&&function(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}(r)),h.A(r.out,function(t){return function(r){r.in.push(t),0==--r.indegree&&e.push(r)}}(r))}return O(tO.A(t,function(e){return!e.merged}),function(e){return eH(e,["vs","i","barycenter","weight"])})}(tO.A(i,function(e){return!e.indegree})));!function(e,t){h.A(e,function(e){e.vs=w(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}(j,x);var L=(c=(a=function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")},u={lhs:[],rhs:[]},h.A(j,function(e){a(e)?u.lhs.push(e):u.rhs.push(e)}),d=u).lhs,s=rE(d.rhs,function(e){return-e.i}),f=[],l=0,g=0,p=0,c.sort(function(e){return function(t,r){return t.barycenter<r.barycenter?-1:t.barycenter>r.barycenter?1:e?r.i-t.i:t.i-r.i}}(!!o)),p=rj(f,s,p),h.A(c,function(e){p+=e.vs.length,f.push(e.vs),l+=e.barycenter*e.weight,g+=e.weight,p=rj(f,s,p)}),v={vs:w(f)},g&&(v.barycenter=l/g,v.weight=g),v);if(A&&(L.vs=w([A,L.vs,m]),t.predecessors(A).length)){var k=t.node(t.predecessors(A)[0]),R=t.node(t.predecessors(m)[0]);Object.prototype.hasOwnProperty.call(L,"barycenter")||(L.barycenter=0,L.weight=0),L.barycenter=(L.barycenter*L.weight+k.order+R.order)/(L.weight+2),L.weight+=2}return L}(e,a,r,t);h.A(u.vs,function(t,r){e.node(t).order=r}),n=u.vs,i={},h.A(n,function(t){for(var n,a,u=e.parent(t);u;){if((n=e.parent(u))?(a=i[n],i[n]=u):(a=o,o=u),a&&a!==u)return void r.setEdge(a,u);u=n}})})})(l%2?r:n,l%4>=2),o=tc(e);var p=function(e,t){for(var r=0,n=1;n<t.length;++n)r+=function(e,t,r){for(var n=rb(r||[],O(r,function(e,t){return t})||[],e_),o=w(O(t,function(t){return rE(O(e.outEdges(t),function(t){return{pos:n[t.w],weight:e.edge(t).weight}}),"pos")})),i=1;i<r.length;)i<<=1;var a=2*i-1;i-=1;var u=O(Array(a),function(){return 0}),d=0;return h.A(o.forEach(function(e){var t=e.pos+i;u[t]+=e.weight;for(var r=0;t>0;)t%2&&(r+=u[t+1]),t=t-1>>1,u[t]+=e.weight;d+=e.weight*r})),d}(e,t[n-1],t[n]);return r}(e,o);p<f&&(g=0,s=ry(o,5),f=p)}rk(e,s)})(e)),r(" insertSelfEdges",()=>{var t,r;return r=tc(t=e),void h.A(r,function(e){var r=0;h.A(e,function(e,n){var o=t.node(e);o.order=n+r,h.A(o.selfEdges,function(e){ta(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:n+ ++r,e:e.e,label:e.label},"_se")}),delete o.selfEdges})})}),r(" adjustCoordinateSystem",()=>{var t;("lr"===(t=e.graph().rankdir.toLowerCase())||"rl"===t)&&th(e)}),r(" position",()=>{var t,r,n,o,i,a,u,d,c,s,f,l,g,p,v,y,b;v=tc(p=t=tu(t=e)),y=p.graph().ranksep,b=0,h.A(v,function(e){var t=e4(O(e,function(e){return p.node(e).height}));h.A(e,function(e){p.node(e).y=b+t/2}),b+=t+y}),o=tc(r=t),a=eU((i={},tZ.A(o,function(e,t){var n=0,o=0,a=e.length,u=e6(t);return h.A(t,function(e,d){var c=function(e,t){if(e.node(t).dummy)return tk(e.predecessors(t),function(t){return e.node(t).dummy})}(r,e),s=c?r.node(c).order:a;(c||e===u)&&(h.A(t.slice(o,d+1),function(e){h.A(r.predecessors(e),function(t){var o=r.node(t),a=o.order;(a<n||s<a)&&!(o.dummy&&r.node(e).dummy)&&rR(i,t,e)})}),o=d+1,n=s)}),t}),i),function(e,t){var r={};function n(t,n,o,i,a){var u;h.A(q(n,o),function(n){u=t[n],e.node(u).dummy&&h.A(e.predecessors(u),function(t){var n=e.node(t);n.dummy&&(n.order<i||n.order>a)&&rR(r,t,u)})})}return tZ.A(t,function(t,r){var o,i=-1,a=0;return h.A(r,function(u,d){if("border"===e.node(u).dummy){var c=e.predecessors(u);c.length&&(o=e.node(c[0]).order,n(r,a,d,i,o),a=d,i=o)}n(r,a,r.length,o,t.length)}),r}),r}(r,o)),u={},h.A(["u","d"],function(e){n="u"===e?o:tH.A(o).reverse(),h.A(["l","r"],function(t){"r"===t&&(n=O(n,function(e){return tH.A(e).reverse()}));var o,i,d,c,s=("u"===e?r.predecessors:r.successors).bind(r),f=(o=n,i={},d={},c={},h.A(o,function(e){h.A(e,function(e,t){i[e]=e,d[e]=e,c[e]=t})}),h.A(o,function(e){var t=-1;h.A(e,function(e){var r=s(e);if(r.length)for(var n=((r=rE(r,function(e){return c[e]})).length-1)/2,o=Math.floor(n),u=Math.ceil(n);o<=u;++o){var f=r[o];d[e]===e&&t<c[f]&&!function(e,t,r){if(t>r){var n=t;t=r,r=n}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}(a,e,f)&&(d[f]=e,d[e]=i[e]=i[f],t=c[f])}})}),{root:i,align:d}),l=function(e,t,r,n,o){var i,a,u,d,c,s,f,l,g,p,v={},y=(i=e,a=t,u=r,d=o,l=new Y.T,p=(c=(g=i.graph()).nodesep,s=g.edgesep,f=d,function(e,t,r){var n,o,i=e.node(t),a=e.node(r);if(n=0+i.width/2,Object.prototype.hasOwnProperty.call(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":o=-i.width/2;break;case"r":o=i.width/2}if(o&&(n+=f?o:-o),o=0,n+=(i.dummy?s:c)/2,n+=(a.dummy?s:c)/2,n+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":o=a.width/2;break;case"r":o=-a.width/2}return o&&(n+=f?o:-o),o=0,n}),h.A(a,function(e){var t;h.A(e,function(e){var r=u[e];if(l.setNode(r),t){var n=u[t],o=l.edge(n,r);l.setEdge(n,r,Math.max(p(i,e,t),o||0))}t=e})}),l),b=o?"borderLeft":"borderRight";function A(e,t){for(var r=y.nodes(),n=r.pop(),o={};n;)o[n]?e(n):(o[n]=!0,r.push(n),r=r.concat(t(n))),n=r.pop()}return A(function(e){v[e]=y.inEdges(e).reduce(function(e,t){return Math.max(e,v[t.v]+y.edge(t))},0)},y.predecessors.bind(y)),A(function(t){var r=y.outEdges(t).reduce(function(e,t){return Math.min(e,v[t.w]-y.edge(t))},1/0),n=e.node(t);1/0!==r&&n.borderType!==b&&(v[t]=Math.max(v[t],r))},y.successors.bind(y)),h.A(n,function(e){v[e]=v[r[e]]}),v}(r,n,f.root,f.align,"r"===t);"r"===t&&(l=e7(l,function(e){return-e})),u[e+t]=l})}),d=tb(tH.A(u),function(e){var t,n=-1/0,o=1/0;return t=function(e,t){var i,a,u=(i=r,a=t,i.node(a).width/2);n=Math.max(e+u,n),o=Math.min(e-u,o)},null==e||(0,en.A)(e,(0,rO.A)(t),eB),n-o}),s=tt(c=tH.A(d)),f=e4(c),h.A(["u","d"],function(e){h.A(["l","r"],function(t){var r,n=e+t,o=u[n];if(o!==d){var i=tH.A(o);(r="l"===t?s-tt(i):f-e4(i))&&(u[n]=e7(o,function(e){return e+r}))}})}),l=r.graph().align,g=e7(u.ul,function(e,t){if(l)return u[l.toLowerCase()][t];var r=rE(O(u,t));return(r[1]+r[2])/2}),g&&(0,e5.A)(g,(0,rO.A)(function(e,r){t.node(r).x=e}))}),r(" positionSelfEdges",()=>{var t;return t=e,void h.A(t.nodes(),function(e){var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),o=n.x+n.width/2,i=n.y,a=r.x-o,u=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:o+2*a/3,y:i-u},{x:o+5*a/6,y:i-u},{x:o+a,y:i},{x:o+5*a/6,y:i+u},{x:o+2*a/3,y:i+u}],r.label.x=r.x,r.label.y=r.y}})}),r(" removeBorderNodes",()=>{var t;return t=e,void(h.A(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),o=t.node(r.borderBottom),i=t.node(e6(r.borderLeft)),a=t.node(e6(r.borderRight));r.width=Math.abs(a.x-i.x),r.height=Math.abs(o.y-n.y),r.x=i.x+r.width/2,r.y=n.y+r.height/2}}),h.A(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}),r(" normalize.undo",()=>{h.A(e.graph().dummyChains,function(t){var r,n=e.node(t),o=n.edgeLabel;for(e.setEdge(n.edgeObj,o);n.dummy;)r=e.successors(t)[0],e.removeNode(t),o.points.push({x:n.x,y:n.y}),"edge-label"===n.dummy&&(o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height),t=r,n=e.node(t)})}),r(" fixupEdgeLabelCoords",()=>{var t;return t=e,void h.A(t.edges(),function(e){var r=t.edge(e);if(Object.prototype.hasOwnProperty.call(r,"x"))switch(("l"===r.labelpos||"r"===r.labelpos)&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}),r(" undoCoordinateSystem",()=>{var t,r,n;("bt"===(t=e.graph().rankdir.toLowerCase())||"rl"===t)&&(r=e,h.A(r.nodes(),function(e){tv(r.node(e))}),h.A(r.edges(),function(e){var t=r.edge(e);h.A(t.points,tv),Object.prototype.hasOwnProperty.call(t,"y")&&tv(t)})),("lr"===t||"rl"===t)&&(n=e,h.A(n.nodes(),function(e){ty(n.node(e))}),h.A(n.edges(),function(e){var t=n.edge(e);h.A(t.points,ty),Object.prototype.hasOwnProperty.call(t,"x")&&ty(t)}),th(e))}),r(" translateGraph",()=>(function(e){var t=1/0,r=0,n=1/0,o=0,i=e.graph(),a=i.marginx||0,u=i.marginy||0;function d(e){var i=e.x,a=e.y,u=e.width,d=e.height;t=Math.min(t,i-u/2),r=Math.max(r,i+u/2),n=Math.min(n,a-d/2),o=Math.max(o,a+d/2)}h.A(e.nodes(),function(t){d(e.node(t))}),h.A(e.edges(),function(t){var r=e.edge(t);Object.prototype.hasOwnProperty.call(r,"x")&&d(r)}),t-=a,n-=u,h.A(e.nodes(),function(r){var o=e.node(r);o.x-=t,o.y-=n}),h.A(e.edges(),function(r){var o=e.edge(r);h.A(o.points,function(e){e.x-=t,e.y-=n}),Object.prototype.hasOwnProperty.call(o,"x")&&(o.x-=t),Object.prototype.hasOwnProperty.call(o,"y")&&(o.y-=n)}),i.width=r-t+a,i.height=o-n+u})(e)),r(" assignNodeIntersects",()=>{var t;return t=e,void h.A(t.edges(),function(e){var r,n,o=t.edge(e),i=t.node(e.v),a=t.node(e.w);o.points?(r=o.points[0],n=o.points[o.points.length-1]):(o.points=[],r=a,n=i),o.points.unshift(td(i,r)),o.points.push(td(a,n))})}),r(" reversePoints",()=>{var t;return t=e,void h.A(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}),r(" acyclic.undo",()=>{h.A(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}))}),tl(" updateInputGraph",()=>{var r,n;return r=e,n=t,void(h.A(r.nodes(),function(e){var t=r.node(e),o=n.node(e);t&&(t.x=o.x,t.y=o.y,n.children(e).length&&(t.width=o.width,t.height=o.height))}),h.A(r.edges(),function(e){var t=r.edge(e),o=n.edge(e);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)}),r.graph().width=n.graph().width,r.graph().height=n.graph().height)})})},"runDagreGraphLayout"),rQ=(0,g.K)((e,t,r)=>{let n=e.node(t);if(!n)return;let o={...n};return n?.clusterNode?o.y=(n.y??0)+r:e.children(t).length>0?o.height=(n.height??0)+r:o.y=(n.y??0)+r/2,o},"normalizeDagreNode"),rW=(0,g.K)((e,t)=>{rF.forEach(r=>{void 0!==t[r]&&(e[r]=t[r])})},"applyDagreNodeLayout"),r$=(0,g.K)((e,t,r,n)=>({...e,start:e.start??t,end:e.end??r,points:(e.points??[]).map(e=>({...e,y:"number"==typeof e.y?e.y+n:e.y}))}),"normalizeDagreEdge"),rH=(0,g.K)((e,t)=>{let{graph:r,mergeSelfLoops:n,subGraphTitleTotalMargin:o=0}=t,i=new Map(e.nodes.map(e=>[e.id,e]));(0,a.sc)(r).forEach(e=>{let t=rQ(r,e,o);if(!t)return;rW(r.node(e),t);let n=i.get(e);n&&rW(n,t)});let u=o/2;return e.edges=rY(r,u,{mergeSelfLoops:n}).map(({edge:e,start:t,end:r})=>r$(e,t,r,u)),e},"applyDagreLayoutResult"),rZ=(0,g.K)(async({elem:e,graph:t,groups:{clusters:r,edgePaths:n},diagramType:o,id:i,mergeSelfLoops:s,subGraphTitleTotalMargin:f})=>{let g=0;await Promise.all((0,a.sc)(t).map(async function(e){let n=t.node(e);if(l.R.info("Position XBX => "+e+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n?.clusterNode)n.y+=f,l.R.info("A tainted cluster node XBX1",e,n.id,n.width,n.height,n.x,n.y,t.parent(e)),a.ju.get(n.id).node=n,(0,c.U_)(n);else if(t.children(e).length>0){l.R.info("A pure cluster node XBX1",e,n.id,n.x,n.y,n.width,n.height,t.parent(e)),n.height+=f,t.node(n.parentId);let o=n?.padding/2||0,i=n?.labelBBox?.height||0;l.R.debug("OffsetY",i-o||0,"labelHeight",i,"halfPadding",o),await (0,u.U)(r,n),a.ju.get(n.id).node=n}else{let e=t.node(n.parentId);n.y+=f/2,l.R.info("A regular node XBX1 - using the padding",n.id,"parent",n.parentId,n.width,n.height,n.x,n.y,"offsetY",n.offsetY,"parent",e,e?.offsetY,n),(0,c.U_)(n)}}));let h=f/2;return rY(t,h,{mergeSelfLoops:s}).forEach(function({edge:e,start:r,end:u}){l.R.info("Edge "+r+" -> "+u+": "+JSON.stringify(e),e),e.points.forEach(e=>e.y+=h);let c=t.node(r),s=t.node(u),f=(0,d.Jo)(n,e,a.ju,o,c,s,i);(0,d.T_)(e,f)}),t.nodes().forEach(function(e){let r=t.node(e);l.R.info(e,r.type,r.diff),r.isGroup&&(g=r.diff)}),l.R.warn("Returning from recursive render XAX",e,g),{elem:e,diff:g}},"paintDagreLayoutCore"),r0=(0,g.K)(async e=>{let t=await rV(e);return rz(t.graph),await rZ(t)},"renderDagreSubgraph"),r1=(0,g.K)(e=>{let t=new Y.T({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.nodeSpacing||e.config?.flowchart?.nodeSpacing,ranksep:e.config?.rankSpacing||e.rankSpacing||e.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(e=>{t.setNode(e.id,{...e}),e.parentId&&t.setParent(e.id,e.parentId)}),l.R.debug("Edges:",e.edges),e.edges.forEach(e=>{if(e.start===e.end){let r=e.start,n=r+"---"+r+"---1",o=r+"---"+r+"---2",i=t.node(r);t.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setParent(n,i.parentId),t.setNode(o,{domId:o,id:o,parentId:i.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),t.setParent(o,i.parentId);let a=structuredClone(e),u=structuredClone(e),d=structuredClone(e),c=structuredClone(e);u.originalEdge=a,u.selfLoop={id:a.id,order:0},d.originalEdge=a,d.selfLoop={id:a.id,order:1},c.originalEdge=a,c.selfLoop={id:a.id,order:2},u.label="",u.arrowTypeEnd="none",u.endLabelLeft="",u.endLabelRight="",u.startLabelLeft="",u.id=r+"-cyclic-special-1",d.startLabelRight="",d.startLabelLeft="",d.endLabelLeft="",d.endLabelRight="",d.arrowTypeStart="none",d.arrowTypeEnd="none",d.id=r+"-cyclic-special-mid",c.label="",c.startLabelRight="",c.startLabelLeft="",c.arrowTypeStart="none",i.isGroup&&(u.fromCluster=r,c.toCluster=r),c.id=r+"-cyclic-special-2",c.arrowTypeStart="none",t.setEdge(r,n,u,r+"-cyclic-special-0"),t.setEdge(n,o,d,r+"-cyclic-special-1"),t.setEdge(o,r,c,r+"-cyclic-special-2")}else t.setEdge(e.start,e.end,{...e},e.id)}),(0,a.OS)(t),{graph:t}},"prepareLayoutForDagre"),r2=(0,g.K)(async(e,{element:t,preparedLayout:r})=>{let n=r??r1(e),o=(0,f.D7)(),i=await rV({element:t,graph:n.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:o});return n.measuredLayout=i,i},"measureDagreLayout"),r3=(0,g.K)((e,t)=>{let r=t.preparedLayout?.measuredLayout;if(!r)throw Error("runDagreLayoutCore requires measureDagreLayout to run first");return rz(r.graph),rH(e,r),r},"runDagreLayoutCore"),r8=(0,g.K)((e,{measure:t})=>(0,a.sc)(t.graph).map(e=>t.graph.node(e)).filter(Boolean),"getDagrePaintNodes"),r4=(0,g.K)((e,t,{measure:r})=>e?r.graph.node(e):void 0,"getDagreEdgeNode"),r6=(0,a.xY)({prepareLayout:r1,measureLayout:r2,runLayoutCore:r3,paintOptions:{clusterDb:a.ju,getNodes:r8,getEdgeNode:r4,skipNode:(0,g.K)((e,{measure:t})=>!t.graph.hasNode(e.id),"skipNode"),isCluster:(0,g.K)((e,{measure:t})=>t.graph.hasNode(e.id)&&(t.graph.children(e.id)??[]).length>0,"isCluster")}})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["a"],{IX(e,a,n){n.r(a),a.default=[Object.freeze(JSON.parse('{"displayName":"Haskell","fileTypes":["hs","hs-boot","hsig"],"name":"haskell","patterns":[{"include":"#liquid_haskell"},{"include":"#comment_like"},{"include":"#numeric_literals"},{"include":"#string_literal"},{"include":"#char_literal"},{"match":"(?<![#@])-}","name":"invalid"},{"captures":{"1":{"name":"punctuation.paren.haskell"},"2":{"name":"punctuation.paren.haskell"}},"match":"(\\\\()\\\\s*(\\\\))","name":"constant.language.unit.haskell"},{"captures":{"1":{"name":"punctuation.paren.haskell"},"2":{"name":"keyword.operator.hash.haskell"},"3":{"name":"keyword.operator.hash.haskell"},"4":{"name":"punctuation.paren.haskell"}},"match":"(\\\\()(#)\\\\s*(#)(\\\\))","name":"constant.language.unit.unboxed.haskell"},{"captures":{"1":{"name":"punctuation.paren.haskell"},"2":{"name":"punctuation.paren.haskell"}},"match":"(\\\\()\\\\s*,[,\\\\s]*(\\\\))","name":"support.constant.tuple.haskell"},{"captures":{"1":{"name":"punctuation.paren.haskell"},"2":{"name":"keyword.operator.hash.haskell"},"3":{"name":"keyword.operator.hash.haskell"},"4":{"name":"punctuation.paren.haskell"}},"match":"(\\\\()(#)\\\\s*,[,\\\\s]*(#)(\\\\))","name":"support.constant.tuple.unboxed.haskell"},{"captures":{"1":{"name":"punctuation.bracket.haskell"},"2":{"name":"punctuation.bracket.haskell"}},"match":"(\\\\[)\\\\s*(])","name":"constant.language.empty-list.haskell"},{"begin":"(\\\\b(?<!\')(module)|^(signature))\\\\b((?!\'))","beginCaptures":{"2":{"name":"keyword.other.module.haskell"},"3":{"name":"keyword.other.signature.haskell"}},"end":"(?=\\\\b(?<!\')where\\\\b(?!\'))","name":"meta.declaration.module.haskell","patterns":[{"include":"#comment_like"},{"include":"#module_name"},{"include":"#module_exports"},{"match":"[a-z]+","name":"invalid"}]},{"include":"#ffi"},{"begin":"^(\\\\s*)(class)\\\\b((?!\'))","beginCaptures":{"2":{"name":"keyword.other.class.haskell"}},"end":"(?=(?<!\')\\\\bwhere\\\\b(?!\'))|(?=[;}])|^(?!\\\\1\\\\s+\\\\S|\\\\s*(?:$|\\\\{-[^@]|--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]).*$))","name":"meta.declaration.class.haskell","patterns":[{"include":"#comment_like"},{"include":"#where"},{"include":"#type_signature"}]},{"begin":"^(\\\\s*)(data|newtype)(?:\\\\s+(instance))?\\\\s+((?:(?!(?<![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])(?:=|--+)(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])|\\\\b(?<!\')(?:where|deriving)\\\\b(?!\')|\\\\{-).)*)(?=\\\\b(?<!\'\')where\\\\b(?!\'\'))","beginCaptures":{"2":{"name":"keyword.other.$2.haskell"},"3":{"name":"keyword.other.instance.haskell"},"4":{"patterns":[{"include":"#type_signature"}]}},"end":"(?=(?<!\')\\\\bderiving\\\\b(?!\'))|(?=[;}])|^(?!\\\\1\\\\s+\\\\S|\\\\s*(?:$|\\\\{-[^@]|--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]).*$))","name":"meta.declaration.$2.generalized.haskell","patterns":[{"include":"#comment_like"},{"begin":"(?<!\')\\\\b(where)\\\\s*(\\\\{)(?!-)","beginCaptures":{"1":{"name":"keyword.other.where.haskell"},"2":{"name":"punctuation.brace.haskell"}},"end":"(})","endCaptures":{"1":{"name":"punctuation.brace.haskell"}},"patterns":[{"include":"#comment_like"},{"include":"#gadt_constructor"},{"match":";","name":"punctuation.semicolon.haskell"}]},{"match":"\\\\b(?<!\')(where)\\\\b(?!\')","name":"keyword.other.where.haskell"},{"include":"#deriving"},{"include":"#gadt_constructor"}]},{"include":"#role_annotation"},{"begin":"^(\\\\s*)(pattern)\\\\s+(.*?)\\\\s+(::|∷)(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])","beginCaptures":{"2":{"name":"keyword.other.pattern.haskell"},"3":{"patterns":[{"include":"#comma"},{"include":"#data_constructor"}]},"4":{"name":"keyword.operator.double-colon.haskell"}},"end":"(?=[;}])|^(?!\\\\1\\\\s+\\\\S|\\\\s*(?:$|\\\\{-[^@]|--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]).*$))","name":"meta.declaration.pattern.type.haskell","patterns":[{"include":"#type_signature"}]},{"begin":"^\\\\s*(pattern)\\\\b(?!\')","captures":{"1":{"name":"keyword.other.pattern.haskell"}},"end":"(?=[;}])|^(?!\\\\1\\\\s+\\\\S|\\\\s*(?:$|\\\\{-[^@]|--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]).*$))","name":"meta.declaration.pattern.haskell","patterns":[{"include":"$self"}]},{"begin":"^(\\\\s*)(data|newtype)(?:\\\\s+(family|instance))?\\\\s+(((?!(?<![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])(?:=|--+)(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])|\\\\b(?<!\')(?:where|deriving)\\\\b(?!\')|\\\\{-).)*)","beginCaptures":{"2":{"name":"keyword.other.$2.haskell"},"3":{"name":"keyword.other.$3.haskell"},"4":{"patterns":[{"include":"#type_signature"}]}},"end":"(?=[;}])|^(?!\\\\1\\\\s+\\\\S|\\\\s*(?:$|\\\\{-[^@]|--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]).*$))","name":"meta.declaration.$2.algebraic.haskell","patterns":[{"include":"#comment_like"},{"include":"#deriving"},{"include":"#forall"},{"include":"#adt_constructor"},{"include":"#context"},{"include":"#record_decl"},{"include":"#type_signature"}]},{"begin":"^(\\\\s*)(type)\\\\s+(family)\\\\b(?!\')(((?!(?<![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])(?:=|--+)(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])|\\\\b(?<!\')where\\\\b(?!\')|\\\\{-).)*)","beginCaptures":{"2":{"name":"keyword.other.type.haskell"},"3":{"name":"keyword.other.family.haskell"},"4":{"patterns":[{"include":"#comment_like"},{"include":"#where"},{"include":"#type_signature"}]}},"end":"(?=[;}])|^(?!\\\\1\\\\s+\\\\S|\\\\s*(?:$|\\\\{-[^@]|--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]).*$))","name":"meta.declaration.type.family.haskell","patterns":[{"include":"#comment_like"},{"include":"#where"},{"include":"#type_signature"}]},{"begin":"^(\\\\s*)(type)(?:\\\\s+(instance))?\\\\s+(((?!(?<![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])(?:=|--+|::|∷)(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])|\\\\{-).)*)","beginCaptures":{"2":{"name":"keyword.other.type.haskell"},"3":{"name":"keyword.other.instance.haskell"},"4":{"patterns":[{"include":"#type_signature"}]}},"end":"(?=[;}])|^(?!\\\\1\\\\s+\\\\S|\\\\s*(?:$|\\\\{-[^@]|--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]).*$))","name":"meta.declaration.type.haskell","patterns":[{"include":"#type_signature"}]},{"begin":"^(\\\\s*)(instance)\\\\b((?!\'))","beginCaptures":{"2":{"name":"keyword.other.instance.haskell"}},"end":"(?=\\\\b(?<!\')(where)\\\\b(?!\'))|(?=[;}])|^(?!\\\\1\\\\s+\\\\S|\\\\s*(?:$|\\\\{-[^@]|--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]).*$))","name":"meta.declaration.instance.haskell","patterns":[{"include":"#comment_like"},{"include":"#where"},{"include":"#type_signature"}]},{"begin":"^(\\\\s*)(import)\\\\b((?!\'))","beginCaptures":{"2":{"name":"keyword.other.import.haskell"}},"end":"(?=\\\\b(?<!\')(where)\\\\b(?!\'))|(?=[;}])|^(?!\\\\1\\\\s+\\\\S|\\\\s*(?:$|\\\\{-[^@]|--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]).*$))","name":"meta.import.haskell","patterns":[{"include":"#comment_like"},{"include":"#where"},{"captures":{"1":{"name":"keyword.other.$1.haskell"}},"match":"(qualified|as|hiding)"},{"include":"#module_name"},{"include":"#module_exports"}]},{"include":"#deriving"},{"include":"#layout_herald"},{"include":"#keyword"},{"captures":{"1":{"name":"keyword.other.$1.haskell"},"2":{"patterns":[{"include":"#comment_like"},{"include":"#integer_literals"},{"include":"#infix_op"}]}},"match":"^\\\\s*(infix[lr]?)\\\\s+(.*)","name":"meta.fixity-declaration.haskell"},{"include":"#overloaded_label"},{"include":"#type_application"},{"include":"#reserved_symbol"},{"include":"#fun_decl"},{"include":"#qualifier"},{"include":"#data_constructor"},{"include":"#start_type_signature"},{"include":"#prefix_op"},{"include":"#infix_op"},{"begin":"(\\\\()(#)\\\\s","beginCaptures":{"1":{"name":"punctuation.paren.haskell"},"2":{"name":"keyword.operator.hash.haskell"}},"end":"(#)(\\\\))","endCaptures":{"1":{"name":"keyword.operator.hash.haskell"},"2":{"name":"punctuation.paren.haskell"}},"patterns":[{"include":"#comma"},{"include":"$self"}]},{"begin":"(\\\\()","beginCaptures":{"1":{"name":"punctuation.paren.haskell"}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.paren.haskell"}},"patterns":[{"include":"#comma"},{"include":"$self"}]},{"include":"#quasi_quote"},{"begin":"(\\\\[)","beginCaptures":{"1":{"name":"punctuation.bracket.haskell"}},"end":"(])","endCaptures":{"1":{"name":"punctuation.bracket.haskell"}},"patterns":[{"include":"#comma"},{"include":"$self"}]},{"include":"#record"}],"repository":{"adt_constructor":{"patterns":[{"include":"#comment_like"},{"begin":"(?<![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])(?:(=)|(\\\\|))(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])","beginCaptures":{"1":{"name":"keyword.operator.eq.haskell"},"2":{"name":"keyword.operator.pipe.haskell"}},"end":"(?:\\\\G|^)\\\\s*(?:(?<!\')\\\\b([\'._\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]+)|(\'?(?<paren>\\\\((?:[^()]?|\\\\g<paren>)*\\\\)))|(\'?(?<brac>\\\\((?:[^]\\\\[]?|\\\\g<brac>)*])))\\\\s*(?:(?<![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])(:[[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]*)|(`)([\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*)(`))|(?<!\')\\\\b([\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*)|(\\\\()\\\\s*(:[[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]*)\\\\s*(\\\\))","endCaptures":{"1":{"patterns":[{"include":"#type_signature"}]},"2":{"patterns":[{"include":"#type_signature"}]},"4":{"patterns":[{"include":"#type_signature"}]},"6":{"name":"constant.other.operator.haskell"},"7":{"name":"punctuation.backtick.haskell"},"8":{"name":"constant.other.haskell"},"9":{"name":"punctuation.backtick.haskell"},"10":{"name":"constant.other.haskell"},"11":{"name":"punctuation.paren.haskell"},"12":{"name":"constant.other.operator.haskell"},"13":{"name":"punctuation.paren.haskell"}},"patterns":[{"include":"#comment_like"},{"include":"#deriving"},{"include":"#record_decl"},{"include":"#forall"},{"include":"#context"}]}]},"block_comment":{"applyEndPatternLast":1,"begin":"\\\\{-","captures":{"0":{"name":"punctuation.definition.comment.haskell"}},"end":"-}","name":"comment.block.haskell","patterns":[{"include":"#block_comment"}]},"char_literal":{"captures":{"1":{"name":"punctuation.definition.string.begin.haskell"},"2":{"name":"constant.character.escape.haskell"},"3":{"name":"constant.character.escape.octal.haskell"},"4":{"name":"constant.character.escape.hexadecimal.haskell"},"5":{"name":"constant.character.escape.control.haskell"},"6":{"name":"punctuation.definition.string.end.haskell"}},"match":"(?<![\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d])(\')(?:[ -\\\\[\\\\]-~]|(\\\\\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[\\"\\\\&\'\\\\\\\\abfnrtv]))|(\\\\\\\\o[0-7]+)|(\\\\\\\\x\\\\h+)|(\\\\\\\\\\\\^[@-_]))(\')","name":"string.quoted.single.haskell"},"comma":{"match":",","name":"punctuation.separator.comma.haskell"},"comment_like":{"patterns":[{"include":"#cpp"},{"include":"#pragma"},{"include":"#comments"}]},"comments":{"patterns":[{"begin":"^(\\\\s*)(--\\\\s[$|])","beginCaptures":{"2":{"name":"punctuation.whitespace.comment.leading.haskell"}},"end":"(?=^(?!\\\\1--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])))","name":"comment.block.documentation.haskell"},{"begin":"(^[\\\\t ]+)?(--\\\\s[*^])","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.haskell"}},"end":"\\\\n","name":"comment.line.documentation.haskell"},{"applyEndPatternLast":1,"begin":"\\\\{-\\\\s?[$*^|]","captures":{"0":{"name":"punctuation.definition.comment.haskell"}},"end":"-}","name":"comment.block.documentation.haskell","patterns":[{"include":"#block_comment"}]},{"begin":"(^[\\\\t ]+)?(?=--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]))","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.haskell"}},"end":"(?!\\\\G)","patterns":[{"begin":"--","beginCaptures":{"0":{"name":"punctuation.definition.comment.haskell"}},"end":"\\\\n","name":"comment.line.double-dash.haskell"}]},{"include":"#block_comment"}]},"context":{"captures":{"1":{"patterns":[{"include":"#comment_like"},{"include":"#type_signature"}]},"2":{"name":"keyword.operator.big-arrow.haskell"}},"match":"(.*)(?<![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])(=>|⇒)(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])"},"cpp":{"captures":{"1":{"name":"punctuation.definition.preprocessor.c"}},"match":"^(#).*$","name":"meta.preprocessor.c"},"data_constructor":{"match":"\\\\b(?<!\')[\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*(?![\'.\\\\w])","name":"constant.other.haskell"},"deriving":{"patterns":[{"begin":"^(\\\\s*)(deriving)\\\\s+(?:(via|stock|newtype|anyclass)\\\\s+)?","beginCaptures":{"2":{"name":"keyword.other.deriving.haskell"},"3":{"name":"keyword.other.deriving.strategy.$3.haskell"}},"end":"(?=[;}])|^(?!\\\\1\\\\s+\\\\S|\\\\s*(?:$|\\\\{-[^@]|--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]).*$))","name":"meta.deriving.haskell","patterns":[{"include":"#comment_like"},{"match":"(?<!\')\\\\b(instance)\\\\b(?!\')","name":"keyword.other.instance.haskell"},{"captures":{"1":{"name":"keyword.other.deriving.strategy.$1.haskell"}},"match":"(?<!\')\\\\b(via|stock|newtype|anyclass)\\\\b(?!\')"},{"include":"#type_signature"}]},{"begin":"(deriving)(?:\\\\s+(stock|newtype|anyclass))?\\\\s*(\\\\()","beginCaptures":{"1":{"name":"keyword.other.deriving.haskell"},"2":{"name":"keyword.other.deriving.strategy.$2.haskell"},"3":{"name":"punctuation.paren.haskell"}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.paren.haskell"}},"name":"meta.deriving.haskell","patterns":[{"include":"#type_signature"}]},{"captures":{"1":{"name":"keyword.other.deriving.haskell"},"2":{"name":"keyword.other.deriving.strategy.$2.haskell"},"3":{"patterns":[{"include":"#type_signature"}]},"5":{"name":"keyword.other.deriving.strategy.via.haskell"},"6":{"patterns":[{"include":"#type_signature"}]}},"match":"(deriving)(?:\\\\s+(stock|newtype|anyclass))?\\\\s+([\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*)(\\\\s+(via)\\\\s+(.*)$)?","name":"meta.deriving.haskell"},{"match":"(?<!\')\\\\b(via)\\\\b(?!\')","name":"keyword.other.deriving.strategy.via.haskell"}]},"double_colon":{"captures":{"1":{"name":"keyword.operator.double-colon.haskell"}},"match":"\\\\s*(::|∷)(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])\\\\s*"},"export_constructs":{"patterns":[{"include":"#comment_like"},{"begin":"\\\\b(?<!\')(pattern)\\\\b(?!\')","beginCaptures":{"1":{"name":"keyword.other.pattern.haskell"}},"end":"([\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*)|(\\\\()\\\\s*(:[[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]+)\\\\s*(\\\\))","endCaptures":{"1":{"name":"constant.other.haskell"},"2":{"name":"punctuation.paren.haskell"},"3":{"name":"constant.other.operator.haskell"},"4":{"name":"punctuation.paren.haskell"}},"patterns":[{"include":"#comment_like"}]},{"begin":"\\\\b(?<!\')(type)\\\\b(?!\')","beginCaptures":{"1":{"name":"keyword.other.type.haskell"}},"end":"([\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*)|(\\\\()\\\\s*([[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]+)\\\\s*(\\\\))","endCaptures":{"1":{"name":"storage.type.haskell"},"2":{"name":"punctuation.paren.haskell"},"3":{"name":"storage.type.operator.haskell"},"4":{"name":"punctuation.paren.haskell"}},"patterns":[{"include":"#comment_like"}]},{"match":"(?<!\')\\\\b[_\\\\p{Ll}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*","name":"entity.name.function.haskell"},{"match":"(?<!\')\\\\b[\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*","name":"storage.type.haskell"},{"include":"#record_wildcard"},{"include":"#reserved_symbol"},{"include":"#prefix_op"}]},"ffi":{"begin":"^(\\\\s*)(foreign)\\\\s+((?:im|ex)port)\\\\s+","beginCaptures":{"2":{"name":"keyword.other.foreign.haskell"},"3":{"name":"keyword.other.$3.haskell"}},"end":"(?=[;}])|^(?!\\\\1\\\\s+\\\\S|\\\\s*(?:$|\\\\{-[^@]|--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]).*$))","name":"meta.$3.foreign.haskell","patterns":[{"include":"#comment_like"},{"captures":{"1":{"name":"keyword.other.calling-convention.$1.haskell"}},"match":"\\\\b(?<!\')(ccall|cplusplus|dotnet|jvm|stdcall|prim|capi)\\\\s+"},{"begin":"(?=\\")|(?=\\\\b(?<!\')([_\\\\p{Ll}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*)\\\\b(?!\'))","end":"(?=(::|∷)(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]))","patterns":[{"include":"#comment_like"},{"captures":{"1":{"name":"keyword.other.safety.$1.haskell"},"2":{"name":"entity.name.foreign.haskell","patterns":[{"include":"#string_literal"}]},"3":{"name":"entity.name.function.haskell"},"4":{"name":"entity.name.function.infix.haskell"}},"match":"\\\\b(?<!\')(safe|unsafe|interruptible)\\\\b(?!\')\\\\s*(\\"(?:\\\\\\\\\\"|[^\\"])*\\")?\\\\s*(?:\\\\b(?<!\'\')([_\\\\p{Ll}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*)\\\\b(?!\')|\\\\(\\\\s*(?!--+\\\\))([[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]+)\\\\s*\\\\))"},{"captures":{"1":{"name":"keyword.other.safety.$1.haskell"},"2":{"name":"entity.name.foreign.haskell","patterns":[{"include":"#string_literal"}]}},"match":"\\\\b(?<!\')(safe|unsafe|interruptible)\\\\b(?!\')\\\\s*(\\"(?:\\\\\\\\\\"|[^\\"])*\\")?\\\\s*$"},{"captures":{"0":{"name":"entity.name.foreign.haskell","patterns":[{"include":"#string_literal"}]}},"match":"\\"(?:\\\\\\\\\\"|[^\\"])*\\""},{"captures":{"1":{"name":"entity.name.function.haskell"},"2":{"name":"punctuation.paren.haskell"},"3":{"name":"entity.name.function.infix.haskell"},"4":{"name":"punctuation.paren.haskell"}},"match":"\\\\b(?<!\'\')([_\\\\p{Ll}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*)\\\\b(?!\')|(\\\\()\\\\s*(?!--+\\\\))([[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]+)\\\\s*(\\\\))"}]},{"include":"#double_colon"},{"include":"#type_signature"}]},"float_literals":{"captures":{"1":{"name":"constant.numeric.floating.decimal.haskell"},"2":{"name":"constant.numeric.floating.hexadecimal.haskell"}},"match":"\\\\b(?<!\')(?:([0-9][0-9_]*\\\\.[0-9][0-9_]*(?:[Ee][-+]?[0-9][0-9_]*)?|[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*)|(0(?:[Xx]_*\\\\h[_\\\\h]*\\\\.\\\\h[_\\\\h]*(?:[Pp][-+]?[0-9][0-9_]*)?|[Xx]_*\\\\h[_\\\\h]*[Pp][-+]?[0-9][0-9_]*)))\\\\b(?!\')"},"forall":{"begin":"\\\\b(?<!\')(forall|∀)\\\\b(?!\')","beginCaptures":{"1":{"name":"keyword.other.forall.haskell"}},"end":"(\\\\.)|(->|→)","endCaptures":{"1":{"name":"keyword.operator.period.haskell"},"2":{"name":"keyword.operator.arrow.haskell"}},"patterns":[{"include":"#comment_like"},{"include":"#type_variable"},{"include":"#type_signature"}]},"fun_decl":{"begin":"^(\\\\s*)(?<fn>(?:[_\\\\p{Ll}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*#*|\\\\(\\\\s*(?!--+\\\\))[[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),:;\\\\[_`{}]][[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]*\\\\s*\\\\))(?:\\\\s*,\\\\s*\\\\g<fn>)?)\\\\s*(?<![[\\\\p{S}\\\\p{P}]&&[^]\\"\'),;_`}]])(::|∷)(?![[\\\\p{S}\\\\p{P}]&&[^\\"\'(,;\\\\[_`{]])","beginCaptures":{"2":{"name":"entity.name.function.haskell","patterns":[{"include":"#reserved_symbol"},{"include":"#prefix_op"}]},"3":{"name":"keyword.operator.double-colon.haskell"}},"end":"(?=(?<![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])((<-|←)|(=)|(-<|↢)|(-<<|⤛))([]\\"\'(),;\\\\[_`{}[^\\\\p{S}\\\\p{P}]]))|(?=[;}])|^(?!\\\\1\\\\s+\\\\S|\\\\s*(?:$|\\\\{-[^@]|--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]).*$))","name":"meta.function.type-declaration.haskell","patterns":[{"include":"#type_signature"}]},"gadt_constructor":{"patterns":[{"begin":"^(\\\\s*)(?:\\\\b((?<!\')[\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*)|(\\\\()\\\\s*(:[[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]*)\\\\s*(\\\\)))","beginCaptures":{"2":{"name":"constant.other.haskell"},"3":{"name":"punctuation.paren.haskell"},"4":{"name":"constant.other.operator.haskell"},"5":{"name":"punctuation.paren.haskell"}},"end":"(?=\\\\b(?<!\'\')deriving\\\\b(?!\'))|(?=[;}])|^(?!\\\\1\\\\s+\\\\S|\\\\s*(?:$|\\\\{-[^@]|--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]).*$))","patterns":[{"include":"#comment_like"},{"include":"#deriving"},{"include":"#double_colon"},{"include":"#record_decl"},{"include":"#type_signature"}]},{"begin":"\\\\b((?<!\')[\\\\p{Lu}\\\\p{Lt}][_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*)|(\\\\()\\\\s*(:[[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]*)\\\\s*(\\\\))","beginCaptures":{"1":{"name":"constant.other.haskell"},"2":{"name":"punctuation.paren.haskell"},"3":{"name":"constant.other.operator.haskell"},"4":{"name":"punctuation.paren.haskell"}},"end":"$","patterns":[{"include":"#comment_like"},{"include":"#deriving"},{"include":"#double_colon"},{"include":"#record_decl"},{"include":"#type_signature"}]}]},"infix_op":{"patterns":[{"captures":{"1":{"name":"keyword.operator.promotion.haskell"},"2":{"name":"entity.name.namespace.haskell"},"3":{"name":"keyword.operator.infix.haskell"}},"match":"((?:(?<!\'\')(\'\')?[\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*\\\\.)*)(#+|[[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]+(?<!#))"},{"captures":{"1":{"name":"punctuation.backtick.haskell"},"2":{"name":"entity.name.namespace.haskell"},"3":{"patterns":[{"include":"#data_constructor"}]},"4":{"name":"punctuation.backtick.haskell"}},"match":"(`)((?:[\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*\\\\.)*)([_\\\\p{Ll}\\\\p{Lu}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*)(`)","name":"keyword.operator.function.infix.haskell"}]},"inline_phase":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.bracket.haskell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.bracket.haskell"}},"name":"meta.inlining-phase.haskell","patterns":[{"match":"~","name":"punctuation.tilde.haskell"},{"include":"#integer_literals"},{"match":"\\\\w*","name":"invalid"}]},"integer_literals":{"captures":{"1":{"name":"constant.numeric.integral.decimal.haskell"},"2":{"name":"constant.numeric.integral.hexadecimal.haskell"},"3":{"name":"constant.numeric.integral.octal.haskell"},"4":{"name":"constant.numeric.integral.binary.haskell"}},"match":"\\\\b(?<!\')(?:([0-9][0-9_]*)|(0[Xx]_*\\\\h[_\\\\h]*)|(0[Oo]_*[0-7][0-7_]*)|(0[Bb]_*[01][01_]*))\\\\b(?!\')"},"keyword":{"captures":{"1":{"name":"keyword.other.$1.haskell"},"2":{"name":"keyword.control.$2.haskell"}},"match":"\\\\b(?<!\')(?:(where|let|in|default)|(m?do|if|then|else|case|of|proc|rec))\\\\b(?!\')"},"layout_herald":{"begin":"(?<!\')\\\\b(?:(where|let|m?do)|(of))\\\\s*(\\\\{)(?!-)","beginCaptures":{"1":{"name":"keyword.other.$1.haskell"},"2":{"name":"keyword.control.of.haskell"},"3":{"name":"punctuation.brace.haskell"}},"end":"(})","endCaptures":{"1":{"name":"punctuation.brace.haskell"}},"patterns":[{"include":"$self"},{"match":";","name":"punctuation.semicolon.haskell"}]},"liquid_haskell":{"begin":"\\\\{-@","end":"@-}","name":"block.liquidhaskell.haskell","patterns":[{"include":"$self"}]},"module_exports":{"applyEndPatternLast":1,"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.paren.haskell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.paren.haskell"}},"name":"meta.declaration.exports.haskell","patterns":[{"include":"#comment_like"},{"captures":{"1":{"name":"keyword.other.module.haskell"}},"match":"\\\\b(?<!\')(module)\\\\b(?!\')"},{"include":"#comma"},{"include":"#export_constructs"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.paren.haskell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.paren.haskell"}},"patterns":[{"include":"#comment_like"},{"include":"#record_wildcard"},{"include":"#export_constructs"},{"include":"#comma"}]}]},"module_name":{"match":"(?<conid>[\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*(\\\\.\\\\g<conid>)?)","name":"entity.name.namespace.haskell"},"numeric_literals":{"patterns":[{"include":"#float_literals"},{"include":"#integer_literals"}]},"overloaded_label":{"patterns":[{"captures":{"1":{"name":"keyword.operator.prefix.hash.haskell"},"2":{"patterns":[{"include":"#string_literal"}]}},"match":"(?<![[_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d\\\\p{S}\\\\p{P}]&&[^(,;\\\\[`{]])(#)(?:(\\"(?:\\\\\\\\\\"|[^\\"])*\\")|[\'._\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]+)","name":"entity.name.label.haskell"}]},"pragma":{"begin":"\\\\{-#","end":"#-}","name":"meta.preprocessor.haskell","patterns":[{"begin":"(?i)\\\\b(?<!\')(LANGUAGE)\\\\b(?!\')","beginCaptures":{"1":{"name":"keyword.other.preprocessor.pragma.haskell"}},"end":"(?=#-})","patterns":[{"match":"(?:No)?(?:AutoDeriveTypeable|DatatypeContexts|DoRec|IncoherentInstances|MonadFailDesugaring|MonoPatBinds|NullaryTypeClasses|OverlappingInstances|PatternSignatures|RecordPuns|RelaxedPolyRec)","name":"invalid.deprecated"},{"captures":{"1":{"name":"keyword.other.preprocessor.extension.haskell"}},"match":"((?:No)?(?:AllowAmbiguousTypes|AlternativeLayoutRule|AlternativeLayoutRuleTransitional|Arrows|BangPatterns|BinaryLiterals|CApiFFI|CPP|CUSKs|ConstrainedClassMethods|ConstraintKinds|DataKinds|DefaultSignatures|DeriveAnyClass|DeriveDataTypeable|DeriveFoldable|DeriveFunctor|DeriveGeneric|DeriveLift|DeriveTraversable|DerivingStrategies|DerivingVia|DisambiguateRecordFields|DoAndIfThenElse|BlockArguments|DuplicateRecordFields|EmptyCase|EmptyDataDecls|EmptyDataDeriving|ExistentialQuantification|ExplicitForAll|ExplicitNamespaces|ExtendedDefaultRules|FlexibleContexts|FlexibleInstances|ForeignFunctionInterface|FunctionalDependencies|GADTSyntax|GADTs|GHCForeignImportPrim|Generali[sz]edNewtypeDeriving|ImplicitParams|ImplicitPrelude|ImportQualifiedPost|ImpredicativeTypes|TypeFamilyDependencies|InstanceSigs|ApplicativeDo|InterruptibleFFI|JavaScriptFFI|KindSignatures|LambdaCase|LiberalTypeSynonyms|MagicHash|MonadComprehensions|MonoLocalBinds|MonomorphismRestriction|MultiParamTypeClasses|MultiWayIf|NumericUnderscores|NPlusKPatterns|NamedFieldPuns|NamedWildCards|NegativeLiterals|HexFloatLiterals|NondecreasingIndentation|NumDecimals|OverloadedLabels|OverloadedLists|OverloadedStrings|PackageImports|ParallelArrays|ParallelListComp|PartialTypeSignatures|PatternGuards|PatternSynonyms|PolyKinds|PolymorphicComponents|QuantifiedConstraints|PostfixOperators|QuasiQuotes|Rank2Types|RankNTypes|RebindableSyntax|RecordWildCards|RecursiveDo|RelaxedLayout|RoleAnnotations|ScopedTypeVariables|StandaloneDeriving|StarIsType|StaticPointers|Strict|StrictData|TemplateHaskell|TemplateHaskellQuotes|StandaloneKindSignatures|TraditionalRecordSyntax|TransformListComp|TupleSections|TypeApplications|TypeInType|TypeFamilies|TypeOperators|TypeSynonymInstances|UnboxedTuples|UnboxedSums|UndecidableInstances|UndecidableSuperClasses|UnicodeSyntax|UnliftedFFITypes|UnliftedNewtypes|ViewPatterns))"},{"include":"#comma"}]},{"begin":"(?i)\\\\b(?<!\')(SPECIALI[SZ]E)(?:\\\\s*(\\\\[[^]\\\\[]*])?\\\\s*|\\\\s+)(instance)\\\\b(?!\')","beginCaptures":{"1":{"name":"keyword.other.preprocessor.pragma.haskell"},"2":{"patterns":[{"include":"#inline_phase"}]},"3":{"name":"keyword.other.instance.haskell"}},"end":"(?=#-})","patterns":[{"include":"#type_signature"}]},{"begin":"(?i)\\\\b(?<!\')(SPECIALI[SZ]E)\\\\b(?!\')(?:\\\\s+(INLINE)\\\\b(?!\'))?\\\\s*(\\\\[[^]\\\\[]*])?\\\\s*","beginCaptures":{"1":{"name":"keyword.other.preprocessor.pragma.haskell"},"2":{"name":"keyword.other.preprocessor.pragma.haskell"},"3":{"patterns":[{"include":"#inline_phase"}]}},"end":"(?=#-})","patterns":[{"include":"$self"}]},{"match":"(?i)\\\\b(?<!\')(LANGUAGE|OPTIONS_GHC|INCLUDE|MINIMAL|UNPACK|OVERLAPS|INCOHERENT|NOUNPACK|SOURCE|OVERLAPPING|OVERLAPPABLE|INLINE|NOINLINE|INLINE?ABLE|CONLIKE|LINE|COLUMN|RULES|COMPLETE)\\\\b(?!\')","name":"keyword.other.preprocessor.haskell"},{"begin":"(?i)\\\\b(DEPRECATED|WARNING)\\\\b","beginCaptures":{"1":{"name":"keyword.other.preprocessor.pragma.haskell"}},"end":"(?=#-})","patterns":[{"include":"#string_literal"}]}]},"prefix_op":{"patterns":[{"captures":{"1":{"name":"punctuation.paren.haskell"},"2":{"name":"entity.name.function.infix.haskell"},"3":{"name":"punctuation.paren.haskell"}},"match":"(\\\\()\\\\s*(?!(?:--+|\\\\.\\\\.)\\\\))(#+|[[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]+(?<!#))\\\\s*(\\\\))"}]},"qualifier":{"match":"\\\\b(?<!\')[\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*\\\\.","name":"entity.name.namespace.haskell"},"quasi_quote":{"patterns":[{"begin":"(\\\\[)([dep])?(\\\\|\\\\|?)","beginCaptures":{"1":{"name":"keyword.operator.quasi-quotation.begin.haskell"},"2":{"name":"entity.name.quasi-quoter.haskell"},"3":{"name":"keyword.operator.quasi-quotation.begin.haskell"}},"end":"\\\\3]","endCaptures":{"0":{"name":"keyword.operator.quasi-quotation.end.haskell"}},"name":"meta.quasi-quotation.haskell","patterns":[{"include":"$self"}]},{"begin":"(\\\\[)(t)(\\\\|\\\\|?)","beginCaptures":{"1":{"name":"keyword.operator.quasi-quotation.begin.haskell"},"2":{"name":"entity.name.quasi-quoter.haskell"},"3":{"name":"keyword.operator.quasi-quotation.begin.haskell"}},"end":"\\\\3]","endCaptures":{"0":{"name":"keyword.operator.quasi-quotation.end.haskell"}},"name":"meta.quasi-quotation.haskell","patterns":[{"include":"#type_signature"}]},{"begin":"(\\\\[)(?:(\\\\$\\\\$)|(\\\\$))?([\'._[^\\\\s\\\\p{S}\\\\p{P}]]*)(\\\\|\\\\|?)","beginCaptures":{"1":{"name":"keyword.operator.quasi-quotation.begin.haskell"},"2":{"name":"keyword.operator.prefix.double-dollar.haskell"},"3":{"name":"keyword.operator.prefix.dollar.haskell"},"4":{"name":"entity.name.quasi-quoter.haskell","patterns":[{"include":"#qualifier"}]},"5":{"name":"keyword.operator.quasi-quotation.begin.haskell"}},"end":"\\\\5]","endCaptures":{"0":{"name":"keyword.operator.quasi-quotation.end.haskell"}},"name":"meta.quasi-quotation.haskell"}]},"record":{"begin":"(\\\\{)(?!-)","beginCaptures":{"1":{"name":"punctuation.brace.haskell"}},"end":"(?<!-)(})","endCaptures":{"1":{"name":"punctuation.brace.haskell"}},"name":"meta.record.haskell","patterns":[{"include":"#comment_like"},{"include":"#record_field"}]},"record_decl":{"begin":"(\\\\{)(?!-)","beginCaptures":{"1":{"name":"punctuation.brace.haskell"}},"end":"(?<!-)(})","endCaptures":{"1":{"name":"punctuation.brace.haskell"}},"name":"meta.record.definition.haskell","patterns":[{"include":"#comment_like"},{"include":"#record_decl_field"}]},"record_decl_field":{"begin":"([_\\\\p{Ll}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*)|(\\\\()\\\\s*([[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]+)\\\\s*(\\\\))","beginCaptures":{"1":{"name":"variable.other.member.definition.haskell"},"2":{"name":"punctuation.paren.haskell"},"3":{"name":"variable.other.member.definition.haskell"},"4":{"name":"punctuation.paren.haskell"}},"end":"(,)|(?=})","endCaptures":{"1":{"name":"punctuation.comma.haskell"}},"patterns":[{"include":"#comment_like"},{"include":"#comma"},{"include":"#double_colon"},{"include":"#type_signature"},{"include":"#record_decl_field"}]},"record_field":{"patterns":[{"begin":"([_\\\\p{Ll}\\\\p{Lu}][\'._\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*)|(\\\\()\\\\s*([[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]+)\\\\s*(\\\\))","beginCaptures":{"1":{"name":"variable.other.member.haskell","patterns":[{"include":"#qualifier"}]},"2":{"name":"punctuation.paren.haskell"},"3":{"name":"variable.other.member.haskell"},"4":{"name":"punctuation.paren.haskell"}},"end":"(,)|(?=})","endCaptures":{"1":{"name":"punctuation.comma.haskell"}},"patterns":[{"include":"#comment_like"},{"include":"#comma"},{"include":"$self"}]},{"include":"#record_wildcard"}]},"record_wildcard":{"captures":{"1":{"name":"variable.other.member.wildcard.haskell"}},"match":"(?<![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])(\\\\.\\\\.)(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])"},"reserved_symbol":{"patterns":[{"captures":{"1":{"name":"keyword.operator.double-dot.haskell"},"2":{"name":"keyword.operator.colon.haskell"},"3":{"name":"keyword.operator.eq.haskell"},"4":{"name":"keyword.operator.lambda.haskell"},"5":{"name":"keyword.operator.pipe.haskell"},"6":{"name":"keyword.operator.arrow.left.haskell"},"7":{"name":"keyword.operator.arrow.haskell"},"8":{"name":"keyword.operator.arrow.left.tail.haskell"},"9":{"name":"keyword.operator.arrow.left.tail.double.haskell"},"10":{"name":"keyword.operator.arrow.tail.haskell"},"11":{"name":"keyword.operator.arrow.tail.double.haskell"},"12":{"name":"keyword.other.forall.haskell"}},"match":"(?<![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])(?:(\\\\.\\\\.)|(:)|(=)|(\\\\\\\\)|(\\\\|)|(<-|←)|(->|→)|(-<|↢)|(-<<|⤛)|(>-|⤚)|(>>-|⤜)|(∀))(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])"},{"captures":{"1":{"name":"keyword.operator.postfix.hash.haskell"}},"match":"(?<=[[_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d\\\\p{S}\\\\p{P}]&&[^#,;\\\\[`{]])(#+)(?![[_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d\\\\p{S}\\\\p{P}]&&[^]),;`}]])"},{"captures":{"1":{"name":"keyword.operator.infix.tight.at.haskell"}},"match":"(?<=[])_}\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d])(@)(?=[(\\\\[_{\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d])"},{"captures":{"1":{"name":"keyword.operator.prefix.tilde.haskell"},"2":{"name":"keyword.operator.prefix.bang.haskell"},"3":{"name":"keyword.operator.prefix.minus.haskell"},"4":{"name":"keyword.operator.prefix.dollar.haskell"},"5":{"name":"keyword.operator.prefix.double-dollar.haskell"}},"match":"(?<![[_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d\\\\p{S}\\\\p{P}]&&[^(,;\\\\[`{]])(?:(~)|(!)|(-)|(\\\\$)|(\\\\$\\\\$))(?=[(\\\\[_{\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d])"}]},"role_annotation":{"patterns":[{"begin":"^(\\\\s*)(type)\\\\s+(role)\\\\b(?!\')","beginCaptures":{"2":{"name":"keyword.other.type.haskell"},"3":{"name":"keyword.other.role.haskell"}},"end":"(?=[;}])|^(?!\\\\1\\\\s+\\\\S|\\\\s*(?:$|\\\\{-[^@]|--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]).*$))","name":"meta.role-annotation.haskell","patterns":[{"include":"#comment_like"},{"include":"#type_constructor"},{"captures":{"1":{"name":"keyword.other.role.$1.haskell"}},"match":"\\\\b(?<!\')(nominal|representational|phantom)\\\\b(?!\')"}]}]},"start_type_signature":{"patterns":[{"begin":"^(\\\\s*)(::|∷)(?![[\\\\p{S}\\\\p{P}]&&[^\\"\'(,;\\\\[_`{]])\\\\s*","beginCaptures":{"2":{"name":"keyword.operator.double-colon.haskell"}},"end":"(?=#?\\\\)|[],]|(?<!\')\\\\b(in|then|else|of)\\\\b(?!\')|(?<![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])(?:([\\\\\\\\λ])|(<-|←)|(=)|(-<|↢)|(-<<|⤛))([]\\"\'(),;\\\\[_`{}[^\\\\p{S}\\\\p{P}]])|([#@])-}|(?=[;}])|^(?!\\\\1\\\\s*\\\\S|\\\\s*(?:$|\\\\{-[^@]|--+(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]).*$)))","name":"meta.type-declaration.haskell","patterns":[{"include":"#type_signature"}]},{"begin":"(?<![[\\\\p{S}\\\\p{P}]&&[^\\"\'(,;\\\\[_`{]])(::|∷)(?![[\\\\p{S}\\\\p{P}]&&[^\\"\'(,;\\\\[_`{]])","beginCaptures":{"1":{"name":"keyword.operator.double-colon.haskell"}},"end":"(?=#?\\\\)|[],]|\\\\b(?<!\')(in|then|else|of)\\\\b(?!\')|([#@])-}|(?<![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])(?:([\\\\\\\\λ])|(<-|←)|(=)|(-<|↢)|(-<<|⤛))([]\\"\'(),;\\\\[_`{}[^\\\\p{S}\\\\p{P}]])|(?=[;}])|$)","patterns":[{"include":"#type_signature"}]}]},"string_literal":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.haskell"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.haskell"}},"name":"string.quoted.double.haskell","patterns":[{"match":"\\\\\\\\(NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[\\"\\\\&\'\\\\\\\\abfnrtv])","name":"constant.character.escape.haskell"},{"match":"\\\\\\\\(?:o[0-7]+|x\\\\h+|[0-9]+)","name":"constant.character.escape.octal.haskell"},{"match":"\\\\\\\\\\\\^[@-_]","name":"constant.character.escape.control.haskell"},{"begin":"\\\\\\\\\\\\s","beginCaptures":{"0":{"name":"constant.character.escape.begin.haskell"}},"end":"\\\\\\\\","endCaptures":{"0":{"name":"constant.character.escape.end.haskell"}},"patterns":[{"match":"\\\\S+","name":"invalid.illegal.character-not-allowed-here.haskell"}]}]},"type_application":{"patterns":[{"begin":"(?<=[]\\",;\\\\[{}\\\\s])(@)(\')?(\\\\()","beginCaptures":{"1":{"name":"keyword.operator.prefix.at.haskell"},"2":{"name":"keyword.operator.promotion.haskell"},"3":{"name":"punctuation.paren.haskell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.paren.haskell"}},"name":"meta.type-application.haskell","patterns":[{"include":"#type_signature"}]},{"begin":"(?<=[]\\",;\\\\[{}\\\\s])(@)(\')?(\\\\[)","beginCaptures":{"1":{"name":"keyword.operator.prefix.at.haskell"},"2":{"name":"keyword.operator.promotion.haskell"},"3":{"name":"punctuation.bracket.haskell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.bracket.haskell"}},"name":"meta.type-application.haskell","patterns":[{"include":"#type_signature"}]},{"begin":"(?<=[]\\",;\\\\[{}\\\\s])(@)(?=\\")","beginCaptures":{"1":{"name":"keyword.operator.prefix.at.haskell"}},"end":"(?<=\\")","name":"meta.type-application.haskell","patterns":[{"include":"#string_literal"}]},{"begin":"(?<=[]\\",;\\\\[{}\\\\s])(@)(?=[\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d])","beginCaptures":{"1":{"name":"keyword.operator.prefix.at.haskell"}},"end":"(?![\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d])","name":"meta.type-application.haskell","patterns":[{"include":"#type_signature"}]}]},"type_constructor":{"patterns":[{"captures":{"1":{"name":"keyword.operator.promotion.haskell"},"2":{"name":"entity.name.namespace.haskell"},"3":{"name":"storage.type.haskell"}},"match":"(\')?((?:\\\\b[\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*\\\\.)*)\\\\b([\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*)"},{"captures":{"1":{"name":"keyword.operator.promotion.haskell"},"2":{"name":"punctuation.paren.haskell"},"3":{"name":"entity.name.namespace.haskell"},"4":{"name":"storage.type.operator.haskell"},"5":{"name":"punctuation.paren.haskell"}},"match":"(\')?(\\\\()\\\\s*((?:[\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*\\\\.)*)([[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]+)\\\\s*(\\\\))"}]},"type_operator":{"patterns":[{"captures":{"1":{"name":"keyword.operator.promotion.haskell"},"2":{"name":"entity.name.namespace.haskell"},"3":{"name":"storage.type.operator.infix.haskell"}},"match":"(?:(?<!\')(\'))?((?:\\\\b[\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*\\\\.)*)(?![#@]?-})(#+|[[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]]+(?<!#))"},{"captures":{"1":{"name":"keyword.operator.promotion.haskell"},"2":{"name":"punctuation.backtick.haskell"},"3":{"name":"entity.name.namespace.haskell"},"4":{"name":"storage.type.infix.haskell"},"5":{"name":"punctuation.backtick.haskell"}},"match":"(\')?(`)((?:[\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*\\\\.)*)([\\\\p{Lu}\\\\p{Lt}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*)(`)"}]},"type_signature":{"patterns":[{"include":"#comment_like"},{"captures":{"1":{"name":"keyword.operator.promotion.haskell"},"2":{"name":"punctuation.paren.haskell"},"3":{"name":"punctuation.paren.haskell"}},"match":"(\')?(\\\\()\\\\s*(\\\\))","name":"support.constant.unit.haskell"},{"captures":{"1":{"name":"punctuation.paren.haskell"},"2":{"name":"keyword.operator.hash.haskell"},"3":{"name":"keyword.operator.hash.haskell"},"4":{"name":"punctuation.paren.haskell"}},"match":"(\\\\()(#)\\\\s*(#)(\\\\))","name":"support.constant.unit.unboxed.haskell"},{"captures":{"1":{"name":"keyword.operator.promotion.haskell"},"2":{"name":"punctuation.paren.haskell"},"3":{"name":"punctuation.paren.haskell"}},"match":"(\')?(\\\\()\\\\s*,[,\\\\s]*(\\\\))","name":"support.constant.tuple.haskell"},{"captures":{"1":{"name":"punctuation.paren.haskell"},"2":{"name":"keyword.operator.hash.haskell"},"3":{"name":"keyword.operator.hash.haskell"},"4":{"name":"punctuation.paren.haskell"}},"match":"(\\\\()(#)\\\\s*(#)(\\\\))","name":"support.constant.unit.unboxed.haskell"},{"captures":{"1":{"name":"punctuation.paren.haskell"},"2":{"name":"keyword.operator.hash.haskell"},"3":{"name":"keyword.operator.hash.haskell"},"4":{"name":"punctuation.paren.haskell"}},"match":"(\\\\()(#)\\\\s*,[,\\\\s]*(#)(\\\\))","name":"support.constant.tuple.unboxed.haskell"},{"captures":{"1":{"name":"keyword.operator.promotion.haskell"},"2":{"name":"punctuation.bracket.haskell"},"3":{"name":"punctuation.bracket.haskell"}},"match":"(\')?(\\\\[)\\\\s*(])","name":"support.constant.empty-list.haskell"},{"include":"#integer_literals"},{"match":"(::|∷)(?![[\\\\p{S}\\\\p{P}]&&[^]\\"\'(),;\\\\[_`{}]])","name":"keyword.operator.double-colon.haskell"},{"include":"#forall"},{"match":"=>|⇒","name":"keyword.operator.big-arrow.haskell"},{"include":"#string_literal"},{"match":"\'[^\']\'","name":"invalid"},{"include":"#type_application"},{"include":"#reserved_symbol"},{"include":"#type_operator"},{"include":"#type_constructor"},{"begin":"(\\\\()(#)","beginCaptures":{"1":{"name":"punctuation.paren.haskell"},"2":{"name":"keyword.operator.hash.haskell"}},"end":"(#)(\\\\))","endCaptures":{"1":{"name":"keyword.operator.hash.haskell"},"2":{"name":"punctuation.paren.haskell"}},"patterns":[{"include":"#comma"},{"include":"#type_signature"}]},{"begin":"(\')?(\\\\()","beginCaptures":{"1":{"name":"keyword.operator.promotion.haskell"},"2":{"name":"punctuation.paren.haskell"}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.paren.haskell"}},"patterns":[{"include":"#comma"},{"include":"#type_signature"}]},{"begin":"(\')?(\\\\[)","beginCaptures":{"1":{"name":"keyword.operator.promotion.haskell"},"2":{"name":"punctuation.bracket.haskell"}},"end":"(])","endCaptures":{"1":{"name":"punctuation.bracket.haskell"}},"patterns":[{"include":"#comma"},{"include":"#type_signature"}]},{"include":"#type_variable"}]},"type_variable":{"match":"\\\\b(?<!\')(?!(?:forall|deriving)\\\\b(?!\'))[_\\\\p{Ll}][\'_\\\\p{Ll}\\\\p{Lu}\\\\p{Lt}\\\\d]*","name":"variable.other.generic-type.haskell"},"where":{"patterns":[{"begin":"(?<!\')\\\\b(where)\\\\s*(\\\\{)(?!-)","beginCaptures":{"1":{"name":"keyword.other.where.haskell"},"2":{"name":"punctuation.brace.haskell"}},"end":"(})","endCaptures":{"1":{"name":"punctuation.brace.haskell"}},"patterns":[{"include":"$self"},{"match":";","name":"punctuation.semicolon.haskell"}]},{"match":"\\\\b(?<!\')(where)\\\\b(?!\')","name":"keyword.other.where.haskell"}]}},"scopeName":"source.haskell","aliases":["hs"]}'))]}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! LICENSE: g.86e2256a70.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["g"],{Wh(e,t,n){n.d(t,{MobileLayoutWrapper:()=>eM});var i=n("j"),s=n("H"),a=n("s"),l=n("NO"),r=n("y");let o=(0,r.A)({name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]});var c=n("Go"),d=n("r"),p=n("z"),h=n("se"),m=n("oj"),x=n("SS"),f=n("K"),u=n("FE"),b=n("R2"),g=n("U8");function k(e){let{activeSessionTitle:t,activeSessionId:n,onOpenSessionSidebar:a,onOpenRightSidebar:l,onNewSession:r,onSelectSession:k}=e,{folders:v}=(0,f.k)(),N=(0,u.H)(),[Y,w]=(0,s.J0)(!1),[y,S]=(0,s.J0)(!1),[F,D]=(0,s.J0)(null),C=(0,s.li)(null);(0,m.W)(C,()=>w(!1));let A=(0,s.li)(null);(0,m.W)(A,()=>S(!1)),(0,s.vJ)(()=>{if(!n)return void D(null);let e=!1;return fetch(`/api/telemetry/context?sessionId=${encodeURIComponent(String(n))}`).then(e=>e.ok?e.json():null).then(t=>{e||D(t?.telemetry??null)}).catch(()=>{e||D(null)}),()=>{e=!0}},[n]);let z=(0,s.Kr)(()=>{let e=Date.now(),t=[];for(let n of v)for(let i of n.sessions??[]){if(1===i.is_archived)continue;let s=(0,x.R7)(String(i.id)),a=i.updated_at?Date.parse(i.updated_at):0,l=void 0!==s&&e-s<=6e5?s:a;void 0!==s&&e-s>6e5||t.push({id:i.id,title:i.title,folderName:n.name,modified:l})}return t.sort((e,t)=>t.modified-e.modified).slice(0,10)},[v]),j=t?t.charAt(0).toUpperCase()+t.slice(1):"New session";return(0,i.FD)("header",{className:"flex-shrink-0 bg-canvas border-b border-ink/10 flex items-center justify-between px-3 z-20 titlebar-drag-region select-none",style:{height:"calc(3.5rem + env(safe-area-inset-top, 0px))",paddingLeft:"max(0.75rem, env(safe-area-inset-left, 0px), env(titlebar-area-x, 0px))",paddingRight:"max(0.75rem, env(safe-area-inset-right, 0px), calc(100vw - env(titlebar-area-width, 100vw)))",paddingTop:"env(safe-area-inset-top, 0px)"},children:[(0,i.FD)("div",{className:"flex items-center space-x-2 min-w-0 titlebar-no-drag",children:[(0,i.Y)("button",{type:"button",onClick:a,className:"p-1.5 rounded-lg hover:bg-ink/5 active:bg-ink/10 text-ink transition-colors flex-shrink-0",title:"Open Sessions","aria-label":"Open Sessions",children:(0,i.Y)(o,{size:20,strokeWidth:2})}),(0,i.FD)("span",{className:"relative font-bold text-sm tracking-tight flex items-center flex-shrink-0",children:[(0,i.Y)("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-orange-600 to-amber-500 font-extrabold text-[15px] tracking-tighter",children:"OMP"}),(0,i.Y)("span",{className:"ml-[1px] text-ink",children:"Chamber"}),(0,i.Y)("span",{className:"absolute -top-0.5 -right-1.5 flex",children:(0,i.Y)(b.c,{status:N})})]}),(0,i.Y)("span",{className:"text-ink/25 font-light text-xs flex-shrink-0 select-none",children:"/"}),(0,i.FD)("div",{className:"relative min-w-0",ref:C,children:[(0,i.FD)("button",{type:"button",onClick:()=>w(!Y),className:"flex items-center space-x-1 text-xs font-semibold text-ink hover:text-ink/80 transition-colors py-1 max-w-[150px] min-w-0",title:j,children:[(0,i.Y)("span",{className:"truncate",children:j}),(0,i.Y)(c.A,{size:13,className:"text-ink/50 flex-shrink-0"})]}),Y&&(0,i.FD)("div",{className:"fixed z-50 bg-paper border border-ink/15 rounded-xl shadow-lg p-2 text-xs",style:{top:"calc(3.5rem + env(safe-area-inset-top, 0px) + 0.375rem)",left:"max(0.75rem, env(safe-area-inset-left, 0px))",right:"max(0.75rem, env(safe-area-inset-right, 0px))",maxWidth:"18rem",maxHeight:"calc(100dvh - 3.5rem - env(safe-area-inset-top, 0px) - 1.125rem)",overflowY:"auto"},children:[(0,i.FD)("button",{type:"button",onClick:()=>{r(),w(!1)},className:"w-full text-left px-3 py-2 rounded-lg bg-ink text-canvas flex items-center space-x-2 font-medium mb-1.5 active:scale-98",children:[(0,i.Y)(d.A,{size:14}),(0,i.Y)("span",{children:"Start New Session"})]}),(0,i.Y)("div",{className:"px-2 py-1 text-[10px] uppercase font-bold text-ink/40",children:"Recent Sessions"}),(0,i.Y)("div",{className:"max-h-64 scrollbar-overlay-container scrollbar-overlay-static space-y-0.5",children:0===z.length?(0,i.Y)("div",{className:"px-2.5 py-2 text-ink/40 italic",children:"No sessions yet"}):z.map(e=>(0,i.FD)("button",{type:"button",onClick:()=>{k(e.id),w(!1)},className:`w-full text-left px-2.5 py-1.5 rounded-lg flex items-center justify-between space-x-2 transition-colors ${String(n)===String(e.id)?"bg-ink/10 font-semibold text-ink":"hover:bg-ink/5 text-ink/80"}`,children:[(0,i.FD)("span",{className:"min-w-0 flex flex-col",children:[(0,i.Y)("span",{className:"truncate",children:e.title?e.title.charAt(0).toUpperCase()+e.title.slice(1):"Untitled"}),(0,i.Y)("span",{className:"truncate text-[10px] text-ink/40 font-mono",children:e.folderName})]}),String(n)===String(e.id)&&(0,i.Y)(p.A,{size:12,className:"flex-shrink-0"})]},e.id))})]})]})]}),(0,i.FD)("div",{className:"flex items-center space-x-1 text-ink",children:[(0,i.FD)("div",{className:"relative flex items-center",ref:A,children:[(0,i.Y)("button",{type:"button",onClick:()=>S(!y),className:"w-8 h-8 rounded-lg hover:bg-ink/5 active:bg-ink/10 flex items-center justify-center text-ink transition-colors cursor-pointer",title:"Context usage","aria-label":"Context usage",children:(0,i.Y)("span",{className:"w-4 h-4 rounded-full border-[1.5px] border-ink/60 hover:border-ink transition-colors"})}),y&&(0,i.FD)("div",{className:"absolute top-full right-0 mt-2 w-56 bg-paper border border-ink/20 rounded-xl shadow-xl z-50 p-3 text-xs font-mono",children:[(0,i.FD)("div",{className:"font-semibold text-ink font-sans pb-1.5 border-b border-ink/10 flex items-center justify-between",children:[(0,i.Y)("span",{children:"Context"}),F&&F.messagesCount>0&&(0,i.Y)("span",{className:"w-1.5 h-1.5 rounded-full bg-success"})]}),F&&0!==F.messagesCount?(0,i.FD)("div",{className:"pt-2 space-y-1.5 text-[11px] text-ink/80",children:[(0,i.FD)("div",{className:"flex justify-between gap-2",children:[(0,i.Y)("span",{className:"text-ink/50",children:"Model:"}),(0,i.Y)("span",{className:"truncate",children:F.modelName||"—"})]}),(0,i.FD)("div",{className:"flex justify-between",children:[(0,i.Y)("span",{className:"text-ink/50",children:"Context:"}),(0,i.FD)("span",{children:[(0,g.Rk)(F.contextUsed)??"0"," / ",(0,g.Rk)(F.contextLimit)??"0"," (",F.contextPercent,"%)"]})]}),(0,i.FD)("div",{className:"flex justify-between",children:[(0,i.Y)("span",{className:"text-ink/50",children:"Messages:"}),(0,i.Y)("span",{children:F.messagesCount})]}),(0,i.FD)("div",{className:"flex justify-between",children:[(0,i.Y)("span",{className:"text-ink/50",children:"Cost:"}),(0,i.Y)("span",{children:F.costFormatted})]}),"number"==typeof F.cacheHitAverage&&(0,i.FD)("div",{className:"flex justify-between",children:[(0,i.Y)("span",{className:"text-ink/50",children:"Cache hit:"}),(0,i.FD)("span",{children:[F.cacheHitAverage.toFixed(1),"%"]})]})]}):(0,i.Y)("div",{className:"pt-2 text-[11px] text-ink/50 italic font-sans",children:"Session not started"})]})]}),(0,i.Y)("button",{type:"button",onClick:l,className:"w-8 h-8 rounded-lg hover:bg-ink/5 active:bg-ink/10 flex items-center justify-center text-ink transition-colors cursor-pointer",title:"Right Panel","aria-label":"Open Right Panel",children:(0,i.Y)(h.A,{size:18,strokeWidth:1.8})})]})]})}var v=n("V2");function N(e){let{activeSessionId:t,onSelectSession:n,onNewSession:a,onOpenSessionSidebar:l,onOpenRightSidebar:r,appSettings:o={}}=e,{folders:c}=(0,f.k)(),[d,p]=(0,s.J0)(null),h=(0,s.Kr)(()=>{if(!t)return"New session";for(let e of c){let n=e.sessions?.find(e=>String(e.id)===String(t));if(n)return n.title}return null},[t,c]);return(0,i.FD)("div",{className:"flex flex-col h-full w-full bg-canvas text-ink relative",children:[(0,i.Y)(k,{activeSessionTitle:d||h||"New session",activeSessionId:t,onOpenSessionSidebar:l,onOpenRightSidebar:r,onNewSession:a,onSelectSession:n}),(0,i.Y)("div",{className:"flex-1 min-h-0",children:(0,i.Y)(v.E,{appSettings:o,onSessionTitle:p,variant:"mobile"})})]})}var Y=n("S");function w(e){let{onClose:t}=e;return(0,i.FD)("div",{className:"border-b border-ink/10 flex items-center justify-between px-3.5 flex-shrink-0 bg-canvas titlebar-drag-region select-none",style:{height:"calc(3.5rem + env(safe-area-inset-top, 0px))",paddingLeft:"max(0.875rem, env(safe-area-inset-left, 0px), env(titlebar-area-x, 0px))",paddingRight:"max(0.875rem, env(safe-area-inset-right, 0px))",paddingTop:"env(safe-area-inset-top, 0px)"},children:[(0,i.FD)("div",{className:"flex items-center space-x-2.5 titlebar-no-drag",children:[(0,i.FD)("span",{className:"font-bold text-sm tracking-tight flex items-center",children:[(0,i.Y)("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-orange-600 to-amber-500 font-extrabold text-[16px] tracking-tighter",children:"OMP"}),(0,i.Y)("span",{className:"ml-[1px] text-ink font-bold text-sm",children:"Chamber"})]}),(0,i.Y)("span",{className:"text-ink/25 text-xs select-none",children:"/"}),(0,i.Y)("span",{className:"text-[11px] font-semibold text-ink/60 uppercase tracking-wider font-mono",children:"Sessions"})]}),(0,i.Y)("button",{type:"button",onClick:t,className:"w-9 h-9 rounded-xl hover:bg-ink/5 active:bg-ink/10 text-ink flex items-center justify-center transition-colors cursor-pointer titlebar-no-drag",title:"Close sidebar","aria-label":"Close sidebar",children:(0,i.Y)(Y.A,{size:19,strokeWidth:2})})]})}var y=n("D"),S=n("O");let F=(0,r.A)({name:"arrow-up-down",size:24,node:[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]});var D=n("p7"),C=n("t3"),A=n("E");function z(e){let{searchQuery:t,sortOption:n,optionsOpen:s,showArchived:a,optionsRef:l,onNewSession:r,onNewWorkspace:o,onScheduler:c,onToggleOptions:h,onSortChange:m,onResetSort:x,onToggleArchived:f,onHideArchived:u,onSearchChange:b,onClearSearch:g}=e;return(0,i.FD)("div",{className:"p-3 border-b border-ink/10 flex flex-col space-y-2.5 flex-shrink-0 bg-canvas",children:[(0,i.FD)("div",{className:"flex items-center space-x-2",children:[(0,i.FD)("button",{type:"button",onClick:r,className:"flex-1 h-9.5 flex items-center justify-center space-x-2 px-3.5 rounded-xl bg-ink text-canvas hover:bg-ink/90 active:scale-[0.98] text-xs font-semibold transition-all shadow-xs",children:[(0,i.Y)(d.A,{size:15,strokeWidth:2.4}),(0,i.Y)("span",{children:"New Session"})]}),(0,i.Y)("button",{type:"button",onClick:o,className:"w-9.5 h-9.5 rounded-xl border border-ink/15 bg-paper hover:bg-ink/5 active:scale-95 text-ink/80 hover:text-ink flex items-center justify-center transition-all flex-shrink-0 cursor-pointer shadow-xs",title:"New Workspace","aria-label":"New Workspace",children:(0,i.Y)(y.A,{size:16,strokeWidth:1.8})}),(0,i.Y)("button",{type:"button",onClick:c,className:"w-9.5 h-9.5 rounded-xl border border-ink/15 bg-paper hover:bg-ink/5 active:scale-95 text-ink/80 hover:text-ink flex items-center justify-center transition-all flex-shrink-0 cursor-pointer shadow-xs",title:"Schedule Task","aria-label":"Schedule Task",children:(0,i.Y)(S.A,{size:16,strokeWidth:1.8})}),(0,i.FD)("div",{className:"relative flex-shrink-0",ref:l,children:[(0,i.Y)("button",{type:"button",onClick:h,className:`w-9.5 h-9.5 rounded-xl border active:scale-95 flex items-center justify-center transition-all cursor-pointer shadow-xs ${s||"A-Z"!==n||a?"bg-ink/10 text-ink border-ink/30":"border-ink/15 bg-paper hover:bg-ink/5 text-ink/80 hover:text-ink"}`,title:"Sort & Filter","aria-label":"Sort & Filter",children:(0,i.Y)(F,{size:15,strokeWidth:1.8})}),s&&(0,i.FD)("div",{className:"absolute right-0 top-full mt-2 w-52 bg-paper border border-ink/15 rounded-xl shadow-xl z-50 p-2 text-xs",children:[(0,i.Y)(A.i,{variant:"mobile",sortOption:n,onSortChange:m}),(0,i.Y)("div",{className:"border-t border-ink/10 my-1.5"}),(0,i.Y)("div",{className:"px-2 py-1 text-[10px] uppercase font-bold text-ink/40 font-mono",children:"Filter"}),(0,i.FD)("button",{type:"button",onClick:f,className:`w-full text-left px-2.5 py-1.5 rounded-lg flex items-center justify-between transition-colors ${a?"bg-amber-500/15 text-amber-950 font-semibold":"hover:bg-ink/5 text-ink/80"}`,children:[(0,i.FD)("span",{className:"flex items-center space-x-1.5",children:[(0,i.Y)(D.A,{size:13}),(0,i.Y)("span",{children:"Show Archived"})]}),a&&(0,i.Y)(p.A,{size:13})]})]})]})]}),(0,i.FD)("div",{className:"relative flex items-center",children:[(0,i.Y)(C.A,{size:14,className:"absolute left-3 text-ink/40"}),(0,i.Y)("input",{type:"text",value:t,onChange:e=>b(e.currentTarget.value),placeholder:"Search workspaces & sessions...",className:"w-full bg-paper border border-ink/15 rounded-xl pl-8 pr-8 py-2 text-xs text-ink placeholder-ink/40 focus:outline-none focus:border-ink/40 transition-colors font-mono"}),t&&(0,i.Y)("button",{type:"button",onClick:g,className:"absolute right-2.5 text-ink/40 hover:text-ink p-1","aria-label":"Clear search",children:(0,i.Y)(Y.A,{size:13})})]}),(a||"A-Z"!==n)&&(0,i.FD)("div",{className:"flex items-center space-x-1.5 flex-wrap gap-y-1 pt-0.5",children:["A-Z"!==n&&(0,i.FD)("span",{className:"inline-flex items-center space-x-1 bg-ink/5 border border-ink/10 text-ink/80 rounded-lg px-2 py-0.5 text-[10px] font-mono",children:[(0,i.FD)("span",{children:["Sort: ",n.replace("_"," ")]}),(0,i.Y)("button",{type:"button",onClick:x,className:"hover:text-ink ml-0.5",title:"Reset sort",children:(0,i.Y)(Y.A,{size:10})})]}),a&&(0,i.FD)("span",{className:"inline-flex items-center space-x-1 bg-amber-500/15 border border-amber-500/25 text-amber-900 rounded-lg px-2 py-0.5 text-[10px] font-mono",children:[(0,i.Y)(D.A,{size:10}),(0,i.Y)("span",{children:"Archived"}),(0,i.Y)("button",{type:"button",onClick:u,className:"hover:text-amber-950 ml-0.5",title:"Hide archived",children:(0,i.Y)(Y.A,{size:10})})]})]})]})}var j=n("qn"),T=n("vZ"),O=n("Sj"),W=n("Nf"),P=n("t"),R=n("b"),$=n("HZ"),E=n("P6");function M(e){let{session:t,isActive:n,status:s,timeAgo:a,showTreeGlyph:l=!1,onSelect:r,onArchive:o,onRename:c}=e,{isEditing:d,draft:h,setDraft:m,inputRef:x,startRename:f,handleKeyDown:u,handleBlur:b}=(0,E.B)(t.title,c);return d?(0,i.Y)("div",{className:"w-full rounded-lg flex items-center bg-ink/10",children:(0,i.Y)("input",{ref:x,autoFocus:!0,value:h,onChange:e=>m(e.currentTarget.value),onKeyDown:u,onBlur:b,className:"flex-1 min-w-0 mx-2 my-1.5 bg-paper border border-ink/25 rounded px-2 py-1 text-xs text-ink outline-none focus:border-ink/50"})}):(0,i.FD)("div",{className:`w-full rounded-lg flex items-center transition-colors ${n?"bg-ink/10 font-medium text-ink":"hover:bg-ink/5 text-ink/85"}`,children:[(0,i.FD)("button",{type:"button",onClick:r,className:"flex-1 text-left px-3 py-2 flex items-center justify-between min-w-0",children:[(0,i.FD)("div",{className:"flex items-center space-x-1.5 min-w-0 pr-2",children:[(0,i.FD)("span",{className:"w-4 flex-shrink-0 flex items-center justify-center",children:["stream"===s&&(0,i.Y)(P.A,{size:13,className:"text-ink/50 animate-spin"}),("finish"===s||"abort"===s||"error"===s)&&(0,i.Y)(p.A,{size:13,className:"text-ink/50"})]}),l&&(0,i.Y)("span",{className:"text-ink/40 text-xs flex-shrink-0 font-mono",children:">"}),(0,i.Y)("span",{className:"text-xs truncate leading-snug",children:t.title.charAt(0).toUpperCase()+t.title.slice(1)})]}),(0,i.Y)("span",{className:"text-[11px] text-ink/45 font-mono flex-shrink-0 ml-2",children:a??""})]}),c&&(0,i.Y)("button",{type:"button",onClick:f,title:"Rename session",className:"flex-shrink-0 p-2 text-ink/35 hover:text-ink rounded-lg cursor-pointer",children:(0,i.Y)(R.A,{size:14})}),(0,i.Y)("button",{type:"button",onClick:o,title:1===t.is_archived?"Unarchive session":"Archive session",className:"flex-shrink-0 p-2 mr-1 text-ink/35 hover:text-ink rounded-lg cursor-pointer",children:1===t.is_archived?(0,i.Y)($.A,{size:14}):(0,i.Y)(D.A,{size:14})})]})}var J=n("C4"),U=n("NR"),I=n("U"),L=n("A");function K(e){let{folder:t,activeSessionId:n,onSelectSession:a,isExpanded:l,onToggleExpand:r,showArchived:o=!1,sessionStatus:d={}}=e,{visibleCount:p,showMore:h}=(0,U.y)(),{refresh:x}=(0,f.k)(),[u,b]=(0,s.J0)(!1),g=(0,s.li)(null),{confirmDelete:k,requestDelete:v,cancelDelete:N,handlePin:Y,handleDelete:w,handleArchive:y,handleRename:S}=(0,I.C)(t,x);(0,m.W)(g,()=>{b(!1),N()});let F=(t.sessions||[]).filter(e=>o?1===e.is_archived:1!==e.is_archived),D=F.slice(0,p),C=(0,L.x)(t.icon);return(0,i.FD)("div",{className:"mb-4",children:[(0,i.FD)("div",{onClick:r,className:"flex items-center justify-between px-3 py-2 cursor-pointer hover:bg-ink/5 rounded-lg select-none transition-colors",children:[(0,i.FD)("div",{className:"flex items-center space-x-2 min-w-0",children:[t.customIconUrl?(0,i.Y)("img",{src:t.customIconUrl,alt:"",className:"w-[15px] h-[15px] rounded-xs object-contain flex-shrink-0",referrerPolicy:"no-referrer"}):"chat"===t.iconType?(0,i.Y)(j.A,{size:15,className:"text-ink/80 flex-shrink-0"}):(0,i.Y)(C,{size:15,className:"text-ink/80 flex-shrink-0",style:{color:t.accentColor||void 0}}),(0,i.Y)("span",{className:"text-sm font-semibold text-ink truncate",children:t.name})]}),(0,i.FD)("div",{className:"flex items-center space-x-2 text-xs text-ink/60",children:[(0,i.Y)("span",{className:"font-mono text-[11px] text-ink/70",children:F.length}),t.project_path&&(0,i.Y)(T.A,{size:13,className:"text-ink/50 ml-1"}),(0,i.FD)("div",{className:"relative flex items-center",ref:g,onClick:e=>e.stopPropagation(),children:[(0,i.Y)("button",{type:"button",onClick:e=>{e.stopPropagation(),b(e=>!e)},className:"p-1.5 rounded-lg hover:bg-ink/10 active:bg-ink/15 text-ink/60 hover:text-ink",title:"Workspace options","aria-label":`Options for ${t.name}`,children:(0,i.Y)(O.A,{size:15})}),u&&(0,i.Y)("div",{className:"absolute right-0 top-full mt-1 w-48 bg-paper border border-ink/15 rounded-lg shadow-lg z-50 py-1 text-xs",children:(0,i.Y)(J.t,{variant:"mobile",isPinned:t.isPinned,confirmDelete:k,onPin:()=>{Y(),b(!1)},onDelete:()=>{w(),b(!1)},onRequestDelete:v,onCancelDelete:N})})]}),l?(0,i.Y)(c.A,{size:14}):(0,i.Y)(W.A,{size:14})]})]}),l&&(0,i.FD)("div",{className:"mt-0.5 space-y-0.5 pl-2",children:[D.map(e=>(0,i.Y)(M,{session:e,isActive:String(n)===String(e.id),status:d[String(e.id)],timeAgo:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();if(null==e||""===e)return null;let n="number"==typeof e?e:Date.parse(e);if(Number.isNaN(n))return null;let i=Math.round((t-n)/1e3);if(i<45)return"now";let s=Math.round(i/60);if(s<60)return`${s}m`;let a=Math.round(s/60);if(a<24)return`${a}h`;let l=Math.round(a/24);if(l<7)return`${l}d`;let r=Math.round(l/7);if(r<5)return`${r}w`;let o=new Date(n),c=o.getFullYear()===new Date(t).getFullYear(),d=o.getDate(),p=o.toLocaleString("en-US",{month:"short"});return c?`${d} ${p}`:`${d} ${p} ${o.getFullYear()}`}(e.updated_at??e.created_at),onSelect:()=>a(e.id),onArchive:()=>y(e),onRename:String(e.id).startsWith("new-")?void 0:t=>void S(e,t)},e.id)),F.length>p&&(0,i.FD)("button",{type:"button",onClick:h,className:"w-full text-left px-3 py-2 text-xs text-ink/60 hover:text-ink flex items-center space-x-1.5",children:[(0,i.Y)(c.A,{size:12,className:"w-4 flex-shrink-0"}),(0,i.FD)("span",{children:["Show more sessions (",F.length-p,")"]})]})]})]})}var H=n("jo");function B(e){let{folders:t,activeSessionId:n,expandedFolders:s,showArchived:a,sessionStatus:l,isScrolling:r,onScroll:o,onSelectSession:c,onToggleFolder:d}=e;return(0,i.Y)("div",{onScroll:o,className:`flex-1 scrollbar-overlay-container p-3 ${(0,H.p)(r)}`,children:0===t.length?(0,i.Y)("div",{className:"text-center py-12 text-xs text-ink/50 italic",children:"No matching sessions found"}):t.map(e=>(0,i.Y)(K,{folder:e,activeSessionId:n,onSelectSession:c,isExpanded:s[e.id]??!0,onToggleExpand:()=>d(e.id),showArchived:a,sessionStatus:l},e.id))})}var _=n("vB"),Z=n("wU"),G=n("mX"),V=n("P");function q(e){let{onSettings:t,onAbout:n,updateAvailable:s,onUpdateClick:a,onDesktopToggle:l}=e;return(0,i.FD)("div",{className:"px-3 pt-3 border-t border-ink/10 flex items-center justify-between flex-shrink-0 bg-canvas text-xs text-ink/60",style:{paddingBottom:"max(0.75rem, env(safe-area-inset-bottom, 0px))"},children:[(0,i.FD)("div",{className:"flex items-center space-x-3",children:[(0,i.FD)("button",{type:"button",onClick:t,className:"flex items-center space-x-1 hover:text-ink transition-colors",children:[(0,i.Y)(_.A,{size:14}),(0,i.Y)("span",{children:"Settings"})]}),(0,i.FD)("button",{type:"button",onClick:n,className:"flex items-center space-x-1 hover:text-ink transition-colors",children:[(0,i.Y)(Z.A,{size:14}),(0,i.Y)("span",{children:"About"})]}),l&&(0,i.FD)("button",{type:"button",onClick:l,className:"flex items-center space-x-1 hover:text-ink transition-colors",title:"Switch to desktop view",children:[(0,i.Y)(G.A,{size:14}),(0,i.Y)("span",{children:"Desktop"})]})]}),(0,i.FD)("div",{className:"flex items-center gap-2",children:[(0,i.FD)("span",{className:"font-mono text-[10px] text-ink/40",children:["v",V.rE]}),s&&(0,i.Y)("button",{type:"button",onClick:a,className:"px-2 py-0.5 rounded-full border border-ink/20 text-[10px] font-semibold text-ink hover:border-ink/40",children:"update"})]})]})}var X=n("wu"),Q=n("g"),ee=n("oZ"),et=n("DO"),en=n("z4");let ei=[3,2];function es(){return(0,i.Y)("div",{className:"flex-1 p-3 space-y-4","aria-hidden":"true",children:ei.map((e,t)=>(0,i.FD)("div",{className:"space-y-2",children:[(0,i.FD)("div",{className:"flex items-center gap-2 px-1 py-2",children:[(0,i.Y)("span",{className:"w-4 h-4 rounded-sm animate-pulse bg-ink/10"}),(0,i.Y)("span",{className:"h-3 w-24 rounded animate-pulse bg-ink/10"})]}),Array.from({length:e},(e,t)=>(0,i.FD)("div",{className:"flex items-center gap-2 rounded px-2 py-2",children:[(0,i.Y)("span",{className:"w-4 h-4 rounded-full animate-pulse bg-ink/10"}),(0,i.Y)("span",{className:"h-3 rounded animate-pulse bg-ink/10",style:{width:`${58-t%3*12}%`}})]},t))]},t))})}function ea(e){let{activeSessionId:t,onSelectSession:n,onNewSession:a,onCreateFolder:l,onClose:r,onDesktopToggle:o,appSettings:c={}}=e,{folders:d,initializing:p,searchQuery:h,setSearchQuery:x,showArchived:f,setShowArchived:u,optionsOpen:b,setOptionsOpen:g,sortOption:k,handleSortChange:v,processedFolders:N,sessionStatus:Y,handleSelectSession:y}=(0,en.K)(c,{onSelectSession:n,onAfterSelect:r}),[S,F]=(0,s.J0)({1:!0,2:!0,3:!0}),[D,C]=(0,s.J0)(!1),[A,j]=(0,s.J0)(!1),[T,O]=(0,s.J0)(!1),W=(0,et.M)(),{toasts:P,pushToast:R,dismissToast:$}=(0,ee.Y)(),E=(0,s.li)(null);(0,m.W)(E,()=>g(!1));let{isScrolling:M,handleScroll:J}=(0,H.K)();return(0,s.vJ)(()=>{F(Object.fromEntries(d.map(e=>[e.id,e.isExpanded])))},[d]),(0,i.FD)("div",{className:"flex flex-col h-full w-full bg-canvas text-ink relative select-none",children:[(0,i.Y)(w,{onClose:r}),(0,i.Y)(z,{searchQuery:h,sortOption:k,optionsOpen:b,showArchived:f,optionsRef:E,onNewSession:()=>{a(),r()},onNewWorkspace:()=>C(!0),onScheduler:()=>j(!0),onToggleOptions:()=>g(!b),onSortChange:v,onResetSort:()=>v("A-Z"),onToggleArchived:()=>{u(!f),g(!1)},onHideArchived:()=>u(!1),onSearchChange:x,onClearSearch:()=>x("")}),p?(0,i.Y)(es,{}):(0,i.Y)(B,{folders:N,activeSessionId:t,expandedFolders:S,showArchived:f,sessionStatus:Y,isScrolling:M,onScroll:J,onSelectSession:y,onToggleFolder:e=>{F(t=>({...t,[e]:!t[e]}));let t=d.find(t=>t.id===e),n=!(S[e]??t?.isExpanded??!0);fetch(`/api/folders/${e}/toggle`,{method:"POST",body:new URLSearchParams({isExpanded:String(n)})}).then(t=>{if(!t.ok)throw Error(`HTTP ${t.status}`);window.dispatchEvent(new CustomEvent("omp:workspace-updated",{detail:{folderId:e}}))}).catch(e=>{console.error("Failed to save mobile workspace state:",e)})}}),(0,i.Y)(q,{onSettings:()=>window.dispatchEvent(new CustomEvent("omp:open-settings",{detail:{}})),onAbout:()=>O(!0),onDesktopToggle:o,updateAvailable:W.hasUpdate,onUpdateClick:()=>{O(!0),W.check()}}),(0,i.Y)(Q.xV,{isOpen:D,onClose:()=>C(!1),onCreate:l}),(0,i.Y)(Q.Lo,{isOpen:A,onClose:()=>j(!1)}),(0,i.Y)(Q.VT,{isOpen:T,onClose:()=>O(!1),updates:W,onToast:R}),(0,i.Y)(X.y,{toasts:P,onDismiss:$})]})}var el=n("G"),er=n("oE"),eo=n("Asb"),ec=n("N"),ed=n("Oj"),ep=n("lW"),eh=n("SJ"),em=n("nG"),ex=n("so"),ef=n("ET");let eu={context:{title:"Context & Telemetry",label:"Context",icon:(0,i.Y)(er.A,{size:14,className:"flex-shrink-0"})},files:{title:"Files Explorer",label:"Files",icon:(0,i.Y)(eo.A,{size:14,className:"flex-shrink-0"})},search:{title:"Search Workspace",label:"Search",icon:(0,i.Y)(C.A,{size:14,className:"flex-shrink-0"})},git:{title:"GIT",label:"GIT",icon:(0,i.Y)(T.A,{size:14,className:"flex-shrink-0"})},terminal:{title:"Bun Terminal",label:"Terminal",icon:(0,i.Y)(ec.A,{size:14,className:"flex-shrink-0"})},"user-browser":{title:"Browser (Anda)",label:"Browser",icon:(0,i.Y)(ed.A,{size:14,className:"flex-shrink-0"})},browser:{title:"Browser Agent",label:"Agent",icon:(0,i.Y)(ep.A,{size:14,className:"flex-shrink-0"})},usage:{title:"Usage",label:"Usage",icon:(0,i.Y)(eh.A,{size:14,className:"flex-shrink-0"})}};function eb(e){let{enabled:t=!0,rootPath:n,refreshKey:a=0,onRefresh:l,onOpenFile:r,onClose:o}=e,[c,d]=(0,s.J0)("files"),{changes:p}=(0,ex.e)(n,".",a,t,15e3),h=p.length>0;return(0,i.FD)("div",{className:"flex flex-col h-full w-full bg-paper text-ink relative select-none",children:[(0,i.FD)("div",{className:"border-b border-ink/10 flex items-center justify-between px-3 flex-shrink-0 bg-canvas",style:{height:"calc(3.5rem + env(safe-area-inset-top, 0px))",paddingTop:"env(safe-area-inset-top, 0px)",paddingLeft:"max(0.75rem, env(safe-area-inset-left, 0px))",paddingRight:"max(0.75rem, env(safe-area-inset-right, 0px))"},children:[(0,i.Y)("div",{className:"flex items-center space-x-1.5 overflow-x-auto no-scrollbar py-1",children:ef.G7.map(e=>(0,i.FD)("button",{type:"button",onClick:()=>d(e),className:`relative flex items-center transition-all cursor-pointer ${c===e?"space-x-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold bg-ink text-canvas shadow-sm":"p-2 rounded-lg text-ink/70 hover:bg-ink/5"}`,title:eu[e].title,children:[eu[e].icon,c===e&&(0,i.Y)("span",{className:"git"===e?"tracking-wide":void 0,children:eu[e].label}),"git"===e&&h&&(0,i.Y)("span",{className:"absolute top-1 right-1 w-1.5 h-1.5 rounded-full bg-info",title:"Uncommitted changes"})]},e))}),(0,i.Y)("button",{type:"button",onClick:o,className:"p-1.5 rounded-lg hover:bg-ink/5 active:bg-ink/10 text-ink transition-colors flex-shrink-0 ml-2",title:"Close right sidebar","aria-label":"Close right sidebar",children:(0,i.Y)(Y.A,{size:20,strokeWidth:1.8})})]}),(0,i.Y)("div",{className:"flex-1 min-h-0 overflow-hidden relative",style:{paddingBottom:"env(safe-area-inset-bottom, 0px)"},children:t?(0,i.Y)(i.FK,{children:(0,i.FD)(el.tY,{fallback:(0,i.Y)("div",{className:"h-full flex items-center justify-center text-ink/40",children:(0,i.Y)("span",{className:"text-xs font-mono",children:"Loading…"})}),children:["files"===c&&(0,i.Y)(em.gI,{className:"h-full w-full",enabled:t,rootPath:n,refreshKey:a,onRefresh:l,onOpenFile:r}),"search"===c&&(0,i.Y)(em.N1,{className:"h-full w-full",enabled:t,rootPath:n}),"git"===c&&(0,i.Y)(em.nR,{className:"h-full w-full",enabled:t,rootPath:n,refreshKey:a}),"context"===c&&(0,i.Y)(em.ov,{className:"h-full w-full",enabled:t,refreshKey:a,onClose:o}),"terminal"===c&&(0,i.Y)(em.Bz,{className:"h-full w-full",enabled:t,rootPath:n,showHeader:!1}),"user-browser"===c&&(0,i.Y)(em.M,{className:"h-full w-full"}),"browser"===c&&(0,i.Y)(em.XL,{className:"h-full w-full",active:!0}),"usage"===c&&(0,i.Y)(em.WE,{className:"h-full w-full"})]})}):(0,i.Y)("div",{className:"h-full flex items-center justify-center text-ink/40",children:(0,i.Y)("span",{className:"text-xs font-mono",children:"No session selected"})})})]})}var eg=n("E6"),ek=n("rK"),ev=n("Ml"),eN=n("Kv"),eY=n("Soe"),ew=n("bH"),ey=n("yh"),eS=n("hj"),eF=n("na"),eD=n("b0"),eC=n("tC"),eA=n("ob");function ez(e){let{fileName:t,isMarkdown:n,isPreview:s,wordWrap:a,copied:l,onClose:r,onTogglePreview:o,onToggleWrap:c,onZoomOut:d,onZoomIn:h,onCopy:m,onDownload:x}=e;return(0,i.FD)("header",{className:"bg-canvas border-b border-ink/10 flex items-center justify-between px-3 flex-shrink-0",style:{height:"calc(3rem + env(safe-area-inset-top, 0px))",paddingTop:"env(safe-area-inset-top, 0px)",paddingLeft:"max(0.75rem, env(safe-area-inset-left, 0px))",paddingRight:"max(0.75rem, env(safe-area-inset-right, 0px))"},children:[(0,i.FD)("div",{className:"flex items-center space-x-2 min-w-0 pr-2",children:[(0,i.Y)("button",{type:"button",onClick:r,className:"p-1.5 rounded-lg hover:bg-ink/10 text-ink transition-colors active:scale-90 flex-shrink-0 cursor-pointer",title:"Close editor","aria-label":"Close editor",children:(0,i.Y)(eN.A,{size:18,strokeWidth:2})}),(0,i.FD)("div",{className:"flex items-center space-x-1.5 truncate",children:[(0,i.Y)(eA.o,{name:t,size:15,className:"flex-shrink-0"}),(0,i.Y)("span",{className:"font-semibold text-xs text-ink truncate",children:t})]})]}),(0,i.FD)("div",{className:"flex items-center space-x-1 text-ink/70 flex-shrink-0",children:[n&&(0,i.Y)("button",{type:"button",onClick:o,className:`p-1.5 rounded hover:bg-ink/10 transition-colors cursor-pointer ${s?"bg-ink text-canvas":""}`,title:s?"View code":"Preview markdown",children:s?(0,i.Y)(eY.A,{size:15}):(0,i.Y)(ew.A,{size:15})}),(0,i.Y)("button",{type:"button",onClick:c,className:`p-1.5 rounded hover:bg-ink/10 transition-colors cursor-pointer ${a?"text-ink":""}`,title:"Toggle word wrap",children:(0,i.Y)(ey.A,{size:15})}),(0,i.Y)("button",{type:"button",onClick:d,className:"p-1.5 rounded hover:bg-ink/10 transition-colors cursor-pointer",title:"Decrease font size",children:(0,i.Y)(eS.A,{size:15})}),(0,i.Y)("button",{type:"button",onClick:h,className:"p-1.5 rounded hover:bg-ink/10 transition-colors cursor-pointer",title:"Increase font size",children:(0,i.Y)(eF.A,{size:15})}),(0,i.Y)("button",{type:"button",onClick:m,className:"p-1.5 rounded hover:bg-ink/10 transition-colors cursor-pointer",title:"Copy content",children:l?(0,i.Y)(p.A,{size:15,className:"text-success"}):(0,i.Y)(eD.A,{size:15})}),(0,i.Y)("button",{type:"button",onClick:x,className:"p-1.5 rounded hover:bg-ink/10 transition-colors cursor-pointer",title:"Download file",children:(0,i.Y)(eC.A,{size:15})})]})]})}var ej=n("XY");function eT(e){let{file:t,onClose:n,onFileSaved:a}=e,[l,r]=(0,s.J0)(t.name.endsWith(".md")),[o,c]=(0,s.J0)(12),[d,p]=(0,s.J0)(!0),{isScrolling:h,handleScroll:m}=(0,H.K)(),x=t.name.endsWith(".md"),f=(0,ej.n)(t,{reportLoadError:!0,flushOnUnmount:!0,reportSaveError:!0,downloadMimeType:"text/plain;charset=utf-8",onFileSaved:a}),u=f.content,b=f.language,g=u.split("\n").length;return(0,i.FD)("div",{className:"fixed inset-x-0 top-0 h-dvh z-[60] bg-paper flex flex-col font-mono text-xs select-none",children:[(0,i.Y)(ez,{fileName:t.name,isMarkdown:x,isPreview:l,wordWrap:d,copied:f.copied,onClose:n,onTogglePreview:()=>r(!l),onToggleWrap:()=>p(!d),onZoomOut:()=>c(e=>Math.max(10,e-1)),onZoomIn:()=>c(e=>Math.min(18,e+1)),onCopy:f.copy,onDownload:f.download}),(0,i.Y)("div",{onScroll:m,className:`flex-1 min-h-0 overflow-auto relative bg-paper text-ink select-text ${(0,H.p)(h)}`,children:f.isLoading?(0,i.FD)("div",{className:"flex items-center justify-center h-full text-ink/40 text-xs gap-2",children:[(0,i.Y)(P.A,{size:14,className:"animate-spin"}),(0,i.Y)("span",{children:"Loading file content..."})]}):f.loadError?(0,i.FD)("div",{className:"flex flex-col items-center justify-center h-full gap-2 px-6 text-center",children:[(0,i.Y)(eg.A,{size:20,className:"text-error"}),(0,i.FD)("span",{className:"text-xs text-error font-sans",children:["Could not read ",t.name]}),(0,i.Y)("span",{className:"text-[11px] text-ink/50 font-mono break-all",children:f.loadError})]}):x&&l?(0,i.Y)("div",{className:"p-4 bg-paper text-ink min-h-full font-sans prose prose-sm max-w-none",children:(0,i.Y)(ek.T,{content:u})}):(0,i.Y)(ev.P,{value:u,onValueChange:f.onChange,language:b,wordWrap:d,rootClassName:"flex min-h-full bg-paper",gutterClassName:"w-10 py-3 pr-2 select-none text-right text-[10px] text-ink/30 bg-canvas border-r border-ink/10 font-mono leading-[20px] flex-shrink-0",editorWrapperClassName:"flex-1 p-3 overflow-x-auto min-w-0 bg-paper text-ink code-surface",editorClassName:"focus:outline-none",editorStyle:{fontFamily:"monospace",fontSize:`${o}px`,lineHeight:"20px",backgroundColor:"transparent",minHeight:"100%",color:"var(--theme-ink)"}})}),(0,i.FD)("footer",{className:"bg-canvas border-t border-ink/10 px-3 flex items-center justify-between text-[10px] text-ink/60 flex-shrink-0 font-mono",style:{height:"calc(1.75rem + env(safe-area-inset-bottom, 0px))",paddingBottom:"env(safe-area-inset-bottom, 0px)",paddingLeft:"max(0.75rem, env(safe-area-inset-left, 0px))",paddingRight:"max(0.75rem, env(safe-area-inset-right, 0px))"},children:[(0,i.FD)("div",{className:"flex items-center space-x-3",children:[(0,i.FD)("span",{children:[g," lines"]}),(0,i.FD)("span",{children:[u.length," chars"]}),(0,i.Y)("span",{className:"uppercase",children:b})]}),(0,i.FD)("div",{className:"flex items-center space-x-2",children:["saving"===f.saveStatus&&(0,i.FD)(i.FK,{children:[(0,i.Y)(P.A,{size:10,className:"animate-spin"}),(0,i.Y)("span",{children:"Saving…"})]}),"saved"===f.saveStatus&&(0,i.FD)(i.FK,{children:[(0,i.Y)("span",{className:"w-1.5 h-1.5 rounded-full bg-success"}),(0,i.Y)("span",{children:"Saved"})]}),"error"===f.saveStatus&&(0,i.FD)(i.FK,{children:[(0,i.Y)("span",{className:"w-1.5 h-1.5 rounded-full bg-error"}),(0,i.Y)("span",{className:"text-error",children:"Save failed"})]}),"idle"===f.saveStatus&&t.path&&(0,i.Y)("span",{className:"truncate max-w-[140px]",children:t.path})]})]})]})}var eO=n("Xg"),eW=n("LQ");function eP(e){let{diff:t,onClose:n,onFileSaved:s}=e,a=t.path.split("/").pop()||t.path,l=!!t.staged,r=t.status||"M",o=(0,eW.R)(r,l);return(0,i.FD)("div",{className:"fixed inset-x-0 top-0 h-dvh z-[60] bg-paper flex flex-col",children:[(0,i.FD)("header",{className:"bg-canvas border-b border-ink/10 flex items-center justify-between px-3 flex-shrink-0",style:{height:"calc(3rem + env(safe-area-inset-top, 0px))",paddingTop:"env(safe-area-inset-top, 0px)",paddingLeft:"max(0.75rem, env(safe-area-inset-left, 0px))",paddingRight:"max(0.75rem, env(safe-area-inset-right, 0px))"},children:[(0,i.FD)("div",{className:"flex items-center space-x-2 min-w-0 pr-2",children:[(0,i.Y)("button",{type:"button",onClick:n,className:"p-1.5 -ml-1 rounded-lg hover:bg-ink/5 active:bg-ink/10 text-ink transition-colors flex-shrink-0",title:"Back","aria-label":"Close diff",children:(0,i.Y)(eN.A,{size:18,strokeWidth:1.9})}),(0,i.Y)(eA.o,{name:a,size:14,className:"flex-shrink-0"}),(0,i.Y)("span",{className:"font-mono text-xs text-ink font-medium truncate",title:t.path,children:a})]}),(0,i.FD)("span",{className:`px-1.5 py-0.5 text-[10px] font-mono font-semibold rounded border flex-shrink-0 ${o.badgeBgClass}`,children:[o.charStatus," ",o.label]})]}),(0,i.Y)("div",{className:"flex-1 min-h-0",children:(0,i.Y)(eO.M,{className:"h-full",filePath:t.path,status:r,isStaged:l,root:t.root,repo:t.repo||".",onFileSaved:s})})]})}var eR=n("u"),e$=n("Gb"),eE=n("wm");function eM(e){let{onDesktopToggle:t,appSettings:n={}}=e,{folders:r}=(0,f.k)(),[o,c]=(0,a.o)(),d=o.get("sessionId"),p=d?Number.isNaN(Number(d))?d:Number(d):null,h=o.get("folderId"),m=h?Number.isNaN(Number(h))?h:Number(h):null,[x,u]=(0,s.J0)("main"),[b,g]=(0,s.J0)(null),[k,v]=(0,s.J0)(null),[Y,w]=(0,s.J0)(0),[y,S]=(0,s.J0)(!1),[F,D]=(0,s.J0)("appearance"),[C,A]=(0,s.J0)(!1),z=(0,s.hb)(()=>w(e=>e+1),[]),{folder:j}=(0,e$.t)(r,p),T=j??(m?r.find(e=>String(e.id)===String(m))??null:null),O=T?.project_path??null,W=!!T;(0,l.sY)("omp:open-file",e=>{if(!e.detail||!e.detail.path)return;let t=e.detail.path.replace(/^\/+/,"");g({name:e.detail.name||t.split("/").pop()||"file",path:t,content:e.detail.content,root:e.detail.root})}),(0,l.sY)("omp:open-diff",e=>{let t=e.detail;t?.file&&v({path:t.file.replace(/^\/+/,""),status:t.status,staged:t.staged,repo:t.repo,root:t.root??O??void 0})}),(0,l.sY)("omp:open-settings",e=>{let t=e.detail;D(t?.category??"appearance"),A(!!t?.autoOpenAdd),S(!0)});let P=e=>{c(t=>(t.set("sessionId",e.toString()),t.has("subagent")&&t.delete("subagent"),t),{replace:!0}),u("main")},R=()=>{let e=(0,eE.l)(r,d,m??void 0);e&&(0,eE.r)(e),c(e=>{let t=e.get("sessionId"),n=new URLSearchParams(e);if(n.set("sessionId",`new-${Date.now()}`),t){let e=r.find(e=>e.sessions?.some(e=>String(e.id)===String(t)));e&&n.set("folderId",e.id.toString())}return n},{replace:!0}),u("main")},$=async e=>{let t=await fetch("/api/folders",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json().catch(()=>({}));if(!t.ok||!n.success)throw Error(n.error||`HTTP ${t.status}`);window.location.reload()},E=(0,s.hb)(e=>{let t=(e?.path||"").replace(/^\/+/,"");g({name:e?.name||t.split("/").pop()||"file",path:t,content:e?.content,root:e?.root??O??void 0})},[O]);return(0,i.FD)("div",{className:"flex flex-col h-dvh w-screen overflow-hidden bg-canvas text-ink font-sans selection:bg-ink selection:text-canvas relative",children:[(0,i.Y)("div",{className:`flex-1 min-h-0 w-full ${"main"===x?"block":"hidden"}`,children:(0,i.Y)(N,{activeSessionId:p,onSelectSession:P,onNewSession:R,onOpenSessionSidebar:()=>u("session"),onOpenRightSidebar:()=>u("right"),appSettings:n})}),(0,i.Y)("div",{className:`flex-1 min-h-0 w-full ${"session"===x?"block":"hidden"}`,children:(0,i.Y)(ea,{activeSessionId:p,onSelectSession:P,onNewSession:R,onCreateFolder:$,onClose:()=>u("main"),onDesktopToggle:t,appSettings:n})}),"right"===x&&(0,i.Y)("div",{className:"flex-1 min-h-0 w-full",children:(0,i.Y)(eb,{enabled:W,rootPath:O??void 0,refreshKey:Y,onRefresh:z,onOpenFile:E,onClose:()=>u("main")})}),b&&(0,i.Y)(eT,{file:b,onClose:()=>g(null),onFileSaved:z}),k&&(0,i.Y)(eP,{diff:k,onClose:()=>v(null),onFileSaved:z}),(0,i.Y)(eR.b,{isOpen:y,onClose:()=>{S(!1),A(!1)},initialCategory:F,autoOpenAddProvider:C,appSettings:n})]})}},qn(e,t,n){let i=(0,n("y").A)({name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]});n.d(t,{},{A:i})},mX(e,t,n){let i=(0,n("y").A)({name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]});n.d(t,{},{A:i})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["hn"],{Ti(e,r,a){var t=a("I6"),l=a("P0");a("MM"),a("Yr");var n=a("M4"),i=a("Gt"),s=a("Xe"),p=(0,s.lz)().Railroad.parser.LangiumParser,o=(0,i.K)(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{let r=e.elements.map(o);return 1===r.length?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{let r=e.alternatives.map(o);return 1===r.length?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:o(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:o(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:o(e.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),d=(0,i.K)(e=>({name:e.name,definition:o(e.definition)}),"transformRule"),m=(0,i.K)(e=>{(0,l.S)(e,t.db),e.title&&t.db.setTitle(e.title),e.rules.map(e=>t.db.addRule(d(e)))},"populateDb"),u={parser:{parse:(0,i.K)(e=>{t.db.clear(),n.R.debug("[Railroad Parser] Starting Langium parse");let r=p.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new s.zg(r);let a=r.value;n.R.debug("[Railroad Parser] Parsed rules:",a.rules.length),m(a),n.R.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t.db}},db:t.db,renderer:t.U,styles:t.$};a.d(r,{diagram:()=>u})}}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["jg"],{
|
|
1
|
+
"use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["jg"],{I6(e,t,r){var i=r("MM"),a=r("Yr"),n=r("M4"),o=r("Gt"),l="",s="",d="",m=[],c=new Map,h=(0,o.K)(e=>(0,a.jZ)(e,(0,a.D7)()),"sanitizeText"),p=(0,o.K)(e=>{switch(e.type){case"terminal":return{...e,value:h(e.value)};case"nonterminal":return{...e,name:h(e.name)};case"sequence":return{...e,elements:e.elements.map(p)};case"choice":return{...e,alternatives:e.alternatives.map(p)};case"optional":return{...e,element:p(e.element)};case"repetition":return{...e,element:p(e.element),separator:e.separator?p(e.separator):void 0};case"special":return{...e,text:h(e.text)}}},"sanitizeAstNode"),u=(0,o.K)(()=>{l="",s="",d="",m.length=0,c.clear(),(0,a.IU)(),n.R.debug("[Railroad] Database cleared")},"clear"),g=(0,o.K)(e=>{l=h(e),n.R.debug("[Railroad] Title set:",e)},"setTitle"),T=(0,o.K)(()=>l,"getTitle"),f=(0,o.K)(e=>{let t={...e,name:h(e.name),definition:p(e.definition),comment:e.comment?h(e.comment):void 0};n.R.debug("[Railroad] Adding rule:",t.name),c.has(t.name)&&n.R.warn(`[Railroad] Rule '${t.name}' is already defined. Overwriting.`),m.push(t),c.set(t.name,t)},"addRule"),x=(0,o.K)(()=>m,"getRules"),w=(0,o.K)(e=>c.get(e),"getRule"),k=(0,o.K)(e=>{s=h(e).replace(/^\s+/g,""),n.R.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),C=(0,o.K)(()=>s,"getAccTitle"),$=(0,o.K)(e=>{d=h(e).replace(/\n\s+/g,"\n"),n.R.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),S={clear:u,setTitle:g,getTitle:T,addRule:f,getRules:x,getRule:w,setAccTitle:k,getAccTitle:C,setAccDescription:$,getAccDescription:(0,o.K)(()=>d,"getAccDescription"),setDiagramTitle:g,getDiagramTitle:T},F={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},y=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,R=/^[\w "',.-]+$/,b=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),v=(0,o.K)(e=>!!e&&Object.keys(e).every(e=>"railroad"===e||b.has(e)),"isRailroadStyleOptions"),z=(0,o.K)(e=>e?"railroad"in e&&e.railroad?e.railroad:v(e)?e:{}:{},"extractRailroadOverrides"),K=(0,o.K)(e=>{if(!e||v(e))return{};let{railroad:t,svgId:r,theme:i,look:a,...n}=e;return n},"extractThemeOverrides"),M=(0,o.K)((e,t)=>{if("string"!=typeof e)return t;let r=e.trim();return y.test(r)?r:t},"sanitizeColorValue"),A=(0,o.K)((e,t)=>{if("string"!=typeof e)return t;let r=e.trim();return R.test(r)?r:t},"sanitizeFontFamilyValue"),D=(0,o.K)((e,t)=>{let r="number"==typeof e?e:"string"==typeof e?Number.parseFloat(e):0/0;return Number.isFinite(r)&&r>=0?r:t},"sanitizeNumberValue"),N=(0,o.K)(e=>{let t="number"==typeof e?e:"string"==typeof e?Number.parseFloat(e):0/0;return Number.isFinite(t)&&t>0?t:void 0},"parseThemeFontSize"),B=(0,o.K)(e=>{let t=A(e.fontFamily,F.fontFamily),r=N(e.fontSize)??F.fontSize;return{...F,fontFamily:t,fontSize:r,terminalFill:M(e.secondBkg??e.secondaryColor,F.terminalFill),terminalStroke:M(e.secondaryBorderColor??e.lineColor,F.terminalStroke),terminalTextColor:M(e.secondaryTextColor??e.textColor,F.terminalTextColor),nonTerminalFill:M(e.mainBkg??e.background,F.nonTerminalFill),nonTerminalStroke:M(e.primaryBorderColor??e.lineColor,F.nonTerminalStroke),nonTerminalTextColor:M(e.primaryTextColor??e.textColor,F.nonTerminalTextColor),lineColor:M(e.lineColor,F.lineColor),markerFill:M(e.lineColor,F.markerFill),commentFill:M(e.labelBackground??e.tertiaryColor,F.commentFill),commentStroke:M(e.tertiaryBorderColor??e.lineColor,F.commentStroke),commentTextColor:M(e.tertiaryTextColor??e.textColor,F.commentTextColor),specialFill:M(e.tertiaryColor??e.secondaryColor,F.specialFill),specialStroke:M(e.tertiaryBorderColor??e.secondaryBorderColor,F.specialStroke),ruleNameColor:M(e.titleColor??e.textColor,F.ruleNameColor)}},"buildThemeDefaults"),E=(0,o.K)(e=>{let t=(0,a.zj)(),r=B({...(0,a.P$)(),...t.themeVariables??{},...K(e)}),i={...t.railroad??{},...z(e)};return{compactMode:i.compactMode??r.compactMode,padding:D(i.padding,r.padding),verticalSeparation:D(i.verticalSeparation,r.verticalSeparation),horizontalSeparation:D(i.horizontalSeparation,r.horizontalSeparation),arcRadius:D(i.arcRadius,r.arcRadius),fontSize:D(i.fontSize,r.fontSize),fontFamily:A(i.fontFamily,r.fontFamily),terminalFill:M(i.terminalFill,r.terminalFill),terminalStroke:M(i.terminalStroke,r.terminalStroke),terminalTextColor:M(i.terminalTextColor,r.terminalTextColor),nonTerminalFill:M(i.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:M(i.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:M(i.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:M(i.lineColor,r.lineColor),strokeWidth:D(i.strokeWidth,r.strokeWidth),markerFill:M(i.markerFill,r.markerFill),commentFill:M(i.commentFill,r.commentFill),commentStroke:M(i.commentStroke,r.commentStroke),commentTextColor:M(i.commentTextColor,r.commentTextColor),specialFill:M(i.specialFill,r.specialFill),specialStroke:M(i.specialStroke,r.specialStroke),ruleNameColor:M(i.ruleNameColor,r.ruleNameColor),showMarkers:i.showMarkers??r.showMarkers,markerRadius:D(i.markerRadius,r.markerRadius)}},"buildRailroadStyleOptions"),O=(0,o.K)(e=>{let{fontFamily:t,fontSize:r,terminalFill:i,terminalStroke:a,terminalTextColor:n,nonTerminalFill:o,nonTerminalStroke:l,nonTerminalTextColor:s,lineColor:d,strokeWidth:m,markerFill:c,commentFill:h,commentStroke:p,commentTextColor:u,specialFill:g,specialStroke:T,ruleNameColor:f}=E(e);return`
|
|
2
2
|
.railroad-diagram {
|
|
3
3
|
font-family: ${t};
|
|
4
4
|
font-size: ${r}px;
|