diff --git a/.gitattributes b/.gitattributes index 5ff18dd79dc9f7cc1a0b718b13b022ca945ad074..453f56fa8afb93bb9446f910e3f72f57306b4f8f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -34,3 +34,13 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text *.zst filter=lfs diff=lfs merge=lfs -text *tfevents* filter=lfs diff=lfs merge=lfs -text lecture-01/slides.pdf filter=lfs diff=lfs merge=lfs -text +lecture-01/assets/book-raschka-mNdDqW1A.jpeg filter=lfs diff=lfs merge=lfs -text +lecture-01/assets/dalle-brain-rocket-CNkl6z2t.jpeg filter=lfs diff=lfs merge=lfs -text +lecture-01/assets/dalle-dragonfruit-CGiA0H30.jpeg filter=lfs diff=lfs merge=lfs -text +lecture-01/assets/home-globe-Ca_kMWE9.jpeg filter=lfs diff=lfs merge=lfs -text +lecture-01/assets/home-train-DMUMiSnz.jpeg filter=lfs diff=lfs merge=lfs -text +lecture-01/assets/llm-evolutionary-tree-CduF83L_.jpeg filter=lfs diff=lfs merge=lfs -text +lecture-01/assets/research-ecg-ljyEVJf6.jpeg filter=lfs diff=lfs merge=lfs -text +lecture-01/assets/research-polyps-BnJ5zZJF.jpeg filter=lfs diff=lfs merge=lfs -text +lecture-01/assets/synthetic-ecg-BNIVEI6m.jpeg filter=lfs diff=lfs merge=lfs -text +lecture-01/assets/synthetic-polyp-CIkbWMkW.jpeg filter=lfs diff=lfs merge=lfs -text diff --git a/lecture-01/404.html b/lecture-01/404.html index 95c273e35e2b986c2dfeb550906cf7929bc5979e..5b4a847f121260d892ce76ee12c54bd477aa54a1 100644 --- a/lecture-01/404.html +++ b/lecture-01/404.html @@ -5,22 +5,41 @@ Introduction to Deep Learning - Slidev + + + + + + + + + + + + + + + + + + - + - + + - - - - + + + + - +
diff --git a/lecture-01/assets/Citation-BrOphNXC.js b/lecture-01/assets/Citation-BrOphNXC.js new file mode 100644 index 0000000000000000000000000000000000000000..607122b968c9b07ef742eb39ea4e2550220b8942 --- /dev/null +++ b/lecture-01/assets/Citation-BrOphNXC.js @@ -0,0 +1 @@ +import{B as e,Ct as t,S as n,T as r,U as i,b as a,m as o}from"./modules/shiki-CJZsCeMT.js";import{t as s}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as c}from"./slidev/context-C6dxaFaS.js";var l={class:`dl-citation`},u=[`href`],d=s(r({__name:`Citation`,props:{source:{},url:{}},setup(r){let{$slidev:s,$nav:d,$clicksContext:f,$clicks:p,$page:m,$renderContext:h,$frontmatter:g}=c(),_=r;return(r,s)=>(e(),a(`span`,l,[_.url?(e(),a(`a`,{key:0,href:_.url,target:`_blank`,rel:`noopener`},t(_.source),9,u)):(e(),a(o,{key:1},[n(t(_.source),1)],64)),i(r.$slots,`default`,{},void 0,!0)]))}}),[[`__scopeId`,`data-v-11a8cabc`]]);export{d as t}; \ No newline at end of file diff --git a/lecture-01/assets/Citation-rca7ok54.css b/lecture-01/assets/Citation-rca7ok54.css new file mode 100644 index 0000000000000000000000000000000000000000..e05f98641af8c02e0c505fbe6d1239942e4d8dd3 --- /dev/null +++ b/lecture-01/assets/Citation-rca7ok54.css @@ -0,0 +1 @@ +.dl-citation[data-v-11a8cabc]{font-size:var(--dl-fs-citation);color:var(--dl-muted)}.dl-citation a[data-v-11a8cabc]{color:inherit;border-bottom:1px dotted} diff --git a/lecture-01/assets/DeckFooter-BcBH6IgO.js b/lecture-01/assets/DeckFooter-BcBH6IgO.js new file mode 100644 index 0000000000000000000000000000000000000000..f9c93877a4a5a0775c50ba15bbfb3e76f6d274fc --- /dev/null +++ b/lecture-01/assets/DeckFooter-BcBH6IgO.js @@ -0,0 +1 @@ +import{B as e,Ct as t,T as n,_ as r,b as i,g as a,y as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{t as c}from"./useNav-CGjBnVA8.js";import{t as l}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as u}from"./slidev/context-C6dxaFaS.js";import"./syncState-3Tc2ZArb.js";import"./index-DOePylYH.js";import"./useDrawings-aZNIHmMQ.js";var d={class:`dl-footer`},f={class:`dl-footer__left`},p={key:0,class:`dl-footer__code`},m={key:1,class:`dl-footer__sep`},h={key:2},g={key:3,class:`dl-footer__sep`},_={key:4,class:`dl-footer__title`},v={class:`dl-footer__right`},y=l(n({__name:`DeckFooter`,setup(n){let{$slidev:l}=u(),y=c(),b=a(()=>l?.themeConfigs??{}),x=a(()=>b.value.courseCode??``),S=a(()=>b.value.lecture??``),C=a(()=>b.value.lectureTitle??``);return(n,a)=>(e(),i(`footer`,d,[r(`div`,f,[x.value?(e(),i(`span`,p,t(x.value),1)):o(`v-if`,!0),S.value?(e(),i(`span`,m,`·`)):o(`v-if`,!0),S.value?(e(),i(`span`,h,`Lecture `+t(S.value),1)):o(`v-if`,!0),C.value?(e(),i(`span`,g,`·`)):o(`v-if`,!0),C.value?(e(),i(`span`,_,t(C.value),1)):o(`v-if`,!0)]),r(`div`,v,t(s(y).currentPage.value)+` / `+t(s(y).total.value),1)]))}}),[[`__scopeId`,`data-v-fe908050`]]);export{y as t}; \ No newline at end of file diff --git a/lecture-01/assets/LinkCard-DOp_LlnV.js b/lecture-01/assets/LinkCard-DOp_LlnV.js new file mode 100644 index 0000000000000000000000000000000000000000..9f43a5d765614f60c6971d879c19a64c784c1fac --- /dev/null +++ b/lecture-01/assets/LinkCard-DOp_LlnV.js @@ -0,0 +1 @@ +import{B as e,Ct as t,T as n,_ as r,b as i,y as a,yt as o}from"./modules/shiki-CJZsCeMT.js";import{t as s}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as c}from"./slidev/context-C6dxaFaS.js";var l=[`href`],u={key:0,class:`dl-linkcard__icon`},d={class:`dl-linkcard__text`},f={class:`dl-linkcard__title`},p={key:0,class:`dl-linkcard__blurb`},m={class:`dl-linkcard__host`},h=s(n({__name:`LinkCard`,props:{href:{},title:{},blurb:{},icon:{}},setup(n){let{$slidev:s,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c(),x=n,S=x.href.replace(/^https?:\/\//,``).replace(/\/.*$/,``);return(n,s)=>(e(),i(`a`,{class:`dl-linkcard`,href:x.href,target:`_blank`,rel:`noopener`},[x.icon?(e(),i(`div`,u,t(x.icon),1)):a(`v-if`,!0),r(`div`,d,[r(`div`,f,t(x.title),1),x.blurb?(e(),i(`div`,p,t(x.blurb),1)):a(`v-if`,!0),r(`div`,m,t(o(S)),1)])],8,l))}}),[[`__scopeId`,`data-v-77ab5d10`]]);export{h as t}; \ No newline at end of file diff --git a/lecture-01/assets/LinkCard-DhZ23yU-.css b/lecture-01/assets/LinkCard-DhZ23yU-.css new file mode 100644 index 0000000000000000000000000000000000000000..4fa42dfcec45a8be26c0e45f16c3ef5f119f4d31 --- /dev/null +++ b/lecture-01/assets/LinkCard-DhZ23yU-.css @@ -0,0 +1 @@ +.dl-linkcard[data-v-77ab5d10]{border:1px solid var(--dl-border);border-left:3px solid var(--dl-accent);background:var(--dl-surface);border-radius:8px;align-items:flex-start;gap:.85rem;padding:.9rem 1rem;text-decoration:none;transition:transform .15s,border-color .15s;display:flex}.dl-linkcard[data-v-77ab5d10]:hover{border-color:var(--dl-accent);transform:translateY(-2px)}.dl-linkcard__icon[data-v-77ab5d10]{font-family:Apple Color Emoji,Segoe UI Emoji,Noto Color Emoji,Twemoji Mozilla,sans-serif;font-size:1.6rem;line-height:1}.dl-linkcard__text[data-v-77ab5d10]{min-width:0}.dl-linkcard__title[data-v-77ab5d10]{color:var(--dl-heading);font-size:1.05rem;font-weight:600}.dl-linkcard__blurb[data-v-77ab5d10]{color:var(--dl-body);margin-top:.15rem;font-size:.9rem}.dl-linkcard__host[data-v-77ab5d10]{color:var(--dl-accent);margin-top:.3rem;font-size:.78rem} diff --git a/lecture-01/assets/SlideWrapper-CMn-GoeN.js b/lecture-01/assets/SlideWrapper-CMn-GoeN.js new file mode 100644 index 0000000000000000000000000000000000000000..671acbfe06fa4373c325d47a88917790cf8d8173 --- /dev/null +++ b/lecture-01/assets/SlideWrapper-CMn-GoeN.js @@ -0,0 +1 @@ +import{$ as e,B as t,C as n,K as r,O as i,Q as a,R as o,St as s,T as c,U as l,Z as u,_ as d,b as f,bt as p,dt as m,g as h,gt as g,i as _,lt as v,m as ee,v as y,y as b,yt as x,z as te}from"./modules/shiki-CJZsCeMT.js";import{$ as S,A as C,J as w,X as T,Y as E,t as D,z as O}from"./useNav-CGjBnVA8.js";import{t as k}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{M as A,f as ne}from"./modules/vue-ClnAKIA7.js";import{_ as re,d as j,f as M,g as N,h as P,m as F,p as I,v as L}from"./slidev/context-C6dxaFaS.js";import{n as R,r as z,t as B}from"./syncState-3Tc2ZArb.js";import{a as V,f as H}from"./index-DOePylYH.js";import{t as U}from"./useDrawings-aZNIHmMQ.js";var W=[`innerHTML`],G=c({__name:`DrawingPreview`,props:{page:{}},setup(e){let{drawingState:n}=U();return(r,i)=>x(n)[e.page]?(t(),f(`svg`,{key:0,class:`w-full h-full absolute top-0 pointer-events-none`,innerHTML:x(n)[e.page]},null,8,W)):b(`v-if`,!0)}}),K=v({}),q=[],J=[];R(K,`$syncUp`,!0),R(K,`$syncDown`,!0),R(K,`$paused`,!1),R(K,`$onSet`,e=>q.push(e)),R(K,`$onPatch`,e=>J.push(e)),z(),R(K,`$patch`,async()=>!1);var Y=B(K,K,!0),X=window.navigator.userAgent.match(/Chrome\/(\d+)/)?.[1];X&&Number(X);var Z=window.navigator.userAgent.match(/Chrome\/(\d+)/)?.[1];Z&&Number(Z);var ie=new class{_screenshotSession=null;getSnapshot(e,t){let n=e+(t?`-dark`:`-light`),r=Y.state[n];if(!r)return;let i=O(e);if(i&&r?.revision===i?.meta.slide.revision)return r.image}async saveSnapshot(e,t,n){return!1}async startCapturing(e){return!1}},ae=[`id`],oe=[`id`],se={class:`slidev-slide-container w-full h-full relative`},ce=[`src`],Q=m(null),le=k(c({__name:`SlideContainer`,props:{width:{type:Number},meta:{default:()=>({})},isMain:{type:Boolean,default:!1},no:{type:Number,required:!1},useSnapshot:{type:Boolean,default:!1},contentStyle:{type:Object,default:()=>({})}},setup(n){let r=n,{isPrintMode:i}=D(),c=m(null),p=ne(c),g=m(null),v=h(()=>r.width??p.width.value),y=h(()=>r.width?r.width/w.value:p.height.value),x=h(()=>C.value&&!i.value?+C.value:Math.min(v.value/T.value,y.value/E.value)),S=h(()=>({...r.contentStyle,height:`${E.value}px`,width:`${T.value}px`,"--slidev-slide-scale":x.value})),O=h(()=>r.width?{width:`${r.width}px`,height:`${r.width/w.value}px`}:{});if(r.isMain){let e=document.documentElement.style;a(()=>e.setProperty(`--slidev-slide-scale`,x.value.toString())),te(()=>e.removeProperty(`--slidev-slide-scale`))}A(re,x),A(N,g),e(()=>{r.isMain&&(Q.value=g.value)}),o(()=>{u(()=>r.isMain&&x.value,()=>{_()})});let k=h(()=>{if(!(r.no==null||!r.useSnapshot))return ie.getSnapshot(r.no,H.value)});return(e,r)=>k.value?(t(),f(ee,{key:1},[b(` Image Snapshot `),d(`div`,se,[d(`img`,{src:k.value,class:`w-full h-full object-cover`,style:s(O.value)},null,12,ce),r[0]||=d(`div`,{absolute:``,"bottom-1":``,"right-1":``,"p0.5":``,"text-cyan:75":``,"bg-cyan:10":``,rounded:``,title:`Snapshot`},[d(`div`,{class:`i-carbon-camera`})],-1)])],2112)):(t(),f(`div`,{key:0,id:n.isMain?`slide-container`:void 0,ref_key:`container`,ref:c,class:`slidev-slide-container`,style:s(O.value)},[d(`div`,{id:n.isMain?`slide-content`:void 0,ref_key:`slideElement`,ref:g,class:`slidev-slide-content`,style:s(S.value)},[l(e.$slots,`default`,{},void 0,!0)],12,oe),l(e.$slots,`controls`,{},void 0,!0)],12,ae))}}),[[`__scopeId`,`data-v-0167a76e`]]),ue=Object.assign({}),de=Object.assign({}),fe=Object.assign({}),pe=Object.assign({}),me=Object.assign({}),he=Object.assign({}),ge=Object.assign({}),_e=Object.assign({}),ve=Object.assign({}),ye=Object.assign({}),be=Object.assign({}),$=Object.assign({}),xe=[Object.values(ue)[0],Object.values(de)[0],Object.values(fe)[0]].filter(Boolean),Se={render:()=>xe.map(e=>i(e))},Ce=[Object.values(pe)[0],Object.values(me)[0],Object.values(he)[0]].filter(Boolean),we={render:()=>Ce.map(e=>i(e))},Te=[Object.values(ge)[0],Object.values(_e)[0],Object.values(ve)[0]].filter(Boolean),Ee={render:()=>Te.map(e=>i(e))},De=[Object.values(ye)[0],Object.values(be)[0],Object.values($)[0]].filter(Boolean),Oe={render:()=>De.map(e=>i(e))},ke=[`data-slidev-no`,`lang`],Ae=k(c({__name:`SlideWrapper`,props:{clicksContext:{type:Object,required:!0},renderContext:{type:String,default:`slide`},route:{type:Object,required:!0}},setup(e){let i=e,a=h(()=>i.route.meta?.slide?.frontmatter.zoom??1);A(P,i.route),A(I,i.route.meta.slide.frontmatter),A(M,m(i.route.no)),A(F,m(i.renderContext)),A(j,g(i,`clicksContext`)),A(L,a);let o=h(()=>({"user-select":S.selectable?void 0:`none`,"--slidev-slide-zoom-scale":a.value===1?void 0:a.value}));return(a,c)=>(t(),f(`div`,{"data-slidev-no":i.route.no,class:p(x(V)(e.route,[`slide`,`presenter`].includes(i.renderContext)?``:`disable-view-transition`)),style:s(o.value),lang:i.route.meta.slide.frontmatter.lang},[n(x(Oe)),(t(),y(r(i.route.component))),n(x(Ee))],14,ke))}}),[[`__scopeId`,`data-v-a7136532`]]);export{Q as a,le as i,we as n,G as o,Se as r,Ae as t}; \ No newline at end of file diff --git a/lecture-01/assets/abnfDiagram-UN2JCKJG-Bspp4CZN.js b/lecture-01/assets/abnfDiagram-UN2JCKJG-Bspp4CZN.js new file mode 100644 index 0000000000000000000000000000000000000000..6777da35f630eb4174e7f21a2f2694392a19ecaf --- /dev/null +++ b/lecture-01/assets/abnfDiagram-UN2JCKJG-Bspp4CZN.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as t}from"./chunk-FO5PYUIK-CPzj2963.js";import"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-BPTLHSDI-QRS_xuYz.js";import{n,r,t as i}from"./chunk-QR6SRGRY-cBZQLGGn.js";import{t as a}from"./chunk-6ZKBGPIT-B4RTUexp.js";import"./chunk-A7G5T7E5-C2HISlqa.js";import{t as o}from"./chunk-BQKPLVCE-CH-bQZj9.js";import"./chunk-NYCIP5HP-BZs_nZUU.js";import"./chunk-6QIBY7DQ-xR0SR3RB.js";import"./chunk-SLCUJWJ3-Bzf1BoPP.js";import"./chunk-43ACQNTO-CVHKukau.js";import"./chunk-FXRKSSP6-BDxrggHz.js";import{n as s}from"./chunk-RRYK4PFG-DZMcopsb.js";import"./chunk-IT6C5QXO-BI6Sf-cR.js";import"./chunk-GMJQP6DO-gEw8rKqu.js";import"./chunk-ODPFZSHR-BUzFQ4Zq.js";import"./chunk-6OZ7KPF7-CpRlDBGl.js";import"./chunk-LJTN6OYE-BTsXVLFU.js";import"./chunk-Z6Q54H3S-B8XyqzVF.js";import"./chunk-4KMQCWFH-ClzK3uec.js";import"./chunk-S7Q6ZHN2-CSIi0_Nw.js";import"./chunk-IIWGMRJM-k15frrBU.js";var c=s().RailroadAbnf.parser.LangiumParser,l=e(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=e(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=e(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=e(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=e(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=e(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=e(e=>{a(e,i),e.title&&i.setTitle(e.title),e.rules.map(e=>i.addRule(m(e)))},`populateDb`),g={parser:{parse:e(e=>{i.clear(),t.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new o(n);let r=n.value;t.debug(`[ABNF Parser] Parsed rules:`,r.rules.length),h(r),t.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:i}},db:i,renderer:r,styles:n};export{g as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/application-1-CxfaDnto.jpeg b/lecture-01/assets/application-1-CxfaDnto.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..a18081b1b01ae186d7d56310bf15839a4c7ac3e4 Binary files /dev/null and b/lecture-01/assets/application-1-CxfaDnto.jpeg differ diff --git a/lecture-01/assets/application-2-Do39NhPN.jpeg b/lecture-01/assets/application-2-Do39NhPN.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..b2129d8a89f04dddf5b10d68cc56ba0c8f67cfbc Binary files /dev/null and b/lecture-01/assets/application-2-Do39NhPN.jpeg differ diff --git a/lecture-01/assets/application-3-Dw04GQSX.jpeg b/lecture-01/assets/application-3-Dw04GQSX.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..75c0db1024f8bd6dc0d2361a9bfbcf2a90dfb1f0 Binary files /dev/null and b/lecture-01/assets/application-3-Dw04GQSX.jpeg differ diff --git a/lecture-01/assets/application-4-DR7htHPb.jpeg b/lecture-01/assets/application-4-DR7htHPb.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..c9a16940ccc3cdd72fa23e12db48744d511061a6 Binary files /dev/null and b/lecture-01/assets/application-4-DR7htHPb.jpeg differ diff --git a/lecture-01/assets/architecture-TIHT7OUA-BWQ77455-BpewYfMR.js b/lecture-01/assets/architecture-TIHT7OUA-BWQ77455-BpewYfMR.js new file mode 100644 index 0000000000000000000000000000000000000000..02e9226531e721ea29ae2c0278fff77a55f525ff --- /dev/null +++ b/lecture-01/assets/architecture-TIHT7OUA-BWQ77455-BpewYfMR.js @@ -0,0 +1 @@ +import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as e}from"./chunk-S7Q6ZHN2-CSIi0_Nw.js";export{e as createArchitectureServices}; \ No newline at end of file diff --git a/lecture-01/assets/architectureDiagram-M2JJTB3Y-BOf15hQi.js b/lecture-01/assets/architectureDiagram-M2JJTB3Y-BOf15hQi.js new file mode 100644 index 0000000000000000000000000000000000000000..640797a02aa0d5c17521fb4ddf1253671d81cb23 --- /dev/null +++ b/lecture-01/assets/architectureDiagram-M2JJTB3Y-BOf15hQi.js @@ -0,0 +1,36 @@ +import{i as e,r as t,t as n}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as r,T as i}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as a,E as o,G as s,J as c,Q as l,S as u,Y as d,b as f,et as p,m,o as h,x as g}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as _}from"./chunk-BPTLHSDI-QRS_xuYz.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{i as v,l as y}from"./chunk-OX6ZKUVE-roiHi12N.js";import{i as b,r as x,t as S}from"./chunk-AQ2D6KKF-AxjphkEe.js";import{n as C}from"./chunk-2V3FENDJ-B1mkZICr.js";import{t as w}from"./chunk-6ZKBGPIT-B4RTUexp.js";import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as T}from"./chunk-BQKPLVCE-CH-bQZj9.js";import"./chunk-NYCIP5HP-BZs_nZUU.js";import"./chunk-6QIBY7DQ-xR0SR3RB.js";import"./chunk-SLCUJWJ3-Bzf1BoPP.js";import"./chunk-43ACQNTO-CVHKukau.js";import"./chunk-FXRKSSP6-BDxrggHz.js";import"./chunk-RRYK4PFG-DZMcopsb.js";import"./chunk-IT6C5QXO-BI6Sf-cR.js";import"./chunk-GMJQP6DO-gEw8rKqu.js";import"./chunk-ODPFZSHR-BUzFQ4Zq.js";import"./chunk-6OZ7KPF7-CpRlDBGl.js";import"./chunk-LJTN6OYE-BTsXVLFU.js";import"./chunk-Z6Q54H3S-B8XyqzVF.js";import"./chunk-4KMQCWFH-ClzK3uec.js";import"./chunk-S7Q6ZHN2-CSIi0_Nw.js";import"./chunk-IIWGMRJM-k15frrBU.js";import{t as E}from"./chunk-EMKVYAI2-C4ZARs9V.js";var D=n({"../../node_modules/.pnpm/layout-base@2.0.1/node_modules/layout-base/layout-base.js"(e,n){t((function(t,r){typeof e==`object`&&typeof n==`object`?n.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():t.layoutBase=r()}),`webpackUniversalModuleDefinition`)(e,function(){return(function(e){var n={};function r(t){if(n[t])return n[t].exports;var i=n[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return t(r,`__webpack_require__`),r.m=e,r.c=n,r.i=function(e){return e},r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var n=e&&e.__esModule?t(function(){return e.default},`getDefault`):t(function(){return e},`getModuleExports`);return r.d(n,`a`,n),n},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=``,r(r.s=28)})([(function(e,n,r){function i(){}t(i,`LayoutConstants`),i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_SIZE=40,i.SIMPLE_NODE_HALF_SIZE=i.SIMPLE_NODE_SIZE/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.WORLD_BOUNDARY=1e6,i.INITIAL_WORLD_BOUNDARY=i.WORLD_BOUNDARY/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,e.exports=i}),(function(e,n,r){var i=r(2),a=r(8),o=r(9);function s(e,t,n){i.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var c in t(s,`LEdge`),s.prototype=Object.create(i.prototype),i)s[c]=i[c];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},s.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},s.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=s}),(function(e,n,r){function i(e){this.vGraphObject=e}t(i,`LGraphObject`),e.exports=i}),(function(e,n,r){var i=r(2),a=r(10),o=r(13),s=r(0),c=r(16),l=r(5);function u(e,t,n,r){n==null&&r==null&&(r=t),i.call(this,r),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=r,this.edges=[],this.graphManager=e,this.rect=n!=null&&t!=null?new o(t.x,t.y,n.width,n.height):new o}for(var d in t(u,`LNode`),u.prototype=Object.create(i.prototype),i)u[d]=i[d];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(e){this.rect.width=e},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(e){this.rect.height=e},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},u.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},u.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},u.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},u.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},u.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.source!=n&&r.target!=n)throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},u.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},u.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;it?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal==`right`&&this.setWidth(t+this.labelWidth)),this.labelHeight&&(this.labelPosVertical==`top`?(this.rect.y-=this.labelHeight,this.setHeight(n+this.labelHeight)):this.labelPosVertical==`center`&&this.labelHeight>n?(this.rect.y-=(this.labelHeight-n)/2,this.setHeight(this.labelHeight)):this.labelPosVertical==`bottom`&&this.setHeight(n+this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},u.prototype.transform=function(e){var t=this.rect.x;t>s.WORLD_BOUNDARY?t=s.WORLD_BOUNDARY:t<-s.WORLD_BOUNDARY&&(t=-s.WORLD_BOUNDARY);var n=this.rect.y;n>s.WORLD_BOUNDARY?n=s.WORLD_BOUNDARY:n<-s.WORLD_BOUNDARY&&(n=-s.WORLD_BOUNDARY);var r=new l(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=u}),(function(e,n,r){var i=r(0);function a(){}for(var o in t(a,`FDLayoutConstants`),i)a[o]=i[o];a.MAX_ITERATIONS=2500,a.DEFAULT_EDGE_LENGTH=50,a.DEFAULT_SPRING_STRENGTH=.45,a.DEFAULT_REPULSION_STRENGTH=4500,a.DEFAULT_GRAVITY_STRENGTH=.4,a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,a.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,a.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,a.COOLING_ADAPTATION_FACTOR=.33,a.ADAPTATION_LOWER_NODE_LIMIT=1e3,a.ADAPTATION_UPPER_NODE_LIMIT=5e3,a.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,a.MAX_NODE_DISPLACEMENT=a.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,a.MIN_REPULSION_DIST=a.DEFAULT_EDGE_LENGTH/10,a.CONVERGENCE_CHECK_PERIOD=100,a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,a.MIN_EDGE_LENGTH=1,a.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=a}),(function(e,n,r){function i(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}t(i,`PointD`),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(e){this.x=e},i.prototype.setY=function(e){this.y=e},i.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=i}),(function(e,n,r){var i=r(2),a=r(10),o=r(0),s=r(7),c=r(3),l=r(1),u=r(13),d=r(12),f=r(11);function p(e,t,n){i.call(this,n),this.estimatedSize=a.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof s?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var m in t(p,`LGraph`),p.prototype=Object.create(i.prototype),i)p[m]=i[m];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)throw`Graph has no graph mgr!`;if(this.getNodes().indexOf(r)>-1)throw`Node already in graph!`;return r.owner=this,this.getNodes().push(r),r}var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(t.owner!=n.owner||t.owner!=this)throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null},p.prototype.remove=function(e){var t=e;if(e instanceof c){if(t==null)throw`Node is null!`;if(t.owner==null||t.owner!=this)throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a-1&&u>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(s,1),r.target!=r.source&&r.target.edges.splice(u,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},p.prototype.updateLeftTop=function(){for(var e=a.MAX_VALUE,t=a.MAX_VALUE,n,r,i,o=this.getNodes(),s=o.length,c=0;cn&&(e=n),t>r&&(t=r)}return e==a.MAX_VALUE?null:(i=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-i,this.top=e-i,new d(this.left,this.top))},p.prototype.updateBounds=function(e){for(var t=a.MAX_VALUE,n=-a.MAX_VALUE,r=a.MAX_VALUE,i=-a.MAX_VALUE,o,s,c,l,d,f=this.nodes,p=f.length,m=0;mo&&(t=o),nc&&(r=c),io&&(t=o),nc&&(r=c),i=this.nodes.length){var c=0;n.forEach(function(t){t.owner==e&&c++}),c==this.nodes.length&&(this.isConnected=!0)}},e.exports=p}),(function(e,n,r){var i,a=r(1);function o(e){i=r(6),this.layout=e,this.graphs=[],this.edges=[]}t(o,`LGraphManager`),o.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},o.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==null)throw`Parent node is null!`;if(this.graphs.indexOf(e)>-1)throw`Graph already in this graph mgr!`;if(this.graphs.push(e),e.parent!=null)throw`Already has a parent!`;if(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(a==null||a.getGraphManager()!=this)throw`Source not in this graph mgr!`;if(o==null||o.getGraphManager()!=this)throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),n.source==null||n.target==null)throw`Edge source and/or target is null!`;if(n.source.edges.indexOf(n)!=-1||n.target.edges.indexOf(n)!=-1)throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n},o.prototype.remove=function(e){if(e instanceof i){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var r,o=n.length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]o)return n[0]=r,n[1]=c,n[2]=a,n[3]=y,!1;if(ia)return n[0]=s,n[1]=i,n[2]=_,n[3]=o,!1;if(ra?(n[0]=u,n[1]=d,C=!0):(n[0]=l,n[1]=c,C=!0):T===D&&(r>a?(n[0]=s,n[1]=c,C=!0):(n[0]=f,n[1]=d,C=!0)),-E===D?a>r?(n[2]=v,n[3]=y,w=!0):(n[2]=_,n[3]=g,w=!0):E===D&&(a>r?(n[2]=h,n[3]=g,w=!0):(n[2]=b,n[3]=y,w=!0)),C&&w)return!1;if(r>a?i>o?(O=this.getCardinalDirection(T,D,4),k=this.getCardinalDirection(E,D,2)):(O=this.getCardinalDirection(-T,D,3),k=this.getCardinalDirection(-E,D,1)):i>o?(O=this.getCardinalDirection(-T,D,1),k=this.getCardinalDirection(-E,D,3)):(O=this.getCardinalDirection(T,D,2),k=this.getCardinalDirection(E,D,4)),!C)switch(O){case 1:j=c,A=r+-m/D,n[0]=A,n[1]=j;break;case 2:A=f,j=i+p*D,n[0]=A,n[1]=j;break;case 3:j=d,A=r+m/D,n[0]=A,n[1]=j;break;case 4:A=u,j=i+-p*D,n[0]=A,n[1]=j}if(!w)switch(k){case 1:N=g,M=a+-S/D,n[2]=M,n[3]=N;break;case 2:M=b,N=o+x*D,n[2]=M,n[3]=N;break;case 3:N=y,M=a+S/D,n[2]=M,n[3]=N;break;case 4:M=v,N=o+-x*D,n[2]=M,n[3]=N}}return!1},a.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},a.getIntersection=function(e,t,n,r){if(r==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,c=t.y,l=n.x,u=n.y,d=r.x,f=r.y,p=void 0,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0;return h=c-o,_=a-s,y=s*o-a*c,g=f-u,v=l-d,b=d*u-l*f,x=h*v-g*_,x===0?null:(p=(_*b-v*y)/x,m=(g*y-h*b)/x,new i(p,m))},a.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r=0){var u=(-c+Math.sqrt(c*c-4*s*l))/(2*s),d=(-c-Math.sqrt(c*c-4*s*l))/(2*s);return u>=0&&u<=1?[u]:d>=0&&d<=1?[d]:null}return null},a.HALF_PI=.5*Math.PI,a.ONE_AND_HALF_PI=1.5*Math.PI,a.TWO_PI=2*Math.PI,a.THREE_PI=3*Math.PI,e.exports=a}),(function(e,n,r){function i(){}t(i,`IMath`),i.sign=function(e){return e>0?1:e<0?-1:0},i.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},i.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=i}),(function(e,n,r){function i(){}t(i,`Integer`),i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,e.exports=i}),(function(e,n,r){var i=(function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(l[0]);s.length>0&&t;){var u=s[0];s.splice(0,1),o.add(u);for(var d=u.getEdges(),a=0;a-1&&l.splice(h,1)}o=new Set,c=new Map}}return e},p.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var r=this.edgeToDummyNodes.get(n),a=0;a=0&&t.splice(d,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&l.push(e),r.set(e,t)}})}n=n.concat(l),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},p.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=p}),(function(e,n,r){function i(){}t(i,`RandomSeed`),i.seed=1,i.x=0,i.nextDouble=function(){return i.x=Math.sin(i.seed++)*1e4,i.x-Math.floor(i.x)},e.exports=i}),(function(e,n,r){var i=r(5);function a(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}t(a,`Transform`),a.prototype.getWorldOrgX=function(){return this.lworldOrgX},a.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},a.prototype.getWorldOrgY=function(){return this.lworldOrgY},a.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},a.prototype.getWorldExtX=function(){return this.lworldExtX},a.prototype.setWorldExtX=function(e){this.lworldExtX=e},a.prototype.getWorldExtY=function(){return this.lworldExtY},a.prototype.setWorldExtY=function(e){this.lworldExtY=e},a.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},a.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},a.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},a.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},a.prototype.getDeviceExtX=function(){return this.ldeviceExtX},a.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},a.prototype.getDeviceExtY=function(){return this.ldeviceExtY},a.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},a.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},a.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},a.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},a.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},a.prototype.inverseTransformPoint=function(e){return new i(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=a}),(function(e,n,r){function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);to.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL):(this.coolingFactor=e>o.ADAPTATION_LOWER_NODE_LIMIT?Math.max(o.COOLING_ADAPTATION_FACTOR,1-(e-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR)):1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n,r,i,a,s=this.getAllNodes(),c;if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),c=new Set,n=0;nc||s>c)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(c=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},u.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=c.length||u>=c[0].length)){for(var d=0;de},`_defaultCompareFunction`)}]),e})()}),(function(e,n,r){function i(){}t(i,`SVD`),i.svd=function(e){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=e.length,this.n=e[0].length;var n=Math.min(this.m,this.n);this.s=(function(e){for(var t=[];e-->0;)t.push(0);return t})(Math.min(this.m+1,this.n)),this.U=(function(e){return t(function e(t){if(t.length==0)return 0;for(var n=[],r=0;r0;)t.push(0);return t})(this.n),a=(function(e){for(var t=[];e-->0;)t.push(0);return t})(this.m),o=!0,s=!0,c=Math.min(this.m-1,this.n),l=Math.max(0,Math.min(this.n-2,this.m)),u=0;u=0;A--)if(this.s[A]!==0){for(var j=A+1;j=0;R--){if((function(e,t){return e&&t})(R0;){var W=void 0,G=void 0;for(W=D-2;W>=-1&&W!==-1;W--)if(Math.abs(r[W])<=re+ne*(Math.abs(this.s[W])+Math.abs(this.s[W+1]))){r[W]=0;break}if(W===D-2)G=4;else{var K=void 0;for(K=D-1;K>=W&&K!==W;K--){var ie=(K===D?0:Math.abs(r[K]))+(K===W+1?0:Math.abs(r[K-1]));if(Math.abs(this.s[K])<=re+ne*ie){this.s[K]=0;break}}K===W?G=3:K===D-1?G=1:(G=2,W=K)}switch(W++,G){case 1:var q=r[D-2];r[D-2]=0;for(var J=D-2;J>=W;J--){var ae=i.hypot(this.s[J],q),Y=this.s[J]/ae,X=q/ae;if(this.s[J]=ae,J!==W&&(q=-X*r[J-1],r[J-1]=Y*r[J-1]),s)for(var Z=0;Z=this.s[W+1]);){var Oe=this.s[W];if(this.s[W]=this.s[W+1],this.s[W+1]=Oe,s&&WMath.abs(t)?(n=t/e,n=Math.abs(e)*Math.sqrt(1+n*n)):t==0?n=0:(n=e/t,n=Math.abs(t)*Math.sqrt(1+n*n)),n},e.exports=i}),(function(e,n,r){var i=(function(){function e(e,t){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;a(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},a.emit=function(e,t){for(var n=0;n{var n={45:((e,t,n)=>{var r={};r.layoutBase=n(551),r.CoSEConstants=n(806),r.CoSEEdge=n(767),r.CoSEGraph=n(880),r.CoSEGraphManager=n(578),r.CoSELayout=n(765),r.CoSENode=n(991),r.ConstraintHandler=n(902),e.exports=r}),806:((e,n,r)=>{var i=r(551).FDLayoutConstants;function a(){}for(var o in t(a,`CoSEConstants`),i)a[o]=i[o];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,a.ENFORCE_CONSTRAINTS=!0,a.APPLY_LAYOUT=!0,a.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,a.TREE_REDUCTION_ON_INCREMENTAL=!0,a.PURE_INCREMENTAL=a.DEFAULT_INCREMENTAL,e.exports=a}),767:((e,n,r)=>{var i=r(551).FDLayoutEdge;function a(e,t,n){i.call(this,e,t,n)}for(var o in t(a,`CoSEEdge`),a.prototype=Object.create(i.prototype),i)a[o]=i[o];e.exports=a}),880:((e,n,r)=>{var i=r(551).LGraph;function a(e,t,n){i.call(this,e,t,n)}for(var o in t(a,`CoSEGraph`),a.prototype=Object.create(i.prototype),i)a[o]=i[o];e.exports=a}),578:((e,n,r)=>{var i=r(551).LGraphManager;function a(e){i.call(this,e)}for(var o in t(a,`CoSEGraphManager`),a.prototype=Object.create(i.prototype),i)a[o]=i[o];e.exports=a}),765:((e,n,r)=>{var i=r(551).FDLayout,a=r(578),o=r(880),s=r(991),c=r(767),l=r(806),u=r(902),d=r(551).FDLayoutConstants,f=r(551).LayoutConstants,p=r(551).Point,m=r(551).PointD,h=r(551).DimensionD,g=r(551).Layout,_=r(551).Integer,v=r(551).IGeometry,y=r(551).LGraph,b=r(551).Transform,x=r(551).LinkedList;function S(){i.call(this),this.toBeTiled={},this.constraints={}}for(var C in t(S,`CoSELayout`),S.prototype=Object.create(i.prototype),i)S[C]=i[C];S.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e,e},S.prototype.newGraph=function(e){return new o(null,this.graphManager,e)},S.prototype.newNode=function(e){return new s(this.graphManager,e)},S.prototype.newEdge=function(e){return new c(null,null,e)},S.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.isSubLayout||(this.idealEdgeLength=l.DEFAULT_EDGE_LENGTH<10?10:l.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},S.prototype.initSpringEmbedder=function(){i.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},S.prototype.layout=function(){return f.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},S.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),!this.incremental){var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(l.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return Object.keys(this.constraints).length>0&&(u.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),l.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},S.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0}if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-this.coolingCycle**+(Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0){if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.PURE_INCREMENTAL?d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0}this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=l.PURE_INCREMENTAL?d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},S.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n0&&this.updateDisplacements();for(var n=0;n0&&(i.fixedNodeWeight=o)}}if(this.constraints.relativePlacementConstraint){var s=new Map,c=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(t){e.fixedNodesOnHorizontal.add(t),e.fixedNodesOnVertical.add(t)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var u=this.constraints.alignmentConstraint.vertical,r=0;r=2*e.length/3;r--)t=Math.floor(Math.random()*(r+1)),n=e[r],e[r]=e[t],e[t]=n;return e},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var n=s.has(t.left)?s.get(t.left):t.left,r=s.has(t.right)?s.get(t.right):t.right;e.nodesInRelativeHorizontal.includes(n)||(e.nodesInRelativeHorizontal.push(n),e.nodeToRelativeConstraintMapHorizontal.set(n,[]),e.dummyToNodeForVerticalAlignment.has(n)?e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(n).getCenterX())),e.nodesInRelativeHorizontal.includes(r)||(e.nodesInRelativeHorizontal.push(r),e.nodeToRelativeConstraintMapHorizontal.set(r,[]),e.dummyToNodeForVerticalAlignment.has(r)?e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(r).getCenterX())),e.nodeToRelativeConstraintMapHorizontal.get(n).push({right:r,gap:t.gap}),e.nodeToRelativeConstraintMapHorizontal.get(r).push({left:n,gap:t.gap})}else{var i=c.has(t.top)?c.get(t.top):t.top,a=c.has(t.bottom)?c.get(t.bottom):t.bottom;e.nodesInRelativeVertical.includes(i)||(e.nodesInRelativeVertical.push(i),e.nodeToRelativeConstraintMapVertical.set(i,[]),e.dummyToNodeForHorizontalAlignment.has(i)?e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(i).getCenterY())),e.nodesInRelativeVertical.includes(a)||(e.nodesInRelativeVertical.push(a),e.nodeToRelativeConstraintMapVertical.set(a,[]),e.dummyToNodeForHorizontalAlignment.has(a)?e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(a).getCenterY())),e.nodeToRelativeConstraintMapVertical.get(i).push({bottom:a,gap:t.gap}),e.nodeToRelativeConstraintMapVertical.get(a).push({top:i,gap:t.gap})}});else{var f=new Map,p=new Map;this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var t=s.has(e.left)?s.get(e.left):e.left,n=s.has(e.right)?s.get(e.right):e.right;f.has(t)?f.get(t).push(n):f.set(t,[n]),f.has(n)?f.get(n).push(t):f.set(n,[t])}else{var r=c.has(e.top)?c.get(e.top):e.top,i=c.has(e.bottom)?c.get(e.bottom):e.bottom;p.has(r)?p.get(r).push(i):p.set(r,[i]),p.has(i)?p.get(i).push(r):p.set(i,[r])}});var m=t(function(e,t){var n=[],r=[],i=new x,a=new Set,o=0;return e.forEach(function(s,c){if(!a.has(c)){n[o]=[],r[o]=!1;var l=c;for(i.push(l),a.add(l),n[o].push(l);i.length!=0;)l=i.shift(),t.has(l)&&(r[o]=!0),e.get(l).forEach(function(e){a.has(e)||(i.push(e),a.add(e),n[o].push(e))});o++}}),{components:n,isFixed:r}},`constructComponents`),h=m(f,e.fixedNodesOnHorizontal);this.componentsOnHorizontal=h.components,this.fixedComponentsOnHorizontal=h.isFixed;var g=m(p,e.fixedNodesOnVertical);this.componentsOnVertical=g.components,this.fixedComponentsOnVertical=g.isFixed}}},S.prototype.updateDisplacements=function(){var e=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(t){var n=e.idToNodeMap.get(t.nodeId);n.displacementX=0,n.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,n=0;n1){var s;for(s=0;sr&&(r=Math.floor(o.y)),a=Math.floor(o.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new m(f.WORLD_CENTER_X-o.x/2,f.WORLD_CENTER_Y-o.y/2))},S.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),l.DEFAULT_RADIAL_SEPARATION);S.branchRadialLayout(t,null,0,359,0,r);var i=y.calculateBounds(e),a=new b;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o1;){var g=h[0];h.splice(0,1);var _=u.indexOf(g);_>=0&&u.splice(_,1),p--,d--}m=t==null?0:(u.indexOf(h[0])+1)%p;for(var y=Math.abs(r-n)/d,b=m;f!=d;b=++b%p){var x=u[b].getOtherEnd(e);if(x!=t){var C=(n+f*y)%360,w=(C+y)%360;S.branchRadialLayout(x,e,C,w,i+a,a),f++}}},S.maxDiagonalInTree=function(e){for(var t=_.MIN_VALUE,n=0;nt&&(t=r)}return t},S.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},S.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new s(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var o=e.getGraphManager().add(e.newGraph(),a),c=i.getChild();c.add(a);for(var l=0;li?(r.rect.x-=(r.labelWidth-i)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-i)/2):r.labelPosHorizontal==`right`&&r.setWidth(i+r.labelWidth)),r.labelHeight&&(r.labelPosVertical==`top`?(r.rect.y-=r.labelHeight,r.setHeight(a+r.labelHeight),r.labelMarginTop=r.labelHeight):r.labelPosVertical==`center`&&r.labelHeight>a?(r.rect.y-=(r.labelHeight-a)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-a)/2):r.labelPosVertical==`bottom`&&r.setHeight(a+r.labelHeight))}})},S.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop,a=t.labelMarginLeft,o=t.labelMarginTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i,a,o)}},S.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop,o=r.labelMarginLeft,s=r.labelMarginTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a,o,s)})},S.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},S.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;ru&&(u=f.rect.height)}n+=u+e.verticalPadding}},S.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];if(n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height,i.setCenter(n.tiledMemberPack[r].centerX,n.tiledMemberPack[r].centerY),i.labelMarginLeft=0,i.labelMarginTop=0,l.NODE_DIMENSIONS_INCLUDE_LABELS){var a=i.rect.width,o=i.rect.height;i.labelWidth&&(i.labelPosHorizontal==`left`?(i.rect.x-=i.labelWidth,i.setWidth(a+i.labelWidth),i.labelMarginLeft=i.labelWidth):i.labelPosHorizontal==`center`&&i.labelWidth>a?(i.rect.x-=(i.labelWidth-a)/2,i.setWidth(i.labelWidth),i.labelMarginLeft=(i.labelWidth-a)/2):i.labelPosHorizontal==`right`&&i.setWidth(a+i.labelWidth)),i.labelHeight&&(i.labelPosVertical==`top`?(i.rect.y-=i.labelHeight,i.setHeight(o+i.labelHeight),i.labelMarginTop=i.labelHeight):i.labelPosVertical==`center`&&i.labelHeight>o?(i.rect.y-=(i.labelHeight-o)/2,i.setHeight(i.labelHeight),i.labelMarginTop=(i.labelHeight-o)/2):i.labelPosVertical==`bottom`&&i.setHeight(o+i.labelHeight))}})},S.prototype.tileNodes=function(e,t){var n=this.tileNodesByFavoringDim(e,t,!0),r=this.tileNodesByFavoringDim(e,t,!1),i=this.getOrgRatio(n);return this.getOrgRatio(r)s&&(s=e.getWidth())});var c=a/i,u=o/i,d=(n-r)**2+4*(c+r)*(u+n)*i,f=(r-n+Math.sqrt(d))/(2*(c+r)),p;t?(p=Math.ceil(f),p==f&&p++):p=Math.floor(f);var m=p*(c+r)-r;return s>m&&(m=s),m+=r*2,m},S.prototype.tileNodesByFavoringDim=function(e,n,r){var i=l.TILING_PADDING_VERTICAL,a=l.TILING_PADDING_HORIZONTAL,o=l.TILING_COMPARE_BY,s={rows:[],rowWidth:[],rowHeight:[],width:0,height:n,verticalPadding:i,horizontalPadding:a,centerX:0,centerY:0};o&&(s.idealRowWidth=this.calcIdealRowWidth(e,r));var c=t(function(e){return e.rect.width*e.rect.height},`getNodeArea`),u=t(function(e,t){return c(t)-c(e)},`areaCompareFcn`);e.sort(function(e,t){var n=u;return s.idealRowWidth?(n=o,n(e.id,t.id)):n(e,t)});for(var d=0,f=0,p=0;p0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},S.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},S.prototype.canAddHorizontal=function(e,t,n){if(e.idealRowWidth){var r=e.rows.length-1;return e.rowWidth[r]+t+e.horizontalPadding<=e.idealRowWidth}var i=this.getShortestRowIndex(e);if(i<0)return!0;var a=e.rowWidth[i];if(a+e.horizontalPadding+t<=e.width)return!0;var o=0;e.rowHeight[i]0&&(o=n+e.verticalPadding-e.rowHeight[i]);var s=e.width-a>=t+e.horizontalPadding?(e.height+o)/(a+t+e.horizontalPadding):(e.height+o)/e.width;o=n+e.verticalPadding;var c=e.widtha&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;so&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]0)for(var u=i;u<=a;u++)c[0]+=this.grid[u][o-1].length+this.grid[u][o].length-1;if(a0)for(var u=o;u<=s;u++)c[3]+=this.grid[i-1][u].length+this.grid[i][u].length-1;for(var f=_.MAX_VALUE,p,m,h=0;h{var i=r(551).FDLayoutNode,a=r(551).IMath;function o(e,t,n,r){i.call(this,e,t,n,r)}for(var s in t(o,`CoSENode`),o.prototype=Object.create(i.prototype),i)o[s]=i[s];o.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},o.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i{function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0){var i=0;t.forEach(function(e){n==`horizontal`?(p.set(e,l.has(e)?u[l.get(e)]:a.get(e)),i+=p.get(e)):(p.set(e,l.has(e)?d[l.get(e)]:a.get(e)),i+=p.get(e))}),i/=t.length,e.forEach(function(e){r.has(e)||p.set(e,i)})}else{var o=0;e.forEach(function(e){o+=n==`horizontal`?l.has(e)?u[l.get(e)]:a.get(e):l.has(e)?d[l.get(e)]:a.get(e)}),o/=e.length,e.forEach(function(e){p.set(e,o)})}});for(var g=t(function(){var t=h.shift();e.get(t).forEach(function(e){if(p.get(e.id)o&&(o=v),ys&&(s=y)}}catch(e){f=!0,m=e}finally{try{!c&&h.return&&h.return()}finally{if(f)throw m}}var b=(r+o)/2-(i+s)/2,x=!0,S=!1,C=void 0;try{for(var w=e[Symbol.iterator](),T;!(x=(T=w.next()).done);x=!0){var E=T.value;p.set(E,p.get(E)+b)}}catch(e){S=!0,C=e}finally{try{!x&&w.return&&w.return()}finally{if(S)throw C}}})}return p},`findAppropriatePositionForRelativePlacement`),y=t(function(e){var t=0,n=0,r=0,i=0;if(e.forEach(function(e){e.left?u[l.get(e.left)]-u[l.get(e.right)]>=0?t++:n++:d[l.get(e.top)]-d[l.get(e.bottom)]>=0?r++:i++}),t>n&&r>i)for(var a=0;an)for(var o=0;oi)for(var s=0;s1)n.fixedNodeConstraint.forEach(function(e,t){C[t]=[e.position.x,e.position.y],w[t]=[u[l.get(e.nodeId)],d[l.get(e.nodeId)]]}),T=!0;else if(n.alignmentConstraint)(function(){var e=0;if(n.alignmentConstraint.vertical){for(var r=n.alignmentConstraint.vertical,a=t(function(t){var n=new Set;r[t].forEach(function(e){n.add(e)});var a=new Set([].concat(i(n)).filter(function(e){return D.has(e)})),o=void 0;o=a.size>0?u[l.get(a.values().next().value)]:_(n).x,r[t].forEach(function(t){C[e]=[o,d[l.get(t)]],w[e]=[u[l.get(t)],d[l.get(t)]],e++})},`_loop2`),o=0;o0?u[l.get(r.values().next().value)]:_(n).y,s[t].forEach(function(t){C[e]=[u[l.get(t)],a],w[e]=[u[l.get(t)],d[l.get(t)]],e++})},`_loop3`),f=0;fj&&(j=A[N].length,M=N);if(j0){var G={x:0,y:0};n.fixedNodeConstraint.forEach(function(e,t){var n={x:u[l.get(e.nodeId)],y:d[l.get(e.nodeId)]},r=e.position,i=g(r,n);G.x+=i.x,G.y+=i.y}),G.x/=n.fixedNodeConstraint.length,G.y/=n.fixedNodeConstraint.length,u.forEach(function(e,t){u[t]+=G.x}),d.forEach(function(e,t){d[t]+=G.y}),n.fixedNodeConstraint.forEach(function(e){u[l.get(e.nodeId)]=e.position.x,d[l.get(e.nodeId)]=e.position.y})}if(n.alignmentConstraint){if(n.alignmentConstraint.vertical)for(var K=n.alignmentConstraint.vertical,ie=t(function(e){var t=new Set;K[e].forEach(function(e){t.add(e)});var n=new Set([].concat(i(t)).filter(function(e){return D.has(e)})),r=void 0;r=n.size>0?u[l.get(n.values().next().value)]:_(t).x,t.forEach(function(e){D.has(e)||(u[l.get(e)]=r)})},`_loop4`),q=0;q0?d[l.get(n.values().next().value)]:_(t).y,t.forEach(function(e){D.has(e)||(d[l.get(e)]=r)})},`_loop5`),Y=0;Y{t.exports=e})},r={};function i(e){var t=r[e];if(t!==void 0)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,i),a.exports}return t(i,`__webpack_require__`),i(45)})()})}}),k=n({"../../node_modules/.pnpm/cytoscape-fcose@2.2.0_cytoscape@3.33.3/node_modules/cytoscape-fcose/cytoscape-fcose.js"(e,n){t((function(t,r){typeof e==`object`&&typeof n==`object`?n.exports=r(O()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeFcose=r(O()):t.cytoscapeFcose=r(t.coseBase)}),`webpackUniversalModuleDefinition`)(e,function(e){return(()=>{var n={658:(e=>{e.exports=Object.assign==null?function(e){return[...arguments].slice(1).forEach(function(t){Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e}:Object.assign.bind(Object)}),548:((e,n,r)=>{var i=(function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return t(e,`sliceIterator`),function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}})(),a=r(140).layoutBase.LinkedList,o={};o.getTopMostNodes=function(e){for(var t={},n=0;n0&&t.merge(e)});for(var u=0;u1){u=c[0],d=u.connectedEdges().length,c.forEach(function(e){e.connectedEdges().length0&&i.set(`dummy`+(i.size+1),m),h},o.relocateComponent=function(e,t,n){if(!n.fixedNodeConstraint){var r=1/0,a=-1/0,o=1/0,s=-1/0;if(n.quality==`draft`){var c=!0,l=!1,u=void 0;try{for(var d=t.nodeIndexes[Symbol.iterator](),f;!(c=(f=d.next()).done);c=!0){var p=f.value,m=i(p,2),h=m[0],g=m[1],_=n.cy.getElementById(h);if(_){var v=_.boundingBox(),y=t.xCoords[g]-v.w/2,b=t.xCoords[g]+v.w/2,x=t.yCoords[g]-v.h/2,S=t.yCoords[g]+v.h/2;ya&&(a=b),xs&&(s=S)}}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}var C=e.x-(a+r)/2,w=e.y-(s+o)/2;t.xCoords=t.xCoords.map(function(e){return e+C}),t.yCoords=t.yCoords.map(function(e){return e+w})}else{Object.keys(t).forEach(function(e){var n=t[e],i=n.getRect().x,c=n.getRect().x+n.getRect().width,l=n.getRect().y,u=n.getRect().y+n.getRect().height;ia&&(a=c),ls&&(s=u)});var T=e.x-(a+r)/2,E=e.y-(s+o)/2;Object.keys(t).forEach(function(e){var n=t[e];n.setCenter(n.getCenterX()+T,n.getCenterY()+E)})}}},o.calcBoundingBox=function(e,t,n,r){for(var i=2**53-1,a=-(2**53-1),o=2**53-1,s=-(2**53-1),c=void 0,l=void 0,u=void 0,d=void 0,f=e.descendants().not(`:parent`),p=f.length,m=0;mc&&(i=c),au&&(o=u),s{var i=r(548),a=r(140).CoSELayout,o=r(140).CoSENode,s=r(140).layoutBase.PointD,c=r(140).layoutBase.DimensionD,l=r(140).layoutBase.LayoutConstants,u=r(140).layoutBase.FDLayoutConstants,d=r(140).CoSEConstants;e.exports={coseLayout:t(function(e,n){var r=e.cy,f=e.eles,p=f.nodes(),m=f.edges(),h=void 0,g=void 0,_=void 0,v={};e.randomize&&(h=n.nodeIndexes,g=n.xCoords,_=n.yCoords);var y=t(function(e){return typeof e==`function`},`isFn`),b=t(function(e,t){return y(e)?e(t):e},`optFn`),x=i.calcParentsWithoutChildren(r,f),S=t(function e(t,n,r,a){for(var l=n.length,u=0;u0){var S=void 0;S=r.getGraphManager().add(r.newGraph(),p),e(S,f,r,a)}}},`processChildrenList`),C=t(function(t,n,r){for(var i=0,a=0,o=0;o0?i/a:y(e.idealEdgeLength)?50:e.idealEdgeLength,d.MIN_REPULSION_DIST=u.MIN_REPULSION_DIST=u.DEFAULT_EDGE_LENGTH/10,d.DEFAULT_RADIAL_SEPARATION=u.DEFAULT_EDGE_LENGTH)},`processEdges`),w=t(function(e,t){t.fixedNodeConstraint&&(e.constraints.fixedNodeConstraint=t.fixedNodeConstraint),t.alignmentConstraint&&(e.constraints.alignmentConstraint=t.alignmentConstraint),t.relativePlacementConstraint&&(e.constraints.relativePlacementConstraint=t.relativePlacementConstraint)},`processConstraints`);e.nestingFactor!=null&&(d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(d.DEFAULT_GRAVITY_STRENGTH=u.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(d.MAX_ITERATIONS=u.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(d.DEFAULT_GRAVITY_RANGE_FACTOR=u.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(d.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.tilingCompareBy!=null&&(d.TILING_COMPARE_BY=e.tilingCompareBy),l.QUALITY=e.quality==`proof`?2:0,d.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,d.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!e.randomize,d.ANIMATE=u.ANIMATE=l.ANIMATE=e.animate,d.TILE=e.tile,d.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,d.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal,d.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!0,d.PURE_INCREMENTAL=!e.randomize,l.DEFAULT_UNIFORM_LEAF_NODE_SIZES=e.uniformNodeDimensions,e.step==`transformed`&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,d.ENFORCE_CONSTRAINTS=!1,d.APPLY_LAYOUT=!1),e.step==`enforced`&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!0,d.APPLY_LAYOUT=!1),e.step==`cose`&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!1,d.APPLY_LAYOUT=!0),e.step==`all`&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!!e.randomize,d.ENFORCE_CONSTRAINTS=!0,d.APPLY_LAYOUT=!0),d.TREE_REDUCTION_ON_INCREMENTAL=!(e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint);var T=new a,E=T.newGraphManager();return S(E.addRoot(),i.getTopMostNodes(p),T,e),C(T,E,m),w(T,e),T.runLayout(),v},`coseLayout`)}}),212:((e,n,r)=>{var i=(function(){function e(e,t){for(var n=0;n0){if(p){var m=s.getTopMostNodes(n.eles.nodes());if(u=s.connectComponents(r,n.eles,m),u.forEach(function(e){var t=e.boundingBox();d.push({x:t.x1+t.w/2,y:t.y1+t.h/2})}),n.randomize&&u.forEach(function(e){n.eles=e,a.push(c(n))}),n.quality=="default"||n.quality==`proof`){var h=r.collection();if(n.tile){var g=new Map,_=[],v=[],y=0,b={nodeIndexes:g,xCoords:_,yCoords:v},x=[];if(u.forEach(function(e,t){e.edges().length==0&&(e.nodes().forEach(function(t,n){h.merge(e.nodes()[n]),t.isParent()||(b.nodeIndexes.set(e.nodes()[n].id(),y++),b.xCoords.push(e.nodes()[0].position().x),b.yCoords.push(e.nodes()[0].position().y))}),x.push(t))}),h.length>1){var S=h.boundingBox();d.push({x:S.x1+S.w/2,y:S.y1+S.h/2}),u.push(h),a.push(b);for(var C=x.length-1;C>=0;C--)u.splice(x[C],1),a.splice(x[C],1),d.splice(x[C],1)}}u.forEach(function(e,t){n.eles=e,o.push(l(n,a[t])),s.relocateComponent(d[t],o[t],n)})}else u.forEach(function(e,t){s.relocateComponent(d[t],a[t],n)});var w=new Set;if(u.length>1){var T=[],E=i.filter(function(e){return e.css(`display`)==`none`});u.forEach(function(e,t){var r=void 0;if(n.quality==`draft`&&(r=a[t].nodeIndexes),e.nodes().not(E).length>0){var i={};i.edges=[],i.nodes=[];var c=void 0;e.nodes().not(E).forEach(function(e){if(n.quality==`draft`){if(!e.isParent())c=r.get(e.id()),i.nodes.push({x:a[t].xCoords[c]-e.boundingbox().w/2,y:a[t].yCoords[c]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else{var l=s.calcBoundingBox(e,a[t].xCoords,a[t].yCoords,r);i.nodes.push({x:l.topLeftX,y:l.topLeftY,width:l.width,height:l.height})}}else o[t][e.id()]&&i.nodes.push({x:o[t][e.id()].getLeft(),y:o[t][e.id()].getTop(),width:o[t][e.id()].getWidth(),height:o[t][e.id()].getHeight()})}),e.edges().forEach(function(e){var c=e.source(),l=e.target();if(c.css(`display`)!=`none`&&l.css(`display`)!=`none`){if(n.quality==`draft`){var u=r.get(c.id()),d=r.get(l.id()),f=[],p=[];if(c.isParent()){var m=s.calcBoundingBox(c,a[t].xCoords,a[t].yCoords,r);f.push(m.topLeftX+m.width/2),f.push(m.topLeftY+m.height/2)}else f.push(a[t].xCoords[u]),f.push(a[t].yCoords[u]);if(l.isParent()){var h=s.calcBoundingBox(l,a[t].xCoords,a[t].yCoords,r);p.push(h.topLeftX+h.width/2),p.push(h.topLeftY+h.height/2)}else p.push(a[t].xCoords[d]),p.push(a[t].yCoords[d]);i.edges.push({startX:f[0],startY:f[1],endX:p[0],endY:p[1]})}else o[t][c.id()]&&o[t][l.id()]&&i.edges.push({startX:o[t][c.id()].getCenterX(),startY:o[t][c.id()].getCenterY(),endX:o[t][l.id()].getCenterX(),endY:o[t][l.id()].getCenterY()})}}),i.nodes.length>0&&(T.push(i),w.add(t))}});var D=f.packComponents(T,n.randomize).shifts;if(n.quality==`draft`)a.forEach(function(e,t){var n=e.xCoords.map(function(e){return e+D[t].dx}),r=e.yCoords.map(function(e){return e+D[t].dy});e.xCoords=n,e.yCoords=r});else{var O=0;w.forEach(function(e){Object.keys(o[e]).forEach(function(t){var n=o[e][t];n.setCenter(n.getCenterX()+D[O].dx,n.getCenterY()+D[O].dy)}),O++})}}}else{var k=n.eles.boundingBox();if(d.push({x:k.x1+k.w/2,y:k.y1+k.h/2}),n.randomize){var A=c(n);a.push(A)}n.quality=="default"||n.quality==`proof`?(o.push(l(n,a[0])),s.relocateComponent(d[0],o[0],n)):s.relocateComponent(d[0],a[0],n)}}var j=t(function(e,t){if(n.quality=="default"||n.quality==`proof`){typeof e==`number`&&(e=t);var r=void 0,i=void 0,s=e.data(`id`);return o.forEach(function(e){s in e&&(r={x:e[s].getRect().getCenterX(),y:e[s].getRect().getCenterY()},i=e[s])}),n.nodeDimensionsIncludeLabels&&(i.labelWidth&&(i.labelPosHorizontal==`left`?r.x+=i.labelWidth/2:i.labelPosHorizontal==`right`&&(r.x-=i.labelWidth/2)),i.labelHeight&&(i.labelPosVertical==`top`?r.y+=i.labelHeight/2:i.labelPosVertical==`bottom`&&(r.y-=i.labelHeight/2))),r??={x:e.position(`x`),y:e.position(`y`)},{x:r.x,y:r.y}}var c=void 0;return a.forEach(function(t){var n=t.nodeIndexes.get(e.id());n!=null&&(c={x:t.xCoords[n],y:t.yCoords[n]})}),c??={x:e.position(`x`),y:e.position(`y`)},{x:c.x,y:c.y}},`getPositions`);if(n.quality=="default"||n.quality==`proof`||n.randomize){var M=s.calcParentsWithoutChildren(r,i),N=i.filter(function(e){return e.css(`display`)==`none`});n.eles=i.not(N),i.nodes().not(`:parent`).not(N).layoutPositions(e,n,j),M.length>0&&M.forEach(function(e){e.position(j(e))})}else console.log(`If randomize option is set to false, then quality option must be 'default' or 'proof'.`)},`run`)}]),e})()}),657:((e,n,r)=>{var i=r(548),a=r(140).layoutBase.Matrix,o=r(140).layoutBase.SVD;e.exports={spectralLayout:t(function(e){var n=e.cy,r=e.eles,s=r.nodes(),c=r.nodes(`:parent`),l=new Map,u=new Map,d=new Map,f=[],p=[],m=[],h=[],g=[],_=[],v=[],y=[],b=void 0,x=1e8,S=1e-9,C=e.piTol,w=e.samplingType,T=e.nodeSeparation,E=void 0,D=t(function(){for(var e=0,t=0,n=!1;t=i;){o=r[i++];for(var m=f[o],h=0;hl&&(l=g[y],d=y)}return d},`BFS`),k=t(function(e){var t=void 0;if(e){t=Math.floor(Math.random()*b);for(var n=0;n=1)break;u=l}for(var h=0;h=1)break;u=l}for(var v=0;v0&&(n.isParent()?f[t].push(d.get(n.id())):f[t].push(n.id()))})});var V=t(function(e){var t=u.get(e),r=void 0;l.get(e).forEach(function(i){r=n.getElementById(i).isParent()?d.get(i):i,f[t].push(r),f[u.get(r)].push(e)})},`_loop`),H=!0,ee=!1,te=void 0;try{for(var U=l.keys()[Symbol.iterator](),ne;!(H=(ne=U.next()).done);H=!0){var re=ne.value;V(re)}}catch(e){ee=!0,te=e}finally{try{!H&&U.return&&U.return()}finally{if(ee)throw te}}b=u.size;var W=void 0;if(b>2){E=b{var i=r(212),a=t(function(e){e&&e(`layout`,`fcose`,i)},`register`);typeof cytoscape<`u`&&a(cytoscape),e.exports=a}),140:(t=>{t.exports=e})},r={};function i(e){var t=r[e];if(t!==void 0)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,i),a.exports}return t(i,`__webpack_require__`),i(579)})()})}}),A={L:`left`,R:`right`,T:`top`,B:`bottom`},j={L:t(e=>`${e},${e/2} 0,${e} 0,0`,`L`),R:t(e=>`0,${e/2} ${e},0 ${e},${e}`,`R`),T:t(e=>`0,0 ${e},0 ${e/2},${e}`,`T`),B:t(e=>`${e/2},0 ${e},${e} 0,${e}`,`B`)},M={L:t((e,t)=>e-t+2,`L`),R:t((e,t)=>e-2,`R`),T:t((e,t)=>e-t+2,`T`),B:t((e,t)=>e-2,`B`)},N=t(function(e){return F(e)?e===`L`?`R`:`L`:e===`T`?`B`:`T`},`getOppositeArchitectureDirection`),P=t(function(e){let t=e;return t===`L`||t===`R`||t===`T`||t===`B`},`isArchitectureDirection`),F=t(function(e){let t=e;return t===`L`||t===`R`},`isArchitectureDirectionX`),I=t(function(e){let t=e;return t===`T`||t===`B`},`isArchitectureDirectionY`),L=t(function(e,t){let n=F(e)&&I(t),r=I(e)&&F(t);return n||r},`isArchitectureDirectionXY`),R=t(function(e){let t=e[0],n=e[1],r=F(t)&&I(n),i=I(t)&&F(n);return r||i},`isArchitecturePairXY`),z=t(function(e){return e!==`LL`&&e!==`RR`&&e!==`TT`&&e!==`BB`},`isValidArchitectureDirectionPair`),B=t(function(e,t){let n=`${e}${t}`;return z(n)?n:void 0},`getArchitectureDirectionPair`),V=t(function([e,t],n){let r=n[0],i=n[1];return F(r)?I(i)?[e+(r===`L`?-1:1),t+(i===`T`?1:-1)]:[e+(r===`L`?-1:1),t]:F(i)?[e+(i===`L`?1:-1),t+(r===`T`?1:-1)]:[e,t+(r===`T`?1:-1)]},`shiftPositionByArchitectureDirectionPair`),H=t(function(e){return e===`LT`||e===`TL`?[1,1]:e===`BL`||e===`LB`?[1,-1]:e===`BR`||e===`RB`?[-1,-1]:[-1,1]},`getArchitectureDirectionXYFactors`),ee=t(function(e,t){return L(e,t)?`bend`:F(e)?`horizontal`:`vertical`},`getArchitectureDirectionAlignment`),te=t(function(e){return e.type===`service`},`isArchitectureService`),U=t(function(e){return e.type===`junction`},`isArchitectureJunction`),ne=t((e,t)=>{let[n,r]=[e,t].sort();return`${JSON.stringify(n)}-${JSON.stringify(r)}`},`architectureGroupAlignmentKey`),re=t(e=>e.data(),`edgeData`),W=t(e=>e.data(),`nodeData`),G=m.architecture,K=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId=``,this.setAccTitle=d,this.getAccTitle=g,this.setDiagramTitle=l,this.getDiagramTitle=o,this.getAccDescription=f,this.setAccDescription=c,this.clear()}static{t(this,`ArchitectureDB`)}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId=``,h()}addService({id:e,icon:t,in:n,title:r,iconText:i}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(n)===`node`)throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`service`,icon:t,iconText:i,title:r,edges:[],in:n})}getServices(){return[...this.nodes.values()].filter(te)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)===`node`)throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`junction`,edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(U)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:n,title:r}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(n)===`node`)throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,`group`),this.groups.set(e,{id:e,icon:t,title:r,in:n})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:n,rhsDir:r,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:c}){if(!P(n))throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);if(!P(r))throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes.get(e).in,u=this.nodes.get(t).in;if(o&&l&&u&&l==u)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&l&&u&&l==u)throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:e,lhsDir:n,lhsInto:i,lhsGroup:o,rhsId:t,rhsDir:r,rhsInto:a,rhsGroup:s,title:c};this.edges.push(d);let f=this.nodes.get(e),p=this.nodes.get(t);f&&p&&(f.edges.push(this.edges[this.edges.length-1]),p.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;e.members.forEach(n=>{if(this.registeredIds.get(n)!==`node`)throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);if(t.has(n))throw Error(`align ${e.direction} lists [${n}] more than once`);t.add(n)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,n=new Map;for(let[t,r]of this.nodes.entries()){let i=new Map;for(let n of r.edges){let r=this.getNode(n.lhsId)?.in,a=this.getNode(n.rhsId)?.in;if(r&&a&&r!==a){let t=ee(n.lhsDir,n.rhsDir);t!==`bend`&&e.set(ne(r,a),t)}if(n.lhsId===t){let e=B(n.lhsDir,n.rhsDir);e&&i.set(e,n.rhsId)}else{let e=B(n.rhsDir,n.lhsDir);e&&i.set(e,n.lhsId)}}n.set(t,i)}let r=new Set,i=new Set(n.keys()),a=t(e=>{let t=new Map([[e,[0,0]]]),a=[e];for(;a.length>0;){let e=a.shift();if(e){r.add(e),i.delete(e);let o=n.get(e);if(!o)throw Error(`BFS error: adjacency list for id ${e} not found. Please report this as a bug.`);let s=t.get(e);if(!s)throw Error(`BFS error: position for id ${e} not found in spatial map. Please report this as a bug.`);let[c,l]=s;o.forEach((e,n)=>{r.has(e)||(t.set(e,V([c,l],n)),a.push(e))})}}return t},`BFS`),o=[];for(;i.size>0;){let e=i.values().next().value;o.push(a(e))}this.dataStructures={adjList:n,spatialMaps:o,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return v({...G,...u().architecture})}getConfigField(e){return this.getConfig()[e]}},ie=t((e,t)=>{w(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:`service`})),e.junctions.map(e=>t.addJunction({...e,type:`junction`})),e.edges.map(e=>t.addEdge(e)),e.alignments?.map(e=>t.addLayoutHint({direction:e.direction,members:[...e.members]}))},`populateDb`),q={parser:{yy:void 0},parse:t(async e=>{let t=await T(`architecture`,e);i.debug(t);let n=q.parser?.yy;if(!(n instanceof K))throw Error(`parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);ie(t,n)},`parse`)},J=t(e=>` + .edge { + stroke-width: ${e.archEdgeWidth}; + stroke: ${e.archEdgeColor}; + fill: none; + } + + .arrow { + fill: ${e.archEdgeArrowColor}; + } + + .node-bkg { + fill: none; + stroke: ${e.archGroupBorderColor}; + stroke-width: ${e.archGroupBorderWidth}; + stroke-dasharray: 8; + } + .node-icon-text { + display: flex; + align-items: center; + } + + .node-icon-text > div { + color: #fff; + margin: 1px; + height: fit-content; + text-align: center; + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + } +`,`getStyles`),ae=e(k(),1);function Y(e,t){if(e===0)return t();let n=Math.random,r=e>>>0;Math.random=function(){r=r+1831565813>>>0;let e=r;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296};try{return t()}finally{Math.random=n}}t(Y,`withSeededRandom`);var X=t(e=>`${e}`,`wrapIcon`),Z={prefix:`mermaid-architecture`,height:80,width:80,icons:{database:{body:X(``)},server:{body:X(``)},disk:{body:X(``)},internet:{body:X(``)},cloud:{body:X(``)},unknown:b,blank:{body:X(``)}}},oe=t(async function(e,t,n,r){let i=n.getConfigField(`padding`),o=n.getConfigField(`iconSize`),s=o/2,c=o/6,l=c/2;await Promise.all(t.edges().map(async t=>{let{source:o,sourceDir:u,sourceArrow:d,sourceGroup:f,target:p,targetDir:m,targetArrow:h,targetGroup:g,label:_}=re(t),{x:v,y:b}=t[0].sourceEndpoint(),{x,y:S}=t[0].midpoint(),{x:w,y:T}=t[0].targetEndpoint(),E=i+4;if(f&&(F(u)?v+=u===`L`?-E:E:b+=u===`T`?-E:E+18),g&&(F(m)?w+=m===`L`?-E:E:T+=m===`T`?-E:E+18),!f&&n.getNode(o)?.type===`junction`&&(F(u)?v+=u===`L`?s:-s:b+=u===`T`?s:-s),!g&&n.getNode(p)?.type===`junction`&&(F(m)?w+=m===`L`?s:-s:T+=m===`T`?s:-s),t[0]._private.rscratch){let t=e.insert(`g`);if(t.insert(`path`).attr(`d`,`M ${v},${b} L ${x},${S} L${w},${T} `).attr(`class`,`edge`).attr(`id`,`${r}-${y(o,p,{prefix:`L`})}`),d){let e=F(u)?M[u](v,c):v-l,n=I(u)?M[u](b,c):b-l;t.insert(`polygon`).attr(`points`,j[u](c)).attr(`transform`,`translate(${e},${n})`).attr(`class`,`arrow`)}if(h){let e=F(m)?M[m](w,c):w-l,n=I(m)?M[m](T,c):T-l;t.insert(`polygon`).attr(`points`,j[m](c)).attr(`transform`,`translate(${e},${n})`).attr(`class`,`arrow`)}if(_){let e=L(u,m)?`XY`:F(u)?`X`:`Y`,n=0;n=e===`X`?Math.abs(v-w):e===`Y`?Math.abs(b-T)/1.5:Math.abs(v-w)/2;let r=t.append(`g`);if(await C(r,_,{useHtmlLabels:!1,width:n,classes:`architecture-service-label`},a()),r.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`),e===`X`)r.attr(`transform`,`translate(`+x+`, `+S+`)`);else if(e===`Y`)r.attr(`transform`,`translate(`+x+`, `+S+`) rotate(-90)`);else if(e===`XY`){let e=B(u,m);if(e&&R(e)){let t=r.node().getBoundingClientRect(),[n,i]=H(e);r.attr(`dominant-baseline`,`auto`).attr(`transform`,`rotate(${-1*n*i*45})`);let a=r.node().getBoundingClientRect();r.attr(`transform`,` + translate(${x}, ${S-t.height/2}) + translate(${n*a.width/2}, ${i*a.height/2}) + rotate(${-1*n*i*45}, 0, ${t.height/2}) + `)}}}}}))},`drawEdges`),Q=t(async function(e,t,n,r){let i=n.getConfigField(`padding`)*.75,o=n.getConfigField(`fontSize`),s=n.getConfigField(`iconSize`)/2;await Promise.all(t.nodes().map(async t=>{let c=W(t);if(c.type===`group`){let{h:l,w:u,x1:d,y1:f}=t.boundingBox(),p=e.append(`rect`);p.attr(`id`,`${r}-group-${c.id}`).attr(`x`,d+s).attr(`y`,f+s).attr(`width`,u).attr(`height`,l).attr(`class`,`node-bkg`);let m=e.append(`g`),h=d,g=f;if(c.icon){let e=m.append(`g`);e.html(`${await S(c.icon,{height:i,width:i,fallbackPrefix:Z.prefix})}`),e.attr(`transform`,`translate(`+(h+s+1)+`, `+(g+s+1)+`)`),h+=i,g+=o/2-1-2}if(c.label){let e=m.append(`g`);await C(e,c.label,{useHtmlLabels:!1,width:u,classes:`architecture-service-label`},a()),e.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`start`).attr(`text-anchor`,`start`),e.attr(`transform`,`translate(`+(h+s+4)+`, `+(g+s+2)+`)`)}n.setElementForId(c.id,p)}}))},`drawGroups`),se=t(async function(e,t,n,r){let i=a();for(let a of n){let n=t.append(`g`),o=e.getConfigField(`iconSize`);if(a.title){let e=n.append(`g`);await C(e,a.title,{useHtmlLabels:!1,width:o*1.5,classes:`architecture-service-label`},i),e.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`),e.attr(`transform`,`translate(`+o/2+`, `+o+`)`)}let c=n.append(`g`);if(a.icon)c.html(`${await S(a.icon,{height:o,width:o,fallbackPrefix:Z.prefix})}`);else if(a.iconText){c.html(`${await S(`blank`,{height:o,width:o,fallbackPrefix:Z.prefix})}`);let e=c.append(`g`).append(`foreignObject`).attr(`width`,o).attr(`height`,o).append(`div`).attr(`class`,`node-icon-text`).attr(`style`,`height: ${o}px;`).append(`div`).html(s(a.iconText,i)),t=parseInt(window.getComputedStyle(e.node(),null).getPropertyValue(`font-size`).replace(/\D/g,``))??16;e.attr(`style`,`-webkit-line-clamp: ${Math.floor((o-2)/t)};`)}else c.append(`path`).attr(`class`,`node-bkg`).attr(`id`,`${r}-node-${a.id}`).attr(`d`,`M0,${o} V5 Q0,0 5,0 H${o-5} Q${o},0 ${o},5 V${o} Z`);n.attr(`id`,`${r}-service-${a.id}`).attr(`class`,`architecture-service`);let{width:l,height:u}=n.node().getBBox();a.width=l,a.height=u,e.setElementForId(a.id,n)}return 0},`drawServices`),ce=t(function(e,t,n,r){n.forEach(n=>{let i=t.append(`g`),a=e.getConfigField(`iconSize`);i.append(`g`).append(`rect`).attr(`id`,`${r}-node-${n.id}`).attr(`fill-opacity`,`0`).attr(`width`,a).attr(`height`,a),i.attr(`class`,`architecture-junction`);let{width:o,height:s}=i._groups[0][0].getBBox();i.width=o,i.height=s,e.setElementForId(n.id,i)})},`drawJunctions`);x([{name:Z.prefix,icons:Z}]),E.use(ae.default);function le(e,t,n){e.forEach(e=>{t.add({group:`nodes`,data:{type:`service`,id:e.id,icon:e.icon,label:e.title,parent:e.in,width:n.getConfigField(`iconSize`),height:n.getConfigField(`iconSize`)},classes:`node-service`})})}t(le,`addServices`);function ue(e,t,n){e.forEach(e=>{t.add({group:`nodes`,data:{type:`junction`,id:e.id,parent:e.in,width:n.getConfigField(`iconSize`),height:n.getConfigField(`iconSize`)},classes:`node-junction`})})}t(ue,`addJunctions`);function de(e,t){t.nodes().map(t=>{let n=W(t);n.type!==`group`&&(n.x=t.position().x,n.y=t.position().y,e.getElementById(n.id).attr(`transform`,`translate(`+(n.x||0)+`,`+(n.y||0)+`)`))})}t(de,`positionNodes`);function fe(e,t){e.forEach(e=>{t.add({group:`nodes`,data:{type:`group`,id:e.id,icon:e.icon,label:e.title,parent:e.in},classes:`node-group`})})}t(fe,`addGroups`);function pe(e,t){e.forEach(e=>{let{lhsId:n,rhsId:r,lhsInto:i,lhsGroup:a,rhsInto:o,lhsDir:s,rhsDir:c,rhsGroup:l,title:u}=e,d=L(e.lhsDir,e.rhsDir)?`segments`:`straight`,f={id:`${n}-${r}`,label:u,source:n,sourceDir:s,sourceArrow:i,sourceGroup:a,sourceEndpoint:s===`L`?`0 50%`:s===`R`?`100% 50%`:s===`T`?`50% 0`:`50% 100%`,target:r,targetDir:c,targetArrow:o,targetGroup:l,targetEndpoint:c===`L`?`0 50%`:c===`R`?`100% 50%`:c===`T`?`50% 0`:`50% 100%`};t.add({group:`edges`,data:f,classes:d})})}t(pe,`addEdges`);function me(e,n,r,i=[]){let a=t((e,t)=>{let n=new Map;for(let[i,a]of e.entries()){let e=`${i}`,o=0,s=[...a.entries()];if(s.length===1){n.set(e,s[0][1]);continue}for(let i=0;i{let n=new Map,r=new Map;return t.forEach(([t,i],a)=>{let o=e.getNode(a)?.in??`default`,s=n.get(i)??new Map;n.has(i)||n.set(i,s);let c=r.get(t)??new Map;r.has(t)||r.set(t,c);for(let e of[s,c]){let t=e.get(o)??[];e.has(o)||e.set(o,t),t.push(a)}}),{horiz:[...a(n,`horizontal`).values()].filter(e=>e.length>1),vert:[...a(r,`vertical`).values()].filter(e=>e.length>1)}}).reduce(([e,t],{horiz:n,vert:r})=>[[...e,...n],[...t,...r]],[[],[]]),c=new Set;i.forEach(e=>e.members.forEach(e=>c.add(e)));let l=t(e=>e.filter(e=>!e.some(e=>c.has(e))),`dropOverlapping`),u=l(o),d=l(s);return i.forEach(e=>{e.members.length<2||(e.direction===`row`?u.push([...e.members]):d.push([...e.members]))}),{horizontal:u,vertical:d}}t(me,`getAlignments`);function he(e,n,r=[]){let i=[],a=n.getConfigField(`iconSize`),o=n.getConfigField(`idealEdgeLengthMultiplier`),s=o*a,c=new Set;r.forEach(e=>{for(let t=0;t`${e[0]},${e[1]}`,`posToStr`),u=t(e=>e.split(`,`).map(e=>parseInt(e)),`strToPos`);return e.forEach(e=>{let t=new Map([...e.entries()].map(([e,t])=>[l(t),e])),n=[l([0,0])],r={},s={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;n.length>0;){let e=n.shift();if(e){r[e]=1;let d=t.get(e);if(d){let f=u(e);Object.entries(s).forEach(([e,s])=>{let u=l([f[0]+s[0],f[1]+s[1]]),p=t.get(u);if(p&&!r[u]){if(n.push(u),c.has(`${d}|${p}`))return;i.push({[A[e]]:p,[A[N(e)]]:d,gap:o*a})}})}}}}),i}t(he,`getRelativeConstraints`);function ge(e,n,a,o,s,{spatialMaps:c,groupAlignments:l}){return new Promise(u=>{let d=r(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),f=E({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`straight`,"source-endpoint":`data(sourceEndpoint)`,"target-endpoint":`data(targetEndpoint)`}},{selector:`edge[label]`,style:{label:`data(label)`}},{selector:`edge.segments`,style:{"curve-style":`segments`,"segment-weights":`0`,"segment-distances":[.5],"edge-distances":`endpoints`,"source-endpoint":`data(sourceEndpoint)`,"target-endpoint":`data(targetEndpoint)`}},{selector:`node`,style:{"compound-sizing-wrt-labels":`include`}},{selector:`node[label]`,style:{"text-valign":`bottom`,"text-halign":`center`,"font-size":`${s.getConfigField(`fontSize`)}px`}},{selector:`.node-service`,style:{label:`data(label)`,width:`data(width)`,height:`data(height)`}},{selector:`.node-junction`,style:{width:`data(width)`,height:`data(height)`}},{selector:`.node-group`,style:{padding:`${s.getConfigField(`padding`)}px`}}],layout:{name:`grid`,boundingBox:{x1:0,x2:100,y1:0,y2:100}}});d.remove(),fe(a,f),le(e,f,s),ue(n,f,s),pe(o,f);let p=s.getLayoutHints(),m=me(s,c,l,p),h=he(c,s,p),g=s.getConfigField(`iconSize`),_=s.getConfigField(`idealEdgeLengthMultiplier`)*g,v=.5*g,y=s.getConfigField(`edgeElasticity`),b=s.getConfigField(`seed`),x=f.layout({name:`fcose`,quality:`proof`,randomize:s.getConfigField(`randomize`),nodeSeparation:s.getConfigField(`nodeSeparation`),numIter:s.getConfigField(`numIter`),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){let[t,n]=e.connectedNodes(),{parent:r}=W(t),{parent:i}=W(n);return r===i?_:v},edgeElasticity(e){let[t,n]=e.connectedNodes(),{parent:r}=W(t),{parent:i}=W(n);return r===i?y:.001},alignmentConstraint:m,relativePlacementConstraint:h});x.one(`layoutstop`,()=>{function e(e,t,n,r){let i,a,{x:o,y:s}=e,{x:c,y:l}=t;a=(r-s+(o-n)*(s-l)/(o-c))/Math.sqrt(1+((s-l)/(o-c))**2),i=Math.sqrt((r-s)**2+(n-o)**2-a**2);let u=Math.sqrt((c-o)**2+(l-s)**2);i/=u;let d=(c-o)*(r-s)-(l-s)*(n-o);switch(!0){case d>=0:d=1;break;case d<0:d=-1}let f=(c-o)*(n-o)+(l-s)*(r-s);switch(!0){case f>=0:f=1;break;case f<0:f=-1}return a=Math.abs(a)*d,i*=f,{distances:a,weights:i}}t(e,`getSegmentWeights`),f.startBatch();for(let t of Object.values(f.edges()))if(t.data?.()){let{x:n,y:r}=t.source().position(),{x:i,y:a}=t.target().position();if(n!==i&&r!==a){let n=t.sourceEndpoint(),r=t.targetEndpoint(),{sourceDir:i}=re(t),[a,o]=I(i)?[n.x,r.y]:[r.x,n.y],{weights:s,distances:c}=e(n,r,a,o);t.style(`segment-distances`,c),t.style(`segment-weights`,s)}}f.endBatch(),Y(b,()=>x.run())});try{Y(b,()=>x.run())}catch(e){throw e instanceof RangeError&&e.message.includes(`Invalid array length`)?Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis."):e}f.ready(e=>{i.info(`Ready`,e),u(f)})})}t(ge,`layoutArchitecture`);var _e={parser:q,get db(){return new K},renderer:{draw:t(async(e,t,n,r)=>{let i=r.db;i.setDiagramId(t);let a=i.getServices(),o=i.getJunctions(),s=i.getGroups(),c=i.getEdges(),l=i.getDataStructures(),u=_(t),d=u.append(`g`);d.attr(`class`,`architecture-edges`);let f=u.append(`g`);f.attr(`class`,`architecture-services`);let m=u.append(`g`);m.attr(`class`,`architecture-groups`),await se(i,f,a,t),ce(i,f,o,t);let h=await ge(a,o,s,c,i,l);await oe(d,h,i,t),await Q(m,h,i,t),de(i,h),p(void 0,u,i.getConfigField(`padding`),i.getConfigField(`useMaxWidth`))},`draw`)},styles:J};export{_e as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/blockDiagram-XQ3M7VRV-BZEbDaJX.js b/lecture-01/assets/blockDiagram-XQ3M7VRV-BZEbDaJX.js new file mode 100644 index 0000000000000000000000000000000000000000..e6d3f322f1863ed41b295247bab7e61eab50ae80 --- /dev/null +++ b/lecture-01/assets/blockDiagram-XQ3M7VRV-BZEbDaJX.js @@ -0,0 +1,132 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as t,T as n,c as r,x as i}from"./chunk-FO5PYUIK-CPzj2963.js";import{A as a,C as o,D as s,G as c,H as l,S as u,a as d,c as f,l as p,o as m}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{a as h,o as g,u as _,v}from"./chunk-OX6ZKUVE-roiHi12N.js";import{n as y,t as b}from"./chunk-YV36FAQU-CkTVkoM6.js";import"./chunk-AQ2D6KKF-AxjphkEe.js";import{n as x}from"./chunk-2V3FENDJ-B1mkZICr.js";import{n as S,t as C}from"./chunk-RTI7CJYH-CrTK6TD7.js";import{t as w}from"./chunk-XAKTCX7R-DiVetB2y.js";import{t as T}from"./chunk-RTBOCTTP-BZPyT8j-.js";var E=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,15],r=[1,7],i=[1,13],a=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),this.$=typeof a[s].length==`number`?a[s]:[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()}}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:r,28:i,29:a,31:o,39:s,43:c,46:l}),t(d,[2,16],{14:22,15:f,16:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,22]),t(m,[2,25],{27:[1,25]}),t(d,[2,26]),{19:26,26:12,31:o},{10:n,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},t(m,[2,24]),{10:n,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(h,[2,30]),{18:[1,43]},{18:[1,44]},t(m,[2,23]),{18:[1,45]},{30:[1,46]},t(d,[2,28]),t(d,[2,35]),t(d,[2,36]),t(d,[2,37]),t(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},t(d,[2,27]),t(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},t(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};_.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:e(function(e,t,n,r){switch(n){case 0:return e.getLogger().debug(`Found block-beta`),10;case 1:return e.getLogger().debug(`Found id-block`),29;case 2:return e.getLogger().debug(`Found block`),10;case 3:e.getLogger().debug(`.`,t.yytext);break;case 4:e.getLogger().debug(`_`,t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,``),e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),28;case 8:this.pushState(`md_string`);break;case 9:return`MD_STR`;case 10:this.popState();break;case 11:this.pushState(`string`);break;case 12:e.getLogger().debug(`LEX: POPPING STR:`,t.yytext),this.popState();break;case 13:return e.getLogger().debug(`LEX: STR end:`,t.yytext),`STR`;case 14:return t.yytext=t.yytext.replace(/space\:/,``),e.getLogger().debug(`SPACE NUM (LEX)`,t.yytext),21;case 15:return t.yytext=`1`,e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),21;case 16:return 42;case 17:return`LINKSTYLE`;case 18:return`INTERPOLATE`;case 19:return this.pushState(`CLASSDEF`),39;case 20:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 21:return this.popState(),this.pushState(`CLASSDEFID`),40;case 22:return this.popState(),41;case 23:return this.pushState(`CLASS`),43;case 24:return this.popState(),this.pushState(`CLASS_STYLE`),44;case 25:return this.popState(),45;case 26:return this.pushState(`STYLE_STMNT`),46;case 27:return this.popState(),this.pushState(`STYLE_DEFINITION`),47;case 28:return this.popState(),48;case 29:return this.pushState(`acc_title`),`acc_title`;case 30:return this.popState(),`acc_title_value`;case 31:return this.pushState(`acc_descr`),`acc_descr`;case 32:return this.popState(),`acc_descr_value`;case 33:this.pushState(`acc_descr_multiline`);break;case 34:this.popState();break;case 35:return`acc_descr_multiline_value`;case 36:return 30;case 37:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().debug(`Lex: ))`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 41:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 42:return this.popState(),e.getLogger().debug(`Lex: (-`),`NODE_DEND`;case 43:return this.popState(),e.getLogger().debug(`Lex: -)`),`NODE_DEND`;case 44:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 45:return this.popState(),e.getLogger().debug(`Lex: ]]`),`NODE_DEND`;case 46:return this.popState(),e.getLogger().debug(`Lex: (`),`NODE_DEND`;case 47:return this.popState(),e.getLogger().debug(`Lex: ])`),`NODE_DEND`;case 48:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 49:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 50:return this.popState(),e.getLogger().debug(`Lex: )]`),`NODE_DEND`;case 51:return this.popState(),e.getLogger().debug(`Lex: )`),`NODE_DEND`;case 52:return this.popState(),e.getLogger().debug(`Lex: ]>`),`NODE_DEND`;case 53:return this.popState(),e.getLogger().debug(`Lex: ]`),`NODE_DEND`;case 54:return e.getLogger().debug(`Lexa: -)`),this.pushState(`NODE`),35;case 55:return e.getLogger().debug(`Lexa: (-`),this.pushState(`NODE`),35;case 56:return e.getLogger().debug(`Lexa: ))`),this.pushState(`NODE`),35;case 57:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 58:return e.getLogger().debug(`Lex: (((`),this.pushState(`NODE`),35;case 59:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 60:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 61:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 62:return e.getLogger().debug(`Lexc: >`),this.pushState(`NODE`),35;case 63:return e.getLogger().debug(`Lexa: ([`),this.pushState(`NODE`),35;case 64:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 65:return this.pushState(`NODE`),35;case 66:return this.pushState(`NODE`),35;case 67:return this.pushState(`NODE`),35;case 68:return this.pushState(`NODE`),35;case 69:return this.pushState(`NODE`),35;case 70:return this.pushState(`NODE`),35;case 71:return this.pushState(`NODE`),35;case 72:return e.getLogger().debug(`Lexa: [`),this.pushState(`NODE`),35;case 73:return this.pushState(`BLOCK_ARROW`),e.getLogger().debug(`LEX ARR START`),37;case 74:return e.getLogger().debug(`Lex: NODE_ID`,t.yytext),31;case 75:return e.getLogger().debug(`Lex: EOF`,t.yytext),8;case 76:this.pushState(`md_string`);break;case 77:this.pushState(`md_string`);break;case 78:return`NODE_DESCR`;case 79:this.popState();break;case 80:e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`);break;case 81:e.getLogger().debug(`LEX ARR: Starting string`),this.pushState(`string`);break;case 82:return e.getLogger().debug(`LEX: NODE_DESCR:`,t.yytext),`NODE_DESCR`;case 83:e.getLogger().debug(`LEX POPPING`),this.popState();break;case 84:e.getLogger().debug(`Lex: =>BAE`),this.pushState(`ARROW_DIR`);break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (right): dir:`,t.yytext),`DIR`;case 86:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (left):`,t.yytext),`DIR`;case 87:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (x):`,t.yytext),`DIR`;case 88:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (y):`,t.yytext),`DIR`;case 89:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (up):`,t.yytext),`DIR`;case 90:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (down):`,t.yytext),`DIR`;case 91:return t.yytext=`]>`,e.getLogger().debug(`Lex (ARROW_DIR end):`,t.yytext),this.popState(),this.popState(),`BLOCK_ARROW_END`;case 92:return e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 93:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 94:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 95:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 96:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 97:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 98:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 99:this.pushState(`md_string`);break;case 100:return e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`),`LINK_LABEL`;case 101:return this.popState(),e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 102:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 103:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 104:return e.getLogger().debug(`Lex: COLON`,t.yytext),t.yytext=t.yytext.slice(1),27}},`anonymous`),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}})();function v(){this.yy={}}return e(v,`Parser`),v.prototype=_,_.Parser=v,new v})();E.parser=E;var D=E,O=new Map,k=[],A=new Map,j=`color`,M=`fill`,ee=`bgFill`,te=`,`,N=new Map,ne=``,re=e(e=>f.sanitizeText(e,o()),`sanitizeText`),ie=e(function(e,t=``){let n=N.get(e);n||(n={id:e,styles:[],textStyles:[]},N.set(e,n)),t?.split(te).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(j).exec(e)){let e=t.replace(M,ee).replace(j,M);n.textStyles.push(e)}n.styles.push(t)})},`addStyleClass`),ae=e(function(e,t=``){let n=O.get(e);t!=null&&(n.styles=t.split(te))},`addStyle2Node`),oe=e(function(e,t){e.split(`,`).forEach(function(e){let n=O.get(e);if(n===void 0){let t=e.trim();n={id:t,type:`na`,children:[]},O.set(t,n)}n.classes||(n.classes=[]),n.classes.push(t)})},`setCssClass`),se=e((e,t)=>{let r=e.flat(),i=[],a=r.find(e=>e?.type===`column-setting`)?.columns??-1;for(let e of r){if(typeof a==`number`&&a>0&&e.type!==`column-setting`&&typeof e.widthInColumns==`number`&&e.widthInColumns>a&&n.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${a}`),e.label&&=re(e.label),e.type===`classDef`){ie(e.id,e.css);continue}if(e.type===`applyClass`){oe(e.id,e?.styleClass??``);continue}if(e.type===`applyStyles`){e?.stylesStr&&ae(e.id,e?.stylesStr);continue}if(e.type===`column-setting`)t.columns=e.columns??-1;else if(e.type===`edge`){let t=(A.get(e.id)??0)+1;A.set(e.id,t),e.id=t+`-`+e.id,k.push(e)}else{e.label||=e.type===`composite`?``:e.id;let t=O.get(e.id);if(t===void 0?O.set(e.id,e):(e.type!==`na`&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&se(e.children,e),e.type===`space`){let t=e.width??1;for(let n=0;n{n.debug(`Clear called`),m(),P={id:`root`,type:`composite`,children:[],columns:-1},O=new Map([[`root`,P]]),ce=[],N=new Map,k=[],A=new Map,ne=``},`clear`);function ue(e){switch(n.debug(`typeStr2Type`,e),e){case`[]`:return`square`;case`()`:return n.debug(`we have a round`),`round`;case`(())`:return`circle`;case`>]`:return`rect_left_inv_arrow`;case`{}`:return`diamond`;case`{{}}`:return`hexagon`;case`([])`:return`stadium`;case`[[]]`:return`subroutine`;case`[()]`:return`cylinder`;case`((()))`:return`doublecircle`;case`[//]`:return`lean_right`;case`[\\\\]`:return`lean_left`;case`[/\\]`:return`trapezoid`;case`[\\/]`:return`inv_trapezoid`;case`<[]>`:return`block_arrow`;default:return`na`}}e(ue,`typeStr2Type`);function de(e){switch(n.debug(`typeStr2Type`,e),e){case`==`:return`thick`;default:return`normal`}}e(de,`edgeTypeStr2Type`);function fe(e){switch(e.trim().slice(-1)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`>`:return`arrow_point`;default:return``}}e(fe,`edgeStrToEdgeData`);function pe(e){switch(e.trim().charAt(0)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`<`:return`arrow_point`;default:return`arrow_open`}}e(pe,`edgeStrToEdgeStartData`);function me(e){return e.includes(`==`)?`thick`:`normal`}e(me,`edgeStrToThickness`);function he(e){return e.includes(`.-`)?`dotted`:`solid`}e(he,`edgeStrToPattern`);var ge=0,_e={getConfig:e(()=>u().block,`getConfig`),typeStr2Type:ue,edgeTypeStr2Type:de,edgeStrToEdgeData:fe,edgeStrToEdgeStartData:pe,edgeStrToThickness:me,edgeStrToPattern:he,getLogger:e(()=>n,`getLogger`),getBlocksFlat:e(()=>[...O.values()],`getBlocksFlat`),getBlocks:e(()=>ce||[],`getBlocks`),getEdges:e(()=>k,`getEdges`),setHierarchy:e(e=>{P.children=e,se(e,P),ce=P.children},`setHierarchy`),getBlock:e(e=>O.get(e),`getBlock`),setBlock:e(e=>{O.set(e.id,e)},`setBlock`),getColumns:e(e=>{let t=O.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},`getColumns`),getClasses:e(function(){return N},`getClasses`),clear:le,generateId:e(()=>(ge++,`id-`+Math.random().toString(36).substr(2,12)+`-`+ge),`generateId`),setDiagramId:e(e=>{ne=e},`setDiagramId`),getDiagramId:e(()=>ne,`getDiagramId`)},F=e((e,t)=>{let n=d,r=n(e,`r`),i=n(e,`g`),a=n(e,`b`);return l(r,i,a,t)},`fade`),ve=e(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span,p { + color: ${e.titleColor}; + } + + + + .label text,span,p { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + /* + * This is for backward compatibility with existing code that didn't + * add a \`

\` around edge labels. + * + * TODO: We should probably remove this in a future release. + */ + p { + margin: 0; + padding: 0; + display: inline; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${e.edgeLabelBackground}; + } + + .node .cluster { + // fill: ${F(e.mainBkg,.5)}; + fill: ${F(e.clusterBkg,.5)}; + stroke: ${F(e.clusterBorder,.2)}; + box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span,p { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } + ${T()} +`,`getStyles`),ye=e((e,t,n,r)=>{t.forEach(t=>{be[t](e,n,r)})},`insertMarkers`),be={extension:e((e,t,r)=>{n.trace(`Making markers for `,r),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+t+`-extensionStart`).attr(`class`,`marker extension `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+t+`-extensionEnd`).attr(`class`,`marker extension `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`)},`extension`),composition:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`composition`),aggregation:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`aggregation`),dependency:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).attr(`refX`,6).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`dependency`),lollipop:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`stroke`,`black`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`stroke`,`black`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6)},`lollipop`),point:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,6).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,4.5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 5 L 10 10 L 10 0 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`)},`point`),circle:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,11).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`)},`circle`),cross:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,12).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,-1).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`)},`cross`),barb:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`barb`)},xe=ye;function I(e,t){if(e===0||!Number.isInteger(e))throw Error(`Columns must be an integer !== 0.`);if(t<0||!Number.isInteger(t))throw Error(`Position must be a non-negative integer.`+t);return e<0?{px:t,py:0}:e===1?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}e(I,`calculateBlockPosition`);var Se=e(e=>{let t=0,r=0;for(let i of e.children){let{width:e,height:a,x:o,y:s}=i.size??{width:0,height:0,x:0,y:0};if(n.debug(`getMaxChildSize abc95 child:`,i.id,`width:`,e,`height:`,a,`x:`,o,`y:`,s,i.type),i.type===`space`)continue;let c=e/(i.widthInColumns??1);c>t&&(t=c),a>r&&(r=a)}return{width:t,height:r}},`getMaxChildSize`);function L(e,t,r=0,i=0,a=8){n.debug(`setBlockSizes abc95 (start)`,e.id,e?.size?.x,`block width =`,e?.size,`siblingWidth`,r),e?.size?.width||(e.size={width:r,height:i,x:0,y:0});let o=0,s=0;if(e.children?.length>0){for(let n of e.children)L(n,t,0,0,a);let c=Se(e);o=c.width,s=c.height,n.debug(`setBlockSizes abc95 maxWidth of`,e.id,`:s children is `,o,s);for(let t of e.children)t.size&&(n.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${o} ${s} ${JSON.stringify(t.size)}`),t.size.width=o*(t.widthInColumns??1)+a*((t.widthInColumns??1)-1),t.size.height=s,t.size.x=0,t.size.y=0,n.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${o} maxHeight:${s}`));for(let n of e.children)L(n,t,o,s,a);let l=e.columns??-1,u=0;for(let t of e.children)u+=t.widthInColumns??1;let d=e.children.length;l>0&&l0?Math.min(e.children.length,l):e.children.length;if(t>0){let r=(p-t*a-a)/t;n.debug(`abc95 (growing to fit) width`,e.id,p,e.size?.width,r);for(let t of e.children)t.size&&(t.size.width=r)}}e.size={width:p,height:m,x:0,y:0}}n.debug(`setBlockSizes abc94 (done)`,e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}e(L,`setBlockSizes`);function R(e,t,r=8){n.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let i=e.columns??-1;if(n.debug(`layoutBlocks columns abc95`,e.id,`=>`,i,e),e.children&&e.children.length>0){let a=e?.children[0]?.size?.width??0,o=e.children.length*a+(e.children.length-1)*r;n.debug(`widthOfChildren 88`,o,`posX`);let s=new Map;{let t=0;for(let n of e.children){if(!n.size)continue;let{py:e}=I(i,t),r=s.get(e)??0;n.size.height>r&&s.set(e,n.size.height);let a=n?.widthInColumns??1;i>0&&(a=Math.min(a,i-t%i)),t+=a}}let c=new Map;{let e=0,t=[...s.keys()].sort((e,t)=>e-t);for(let n of t)c.set(n,e),e+=(s.get(n)??0)+r}let l=0;n.debug(`abc91 block?.size?.x`,e.id,e?.size?.x);let u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,d=0;for(let a of e.children){let o=e;if(!a.size)continue;let{width:f,height:p}=a.size,{px:m,py:h}=I(i,l);if(h!=d&&(d=h,u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,n.debug(`New row in layout for block`,e.id,` and child `,a.id,d)),n.debug(`abc89 layout blocks (child) id: ${a.id} Pos: ${l} (px, py) ${m},${h} (${o?.size?.x},${o?.size?.y}) parent: ${o.id} width: ${f}${r}`),o.size){let e=f/2;a.size.x=u+r+e,n.debug(`abc91 layout blocks (calc) px, pyid:${a.id} startingPos=X${u} new startingPosX${a.size.x} ${e} padding=${r} width=${f} halfWidth=${e} => x:${a.size.x} y:${a.size.y} ${a.widthInColumns} (width * (child?.w || 1)) / 2 ${f*(a?.widthInColumns??1)/2}`),u=a.size.x+e;let t=c.get(h)??0,i=s.get(h)??p;a.size.y=o.size.y-o.size.height/2+t+i/2+r,n.debug(`abc88 layout blocks (calc) px, pyid:${a.id}startingPosX${u}${r}${e}=>x:${a.size.x}y:${a.size.y}${a.widthInColumns}(width * (child?.w || 1)) / 2${f*(a?.widthInColumns??1)/2}`)}a.children&&R(a,t,r);let g=a?.widthInColumns??1;i>0&&(g=Math.min(g,i-l%i)),l+=g,n.debug(`abc88 columnsPos`,a,l)}}n.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}e(R,`layoutBlocks`);function z(e,{minX:t,minY:n,maxX:r,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!==`root`){let{x:a,y:o,width:s,height:c}=e.size;a-s/2r&&(r=a+s/2),o+c/2>i&&(i=o+c/2)}if(e.children)for(let a of e.children)({minX:t,minY:n,maxX:r,maxY:i}=z(a,{minX:t,minY:n,maxX:r,maxY:i}));return{minX:t,minY:n,maxX:r,maxY:i}}e(z,`findBounds`);function Ce(e){let t=e.getBlock(`root`);if(!t)return;let r=o()?.block?.padding??8;L(t,e,0,0,r),R(t,e,r),n.debug(`getBlocks`,JSON.stringify(t,null,2));let{minX:i,minY:a,maxX:s,maxY:c}=z(t),l=c-a;return{x:i,y:a,width:s-i,height:l}}e(Ce,`layout`);var B=e(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let c=o(),l=s(c);return await x(e,a,{style:n,isTitle:r,useHtmlLabels:l,markdown:!1,isNode:i,width:1/0},c)},`createLabel`),we=e((e,t,n,r,i)=>{t.arrowTypeStart&&Ee(e,`start`,t.arrowTypeStart,n,r,i),t.arrowTypeEnd&&Ee(e,`end`,t.arrowTypeEnd,n,r,i)},`addEdgeMarkers`),Te={arrow_cross:`cross`,arrow_point:`point`,arrow_barb:`barb`,arrow_circle:`circle`,aggregation:`aggregation`,extension:`extension`,composition:`composition`,dependency:`dependency`,lollipop:`lollipop`},Ee=e((e,t,r,i,a,o)=>{let s=Te[r];if(!s){n.warn(`Unknown arrow type: ${r}`);return}let c=t===`start`?`Start`:`End`;e.attr(`marker-${t}`,`url(${i}#${a}_${o}-${s}${c})`)},`addEdgeMarker`),V={},H={},De=e(async(e,n)=>{let r=o(),i=s(r),a=e.insert(`g`).attr(`class`,`edgeLabel`),c=a.insert(`g`).attr(`class`,`label`),l=n.labelType===`markdown`,u=await x(e,n.label,{style:n.labelStyle,useHtmlLabels:i,addSvgBackground:l,isNode:!1,markdown:l,width:l?void 0:1/0},r);c.node().appendChild(u);let d=u.getBBox(),f=d;if(i){let e=u.children[0],n=t(u);d=e.getBoundingClientRect(),f=d,n.attr(`width`,d.width),n.attr(`height`,d.height)}else{let e=t(u).select(`text`).node();e&&typeof e.getBBox==`function`&&(f=e.getBBox())}c.attr(`transform`,C(f,i)),V[n.id]=a,n.width=d.width,n.height=d.height;let p;if(n.startLabelLeft){let r=e.insert(`g`).attr(`class`,`edgeTerminals`),a=r.insert(`g`).attr(`class`,`inner`),o=await B(a,n.startLabelLeft,n.labelStyle);p=o;let s=o.getBBox();if(i){let e=o.children[0],n=t(o);s=e.getBoundingClientRect(),n.attr(`width`,s.width),n.attr(`height`,s.height)}a.attr(`transform`,C(s,i)),H[n.id]||(H[n.id]={}),H[n.id].startLeft=r,U(p,n.startLabelLeft)}if(n.startLabelRight){let r=e.insert(`g`).attr(`class`,`edgeTerminals`),a=r.insert(`g`).attr(`class`,`inner`),o=await B(a,n.startLabelRight,n.labelStyle);p=o;let s=o.getBBox();if(i){let e=o.children[0],n=t(o);s=e.getBoundingClientRect(),n.attr(`width`,s.width),n.attr(`height`,s.height)}a.attr(`transform`,C(s,i)),H[n.id]||(H[n.id]={}),H[n.id].startRight=r,U(p,n.startLabelRight)}if(n.endLabelLeft){let r=e.insert(`g`).attr(`class`,`edgeTerminals`),a=r.insert(`g`).attr(`class`,`inner`),o=await B(r,n.endLabelLeft,n.labelStyle);p=o;let s=o.getBBox();if(i){let e=o.children[0],n=t(o);s=e.getBoundingClientRect(),n.attr(`width`,s.width),n.attr(`height`,s.height)}a.attr(`transform`,C(s,i)),H[n.id]||(H[n.id]={}),H[n.id].endLeft=r,U(p,n.endLabelLeft)}if(n.endLabelRight){let r=e.insert(`g`).attr(`class`,`edgeTerminals`),a=r.insert(`g`).attr(`class`,`inner`),o=await B(r,n.endLabelRight,n.labelStyle);p=o;let s=o.getBBox();if(i){let e=o.children[0],n=t(o);s=e.getBoundingClientRect(),n.attr(`width`,s.width),n.attr(`height`,s.height)}a.attr(`transform`,C(s,i)),H[n.id]||(H[n.id]={}),H[n.id].endRight=r,U(p,n.endLabelRight)}return u},`insertEdgeLabel`);function U(e,t){s(o())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}e(U,`setTerminalWidth`);var Oe=e((e,t)=>{n.debug(`Moving label abc88 `,e.id,e.label,V[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath,i=o(),{subGraphTitleTotalMargin:a}=y(i);if(e.label){let i=V[e.id],o=e.x,s=e.y;if(r){let i=v.calcLabelPosition(r);n.debug(`Moving label `+e.label+` from (`,o,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),t.updatedPath&&(o=i.x,s=i.y)}i.attr(`transform`,`translate(${o}, ${s+a/2})`)}if(e.startLabelLeft){let t=H[e.id].startLeft,n=e.x,i=e.y;if(r){let t=v.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.startLabelRight){let t=H[e.id].startRight,n=e.x,i=e.y;if(r){let t=v.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelLeft){let t=H[e.id].endLeft,n=e.x,i=e.y;if(r){let t=v.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelRight){let t=H[e.id].endRight,n=e.x,i=e.y;if(r){let t=v.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}},`positionEdgeLabel`),ke=e((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),Ae=e((e,t,r)=>{n.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(r)} + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let i=e.x,a=e.y,o=Math.abs(i-r.x),s=e.width/2,c=r.xMath.abs(i-t.x)*l){let e=r.y{n.debug(`abc88 cutPathAtIntersect`,e,t);let r=[],i=e[0],a=!1;return e.forEach(e=>{if(!ke(t,e)&&!a){let n=Ae(t,i,e),o=!1;r.forEach(e=>{o||=e.x===n.x&&e.y===n.y}),r.some(e=>e.x===n.x&&e.y===n.y)||r.push(n),a=!0}else i=e,a||r.push(e)}),r},`cutPathAtIntersect`),Me=e(function(e,t,s,c,l,u,d){let f=s.points;n.debug(`abc88 InsertEdge: edge=`,s,`e=`,t);let p=!1,m=u.node(t.v);var h=u.node(t.w);h?.intersect&&m?.intersect&&(f=f.slice(1,s.points.length-1),f.unshift(m.intersect(f[0])),f.push(h.intersect(f[f.length-1]))),s.toCluster&&(n.debug(`to cluster abc88`,c[s.toCluster]),f=je(s.points,c[s.toCluster].node),p=!0),s.fromCluster&&(n.debug(`from cluster abc88`,c[s.fromCluster]),f=je(f.reverse(),c[s.fromCluster].node).reverse(),p=!0);let g=f.filter(e=>!Number.isNaN(e.y)),_=r;s.curve&&(l===`graph`||l===`flowchart`)&&(_=s.curve);let{x:v,y}=S(s),b=i().x(v).y(y).curve(_),x;switch(s.thickness){case`normal`:x=`edge-thickness-normal`;break;case`thick`:x=`edge-thickness-thick`;break;case`invisible`:x=`edge-thickness-thick`;break;default:x=``}switch(s.pattern){case`solid`:x+=` edge-pattern-solid`;break;case`dotted`:x+=` edge-pattern-dotted`;break;case`dashed`:x+=` edge-pattern-dashed`}let C=e.append(`path`).attr(`d`,b(g)).attr(`id`,s.id).attr(`class`,` `+x+(s.classes?` `+s.classes:``)).attr(`style`,s.style),w=``;(o().flowchart.arrowMarkerAbsolute||o().state.arrowMarkerAbsolute)&&(w=a(!0)),we(C,s,w,d,l);let T={};return p&&(T.updatedPath=f),T.originalPath=s.points,T},`insertEdge`),Ne=e(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n)}return t},`expandAndDeduplicateDirections`),Pe=e((e,t,n,r)=>{let i=Ne(e),a=t.height+2*n.padding,o=a/2,s=r??t.width+2*o+n.padding,c=n.padding/2;return i.has(`right`)&&i.has(`left`)&&i.has(`up`)&&i.has(`down`)?[{x:0,y:0},{x:o,y:0},{x:s/2,y:2*c},{x:s-o,y:0},{x:s,y:0},{x:s,y:-a/3},{x:s+2*c,y:-a/2},{x:s,y:-2*a/3},{x:s,y:-a},{x:s-o,y:-a},{x:s/2,y:-a-2*c},{x:o,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*c,y:-a/2},{x:0,y:-a/3}]:i.has(`right`)&&i.has(`left`)&&i.has(`up`)?[{x:o,y:0},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}]:i.has(`right`)&&i.has(`left`)&&i.has(`down`)?[{x:0,y:0},{x:o,y:-a},{x:s-o,y:-a},{x:s,y:0}]:i.has(`right`)&&i.has(`up`)&&i.has(`down`)?[{x:0,y:0},{x:s,y:-o},{x:s,y:-a+o},{x:0,y:-a}]:i.has(`left`)&&i.has(`up`)&&i.has(`down`)?[{x:s,y:0},{x:0,y:-o},{x:0,y:-a+o},{x:s,y:-a}]:i.has(`right`)&&i.has(`left`)?[{x:o,y:0},{x:o,y:-c},{x:s-o,y:-c},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:s-o,y:-a+c},{x:o,y:-a+c},{x:o,y:-a},{x:0,y:-a/2}]:i.has(`up`)&&i.has(`down`)?[{x:s/2,y:0},{x:0,y:-c},{x:o,y:-c},{x:o,y:-a+c},{x:0,y:-a+c},{x:s/2,y:-a},{x:s,y:-a+c},{x:s-o,y:-a+c},{x:s-o,y:-c},{x:s,y:-c}]:i.has(`right`)&&i.has(`up`)?[{x:0,y:0},{x:s,y:-o},{x:0,y:-a}]:i.has(`right`)&&i.has(`down`)?[{x:0,y:0},{x:s,y:0},{x:0,y:-a}]:i.has(`left`)&&i.has(`up`)?[{x:s,y:0},{x:0,y:-o},{x:s,y:-a}]:i.has(`left`)&&i.has(`down`)?[{x:s,y:0},{x:0,y:0},{x:s,y:-a}]:i.has(`right`)?[{x:o,y:-c},{x:o,y:-c},{x:s-o,y:-c},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:s-o,y:-a+c},{x:o,y:-a+c},{x:o,y:-a+c}]:i.has(`left`)?[{x:o,y:0},{x:o,y:-c},{x:s-o,y:-c},{x:s-o,y:-a+c},{x:o,y:-a+c},{x:o,y:-a},{x:0,y:-a/2}]:i.has(`up`)?[{x:o,y:-c},{x:o,y:-a+c},{x:0,y:-a+c},{x:s/2,y:-a},{x:s,y:-a+c},{x:s-o,y:-a+c},{x:s-o,y:-c}]:i.has(`down`)?[{x:s/2,y:0},{x:0,y:-c},{x:o,y:-c},{x:o,y:-a+c},{x:s-o,y:-a+c},{x:s-o,y:-c},{x:s,y:-c}]:[{x:0,y:0}]},`getArrowPoints`);function Fe(e,t){return e.intersect(t)}e(Fe,`intersectNode`);var Ie=Fe;function Le(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x0}e(W,`sameSign`);var He=Ve,Ue=We;function We(e,t,n){var r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));for(var c=r-e.width/2-o,l=i-e.height/2-s,u=0;u1&&a.sort(function(e,t){var r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`)},K=e(async(e,n,r,i)=>{let a=o(),l,u=n.useHtmlLabels||s(a);l=r||`node default`;let d=e.insert(`g`).attr(`class`,l).attr(`id`,n.domId||n.id),f=d.insert(`g`).attr(`class`,`label`).attr(`style`,n.labelStyle),p;p=n.labelText===void 0?``:typeof n.labelText==`string`?n.labelText:n.labelText[0];let m;m=n.labelType===`markdown`?x(f,c(g(p),a),{useHtmlLabels:u,width:n.width||a.flowchart.wrappingWidth,classes:`markdown-node-label`},a):await B(f,c(g(p),a),n.labelStyle,!1,i);let h=m.getBBox(),_=n.padding/2;if(s(a)){let e=m.children[0],n=t(m);await b(e,p),h=e.getBoundingClientRect(),n.attr(`width`,h.width),n.attr(`height`,h.height)}return u?f.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`):f.attr(`transform`,`translate(0, `+-h.height/2+`)`),n.centerLabel&&f.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`),f.insert(`rect`,`:first-child`),{shapeSvg:d,bbox:h,halfPadding:_,label:f}},`labelHelper`),q=e((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`);function J(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}e(J,`insertPolygonShape`);var Ge=e(async(e,t)=>{t.useHtmlLabels||s(o())||(t.centerLabel=!0);let{shapeSvg:r,bbox:i,halfPadding:a}=await K(e,t,`node `+t.classes,!0);n.info(`Classes = `,t.classes);let c=r.insert(`rect`,`:first-child`);return c.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,-i.width/2-a).attr(`y`,-i.height/2-a).attr(`width`,i.width+t.padding).attr(`height`,i.height+t.padding),q(t,c),t.intersect=function(e){return G.rect(t,e)},r},`note`),Ke=e(e=>e?` `+e:``,`formatClass`),Y=e((e,t)=>`${t||`node default`}${Ke(e.classes)} ${Ke(e.class)}`,`getClassesFromNode`),qe=e(async(e,t)=>{let{shapeSvg:r,bbox:i}=await K(e,t,Y(t,void 0),!0),a=i.width+t.padding+(i.height+t.padding),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];n.info(`Question main (Circle)`);let s=J(r,a,a,o);return s.attr(`style`,t.style),q(t,s),t.intersect=function(e){return n.warn(`Intersect called`),G.polygon(t,o,e)},r},`question`),Je=e((e,t)=>{let n=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id);return n.insert(`polygon`,`:first-child`).attr(`points`,[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`state-start`).attr(`r`,7).attr(`width`,28).attr(`height`,28),t.width=28,t.height=28,t.intersect=function(e){return G.circle(t,14,e)},n},`choice`),Ye=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=t.positioned?t.height:r.height+t.padding,a=i/4,o=t.positioned?t.width:r.width+2*a+t.padding,s=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-i/2},{x:o-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],c=J(n,o,i,s);return c.attr(`style`,t.style),q(t,c),t.intersect=function(e){return G.polygon(t,s,e)},n},`hexagon`),Xe=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,void 0,!0),i=r.height+2*t.padding,a=i/2,o=r.width+2*a+t.padding,s=t.positioned&&(t.widthInColumns??1)>1&&t.width>o?t.width:o,c=Pe(t.directions,r,t,s),l=J(n,s,i,c);return l.attr(`style`,t.style),q(t,l),t.intersect=function(e){return G.polygon(t,c,e)},n},`block_arrow`),Ze=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return J(n,i,a,o).attr(`style`,t.style),t.width=i+a,t.height=a,t.intersect=function(e){return G.polygon(t,o,e)},n},`rect_left_inv_arrow`),Qe=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],s=J(n,i,a,o);return s.attr(`style`,t.style),q(t,s),t.intersect=function(e){return G.polygon(t,o,e)},n},`lean_right`),$e=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],s=J(n,i,a,o);return s.attr(`style`,t.style),q(t,s),t.intersect=function(e){return G.polygon(t,o,e)},n},`lean_left`),et=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],s=J(n,i,a,o);return s.attr(`style`,t.style),q(t,s),t.intersect=function(e){return G.polygon(t,o,e)},n},`trapezoid`),tt=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],s=J(n,i,a,o);return s.attr(`style`,t.style),q(t,s),t.intersect=function(e){return G.polygon(t,o,e)},n},`inv_trapezoid`),nt=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],s=J(n,i,a,o);return s.attr(`style`,t.style),q(t,s),t.intersect=function(e){return G.polygon(t,o,e)},n},`rect_right_inv_arrow`),rt=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.width+t.padding,a=i/2,o=a/(2.5+i/50),s=r.height+o+t.padding,c=`M 0,`+o+` a `+a+`,`+o+` 0,0,0 `+i+` 0 a `+a+`,`+o+` 0,0,0 `+-i+` 0 l 0,`+s+` a `+a+`,`+o+` 0,0,0 `+i+` 0 l 0,`+-s;return q(t,n.attr(`label-offset-y`,o).insert(`path`,`:first-child`).attr(`style`,t.style).attr(`d`,c).attr(`transform`,`translate(`+-i/2+`,`+-(s/2+o)+`)`)),t.intersect=function(e){let n=G.rect(t,e),r=n.x-t.x;if(a!=0&&(Math.abs(r)t.height/2-o)){let i=o*o*(1-r*r/(a*a));i!=0&&(i=Math.sqrt(i)),i=o-i,e.y-t.y>0&&(i=-i),n.y+=i}return n},n},`cylinder`),it=e(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:a}=await K(e,t,`node `+t.classes+` `+t.class,!0),o=r.insert(`rect`,`:first-child`),s=t.positioned?t.width:i.width+t.padding,c=t.positioned?t.height:i.height+t.padding,l=t.positioned?-s/2:-i.width/2-a,u=t.positioned?-c/2:-i.height/2-a;if(o.attr(`class`,`basic label-container`).attr(`style`,t.style).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c),t.props){let e=new Set(Object.keys(t.props));t.props.borders&&(X(o,t.props.borders,s,c),e.delete(`borders`)),e.forEach(e=>{n.warn(`Unknown node property ${e}`)})}return q(t,o),t.intersect=function(e){return G.rect(t,e)},r},`rect`),at=e(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:a}=await K(e,t,`node `+t.classes,!0),o=r.insert(`rect`,`:first-child`),s=t.positioned?t.width:i.width+t.padding,c=t.positioned?t.height:i.height+t.padding,l=t.positioned?-s/2:-i.width/2-a,u=t.positioned?-c/2:-i.height/2-a;if(o.attr(`class`,`basic cluster composite label-container`).attr(`style`,t.style).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c),t.props){let e=new Set(Object.keys(t.props));t.props.borders&&(X(o,t.props.borders,s,c),e.delete(`borders`)),e.forEach(e=>{n.warn(`Unknown node property ${e}`)})}return q(t,o),t.intersect=function(e){return G.rect(t,e)},r},`composite`),ot=e(async(e,t)=>{let{shapeSvg:r}=await K(e,t,`label`,!0);n.trace(`Classes = `,t.class);let i=r.insert(`rect`,`:first-child`);if(i.attr(`width`,0).attr(`height`,0),r.attr(`class`,`label edgeLabel`),t.props){let e=new Set(Object.keys(t.props));t.props.borders&&(X(i,t.props.borders,0,0),e.delete(`borders`)),e.forEach(e=>{n.warn(`Unknown node property ${e}`)})}return q(t,i),t.intersect=function(e){return G.rect(t,e)},r},`labelRect`);function X(t,r,i,a){let o=[],s=e(e=>{o.push(e,0)},`addBorder`),c=e(e=>{o.push(0,e)},`skipBorder`);r.includes(`t`)?(n.debug(`add top border`),s(i)):c(i),r.includes(`r`)?(n.debug(`add right border`),s(a)):c(a),r.includes(`b`)?(n.debug(`add bottom border`),s(i)):c(i),r.includes(`l`)?(n.debug(`add left border`),s(a)):c(a),t.attr(`stroke-dasharray`,o.join(` `))}e(X,`applyNodePropertyBorders`);var st=e(async(e,r)=>{let i;i=r.classes?`node `+r.classes:`node default`;let a=e.insert(`g`).attr(`class`,i).attr(`id`,r.domId||r.id),c=a.insert(`rect`,`:first-child`),l=a.insert(`line`),u=a.insert(`g`).attr(`class`,`label`),d=r.labelText.flat?r.labelText.flat():r.labelText,f=``;f=typeof d==`object`?d[0]:d,n.info(`Label text abc79`,f,d,typeof d==`object`);let p=await B(u,f,r.labelStyle,!0,!0),m={width:0,height:0};if(s(o())){let e=p.children[0],n=t(p);m=e.getBoundingClientRect(),n.attr(`width`,m.width),n.attr(`height`,m.height)}n.info(`Text 2`,d);let h=d.slice(1,d.length),g=p.getBBox(),_=await B(u,h.join?h.join(`
`):h,r.labelStyle,!0,!0);if(s(o())){let e=_.children[0],n=t(_);m=e.getBoundingClientRect(),n.attr(`width`,m.width),n.attr(`height`,m.height)}let v=r.padding/2;return t(_).attr(`transform`,`translate( `+(m.width>g.width?0:(g.width-m.width)/2)+`, `+(g.height+v+5)+`)`),t(p).attr(`transform`,`translate( `+(m.width{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.height+t.padding,a=r.width+i/4+t.padding;return q(t,n.insert(`rect`,`:first-child`).attr(`style`,t.style).attr(`rx`,i/2).attr(`ry`,i/2).attr(`x`,-a/2).attr(`y`,-i/2).attr(`width`,a).attr(`height`,i)),t.intersect=function(e){return G.rect(t,e)},n},`stadium`),lt=e(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:a}=await K(e,t,Y(t,void 0),!0),o=r.insert(`circle`,`:first-child`);return o.attr(`style`,t.style).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`r`,i.width/2+a).attr(`width`,i.width+t.padding).attr(`height`,i.height+t.padding),n.info(`Circle main`),q(t,o),t.intersect=function(e){return n.info(`Circle intersect`,t,i.width/2+a,e),G.circle(t,i.width/2+a,e)},r},`circle`),ut=e(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:a}=await K(e,t,Y(t,void 0),!0),o=r.insert(`g`,`:first-child`),s=o.insert(`circle`),c=o.insert(`circle`);return o.attr(`class`,t.class),s.attr(`style`,t.style).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`r`,i.width/2+a+5).attr(`width`,i.width+t.padding+10).attr(`height`,i.height+t.padding+10),c.attr(`style`,t.style).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`r`,i.width/2+a).attr(`width`,i.width+t.padding).attr(`height`,i.height+t.padding),n.info(`DoubleCircle main`),q(t,s),t.intersect=function(e){return n.info(`DoubleCircle intersect`,t,i.width/2+a+5,e),G.circle(t,i.width/2+a+5,e)},r},`doublecircle`),dt=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],s=J(n,i,a,o);return s.attr(`style`,t.style),q(t,s),t.intersect=function(e){return G.polygon(t,o,e)},n},`subroutine`),ft=e((e,t)=>{let n=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),r=n.insert(`circle`,`:first-child`);return r.attr(`class`,`state-start`).attr(`r`,7).attr(`width`,14).attr(`height`,14),q(t,r),t.intersect=function(e){return G.circle(t,7,e)},n},`start`),pt=e((e,t,n)=>{let r=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),i=70,a=10;return n===`LR`&&(i=10,a=70),q(t,r.append(`rect`).attr(`x`,-1*i/2).attr(`y`,-1*a/2).attr(`width`,i).attr(`height`,a).attr(`class`,`fork-join`)),t.height+=t.padding/2,t.width+=t.padding/2,t.intersect=function(e){return G.rect(t,e)},r},`forkJoin`),mt={rhombus:qe,composite:at,question:qe,rect:it,labelRect:ot,rectWithTitle:st,choice:Je,circle:lt,doublecircle:ut,stadium:ct,hexagon:Ye,block_arrow:Xe,rect_left_inv_arrow:Ze,lean_right:Qe,lean_left:$e,trapezoid:et,inv_trapezoid:tt,rect_right_inv_arrow:nt,cylinder:rt,start:ft,end:e((e,t)=>{let n=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),r=n.insert(`circle`,`:first-child`),i=n.insert(`circle`,`:first-child`);return i.attr(`class`,`state-start`).attr(`r`,7).attr(`width`,14).attr(`height`,14),r.attr(`class`,`state-end`).attr(`r`,5).attr(`width`,10).attr(`height`,10),q(t,i),t.intersect=function(e){return G.circle(t,7,e)},n},`end`),note:Ge,subroutine:dt,fork:pt,join:pt,class_box:e(async(e,n)=>{let r=n.padding/2,i;i=n.classes?`node `+n.classes:`node default`;let a=e.insert(`g`).attr(`class`,i).attr(`id`,n.domId||n.id),c=a.insert(`rect`,`:first-child`),l=a.insert(`line`),u=a.insert(`line`),d=0,f=4,p=a.insert(`g`).attr(`class`,`label`),m=0,h=n.classData.annotations?.[0],g=await B(p,n.classData.annotations[0]?`«`+n.classData.annotations[0]+`»`:``,n.labelStyle,!0,!0),_=g.getBBox();if(s(o())){let e=g.children[0],n=t(g);_=e.getBoundingClientRect(),n.attr(`width`,_.width),n.attr(`height`,_.height)}n.classData.annotations[0]&&(f+=_.height+4,d+=_.width);let v=n.classData.label;n.classData.type!==void 0&&n.classData.type!==``&&(s(o())?v+=`<`+n.classData.type+`>`:v+=`<`+n.classData.type+`>`);let y=await B(p,v,n.labelStyle,!0,!0);t(y).attr(`class`,`classTitle`);let b=y.getBBox();if(s(o())){let e=y.children[0],n=t(y);b=e.getBoundingClientRect(),n.attr(`width`,b.width),n.attr(`height`,b.height)}f+=b.height+4,b.width>d&&(d=b.width);let x=[];n.classData.members.forEach(async e=>{let r=e.getDisplayDetails(),i=r.displayText;s(o())&&(i=i.replace(//g,`>`));let a=await B(p,i,r.cssStyle?r.cssStyle:n.labelStyle,!0,!0),c=a.getBBox();if(s(o())){let e=a.children[0],n=t(a);c=e.getBoundingClientRect(),n.attr(`width`,c.width),n.attr(`height`,c.height)}c.width>d&&(d=c.width),f+=c.height+4,x.push(a)}),f+=8;let S=[];if(n.classData.methods.forEach(async e=>{let r=e.getDisplayDetails(),i=r.displayText;s(o())&&(i=i.replace(//g,`>`));let a=await B(p,i,r.cssStyle?r.cssStyle:n.labelStyle,!0,!0),c=a.getBBox();if(s(o())){let e=a.children[0],n=t(a);c=e.getBoundingClientRect(),n.attr(`width`,c.width),n.attr(`height`,c.height)}c.width>d&&(d=c.width),f+=c.height+4,S.push(a)}),f+=8,h){let e=(d-_.width)/2;t(g).attr(`transform`,`translate( `+(-1*d/2+e)+`, `+-1*f/2+`)`),m=_.height+4}let C=(d-b.width)/2;return t(y).attr(`transform`,`translate( `+(-1*d/2+C)+`, `+(-1*f/2+m)+`)`),m+=b.height+4,l.attr(`class`,`divider`).attr(`x1`,-d/2-r).attr(`x2`,d/2+r).attr(`y1`,-f/2-r+8+m).attr(`y2`,-f/2-r+8+m),m+=8,x.forEach(e=>{t(e).attr(`transform`,`translate( `+-d/2+`, `+(-1*f/2+m+4)+`)`);let n=e?.getBBox();m+=(n?.height??0)+4}),m+=8,u.attr(`class`,`divider`).attr(`x1`,-d/2-r).attr(`x2`,d/2+r).attr(`y1`,-f/2-r+8+m).attr(`y2`,-f/2-r+8+m),m+=8,S.forEach(e=>{t(e).attr(`transform`,`translate( `+-d/2+`, `+(-1*f/2+m)+`)`);let n=e?.getBBox();m+=(n?.height??0)+4}),c.attr(`style`,n.style).attr(`class`,`outer title-state`).attr(`x`,-d/2-r).attr(`y`,-(f/2)-r).attr(`width`,d+n.padding).attr(`height`,f+n.padding),q(n,c),n.intersect=function(e){return G.rect(n,e)},a},`class_box`)},Z={},ht=e(async(e,t,n)=>{let r,i;if(t.link){let a;o().securityLevel===`sandbox`?a=`_top`:t.linkTarget&&(a=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,a),i=await mt[t.shape](r,t,n)}else i=await mt[t.shape](e,t,n),r=i;return t.tooltip&&i.attr(`title`,t.tooltip),t.class&&i.attr(`class`,`node default `+t.class),Z[t.id]=r,t.haveCallback&&Z[t.id].attr(`class`,Z[t.id].attr(`class`)+` clickable`),r},`insertNode`),gt=e(e=>{let t=Z[e.id];n.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let r=e.diff||0;return e.clusterNode?t.attr(`transform`,`translate(`+(e.x+r-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):t.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),r},`positionNode`);function Q(e,t,n=!1){let r=e,i=`default`;(r?.classes?.length||0)>0&&(i=(r?.classes??[]).join(` `)),i+=` flowchart-label`;let a=0,o=``,s;switch(r.type){case`round`:a=5,o=`rect`;break;case`composite`:a=0,o=`composite`,s=0;break;case`square`:o=`rect`;break;case`diamond`:o=`question`;break;case`hexagon`:o=`hexagon`;break;case`block_arrow`:o=`block_arrow`;break;case`odd`:o=`rect_left_inv_arrow`;break;case`lean_right`:o=`lean_right`;break;case`lean_left`:o=`lean_left`;break;case`trapezoid`:o=`trapezoid`;break;case`inv_trapezoid`:o=`inv_trapezoid`;break;case`rect_left_inv_arrow`:o=`rect_left_inv_arrow`;break;case`circle`:o=`circle`;break;case`ellipse`:o=`ellipse`;break;case`stadium`:o=`stadium`;break;case`subroutine`:o=`subroutine`;break;case`cylinder`:o=`cylinder`;break;case`group`:o=`rect`;break;case`doublecircle`:o=`doublecircle`;break;default:o=`rect`}let c=_(r?.styles??[]),l=r.label,d=r.size??{width:0,height:0,x:0,y:0},f=t.getDiagramId();return{labelStyle:c.labelStyle,shape:o,labelText:l,rx:a,ry:a,class:i,style:c.style,id:r.id,domId:f?`${f}-${r.id}`:r.id,directions:r.directions,width:d.width,height:d.height,x:d.x,y:d.y,positioned:n,intersect:void 0,type:r.type,padding:s??u()?.block?.padding??0,widthInColumns:r.widthInColumns??1}}e(Q,`getNodeFromBlock`);async function _t(e,t,n){let r=Q(t,n,!1);if(r.type===`group`)return;let i=await ht(e,r,{config:u()}),a=i.node().getBBox(),o=n.getBlock(r.id);o.size={width:a.width,height:a.height,x:0,y:0,node:i},n.setBlock(o),i.remove()}e(_t,`calculateBlockSize`);async function vt(e,t,n){let r=Q(t,n,!0);n.getBlock(r.id).type!==`space`&&(await ht(e,r,{config:u()}),t.intersect=r?.intersect,gt(r))}e(vt,`insertBlockPositioned`);async function $(e,t,n,r){for(let i of t)await r(e,i,n),i.children&&await $(e,i.children,n,r)}e($,`performOperations`);async function yt(e,t,n){await $(e,t,n,_t)}e(yt,`calculateBlockSizes`);async function bt(e,t,n){await $(e,t,n,vt)}e(bt,`insertBlocks`);async function xt(e,t,n,r,i){let a=new w({multigraph:!0,compound:!0});a.setGraph({rankdir:`TB`,nodesep:10,ranksep:10,marginx:8,marginy:8});for(let e of n)e.size&&a.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(let n of t)if(n.start&&n.end){let t=r.getBlock(n.start),o=r.getBlock(n.end);if(t?.size&&o?.size){let r=t.size,s=o.size,c=[{x:r.x,y:r.y},{x:r.x+(s.x-r.x)/2,y:r.y+(s.y-r.y)/2},{x:s.x,y:s.y}],l=i?`${i}-${n.id}`:n.id,u=`${n.thickness===`thick`?`edge-thickness-thick`:`edge-thickness-normal`} ${n.pattern===`dotted`?`edge-pattern-dotted`:`edge-pattern-solid`} flowchart-link LS-a1 LE-b1`;Me(e,{v:n.start,w:n.end,name:l},{...n,id:l,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:c,classes:u},void 0,`block`,a,i),n.label&&(await De(e,{...n,label:n.label,labelStyle:`stroke: #333; stroke-width: 1.5px;fill:none;`,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:c,classes:u}),Oe({...n,x:c[1].x,y:c[1].y},{originalPath:c}))}}}e(xt,`insertEdges`);var St={parser:D,db:_e,renderer:{draw:e(async function(e,r,i,a){let{securityLevel:o,block:s}=u(),c=a.db;c.setDiagramId(r);let l;o===`sandbox`&&(l=t(`#i`+r));let d=t(o===`sandbox`?l.nodes()[0].contentDocument.body:`body`),f=o===`sandbox`?d.select(`[id="${r}"]`):t(`[id="${r}"]`);xe(f,[`point`,`circle`,`cross`],a.type,r);let m=c.getBlocks(),h=c.getBlocksFlat(),g=c.getEdges(),_=f.insert(`g`).attr(`class`,`block`);await yt(_,m,c);let v=Ce(c);if(await bt(_,m,c),await xt(_,g,h,c,r),v){let e=v,t=Math.max(1,Math.round(.125*(e.width/e.height))),r=e.height+t+10,i=e.width+10,{useMaxWidth:a}=s;p(f,r,i,!!a),n.debug(`Here Bounds`,v,e),f.attr(`viewBox`,`${e.x-5} ${e.y-5} ${e.width+10} ${e.height+10}`)}},`draw`),getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`)},styles:ve};export{St as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/book-raschka-mNdDqW1A.jpeg b/lecture-01/assets/book-raschka-mNdDqW1A.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..3ecedcc0aa1da5e6fa0cc14e227e4d49c9c2e45c --- /dev/null +++ b/lecture-01/assets/book-raschka-mNdDqW1A.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91b595ebc1c32acbf2245c044b62cbd0e1cb7663674ebfd3e40ec5e6cda5cdef +size 207954 diff --git a/lecture-01/assets/c4Diagram-FVXVMJYG-DArFwjF3.js b/lecture-01/assets/c4Diagram-FVXVMJYG-DArFwjF3.js new file mode 100644 index 0000000000000000000000000000000000000000..b2db90c3d000778016c8c8074b2dd9fa848de922 --- /dev/null +++ b/lecture-01/assets/c4Diagram-FVXVMJYG-DArFwjF3.js @@ -0,0 +1,10 @@ +import{i as e,r as t}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as n,T as r}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as i,G as a,J as o,Y as s,b as l,c as u,l as d,r as f,x as p}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as m}from"./chunk-IPM4HZQ6-CQmHNgJe.js";import{n as h,r as g,y as _}from"./chunk-OX6ZKUVE-roiHi12N.js";import{a as v,s as y}from"./chunk-ZICDAICJ-CB44yeNY.js";var b=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,24],r=[1,25],i=[1,26],a=[1,27],o=[1,28],s=[1,63],l=[1,64],u=[1,65],d=[1,66],f=[1,67],p=[1,68],m=[1,69],h=[1,29],g=[1,30],_=[1,31],v=[1,32],y=[1,33],b=[1,34],x=[1,35],S=[1,36],C=[1,37],w=[1,38],T=[1,39],E=[1,40],D=[1,41],O=[1,42],k=[1,43],A=[1,44],j=[1,45],M=[1,46],N=[1,47],P=[1,48],F=[1,50],I=[1,51],L=[1,52],R=[1,53],z=[1,54],B=[1,55],V=[1,56],H=[1,57],ee=[1,58],te=[1,59],ne=[1,60],re=[14,42],ie=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ae=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],U=[1,82],W=[1,83],G=[1,84],K=[1,85],q=[12,14,42],oe=[12,14,33,42],se=[12,14,33,42,76,77,79,80],ce=[12,33],le=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],J={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{13:70,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{13:71,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{13:72,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{13:73,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{14:[1,74]},e(re,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne}),e(re,[2,14]),e(ie,[2,16],{12:[1,76]}),e(re,[2,36],{12:[1,77]}),e(ae,[2,19]),e(ae,[2,20]),{25:[1,78]},{27:[1,79]},e(ae,[2,23]),{35:80,75:81,76:U,77:W,79:G,80:K},{35:86,75:81,76:U,77:W,79:G,80:K},{35:87,75:81,76:U,77:W,79:G,80:K},{35:88,75:81,76:U,77:W,79:G,80:K},{35:89,75:81,76:U,77:W,79:G,80:K},{35:90,75:81,76:U,77:W,79:G,80:K},{35:91,75:81,76:U,77:W,79:G,80:K},{35:92,75:81,76:U,77:W,79:G,80:K},{35:93,75:81,76:U,77:W,79:G,80:K},{35:94,75:81,76:U,77:W,79:G,80:K},{35:95,75:81,76:U,77:W,79:G,80:K},{35:96,75:81,76:U,77:W,79:G,80:K},{35:97,75:81,76:U,77:W,79:G,80:K},{35:98,75:81,76:U,77:W,79:G,80:K},{35:99,75:81,76:U,77:W,79:G,80:K},{35:100,75:81,76:U,77:W,79:G,80:K},{35:101,75:81,76:U,77:W,79:G,80:K},{35:102,75:81,76:U,77:W,79:G,80:K},{35:103,75:81,76:U,77:W,79:G,80:K},{35:104,75:81,76:U,77:W,79:G,80:K},e(q,[2,59]),{35:105,75:81,76:U,77:W,79:G,80:K},{35:106,75:81,76:U,77:W,79:G,80:K},{35:107,75:81,76:U,77:W,79:G,80:K},{35:108,75:81,76:U,77:W,79:G,80:K},{35:109,75:81,76:U,77:W,79:G,80:K},{35:110,75:81,76:U,77:W,79:G,80:K},{35:111,75:81,76:U,77:W,79:G,80:K},{35:112,75:81,76:U,77:W,79:G,80:K},{35:113,75:81,76:U,77:W,79:G,80:K},{35:114,75:81,76:U,77:W,79:G,80:K},{35:115,75:81,76:U,77:W,79:G,80:K},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{12:[1,118],33:[1,117]},{35:119,75:81,76:U,77:W,79:G,80:K},{35:120,75:81,76:U,77:W,79:G,80:K},{35:121,75:81,76:U,77:W,79:G,80:K},{35:122,75:81,76:U,77:W,79:G,80:K},{35:123,75:81,76:U,77:W,79:G,80:K},{35:124,75:81,76:U,77:W,79:G,80:K},{35:125,75:81,76:U,77:W,79:G,80:K},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(re,[2,15]),e(ie,[2,17],{21:22,19:130,22:n,23:r,24:i,26:a,28:o}),e(re,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:n,23:r,24:i,26:a,28:o,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne}),e(ae,[2,21]),e(ae,[2,22]),e(q,[2,39]),e(oe,[2,71],{75:81,35:132,76:U,77:W,79:G,80:K}),e(se,[2,73]),{78:[1,133]},e(se,[2,75]),e(se,[2,76]),e(q,[2,40]),e(q,[2,41]),e(q,[2,42]),e(q,[2,43]),e(q,[2,44]),e(q,[2,45]),e(q,[2,46]),e(q,[2,47]),e(q,[2,48]),e(q,[2,49]),e(q,[2,50]),e(q,[2,51]),e(q,[2,52]),e(q,[2,53]),e(q,[2,54]),e(q,[2,55]),e(q,[2,56]),e(q,[2,57]),e(q,[2,58]),e(q,[2,60]),e(q,[2,61]),e(q,[2,62]),e(q,[2,63]),e(q,[2,64]),e(q,[2,65]),e(q,[2,66]),e(q,[2,67]),e(q,[2,68]),e(q,[2,69]),e(q,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(ce,[2,28]),e(ce,[2,29]),e(ce,[2,30]),e(ce,[2,31]),e(ce,[2,32]),e(ce,[2,33]),e(ce,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(ie,[2,18]),e(re,[2,38]),e(oe,[2,72]),e(se,[2,74]),e(q,[2,24]),e(q,[2,35]),e(le,[2,25]),e(le,[2,26],{12:[1,138]}),e(le,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,l=``,u=0,d=0,f=0,p=2,m=1,h=o.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;o.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){r.length-=2*e,a.length-=e,o.length-=e}t(x,`popStack`);function S(){var e=i.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=r[r.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=s[T]&&s[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],s[T])this.terminals_[k]&&k>p&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(u+1)+`: +`+g.showPosition()+` +Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(u+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:r.push(C),a.push(g.yytext),o.push(g.yylloc),r.push(E[1]),C=null,w?(C=w,w=null):(d=g.yyleng,l=g.yytext,u=g.yylineno,y=g.yylloc,f>0&&f--);break;case 2:if(A=this.productions_[E[1]][1],O.$=a[a.length-A],O._$={first_line:o[o.length-(A||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(A||1)].first_column,last_column:o[o.length-1].last_column},b&&(O._$.range=[o[o.length-(A||1)].range[0],o[o.length-1].range[1]]),D=this.performAction.apply(O,[l,d,u,_.yy,E[1],a,o].concat(h)),D!==void 0)return D;A&&(r=r.slice(0,-1*A*2),a=a.slice(0,-1*A),o=o.slice(0,-1*A)),r.push(this.productions_[E[1]][0]),a.push(O.$),o.push(O._$),j=s[r[r.length-2]][r[r.length-1]],r.push(j);break;case 3:return!0}}return!0},`parse`)};J.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:t(function(e,t,n,r){switch(n){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin(`acc_title`),24;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),26;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin(`person_ext`),45;case 23:return this.begin(`person`),44;case 24:return this.begin(`system_ext_queue`),51;case 25:return this.begin(`system_ext_db`),50;case 26:return this.begin(`system_ext`),49;case 27:return this.begin(`system_queue`),48;case 28:return this.begin(`system_db`),47;case 29:return this.begin(`system`),46;case 30:return this.begin(`boundary`),37;case 31:return this.begin(`enterprise_boundary`),34;case 32:return this.begin(`system_boundary`),36;case 33:return this.begin(`container_ext_queue`),57;case 34:return this.begin(`container_ext_db`),56;case 35:return this.begin(`container_ext`),55;case 36:return this.begin(`container_queue`),54;case 37:return this.begin(`container_db`),53;case 38:return this.begin(`container`),52;case 39:return this.begin(`container_boundary`),38;case 40:return this.begin(`component_ext_queue`),63;case 41:return this.begin(`component_ext_db`),62;case 42:return this.begin(`component_ext`),61;case 43:return this.begin(`component_queue`),60;case 44:return this.begin(`component_db`),59;case 45:return this.begin(`component`),58;case 46:return this.begin(`node`),39;case 47:return this.begin(`node`),39;case 48:return this.begin(`node_l`),40;case 49:return this.begin(`node_r`),41;case 50:return this.begin(`rel`),64;case 51:return this.begin(`birel`),65;case 52:return this.begin(`rel_u`),66;case 53:return this.begin(`rel_u`),66;case 54:return this.begin(`rel_d`),67;case 55:return this.begin(`rel_d`),67;case 56:return this.begin(`rel_l`),68;case 57:return this.begin(`rel_l`),68;case 58:return this.begin(`rel_r`),69;case 59:return this.begin(`rel_r`),69;case 60:return this.begin(`rel_b`),70;case 61:return this.begin(`rel_index`),71;case 62:return this.begin(`update_el_style`),72;case 63:return this.begin(`update_rel_style`),73;case 64:return this.begin(`update_layout_config`),74;case 65:return`EOF_IN_STRUCT`;case 66:return this.begin(`attribute`),`ATTRIBUTE_EMPTY`;case 67:this.begin(`attribute`);break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin(`string`);break;case 73:this.popState();break;case 74:return`STR`;case 75:this.begin(`string_kv`);break;case 76:return this.begin(`string_kv_key`),`STR_KEY`;case 77:this.popState(),this.begin(`string_kv_value`);break;case 78:return`STR_VALUE`;case 79:this.popState(),this.popState();break;case 80:return`STR`;case 81:return`LBRACE`;case 82:return`RBRACE`;case 83:return`SPACE`;case 84:return`EOL`;case 85:return 14}},`anonymous`),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}})();function ue(){this.yy={}}return t(ue,`Parser`),ue.prototype=J,J.Parser=ue,new ue})();b.parser=b;var x=b,S=[],C=[``],w=`global`,T=``,E=[{alias:`global`,label:{text:`global`},type:{text:`global`},tags:null,link:null,parentBoundary:``}],D=[],O=``,k=!1,A=4,j=2,M,N=t(function(){return M},`getC4Type`),P=t(function(e){M=a(e,i())},`setC4Type`),F=t(function(e,t,n,r,i,a,o,s,l){if(e==null||t==null||n==null||r==null)return;let u={},d=D.find(e=>e.from===t&&e.to===n);if(d?u=d:D.push(u),u.type=e,u.from=t,u.to=n,u.label={text:r},i==null)u.techn={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];u[e]={text:t}}else u.techn={text:i};if(a==null)u.descr={text:``};else if(typeof a==`object`){let[e,t]=Object.entries(a)[0];u[e]={text:t}}else u.descr={text:a};if(typeof o==`object`){let[e,t]=Object.entries(o)[0];u[e]=t}else u.sprite=o;if(typeof s==`object`){let[e,t]=Object.entries(s)[0];u[e]=t}else u.tags=s;if(typeof l==`object`){let[e,t]=Object.entries(l)[0];u[e]=t}else u.link=l;u.wrap=J()},`addRel`),I=t(function(e,t,n,r,i,a,o){if(t===null||n===null)return;let s={},l=S.find(e=>e.alias===t);if(l&&t===l.alias?s=l:(s.alias=t,S.push(s)),n==null?s.label={text:``}:s.label={text:n},r==null)s.descr={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];s[e]={text:t}}else s.descr={text:r};if(typeof i==`object`){let[e,t]=Object.entries(i)[0];s[e]=t}else s.sprite=i;if(typeof a==`object`){let[e,t]=Object.entries(a)[0];s[e]=t}else s.tags=a;if(typeof o==`object`){let[e,t]=Object.entries(o)[0];s[e]=t}else s.link=o;s.typeC4Shape={text:e},s.parentBoundary=w,s.wrap=J()},`addPersonOrSystem`),L=t(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=S.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,S.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.techn={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.techn={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};if(typeof a==`object`){let[e,t]=Object.entries(a)[0];l[e]=t}else l.sprite=a;if(typeof o==`object`){let[e,t]=Object.entries(o)[0];l[e]=t}else l.tags=o;if(typeof s==`object`){let[e,t]=Object.entries(s)[0];l[e]=t}else l.link=s;l.wrap=J(),l.typeC4Shape={text:e},l.parentBoundary=w},`addContainer`),R=t(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=S.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,S.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.techn={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.techn={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};if(typeof a==`object`){let[e,t]=Object.entries(a)[0];l[e]=t}else l.sprite=a;if(typeof o==`object`){let[e,t]=Object.entries(o)[0];l[e]=t}else l.tags=o;if(typeof s==`object`){let[e,t]=Object.entries(s)[0];l[e]=t}else l.link=s;l.wrap=J(),l.typeC4Shape={text:e},l.parentBoundary=w},`addComponent`),z=t(function(e,t,n,r,i){if(e===null||t===null)return;let a={},o=E.find(t=>t.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,E.push(a)),t==null?a.label={text:``}:a.label={text:t},n==null)a.type={text:`system`};else if(typeof n==`object`){let[e,t]=Object.entries(n)[0];a[e]={text:t}}else a.type={text:n};if(typeof r==`object`){let[e,t]=Object.entries(r)[0];a[e]=t}else a.tags=r;if(typeof i==`object`){let[e,t]=Object.entries(i)[0];a[e]=t}else a.link=i;a.parentBoundary=w,a.wrap=J(),T=w,w=e,C.push(T)},`addPersonOrSystemBoundary`),B=t(function(e,t,n,r,i){if(e===null||t===null)return;let a={},o=E.find(t=>t.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,E.push(a)),t==null?a.label={text:``}:a.label={text:t},n==null)a.type={text:`container`};else if(typeof n==`object`){let[e,t]=Object.entries(n)[0];a[e]={text:t}}else a.type={text:n};if(typeof r==`object`){let[e,t]=Object.entries(r)[0];a[e]=t}else a.tags=r;if(typeof i==`object`){let[e,t]=Object.entries(i)[0];a[e]=t}else a.link=i;a.parentBoundary=w,a.wrap=J(),T=w,w=e,C.push(T)},`addContainerBoundary`),V=t(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=E.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,E.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.type={text:`node`};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.type={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};if(typeof o==`object`){let[e,t]=Object.entries(o)[0];l[e]=t}else l.tags=o;if(typeof s==`object`){let[e,t]=Object.entries(s)[0];l[e]=t}else l.link=s;l.nodeType=e,l.parentBoundary=w,l.wrap=J(),T=w,w=t,C.push(T)},`addDeploymentNode`),H=t(function(){w=T,C.pop(),T=C.pop(),C.push(T)},`popBoundaryParseStack`),ee=t(function(e,t,n,r,i,a,o,s,l,u,d){let f=S.find(e=>e.alias===t);if(!(f===void 0&&(f=E.find(e=>e.alias===t),f===void 0))){if(n!=null){if(typeof n==`object`){let[e,t]=Object.entries(n)[0];f[e]=t}else f.bgColor=n}if(r!=null){if(typeof r==`object`){let[e,t]=Object.entries(r)[0];f[e]=t}else f.fontColor=r}if(i!=null){if(typeof i==`object`){let[e,t]=Object.entries(i)[0];f[e]=t}else f.borderColor=i}if(a!=null){if(typeof a==`object`){let[e,t]=Object.entries(a)[0];f[e]=t}else f.shadowing=a}if(o!=null){if(typeof o==`object`){let[e,t]=Object.entries(o)[0];f[e]=t}else f.shape=o}if(s!=null){if(typeof s==`object`){let[e,t]=Object.entries(s)[0];f[e]=t}else f.sprite=s}if(l!=null){if(typeof l==`object`){let[e,t]=Object.entries(l)[0];f[e]=t}else f.techn=l}if(u!=null){if(typeof u==`object`){let[e,t]=Object.entries(u)[0];f[e]=t}else f.legendText=u}if(d!=null){if(typeof d==`object`){let[e,t]=Object.entries(d)[0];f[e]=t}else f.legendSprite=d}}},`updateElStyle`),te=t(function(e,t,n,r,i,a,o){let s=D.find(e=>e.from===t&&e.to===n);if(s!==void 0){if(r!=null){if(typeof r==`object`){let[e,t]=Object.entries(r)[0];s[e]=t}else s.textColor=r}if(i!=null){if(typeof i==`object`){let[e,t]=Object.entries(i)[0];s[e]=t}else s.lineColor=i}if(a!=null){if(typeof a==`object`){let[e,t]=Object.entries(a)[0];s[e]=parseInt(t)}else s.offsetX=parseInt(a)}if(o!=null){if(typeof o==`object`){let[e,t]=Object.entries(o)[0];s[e]=parseInt(t)}else s.offsetY=parseInt(o)}}},`updateRelStyle`),ne=t(function(e,t,n){let r=A,i=j;if(typeof t==`object`){let e=Object.values(t)[0];r=parseInt(e)}else r=parseInt(t);if(typeof n==`object`){let e=Object.values(n)[0];i=parseInt(e)}else i=parseInt(n);r>=1&&(A=r),i>=1&&(j=i)},`updateLayoutConfig`),re=t(function(){return A},`getC4ShapeInRow`),ie=t(function(){return j},`getC4BoundaryInRow`),ae=t(function(){return w},`getCurrentBoundaryParse`),U=t(function(){return T},`getParentBoundaryParse`),W=t(function(e){return e==null?S:S.filter(t=>t.parentBoundary===e)},`getC4ShapeArray`),G=t(function(e){return S.find(t=>t.alias===e)},`getC4Shape`),K=t(function(e){return Object.keys(W(e))},`getC4ShapeKeys`),q=t(function(e){return e==null?E:E.filter(t=>t.parentBoundary===e)},`getBoundaries`),oe=q,se=t(function(){return D},`getRels`),ce=t(function(){return O},`getTitle`),le=t(function(e){k=e},`setWrap`),J=t(function(){return k},`autoWrap`),ue={addPersonOrSystem:I,addPersonOrSystemBoundary:z,addContainer:L,addContainerBoundary:B,addComponent:R,addDeploymentNode:V,popBoundaryParseStack:H,addRel:F,updateElStyle:ee,updateRelStyle:te,updateLayoutConfig:ne,autoWrap:J,setWrap:le,getC4ShapeArray:W,getC4Shape:G,getC4ShapeKeys:K,getBoundaries:q,getBoundarys:oe,getCurrentBoundaryParse:ae,getParentBoundaryParse:U,getRels:se,getTitle:ce,getC4Type:N,getC4ShapeInRow:re,getC4BoundaryInRow:ie,setAccTitle:s,getAccTitle:p,getAccDescription:l,setAccDescription:o,getConfig:t(()=>i().c4,`getConfig`),clear:t(function(){S=[],E=[{alias:`global`,label:{text:`global`},type:{text:`global`},tags:null,link:null,parentBoundary:``}],T=``,w=`global`,C=[``],D=[],C=[``],O=``,k=!1,A=4,j=2},`clear`),LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:t(function(e){O=a(e,i())},`setTitle`),setC4Type:P},de=e(m(),1),fe=t(function(e,t){return v(e,t)},`drawRect`),pe=t(function(e,t,n,r,i,a){let o=e.append(`image`);o.attr(`width`,t),o.attr(`height`,n),o.attr(`x`,r),o.attr(`y`,i);let s=a.startsWith(`data:image/png;base64`)?a:(0,de.sanitizeUrl)(a);o.attr(`xlink:href`,s)},`drawImage`),me=t((e,t,n,r)=>{let i=e.append(`g`),a=0;for(let e of t){let t=e.textColor?e.textColor:`#444444`,o=e.lineColor?e.lineColor:`#444444`,s=e.offsetX?parseInt(e.offsetX):0,l=e.offsetY?parseInt(e.offsetY):0;if(a===0){let t=i.append(`line`);t.attr(`x1`,e.startPoint.x),t.attr(`y1`,e.startPoint.y),t.attr(`x2`,e.endPoint.x),t.attr(`y2`,e.endPoint.y),t.attr(`stroke-width`,`1`),t.attr(`stroke`,o),t.style(`fill`,`none`),e.type!==`rel_b`&&t.attr(`marker-end`,`url(#`+r+`-arrowhead)`),(e.type===`birel`||e.type===`rel_b`)&&t.attr(`marker-start`,`url(#`+r+`-arrowend)`),a=-1}else{let t=i.append(`path`);t.attr(`fill`,`none`).attr(`stroke-width`,`1`).attr(`stroke`,o).attr(`d`,`Mstartx,starty Qcontrolx,controly stopx,stopy `.replaceAll(`startx`,e.startPoint.x).replaceAll(`starty`,e.startPoint.y).replaceAll(`controlx`,e.startPoint.x+(e.endPoint.x-e.startPoint.x)/2-(e.endPoint.x-e.startPoint.x)/4).replaceAll(`controly`,e.startPoint.y+(e.endPoint.y-e.startPoint.y)/2).replaceAll(`stopx`,e.endPoint.x).replaceAll(`stopy`,e.endPoint.y)),e.type!==`rel_b`&&t.attr(`marker-end`,`url(#`+r+`-arrowhead)`),(e.type===`birel`||e.type===`rel_b`)&&t.attr(`marker-start`,`url(#`+r+`-arrowend)`)}let u=n.messageFont();Y(n)(e.label.text,i,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+s,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+l,e.label.width,e.label.height,{fill:t},u),e.techn&&e.techn.text!==``&&(u=n.messageFont(),Y(n)(`[`+e.techn.text+`]`,i,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+s,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+n.messageFontSize+5+l,Math.max(e.label.width,e.techn.width),e.techn.height,{fill:t,"font-style":`italic`},u))}},`drawRels`),he=t(function(e,t,n){let r=e.append(`g`),i=t.bgColor?t.bgColor:`none`,a=t.borderColor?t.borderColor:`#444444`,o=t.fontColor?t.fontColor:`black`,s={"stroke-width":1,"stroke-dasharray":`7.0,7.0`};t.nodeType&&(s={"stroke-width":1}),fe(r,{x:t.x,y:t.y,fill:i,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:s});let l=n.boundaryFont();l.fontWeight=`bold`,l.fontSize+=2,l.fontColor=o,Y(n)(t.label.text,r,t.x,t.y+t.label.Y,t.width,t.height,{fill:`#444444`},l),t.type&&t.type.text!==``&&(l=n.boundaryFont(),l.fontColor=o,Y(n)(t.type.text,r,t.x,t.y+t.type.Y,t.width,t.height,{fill:`#444444`},l)),t.descr&&t.descr.text!==``&&(l=n.boundaryFont(),l.fontSize-=2,l.fontColor=o,Y(n)(t.descr.text,r,t.x,t.y+t.descr.Y,t.width,t.height,{fill:`#444444`},l))},`drawBoundary`),ge=t(function(e,t,n){let r=t.bgColor?t.bgColor:n[t.typeC4Shape.text+`_bg_color`],i=t.borderColor?t.borderColor:n[t.typeC4Shape.text+`_border_color`],a=t.fontColor?t.fontColor:`#FFFFFF`,o=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=`;switch(t.typeC4Shape.text){case`person`:o=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=`;break;case`external_person`:o=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=`}let s=e.append(`g`);s.attr(`class`,`person-man`);let l=y();switch(t.typeC4Shape.text){case`person`:case`external_person`:case`system`:case`external_system`:case`container`:case`external_container`:case`component`:case`external_component`:l.x=t.x,l.y=t.y,l.fill=r,l.width=t.width,l.height=t.height,l.stroke=i,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},fe(s,l);break;case`system_db`:case`external_system_db`:case`container_db`:case`external_container_db`:case`component_db`:case`external_component_db`:s.append(`path`).attr(`fill`,r).attr(`stroke-width`,`0.5`).attr(`stroke`,i).attr(`d`,`Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height`.replaceAll(`startx`,t.x).replaceAll(`starty`,t.y).replaceAll(`half`,t.width/2).replaceAll(`height`,t.height)),s.append(`path`).attr(`fill`,`none`).attr(`stroke-width`,`0.5`).attr(`stroke`,i).attr(`d`,`Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10`.replaceAll(`startx`,t.x).replaceAll(`starty`,t.y).replaceAll(`half`,t.width/2));break;case`system_queue`:case`external_system_queue`:case`container_queue`:case`external_container_queue`:case`component_queue`:case`external_component_queue`:s.append(`path`).attr(`fill`,r).attr(`stroke-width`,`0.5`).attr(`stroke`,i).attr(`d`,`Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half`.replaceAll(`startx`,t.x).replaceAll(`starty`,t.y).replaceAll(`width`,t.width).replaceAll(`half`,t.height/2)),s.append(`path`).attr(`fill`,`none`).attr(`stroke-width`,`0.5`).attr(`stroke`,i).attr(`d`,`Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half`.replaceAll(`startx`,t.x+t.width).replaceAll(`starty`,t.y).replaceAll(`half`,t.height/2))}let u=we(n,t.typeC4Shape.text);switch(s.append(`text`).attr(`fill`,a).attr(`font-family`,u.fontFamily).attr(`font-size`,u.fontSize-2).attr(`font-style`,`italic`).attr(`lengthAdjust`,`spacing`).attr(`textLength`,t.typeC4Shape.width).attr(`x`,t.x+t.width/2-t.typeC4Shape.width/2).attr(`y`,t.y+t.typeC4Shape.Y).text(`<<`+t.typeC4Shape.text+`>>`),t.typeC4Shape.text){case`person`:case`external_person`:pe(s,48,48,t.x+t.width/2-24,t.y+t.image.Y,o)}let d=n[t.typeC4Shape.text+`Font`]();return d.fontWeight=`bold`,d.fontSize+=2,d.fontColor=a,Y(n)(t.label.text,s,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},d),d=n[t.typeC4Shape.text+`Font`](),d.fontColor=a,t.techn&&t.techn?.text!==``?Y(n)(t.techn.text,s,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":`italic`},d):t.type&&t.type.text!==``&&Y(n)(t.type.text,s,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":`italic`},d),t.descr&&t.descr.text!==``&&(d=n.personFont(),d.fontColor=a,Y(n)(t.descr.text,s,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},d)),t.height},`drawC4Shape`),_e=t(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-database`).attr(`fill-rule`,`evenodd`).attr(`clip-rule`,`evenodd`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z`)},`insertDatabaseIcon`),ve=t(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-computer`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z`)},`insertComputerIcon`),ye=t(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-clock`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z`)},`insertClockIcon`),be=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,9).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`)},`insertArrowHead`),xe=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowend`).attr(`refX`,1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`)},`insertArrowEnd`),Se=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-filled-head`).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`insertArrowFilledHead`),Ce=t(function(e,t){let n=e.append(`defs`).append(`marker`).attr(`id`,t+`-crosshead`).attr(`markerWidth`,15).attr(`markerHeight`,8).attr(`orient`,`auto`).attr(`refX`,16).attr(`refY`,4);n.append(`path`).attr(`fill`,`black`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1px`).attr(`d`,`M 9,2 V 6 L16,4 Z`),n.append(`path`).attr(`fill`,`none`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1px`).attr(`d`,`M 0,1 L 6,7 M 6,1 L 0,7`)},`insertArrowCrossHead`),we=t((e,t)=>({fontFamily:e[t+`FontFamily`],fontSize:e[t+`FontSize`],fontWeight:e[t+`FontWeight`]}),`getC4ShapeFont`),Y=(function(){function e(e,t,n,r,a,o,s){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`text-anchor`,`middle`).text(e),s)}t(e,`byText`);function n(e,t,n,r,a,o,s,l){let{fontSize:d,fontFamily:f,fontWeight:p}=l,m=e.split(u.lineBreakRegex);for(let e=0;e=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>De)&&(t=this.nextData.startx+e.margin+Z.nextLinePaddingX,r=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=t+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=r+e.height,this.nextData.cnt=1),e.x=t,e.y=r,this.updateVal(this.data,`startx`,t,Math.min),this.updateVal(this.data,`starty`,r,Math.min),this.updateVal(this.data,`stopx`,n,Math.max),this.updateVal(this.data,`stopy`,i,Math.max),this.updateVal(this.nextData,`startx`,t,Math.min),this.updateVal(this.nextData,`starty`,r,Math.min),this.updateVal(this.nextData,`stopx`,n,Math.max),this.updateVal(this.nextData,`stopy`,i,Math.max)}init(e){this.name=``,this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},Ae(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},Ae=t(function(e){f(Z,e),e.fontFamily&&(Z.personFontFamily=Z.systemFontFamily=Z.messageFontFamily=e.fontFamily),e.fontSize&&(Z.personFontSize=Z.systemFontSize=Z.messageFontSize=e.fontSize),e.fontWeight&&(Z.personFontWeight=Z.systemFontWeight=Z.messageFontWeight=e.fontWeight)},`setConf`),je=t((e,t)=>({fontFamily:e[t+`FontFamily`],fontSize:e[t+`FontSize`],fontWeight:e[t+`FontWeight`]}),`c4ShapeFont`),Me=t(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),`boundaryFont`),Ne=t(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`);function Q(e,t,n,r,i){if(!t[e].width){if(n)t[e].text=_(t[e].text,i,r),t[e].textLines=t[e].text.split(u.lineBreakRegex).length,t[e].width=i,t[e].height=h(t[e].text,r);else{let n=t[e].text.split(u.lineBreakRegex);t[e].textLines=n.length;let i=0;t[e].height=0,t[e].width=0;for(let a of n)t[e].width=Math.max(g(a,r),t[e].width),i=h(a,r),t[e].height=t[e].height+i}}}t(Q,`calcC4ShapeTextWH`);var Pe=t(function(e,t,n){t.x=n.data.startx,t.y=n.data.starty,t.width=n.data.stopx-n.data.startx,t.height=n.data.stopy-n.data.starty,t.label.y=Z.c4ShapeMargin-35;let r=t.wrap&&Z.wrap,i=Me(Z);i.fontSize+=2,i.fontWeight=`bold`,Q(`label`,t,r,i,g(t.label.text,i)),X.drawBoundary(e,t,Z)},`drawBoundary`),Fe=t(function(e,t,n,r){let i=0;for(let a of r){i=0;let r=n[a],o=je(Z,r.typeC4Shape.text);switch(o.fontSize-=2,r.typeC4Shape.width=g(`«`+r.typeC4Shape.text+`»`,o),r.typeC4Shape.height=o.fontSize+2,r.typeC4Shape.Y=Z.c4ShapePadding,i=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case`person`:case`external_person`:r.image.width=48,r.image.height=48,r.image.Y=i,i=r.image.Y+r.image.height}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=i,i=r.image.Y+r.image.height);let s=r.wrap&&Z.wrap,l=Z.width-Z.c4ShapePadding*2,u=je(Z,r.typeC4Shape.text);u.fontSize+=2,u.fontWeight=`bold`,Q(`label`,r,s,u,l),r.label.Y=i+8,i=r.label.Y+r.label.height,r.type&&r.type.text!==``?(r.type.text=`[`+r.type.text+`]`,Q(`type`,r,s,je(Z,r.typeC4Shape.text),l),r.type.Y=i+5,i=r.type.Y+r.type.height):r.techn&&r.techn.text!==``&&(r.techn.text=`[`+r.techn.text+`]`,Q(`techn`,r,s,je(Z,r.techn.text),l),r.techn.Y=i+5,i=r.techn.Y+r.techn.height);let d=i,f=r.label.width;r.descr&&r.descr.text!==``&&(Q(`descr`,r,s,je(Z,r.typeC4Shape.text),l),r.descr.Y=i+20,i=r.descr.Y+r.descr.height,f=Math.max(r.label.width,r.descr.width),d=i-r.descr.textLines*5),f+=Z.c4ShapePadding,r.width=Math.max(r.width||Z.width,f,Z.width),r.height=Math.max(r.height||Z.height,d,Z.height),r.margin=r.margin||Z.c4ShapeMargin,e.insert(r),X.drawC4Shape(t,r,Z)}e.bumpLastMargin(Z.c4ShapeMargin)},`drawC4ShapeArray`),$=class{static{t(this,`Point`)}constructor(e,t){this.x=e,this.y=t}},Ie=t(function(e,t){let n=e.x,r=e.y,i=t.x,a=t.y,o=n+e.width/2,s=r+e.height/2,l=Math.abs(n-i),u=Math.abs(r-a),d=u/l,f=e.height/e.width,p=null;return r==a&&ni?p=new $(n,s):n==i&&ra&&(p=new $(o,r)),n>i&&r=d?new $(n,s+d*e.width/2):new $(o-l/u*e.height/2,r+e.height):n=d?new $(n+e.width,s+d*e.width/2):new $(o+l/u*e.height/2,r+e.height):na?p=f>=d?new $(n+e.width,s-d*e.width/2):new $(o+e.height/2*l/u,r):n>i&&r>a&&(p=f>=d?new $(n,s-e.width/2*d):new $(o-e.height/2*l/u,r)),p},`getIntersectPoint`),Le=t(function(e,t){let n={x:0,y:0};n.x=t.x+t.width/2,n.y=t.y+t.height/2;let r=Ie(e,n);return n.x=e.x+e.width/2,n.y=e.y+e.height/2,{startPoint:r,endPoint:Ie(t,n)}},`getIntersectPoints`),Re=t(function(e,t,n,r,i){let a=0;for(let e of t){a+=1;let t=e.wrap&&Z.wrap,i=Ne(Z);r.db.getC4Type()===`C4Dynamic`&&(e.label.text=a+`: `+e.label.text);let o=g(e.label.text,i);Q(`label`,e,t,i,o),e.techn&&e.techn.text!==``&&(o=g(e.techn.text,i),Q(`techn`,e,t,i,o)),e.descr&&e.descr.text!==``&&(o=g(e.descr.text,i),Q(`descr`,e,t,i,o));let s=Le(n(e.from),n(e.to));e.startPoint=s.startPoint,e.endPoint=s.endPoint}X.drawRels(e,t,Z,i)},`drawRels`);function ze(e,t,n,r,i){let a=new ke(i);a.data.widthLimit=n.data.widthLimit/Math.min(Oe,r.length);for(let[o,s]of r.entries()){let r=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=r,r=s.image.Y+s.image.height);let l=s.wrap&&Z.wrap,u=Me(Z);if(u.fontSize+=2,u.fontWeight=`bold`,Q(`label`,s,l,u,a.data.widthLimit),s.label.Y=r+8,r=s.label.Y+s.label.height,s.type&&s.type.text!==``&&(s.type.text=`[`+s.type.text+`]`,Q(`type`,s,l,Me(Z),a.data.widthLimit),s.type.Y=r+5,r=s.type.Y+s.type.height),s.descr&&s.descr.text!==``){let e=Me(Z);e.fontSize-=2,Q(`descr`,s,l,e,a.data.widthLimit),s.descr.Y=r+20,r=s.descr.Y+s.descr.height}if(o==0||o%Oe===0){let e=n.data.startx+Z.diagramMarginX,t=n.data.stopy+Z.diagramMarginY+r;a.setData(e,e,t,t)}else{let e=a.data.stopx===a.data.startx?a.data.startx:a.data.stopx+Z.diagramMarginX,t=a.data.starty;a.setData(e,e,t,t)}a.name=s.alias;let d=i.db.getC4ShapeArray(s.alias),f=i.db.getC4ShapeKeys(s.alias);f.length>0&&Fe(a,e,d,f),t=s.alias;let p=i.db.getBoundaries(t);p.length>0&&ze(e,t,a,p,i),s.alias!==`global`&&Pe(e,s,a),n.data.stopy=Math.max(a.data.stopy+Z.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(a.data.stopx+Z.c4ShapeMargin,n.data.stopx),Te=Math.max(Te,n.data.stopx),Ee=Math.max(Ee,n.data.stopy)}}t(ze,`drawInsideBoundary`);var Be={drawPersonOrSystemArray:Fe,drawBoundary:Pe,setConf:Ae,draw:t(function(e,t,a,o){Z=i().c4;let s=i().securityLevel,l;s===`sandbox`&&(l=n(`#i`+t));let u=n(s===`sandbox`?l.nodes()[0].contentDocument.body:`body`),f=o.db;o.db.setWrap(Z.wrap),De=f.getC4ShapeInRow(),Oe=f.getC4BoundaryInRow(),r.debug(`C:${JSON.stringify(Z,null,2)}`);let p=s===`sandbox`?u.select(`[id="${t}"]`):n(`[id="${t}"]`);X.insertComputerIcon(p,t),X.insertDatabaseIcon(p,t),X.insertClockIcon(p,t);let m=new ke(o);m.setData(Z.diagramMarginX,Z.diagramMarginX,Z.diagramMarginY,Z.diagramMarginY),m.data.widthLimit=screen.availWidth,Te=Z.diagramMarginX,Ee=Z.diagramMarginY;let h=o.db.getTitle();ze(p,``,m,o.db.getBoundaries(``),o),X.insertArrowHead(p,t),X.insertArrowEnd(p,t),X.insertArrowCrossHead(p,t),X.insertArrowFilledHead(p,t),Re(p,o.db.getRels(),o.db.getC4Shape,o,t),m.data.stopx=Te,m.data.stopy=Ee;let g=m.data,_=g.stopy-g.starty+2*Z.diagramMarginY,v=g.stopx-g.startx+2*Z.diagramMarginX;h&&p.append(`text`).text(h).attr(`x`,(g.stopx-g.startx)/2-4*Z.diagramMarginX).attr(`y`,g.starty+Z.diagramMarginY),d(p,_,v,Z.useMaxWidth);let y=h?60:0;p.attr(`viewBox`,g.startx-Z.diagramMarginX+` -`+(Z.diagramMarginY+y)+` `+v+` `+(_+y)),r.debug(`models:`,g)},`draw`)},Ve={parser:x,db:ue,renderer:Be,styles:t(e=>`.person { + stroke: ${e.personBorder}; + fill: ${e.personBkg}; + } +`,`getStyles`),init:t(({c4:e,wrap:t})=>{Be.setConf(e),ue.setWrap(t)},`init`)};export{Ve as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-2V3FENDJ-B1mkZICr.js b/lecture-01/assets/chunk-2V3FENDJ-B1mkZICr.js new file mode 100644 index 0000000000000000000000000000000000000000..622ad62a4cfe2bf15e3a7802d5aa36a22a10f01b --- /dev/null +++ b/lecture-01/assets/chunk-2V3FENDJ-B1mkZICr.js @@ -0,0 +1,70 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as t,T as n}from"./chunk-FO5PYUIK-CPzj2963.js";import{B as r,G as i,M as a,S as o,c as s}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{o as c}from"./chunk-OX6ZKUVE-roiHi12N.js";import{n as l,t as u}from"./chunk-AQ2D6KKF-AxjphkEe.js";function d(e){var t=[...arguments].slice(1),n=Array.from(typeof e==`string`?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,``);var r=n.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){return e.match(/[\t ]/g)?.length??0})):e},[]);if(r.length){var i=RegExp(` +[ ]{`+Math.min.apply(Math,r)+`}`,`g`);n=n.map(function(e){return e.replace(i,` +`)})}n[0]=n[0].replace(/^\r?\n/,``);var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:``,o=e;typeof e==`string`&&e.includes(` +`)&&(o=String(e).split(` +`).map(function(e,t){return t===0?e:``+i+e}).join(` +`)),a+=o+n[t+1]}),a}e(d,`dedent`);function f(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}e(f,`L`);var p=f();function m(e){p=e}e(m,`G`);var h={exec:e(()=>null,`exec`)};function g(t,n=``){let r=typeof t==`string`?t:t.source,i={replace:e((e,t)=>{let n=typeof t==`string`?t:t.source;return n=n.replace(_.caret,`$1`),r=r.replace(e,n),i},`replace`),getRegex:e(()=>new RegExp(r,n),`getRegex`)};return i}e(g,`h`);var _={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e(e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),`listItemRegex`),nextBulletRegex:e(e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),`nextBulletRegex`),hrRegex:e(e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),`hrRegex`),fencesBeginRegex:e(e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),`fencesBeginRegex`),headingBeginRegex:e(e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),`headingBeginRegex`),htmlBeginRegex:e(e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),`htmlBeginRegex`)},ee=/^(?:[ \t]*(?:\n|$))+/,te=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ne=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,re=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,y=/(?:[*+-]|\d{1,9}[.)])/,ie=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ae=g(ie).replace(/bull/g,y).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),oe=g(ie).replace(/bull/g,y).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),b=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,se=/^[^\n]+/,x=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ce=g(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,x).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),le=g(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,y).getRegex(),S=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,C=/|$))/,ue=g(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,C).replace(`tag`,S).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),de=g(b).replace(`hr`,v).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,S).getRegex(),w={blockquote:g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,de).getRegex(),code:te,def:ce,fences:ne,heading:re,hr:v,html:ue,lheading:ae,list:le,newline:ee,paragraph:de,table:h,text:se},fe=g(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,v).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,S).getRegex(),pe={...w,lheading:oe,table:fe,paragraph:g(b).replace(`hr`,v).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,fe).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,S).getRegex()},me={...w,html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,C).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:h,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(b).replace(`hr`,v).replace(`heading`,` *#{1,6} *[^ +]`).replace(`lheading`,ae).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},he=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ge=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_e=/^( {2,}|\\)\n(?!\s*$)/,ve=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,Te=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ee=g(Te,`u`).replace(/punct/g,T).getRegex(),De=g(Te,`u`).replace(/punct/g,xe).getRegex(),D=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Oe=g(D,`gu`).replace(/notPunctSpace/g,ye).replace(/punctSpace/g,E).replace(/punct/g,T).getRegex(),ke=g(D,`gu`).replace(/notPunctSpace/g,Ce).replace(/punctSpace/g,Se).replace(/punct/g,xe).getRegex(),Ae=g(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,ye).replace(/punctSpace/g,E).replace(/punct/g,T).getRegex(),je=g(/\\(punct)/,`gu`).replace(/punct/g,T).getRegex(),Me=g(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ne=g(C).replace(`(?:-->|$)`,`-->`).getRegex(),Pe=g(`^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^`).replace(`comment`,Ne).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),O=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,Fe=g(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,O).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ie=g(/^!?\[(label)\]\[(ref)\]/).replace(`label`,O).replace(`ref`,x).getRegex(),Le=g(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,x).getRegex(),k={_backpedal:h,anyPunctuation:je,autolink:Me,blockSkip:we,br:_e,code:ge,del:h,emStrongLDelim:Ee,emStrongRDelimAst:Oe,emStrongRDelimUnd:Ae,escape:he,link:Fe,nolink:Le,punctuation:be,reflink:Ie,reflinkSearch:g(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Ie).replace(`nolink`,Le).getRegex(),tag:Pe,text:ve,url:h},Re={...k,link:g(/^!?\[(label)\]\((.*?)\)/).replace(`label`,O).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,O).getRegex()},A={...k,emStrongRDelimAst:ke,emStrongLDelim:De,url:g(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,`i`).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":`>`,'"':`"`,"'":`'`},Ve=e(e=>Be[e],`ke`);function N(e,t){if(t){if(_.escapeTest.test(e))return e.replace(_.escapeReplace,Ve)}else if(_.escapeTestNoEncode.test(e))return e.replace(_.escapeReplaceNoEncode,Ve);return e}e(N,`w`);function P(e){try{e=encodeURI(e).replace(_.percentDecode,`%`)}catch{return null}return e}e(P,`J`);function F(e,t){let n=e.replace(_.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(_.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length0?-2:-1}e(He,`ge`);function L(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}e(L,`fe`);function Ue(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(` +`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(` +`)}e(Ue,`Je`);var R=class{static{e(this,`y`)}options;rules;lexer;constructor(e){this.options=e||p}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:I(e,` +`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Ue(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=I(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:I(t[0],` +`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=I(t[0],` +`).split(` +`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,e=>` `.repeat(3*e.length)),l=e.split(` +`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+` +`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){let f=e.split(` +`,1)[0],p;if(l=f,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),p=l):p=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||t.test(l)||n.test(l))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=` +`+p.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=` +`+l}!u&&!l.trim()&&(u=!0),r+=f+` +`,e=e.substring(f.length+1),c=p.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let f=null,p;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p=f[0]!==`[ ] `,s=s.replace(this.rules.other.listReplaceTask,``))),i.items.push({type:`list_item`,raw:r,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e=0;ee.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=I(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=He(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),L(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return L(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},z=class t{static{e(this,`l`)}tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||p,this.options.tokenizer=this.options.tokenizer||new R,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:_,block:j.normal,inline:M.normal};this.options.pedantic?(t.block=j.pedantic,t.inline=M.pedantic):this.options.gfm&&(t.block=j.gfm,t.inline=this.options.breaks?M.breaks:M.gfm),this.tokenizer.rules=t}static get rules(){return{block:j,inline:M}}static lex(e,n){return new t(n).lex(e)}static lexInline(e,n){return new t(n).inlineTokens(e)}lex(e){e=e.replace(_.carriageReturn,` +`),this.blockTokens(e,this.tokens);for(let e=0;e(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=` +`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(` +`)?``:` +`)+r.raw,n.text+=` +`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(` +`)?``:` +`)+r.raw,n.text+=` +`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=(a.raw.endsWith(` +`)?``:` +`)+r.raw,a.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(` +`)?``:` +`)+r.raw,n.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let i=!1,a=``;for(;e;){i||(a=``),i=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,a)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(o)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(a=r.raw.slice(-1)),i=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return t}},B=class{static{e(this,`P`)}options;parser;constructor(e){this.options=e||p}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(_.notSpaceStart)?.[0],i=e.replace(_.endingNewline,``)+` +`;return r?`

`+(n?i:N(i,!0))+`
+`:`
`+(n?i:N(i,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} +`}hr(e){return`
+`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t +`+r+` +`}listitem(e){let t=``;if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type===`paragraph`?(e.tokens[0].text=n+` `+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type===`text`&&(e.tokens[0].tokens[0].text=n+` `+N(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:`text`,raw:n+` `,text:n+` `,escaped:!0}):t+=n+` `}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • +`}checkbox({checked:e}){return``}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    +`}table(e){let t=``,n=``;for(let t=0;t${r}`,` + +`+t+` +`+r+`
    +`}tablerow({text:e}){return` +${e} +`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${N(e,!0)}`}br(e){return`
    `}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=P(e);if(i===null)return r;e=i;let a=`
    `+r+``,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=P(e);if(i===null)return N(n);e=i;let a=`${n}`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:N(e.text)}},V=class{static{e(this,`$`)}strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}},H=class t{static{e(this,`l`)}options;renderer;textRenderer;constructor(e){this.options=e||p,this.options.renderer=this.options.renderer||new B,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new V}static parse(e,n){return new t(n).parse(e)}static parseInline(e,n){return new t(n).parseInline(e)}parse(e,t=!0){let n=``;for(let r=0;r{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new B(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new R(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new U;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=U.passThroughHooks.has(n)?e=>{if(this.defaults.async&&U.passThroughHooksRespectAsync.has(n))return Promise.resolve(i.call(t,e)).then(e=>a.call(t,e));let r=i.call(t,e);return a.call(t,r)}:(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return z.lex(e,t??this.defaults)}parser(e,t){return H.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let o=i.hooks?i.hooks.provideLexer():e?z.lex:z.lexInline,s=i.hooks?i.hooks.provideParser():e?H.parse:H.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(e=>o(e,i)).then(e=>i.hooks?i.hooks.processAllTokens(e):e).then(e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then(()=>e):e).then(e=>s(e,i)).then(e=>i.hooks?i.hooks.postprocess(e):e).catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let e=o(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=s(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,e){let e=`

    An error occurred:

    `+N(n.message+``,!0)+`
    `;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function G(e,t){return W.parse(e,t)}e(G,`d`),G.options=G.setOptions=function(e){return W.setOptions(e),G.defaults=W.defaults,m(G.defaults),G},G.getDefaults=f,G.defaults=p,G.use=function(...e){return W.use(...e),G.defaults=W.defaults,m(G.defaults),G},G.walkTokens=function(e,t){return W.walkTokens(e,t)},G.parseInline=W.parseInline,G.Parser=H,G.parser=H.parse,G.Renderer=B,G.TextRenderer=V,G.Lexer=z,G.lexer=z.lex,G.Tokenizer=R,G.Hooks=U,G.parse=G,G.options,G.setOptions,G.use,G.walkTokens,G.parseInline,H.parse,z.lex;function We(e,{markdownAutoWrap:t}){return d(e.replace(//g,` +`).replace(/\n{2,}/g,` +`))}e(We,`preprocessMarkdown`);function Ge(e){return e.split(/\\n|\n|/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(e=>({content:e,type:`normal`}))??[])}e(Ge,`nonMarkdownToLines`);function Ke(t,n={}){let r=We(t,n),i=G.lexer(r),a=[[]],o=0;function s(e,t=`normal`){e.type===`text`?e.text.split(` +`).forEach((e,n)=>{n!==0&&(o++,a.push([])),e.split(` `).forEach(e=>{e=e.replace(/'/g,`'`),e&&a[o].push({content:e,type:t})})}):e.type===`strong`||e.type===`em`?e.tokens.forEach(t=>{s(t,e.type)}):e.type===`html`&&a[o].push({content:e.text,type:`normal`})}return e(s,`processNode`),i.forEach(e=>{e.type===`paragraph`?e.tokens?.forEach(e=>{s(e)}):e.type===`html`?a[o].push({content:e.text,type:`normal`}):a[o].push({content:e.raw,type:`normal`})}),a}e(Ke,`markdownToLines`);function qe(e){return e?`

    ${e.replace(/\\n|\n/g,`
    `)}

    `:``}e(qe,`nonMarkdownToHTML`);function Je(t,{markdownAutoWrap:r}={}){let i=G.lexer(t);function a(e){return e.type===`text`?r===!1?e.text.replace(/\n */g,`
    `).replace(/ /g,` `):e.text.replace(/\n */g,`
    `):e.type===`strong`?`${e.tokens?.map(a).join(``)}`:e.type===`em`?`${e.tokens?.map(a).join(``)}`:e.type===`paragraph`?`

    ${e.tokens?.map(a).join(``)}

    `:e.type===`space`?``:e.type===`html`?`${e.text}`:e.type===`escape`?e.text:(n.warn(`Unsupported markdown: ${e.type}`),e.raw)}return e(a,`output`),i.map(a).join(``)}e(Je,`markdownToHTML`);function K(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(e=>e.segment):[...e]}e(K,`splitTextToChars`);function Ye(e,t){return q(e,[],K(t.content),t.type)}e(Ye,`splitWordToFitWidth`);function q(e,t,n,r){if(n.length===0)return[{content:t.join(``),type:r},{content:``,type:r}];let[i,...a]=n,o=[...t,i];return e([{content:o.join(``),type:r}])?q(e,o,a,r):(t.length===0&&i&&(t.push(i),n.shift()),[{content:t.join(``),type:r},{content:n.join(``),type:r}])}e(q,`splitWordToFitWidthRecursion`);function Xe(e,t){if(e.some(({content:e})=>e.includes(` +`)))throw Error(`splitLineToFitWidth does not support newlines in the line`);return J(e,t)}e(Xe,`splitLineToFitWidth`);function J(e,t,n=[],r=[]){if(e.length===0)return r.length>0&&n.push(r),n.length>0?n:[];let i=``;e[0].content===` `&&(i=` `,e.shift());let a=e.shift()??{content:` `,type:`normal`},o=[...r];if(i!==``&&o.push({content:i,type:`normal`}),o.push(a),t(o))return J(e,t,n,o);if(r.length>0)n.push(r),e.unshift(a);else if(a.content){let[r,i]=Ye(t,a);n.push([r]),i.content&&e.unshift(i)}return J(e,t,n)}e(J,`splitLineToFitWidthRecursion`);function Y(e,t){t&&e.attr(`style`,t)}e(Y,`applyStyle`);var Ze=16384;async function Qe(e,t,n,c,l=!1,u=o()){let d=e.append(`foreignObject`);d.attr(`width`,`${Math.min(10*n,Ze)}px`),d.attr(`height`,`${Math.min(10*n,Ze)}px`);let f=d.append(`xhtml:div`),p=a(t.label)?await r(t.label.replace(s.lineBreakRegex,` +`),u):i(t.label,u),m=t.isNode?`nodeLabel`:`edgeLabel`,h=f.append(`span`);h.html(p),Y(h,t.labelStyle),h.attr(`class`,`${m} ${c}`),Y(f,t.labelStyle),f.style(`display`,`table-cell`),f.style(`white-space`,`nowrap`),f.style(`line-height`,`1.5`),n!==1/0&&(f.style(`max-width`,n+`px`),f.style(`text-align`,`center`)),f.attr(`xmlns`,`http://www.w3.org/1999/xhtml`),l&&f.attr(`class`,`labelBkg`);let g=f.node().getBoundingClientRect();return g.width===n&&(f.style(`display`,`table`),f.style(`white-space`,`break-spaces`),f.style(`width`,n+`px`),g=f.node().getBoundingClientRect()),d.node()}e(Qe,`addHtmlSpan`);function X(e,t,n,r=!1){let i=e.append(`tspan`).attr(`class`,`text-outer-tspan`).attr(`x`,0).attr(`y`,t*n-.1+`em`).attr(`dy`,n+`em`);return r&&i.attr(`text-anchor`,`middle`),i}e(X,`createTspan`);function $e(e,t,n){let r=e.append(`text`),i=X(r,1,t);Q(i,n);let a=i.node().getComputedTextLength();return r.remove(),a}e($e,`computeWidthOfText`);function et(e,t,n){let r=e.append(`text`),i=X(r,1,t);Q(i,[{content:n,type:`normal`}]);let a=i.node()?.getBoundingClientRect();return a&&r.remove(),a}e(et,`computeDimensionOfText`);function tt(t,n,r,i=!1,a=!1){let o=1.1,s=n.append(`g`),c=s.insert(`rect`).attr(`class`,`background`).attr(`style`,`stroke: none`),l=s.append(`text`).attr(`y`,`-10.1`);a&&l.attr(`text-anchor`,`middle`);let u=0;for(let n of r){let r=e(e=>$e(s,o,e)<=t,`checkWidth`),i=r(n)?[n]:Xe(n,r);for(let e of i)Q(X(l,u,o,a),e),u++}if(i){let e=l.node().getBBox();return c.attr(`x`,e.x-2).attr(`y`,e.y-2).attr(`width`,e.width+4).attr(`height`,e.height+4),s.node()}return l.node()}e(tt,`createFormattedText`);function Z(e){return e.replace(/&(amp|lt|gt);/g,(e,t)=>{switch(t){case`amp`:return`&`;case`lt`:return`<`;case`gt`:return`>`;default:return e}})}e(Z,`decodeHTMLEntities`);function Q(e,t){e.text(``),t.forEach((t,n)=>{let r=e.append(`tspan`).attr(`font-style`,t.type===`em`?`italic`:`normal`).attr(`class`,`text-inner-tspan`).attr(`font-weight`,t.type===`strong`?`bold`:`normal`);n===0?r.text(Z(t.content)):r.text(` `+Z(t.content))})}e(Q,`updateTextContentAndStyles`);async function $(e,t={}){let n=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,r,a)=>(n.push((async()=>{let n=`${r}:${a}`;return await l(n)?await u(n,void 0,{class:`label-icon`}):``})()),e));let r=await Promise.all(n);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??``)}e($,`replaceIconSubstring`);var nt=e(async(e,r=``,{style:i=``,isTitle:o=!1,classes:s=``,useHtmlLabels:l=!0,markdown:u=!0,isNode:d=!0,width:f=200,addSvgBackground:p=!1}={},m)=>{if(n.debug(`XYZ createText`,r,i,o,s,l,d,`addSvgBackground: `,p),l){let t=u?Je(r,m):qe(r),n=await $(c(t),m),o=r.replace(/\\\\/g,`\\`);return await Qe(e,{isNode:d,label:a(r)?o:n,labelStyle:i.replace(`fill:`,`color:`)},f,s,p,m)}{let n=c(r.replace(//g,`
    `)),a=tt(f,e,u?Ke(n.replace(`
    `,`
    `),m):Ge(n),r?p:!1,!d);if(d){/stroke:/.exec(i)&&(i=i.replace(`stroke:`,`lineColor:`));let e=i.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);t(a).attr(`style`,e)}else{let e=i.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/background:/g,`fill:`);t(a).select(`rect`).attr(`style`,e.replace(/background:/g,`fill:`));let n=i.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);t(a).select(`text`).attr(`style`,n)}return o?t(a).selectAll(`tspan.text-outer-tspan`).classed(`title-row`,!0):t(a).selectAll(`tspan.text-outer-tspan`).classed(`row`,!0),a}},`createText`);export{nt as n,d as r,et as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-43ACQNTO-CVHKukau.js b/lecture-01/assets/chunk-43ACQNTO-CVHKukau.js new file mode 100644 index 0000000000000000000000000000000000000000..273d40c3437491cabe2da376b19ef97429d74f7f --- /dev/null +++ b/lecture-01/assets/chunk-43ACQNTO-CVHKukau.js @@ -0,0 +1,2 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{C as t,S as n,g as r,n as i,o as a,t as o,u as s,w as c,x as l}from"./chunk-A7G5T7E5-C2HISlqa.js";var u=class extends o{static{e(this,`RailroadTokenBuilder`)}static{l(this,`RailroadTokenBuilder`)}constructor(){super([`railroad-beta`])}},d=l(e=>{let t=e.slice(1,-1),n=``;for(let e=0;enew u,`TokenBuilder`),ValueConverter:l(()=>new f,`ValueConverter`)}};function m(e=a){let i=c(t(e),s),o=c(n({shared:i}),r,p);return i.ServiceRegistry.register(o),{shared:i,Railroad:o}}e(m,`createRailroadServices`),l(m,`createRailroadServices`);export{m as n,p as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-4KMQCWFH-ClzK3uec.js b/lecture-01/assets/chunk-4KMQCWFH-ClzK3uec.js new file mode 100644 index 0000000000000000000000000000000000000000..92be3c803603a2eadec2b0e4687feb2eed35c75b --- /dev/null +++ b/lecture-01/assets/chunk-4KMQCWFH-ClzK3uec.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{C as t,S as n,n as r,o as i,t as a,u as o,v as s,w as c,x as l}from"./chunk-A7G5T7E5-C2HISlqa.js";var u=class extends r{static{e(this,`TreeViewValueConverter`)}static{l(this,`TreeViewValueConverter`)}runCustomConverter(e,t,n){if(e.name===`INDENTATION`)return t?.length||0;if(e.name===`QUOTED_NAME`)return t.substring(1,t.length-1);if(e.name===`BARE_NAME`)return t.replace(/[\t ]+$/,``);if(e.name===`CLASS_ANNOTATION`)return t.trim().substring(3).trim();if(e.name===`ICON_ANNOTATION`){let e=t.trim();return e.substring(5,e.length-1)}if(e.name===`DESC_ANNOTATION`)return t.trim().substring(2).trim()}},d=class extends a{static{e(this,`TreeViewTokenBuilder`)}static{l(this,`TreeViewTokenBuilder`)}constructor(){super([`treeView-beta`])}},f={parser:{TokenBuilder:l(()=>new d,`TokenBuilder`),ValueConverter:l(()=>new u,`ValueConverter`)}};function p(e=i){let r=c(t(e),o),a=c(n({shared:r}),s,f);return r.ServiceRegistry.register(a),{shared:r,TreeView:a}}e(p,`createTreeViewServices`),l(p,`createTreeViewServices`);export{p as n,f as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-6OZ7KPF7-CpRlDBGl.js b/lecture-01/assets/chunk-6OZ7KPF7-CpRlDBGl.js new file mode 100644 index 0000000000000000000000000000000000000000..5e81cad26574673bac01034a69123c3dd7b33139 --- /dev/null +++ b/lecture-01/assets/chunk-6OZ7KPF7-CpRlDBGl.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{C as t,S as n,i as r,l as i,o as a,t as o,u as s,w as c,x as l}from"./chunk-A7G5T7E5-C2HISlqa.js";var u=class extends o{static{e(this,`InfoTokenBuilder`)}static{l(this,`InfoTokenBuilder`)}constructor(){super([`info`,`showInfo`])}},d={parser:{TokenBuilder:l(()=>new u,`TokenBuilder`),ValueConverter:l(()=>new r,`ValueConverter`)}};function f(e=a){let r=c(t(e),s),o=c(n({shared:r}),i,d);return r.ServiceRegistry.register(o),{shared:r,Info:o}}e(f,`createInfoServices`),l(f,`createInfoServices`);export{f as n,d as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-6QIBY7DQ-xR0SR3RB.js b/lecture-01/assets/chunk-6QIBY7DQ-xR0SR3RB.js new file mode 100644 index 0000000000000000000000000000000000000000..373dee12b726ad41e36e2b8167c88b1bfcf2495a --- /dev/null +++ b/lecture-01/assets/chunk-6QIBY7DQ-xR0SR3RB.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{C as t,S as n,i as r,o as i,s as a,t as o,u as s,w as c,x as l}from"./chunk-A7G5T7E5-C2HISlqa.js";var u=class extends o{static{e(this,`EventModelingTokenBuilder`)}static{l(this,`EventModelingTokenBuilder`)}constructor(){super([`eventmodeling`])}},d=new Set([`cmd`,`command`]),f=new Set([`evt`,`event`]),p=new Set([`rmo`,`readmodel`]),m=new Set([`pcr`,`processor`]),h=new Set([`ui`]);function g(e){let t=e.validation.EventModelingValidator,n=e.validation.ValidationRegistry;if(n){let e={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};n.register(e,t)}}e(g,`registerValidationChecks`),l(g,`registerValidationChecks`);var _=class{static{e(this,`EventModelingValidator`)}static{l(this,`EventModelingValidator`)}checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(d.has(e.modelEntityType)?this.validateSources(e,new Set([...h,...m]),`command`,`ui or processor`,t):f.has(e.modelEntityType)?this.validateSources(e,d,`event`,`command`,t):p.has(e.modelEntityType)?this.validateSources(e,f,`read model`,`event`,t):m.has(e.modelEntityType)?this.validateSources(e,p,`processor`,`read model`,t):h.has(e.modelEntityType)&&this.validateSources(e,p,`ui`,`read model`,t))}validateSources(e,t,n,r,i){for(let a of e.sourceFrames){let o=a.ref;o!==void 0&&!t.has(o.modelEntityType)&&i(`error`,`A ${n} can only receive input from a ${r}, not from '${o.modelEntityType}'.`,{node:e,property:`sourceFrames`})}}},v={parser:{TokenBuilder:l(()=>new u,`TokenBuilder`),ValueConverter:l(()=>new r,`ValueConverter`)},validation:{EventModelingValidator:l(()=>new _,`EventModelingValidator`)}};function y(e=i){let r=c(t(e),s),o=c(n({shared:r}),a,v);return r.ServiceRegistry.register(o),g(o),{shared:r,EventModel:o}}e(y,`createEventModelingServices`),l(y,`createEventModelingServices`);export{y as n,v as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-6ZKBGPIT-B4RTUexp.js b/lecture-01/assets/chunk-6ZKBGPIT-B4RTUexp.js new file mode 100644 index 0000000000000000000000000000000000000000..b82805646480a32a7e7ab69334362d3d0d63d615 --- /dev/null +++ b/lecture-01/assets/chunk-6ZKBGPIT-B4RTUexp.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";function t(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}e(t,`populateCommonDb`);export{t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-A7G5T7E5-C2HISlqa.js b/lecture-01/assets/chunk-A7G5T7E5-C2HISlqa.js new file mode 100644 index 0000000000000000000000000000000000000000..a0895a72cff829c34b47d5f3d09292e75c81633b --- /dev/null +++ b/lecture-01/assets/chunk-A7G5T7E5-C2HISlqa.js @@ -0,0 +1,161 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=e((e,t)=>n(e,`name`,{value:t,configurable:!0}),`__name`),c=e((t,n)=>e(function(){return t&&(n=(0,t[i(t)[0]])(t=0)),n},`__init`),`__esm`),l=e((t,n)=>e(function(){return n||(0,t[i(t)[0]])((n={exports:{}}).exports,n),n.exports},`__require`),`__commonJS`),u=e((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},`__export`),d=e((t,a,s,c)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let l of i(a))!o.call(t,l)&&l!==s&&n(t,l,{get:e(()=>a[l],`get`),enumerable:!(c=r(a,l))||c.enumerable});return t},`__copyProps`),f=e((e,t,n)=>(d(e,t,`default`),n&&d(n,t,`default`)),`__reExport`),p=e((e,r,i)=>(i=e==null?{}:t(a(e)),d(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e)),`__toESM`),m=e(e=>d(n({},`__esModule`,{value:!0}),e),`__toCommonJS`),h={};u(h,{AnnotatedTextEdit:e(()=>E,`AnnotatedTextEdit`),ChangeAnnotation:e(()=>de,`ChangeAnnotation`),ChangeAnnotationIdentifier:e(()=>T,`ChangeAnnotationIdentifier`),CodeAction:e(()=>Ge,`CodeAction`),CodeActionContext:e(()=>We,`CodeActionContext`),CodeActionKind:e(()=>He,`CodeActionKind`),CodeActionTriggerKind:e(()=>Ue,`CodeActionTriggerKind`),CodeDescription:e(()=>se,`CodeDescription`),CodeLens:e(()=>Ke,`CodeLens`),Color:e(()=>C,`Color`),ColorInformation:e(()=>te,`ColorInformation`),ColorPresentation:e(()=>ne,`ColorPresentation`),Command:e(()=>le,`Command`),CompletionItem:e(()=>ke,`CompletionItem`),CompletionItemKind:e(()=>Ce,`CompletionItemKind`),CompletionItemLabelDetails:e(()=>Oe,`CompletionItemLabelDetails`),CompletionItemTag:e(()=>Te,`CompletionItemTag`),CompletionList:e(()=>Ae,`CompletionList`),CreateFile:e(()=>fe,`CreateFile`),DeleteFile:e(()=>pe,`DeleteFile`),Diagnostic:e(()=>ce,`Diagnostic`),DiagnosticRelatedInformation:e(()=>ie,`DiagnosticRelatedInformation`),DiagnosticSeverity:e(()=>ae,`DiagnosticSeverity`),DiagnosticTag:e(()=>oe,`DiagnosticTag`),DocumentHighlight:e(()=>Ie,`DocumentHighlight`),DocumentHighlightKind:e(()=>Fe,`DocumentHighlightKind`),DocumentLink:e(()=>Je,`DocumentLink`),DocumentSymbol:e(()=>Ve,`DocumentSymbol`),DocumentUri:e(()=>g,`DocumentUri`),EOL:e(()=>pt,`EOL`),FoldingRange:e(()=>re,`FoldingRange`),FoldingRangeKind:e(()=>w,`FoldingRangeKind`),FormattingOptions:e(()=>qe,`FormattingOptions`),Hover:e(()=>Me,`Hover`),InlayHint:e(()=>at,`InlayHint`),InlayHintKind:e(()=>rt,`InlayHintKind`),InlayHintLabelPart:e(()=>it,`InlayHintLabelPart`),InlineCompletionContext:e(()=>dt,`InlineCompletionContext`),InlineCompletionItem:e(()=>st,`InlineCompletionItem`),InlineCompletionList:e(()=>ct,`InlineCompletionList`),InlineCompletionTriggerKind:e(()=>lt,`InlineCompletionTriggerKind`),InlineValueContext:e(()=>nt,`InlineValueContext`),InlineValueEvaluatableExpression:e(()=>tt,`InlineValueEvaluatableExpression`),InlineValueText:e(()=>$e,`InlineValueText`),InlineValueVariableLookup:e(()=>et,`InlineValueVariableLookup`),InsertReplaceEdit:e(()=>Ee,`InsertReplaceEdit`),InsertTextFormat:e(()=>we,`InsertTextFormat`),InsertTextMode:e(()=>De,`InsertTextMode`),Location:e(()=>S,`Location`),LocationLink:e(()=>ee,`LocationLink`),MarkedString:e(()=>je,`MarkedString`),MarkupContent:e(()=>Se,`MarkupContent`),MarkupKind:e(()=>xe,`MarkupKind`),OptionalVersionedTextDocumentIdentifier:e(()=>ye,`OptionalVersionedTextDocumentIdentifier`),ParameterInformation:e(()=>Ne,`ParameterInformation`),Position:e(()=>b,`Position`),Range:e(()=>x,`Range`),RenameFile:e(()=>O,`RenameFile`),SelectedCompletionInfo:e(()=>ut,`SelectedCompletionInfo`),SelectionRange:e(()=>Ye,`SelectionRange`),SemanticTokenModifiers:e(()=>Ze,`SemanticTokenModifiers`),SemanticTokenTypes:e(()=>Xe,`SemanticTokenTypes`),SemanticTokens:e(()=>Qe,`SemanticTokens`),SignatureInformation:e(()=>Pe,`SignatureInformation`),StringValue:e(()=>ot,`StringValue`),SymbolInformation:e(()=>ze,`SymbolInformation`),SymbolKind:e(()=>Le,`SymbolKind`),SymbolTag:e(()=>Re,`SymbolTag`),TextDocument:e(()=>mt,`TextDocument`),TextDocumentEdit:e(()=>D,`TextDocumentEdit`),TextDocumentIdentifier:e(()=>_e,`TextDocumentIdentifier`),TextDocumentItem:e(()=>be,`TextDocumentItem`),TextEdit:e(()=>ue,`TextEdit`),URI:e(()=>_,`URI`),VersionedTextDocumentIdentifier:e(()=>ve,`VersionedTextDocumentIdentifier`),WorkspaceChange:e(()=>ge,`WorkspaceChange`),WorkspaceEdit:e(()=>k,`WorkspaceEdit`),WorkspaceFolder:e(()=>ft,`WorkspaceFolder`),WorkspaceSymbol:e(()=>Be,`WorkspaceSymbol`),integer:e(()=>v,`integer`),uinteger:e(()=>y,`uinteger`)});var g,_,v,y,b,x,S,ee,C,te,ne,w,re,ie,ae,oe,se,ce,le,ue,de,T,E,D,fe,O,pe,k,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,A,gt=c({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(t){function n(e){return typeof e==`string`}e(n,`is`),s(n,`is`),t.is=n})(g||={}),(function(t){function n(e){return typeof e==`string`}e(n,`is`),s(n,`is`),t.is=n})(_||={}),(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function n(e){return typeof e==`number`&&t.MIN_VALUE<=e&&e<=t.MAX_VALUE}e(n,`is`),s(n,`is`),t.is=n})(v||={}),(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function n(e){return typeof e==`number`&&t.MIN_VALUE<=e&&e<=t.MAX_VALUE}e(n,`is`),s(n,`is`),t.is=n})(y||={}),(function(t){function n(e,t){return e===Number.MAX_VALUE&&(e=y.MAX_VALUE),t===Number.MAX_VALUE&&(t=y.MAX_VALUE),{line:e,character:t}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.objectLiteral(t)&&A.uinteger(t.line)&&A.uinteger(t.character)}e(r,`is`),s(r,`is`),t.is=r})(b||={}),(function(t){function n(e,t,n,r){if(A.uinteger(e)&&A.uinteger(t)&&A.uinteger(n)&&A.uinteger(r))return{start:b.create(e,t),end:b.create(n,r)};if(b.is(e)&&b.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.objectLiteral(t)&&b.is(t.start)&&b.is(t.end)}e(r,`is`),s(r,`is`),t.is=r})(x||={}),(function(t){function n(e,t){return{uri:e,range:t}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.objectLiteral(t)&&x.is(t.range)&&(A.string(t.uri)||A.undefined(t.uri))}e(r,`is`),s(r,`is`),t.is=r})(S||={}),(function(t){function n(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.objectLiteral(t)&&x.is(t.targetRange)&&A.string(t.targetUri)&&x.is(t.targetSelectionRange)&&(x.is(t.originSelectionRange)||A.undefined(t.originSelectionRange))}e(r,`is`),s(r,`is`),t.is=r})(ee||={}),(function(t){function n(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.objectLiteral(t)&&A.numberRange(t.red,0,1)&&A.numberRange(t.green,0,1)&&A.numberRange(t.blue,0,1)&&A.numberRange(t.alpha,0,1)}e(r,`is`),s(r,`is`),t.is=r})(C||={}),(function(t){function n(e,t){return{range:e,color:t}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.objectLiteral(t)&&x.is(t.range)&&C.is(t.color)}e(r,`is`),s(r,`is`),t.is=r})(te||={}),(function(t){function n(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.objectLiteral(t)&&A.string(t.label)&&(A.undefined(t.textEdit)||ue.is(t))&&(A.undefined(t.additionalTextEdits)||A.typedArray(t.additionalTextEdits,ue.is))}e(r,`is`),s(r,`is`),t.is=r})(ne||={}),(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(w||={}),(function(t){function n(e,t,n,r,i,a){let o={startLine:e,endLine:t};return A.defined(n)&&(o.startCharacter=n),A.defined(r)&&(o.endCharacter=r),A.defined(i)&&(o.kind=i),A.defined(a)&&(o.collapsedText=a),o}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.objectLiteral(t)&&A.uinteger(t.startLine)&&A.uinteger(t.startLine)&&(A.undefined(t.startCharacter)||A.uinteger(t.startCharacter))&&(A.undefined(t.endCharacter)||A.uinteger(t.endCharacter))&&(A.undefined(t.kind)||A.string(t.kind))}e(r,`is`),s(r,`is`),t.is=r})(re||={}),(function(t){function n(e,t){return{location:e,message:t}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.defined(t)&&S.is(t.location)&&A.string(t.message)}e(r,`is`),s(r,`is`),t.is=r})(ie||={}),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(ae||={}),(function(e){e.Unnecessary=1,e.Deprecated=2})(oe||={}),(function(t){function n(e){let t=e;return A.objectLiteral(t)&&A.string(t.href)}e(n,`is`),s(n,`is`),t.is=n})(se||={}),(function(t){function n(e,t,n,r,i,a){let o={range:e,message:t};return A.defined(n)&&(o.severity=n),A.defined(r)&&(o.code=r),A.defined(i)&&(o.source=i),A.defined(a)&&(o.relatedInformation=a),o}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.defined(t)&&x.is(t.range)&&A.string(t.message)&&(A.number(t.severity)||A.undefined(t.severity))&&(A.integer(t.code)||A.string(t.code)||A.undefined(t.code))&&(A.undefined(t.codeDescription)||A.string(t.codeDescription?.href))&&(A.string(t.source)||A.undefined(t.source))&&(A.undefined(t.relatedInformation)||A.typedArray(t.relatedInformation,ie.is))}e(r,`is`),s(r,`is`),t.is=r})(ce||={}),(function(t){function n(e,t,...n){let r={title:e,command:t};return A.defined(n)&&n.length>0&&(r.arguments=n),r}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.defined(t)&&A.string(t.title)&&A.string(t.command)}e(r,`is`),s(r,`is`),t.is=r})(le||={}),(function(t){function n(e,t){return{range:e,newText:t}}e(n,`replace`),s(n,`replace`),t.replace=n;function r(e,t){return{range:{start:e,end:e},newText:t}}e(r,`insert`),s(r,`insert`),t.insert=r;function i(e){return{range:e,newText:``}}e(i,`del`),s(i,`del`),t.del=i;function a(e){let t=e;return A.objectLiteral(t)&&A.string(t.newText)&&x.is(t.range)}e(a,`is`),s(a,`is`),t.is=a})(ue||={}),(function(t){function n(e,t,n){let r={label:e};return t!==void 0&&(r.needsConfirmation=t),n!==void 0&&(r.description=n),r}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.objectLiteral(t)&&A.string(t.label)&&(A.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(A.string(t.description)||t.description===void 0)}e(r,`is`),s(r,`is`),t.is=r})(de||={}),(function(t){function n(e){let t=e;return A.string(t)}e(n,`is`),s(n,`is`),t.is=n})(T||={}),(function(t){function n(e,t,n){return{range:e,newText:t,annotationId:n}}e(n,`replace`),s(n,`replace`),t.replace=n;function r(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}e(r,`insert`),s(r,`insert`),t.insert=r;function i(e,t){return{range:e,newText:``,annotationId:t}}e(i,`del`),s(i,`del`),t.del=i;function a(e){let t=e;return ue.is(t)&&(de.is(t.annotationId)||T.is(t.annotationId))}e(a,`is`),s(a,`is`),t.is=a})(E||={}),(function(t){function n(e,t){return{textDocument:e,edits:t}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.defined(t)&&ye.is(t.textDocument)&&Array.isArray(t.edits)}e(r,`is`),s(r,`is`),t.is=r})(D||={}),(function(t){function n(e,t,n){let r={kind:`create`,uri:e};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return t&&t.kind===`create`&&A.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||A.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||A.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||T.is(t.annotationId))}e(r,`is`),s(r,`is`),t.is=r})(fe||={}),(function(t){function n(e,t,n,r){let i={kind:`rename`,oldUri:e,newUri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(i.options=n),r!==void 0&&(i.annotationId=r),i}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return t&&t.kind===`rename`&&A.string(t.oldUri)&&A.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||A.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||A.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||T.is(t.annotationId))}e(r,`is`),s(r,`is`),t.is=r})(O||={}),(function(t){function n(e,t,n){let r={kind:`delete`,uri:e};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return t&&t.kind===`delete`&&A.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||A.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||A.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||T.is(t.annotationId))}e(r,`is`),s(r,`is`),t.is=r})(pe||={}),(function(t){function n(e){let t=e;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(e=>A.string(e.kind)?fe.is(e)||O.is(e)||pe.is(e):D.is(e)))}e(n,`is`),s(n,`is`),t.is=n})(k||={}),me=class{static{e(this,`TextEditChangeImpl`)}static{s(this,`TextEditChangeImpl`)}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,i;if(n===void 0?r=ue.insert(e,t):T.is(n)?(i=n,r=E.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=E.insert(e,t,i)),this.edits.push(r),i!==void 0)return i}replace(e,t,n){let r,i;if(n===void 0?r=ue.replace(e,t):T.is(n)?(i=n,r=E.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=E.replace(e,t,i)),this.edits.push(r),i!==void 0)return i}delete(e,t){let n,r;if(t===void 0?n=ue.del(e):T.is(t)?(r=t,n=E.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=E.del(e,r)),this.edits.push(n),r!==void 0)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw Error(`Text edit change is not configured to manage change annotations.`)}},he=class{static{e(this,`ChangeAnnotations`)}static{s(this,`ChangeAnnotations`)}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(T.is(e)?n=e:(n=this.nextId(),t=e),this._annotations[n]!==void 0)throw Error(`Id ${n} is already in use.`);if(t===void 0)throw Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}},ge=class{static{e(this,`WorkspaceChange`)}static{s(this,`WorkspaceChange`)}constructor(e){this._textEditChanges=Object.create(null),e===void 0?this._workspaceEdit={}:(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new he(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(D.is(e)){let t=new me(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{let n=new me(e.changes[t]);this._textEditChanges[t]=n}))}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(ye.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let t={uri:e.uri,version:e.version},n=this._textEditChanges[t.uri];if(!n){let e=[],r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r),n=new me(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw Error(`Workspace edit is not configured for normal text edit changes.`);let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new me(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new he,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let r;de.is(t)||T.is(t)?r=t:n=t;let i,a;if(r===void 0?i=fe.create(e,n):(a=T.is(r)?r:this._changeAnnotations.manage(r),i=fe.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}renameFile(e,t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let i;de.is(n)||T.is(n)?i=n:r=n;let a,o;if(i===void 0?a=O.create(e,t,r):(o=T.is(i)?i:this._changeAnnotations.manage(i),a=O.create(e,t,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o}deleteFile(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let r;de.is(t)||T.is(t)?r=t:n=t;let i,a;if(r===void 0?i=pe.create(e,n):(a=T.is(r)?r:this._changeAnnotations.manage(r),i=pe.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}},(function(t){function n(e){return{uri:e}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.defined(t)&&A.string(t.uri)}e(r,`is`),s(r,`is`),t.is=r})(_e||={}),(function(t){function n(e,t){return{uri:e,version:t}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.defined(t)&&A.string(t.uri)&&A.integer(t.version)}e(r,`is`),s(r,`is`),t.is=r})(ve||={}),(function(t){function n(e,t){return{uri:e,version:t}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.defined(t)&&A.string(t.uri)&&(t.version===null||A.integer(t.version))}e(r,`is`),s(r,`is`),t.is=r})(ye||={}),(function(t){function n(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.defined(t)&&A.string(t.uri)&&A.string(t.languageId)&&A.integer(t.version)&&A.string(t.text)}e(r,`is`),s(r,`is`),t.is=r})(be||={}),(function(t){t.PlainText=`plaintext`,t.Markdown=`markdown`;function n(e){let n=e;return n===t.PlainText||n===t.Markdown}e(n,`is`),s(n,`is`),t.is=n})(xe||={}),(function(t){function n(e){let t=e;return A.objectLiteral(e)&&xe.is(t.kind)&&A.string(t.value)}e(n,`is`),s(n,`is`),t.is=n})(Se||={}),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Ce||={}),(function(e){e.PlainText=1,e.Snippet=2})(we||={}),(function(e){e.Deprecated=1})(Te||={}),(function(t){function n(e,t,n){return{newText:e,insert:t,replace:n}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return t&&A.string(t.newText)&&x.is(t.insert)&&x.is(t.replace)}e(r,`is`),s(r,`is`),t.is=r})(Ee||={}),(function(e){e.asIs=1,e.adjustIndentation=2})(De||={}),(function(t){function n(e){let t=e;return t&&(A.string(t.detail)||t.detail===void 0)&&(A.string(t.description)||t.description===void 0)}e(n,`is`),s(n,`is`),t.is=n})(Oe||={}),(function(t){function n(e){return{label:e}}e(n,`create`),s(n,`create`),t.create=n})(ke||={}),(function(t){function n(e,t){return{items:e||[],isIncomplete:!!t}}e(n,`create`),s(n,`create`),t.create=n})(Ae||={}),(function(t){function n(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}e(n,`fromPlainText`),s(n,`fromPlainText`),t.fromPlainText=n;function r(e){let t=e;return A.string(t)||A.objectLiteral(t)&&A.string(t.language)&&A.string(t.value)}e(r,`is`),s(r,`is`),t.is=r})(je||={}),(function(t){function n(e){let t=e;return!!t&&A.objectLiteral(t)&&(Se.is(t.contents)||je.is(t.contents)||A.typedArray(t.contents,je.is))&&(e.range===void 0||x.is(e.range))}e(n,`is`),s(n,`is`),t.is=n})(Me||={}),(function(t){function n(e,t){return t?{label:e,documentation:t}:{label:e}}e(n,`create`),s(n,`create`),t.create=n})(Ne||={}),(function(t){function n(e,t,...n){let r={label:e};return A.defined(t)&&(r.documentation=t),r.parameters=A.defined(n)?n:[],r}e(n,`create`),s(n,`create`),t.create=n})(Pe||={}),(function(e){e.Text=1,e.Read=2,e.Write=3})(Fe||={}),(function(t){function n(e,t){let n={range:e};return A.number(t)&&(n.kind=t),n}e(n,`create`),s(n,`create`),t.create=n})(Ie||={}),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Le||={}),(function(e){e.Deprecated=1})(Re||={}),(function(t){function n(e,t,n,r,i){let a={name:e,kind:t,location:{uri:r,range:n}};return i&&(a.containerName=i),a}e(n,`create`),s(n,`create`),t.create=n})(ze||={}),(function(t){function n(e,t,n,r){return r===void 0?{name:e,kind:t,location:{uri:n}}:{name:e,kind:t,location:{uri:n,range:r}}}e(n,`create`),s(n,`create`),t.create=n})(Be||={}),(function(t){function n(e,t,n,r,i,a){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return a!==void 0&&(o.children=a),o}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return t&&A.string(t.name)&&A.number(t.kind)&&x.is(t.range)&&x.is(t.selectionRange)&&(t.detail===void 0||A.string(t.detail))&&(t.deprecated===void 0||A.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e(r,`is`),s(r,`is`),t.is=r})(Ve||={}),(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`})(He||={}),(function(e){e.Invoked=1,e.Automatic=2})(Ue||={}),(function(t){function n(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.defined(t)&&A.typedArray(t.diagnostics,ce.is)&&(t.only===void 0||A.typedArray(t.only,A.string))&&(t.triggerKind===void 0||t.triggerKind===Ue.Invoked||t.triggerKind===Ue.Automatic)}e(r,`is`),s(r,`is`),t.is=r})(We||={}),(function(t){function n(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):le.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return t&&A.string(t.title)&&(t.diagnostics===void 0||A.typedArray(t.diagnostics,ce.is))&&(t.kind===void 0||A.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||le.is(t.command))&&(t.isPreferred===void 0||A.boolean(t.isPreferred))&&(t.edit===void 0||k.is(t.edit))}e(r,`is`),s(r,`is`),t.is=r})(Ge||={}),(function(t){function n(e,t){let n={range:e};return A.defined(t)&&(n.data=t),n}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.defined(t)&&x.is(t.range)&&(A.undefined(t.command)||le.is(t.command))}e(r,`is`),s(r,`is`),t.is=r})(Ke||={}),(function(t){function n(e,t){return{tabSize:e,insertSpaces:t}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.defined(t)&&A.uinteger(t.tabSize)&&A.boolean(t.insertSpaces)}e(r,`is`),s(r,`is`),t.is=r})(qe||={}),(function(t){function n(e,t,n){return{range:e,target:t,data:n}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.defined(t)&&x.is(t.range)&&(A.undefined(t.target)||A.string(t.target))}e(r,`is`),s(r,`is`),t.is=r})(Je||={}),(function(t){function n(e,t){return{range:e,parent:t}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let n=e;return A.objectLiteral(n)&&x.is(n.range)&&(n.parent===void 0||t.is(n.parent))}e(r,`is`),s(r,`is`),t.is=r})(Ye||={}),(function(e){e.namespace=`namespace`,e.type=`type`,e.class=`class`,e.enum=`enum`,e.interface=`interface`,e.struct=`struct`,e.typeParameter=`typeParameter`,e.parameter=`parameter`,e.variable=`variable`,e.property=`property`,e.enumMember=`enumMember`,e.event=`event`,e.function=`function`,e.method=`method`,e.macro=`macro`,e.keyword=`keyword`,e.modifier=`modifier`,e.comment=`comment`,e.string=`string`,e.number=`number`,e.regexp=`regexp`,e.operator=`operator`,e.decorator=`decorator`})(Xe||={}),(function(e){e.declaration=`declaration`,e.definition=`definition`,e.readonly=`readonly`,e.static=`static`,e.deprecated=`deprecated`,e.abstract=`abstract`,e.async=`async`,e.modification=`modification`,e.documentation=`documentation`,e.defaultLibrary=`defaultLibrary`})(Ze||={}),(function(t){function n(e){let t=e;return A.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}e(n,`is`),s(n,`is`),t.is=n})(Qe||={}),(function(t){function n(e,t){return{range:e,text:t}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return t!=null&&x.is(t.range)&&A.string(t.text)}e(r,`is`),s(r,`is`),t.is=r})($e||={}),(function(t){function n(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return t!=null&&x.is(t.range)&&A.boolean(t.caseSensitiveLookup)&&(A.string(t.variableName)||t.variableName===void 0)}e(r,`is`),s(r,`is`),t.is=r})(et||={}),(function(t){function n(e,t){return{range:e,expression:t}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return t!=null&&x.is(t.range)&&(A.string(t.expression)||t.expression===void 0)}e(r,`is`),s(r,`is`),t.is=r})(tt||={}),(function(t){function n(e,t){return{frameId:e,stoppedLocation:t}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.defined(t)&&x.is(e.stoppedLocation)}e(r,`is`),s(r,`is`),t.is=r})(nt||={}),(function(t){t.Type=1,t.Parameter=2;function n(e){return e===1||e===2}e(n,`is`),s(n,`is`),t.is=n})(rt||={}),(function(t){function n(e){return{value:e}}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.objectLiteral(t)&&(t.tooltip===void 0||A.string(t.tooltip)||Se.is(t.tooltip))&&(t.location===void 0||S.is(t.location))&&(t.command===void 0||le.is(t.command))}e(r,`is`),s(r,`is`),t.is=r})(it||={}),(function(t){function n(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return A.objectLiteral(t)&&b.is(t.position)&&(A.string(t.label)||A.typedArray(t.label,it.is))&&(t.kind===void 0||rt.is(t.kind))&&t.textEdits===void 0||A.typedArray(t.textEdits,ue.is)&&(t.tooltip===void 0||A.string(t.tooltip)||Se.is(t.tooltip))&&(t.paddingLeft===void 0||A.boolean(t.paddingLeft))&&(t.paddingRight===void 0||A.boolean(t.paddingRight))}e(r,`is`),s(r,`is`),t.is=r})(at||={}),(function(t){function n(e){return{kind:`snippet`,value:e}}e(n,`createSnippet`),s(n,`createSnippet`),t.createSnippet=n})(ot||={}),(function(t){function n(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e(n,`create`),s(n,`create`),t.create=n})(st||={}),(function(t){function n(e){return{items:e}}e(n,`create`),s(n,`create`),t.create=n})(ct||={}),(function(e){e.Invoked=0,e.Automatic=1})(lt||={}),(function(t){function n(e,t){return{range:e,text:t}}e(n,`create`),s(n,`create`),t.create=n})(ut||={}),(function(t){function n(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e(n,`create`),s(n,`create`),t.create=n})(dt||={}),(function(t){function n(e){let t=e;return A.objectLiteral(t)&&_.is(t.uri)&&A.string(t.name)}e(n,`is`),s(n,`is`),t.is=n})(ft||={}),pt=[` +`,`\r +`,`\r`],(function(t){function n(e,t,n,r){return new ht(e,t,n,r)}e(n,`create`),s(n,`create`),t.create=n;function r(e){let t=e;return!!(A.defined(t)&&A.string(t.uri)&&(A.undefined(t.languageId)||A.string(t.languageId))&&A.uinteger(t.lineCount)&&A.func(t.getText)&&A.func(t.positionAt)&&A.func(t.offsetAt))}e(r,`is`),s(r,`is`),t.is=r;function i(e,t){let n=e.getText(),r=a(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),i=n.length;for(let t=r.length-1;t>=0;t--){let a=r[t],o=e.offsetAt(a.range.start),s=e.offsetAt(a.range.end);if(s<=i)n=n.substring(0,o)+a.newText+n.substring(s,n.length);else throw Error(`Overlapping edit`);i=o}return n}e(i,`applyEdits`),s(i,`applyEdits`),t.applyEdits=i;function a(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);a(r,t),a(i,t);let o=0,s=0,c=0;for(;o0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return b.create(0,e);for(;ne?r=i:n=i+1}let i=n-1;return b.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1r(e))}e(l,`stringArray`),s(l,`stringArray`),t.stringArray=l}}),yt=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;var n=_t(),r;(function(e){let t={dispose(){}};e.None=function(){return t}})(r||(t.Event=r={}));var i=class{static{e(this,`CallbackList`)}static{s(this,`CallbackList`)}add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:s(()=>this.remove(e,t),`dispose`)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r{this._callbacks||=new i,this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,n);let a={dispose:s(()=>{this._callbacks&&(this._callbacks.remove(e,n),a.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},`dispose`)};return Array.isArray(r)&&r.push(a),a},this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&=(this._callbacks.dispose(),void 0)}};t.Emitter=a,a._noop=function(){}}}),bt=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var n=_t(),r=vt(),i=yt(),a;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i.Event.None});function n(e){let n=e;return n&&(n===t.None||n===t.Cancelled||r.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}e(n,`is`),s(n,`is`),t.is=n})(a||(t.CancellationToken=a={}));var o=Object.freeze(function(e,t){let r=(0,n.default)().timer.setTimeout(e.bind(t),0);return{dispose(){r.dispose()}}}),c=class{static{e(this,`MutableToken`)}static{s(this,`MutableToken`)}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||=new i.Emitter,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),void 0)}};t.CancellationTokenSource=class{static{e(this,`CancellationTokenSource3`)}static{s(this,`CancellationTokenSource`)}get token(){return this._token||=new c,this._token}cancel(){this._token?this._token.cancel():this._token=a.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=a.None}}}}),xt=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;var n=vt(),r;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(r||(t.ErrorCodes=r={})),t.ResponseError=class t extends Error{static{e(this,`_ResponseError`)}static{s(this,`ResponseError`)}constructor(e,i,a){super(i),this.code=n.number(e)?e:r.UnknownErrorCode,this.data=a,Object.setPrototypeOf(this,t.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};var i=class t{static{e(this,`_ParameterStructures`)}static{s(this,`ParameterStructures`)}constructor(e){this.kind=e}static is(e){return e===t.auto||e===t.byName||e===t.byPosition}toString(){return this.kind}};t.ParameterStructures=i,i.auto=new i(`auto`),i.byPosition=new i(`byPosition`),i.byName=new i(`byName`);var a=class{static{e(this,`AbstractMessageSignature`)}static{s(this,`AbstractMessageSignature`)}constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return i.auto}};t.AbstractMessageSignature=a,t.RequestType0=class extends a{static{e(this,`RequestType0`)}static{s(this,`RequestType0`)}constructor(e){super(e,0)}},t.RequestType=class extends a{static{e(this,`RequestType`)}static{s(this,`RequestType`)}constructor(e,t=i.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends a{static{e(this,`RequestType1`)}static{s(this,`RequestType1`)}constructor(e,t=i.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends a{static{e(this,`RequestType2`)}static{s(this,`RequestType2`)}constructor(e){super(e,2)}},t.RequestType3=class extends a{static{e(this,`RequestType3`)}static{s(this,`RequestType3`)}constructor(e){super(e,3)}},t.RequestType4=class extends a{static{e(this,`RequestType4`)}static{s(this,`RequestType4`)}constructor(e){super(e,4)}},t.RequestType5=class extends a{static{e(this,`RequestType5`)}static{s(this,`RequestType5`)}constructor(e){super(e,5)}},t.RequestType6=class extends a{static{e(this,`RequestType6`)}static{s(this,`RequestType6`)}constructor(e){super(e,6)}},t.RequestType7=class extends a{static{e(this,`RequestType7`)}static{s(this,`RequestType7`)}constructor(e){super(e,7)}},t.RequestType8=class extends a{static{e(this,`RequestType8`)}static{s(this,`RequestType8`)}constructor(e){super(e,8)}},t.RequestType9=class extends a{static{e(this,`RequestType9`)}static{s(this,`RequestType9`)}constructor(e){super(e,9)}},t.NotificationType=class extends a{static{e(this,`NotificationType`)}static{s(this,`NotificationType`)}constructor(e,t=i.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends a{static{e(this,`NotificationType0`)}static{s(this,`NotificationType0`)}constructor(e){super(e,0)}},t.NotificationType1=class extends a{static{e(this,`NotificationType1`)}static{s(this,`NotificationType1`)}constructor(e,t=i.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends a{static{e(this,`NotificationType2`)}static{s(this,`NotificationType2`)}constructor(e){super(e,2)}},t.NotificationType3=class extends a{static{e(this,`NotificationType3`)}static{s(this,`NotificationType3`)}constructor(e){super(e,3)}},t.NotificationType4=class extends a{static{e(this,`NotificationType4`)}static{s(this,`NotificationType4`)}constructor(e){super(e,4)}},t.NotificationType5=class extends a{static{e(this,`NotificationType5`)}static{s(this,`NotificationType5`)}constructor(e){super(e,5)}},t.NotificationType6=class extends a{static{e(this,`NotificationType6`)}static{s(this,`NotificationType6`)}constructor(e){super(e,6)}},t.NotificationType7=class extends a{static{e(this,`NotificationType7`)}static{s(this,`NotificationType7`)}constructor(e){super(e,7)}},t.NotificationType8=class extends a{static{e(this,`NotificationType8`)}static{s(this,`NotificationType8`)}constructor(e){super(e,8)}},t.NotificationType9=class extends a{static{e(this,`NotificationType9`)}static{s(this,`NotificationType9`)}constructor(e){super(e,9)}};var o;(function(t){function r(e){let t=e;return t&&n.string(t.method)&&(n.string(t.id)||n.number(t.id))}e(r,`isRequest`),s(r,`isRequest`),t.isRequest=r;function i(e){let t=e;return t&&n.string(t.method)&&e.id===void 0}e(i,`isNotification`),s(i,`isNotification`),t.isNotification=i;function a(e){let t=e;return t&&(t.result!==void 0||!!t.error)&&(n.string(t.id)||n.number(t.id)||t.id===null)}e(a,`isResponse`),s(a,`isResponse`),t.isResponse=a})(o||(t.Message=o={}))}}),St=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0;var r;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(r||(t.Touch=r={}));var i=class{static{e(this,`LinkedMap`)}static{s(this,`LinkedMap`)}constructor(){this[n]=`LinkedMap`,this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=r.None){let n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let i=this._map.get(e);if(i)i.value=t,n!==r.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(i);break;case r.First:this.addItemFirst(i);break;case r.Last:this.addItemLast(i);break;default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error(`Invalid list`);let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._state,r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw Error(`LinkedMap got modified during iteration.`);r=r.next}}keys(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:s(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}},`next`)};return n}values(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:s(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}},`next`)};return n}entries(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:s(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}},`next`)};return n}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw Error(`Invalid list`);this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw Error(`Invalid list`);this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw Error(`Invalid list`);e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw Error(`Invalid list`);e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,n=e.previous;if(!t||!n)throw Error(`Invalid list`);t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw Error(`Invalid list`);if(t===r.First||t===r.Last){if(t===r.First){if(e===this._head)return;let t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===r.Last){if(e===this._tail)return;let t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(let[t,n]of e)this.set(t,n)}};t.LinkedMap=i,t.LRUCache=class extends i{static{e(this,`LRUCache`)}static{s(this,`LRUCache`)}constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}}}),Ct=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0;var n;(function(t){function n(e){return{dispose:e}}e(n,`create`),s(n,`create`),t.create=n})(n||(t.Disposable=n={}))}}),wt=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;var n=bt(),r;(function(e){e.Continue=0,e.Cancelled=1})(r||={}),t.SharedArraySenderStrategy=class{static{e(this,`SharedArraySenderStrategy`)}static{s(this,`SharedArraySenderStrategy`)}constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),n=new Int32Array(t,0,1);n[0]=r.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let n=this.buffers.get(t);if(n===void 0)return;let i=new Int32Array(n,0,1);Atomics.store(i,0,r.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};var i=class{static{e(this,`SharedArrayBufferCancellationToken`)}static{s(this,`SharedArrayBufferCancellationToken`)}constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`)}},a=class{static{e(this,`SharedArrayBufferCancellationTokenSource`)}static{s(this,`SharedArrayBufferCancellationTokenSource`)}constructor(e){this.token=new i(e)}cancel(){}dispose(){}};t.SharedArrayReceiverStrategy=class{static{e(this,`SharedArrayReceiverStrategy`)}static{s(this,`SharedArrayReceiverStrategy`)}constructor(){this.kind=`request`}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new n.CancellationTokenSource:new a(t)}}}}),Tt=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;var n=_t();t.Semaphore=class{static{e(this,`Semaphore`)}static{s(this,`Semaphore`)}constructor(e=1){if(e<=0)throw Error(`Capacity must be greater than 0`);this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length!==0&&this._active!==this._capacity&&(0,n.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error(`To many thunks active`);try{let t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}}}),Et=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;var n=_t(),r=vt(),i=yt(),a=Tt(),o;(function(t){function n(e){let t=e;return t&&r.func(t.listen)&&r.func(t.dispose)&&r.func(t.onError)&&r.func(t.onClose)&&r.func(t.onPartialMessage)}e(n,`is`),s(n,`is`),t.is=n})(o||(t.MessageReader=o={}));var c=class{static{e(this,`AbstractMessageReader`)}static{s(this,`AbstractMessageReader`)}constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter,this.partialMessageEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:Error(`Reader received error. Reason: ${r.string(e.message)?e.message:`unknown`}`)}};t.AbstractMessageReader=c;var l;(function(t){function r(e){let t,r,i=new Map,a,o=new Map;if(e===void 0||typeof e==`string`)t=e??`utf-8`;else{if(t=e.charset??`utf-8`,e.contentDecoder!==void 0&&(r=e.contentDecoder,i.set(r.name,r)),e.contentDecoders!==void 0)for(let t of e.contentDecoders)i.set(t.name,t);if(e.contentTypeDecoder!==void 0&&(a=e.contentTypeDecoder,o.set(a.name,a)),e.contentTypeDecoders!==void 0)for(let t of e.contentTypeDecoders)o.set(t.name,t)}return a===void 0&&(a=(0,n.default)().applicationJson.decoder,o.set(a.name,a)),{charset:t,contentDecoder:r,contentDecoders:i,contentTypeDecoder:a,contentTypeDecoders:o}}e(r,`fromOptions`),s(r,`fromOptions`),t.fromOptions=r})(l||={}),t.ReadableStreamMessageReader=class extends c{static{e(this,`ReadableStreamMessageReader`)}static{s(this,`ReadableStreamMessageReader`)}constructor(e,t){super(),this.readable=e,this.options=l.fromOptions(t),this.buffer=(0,n.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new a.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let e=this.buffer.tryReadHeaders(!0);if(!e)return;let t=e.get(`content-length`);if(!t){this.fireError(Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(e))}`));return}let n=parseInt(t);if(isNaN(n)){this.fireError(Error(`Content-Length value must be a number. Got ${t}`));return}this.nextMessageLength=n}let e=this.buffer.tryReadBody(this.nextMessageLength);if(e===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let t=this.options.contentDecoder===void 0?e:await this.options.contentDecoder.decode(e),n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&=(this.partialMessageTimer.dispose(),void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,n.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}}}),Dt=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;var n=_t(),r=vt(),i=Tt(),a=yt(),o=`Content-Length: `,c=`\r +`,l;(function(t){function n(e){let t=e;return t&&r.func(t.dispose)&&r.func(t.onClose)&&r.func(t.onError)&&r.func(t.write)}e(n,`is`),s(n,`is`),t.is=n})(l||(t.MessageWriter=l={}));var u=class{static{e(this,`AbstractMessageWriter`)}static{s(this,`AbstractMessageWriter`)}constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:Error(`Writer received error. Reason: ${r.string(e.message)?e.message:`unknown`}`)}};t.AbstractMessageWriter=u;var d;(function(t){function r(e){return e===void 0||typeof e==`string`?{charset:e??`utf-8`,contentTypeEncoder:(0,n.default)().applicationJson.encoder}:{charset:e.charset??`utf-8`,contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,n.default)().applicationJson.encoder}}e(r,`fromOptions`),s(r,`fromOptions`),t.fromOptions=r})(d||={}),t.WriteableStreamMessageWriter=class extends u{static{e(this,`WriteableStreamMessageWriter`)}static{s(this,`WriteableStreamMessageWriter`)}constructor(e,t){super(),this.writable=e,this.options=d.fromOptions(t),this.errorCount=0,this.writeSemaphore=new i.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>this.options.contentEncoder===void 0?e:this.options.contentEncoder.encode(e)).then(t=>{let n=[];return n.push(o,t.byteLength.toString(),c),n.push(c),this.doWrite(e,n,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,n){try{return await this.writable.write(t.join(``),`ascii`),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}}}),Ot=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0;var n=13,r=10,i=`\r +`;t.AbstractMessageBuffer=class{static{e(this,`AbstractMessageBuffer`)}static{s(this,`AbstractMessageBuffer`)}constructor(e=`utf-8`){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e==`string`?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let t=0,a=0,o=0,s=0;row:for(;athis._totalLength)throw Error(`Cannot read so many bytes!`);if(this._chunks[0].byteLength===e){let t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){let t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}let t=this.allocNative(e),n=0;for(;e>0;){let r=this._chunks[0];if(r.byteLength>e){let i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}}}),kt=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;var n=_t(),r=vt(),i=xt(),a=St(),o=yt(),c=bt(),l;(function(e){e.type=new i.NotificationType(`$/cancelRequest`)})(l||={});var u;(function(t){function n(e){return typeof e==`string`||typeof e==`number`}e(n,`is`),s(n,`is`),t.is=n})(u||(t.ProgressToken=u={}));var d;(function(e){e.type=new i.NotificationType(`$/progress`)})(d||={}),t.ProgressType=class{static{e(this,`ProgressType`)}static{s(this,`ProgressType`)}constructor(){}};var f;(function(t){function n(e){return r.func(e)}e(n,`is`),s(n,`is`),t.is=n})(f||={}),t.NullLogger=Object.freeze({error:s(()=>{},`error`),warn:s(()=>{},`warn`),info:s(()=>{},`info`),log:s(()=>{},`log`)});var p;(function(e){e[e.Off=0]=`Off`,e[e.Messages=1]=`Messages`,e[e.Compact=2]=`Compact`,e[e.Verbose=3]=`Verbose`})(p||(t.Trace=p={}));var m;(function(e){e.Off=`off`,e.Messages=`messages`,e.Compact=`compact`,e.Verbose=`verbose`})(m||(t.TraceValues=m={})),(function(t){function n(e){if(!r.string(e))return t.Off;switch(e=e.toLowerCase(),e){case`off`:return t.Off;case`messages`:return t.Messages;case`compact`:return t.Compact;case`verbose`:return t.Verbose;default:return t.Off}}e(n,`fromString`),s(n,`fromString`),t.fromString=n;function i(e){switch(e){case t.Off:return`off`;case t.Messages:return`messages`;case t.Compact:return`compact`;case t.Verbose:return`verbose`;default:return`off`}}e(i,`toString4`),s(i,`toString`),t.toString=i})(p||(t.Trace=p={}));var h;(function(e){e.Text=`text`,e.JSON=`json`})(h||(t.TraceFormat=h={})),(function(t){function n(e){return r.string(e)?(e=e.toLowerCase(),e===`json`?t.JSON:t.Text):t.Text}e(n,`fromString`),s(n,`fromString`),t.fromString=n})(h||(t.TraceFormat=h={}));var g;(function(e){e.type=new i.NotificationType(`$/setTrace`)})(g||(t.SetTraceNotification=g={}));var _;(function(e){e.type=new i.NotificationType(`$/logTrace`)})(_||(t.LogTraceNotification=_={}));var v;(function(e){e[e.Closed=1]=`Closed`,e[e.Disposed=2]=`Disposed`,e[e.AlreadyListening=3]=`AlreadyListening`})(v||(t.ConnectionErrors=v={}));var y=class t extends Error{static{e(this,`_ConnectionError`)}static{s(this,`ConnectionError`)}constructor(e,n){super(n),this.code=e,Object.setPrototypeOf(this,t.prototype)}};t.ConnectionError=y;var b;(function(t){function n(e){let t=e;return t&&r.func(t.cancelUndispatched)}e(n,`is`),s(n,`is`),t.is=n})(b||(t.ConnectionStrategy=b={}));var x;(function(t){function n(e){let t=e;return t&&(t.kind===void 0||t.kind===`id`)&&r.func(t.createCancellationTokenSource)&&(t.dispose===void 0||r.func(t.dispose))}e(n,`is`),s(n,`is`),t.is=n})(x||(t.IdCancellationReceiverStrategy=x={}));var S;(function(t){function n(e){let t=e;return t&&t.kind===`request`&&r.func(t.createCancellationTokenSource)&&(t.dispose===void 0||r.func(t.dispose))}e(n,`is`),s(n,`is`),t.is=n})(S||(t.RequestCancellationReceiverStrategy=S={}));var ee;(function(t){t.Message=Object.freeze({createCancellationTokenSource(e){return new c.CancellationTokenSource}});function n(e){return x.is(e)||S.is(e)}e(n,`is`),s(n,`is`),t.is=n})(ee||(t.CancellationReceiverStrategy=ee={}));var C;(function(t){t.Message=Object.freeze({sendCancellation(e,t){return e.sendNotification(l.type,{id:t})},cleanup(e){}});function n(e){let t=e;return t&&r.func(t.sendCancellation)&&r.func(t.cleanup)}e(n,`is`),s(n,`is`),t.is=n})(C||(t.CancellationSenderStrategy=C={}));var te;(function(t){t.Message=Object.freeze({receiver:ee.Message,sender:C.Message});function n(e){let t=e;return t&&ee.is(t.receiver)&&C.is(t.sender)}e(n,`is`),s(n,`is`),t.is=n})(te||(t.CancellationStrategy=te={}));var ne;(function(t){function n(e){let t=e;return t&&r.func(t.handleMessage)}e(n,`is`),s(n,`is`),t.is=n})(ne||(t.MessageStrategy=ne={}));var w;(function(t){function n(e){let t=e;return t&&(te.is(t.cancellationStrategy)||b.is(t.connectionStrategy)||ne.is(t.messageStrategy))}e(n,`is`),s(n,`is`),t.is=n})(w||(t.ConnectionOptions=w={}));var re;(function(e){e[e.New=1]=`New`,e[e.Listening=2]=`Listening`,e[e.Closed=3]=`Closed`,e[e.Disposed=4]=`Disposed`})(re||={});function ie(m,b,S,ee){let C=S===void 0?t.NullLogger:S,w=0,ie=0,ae=0,oe,se=new Map,ce,le=new Map,ue=new Map,de,T=new a.LinkedMap,E=new Map,D=new Set,fe=new Map,O=p.Off,pe=h.Text,k,me=re.New,he=new o.Emitter,ge=new o.Emitter,_e=new o.Emitter,ve=new o.Emitter,ye=new o.Emitter,be=ee&&ee.cancellationStrategy?ee.cancellationStrategy:te.Message;function xe(e){if(e===null)throw Error(`Can't send requests with id null since the response can't be correlated.`);return`req-`+e.toString()}e(xe,`createRequestQueueKey`),s(xe,`createRequestQueueKey`);function Se(e){return e===null?`res-unknown-`+(++ae).toString():`res-`+e.toString()}e(Se,`createResponseQueueKey`),s(Se,`createResponseQueueKey`);function Ce(){return`not-`+(++ie).toString()}e(Ce,`createNotificationQueueKey`),s(Ce,`createNotificationQueueKey`);function we(e,t){i.Message.isRequest(t)?e.set(xe(t.id),t):i.Message.isResponse(t)?e.set(Se(t.id),t):e.set(Ce(),t)}e(we,`addMessageToQueue`),s(we,`addMessageToQueue`);function Te(e){}e(Te,`cancelUndispatched`),s(Te,`cancelUndispatched`);function Ee(){return me===re.Listening}e(Ee,`isListening`),s(Ee,`isListening`);function De(){return me===re.Closed}e(De,`isClosed`),s(De,`isClosed`);function Oe(){return me===re.Disposed}e(Oe,`isDisposed`),s(Oe,`isDisposed`);function ke(){(me===re.New||me===re.Listening)&&(me=re.Closed,ge.fire(void 0))}e(ke,`closeHandler`),s(ke,`closeHandler`);function Ae(e){he.fire([e,void 0,void 0])}e(Ae,`readErrorHandler`),s(Ae,`readErrorHandler`);function je(e){he.fire(e)}e(je,`writeErrorHandler`),s(je,`writeErrorHandler`),m.onClose(ke),m.onError(Ae),b.onClose(ke),b.onError(je);function Me(){de||T.size===0||(de=(0,n.default)().timer.setImmediate(()=>{de=void 0,Pe()}))}e(Me,`triggerMessageQueue`),s(Me,`triggerMessageQueue`);function Ne(e){i.Message.isRequest(e)?Ie(e):i.Message.isNotification(e)?Re(e):i.Message.isResponse(e)?Le(e):ze(e)}e(Ne,`handleMessage`),s(Ne,`handleMessage`);function Pe(){if(T.size===0)return;let e=T.shift();try{let t=ee?.messageStrategy;ne.is(t)?t.handleMessage(e,Ne):Ne(e)}finally{Me()}}e(Pe,`processMessageQueue`),s(Pe,`processMessageQueue`);let Fe=s(e=>{try{if(i.Message.isNotification(e)&&e.method===l.type.method){let t=e.params.id,n=xe(t),r=T.get(n);if(i.Message.isRequest(r)){let i=ee?.connectionStrategy,a=i&&i.cancelUndispatched?i.cancelUndispatched(r,Te):void 0;if(a&&(a.error!==void 0||a.result!==void 0)){T.delete(n),fe.delete(t),a.id=r.id,Ue(a,e.method,Date.now()),b.write(a).catch(()=>C.error(`Sending response for canceled message failed.`));return}}let a=fe.get(t);if(a!==void 0){a.cancel(),Ge(e);return}D.add(t)}we(T,e)}finally{Me()}},`callback`);function Ie(t){if(Oe())return;function n(e,n,r){let a={jsonrpc:`2.0`,id:t.id};e instanceof i.ResponseError?a.error=e.toJson():a.result=e===void 0?null:e,Ue(a,n,r),b.write(a).catch(()=>C.error(`Sending response failed.`))}e(n,`reply`),s(n,`reply`);function a(e,n,r){let i={jsonrpc:`2.0`,id:t.id,error:e.toJson()};Ue(i,n,r),b.write(i).catch(()=>C.error(`Sending response failed.`))}e(a,`replyError`),s(a,`replyError`);function o(e,n,r){e===void 0&&(e=null);let i={jsonrpc:`2.0`,id:t.id,result:e};Ue(i,n,r),b.write(i).catch(()=>C.error(`Sending response failed.`))}e(o,`replySuccess`),s(o,`replySuccess`),We(t);let c=se.get(t.method),l,u;c&&(l=c.type,u=c.handler);let d=Date.now();if(u||oe){let e=t.id??String(Date.now()),s=x.is(be.receiver)?be.receiver.createCancellationTokenSource(e):be.receiver.createCancellationTokenSource(t);t.id!==null&&D.has(t.id)&&s.cancel(),t.id!==null&&fe.set(e,s);try{let c;if(u){if(t.params===void 0){if(l!==void 0&&l.numberOfParams!==0){a(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${t.method} defines ${l.numberOfParams} params but received none.`),t.method,d);return}c=u(s.token)}else if(Array.isArray(t.params)){if(l!==void 0&&l.parameterStructures===i.ParameterStructures.byName){a(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${t.method} defines parameters by name but received parameters by position`),t.method,d);return}c=u(...t.params,s.token)}else{if(l!==void 0&&l.parameterStructures===i.ParameterStructures.byPosition){a(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${t.method} defines parameters by position but received parameters by name`),t.method,d);return}c=u(t.params,s.token)}}else oe&&(c=oe(t.method,t.params,s.token));let f=c;c?f.then?f.then(r=>{fe.delete(e),n(r,t.method,d)},n=>{fe.delete(e),n instanceof i.ResponseError?a(n,t.method,d):n&&r.string(n.message)?a(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${t.method} failed with message: ${n.message}`),t.method,d):a(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${t.method} failed unexpectedly without providing any details.`),t.method,d)}):(fe.delete(e),n(c,t.method,d)):(fe.delete(e),o(c,t.method,d))}catch(o){fe.delete(e),o instanceof i.ResponseError?n(o,t.method,d):o&&r.string(o.message)?a(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${t.method} failed with message: ${o.message}`),t.method,d):a(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${t.method} failed unexpectedly without providing any details.`),t.method,d)}}else a(new i.ResponseError(i.ErrorCodes.MethodNotFound,`Unhandled method ${t.method}`),t.method,d)}e(Ie,`handleRequest`),s(Ie,`handleRequest`);function Le(e){if(!Oe()){if(e.id===null)e.error?C.error(`Received response message without id: Error is: +${JSON.stringify(e.error,void 0,4)}`):C.error(`Received response message without id. No further error information provided.`);else{let t=e.id,n=E.get(t);if(Ke(e,n),n!==void 0){E.delete(t);try{if(e.error){let t=e.error;n.reject(new i.ResponseError(t.code,t.message,t.data))}else if(e.result!==void 0)n.resolve(e.result);else throw Error(`Should never happen.`)}catch(e){e.message?C.error(`Response handler '${n.method}' failed with message: ${e.message}`):C.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}}e(Le,`handleResponse`),s(Le,`handleResponse`);function Re(e){if(Oe())return;let t,n;if(e.method===l.type.method){let t=e.params.id;D.delete(t),Ge(e);return}{let r=le.get(e.method);r&&(n=r.handler,t=r.type)}if(n||ce)try{if(Ge(e),n){if(e.params===void 0)t!==void 0&&t.numberOfParams!==0&&t.parameterStructures!==i.ParameterStructures.byName&&C.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){let r=e.params;e.method===d.type.method&&r.length===2&&u.is(r[0])?n({token:r[0],value:r[1]}):(t!==void 0&&(t.parameterStructures===i.ParameterStructures.byName&&C.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&C.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${r.length} arguments`)),n(...r))}else t!==void 0&&t.parameterStructures===i.ParameterStructures.byPosition&&C.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params)}else ce&&ce(e.method,e.params)}catch(t){t.message?C.error(`Notification handler '${e.method}' failed with message: ${t.message}`):C.error(`Notification handler '${e.method}' failed unexpectedly.`)}else _e.fire(e)}e(Re,`handleNotification`),s(Re,`handleNotification`);function ze(e){if(!e){C.error(`Received empty message.`);return}C.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(e,null,4)}`);let t=e;if(r.string(t.id)||r.number(t.id)){let e=t.id,n=E.get(e);n&&n.reject(Error(`The received response has neither a result nor an error property.`))}}e(ze,`handleInvalidMessage`),s(ze,`handleInvalidMessage`);function Be(e){if(e!=null)switch(O){case p.Verbose:return JSON.stringify(e,null,4);case p.Compact:return JSON.stringify(e);default:return}}e(Be,`stringifyTrace`),s(Be,`stringifyTrace`);function Ve(e){if(!(O===p.Off||!k)){if(pe===h.Text){let t;(O===p.Verbose||O===p.Compact)&&e.params&&(t=`Params: ${Be(e.params)} + +`),k.log(`Sending request '${e.method} - (${e.id})'.`,t)}else qe(`send-request`,e)}}e(Ve,`traceSendingRequest`),s(Ve,`traceSendingRequest`);function He(e){if(!(O===p.Off||!k)){if(pe===h.Text){let t;(O===p.Verbose||O===p.Compact)&&(t=e.params?`Params: ${Be(e.params)} + +`:`No parameters provided. + +`),k.log(`Sending notification '${e.method}'.`,t)}else qe(`send-notification`,e)}}e(He,`traceSendingNotification`),s(He,`traceSendingNotification`);function Ue(e,t,n){if(!(O===p.Off||!k)){if(pe===h.Text){let r;(O===p.Verbose||O===p.Compact)&&(e.error&&e.error.data?r=`Error data: ${Be(e.error.data)} + +`:e.result?r=`Result: ${Be(e.result)} + +`:e.error===void 0&&(r=`No result returned. + +`)),k.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else qe(`send-response`,e)}}e(Ue,`traceSendingResponse`),s(Ue,`traceSendingResponse`);function We(e){if(!(O===p.Off||!k)){if(pe===h.Text){let t;(O===p.Verbose||O===p.Compact)&&e.params&&(t=`Params: ${Be(e.params)} + +`),k.log(`Received request '${e.method} - (${e.id})'.`,t)}else qe(`receive-request`,e)}}e(We,`traceReceivedRequest`),s(We,`traceReceivedRequest`);function Ge(e){if(!(O===p.Off||!k||e.method===_.type.method)){if(pe===h.Text){let t;(O===p.Verbose||O===p.Compact)&&(t=e.params?`Params: ${Be(e.params)} + +`:`No parameters provided. + +`),k.log(`Received notification '${e.method}'.`,t)}else qe(`receive-notification`,e)}}e(Ge,`traceReceivedNotification`),s(Ge,`traceReceivedNotification`);function Ke(e,t){if(!(O===p.Off||!k)){if(pe===h.Text){let n;if((O===p.Verbose||O===p.Compact)&&(e.error&&e.error.data?n=`Error data: ${Be(e.error.data)} + +`:e.result?n=`Result: ${Be(e.result)} + +`:e.error===void 0&&(n=`No result returned. + +`)),t){let r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:``;k.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else k.log(`Received response ${e.id} without active response promise.`,n)}else qe(`receive-response`,e)}}e(Ke,`traceReceivedResponse`),s(Ke,`traceReceivedResponse`);function qe(e,t){if(!k||O===p.Off)return;let n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};k.log(n)}e(qe,`logLSPMessage`),s(qe,`logLSPMessage`);function Je(){if(De())throw new y(v.Closed,`Connection is closed.`);if(Oe())throw new y(v.Disposed,`Connection is disposed.`)}e(Je,`throwIfClosedOrDisposed`),s(Je,`throwIfClosedOrDisposed`);function Ye(){if(Ee())throw new y(v.AlreadyListening,`Connection is already listening`)}e(Ye,`throwIfListening`),s(Ye,`throwIfListening`);function Xe(){if(!Ee())throw Error(`Call listen() first.`)}e(Xe,`throwIfNotListening`),s(Xe,`throwIfNotListening`);function Ze(e){return e===void 0?null:e}e(Ze,`undefinedToNull`),s(Ze,`undefinedToNull`);function Qe(e){if(e!==null)return e}e(Qe,`nullToUndefined`),s(Qe,`nullToUndefined`);function $e(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}e($e,`isNamedParam`),s($e,`isNamedParam`);function et(e,t){switch(e){case i.ParameterStructures.auto:return $e(t)?Qe(t):[Ze(t)];case i.ParameterStructures.byName:if(!$e(t))throw Error(`Received parameters by name but param is not an object literal.`);return Qe(t);case i.ParameterStructures.byPosition:return[Ze(t)];default:throw Error(`Unknown parameter structure ${e.toString()}`)}}e(et,`computeSingleParam`),s(et,`computeSingleParam`);function tt(e,t){let n,r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=et(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e{Je();let n,a;if(r.string(e)){n=e;let r=t[0],o=0,s=i.ParameterStructures.auto;i.ParameterStructures.is(r)&&(o=1,s=r);let c=t.length,l=c-o;switch(l){case 0:a=void 0;break;case 1:a=et(s,t[o]);break;default:if(s===i.ParameterStructures.byName)throw Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);a=t.slice(o,c).map(e=>Ze(e))}}else{let r=t;n=e.method,a=tt(e,r)}let o={jsonrpc:`2.0`,method:n,params:a};return He(o),b.write(o).catch(e=>{throw C.error(`Sending notification failed.`),e})},`sendNotification`),onNotification:s((e,t)=>{Je();let n;return r.func(e)?ce=e:t&&(r.string(e)?(n=e,le.set(e,{type:void 0,handler:t})):(n=e.method,le.set(e.method,{type:e,handler:t}))),{dispose:s(()=>{n===void 0?ce=void 0:le.delete(n)},`dispose`)}},`onNotification`),onProgress:s((e,t,n)=>{if(ue.has(t))throw Error(`Progress handler for token ${t} already registered`);return ue.set(t,n),{dispose:s(()=>{ue.delete(t)},`dispose`)}},`onProgress`),sendProgress:s((e,t,n)=>nt.sendNotification(d.type,{token:t,value:n}),`sendProgress`),onUnhandledProgress:ve.event,sendRequest:s((e,...t)=>{Je(),Xe();let n,a,o;if(r.string(e)){n=e;let r=t[0],s=t[t.length-1],l=0,u=i.ParameterStructures.auto;i.ParameterStructures.is(r)&&(l=1,u=r);let d=t.length;c.CancellationToken.is(s)&&(--d,o=s);let f=d-l;switch(f){case 0:a=void 0;break;case 1:a=et(u,t[l]);break;default:if(u===i.ParameterStructures.byName)throw Error(`Received ${f} parameters for 'by Name' request parameter structure.`);a=t.slice(l,d).map(e=>Ze(e))}}else{let r=t;n=e.method,a=tt(e,r);let i=e.numberOfParams;o=c.CancellationToken.is(r[i])?r[i]:void 0}let l=w++,u;o&&(u=o.onCancellationRequested(()=>{let e=be.sender.sendCancellation(nt,l);return e===void 0?(C.log(`Received no promise from cancellation strategy when cancelling id ${l}`),Promise.resolve()):e.catch(()=>{C.log(`Sending cancellation messages for id ${l} failed`)})}));let d={jsonrpc:`2.0`,id:l,method:n,params:a};return Ve(d),typeof be.sender.enableCancellation==`function`&&be.sender.enableCancellation(d),new Promise(async(e,t)=>{let r=s(t=>{e(t),be.sender.cleanup(l),u?.dispose()},`resolveWithCleanup`),a=s(e=>{t(e),be.sender.cleanup(l),u?.dispose()},`rejectWithCleanup`),o={method:n,timerStart:Date.now(),resolve:r,reject:a};try{await b.write(d),E.set(l,o)}catch(e){throw C.error(`Sending request failed.`),o.reject(new i.ResponseError(i.ErrorCodes.MessageWriteError,e.message?e.message:`Unknown reason`)),e}})},`sendRequest`),onRequest:s((e,t)=>{Je();let n=null;return f.is(e)?(n=void 0,oe=e):r.string(e)?(n=null,t!==void 0&&(n=e,se.set(e,{handler:t,type:void 0}))):t!==void 0&&(n=e.method,se.set(e.method,{type:e,handler:t})),{dispose:s(()=>{n!==null&&(n===void 0?oe=void 0:se.delete(n))},`dispose`)}},`onRequest`),hasPendingResponse:s(()=>E.size>0,`hasPendingResponse`),trace:s(async(e,t,n)=>{let i=!1,a=h.Text;n!==void 0&&(r.boolean(n)?i=n:(i=n.sendNotification||!1,a=n.traceFormat||h.Text)),O=e,pe=a,k=O===p.Off?void 0:t,i&&!De()&&!Oe()&&await nt.sendNotification(g.type,{value:p.toString(e)})},`trace`),onError:he.event,onClose:ge.event,onUnhandledNotification:_e.event,onDispose:ye.event,end:s(()=>{b.end()},`end`),dispose:s(()=>{if(Oe())return;me=re.Disposed,ye.fire(void 0);let e=new i.ResponseError(i.ErrorCodes.PendingResponseRejected,`Pending response rejected since connection got disposed`);for(let t of E.values())t.reject(e);E=new Map,fe=new Map,D=new Set,T=new a.LinkedMap,r.func(b.dispose)&&b.dispose(),r.func(m.dispose)&&m.dispose()},`dispose`),listen:s(()=>{Je(),Ye(),me=re.Listening,m.listen(Fe)},`listen`),inspect:s(()=>{(0,n.default)().console.log(`inspect`)},`inspect`)};return nt.onNotification(_.type,e=>{if(O===p.Off||!k)return;let t=O===p.Verbose||O===p.Compact;k.log(e.message,t?e.verbose:void 0)}),nt.onNotification(d.type,e=>{let t=ue.get(e.token);t?t(e.value):ve.fire(e)}),nt}e(ie,`createMessageConnection`),s(ie,`createMessageConnection`),t.createMessageConnection=ie}}),At=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=xt();Object.defineProperty(e,"Message",{enumerable:!0,get:s(function(){return t.Message},`get`)}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:s(function(){return t.RequestType},`get`)}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:s(function(){return t.RequestType0},`get`)}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:s(function(){return t.RequestType1},`get`)}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:s(function(){return t.RequestType2},`get`)}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:s(function(){return t.RequestType3},`get`)}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:s(function(){return t.RequestType4},`get`)}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:s(function(){return t.RequestType5},`get`)}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:s(function(){return t.RequestType6},`get`)}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:s(function(){return t.RequestType7},`get`)}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:s(function(){return t.RequestType8},`get`)}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:s(function(){return t.RequestType9},`get`)}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:s(function(){return t.ResponseError},`get`)}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:s(function(){return t.ErrorCodes},`get`)}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:s(function(){return t.NotificationType},`get`)}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:s(function(){return t.NotificationType0},`get`)}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:s(function(){return t.NotificationType1},`get`)}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:s(function(){return t.NotificationType2},`get`)}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:s(function(){return t.NotificationType3},`get`)}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:s(function(){return t.NotificationType4},`get`)}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:s(function(){return t.NotificationType5},`get`)}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:s(function(){return t.NotificationType6},`get`)}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:s(function(){return t.NotificationType7},`get`)}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:s(function(){return t.NotificationType8},`get`)}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:s(function(){return t.NotificationType9},`get`)}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:s(function(){return t.ParameterStructures},`get`)});var n=St();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:s(function(){return n.LinkedMap},`get`)}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:s(function(){return n.LRUCache},`get`)}),Object.defineProperty(e,"Touch",{enumerable:!0,get:s(function(){return n.Touch},`get`)});var r=Ct();Object.defineProperty(e,"Disposable",{enumerable:!0,get:s(function(){return r.Disposable},`get`)});var i=yt();Object.defineProperty(e,"Event",{enumerable:!0,get:s(function(){return i.Event},`get`)}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:s(function(){return i.Emitter},`get`)});var a=bt();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:s(function(){return a.CancellationTokenSource},`get`)}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:s(function(){return a.CancellationToken},`get`)});var o=wt();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:s(function(){return o.SharedArraySenderStrategy},`get`)}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:s(function(){return o.SharedArrayReceiverStrategy},`get`)});var c=Et();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:s(function(){return c.MessageReader},`get`)}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:s(function(){return c.AbstractMessageReader},`get`)}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:s(function(){return c.ReadableStreamMessageReader},`get`)});var l=Dt();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:s(function(){return l.MessageWriter},`get`)}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:s(function(){return l.AbstractMessageWriter},`get`)}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:s(function(){return l.WriteableStreamMessageWriter},`get`)});var u=Ot();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:s(function(){return u.AbstractMessageBuffer},`get`)});var d=kt();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:s(function(){return d.ConnectionStrategy},`get`)}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:s(function(){return d.ConnectionOptions},`get`)}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:s(function(){return d.NullLogger},`get`)}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:s(function(){return d.createMessageConnection},`get`)}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:s(function(){return d.ProgressToken},`get`)}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:s(function(){return d.ProgressType},`get`)}),Object.defineProperty(e,"Trace",{enumerable:!0,get:s(function(){return d.Trace},`get`)}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:s(function(){return d.TraceValues},`get`)}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:s(function(){return d.TraceFormat},`get`)}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:s(function(){return d.SetTraceNotification},`get`)}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:s(function(){return d.LogTraceNotification},`get`)}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:s(function(){return d.ConnectionErrors},`get`)}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:s(function(){return d.ConnectionError},`get`)}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:s(function(){return d.CancellationReceiverStrategy},`get`)}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:s(function(){return d.CancellationSenderStrategy},`get`)}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:s(function(){return d.CancellationStrategy},`get`)}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:s(function(){return d.MessageStrategy},`get`)}),e.RAL=_t().default}}),jt=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(t){Object.defineProperty(t,"__esModule",{value:!0});var n=At(),r=class t extends n.AbstractMessageBuffer{static{e(this,`_MessageBuffer`)}static{s(this,`MessageBuffer`)}constructor(e=`utf-8`){super(e),this.asciiDecoder=new TextDecoder(`ascii`)}emptyBuffer(){return t.emptyBuffer}fromString(e,t){return new TextEncoder().encode(e)}toString(e,t){return t===`ascii`?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return t===void 0?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}};r.emptyBuffer=new Uint8Array;var i=class{static{e(this,`ReadableStreamWrapper`)}static{s(this,`ReadableStreamWrapper`)}constructor(e){this.socket=e,this._onData=new n.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,n.RAL)().console.error(`Converting blob to array buffer failed.`)})},this.socket.addEventListener(`message`,this._messageListener)}onClose(e){return this.socket.addEventListener(`close`,e),n.Disposable.create(()=>this.socket.removeEventListener(`close`,e))}onError(e){return this.socket.addEventListener(`error`,e),n.Disposable.create(()=>this.socket.removeEventListener(`error`,e))}onEnd(e){return this.socket.addEventListener(`end`,e),n.Disposable.create(()=>this.socket.removeEventListener(`end`,e))}onData(e){return this._onData.event(e)}},a=class{static{e(this,`WritableStreamWrapper`)}static{s(this,`WritableStreamWrapper`)}constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener(`close`,e),n.Disposable.create(()=>this.socket.removeEventListener(`close`,e))}onError(e){return this.socket.addEventListener(`error`,e),n.Disposable.create(()=>this.socket.removeEventListener(`error`,e))}onEnd(e){return this.socket.addEventListener(`end`,e),n.Disposable.create(()=>this.socket.removeEventListener(`end`,e))}write(e,t){if(typeof e==`string`){if(t!==void 0&&t!==`utf-8`)throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}},o=new TextEncoder,c=Object.freeze({messageBuffer:Object.freeze({create:s(e=>new r(e),`create`)}),applicationJson:Object.freeze({encoder:Object.freeze({name:`application/json`,encode:s((e,t)=>{if(t.charset!==`utf-8`)throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(o.encode(JSON.stringify(e,void 0,0)))},`encode`)}),decoder:Object.freeze({name:`application/json`,decode:s((e,t)=>{if(!(e instanceof Uint8Array))throw Error(`In a Browser environments only Uint8Arrays are supported.`);return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))},`decode`)})}),stream:Object.freeze({asReadableStream:s(e=>new i(e),`asReadableStream`),asWritableStream:s(e=>new a(e),`asWritableStream`)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:s(()=>clearTimeout(r),`dispose`)}},setImmediate(e,...t){let n=setTimeout(e,0,...t);return{dispose:s(()=>clearTimeout(n),`dispose`)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:s(()=>clearInterval(r),`dispose`)}}})});function l(){return c}e(l,`RIL`),s(l,`RIL`),(function(t){function r(){n.RAL.install(c)}e(r,`install`),s(r,`install`),t.install=r})(l||={}),t.default=l}}),Mt=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(t){var n=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:s(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=t&&t.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,jt().default.install();var i=At();r(At(),t),t.BrowserMessageReader=class extends i.AbstractMessageReader{static{e(this,`BrowserMessageReader`)}static{s(this,`BrowserMessageReader`)}constructor(e){super(),this._onData=new i.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener(`error`,e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}},t.BrowserMessageWriter=class extends i.AbstractMessageWriter{static{e(this,`BrowserMessageWriter`)}static{s(this,`BrowserMessageWriter`)}constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener(`error`,e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};function a(e,t,n,r){return n===void 0&&(n=i.NullLogger),i.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,i.createMessageConnection)(e,t,n,r)}e(a,`createMessageConnection`),s(a,`createMessageConnection`),t.createMessageConnection=a}}),Nt=l({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){t.exports=Mt()}}),j=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;var n=Mt(),r;(function(e){e.clientToServer=`clientToServer`,e.serverToClient=`serverToClient`,e.both=`both`})(r||(t.MessageDirection=r={})),t.RegistrationType=class{static{e(this,`RegistrationType`)}static{s(this,`RegistrationType`)}constructor(e){this.method=e}},t.ProtocolRequestType0=class extends n.RequestType0{static{e(this,`ProtocolRequestType0`)}static{s(this,`ProtocolRequestType0`)}constructor(e){super(e)}},t.ProtocolRequestType=class extends n.RequestType{static{e(this,`ProtocolRequestType`)}static{s(this,`ProtocolRequestType`)}constructor(e){super(e,n.ParameterStructures.byName)}},t.ProtocolNotificationType0=class extends n.NotificationType0{static{e(this,`ProtocolNotificationType0`)}static{s(this,`ProtocolNotificationType0`)}constructor(e){super(e)}},t.ProtocolNotificationType=class extends n.NotificationType{static{e(this,`ProtocolNotificationType`)}static{s(this,`ProtocolNotificationType`)}constructor(e){super(e,n.ParameterStructures.byName)}}}}),Pt=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0;function n(e){return e===!0||e===!1}e(n,`boolean`),s(n,`boolean`),t.boolean=n;function r(e){return typeof e==`string`||e instanceof String}e(r,`string`),s(r,`string`),t.string=r;function i(e){return typeof e==`number`||e instanceof Number}e(i,`number`),s(i,`number`),t.number=i;function a(e){return e instanceof Error}e(a,`error`),s(a,`error`),t.error=a;function o(e){return typeof e==`function`}e(o,`func`),s(o,`func`),t.func=o;function c(e){return Array.isArray(e)}e(c,`array`),s(c,`array`),t.array=c;function l(e){return c(e)&&e.every(e=>r(e))}e(l,`stringArray`),s(l,`stringArray`),t.stringArray=l;function u(e,t){return Array.isArray(e)&&e.every(t)}e(u,`typedArray`),s(u,`typedArray`),t.typedArray=u;function d(e){return typeof e==`object`&&!!e}e(d,`objectLiteral`),s(d,`objectLiteral`),t.objectLiteral=d}}),Ft=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/implementation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ImplementationRequest=n={}))}}),It=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/typeDefinition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeDefinitionRequest=n={}))}}),Lt=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t=j(),n;(function(e){e.method=`workspace/workspaceFolders`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(n||(e.WorkspaceFoldersRequest=n={}));var r;(function(e){e.method=`workspace/didChangeWorkspaceFolders`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(r||(e.DidChangeWorkspaceFoldersNotification=r={}))}}),Rt=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t=j(),n;(function(e){e.method=`workspace/configuration`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ConfigurationRequest=n={}))}}),zt=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/documentColor`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DocumentColorRequest=n={}));var r;(function(e){e.method=`textDocument/colorPresentation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.ColorPresentationRequest=r={}))}}),Bt=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/foldingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.FoldingRangeRequest=n={}));var r;(function(e){e.method=`workspace/foldingRange/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.FoldingRangeRefreshRequest=r={}))}}),Vt=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/declaration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DeclarationRequest=n={}))}}),Ht=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/selectionRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.SelectionRangeRequest=n={}))}}),Ut=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;var n=Mt(),r=j(),i;(function(t){t.type=new n.ProgressType;function r(e){return e===t.type}e(r,`is`),s(r,`is`),t.is=r})(i||(t.WorkDoneProgress=i={}));var a;(function(e){e.method=`window/workDoneProgress/create`,e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)})(a||(t.WorkDoneProgressCreateRequest=a={}));var o;(function(e){e.method=`window/workDoneProgress/cancel`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)})(o||(t.WorkDoneProgressCancelNotification=o={}))}}),Wt=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/prepareCallHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.CallHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`callHierarchy/incomingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.CallHierarchyIncomingCallsRequest=r={}));var i;(function(e){e.method=`callHierarchy/outgoingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.CallHierarchyOutgoingCallsRequest=i={}))}}),Gt=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t=j(),n;(function(e){e.Relative=`relative`})(n||(e.TokenFormat=n={}));var r;(function(e){e.method=`textDocument/semanticTokens`,e.type=new t.RegistrationType(e.method)})(r||(e.SemanticTokensRegistrationType=r={}));var i;(function(e){e.method=`textDocument/semanticTokens/full`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(i||(e.SemanticTokensRequest=i={}));var a;(function(e){e.method=`textDocument/semanticTokens/full/delta`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(a||(e.SemanticTokensDeltaRequest=a={}));var o;(function(e){e.method=`textDocument/semanticTokens/range`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(o||(e.SemanticTokensRangeRequest=o={}));var s;(function(e){e.method=`workspace/semanticTokens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(s||(e.SemanticTokensRefreshRequest=s={}))}}),Kt=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t=j(),n;(function(e){e.method=`window/showDocument`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ShowDocumentRequest=n={}))}}),qt=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/linkedEditingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.LinkedEditingRangeRequest=n={}))}}),Jt=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t=j(),n;(function(e){e.file=`file`,e.folder=`folder`})(n||(e.FileOperationPatternKind=n={}));var r;(function(e){e.method=`workspace/willCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.WillCreateFilesRequest=r={}));var i;(function(e){e.method=`workspace/didCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(i||(e.DidCreateFilesNotification=i={}));var a;(function(e){e.method=`workspace/willRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(a||(e.WillRenameFilesRequest=a={}));var o;(function(e){e.method=`workspace/didRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(o||(e.DidRenameFilesNotification=o={}));var s;(function(e){e.method=`workspace/didDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(s||(e.DidDeleteFilesNotification=s={}));var c;(function(e){e.method=`workspace/willDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(c||(e.WillDeleteFilesRequest=c={}))}}),Yt=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=j(),n;(function(e){e.document=`document`,e.project=`project`,e.group=`group`,e.scheme=`scheme`,e.global=`global`})(n||(e.UniquenessLevel=n={}));var r;(function(e){e.$import=`import`,e.$export=`export`,e.local=`local`})(r||(e.MonikerKind=r={}));var i;(function(e){e.method=`textDocument/moniker`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.MonikerRequest=i={}))}}),Xt=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/prepareTypeHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`typeHierarchy/supertypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.TypeHierarchySupertypesRequest=r={}));var i;(function(e){e.method=`typeHierarchy/subtypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.TypeHierarchySubtypesRequest=i={}))}}),Zt=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/inlineValue`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlineValueRequest=n={}));var r;(function(e){e.method=`workspace/inlineValue/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.InlineValueRefreshRequest=r={}))}}),Qt=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/inlayHint`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlayHintRequest=n={}));var r;(function(e){e.method=`inlayHint/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.InlayHintResolveRequest=r={}));var i;(function(e){e.method=`workspace/inlayHint/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(i||(e.InlayHintRefreshRequest=i={}))}}),$t=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;var n=Mt(),r=Pt(),i=j(),a;(function(t){function n(e){let t=e;return t&&r.boolean(t.retriggerRequest)}e(n,`is`),s(n,`is`),t.is=n})(a||(t.DiagnosticServerCancellationData=a={}));var o;(function(e){e.Full=`full`,e.Unchanged=`unchanged`})(o||(t.DocumentDiagnosticReportKind=o={}));var c;(function(e){e.method=`textDocument/diagnostic`,e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.partialResult=new n.ProgressType})(c||(t.DocumentDiagnosticRequest=c={}));var l;(function(e){e.method=`workspace/diagnostic`,e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.partialResult=new n.ProgressType})(l||(t.WorkspaceDiagnosticRequest=l={}));var u;(function(e){e.method=`workspace/diagnostic/refresh`,e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)})(u||(t.DiagnosticRefreshRequest=u={}))}}),en=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;var n=(gt(),m(h)),r=Pt(),i=j(),a;(function(t){t.Markup=1,t.Code=2;function n(e){return e===1||e===2}e(n,`is`),s(n,`is`),t.is=n})(a||(t.NotebookCellKind=a={}));var o;(function(t){function i(e,t){let n={executionOrder:e};return(t===!0||t===!1)&&(n.success=t),n}e(i,`create`),s(i,`create`),t.create=i;function a(e){let t=e;return r.objectLiteral(t)&&n.uinteger.is(t.executionOrder)&&(t.success===void 0||r.boolean(t.success))}e(a,`is`),s(a,`is`),t.is=a;function o(e,t){return e===t?!0:e==null||t==null?!1:e.executionOrder===t.executionOrder&&e.success===t.success}e(o,`equals`),s(o,`equals`),t.equals=o})(o||(t.ExecutionSummary=o={}));var c;(function(t){function i(e,t){return{kind:e,document:t}}e(i,`create`),s(i,`create`),t.create=i;function c(e){let t=e;return r.objectLiteral(t)&&a.is(t.kind)&&n.DocumentUri.is(t.document)&&(t.metadata===void 0||r.objectLiteral(t.metadata))}e(c,`is`),s(c,`is`),t.is=c;function l(e,t){let n=new Set;return e.document!==t.document&&n.add(`document`),e.kind!==t.kind&&n.add(`kind`),e.executionSummary!==t.executionSummary&&n.add(`executionSummary`),(e.metadata!==void 0||t.metadata!==void 0)&&!u(e.metadata,t.metadata)&&n.add(`metadata`),(e.executionSummary!==void 0||t.executionSummary!==void 0)&&!o.equals(e.executionSummary,t.executionSummary)&&n.add(`executionSummary`),n}e(l,`diff`),s(l,`diff`),t.diff=l;function u(e,t){if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!=`object`)return!1;let n=Array.isArray(e),i=Array.isArray(t);if(n!==i)return!1;if(n&&i){if(e.length!==t.length)return!1;for(let n=0;n0}e(n,`hasId`),s(n,`hasId`),t.hasId=n})(E||(t.StaticRegistrationOptions=E={}));var D;(function(t){function n(e){let t=e;return t&&(t.documentSelector===null||se.is(t.documentSelector))}e(n,`is`),s(n,`is`),t.is=n})(D||(t.TextDocumentRegistrationOptions=D={}));var fe;(function(t){function n(e){let t=e;return i.objectLiteral(t)&&(t.workDoneProgress===void 0||i.boolean(t.workDoneProgress))}e(n,`is`),s(n,`is`),t.is=n;function r(e){let t=e;return t&&i.boolean(t.workDoneProgress)}e(r,`hasWorkDoneProgress`),s(r,`hasWorkDoneProgress`),t.hasWorkDoneProgress=r})(fe||(t.WorkDoneProgressOptions=fe={}));var O;(function(e){e.method=`initialize`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(O||(t.InitializeRequest=O={}));var pe;(function(e){e.unknownProtocolVersion=1})(pe||(t.InitializeErrorCodes=pe={}));var k;(function(e){e.method=`initialized`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(k||(t.InitializedNotification=k={}));var me;(function(e){e.method=`shutdown`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType0(e.method)})(me||(t.ShutdownRequest=me={}));var he;(function(e){e.method=`exit`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType0(e.method)})(he||(t.ExitNotification=he={}));var ge;(function(e){e.method=`workspace/didChangeConfiguration`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(ge||(t.DidChangeConfigurationNotification=ge={}));var _e;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(_e||(t.MessageType=_e={}));var ve;(function(e){e.method=`window/showMessage`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolNotificationType(e.method)})(ve||(t.ShowMessageNotification=ve={}));var ye;(function(e){e.method=`window/showMessageRequest`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method)})(ye||(t.ShowMessageRequest=ye={}));var be;(function(e){e.method=`window/logMessage`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolNotificationType(e.method)})(be||(t.LogMessageNotification=be={}));var xe;(function(e){e.method=`telemetry/event`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolNotificationType(e.method)})(xe||(t.TelemetryEventNotification=xe={}));var Se;(function(e){e.None=0,e.Full=1,e.Incremental=2})(Se||(t.TextDocumentSyncKind=Se={}));var Ce;(function(e){e.method=`textDocument/didOpen`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(Ce||(t.DidOpenTextDocumentNotification=Ce={}));var we;(function(t){function n(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}e(n,`isIncremental`),s(n,`isIncremental`),t.isIncremental=n;function r(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}e(r,`isFull`),s(r,`isFull`),t.isFull=r})(we||(t.TextDocumentContentChangeEvent=we={}));var Te;(function(e){e.method=`textDocument/didChange`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(Te||(t.DidChangeTextDocumentNotification=Te={}));var Ee;(function(e){e.method=`textDocument/didClose`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(Ee||(t.DidCloseTextDocumentNotification=Ee={}));var De;(function(e){e.method=`textDocument/didSave`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(De||(t.DidSaveTextDocumentNotification=De={}));var Oe;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(Oe||(t.TextDocumentSaveReason=Oe={}));var ke;(function(e){e.method=`textDocument/willSave`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(ke||(t.WillSaveTextDocumentNotification=ke={}));var Ae;(function(e){e.method=`textDocument/willSaveWaitUntil`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Ae||(t.WillSaveTextDocumentWaitUntilRequest=Ae={}));var je;(function(e){e.method=`workspace/didChangeWatchedFiles`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(je||(t.DidChangeWatchedFilesNotification=je={}));var Me;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(Me||(t.FileChangeType=Me={}));var Ne;(function(t){function n(e){let t=e;return i.objectLiteral(t)&&(r.URI.is(t.baseUri)||r.WorkspaceFolder.is(t.baseUri))&&i.string(t.pattern)}e(n,`is`),s(n,`is`),t.is=n})(Ne||(t.RelativePattern=Ne={}));var Pe;(function(e){e.Create=1,e.Change=2,e.Delete=4})(Pe||(t.WatchKind=Pe={}));var Fe;(function(e){e.method=`textDocument/publishDiagnostics`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolNotificationType(e.method)})(Fe||(t.PublishDiagnosticsNotification=Fe={}));var Ie;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Ie||(t.CompletionTriggerKind=Ie={}));var Le;(function(e){e.method=`textDocument/completion`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Le||(t.CompletionRequest=Le={}));var Re;(function(e){e.method=`completionItem/resolve`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Re||(t.CompletionResolveRequest=Re={}));var ze;(function(e){e.method=`textDocument/hover`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(ze||(t.HoverRequest=ze={}));var Be;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(Be||(t.SignatureHelpTriggerKind=Be={}));var Ve;(function(e){e.method=`textDocument/signatureHelp`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Ve||(t.SignatureHelpRequest=Ve={}));var He;(function(e){e.method=`textDocument/definition`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(He||(t.DefinitionRequest=He={}));var Ue;(function(e){e.method=`textDocument/references`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Ue||(t.ReferencesRequest=Ue={}));var We;(function(e){e.method=`textDocument/documentHighlight`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(We||(t.DocumentHighlightRequest=We={}));var Ge;(function(e){e.method=`textDocument/documentSymbol`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Ge||(t.DocumentSymbolRequest=Ge={}));var Ke;(function(e){e.method=`textDocument/codeAction`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Ke||(t.CodeActionRequest=Ke={}));var qe;(function(e){e.method=`codeAction/resolve`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(qe||(t.CodeActionResolveRequest=qe={}));var Je;(function(e){e.method=`workspace/symbol`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Je||(t.WorkspaceSymbolRequest=Je={}));var Ye;(function(e){e.method=`workspaceSymbol/resolve`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Ye||(t.WorkspaceSymbolResolveRequest=Ye={}));var Xe;(function(e){e.method=`textDocument/codeLens`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Xe||(t.CodeLensRequest=Xe={}));var Ze;(function(e){e.method=`codeLens/resolve`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(Ze||(t.CodeLensResolveRequest=Ze={}));var Qe;(function(e){e.method=`workspace/codeLens/refresh`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType0(e.method)})(Qe||(t.CodeLensRefreshRequest=Qe={}));var $e;(function(e){e.method=`textDocument/documentLink`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})($e||(t.DocumentLinkRequest=$e={}));var et;(function(e){e.method=`documentLink/resolve`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(et||(t.DocumentLinkResolveRequest=et={}));var tt;(function(e){e.method=`textDocument/formatting`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(tt||(t.DocumentFormattingRequest=tt={}));var nt;(function(e){e.method=`textDocument/rangeFormatting`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(nt||(t.DocumentRangeFormattingRequest=nt={}));var rt;(function(e){e.method=`textDocument/rangesFormatting`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(rt||(t.DocumentRangesFormattingRequest=rt={}));var it;(function(e){e.method=`textDocument/onTypeFormatting`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(it||(t.DocumentOnTypeFormattingRequest=it={}));var at;(function(e){e.Identifier=1})(at||(t.PrepareSupportDefaultBehavior=at={}));var ot;(function(e){e.method=`textDocument/rename`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(ot||(t.RenameRequest=ot={}));var st;(function(e){e.method=`textDocument/prepareRename`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(st||(t.PrepareRenameRequest=st={}));var ct;(function(e){e.method=`workspace/executeCommand`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)})(ct||(t.ExecuteCommandRequest=ct={}));var lt;(function(e){e.method=`workspace/applyEdit`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(`workspace/applyEdit`)})(lt||(t.ApplyWorkspaceEditRequest=lt={}))}}),rn=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;var n=Mt();function r(e,t,r,i){return n.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,n.createMessageConnection)(e,t,r,i)}e(r,`createProtocolConnection`),s(r,`createProtocolConnection`),t.createProtocolConnection=r}}),an=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:s(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,n(Mt(),e),n((gt(),m(h)),e),n(j(),e),n(nn(),e);var r=rn();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:s(function(){return r.createProtocolConnection},`get`)});var i;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(i||(e.LSPErrorCodes=i={}))}}),on=l({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(t){var n=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:s(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=t&&t.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;var i=Nt();r(Nt(),t),r(an(),t);function a(e,t,n,r){return(0,i.createMessageConnection)(e,t,n,r)}e(a,`createProtocolConnection`),s(a,`createProtocolConnection`),t.createProtocolConnection=a}}),sn={};u(sn,{AbstractAstReflection:e(()=>pn,`AbstractAstReflection`),AbstractCstNode:e(()=>QA,`AbstractCstNode`),AbstractLangiumParser:e(()=>sj,`AbstractLangiumParser`),AbstractParserErrorMessageProvider:e(()=>lj,`AbstractParserErrorMessageProvider`),AbstractThreadedAsyncParser:e(()=>jN,`AbstractThreadedAsyncParser`),AstUtils:e(()=>wn,`AstUtils`),BiMap:e(()=>mM,`BiMap`),Cancellation:e(()=>Z,`Cancellation`),CompositeCstNodeImpl:e(()=>ej,`CompositeCstNodeImpl`),ContextCache:e(()=>SM,`ContextCache`),CstNodeBuilder:e(()=>ZA,`CstNodeBuilder`),CstUtils:e(()=>cn,`CstUtils`),DEFAULT_TOKENIZE_OPTIONS:e(()=>XM,`DEFAULT_TOKENIZE_OPTIONS`),DONE_RESULT:e(()=>xn,`DONE_RESULT`),DatatypeSymbol:e(()=>rj,`DatatypeSymbol`),DefaultAstNodeDescriptionProvider:e(()=>zM,`DefaultAstNodeDescriptionProvider`),DefaultAstNodeLocator:e(()=>VM,`DefaultAstNodeLocator`),DefaultAsyncParser:e(()=>AN,`DefaultAsyncParser`),DefaultCommentProvider:e(()=>kN,`DefaultCommentProvider`),DefaultConfigurationProvider:e(()=>UM,`DefaultConfigurationProvider`),DefaultDocumentBuilder:e(()=>KM,`DefaultDocumentBuilder`),DefaultDocumentValidator:e(()=>PM,`DefaultDocumentValidator`),DefaultHydrator:e(()=>PN,`DefaultHydrator`),DefaultIndexManager:e(()=>qM,`DefaultIndexManager`),DefaultJsonSerializer:e(()=>OM,`DefaultJsonSerializer`),DefaultLangiumDocumentFactory:e(()=>oM,`DefaultLangiumDocumentFactory`),DefaultLangiumDocuments:e(()=>sM,`DefaultLangiumDocuments`),DefaultLangiumProfiler:e(()=>nP,`DefaultLangiumProfiler`),DefaultLexer:e(()=>ZM,`DefaultLexer`),DefaultLexerErrorMessageProvider:e(()=>YM,`DefaultLexerErrorMessageProvider`),DefaultLinker:e(()=>lM,`DefaultLinker`),DefaultNameProvider:e(()=>dM,`DefaultNameProvider`),DefaultReferenceDescriptionProvider:e(()=>BM,`DefaultReferenceDescriptionProvider`),DefaultReferences:e(()=>fM,`DefaultReferences`),DefaultScopeComputation:e(()=>hM,`DefaultScopeComputation`),DefaultScopeProvider:e(()=>TM,`DefaultScopeProvider`),DefaultServiceRegistry:e(()=>kM,`DefaultServiceRegistry`),DefaultTokenBuilder:e(()=>Ij,`DefaultTokenBuilder`),DefaultValueConverter:e(()=>Lj,`DefaultValueConverter`),DefaultWorkspaceLock:e(()=>NN,`DefaultWorkspaceLock`),DefaultWorkspaceManager:e(()=>JM,`DefaultWorkspaceManager`),Deferred:e(()=>qj,`Deferred`),Disposable:e(()=>GM,`Disposable`),DisposableCache:e(()=>bM,`DisposableCache`),DocumentCache:e(()=>CM,`DocumentCache`),DocumentState:e(()=>Q,`DocumentState`),DocumentValidator:e(()=>RM,`DocumentValidator`),EMPTY_SCOPE:e(()=>yM,`EMPTY_SCOPE`),EMPTY_STREAM:e(()=>bn,`EMPTY_STREAM`),EmptyFileSystem:e(()=>ZN,`EmptyFileSystem`),EmptyFileSystemProvider:e(()=>XN,`EmptyFileSystemProvider`),ErrorWithLocation:e(()=>aa,`ErrorWithLocation`),GrammarAST:e(()=>zn,`GrammarAST`),GrammarUtils:e(()=>ia,`GrammarUtils`),IndentationAwareLexer:e(()=>JN,`IndentationAwareLexer`),IndentationAwareTokenBuilder:e(()=>qN,`IndentationAwareTokenBuilder`),JSDocDocumentationProvider:e(()=>ON,`JSDocDocumentationProvider`),LangiumCompletionParser:e(()=>dj,`LangiumCompletionParser`),LangiumParser:e(()=>cj,`LangiumParser`),LangiumParserErrorMessageProvider:e(()=>uj,`LangiumParserErrorMessageProvider`),LeafCstNodeImpl:e(()=>$A,`LeafCstNodeImpl`),LexingMode:e(()=>KN,`LexingMode`),MapScope:e(()=>_M,`MapScope`),Module:e(()=>LN,`Module`),MultiMap:e(()=>pM,`MultiMap`),MultiMapScope:e(()=>vM,`MultiMapScope`),OperationCancelled:e(()=>Wj,`OperationCancelled`),ParserWorker:e(()=>MN,`ParserWorker`),ProfilingTask:e(()=>rP,`ProfilingTask`),Reduction:e(()=>Cn,`Reduction`),RefResolving:e(()=>cM,`RefResolving`),RegExpUtils:e(()=>ca,`RegExpUtils`),RootCstNodeImpl:e(()=>nj,`RootCstNodeImpl`),SimpleCache:e(()=>xM,`SimpleCache`),StreamImpl:e(()=>_n,`StreamImpl`),StreamScope:e(()=>gM,`StreamScope`),TextDocument:e(()=>Yj,`TextDocument`),TreeStreamImpl:e(()=>Sn,`TreeStreamImpl`),URI:e(()=>nM,`URI`),UriTrie:e(()=>aM,`UriTrie`),UriUtils:e(()=>iM,`UriUtils`),VALIDATE_EACH_NODE:e(()=>NM,`VALIDATE_EACH_NODE`),ValidationCategory:e(()=>jM,`ValidationCategory`),ValidationRegistry:e(()=>MM,`ValidationRegistry`),ValueConverter:e(()=>Rj,`ValueConverter`),WorkspaceCache:e(()=>wM,`WorkspaceCache`),assertCondition:e(()=>sa,`assertCondition`),assertUnreachable:e(()=>oa,`assertUnreachable`),createCompletionParser:e(()=>Nj,`createCompletionParser`),createDefaultCoreModule:e(()=>FN,`createDefaultCoreModule`),createDefaultSharedCoreModule:e(()=>IN,`createDefaultSharedCoreModule`),createGrammarConfig:e(()=>vo,`createGrammarConfig`),createLangiumParser:e(()=>Pj,`createLangiumParser`),createParser:e(()=>hj,`createParser`),delayNextTick:e(()=>zj,`delayNextTick`),diagnosticData:e(()=>AM,`diagnosticData`),eagerLoad:e(()=>BN,`eagerLoad`),getDiagnosticRange:e(()=>FM,`getDiagnosticRange`),indentationBuilderDefaultOptions:e(()=>GN,`indentationBuilderDefaultOptions`),inject:e(()=>RN,`inject`),interruptAndCheck:e(()=>Kj,`interruptAndCheck`),isAstNode:e(()=>M,`isAstNode`),isAstNodeDescription:e(()=>dn,`isAstNodeDescription`),isAstNodeWithComment:e(()=>EM,`isAstNodeWithComment`),isCompositeCstNode:e(()=>mn,`isCompositeCstNode`),isIMultiModeLexerDefinition:e(()=>$M,`isIMultiModeLexerDefinition`),isJSDoc:e(()=>nN,`isJSDoc`),isLeafCstNode:e(()=>hn,`isLeafCstNode`),isLinkingError:e(()=>fn,`isLinkingError`),isMultiReference:e(()=>un,`isMultiReference`),isNamed:e(()=>uM,`isNamed`),isOperationCancelled:e(()=>Gj,`isOperationCancelled`),isReference:e(()=>ln,`isReference`),isRootCstNode:e(()=>gn,`isRootCstNode`),isTokenTypeArray:e(()=>QM,`isTokenTypeArray`),isTokenTypeDictionary:e(()=>eN,`isTokenTypeDictionary`),loadGrammarFromJson:e(()=>tP,`loadGrammarFromJson`),parseJSDoc:e(()=>tN,`parseJSDoc`),prepareLangiumParser:e(()=>Fj,`prepareLangiumParser`),setInterruptionPeriod:e(()=>Uj,`setInterruptionPeriod`),startCancelableOperation:e(()=>Hj,`startCancelableOperation`),stream:e(()=>N,`stream`),toDiagnosticData:e(()=>LM,`toDiagnosticData`),toDiagnosticSeverity:e(()=>IM,`toDiagnosticSeverity`)});var cn={};u(cn,{DefaultNameRegexp:e(()=>Gi,`DefaultNameRegexp`),RangeComparison:e(()=>Hi,`RangeComparison`),compareRange:e(()=>Ui,`compareRange`),findCommentNode:e(()=>qi,`findCommentNode`),findDeclarationNodeAtOffset:e(()=>Ki,`findDeclarationNodeAtOffset`),findLeafNodeAtOffset:e(()=>Yi,`findLeafNodeAtOffset`),findLeafNodeBeforeOffset:e(()=>Xi,`findLeafNodeBeforeOffset`),flattenCst:e(()=>Ri,`flattenCst`),getDatatypeNode:e(()=>Ii,`getDatatypeNode`),getInteriorNodes:e(()=>ta,`getInteriorNodes`),getNextNode:e(()=>$i,`getNextNode`),getPreviousNode:e(()=>Qi,`getPreviousNode`),getStartlineNode:e(()=>ea,`getStartlineNode`),inRange:e(()=>Wi,`inRange`),isChildNode:e(()=>zi,`isChildNode`),isCommentNode:e(()=>Ji,`isCommentNode`),streamCst:e(()=>Li,`streamCst`),toDocumentSegment:e(()=>Vi,`toDocumentSegment`),tokenToRange:e(()=>Bi,`tokenToRange`)});function M(e){return typeof e==`object`&&!!e&&typeof e.$type==`string`}e(M,`isAstNode`),s(M,`isAstNode`);function ln(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`ref`in e}e(ln,`isReference`),s(ln,`isReference`);function un(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`items`in e}e(un,`isMultiReference`),s(un,`isMultiReference`);function dn(e){return typeof e==`object`&&!!e&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.path==`string`}e(dn,`isAstNodeDescription`),s(dn,`isAstNodeDescription`);function fn(e){return typeof e==`object`&&!!e&&typeof e.info==`object`&&typeof e.message==`string`}e(fn,`isLinkingError`),s(fn,`isLinkingError`);var pn=class{static{e(this,`AbstractAstReflection`)}static{s(this,`AbstractAstReflection`)}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw Error(`Type ${e.container.$type||`undefined`} not found.`);let n=t.properties[e.property]?.referenceType;if(!n)throw Error(`Property ${e.property||`undefined`} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return M(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||=this.subtypes[e]={};let r=n[t];if(r!==void 0)return r;{let r=this.types[e],i=r?r.superTypes.some(e=>this.isSubtype(e,t)):!1;return n[t]=i,i}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let t=this.getAllTypes(),n=[];for(let r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}};function mn(e){return typeof e==`object`&&!!e&&Array.isArray(e.content)}e(mn,`isCompositeCstNode`),s(mn,`isCompositeCstNode`);function hn(e){return typeof e==`object`&&!!e&&typeof e.tokenType==`object`}e(hn,`isLeafCstNode`),s(hn,`isLeafCstNode`);function gn(e){return mn(e)&&typeof e.fullText==`string`}e(gn,`isRootCstNode`),s(gn,`isRootCstNode`);var _n=class t{static{e(this,`_StreamImpl`)}static{s(this,`StreamImpl`)}constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:s(()=>this.nextFn(e.state),`next`),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){let e=[],t=this.iterator(),n;do n=t.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){let n=this.map(n=>[e?e(n):n,t?t(n):n]);return new Map(n)}toString(){return this.join()}concat(e){return new t(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do if(t=this.nextFn(e.first),!t.done)return t;while(!t.done);e.firstDone=!0}do if(t=e.iterator.next(),!t.done)return t;while(!t.done);return xn})}join(e=`,`){let t=this.iterator(),n=``,r,i=!1;do r=t.next(),r.done||(i&&(n+=e),n+=vn(r.value)),i=!0;while(!r.done);return n}indexOf(e,t=0){let n=this.iterator(),r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(e){return new t(this.startFn,t=>{let{done:n,value:r}=this.nextFn(t);return n?xn:{done:!1,value:e(r)}})}filter(e){return new t(this.startFn,t=>{let n;do if(n=this.nextFn(t),!n.done&&e(n.value))return n;while(!n.done);return xn})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,t){let n=this.iterator(),r=t,i=n.next();for(;!i.done;)r=r===void 0?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){let r=e.next();if(r.done)return n;let i=this.recursiveReduce(e,t,n);return i===void 0?r.value:t(i,r.value)}find(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(e){return new t(()=>({this:this.startFn()}),t=>{do{if(t.iterator){let e=t.iterator.next();if(e.done)t.iterator=void 0;else return e}let{done:n,value:r}=this.nextFn(t.this);if(!n){let n=e(r);if(yn(n))t.iterator=n[Symbol.iterator]();else return{done:!1,value:n}}}while(t.iterator);return xn})}flat(e){if(e===void 0&&(e=1),e<=0)return this;let n=e>1?this.flat(e-1):this;return new t(()=>({this:n.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:t,value:r}=n.nextFn(e.this);if(!t){if(yn(r))e.iterator=r[Symbol.iterator]();else return{done:!1,value:r}}}while(e.iterator);return xn})}head(){let e=this.iterator().next();if(!e.done)return e.value}tail(e=1){return new t(()=>{let t=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),t=>(t.size++,t.size>e?xn:this.nextFn(t.state)))}distinct(e){return new t(()=>({set:new Set,internalState:this.startFn()}),t=>{let n;do if(n=this.nextFn(t.internalState),!n.done){let r=e?e(n.value):n.value;if(!t.set.has(r))return t.set.add(r),n}while(!n.done);return xn})}exclude(e,t){let n=new Set;for(let r of e){let e=t?t(r):r;n.add(e)}return this.filter(e=>{let r=t?t(e):e;return!n.has(r)})}};function vn(e){return typeof e==`string`?e:e===void 0?`undefined`:typeof e.toString==`function`?e.toString():Object.prototype.toString.call(e)}e(vn,`toString`),s(vn,`toString`);function yn(e){return!!e&&typeof e[Symbol.iterator]==`function`}e(yn,`isIterable`),s(yn,`isIterable`);var bn=new _n(()=>void 0,()=>xn),xn=Object.freeze({done:!0,value:void 0});function N(...e){if(e.length===1){let t=e[0];if(t instanceof _n)return t;if(yn(t))return new _n(()=>t[Symbol.iterator](),e=>e.next());if(typeof t.length==`number`)return new _n(()=>({index:0}),e=>e.index1?new _n(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&=(e.iterators.pop(),!1);e.iterators.length>0;){let n=e.iterators[e.iterators.length-1].next();if(n.done)e.iterators.pop();else return e.iterators.push(t(n.value)[Symbol.iterator]()),n}return xn})}iterator(){let e={state:this.startFn(),next:s(()=>this.nextFn(e.state),`next`),prune:s(()=>{e.state.pruned=!0},`prune`),[Symbol.iterator]:()=>e};return e}},Cn;(function(t){function n(e){return e.reduce((e,t)=>e+t,0)}e(n,`sum`),s(n,`sum`),t.sum=n;function r(e){return e.reduce((e,t)=>e*t,0)}e(r,`product`),s(r,`product`),t.product=r;function i(e){return e.reduce((e,t)=>Math.min(e,t))}e(i,`min2`),s(i,`min`),t.min=i;function a(e){return e.reduce((e,t)=>Math.max(e,t))}e(a,`max`),s(a,`max`),t.max=a})(Cn||={});var wn={};u(wn,{assignMandatoryProperties:e(()=>In,`assignMandatoryProperties`),copyAstNode:e(()=>Rn,`copyAstNode`),findRootNode:e(()=>kn,`findRootNode`),getContainerOfType:e(()=>En,`getContainerOfType`),getDocument:e(()=>On,`getDocument`),getReferenceNodes:e(()=>An,`getReferenceNodes`),hasContainerOfType:e(()=>Dn,`hasContainerOfType`),linkContentToContainer:e(()=>Tn,`linkContentToContainer`),streamAllContents:e(()=>Mn,`streamAllContents`),streamAst:e(()=>Nn,`streamAst`),streamContents:e(()=>jn,`streamContents`),streamReferences:e(()=>Fn,`streamReferences`)});function Tn(e,t={}){for(let[n,r]of Object.entries(e))n.startsWith(`$`)||(Array.isArray(r)?r.forEach((r,i)=>{M(r)&&(r.$container=e,r.$containerProperty=n,r.$containerIndex=i,t.deep&&Tn(r,t))}):M(r)&&(r.$container=e,r.$containerProperty=n,t.deep&&Tn(r,t)))}e(Tn,`linkContentToContainer`),s(Tn,`linkContentToContainer`);function En(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}e(En,`getContainerOfType`),s(En,`getContainerOfType`);function Dn(e,t){let n=e;for(;n;){if(t(n))return!0;n=n.$container}return!1}e(Dn,`hasContainerOfType`),s(Dn,`hasContainerOfType`);function On(e){let t=kn(e).$document;if(!t)throw Error(`AST node has no document.`);return t}e(On,`getDocument`),s(On,`getDocument`);function kn(e){for(;e.$container;)e=e.$container;return e}e(kn,`findRootNode`),s(kn,`findRootNode`);function An(e){return ln(e)?e.ref?[e.ref]:[]:un(e)?e.items.map(e=>e.ref):[]}e(An,`getReferenceNodes`),s(An,`getReferenceNodes`);function jn(e,t){if(!e)throw Error(`Node must be an AstNode.`);let n=t?.range;return new _n(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexjn(e,t))}e(Mn,`streamAllContents`),s(Mn,`streamAllContents`);function Nn(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return t?.range&&!Pn(e,t.range)?new Sn(e,()=>[]):new Sn(e,e=>jn(e,t),{includeRoot:!0})}e(Nn,`streamAst`),s(Nn,`streamAst`);function Pn(e,t){if(!t)return!0;let n=e.$cstNode?.range;return n?Wi(n,t):!1}e(Pn,`isAstNodeInRange`),s(Pn,`isAstNodeInRange`);function Fn(e){return new _n(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexVn,`AbstractElement`),AbstractParserRule:e(()=>Un,`AbstractParserRule`),AbstractRule:e(()=>Gn,`AbstractRule`),AbstractType:e(()=>qn,`AbstractType`),Action:e(()=>Yn,`Action`),Alternatives:e(()=>Zn,`Alternatives`),ArrayLiteral:e(()=>$n,`ArrayLiteral`),ArrayType:e(()=>tr,`ArrayType`),Assignment:e(()=>rr,`Assignment`),BooleanLiteral:e(()=>ar,`BooleanLiteral`),CharacterRange:e(()=>sr,`CharacterRange`),Condition:e(()=>lr,`Condition`),Conjunction:e(()=>dr,`Conjunction`),CrossReference:e(()=>pr,`CrossReference`),Disjunction:e(()=>hr,`Disjunction`),EndOfFile:e(()=>_r,`EndOfFile`),Grammar:e(()=>yr,`Grammar`),GrammarImport:e(()=>xr,`GrammarImport`),Group:e(()=>Cr,`Group`),InferredType:e(()=>Tr,`InferredType`),InfixRule:e(()=>Dr,`InfixRule`),InfixRuleOperatorList:e(()=>kr,`InfixRuleOperatorList`),InfixRuleOperators:e(()=>jr,`InfixRuleOperators`),Interface:e(()=>Nr,`Interface`),Keyword:e(()=>Fr,`Keyword`),LangiumGrammarAstReflection:e(()=>Fi,`LangiumGrammarAstReflection`),LangiumGrammarTerminals:e(()=>Bn,`LangiumGrammarTerminals`),NamedArgument:e(()=>Lr,`NamedArgument`),NegatedToken:e(()=>zr,`NegatedToken`),Negation:e(()=>Vr,`Negation`),NumberLiteral:e(()=>Ur,`NumberLiteral`),Parameter:e(()=>Gr,`Parameter`),ParameterReference:e(()=>qr,`ParameterReference`),ParserRule:e(()=>Yr,`ParserRule`),ReferenceType:e(()=>Zr,`ReferenceType`),RegexToken:e(()=>$r,`RegexToken`),ReturnType:e(()=>ti,`ReturnType`),RuleCall:e(()=>ri,`RuleCall`),SimpleType:e(()=>ai,`SimpleType`),StringLiteral:e(()=>si,`StringLiteral`),TerminalAlternatives:e(()=>li,`TerminalAlternatives`),TerminalElement:e(()=>di,`TerminalElement`),TerminalGroup:e(()=>pi,`TerminalGroup`),TerminalRule:e(()=>hi,`TerminalRule`),TerminalRuleCall:e(()=>_i,`TerminalRuleCall`),Type:e(()=>yi,`Type`),TypeAttribute:e(()=>xi,`TypeAttribute`),TypeDefinition:e(()=>Ci,`TypeDefinition`),UnionType:e(()=>Ti,`UnionType`),UnorderedGroup:e(()=>Di,`UnorderedGroup`),UntilToken:e(()=>ki,`UntilToken`),ValueLiteral:e(()=>ji,`ValueLiteral`),Wildcard:e(()=>Ni,`Wildcard`),isAbstractElement:e(()=>Hn,`isAbstractElement`),isAbstractParserRule:e(()=>Wn,`isAbstractParserRule`),isAbstractRule:e(()=>Kn,`isAbstractRule`),isAbstractType:e(()=>Jn,`isAbstractType`),isAction:e(()=>Xn,`isAction`),isAlternatives:e(()=>Qn,`isAlternatives`),isArrayLiteral:e(()=>er,`isArrayLiteral`),isArrayType:e(()=>nr,`isArrayType`),isAssignment:e(()=>ir,`isAssignment`),isBooleanLiteral:e(()=>or,`isBooleanLiteral`),isCharacterRange:e(()=>cr,`isCharacterRange`),isCondition:e(()=>ur,`isCondition`),isConjunction:e(()=>fr,`isConjunction`),isCrossReference:e(()=>mr,`isCrossReference`),isDisjunction:e(()=>gr,`isDisjunction`),isEndOfFile:e(()=>vr,`isEndOfFile`),isGrammar:e(()=>br,`isGrammar`),isGrammarImport:e(()=>Sr,`isGrammarImport`),isGroup:e(()=>wr,`isGroup`),isInferredType:e(()=>Er,`isInferredType`),isInfixRule:e(()=>Or,`isInfixRule`),isInfixRuleOperatorList:e(()=>Ar,`isInfixRuleOperatorList`),isInfixRuleOperators:e(()=>Mr,`isInfixRuleOperators`),isInterface:e(()=>Pr,`isInterface`),isKeyword:e(()=>Ir,`isKeyword`),isNamedArgument:e(()=>Rr,`isNamedArgument`),isNegatedToken:e(()=>Br,`isNegatedToken`),isNegation:e(()=>Hr,`isNegation`),isNumberLiteral:e(()=>Wr,`isNumberLiteral`),isParameter:e(()=>Kr,`isParameter`),isParameterReference:e(()=>Jr,`isParameterReference`),isParserRule:e(()=>Xr,`isParserRule`),isReferenceType:e(()=>Qr,`isReferenceType`),isRegexToken:e(()=>ei,`isRegexToken`),isReturnType:e(()=>ni,`isReturnType`),isRuleCall:e(()=>ii,`isRuleCall`),isSimpleType:e(()=>oi,`isSimpleType`),isStringLiteral:e(()=>ci,`isStringLiteral`),isTerminalAlternatives:e(()=>ui,`isTerminalAlternatives`),isTerminalElement:e(()=>fi,`isTerminalElement`),isTerminalGroup:e(()=>mi,`isTerminalGroup`),isTerminalRule:e(()=>gi,`isTerminalRule`),isTerminalRuleCall:e(()=>vi,`isTerminalRuleCall`),isType:e(()=>bi,`isType`),isTypeAttribute:e(()=>Si,`isTypeAttribute`),isTypeDefinition:e(()=>wi,`isTypeDefinition`),isUnionType:e(()=>Ei,`isUnionType`),isUnorderedGroup:e(()=>Oi,`isUnorderedGroup`),isUntilToken:e(()=>Ai,`isUntilToken`),isValueLiteral:e(()=>Mi,`isValueLiteral`),isWildcard:e(()=>Pi,`isWildcard`),reflection:e(()=>P,`reflection`)});var Bn={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},Vn={$type:`AbstractElement`,cardinality:`cardinality`};function Hn(e){return P.isInstance(e,Vn.$type)}e(Hn,`isAbstractElement`),s(Hn,`isAbstractElement`);var Un={$type:`AbstractParserRule`};function Wn(e){return P.isInstance(e,Un.$type)}e(Wn,`isAbstractParserRule`),s(Wn,`isAbstractParserRule`);var Gn={$type:`AbstractRule`};function Kn(e){return P.isInstance(e,Gn.$type)}e(Kn,`isAbstractRule`),s(Kn,`isAbstractRule`);var qn={$type:`AbstractType`};function Jn(e){return P.isInstance(e,qn.$type)}e(Jn,`isAbstractType`),s(Jn,`isAbstractType`);var Yn={$type:`Action`,cardinality:`cardinality`,feature:`feature`,inferredType:`inferredType`,operator:`operator`,type:`type`};function Xn(e){return P.isInstance(e,Yn.$type)}e(Xn,`isAction`),s(Xn,`isAction`);var Zn={$type:`Alternatives`,cardinality:`cardinality`,elements:`elements`};function Qn(e){return P.isInstance(e,Zn.$type)}e(Qn,`isAlternatives`),s(Qn,`isAlternatives`);var $n={$type:`ArrayLiteral`,elements:`elements`};function er(e){return P.isInstance(e,$n.$type)}e(er,`isArrayLiteral`),s(er,`isArrayLiteral`);var tr={$type:`ArrayType`,elementType:`elementType`};function nr(e){return P.isInstance(e,tr.$type)}e(nr,`isArrayType`),s(nr,`isArrayType`);var rr={$type:`Assignment`,cardinality:`cardinality`,feature:`feature`,operator:`operator`,predicate:`predicate`,terminal:`terminal`};function ir(e){return P.isInstance(e,rr.$type)}e(ir,`isAssignment`),s(ir,`isAssignment`);var ar={$type:`BooleanLiteral`,true:`true`};function or(e){return P.isInstance(e,ar.$type)}e(or,`isBooleanLiteral`),s(or,`isBooleanLiteral`);var sr={$type:`CharacterRange`,cardinality:`cardinality`,left:`left`,lookahead:`lookahead`,parenthesized:`parenthesized`,right:`right`};function cr(e){return P.isInstance(e,sr.$type)}e(cr,`isCharacterRange`),s(cr,`isCharacterRange`);var lr={$type:`Condition`};function ur(e){return P.isInstance(e,lr.$type)}e(ur,`isCondition`),s(ur,`isCondition`);var dr={$type:`Conjunction`,left:`left`,right:`right`};function fr(e){return P.isInstance(e,dr.$type)}e(fr,`isConjunction`),s(fr,`isConjunction`);var pr={$type:`CrossReference`,cardinality:`cardinality`,deprecatedSyntax:`deprecatedSyntax`,isMulti:`isMulti`,terminal:`terminal`,type:`type`};function mr(e){return P.isInstance(e,pr.$type)}e(mr,`isCrossReference`),s(mr,`isCrossReference`);var hr={$type:`Disjunction`,left:`left`,right:`right`};function gr(e){return P.isInstance(e,hr.$type)}e(gr,`isDisjunction`),s(gr,`isDisjunction`);var _r={$type:`EndOfFile`,cardinality:`cardinality`};function vr(e){return P.isInstance(e,_r.$type)}e(vr,`isEndOfFile`),s(vr,`isEndOfFile`);var yr={$type:`Grammar`,imports:`imports`,interfaces:`interfaces`,isDeclared:`isDeclared`,name:`name`,rules:`rules`,types:`types`};function br(e){return P.isInstance(e,yr.$type)}e(br,`isGrammar`),s(br,`isGrammar`);var xr={$type:`GrammarImport`,path:`path`};function Sr(e){return P.isInstance(e,xr.$type)}e(Sr,`isGrammarImport`),s(Sr,`isGrammarImport`);var Cr={$type:`Group`,cardinality:`cardinality`,elements:`elements`,guardCondition:`guardCondition`,predicate:`predicate`};function wr(e){return P.isInstance(e,Cr.$type)}e(wr,`isGroup`),s(wr,`isGroup`);var Tr={$type:`InferredType`,name:`name`};function Er(e){return P.isInstance(e,Tr.$type)}e(Er,`isInferredType`),s(Er,`isInferredType`);var Dr={$type:`InfixRule`,call:`call`,dataType:`dataType`,inferredType:`inferredType`,name:`name`,operators:`operators`,parameters:`parameters`,returnType:`returnType`};function Or(e){return P.isInstance(e,Dr.$type)}e(Or,`isInfixRule`),s(Or,`isInfixRule`);var kr={$type:`InfixRuleOperatorList`,associativity:`associativity`,operators:`operators`};function Ar(e){return P.isInstance(e,kr.$type)}e(Ar,`isInfixRuleOperatorList`),s(Ar,`isInfixRuleOperatorList`);var jr={$type:`InfixRuleOperators`,precedences:`precedences`};function Mr(e){return P.isInstance(e,jr.$type)}e(Mr,`isInfixRuleOperators`),s(Mr,`isInfixRuleOperators`);var Nr={$type:`Interface`,attributes:`attributes`,name:`name`,superTypes:`superTypes`};function Pr(e){return P.isInstance(e,Nr.$type)}e(Pr,`isInterface`),s(Pr,`isInterface`);var Fr={$type:`Keyword`,cardinality:`cardinality`,predicate:`predicate`,value:`value`};function Ir(e){return P.isInstance(e,Fr.$type)}e(Ir,`isKeyword`),s(Ir,`isKeyword`);var Lr={$type:`NamedArgument`,calledByName:`calledByName`,parameter:`parameter`,value:`value`};function Rr(e){return P.isInstance(e,Lr.$type)}e(Rr,`isNamedArgument`),s(Rr,`isNamedArgument`);var zr={$type:`NegatedToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function Br(e){return P.isInstance(e,zr.$type)}e(Br,`isNegatedToken`),s(Br,`isNegatedToken`);var Vr={$type:`Negation`,value:`value`};function Hr(e){return P.isInstance(e,Vr.$type)}e(Hr,`isNegation`),s(Hr,`isNegation`);var Ur={$type:`NumberLiteral`,value:`value`};function Wr(e){return P.isInstance(e,Ur.$type)}e(Wr,`isNumberLiteral`),s(Wr,`isNumberLiteral`);var Gr={$type:`Parameter`,name:`name`};function Kr(e){return P.isInstance(e,Gr.$type)}e(Kr,`isParameter`),s(Kr,`isParameter`);var qr={$type:`ParameterReference`,parameter:`parameter`};function Jr(e){return P.isInstance(e,qr.$type)}e(Jr,`isParameterReference`),s(Jr,`isParameterReference`);var Yr={$type:`ParserRule`,dataType:`dataType`,definition:`definition`,entry:`entry`,fragment:`fragment`,inferredType:`inferredType`,name:`name`,parameters:`parameters`,returnType:`returnType`};function Xr(e){return P.isInstance(e,Yr.$type)}e(Xr,`isParserRule`),s(Xr,`isParserRule`);var Zr={$type:`ReferenceType`,isMulti:`isMulti`,referenceType:`referenceType`};function Qr(e){return P.isInstance(e,Zr.$type)}e(Qr,`isReferenceType`),s(Qr,`isReferenceType`);var $r={$type:`RegexToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,regex:`regex`};function ei(e){return P.isInstance(e,$r.$type)}e(ei,`isRegexToken`),s(ei,`isRegexToken`);var ti={$type:`ReturnType`,name:`name`};function ni(e){return P.isInstance(e,ti.$type)}e(ni,`isReturnType`),s(ni,`isReturnType`);var ri={$type:`RuleCall`,arguments:`arguments`,cardinality:`cardinality`,predicate:`predicate`,rule:`rule`};function ii(e){return P.isInstance(e,ri.$type)}e(ii,`isRuleCall`),s(ii,`isRuleCall`);var ai={$type:`SimpleType`,primitiveType:`primitiveType`,stringType:`stringType`,typeRef:`typeRef`};function oi(e){return P.isInstance(e,ai.$type)}e(oi,`isSimpleType`),s(oi,`isSimpleType`);var si={$type:`StringLiteral`,value:`value`};function ci(e){return P.isInstance(e,si.$type)}e(ci,`isStringLiteral`),s(ci,`isStringLiteral`);var li={$type:`TerminalAlternatives`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function ui(e){return P.isInstance(e,li.$type)}e(ui,`isTerminalAlternatives`),s(ui,`isTerminalAlternatives`);var di={$type:`TerminalElement`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`};function fi(e){return P.isInstance(e,di.$type)}e(fi,`isTerminalElement`),s(fi,`isTerminalElement`);var pi={$type:`TerminalGroup`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function mi(e){return P.isInstance(e,pi.$type)}e(mi,`isTerminalGroup`),s(mi,`isTerminalGroup`);var hi={$type:`TerminalRule`,definition:`definition`,fragment:`fragment`,hidden:`hidden`,name:`name`,type:`type`};function gi(e){return P.isInstance(e,hi.$type)}e(gi,`isTerminalRule`),s(gi,`isTerminalRule`);var _i={$type:`TerminalRuleCall`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,rule:`rule`};function vi(e){return P.isInstance(e,_i.$type)}e(vi,`isTerminalRuleCall`),s(vi,`isTerminalRuleCall`);var yi={$type:`Type`,name:`name`,type:`type`};function bi(e){return P.isInstance(e,yi.$type)}e(bi,`isType`),s(bi,`isType`);var xi={$type:`TypeAttribute`,defaultValue:`defaultValue`,isOptional:`isOptional`,name:`name`,type:`type`};function Si(e){return P.isInstance(e,xi.$type)}e(Si,`isTypeAttribute`),s(Si,`isTypeAttribute`);var Ci={$type:`TypeDefinition`};function wi(e){return P.isInstance(e,Ci.$type)}e(wi,`isTypeDefinition`),s(wi,`isTypeDefinition`);var Ti={$type:`UnionType`,types:`types`};function Ei(e){return P.isInstance(e,Ti.$type)}e(Ei,`isUnionType`),s(Ei,`isUnionType`);var Di={$type:`UnorderedGroup`,cardinality:`cardinality`,elements:`elements`};function Oi(e){return P.isInstance(e,Di.$type)}e(Oi,`isUnorderedGroup`),s(Oi,`isUnorderedGroup`);var ki={$type:`UntilToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function Ai(e){return P.isInstance(e,ki.$type)}e(Ai,`isUntilToken`),s(Ai,`isUntilToken`);var ji={$type:`ValueLiteral`};function Mi(e){return P.isInstance(e,ji.$type)}e(Mi,`isValueLiteral`),s(Mi,`isValueLiteral`);var Ni={$type:`Wildcard`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`};function Pi(e){return P.isInstance(e,Ni.$type)}e(Pi,`isWildcard`),s(Pi,`isWildcard`);var Fi=class extends pn{static{e(this,`LangiumGrammarAstReflection`)}static{s(this,`LangiumGrammarAstReflection`)}constructor(){super(...arguments),this.types={AbstractElement:{name:Vn.$type,properties:{cardinality:{name:Vn.cardinality}},superTypes:[]},AbstractParserRule:{name:Un.$type,properties:{},superTypes:[Gn.$type,qn.$type]},AbstractRule:{name:Gn.$type,properties:{},superTypes:[]},AbstractType:{name:qn.$type,properties:{},superTypes:[]},Action:{name:Yn.$type,properties:{cardinality:{name:Yn.cardinality},feature:{name:Yn.feature},inferredType:{name:Yn.inferredType},operator:{name:Yn.operator},type:{name:Yn.type,referenceType:qn.$type}},superTypes:[Vn.$type]},Alternatives:{name:Zn.$type,properties:{cardinality:{name:Zn.cardinality},elements:{name:Zn.elements,defaultValue:[]}},superTypes:[Vn.$type]},ArrayLiteral:{name:$n.$type,properties:{elements:{name:$n.elements,defaultValue:[]}},superTypes:[ji.$type]},ArrayType:{name:tr.$type,properties:{elementType:{name:tr.elementType}},superTypes:[Ci.$type]},Assignment:{name:rr.$type,properties:{cardinality:{name:rr.cardinality},feature:{name:rr.feature},operator:{name:rr.operator},predicate:{name:rr.predicate},terminal:{name:rr.terminal}},superTypes:[Vn.$type]},BooleanLiteral:{name:ar.$type,properties:{true:{name:ar.true,defaultValue:!1}},superTypes:[lr.$type,ji.$type]},CharacterRange:{name:sr.$type,properties:{cardinality:{name:sr.cardinality},left:{name:sr.left},lookahead:{name:sr.lookahead},parenthesized:{name:sr.parenthesized,defaultValue:!1},right:{name:sr.right}},superTypes:[di.$type]},Condition:{name:lr.$type,properties:{},superTypes:[]},Conjunction:{name:dr.$type,properties:{left:{name:dr.left},right:{name:dr.right}},superTypes:[lr.$type]},CrossReference:{name:pr.$type,properties:{cardinality:{name:pr.cardinality},deprecatedSyntax:{name:pr.deprecatedSyntax,defaultValue:!1},isMulti:{name:pr.isMulti,defaultValue:!1},terminal:{name:pr.terminal},type:{name:pr.type,referenceType:qn.$type}},superTypes:[Vn.$type]},Disjunction:{name:hr.$type,properties:{left:{name:hr.left},right:{name:hr.right}},superTypes:[lr.$type]},EndOfFile:{name:_r.$type,properties:{cardinality:{name:_r.cardinality}},superTypes:[Vn.$type]},Grammar:{name:yr.$type,properties:{imports:{name:yr.imports,defaultValue:[]},interfaces:{name:yr.interfaces,defaultValue:[]},isDeclared:{name:yr.isDeclared,defaultValue:!1},name:{name:yr.name},rules:{name:yr.rules,defaultValue:[]},types:{name:yr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:xr.$type,properties:{path:{name:xr.path}},superTypes:[]},Group:{name:Cr.$type,properties:{cardinality:{name:Cr.cardinality},elements:{name:Cr.elements,defaultValue:[]},guardCondition:{name:Cr.guardCondition},predicate:{name:Cr.predicate}},superTypes:[Vn.$type]},InferredType:{name:Tr.$type,properties:{name:{name:Tr.name}},superTypes:[qn.$type]},InfixRule:{name:Dr.$type,properties:{call:{name:Dr.call},dataType:{name:Dr.dataType},inferredType:{name:Dr.inferredType},name:{name:Dr.name},operators:{name:Dr.operators},parameters:{name:Dr.parameters,defaultValue:[]},returnType:{name:Dr.returnType,referenceType:qn.$type}},superTypes:[Un.$type]},InfixRuleOperatorList:{name:kr.$type,properties:{associativity:{name:kr.associativity},operators:{name:kr.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:jr.$type,properties:{precedences:{name:jr.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Nr.$type,properties:{attributes:{name:Nr.attributes,defaultValue:[]},name:{name:Nr.name},superTypes:{name:Nr.superTypes,defaultValue:[],referenceType:qn.$type}},superTypes:[qn.$type]},Keyword:{name:Fr.$type,properties:{cardinality:{name:Fr.cardinality},predicate:{name:Fr.predicate},value:{name:Fr.value}},superTypes:[Vn.$type]},NamedArgument:{name:Lr.$type,properties:{calledByName:{name:Lr.calledByName,defaultValue:!1},parameter:{name:Lr.parameter,referenceType:Gr.$type},value:{name:Lr.value}},superTypes:[]},NegatedToken:{name:zr.$type,properties:{cardinality:{name:zr.cardinality},lookahead:{name:zr.lookahead},parenthesized:{name:zr.parenthesized,defaultValue:!1},terminal:{name:zr.terminal}},superTypes:[di.$type]},Negation:{name:Vr.$type,properties:{value:{name:Vr.value}},superTypes:[lr.$type]},NumberLiteral:{name:Ur.$type,properties:{value:{name:Ur.value}},superTypes:[ji.$type]},Parameter:{name:Gr.$type,properties:{name:{name:Gr.name}},superTypes:[]},ParameterReference:{name:qr.$type,properties:{parameter:{name:qr.parameter,referenceType:Gr.$type}},superTypes:[lr.$type]},ParserRule:{name:Yr.$type,properties:{dataType:{name:Yr.dataType},definition:{name:Yr.definition},entry:{name:Yr.entry,defaultValue:!1},fragment:{name:Yr.fragment,defaultValue:!1},inferredType:{name:Yr.inferredType},name:{name:Yr.name},parameters:{name:Yr.parameters,defaultValue:[]},returnType:{name:Yr.returnType,referenceType:qn.$type}},superTypes:[Un.$type]},ReferenceType:{name:Zr.$type,properties:{isMulti:{name:Zr.isMulti,defaultValue:!1},referenceType:{name:Zr.referenceType}},superTypes:[Ci.$type]},RegexToken:{name:$r.$type,properties:{cardinality:{name:$r.cardinality},lookahead:{name:$r.lookahead},parenthesized:{name:$r.parenthesized,defaultValue:!1},regex:{name:$r.regex}},superTypes:[di.$type]},ReturnType:{name:ti.$type,properties:{name:{name:ti.name}},superTypes:[]},RuleCall:{name:ri.$type,properties:{arguments:{name:ri.arguments,defaultValue:[]},cardinality:{name:ri.cardinality},predicate:{name:ri.predicate},rule:{name:ri.rule,referenceType:Gn.$type}},superTypes:[Vn.$type]},SimpleType:{name:ai.$type,properties:{primitiveType:{name:ai.primitiveType},stringType:{name:ai.stringType},typeRef:{name:ai.typeRef,referenceType:qn.$type}},superTypes:[Ci.$type]},StringLiteral:{name:si.$type,properties:{value:{name:si.value}},superTypes:[ji.$type]},TerminalAlternatives:{name:li.$type,properties:{cardinality:{name:li.cardinality},elements:{name:li.elements,defaultValue:[]},lookahead:{name:li.lookahead},parenthesized:{name:li.parenthesized,defaultValue:!1}},superTypes:[di.$type]},TerminalElement:{name:di.$type,properties:{cardinality:{name:di.cardinality},lookahead:{name:di.lookahead},parenthesized:{name:di.parenthesized,defaultValue:!1}},superTypes:[Vn.$type]},TerminalGroup:{name:pi.$type,properties:{cardinality:{name:pi.cardinality},elements:{name:pi.elements,defaultValue:[]},lookahead:{name:pi.lookahead},parenthesized:{name:pi.parenthesized,defaultValue:!1}},superTypes:[di.$type]},TerminalRule:{name:hi.$type,properties:{definition:{name:hi.definition},fragment:{name:hi.fragment,defaultValue:!1},hidden:{name:hi.hidden,defaultValue:!1},name:{name:hi.name},type:{name:hi.type}},superTypes:[Gn.$type]},TerminalRuleCall:{name:_i.$type,properties:{cardinality:{name:_i.cardinality},lookahead:{name:_i.lookahead},parenthesized:{name:_i.parenthesized,defaultValue:!1},rule:{name:_i.rule,referenceType:hi.$type}},superTypes:[di.$type]},Type:{name:yi.$type,properties:{name:{name:yi.name},type:{name:yi.type}},superTypes:[qn.$type]},TypeAttribute:{name:xi.$type,properties:{defaultValue:{name:xi.defaultValue},isOptional:{name:xi.isOptional,defaultValue:!1},name:{name:xi.name},type:{name:xi.type}},superTypes:[]},TypeDefinition:{name:Ci.$type,properties:{},superTypes:[]},UnionType:{name:Ti.$type,properties:{types:{name:Ti.types,defaultValue:[]}},superTypes:[Ci.$type]},UnorderedGroup:{name:Di.$type,properties:{cardinality:{name:Di.cardinality},elements:{name:Di.elements,defaultValue:[]}},superTypes:[Vn.$type]},UntilToken:{name:ki.$type,properties:{cardinality:{name:ki.cardinality},lookahead:{name:ki.lookahead},parenthesized:{name:ki.parenthesized,defaultValue:!1},terminal:{name:ki.terminal}},superTypes:[di.$type]},ValueLiteral:{name:ji.$type,properties:{},superTypes:[]},Wildcard:{name:Ni.$type,properties:{cardinality:{name:Ni.cardinality},lookahead:{name:Ni.lookahead},parenthesized:{name:Ni.parenthesized,defaultValue:!1}},superTypes:[di.$type]}}}},P=new Fi;function Ii(e){let t=e,n=!1;for(;t;){let e=En(t.grammarSource,Xr);if(e&&e.dataType)t=t.container,n=!0;else if(n)return t;else return}}e(Ii,`getDatatypeNode`),s(Ii,`getDatatypeNode`);function Li(e){return new Sn(e,e=>mn(e)?e.content:[],{includeRoot:!0})}e(Li,`streamCst`),s(Li,`streamCst`);function Ri(e){return Li(e).filter(hn)}e(Ri,`flattenCst`),s(Ri,`flattenCst`);function zi(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}e(zi,`isChildNode`),s(zi,`isChildNode`);function Bi(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}e(Bi,`tokenToRange`),s(Bi,`tokenToRange`);function Vi(e){if(!e)return;let{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}e(Vi,`toDocumentSegment`),s(Vi,`toDocumentSegment`);var Hi;(function(e){e[e.Before=0]=`Before`,e[e.After=1]=`After`,e[e.OverlapFront=2]=`OverlapFront`,e[e.OverlapBack=3]=`OverlapBack`,e[e.Inside=4]=`Inside`,e[e.Outside=5]=`Outside`})(Hi||={});function Ui(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return Hi.After;let n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,r=e.end.lineHi.After}e(Wi,`inRange`),s(Wi,`inRange`);var Gi=/^[\w\p{L}]$/u;function Ki(e,t,n=Gi){if(e){if(t>0){let r=t-e.offset,i=e.text.charAt(r);n.test(i)||t--}return Yi(e,t)}}e(Ki,`findDeclarationNodeAtOffset`),s(Ki,`findDeclarationNodeAtOffset`);function qi(e,t){if(e){let n=Qi(e,!0);if(n&&Ji(n,t))return n;if(gn(e)){let n=e.content.findIndex(e=>!e.hidden);for(let r=n-1;r>=0;r--){let n=e.content[r];if(Ji(n,t))return n}}}}e(qi,`findCommentNode`),s(qi,`findCommentNode`);function Ji(e,t){return hn(e)&&t.includes(e.tokenType.name)}e(Ji,`isCommentNode`),s(Ji,`isCommentNode`);function Yi(e,t){if(hn(e))return e;if(mn(e)){let n=Zi(e,t,!1);if(n)return Yi(n,t)}}e(Yi,`findLeafNodeAtOffset`),s(Yi,`findLeafNodeAtOffset`);function Xi(e,t){if(hn(e))return e;if(mn(e)){let n=Zi(e,t,!0);if(n)return Xi(n,t)}}e(Xi,`findLeafNodeBeforeOffset`),s(Xi,`findLeafNodeBeforeOffset`);function Zi(e,t,n){let r=0,i=e.content.length-1,a;for(;r<=i;){let o=Math.floor((r+i)/2),s=e.content[o];if(s.offset<=t&&s.end>t)return s;s.end<=t?(a=n?s:void 0,r=o+1):i=o-1}return a}e(Zi,`binarySearch`),s(Zi,`binarySearch`);function Qi(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e);for(;r>0;){r--;let e=n.content[r];if(t||!e.hidden)return e}e=n}}e(Qi,`getPreviousNode`),s(Qi,`getPreviousNode`);function $i(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e),i=n.content.length-1;for(;rGa,`findAssignment`),findNameAssignment:e(()=>Ka,`findNameAssignment`),findNodeForKeyword:e(()=>Ua,`findNodeForKeyword`),findNodeForProperty:e(()=>Ba,`findNodeForProperty`),findNodesForKeyword:e(()=>Ha,`findNodesForKeyword`),findNodesForKeywordInternal:e(()=>Wa,`findNodesForKeywordInternal`),findNodesForProperty:e(()=>za,`findNodesForProperty`),getActionAtElement:e(()=>Ja,`getActionAtElement`),getActionType:e(()=>io,`getActionType`),getAllReachableRules:e(()=>Pa,`getAllReachableRules`),getAllRulesUsedForCrossReferences:e(()=>Ia,`getAllRulesUsedForCrossReferences`),getCrossReferenceTerminal:e(()=>La,`getCrossReferenceTerminal`),getEntryRule:e(()=>Ma,`getEntryRule`),getExplicitRuleType:e(()=>no,`getExplicitRuleType`),getHiddenRules:e(()=>Na,`getHiddenRules`),getRuleType:e(()=>oo,`getRuleType`),getRuleTypeName:e(()=>ao,`getRuleTypeName`),getTypeName:e(()=>ro,`getTypeName`),isArrayCardinality:e(()=>Xa,`isArrayCardinality`),isArrayOperator:e(()=>Za,`isArrayOperator`),isCommentTerminal:e(()=>Ra,`isCommentTerminal`),isDataType:e(()=>eo,`isDataType`),isDataTypeRule:e(()=>Qa,`isDataTypeRule`),isOptionalCardinality:e(()=>Ya,`isOptionalCardinality`),terminalRegex:e(()=>so,`terminalRegex`)});var aa=class extends Error{static{e(this,`ErrorWithLocation`)}static{s(this,`ErrorWithLocation`)}constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};function oa(e,t=`Error: Got unexpected value.`){throw Error(t)}e(oa,`assertUnreachable`),s(oa,`assertUnreachable`);function sa(e,t=`Error: Condition is violated.`){if(!e)throw Error(t)}e(sa,`assertCondition`),s(sa,`assertCondition`);var ca={};u(ca,{NEWLINE_REGEXP:e(()=>Sa,`NEWLINE_REGEXP`),escapeRegExp:e(()=>ka,`escapeRegExp`),getTerminalParts:e(()=>Ta,`getTerminalParts`),isMultilineComment:e(()=>Ea,`isMultilineComment`),isWhitespace:e(()=>Oa,`isWhitespace`),partialMatches:e(()=>Aa,`partialMatches`),partialRegExp:e(()=>ja,`partialRegExp`),whitespaceCharacters:e(()=>Da,`whitespaceCharacters`)});function F(e){return e.charCodeAt(0)}e(F,`cc`),s(F,`cc`);function la(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}e(la,`insertToSet`),s(la,`insertToSet`);function ua(e,t){if(e[t]===!0)throw`duplicate flag `+t;e[t],e[t]=!0}e(ua,`addFlag`),s(ua,`addFlag`);function da(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`);return!0}e(da,`ASSERT_EXISTS`),s(da,`ASSERT_EXISTS`);function fa(){throw Error(`Internal Error - Should never get here!`)}e(fa,`ASSERT_NEVER_REACH_HERE`),s(fa,`ASSERT_NEVER_REACH_HERE`);function pa(e){return e.type===`Character`}e(pa,`isCharacter`),s(pa,`isCharacter`);var ma=[];for(let e=F(`0`);e<=F(`9`);e++)ma.push(e);var ha=[F(`_`)].concat(ma);for(let e=F(`a`);e<=F(`z`);e++)ha.push(e);for(let e=F(`A`);e<=F(`Z`);e++)ha.push(e);var ga=[F(` `),F(`\f`),F(` +`),F(`\r`),F(` `),F(`\v`),F(` `),F(`\xA0`),F(` `),F(` `),F(` `),F(` `),F(` `),F(` `),F(` `),F(` `),F(` `),F(` `),F(` `),F(` `),F(`\u2028`),F(`\u2029`),F(` `),F(` `),F(` `),F(``)],_a=/[0-9a-fA-F]/,va=/[0-9]/,ya=/[1-9]/,ba=class{static{e(this,`RegExpParser`)}static{s(this,`RegExpParser`)}constructor(){this.idx=0,this.input=``,this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar(`/`);let t=this.disjunction();this.consumeChar(`/`);let n={type:`Flags`,loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case`g`:ua(n,`global`);break;case`i`:ua(n,`ignoreCase`);break;case`m`:ua(n,`multiLine`);break;case`u`:ua(n,`unicode`);break;case`y`:ua(n,`sticky`)}if(this.idx!==this.input.length)throw Error(`Redundant input: `+this.input.substring(this.idx));return{type:`Pattern`,flags:n,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()===`|`;)this.consumeChar(`|`),e.push(this.alternative());return{type:`Disjunction`,value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:`Alternative`,value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case`^`:return{type:`StartAnchor`,loc:this.loc(e)};case`$`:return{type:`EndAnchor`,loc:this.loc(e)};case`\\`:switch(this.popChar()){case`b`:return{type:`WordBoundary`,loc:this.loc(e)};case`B`:return{type:`NonWordBoundary`,loc:this.loc(e)}}throw Error(`Invalid Assertion Escape`);case`(`:this.consumeChar(`?`);let t;switch(this.popChar()){case`=`:t=`Lookahead`;break;case`!`:t=`NegativeLookahead`;break;case`<`:switch(this.popChar()){case`=`:t=`Lookbehind`;break;case`!`:t=`NegativeLookbehind`}}da(t);let n=this.disjunction();return this.consumeChar(`)`),{type:t,value:n,loc:this.loc(e)}}return fa()}quantifier(e=!1){let t,n=this.idx;switch(this.popChar()){case`*`:t={atLeast:0,atMost:1/0};break;case`+`:t={atLeast:1,atMost:1/0};break;case`?`:t={atLeast:0,atMost:1};break;case`{`:let n=this.integerIncludingZero();switch(this.popChar()){case`}`:t={atLeast:n,atMost:n};break;case`,`:let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:n,atMost:e}):t={atLeast:n,atMost:1/0},this.consumeChar(`}`)}if(e===!0&&t===void 0)return;da(t)}if((e!==!0||t!==void 0)&&da(t))return this.peekChar(0)===`?`?(this.consumeChar(`?`),t.greedy=!1):t.greedy=!0,t.type=`Quantifier`,t.loc=this.loc(n),t}atom(){let e,t=this.idx;switch(this.peekChar()){case`.`:e=this.dotAll();break;case`\\`:e=this.atomEscape();break;case`[`:e=this.characterClass();break;case`(`:e=this.group()}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),da(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):fa()}dotAll(){return this.consumeChar(`.`),{type:`Set`,complement:!0,value:[F(` +`),F(`\r`),F(`\u2028`),F(`\u2029`)]}}atomEscape(){switch(this.consumeChar(`\\`),this.peekChar()){case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:return this.decimalEscapeAtom();case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:`GroupBackReference`,value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case`d`:e=ma;break;case`D`:e=ma,t=!0;break;case`s`:e=ga;break;case`S`:e=ga,t=!0;break;case`w`:e=ha;break;case`W`:e=ha,t=!0}return da(e)?{type:`Set`,value:e,complement:t}:fa()}controlEscapeAtom(){let e;switch(this.popChar()){case`f`:e=F(`\f`);break;case`n`:e=F(` +`);break;case`r`:e=F(`\r`);break;case`t`:e=F(` `);break;case`v`:e=F(`\v`)}return da(e)?{type:`Character`,value:e}:fa()}controlLetterEscapeAtom(){this.consumeChar(`c`);let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error(`Invalid `);return{type:`Character`,value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar(`0`),{type:`Character`,value:F(`\0`)}}hexEscapeSequenceAtom(){return this.consumeChar(`x`),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar(`u`),this.parseHexDigits(4)}identityEscapeAtom(){return{type:`Character`,value:F(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case` +`:case`\r`:case`\u2028`:case`\u2029`:case`\\`:case`]`:throw Error(`TBD`);default:return{type:`Character`,value:F(this.popChar())}}}characterClass(){let e=[],t=!1;for(this.consumeChar(`[`),this.peekChar(0)===`^`&&(this.consumeChar(`^`),t=!0);this.isClassAtom();){let t=this.classAtom();if(t.type,pa(t)&&this.isRangeDash()){this.consumeChar(`-`);let n=this.classAtom();if(n.type,pa(n)){if(n.value=this.input.length)throw Error(`Unexpected end of input`);this.idx++}loc(e){return{begin:e,end:this.idx}}},xa=class{static{e(this,`BaseRegExpVisitor`)}static{s(this,`BaseRegExpVisitor`)}visitChildren(e){for(let t in e){let n=e[t];e.hasOwnProperty(t)&&(n.type===void 0?Array.isArray(n)&&n.forEach(e=>{this.visit(e)},this):this.visit(n))}}visit(e){switch(e.type){case`Pattern`:this.visitPattern(e);break;case`Flags`:this.visitFlags(e);break;case`Disjunction`:this.visitDisjunction(e);break;case`Alternative`:this.visitAlternative(e);break;case`StartAnchor`:this.visitStartAnchor(e);break;case`EndAnchor`:this.visitEndAnchor(e);break;case`WordBoundary`:this.visitWordBoundary(e);break;case`NonWordBoundary`:this.visitNonWordBoundary(e);break;case`Lookahead`:this.visitLookahead(e);break;case`NegativeLookahead`:this.visitNegativeLookahead(e);break;case`Lookbehind`:this.visitLookbehind(e);break;case`NegativeLookbehind`:this.visitNegativeLookbehind(e);break;case`Character`:this.visitCharacter(e);break;case`Set`:this.visitSet(e);break;case`Group`:this.visitGroup(e);break;case`GroupBackReference`:this.visitGroupBackReference(e);break;case`Quantifier`:this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},Sa=/\r?\n/gm,Ca=new ba,wa=new class extends xa{static{e(this,`TerminalRegExpVisitor`)}static{s(this,`TerminalRegExpVisitor`)}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join(``)}reset(e){this.multiline=!1,this.regex=e,this.startRegexp=``,this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let t=String.fromCharCode(e.value);if(!this.multiline&&t===` +`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let e=ka(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){let t=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(t);this.multiline=!!` +`.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){e.type===`Group`&&e.quantifier||super.visitChildren(e)}};function Ta(e){try{typeof e!=`string`&&(e=e.source),e=`/${e}/`;let t=Ca.pattern(e),n=[];for(let r of t.value.value)wa.reset(e),wa.visit(r),n.push({start:wa.startRegexp,end:wa.endRegex});return n}catch{return[]}}e(Ta,`getTerminalParts`),s(Ta,`getTerminalParts`);function Ea(e){try{return typeof e==`string`&&(e=new RegExp(e)),e=e.toString(),wa.reset(e),wa.visit(Ca.pattern(e)),wa.multiline}catch{return!1}}e(Ea,`isMultilineComment`),s(Ea,`isMultilineComment`);var Da=`\f +\r \v \xA0            \u2028\u2029   `.split(``);function Oa(e){let t=typeof e==`string`?new RegExp(e):e;return Da.some(e=>t.test(e))}e(Oa,`isWhitespace`),s(Oa,`isWhitespace`);function ka(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}e(ka,`escapeRegExp`),s(ka,`escapeRegExp`);function Aa(e,t){let n=ja(e),r=t.match(n);return!!r&&r[0].length>0}e(Aa,`partialMatches`),s(Aa,`partialMatches`);function ja(t){typeof t==`string`&&(t=new RegExp(t));let n=t,r=t.source,i=0;function a(){let t=``,o;function c(e){t+=r.substr(i,e),i+=e}e(c,`appendRaw`),s(c,`appendRaw`);function l(e){t+=`(?:`+r.substr(i,e)+`|$)`,i+=e}for(e(l,`appendOptional`),s(l,`appendOptional`);i`,i)-i+1);break;default:l(2)}break;case`[`:o=/\[(?:\\.|.)*?\]/g,o.lastIndex=i,o=o.exec(r)||[],l(o[0].length);break;case`|`:case`^`:case`$`:case`*`:case`+`:case`?`:c(1);break;case`{`:o=/\{\d+,?\d*\}/g,o.lastIndex=i,o=o.exec(r),o?c(o[0].length):l(1);break;case`(`:if(r[i+1]===`?`)switch(r[i+2]){case`:`:t+=`(?:`,i+=3,t+=a()+`|$)`;break;case`=`:t+=`(?=`,i+=3,t+=a()+`)`;break;case`!`:o=i,i+=3,a(),t+=r.substr(o,i-o);break;case`<`:switch(r[i+3]){case`=`:case`!`:o=i,i+=4,a(),t+=r.substr(o,i-o);break;default:c(r.indexOf(`>`,i)-i+1),t+=a()+`|$)`}}else c(1),t+=a()+`|$)`;break;case`)`:return++i,t;default:l(1)}return t}return e(a,`process2`),s(a,`process`),new RegExp(a(),t.flags)}e(ja,`partialRegExp`),s(ja,`partialRegExp`);function Ma(e){return e.rules.find(e=>Xr(e)&&e.entry)}e(Ma,`getEntryRule`),s(Ma,`getEntryRule`);function Na(e){return e.rules.filter(e=>gi(e)&&e.hidden)}e(Na,`getHiddenRules`),s(Na,`getHiddenRules`);function Pa(e,t){let n=new Set,r=Ma(e);if(!r)return new Set(e.rules);let i=[r].concat(Na(e));for(let e of i)Fa(e,n,t);let a=new Set;for(let t of e.rules)(n.has(t.name)||gi(t)&&t.hidden)&&a.add(t);return a}e(Pa,`getAllReachableRules`),s(Pa,`getAllReachableRules`);function Fa(e,t,n){t.add(e.name),Mn(e).forEach(e=>{if(ii(e)||n&&vi(e)){let r=e.rule.ref;r&&!t.has(r.name)&&Fa(r,t,n)}})}e(Fa,`ruleDfs`),s(Fa,`ruleDfs`);function Ia(e){let t=new Set;return Mn(e).forEach(e=>{mr(e)&&(Xr(e.type.ref)&&t.add(e.type.ref),Er(e.type.ref)&&Xr(e.type.ref.$container)&&t.add(e.type.ref.$container))}),t}e(Ia,`getAllRulesUsedForCrossReferences`),s(Ia,`getAllRulesUsedForCrossReferences`);function La(e){if(e.terminal)return e.terminal;if(e.type.ref)return Ka(e.type.ref)?.terminal}e(La,`getCrossReferenceTerminal`),s(La,`getCrossReferenceTerminal`);function Ra(e){return e.hidden&&!Oa(so(e))}e(Ra,`isCommentTerminal`),s(Ra,`isCommentTerminal`);function za(e,t){return!e||!t?[]:Va(e,t,e.astNode,!0)}e(za,`findNodesForProperty`),s(za,`findNodesForProperty`);function Ba(e,t,n){if(!e||!t)return;let r=Va(e,t,e.astNode,!0);if(r.length!==0)return n=n===void 0?0:Math.max(0,Math.min(n,r.length-1)),r[n]}e(Ba,`findNodeForProperty`),s(Ba,`findNodeForProperty`);function Va(e,t,n,r){if(!r){let n=En(e.grammarSource,ir);if(n&&n.feature===t)return[e]}return mn(e)&&e.astNode===n?e.content.flatMap(e=>Va(e,t,n,!1)):[]}e(Va,`findNodesForPropertyInternal`),s(Va,`findNodesForPropertyInternal`);function Ha(e,t){return e?Wa(e,t,e?.astNode):[]}e(Ha,`findNodesForKeyword`),s(Ha,`findNodesForKeyword`);function Ua(e,t,n){if(!e)return;let r=Wa(e,t,e?.astNode);if(r.length!==0)return n=n===void 0?0:Math.max(0,Math.min(n,r.length-1)),r[n]}e(Ua,`findNodeForKeyword`),s(Ua,`findNodeForKeyword`);function Wa(e,t,n){if(e.astNode!==n)return[];if(Ir(e.grammarSource)&&e.grammarSource.value===t)return[e];let r=Li(e).iterator(),i,a=[];do if(i=r.next(),!i.done){let e=i.value;e.astNode===n?Ir(e.grammarSource)&&e.grammarSource.value===t&&a.push(e):r.prune()}while(!i.done);return a}e(Wa,`findNodesForKeywordInternal`),s(Wa,`findNodesForKeywordInternal`);function Ga(e){let t=e.astNode;for(;t===e.container?.astNode;){let t=En(e.grammarSource,ir);if(t)return t;e=e.container}}e(Ga,`findAssignment`),s(Ga,`findAssignment`);function Ka(e){let t=e;return Er(t)&&(Xn(t.$container)?t=t.$container.$container:Wn(t.$container)?t=t.$container:oa(t.$container)),qa(e,t,new Map)}e(Ka,`findNameAssignment`),s(Ka,`findNameAssignment`);function qa(t,n,r){function i(e,n){let i;return En(e,ir)||(i=qa(n,n,r)),r.set(t,i),i}if(e(i,`go`),s(i,`go`),r.has(t))return r.get(t);r.set(t,void 0);for(let e of Mn(n))if(ir(e)&&e.feature.toLowerCase()===`name`)return r.set(t,e),e;else if(ii(e)&&Xr(e.rule.ref))return i(e,e.rule.ref);else if(oi(e)&&e.typeRef?.ref)return i(e,e.typeRef.ref)}e(qa,`findNameAssignmentInternal`),s(qa,`findNameAssignmentInternal`);function Ja(e){let t=e.$container;if(wr(t)){let n=t.elements,r=n.indexOf(e);for(let e=r-1;e>=0;e--){let t=n[e];if(Xn(t))return t;{let t=Mn(n[e]).find(Xn);if(t)return t}}}if(Hn(t))return Ja(t)}e(Ja,`getActionAtElement`),s(Ja,`getActionAtElement`);function Ya(e,t){return e===`?`||e===`*`||wr(t)&&!!t.guardCondition}e(Ya,`isOptionalCardinality`),s(Ya,`isOptionalCardinality`);function Xa(e){return e===`*`||e===`+`}e(Xa,`isArrayCardinality`),s(Xa,`isArrayCardinality`);function Za(e){return e===`+=`}e(Za,`isArrayOperator`),s(Za,`isArrayOperator`);function Qa(e){return $a(e,new Set)}e(Qa,`isDataTypeRule`),s(Qa,`isDataTypeRule`);function $a(e,t){if(t.has(e))return!0;t.add(e);for(let n of Mn(e))if(ii(n)){if(!n.rule.ref||Xr(n.rule.ref)&&!$a(n.rule.ref,t)||Or(n.rule.ref))return!1}else if(ir(n))return!1;else if(Xn(n))return!1;return!!e.definition}e($a,`isDataTypeRuleInternal`),s($a,`isDataTypeRuleInternal`);function eo(e){return to(e.type,new Set)}e(eo,`isDataType`),s(eo,`isDataType`);function to(e,t){if(t.has(e))return!0;if(t.add(e),nr(e)||Qr(e))return!1;if(Ei(e))return e.types.every(e=>to(e,t));if(oi(e)){if(e.primitiveType!==void 0||e.stringType!==void 0)return!0;if(e.typeRef!==void 0){let n=e.typeRef.ref;return bi(n)?to(n.type,t):!1}return!1}return!1}e(to,`isDataTypeInternal`),s(to,`isDataTypeInternal`);function no(e){if(!gi(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){let t=e.returnType.ref;if(t)return t.name}}}e(no,`getExplicitRuleType`),s(no,`getExplicitRuleType`);function ro(e){if(Wn(e))return Xr(e)&&Qa(e)?e.name:no(e)??e.name;if(Pr(e)||bi(e)||ni(e))return e.name;if(Xn(e)){let t=io(e);if(t)return t}else if(Er(e))return e.name;throw Error(`Cannot get name of Unknown Type`)}e(ro,`getTypeName`),s(ro,`getTypeName`);function io(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return ro(e.type.ref)}e(io,`getActionType`),s(io,`getActionType`);function ao(e){return gi(e)?e.type?.name??`string`:Xr(e)&&Qa(e)?e.name:no(e)??e.name}e(ao,`getRuleTypeName`),s(ao,`getRuleTypeName`);function oo(e){return gi(e)?e.type?.name??`string`:no(e)??e.name}e(oo,`getRuleType`),s(oo,`getRuleType`);function so(e){let t={s:!1,i:!1,u:!1},n=lo(e.definition,t),r=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join(``);return new RegExp(n,r)}e(so,`terminalRegex`),s(so,`terminalRegex`);var co=`[\\s\\S]`;function lo(e,t){if(ui(e))return uo(e);if(mi(e))return fo(e);if(cr(e))return ho(e);if(vi(e)){let t=e.rule.ref;if(!t)throw Error(`Missing rule reference.`);return _o(lo(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}if(Br(e))return mo(e);if(Ai(e))return po(e);if(ei(e)){let n=e.regex.lastIndexOf(`/`),r=e.regex.substring(1,n),i=e.regex.substring(n+1);return t&&(t.i=i.includes(`i`),t.s=i.includes(`s`),t.u=i.includes(`u`)),_o(r,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}if(Pi(e))return _o(co,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}e(lo,`abstractElementToRegex`),s(lo,`abstractElementToRegex`);function uo(e){return _o(e.elements.map(e=>lo(e)).join(`|`),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}e(uo,`terminalAlternativesToRegex`),s(uo,`terminalAlternativesToRegex`);function fo(e){return _o(e.elements.map(e=>lo(e)).join(``),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}e(fo,`terminalGroupToRegex`),s(fo,`terminalGroupToRegex`);function po(e){return _o(`${co}*?${lo(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}e(po,`untilTokenToRegex`),s(po,`untilTokenToRegex`);function mo(e){return _o(`(?!${lo(e.terminal)})${co}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}e(mo,`negateTokenToRegex`),s(mo,`negateTokenToRegex`);function ho(e){return e.right?_o(`[${go(e.left)}-${go(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):_o(go(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}e(ho,`characterRangeToRegex`),s(ho,`characterRangeToRegex`);function go(e){return ka(e.value)}e(go,`keywordToRegex`),s(go,`keywordToRegex`);function _o(e,t){return(t.parenthesized||t.lookahead||t.wrap!==!1)&&(e=`(${t.lookahead??(t.parenthesized?``:`?:`)}${e})`),t.cardinality?`${e}${t.cardinality}`:e}e(_o,`withCardinality`),s(_o,`withCardinality`);function vo(e){let t=[],n=e.Grammar;for(let e of n.rules)gi(e)&&Ra(e)&&Ea(so(e))&&t.push(e.name);return{multilineCommentRules:t,nameRegexp:Gi}}e(vo,`createGrammarConfig`),s(vo,`createGrammarConfig`);var yo=typeof global==`object`&&global&&global.Object===Object&&global,bo=typeof self==`object`&&self&&self.Object===Object&&self,xo=yo||bo||Function(`return this`)(),So=xo.Symbol,Co=Object.prototype,wo=Co.hasOwnProperty,To=Co.toString,Eo=So?So.toStringTag:void 0;function Do(e){var t=wo.call(e,Eo),n=e[Eo];try{e[Eo]=void 0;var r=!0}catch{}var i=To.call(e);return r&&(t?e[Eo]=n:delete e[Eo]),i}e(Do,`getRawTag`),s(Do,`getRawTag`);var Oo=Do,ko=Object.prototype.toString;function Ao(e){return ko.call(e)}e(Ao,`objectToString`),s(Ao,`objectToString`);var jo=Ao,Mo=`[object Null]`,No=`[object Undefined]`,Po=So?So.toStringTag:void 0;function Fo(e){return e==null?e===void 0?No:Mo:Po&&Po in Object(e)?Oo(e):jo(e)}e(Fo,`baseGetTag`),s(Fo,`baseGetTag`);var Io=Fo;function Lo(e){return typeof e==`object`&&!!e}e(Lo,`isObjectLike`),s(Lo,`isObjectLike`);var Ro=Lo,zo=`[object Symbol]`;function Bo(e){return typeof e==`symbol`||Ro(e)&&Io(e)==zo}e(Bo,`isSymbol`),s(Bo,`isSymbol`);var Vo=Bo;function Ho(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n0){if(++t>=$s)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}e(nc,`shortOut`),s(nc,`shortOut`);var rc=nc;function ic(e){return function(){return e}}e(ic,`constant`),s(ic,`constant`);var ac=ic,oc=(function(){try{var e=Us(Object,`defineProperty`);return e({},``,{}),e}catch{}})(),sc=rc(oc?function(e,t){return oc(e,`toString`,{configurable:!0,enumerable:!1,value:ac(t),writable:!0})}:_s);function cc(e,t){for(var n=-1,r=e==null?0:e.length;++n-1}e(vc,`arrayIncludes`),s(vc,`arrayIncludes`);var yc=vc,bc=9007199254740991,xc=/^(?:0|[1-9]\d*)$/;function Sc(e,t){var n=typeof e;return t??=bc,!!t&&(n==`number`||n!=`symbol`&&xc.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Rc}e(zc,`isLength`),s(zc,`isLength`);var Bc=zc;function Vc(e){return e!=null&&Bc(e.length)&&!Cs(e)}e(Vc,`isArrayLike`),s(Vc,`isArrayLike`);var Hc=Vc;function Uc(e,t,n){if(!ns(n))return!1;var r=typeof t;return(r==`number`?Hc(n)&&Cc(t,n.length):r==`string`&&t in n)?Dc(n[t],e):!1}e(Uc,`isIterateeCall`),s(Uc,`isIterateeCall`);var Wc=Uc;function Gc(e){return Lc(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&Wc(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r-1}e(Vu,`listCacheHas`),s(Vu,`listCacheHas`);var Hu=Vu;function Uu(e,t){var n=this.__data__,r=Fu(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}e(Uu,`listCacheSet`),s(Uu,`listCacheSet`);var Wu=Uu;function Gu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(s)?t>1?Fd(s,t-1,n,r,i):jd(i,s):r||(i[i.length]=s)}return i}e(Fd,`baseFlatten`),s(Fd,`baseFlatten`);var Id=Fd;function Ld(e){return e!=null&&e.length?Id(e,1):[]}e(Ld,`flatten`),s(Ld,`flatten`);var Rd=Ld,zd=Yl(Object.getPrototypeOf,Object);function Bd(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++rs))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Rm?new Mm:void 0;for(a.set(e,t),a.set(t,e);++d2?t[2]:void 0;for(i&&Wc(t[0],t[1],i)&&(r=1);++n=gg&&(a=Im,o=!1,t=new Mm(t));outer:for(;++i-1?i[a?t[o]:o]:void 0}}e(zg,`createFind`),s(zg,`createFind`);var Bg=zg,Vg=Math.max;function Hg(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:hs(n);return i<0&&(i=Vg(r+i,0)),dc(e,Xh(t,3),i)}e(Hg,`findIndex`),s(Hg,`findIndex`);var Ug=Bg(Hg);function Wg(e){return e&&e.length?e[0]:void 0}e(Wg,`head`),s(Wg,`head`);var Gg=Wg;function Kg(e,t){var n=-1,r=Hc(e)?Array(e.length):[];return ig(e,function(e,i,a){r[++n]=t(e,i,a)}),r}e(Kg,`baseMap`),s(Kg,`baseMap`);var qg=Kg;function Jg(e,t){return(I(e)?Uo:qg)(e,Xh(t,3))}e(Jg,`map`),s(Jg,`map`);var B=Jg;function Yg(e,t){return Id(B(e,t),1)}e(Yg,`flatMap`),s(Yg,`flatMap`);var Xg=Yg,Zg=Object.prototype.hasOwnProperty,Qg=cg(function(e,t,n){Zg.call(e,n)?e[n].push(t):Tc(e,n,[t])}),$g=Object.prototype.hasOwnProperty;function e_(e,t){return e!=null&&$g.call(e,t)}e(e_,`baseHas`),s(e_,`baseHas`);var t_=e_;function n_(e,t){return e!=null&&Ih(e,t,t_)}e(n_,`has`),s(n_,`has`);var V=n_,r_=`[object String]`;function i_(e){return typeof e==`string`||!I(e)&&Ro(e)&&Io(e)==r_}e(i_,`isString`),s(i_,`isString`);var a_=i_;function o_(e,t){return Uo(t,function(t){return e[t]})}e(o_,`baseValues`),s(o_,`baseValues`);var s_=o_;function c_(e){return e==null?[]:s_(e,tu(e))}e(c_,`values`),s(c_,`values`);var H=c_,l_=Math.max;function u_(e,t,n,r){e=Hc(e)?e:H(e),n=n&&!r?hs(n):0;var i=e.length;return n<0&&(n=l_(i+n,0)),a_(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&_c(e,t,n)>-1}e(u_,`includes`),s(u_,`includes`);var d_=u_,f_=Math.max;function p_(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:hs(n);return i<0&&(i=f_(r+i,0)),_c(e,t,i)}e(p_,`indexOf`),s(p_,`indexOf`);var m_=p_,h_=`[object Map]`,g_=`[object Set]`,__=Object.prototype.hasOwnProperty;function v_(e){if(e==null)return!0;if(Hc(e)&&(I(e)||typeof e==`string`||typeof e.splice==`function`||ul(e)||Wl(e)||il(e)))return!e.length;var t=qf(e);if(t==h_||t==g_)return!e.size;if(Yc(e))return!$l(e).length;for(var n in e)if(__.call(e,n))return!1;return!0}e(v_,`isEmpty`),s(v_,`isEmpty`);var U=v_,y_=`[object RegExp]`;function b_(e){return Ro(e)&&Io(e)==y_}e(b_,`baseIsRegExp`),s(b_,`baseIsRegExp`);var x_=b_,S_=Hl&&Hl.isRegExp,C_=S_?Rl(S_):x_;function w_(e){return e===void 0}e(w_,`isUndefined`),s(w_,`isUndefined`);var T_=w_,E_=`Expected a function`;function D_(e){if(typeof e!=`function`)throw TypeError(E_);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}e(D_,`negate`),s(D_,`negate`);var O_=D_;function k_(e,t,n,r){if(!ns(e))return e;t=Sd(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i=K_){var l=t?null:G_(e);if(l)return Wm(l);o=!1,i=Im,c=new Mm}else c=t?[]:s;outer:for(;++r{t.accept(e)})}},iv=class extends rv{static{e(this,`NonTerminal`)}static{s(this,`NonTerminal`)}constructor(e){super([]),this.idx=1,ru(this,P_(e,e=>e!==void 0))}set definition(e){}get definition(){return this.referencedRule===void 0?[]:this.referencedRule.definition}accept(e){e.visit(this)}},av=class extends rv{static{e(this,`Rule`)}static{s(this,`Rule`)}constructor(e){super(e.definition),this.orgText=``,ru(this,P_(e,e=>e!==void 0))}},ov=class extends rv{static{e(this,`Alternative`)}static{s(this,`Alternative`)}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,ru(this,P_(e,e=>e!==void 0))}},sv=class extends rv{static{e(this,`Option`)}static{s(this,`Option`)}constructor(e){super(e.definition),this.idx=1,ru(this,P_(e,e=>e!==void 0))}},cv=class extends rv{static{e(this,`RepetitionMandatory`)}static{s(this,`RepetitionMandatory`)}constructor(e){super(e.definition),this.idx=1,ru(this,P_(e,e=>e!==void 0))}},lv=class extends rv{static{e(this,`RepetitionMandatoryWithSeparator`)}static{s(this,`RepetitionMandatoryWithSeparator`)}constructor(e){super(e.definition),this.idx=1,ru(this,P_(e,e=>e!==void 0))}},W=class extends rv{static{e(this,`Repetition`)}static{s(this,`Repetition`)}constructor(e){super(e.definition),this.idx=1,ru(this,P_(e,e=>e!==void 0))}},uv=class extends rv{static{e(this,`RepetitionWithSeparator`)}static{s(this,`RepetitionWithSeparator`)}constructor(e){super(e.definition),this.idx=1,ru(this,P_(e,e=>e!==void 0))}},dv=class extends rv{static{e(this,`Alternation`)}static{s(this,`Alternation`)}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,ru(this,P_(e,e=>e!==void 0))}},G=class{static{e(this,`Terminal`)}static{s(this,`Terminal`)}constructor(e){this.idx=1,ru(this,P_(e,e=>e!==void 0))}accept(e){e.visit(this)}};function fv(e){return B(e,pv)}e(fv,`serializeGrammar`),s(fv,`serializeGrammar`);function pv(t){function n(e){return B(e,pv)}if(e(n,`convertDefinition`),s(n,`convertDefinition`),t instanceof iv){let e={type:`NonTerminal`,name:t.nonTerminalName,idx:t.idx};return a_(t.label)&&(e.label=t.label),e}if(t instanceof ov)return{type:`Alternative`,definition:n(t.definition)};if(t instanceof sv)return{type:`Option`,idx:t.idx,definition:n(t.definition)};if(t instanceof cv)return{type:`RepetitionMandatory`,idx:t.idx,definition:n(t.definition)};if(t instanceof lv)return{type:`RepetitionMandatoryWithSeparator`,idx:t.idx,separator:pv(new G({terminalType:t.separator})),definition:n(t.definition)};if(t instanceof uv)return{type:`RepetitionWithSeparator`,idx:t.idx,separator:pv(new G({terminalType:t.separator})),definition:n(t.definition)};if(t instanceof W)return{type:`Repetition`,idx:t.idx,definition:n(t.definition)};if(t instanceof dv)return{type:`Alternation`,idx:t.idx,definition:n(t.definition)};if(t instanceof G){let e={type:`Terminal`,name:t.terminalType.name,label:tv(t.terminalType),idx:t.idx};a_(t.label)&&(e.terminalLabel=t.label);let n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(e.pattern=C_(n)?n.source:n),e}if(t instanceof av)return{type:`Rule`,name:t.name,orgText:t.orgText,definition:n(t.definition)};throw Error(`non exhaustive match`)}e(pv,`serializeProduction`),s(pv,`serializeProduction`);var mv=class{static{e(this,`GAstVisitor`)}static{s(this,`GAstVisitor`)}visit(e){let t=e;switch(t.constructor){case iv:return this.visitNonTerminal(t);case ov:return this.visitAlternative(t);case sv:return this.visitOption(t);case cv:return this.visitRepetitionMandatory(t);case lv:return this.visitRepetitionMandatoryWithSeparator(t);case uv:return this.visitRepetitionWithSeparator(t);case W:return this.visitRepetition(t);case dv:return this.visitAlternation(t);case G:return this.visitTerminal(t);case av:return this.visitRule(t);default:throw Error(`non exhaustive match`)}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};function hv(e){return e instanceof ov||e instanceof sv||e instanceof W||e instanceof cv||e instanceof lv||e instanceof uv||e instanceof G||e instanceof av}e(hv,`isSequenceProd`),s(hv,`isSequenceProd`);function gv(e,t=[]){return e instanceof sv||e instanceof W||e instanceof uv?!0:e instanceof dv?W_(e.definition,e=>gv(e,t)):e instanceof iv&&d_(t,e)?!1:e instanceof rv&&(e instanceof iv&&t.push(e),Pg(e.definition,e=>gv(e,t)))}e(gv,`isOptionalProd`),s(gv,`isOptionalProd`);function _v(e){return e instanceof dv}e(_v,`isBranchingProd`),s(_v,`isBranchingProd`);function vv(e){if(e instanceof iv)return`SUBRULE`;if(e instanceof sv)return`OPTION`;if(e instanceof dv)return`OR`;if(e instanceof cv)return`AT_LEAST_ONE`;if(e instanceof lv)return`AT_LEAST_ONE_SEP`;if(e instanceof uv)return`MANY_SEP`;if(e instanceof W)return`MANY`;if(e instanceof G)return`CONSUME`;throw Error(`non exhaustive match`)}e(vv,`getProductionDslName`),s(vv,`getProductionDslName`);var yv=class{static{e(this,`RestWalker`)}static{s(this,`RestWalker`)}walk(e,t=[]){z(e.definition,(n,r)=>{let i=Cg(e.definition,r+1);if(n instanceof iv)this.walkProdRef(n,i,t);else if(n instanceof G)this.walkTerminal(n,i,t);else if(n instanceof ov)this.walkFlat(n,i,t);else if(n instanceof sv)this.walkOption(n,i,t);else if(n instanceof cv)this.walkAtLeastOne(n,i,t);else if(n instanceof lv)this.walkAtLeastOneSep(n,i,t);else if(n instanceof uv)this.walkManySep(n,i,t);else if(n instanceof W)this.walkMany(n,i,t);else if(n instanceof dv)this.walkOr(n,i,t);else throw Error(`non exhaustive match`)})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){let r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){let r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){let r=[new sv({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){let r=bv(e,t,n);this.walk(e,r)}walkMany(e,t,n){let r=[new sv({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){let r=bv(e,t,n);this.walk(e,r)}walkOr(e,t,n){let r=t.concat(n);z(e.definition,e=>{let t=new ov({definition:[e]});this.walk(t,r)})}};function bv(e,t,n){return[new sv({definition:[new G({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}e(bv,`restForRepetitionWithSeparator`),s(bv,`restForRepetitionWithSeparator`);function xv(e){if(e instanceof iv)return xv(e.referencedRule);if(e instanceof G)return wv(e);if(hv(e))return Sv(e);if(_v(e))return Cv(e);throw Error(`non exhaustive match`)}e(xv,`first`),s(xv,`first`);function Sv(e){let t=[],n=e.definition,r=0,i=n.length>r,a,o=!0;for(;i&&o;)a=n[r],o=gv(a),t=t.concat(xv(a)),r+=1,i=n.length>r;return X_(t)}e(Sv,`firstForSequence`),s(Sv,`firstForSequence`);function Cv(e){return X_(Rd(B(e.definition,e=>xv(e))))}e(Cv,`firstForBranching`),s(Cv,`firstForBranching`);function wv(e){return[e.terminalType]}e(wv,`firstForTerminal`),s(wv,`firstForTerminal`);var Tv=`_~IN~_`,Ev=class extends yv{static{e(this,`ResyncFollowsWalker`)}static{s(this,`ResyncFollowsWalker`)}constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){let r=Ov(e.referencedRule,e.idx)+this.topProd.name,i=xv(new ov({definition:t.concat(n)}));this.follows[r]=i}};function Dv(e){let t={};return z(e,e=>{let n=new Ev(e).startWalking();ru(t,n)}),t}e(Dv,`computeAllProdsFollows`),s(Dv,`computeAllProdsFollows`);function Ov(e,t){return e.name+t+Tv}e(Ov,`buildBetweenProdsFollowPrefix`),s(Ov,`buildBetweenProdsFollowPrefix`);var kv={},Av=new ba;function jv(e){let t=e.toString();if(kv.hasOwnProperty(t))return kv[t];{let e=Av.pattern(t);return kv[t]=e,e}}e(jv,`getRegExpAst`),s(jv,`getRegExpAst`);function Mv(){kv={}}e(Mv,`clearRegExpParserCache`),s(Mv,`clearRegExpParserCache`);var Nv=`Complement Sets are not supported for first char optimization`,Pv=`Unable to use "first char" lexer optimizations: +`;function Fv(e,t=!1){try{let t=jv(e);return Iv(t.value,{},t.flags.ignoreCase)}catch(n){if(n.message===Nv)t&&Q_(`${Pv} Unable to optimize: < ${e.toString()} > + Complement Sets cannot be automatically optimized. + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n=``;t&&(n=` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Z_(`${Pv} + Failed parsing: < ${e.toString()} > + Using the @chevrotain/regexp-to-ast library + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}e(Fv,`getOptimizedStartCodesIndices`),s(Fv,`getOptimizedStartCodesIndices`);function Iv(e,t,n){switch(e.type){case`Disjunction`:for(let r=0;r{if(typeof e==`number`)Lv(e,t,n);else{let r=e;if(n===!0)for(let e=r.from;e<=r.to;e++)Lv(e,t,n);else{for(let e=r.from;e<=r.to&&e=xy){let e=r.from>=xy?r.from:xy,n=r.to,i=Cy(e),a=Cy(n);for(let e=i;e<=a;e++)t[e]=e}}}});break;case`Group`:Iv(a.value,t,n);break;default:throw Error(`Non Exhaustive Match`)}let o=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type===`Group`&&Bv(a)===!1||a.type!==`Group`&&o===!1)break}break;default:throw Error(`non exhaustive match!`)}return H(t)}e(Iv,`firstCharOptimizedIndices`),s(Iv,`firstCharOptimizedIndices`);function Lv(e,t,n){let r=Cy(e);t[r]=r,n===!0&&Rv(e,t)}e(Lv,`addOptimizedIdxToResult`),s(Lv,`addOptimizedIdxToResult`);function Rv(e,t){let n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){let e=Cy(r.charCodeAt(0));t[e]=e}else{let e=n.toLowerCase();if(e!==n){let n=Cy(e.charCodeAt(0));t[n]=n}}}e(Rv,`handleIgnoreCase`),s(Rv,`handleIgnoreCase`);function zv(e,t){return Ug(e.value,e=>{if(typeof e==`number`)return d_(t,e);{let n=e;return Ug(t,e=>n.from<=e&&e<=n.to)!==void 0}})}e(zv,`findCode`),s(zv,`findCode`);function Bv(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?I(e.value)?Pg(e.value,Bv):Bv(e.value):!1}e(Bv,`isWholeOptional`),s(Bv,`isWholeOptional`);var Vv=class extends xa{static{e(this,`CharCodeFinder`)}static{s(this,`CharCodeFinder`)}constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case`Lookahead`:this.visitLookahead(e);return;case`NegativeLookahead`:this.visitNegativeLookahead(e);return;case`Lookbehind`:this.visitLookbehind(e);return;case`NegativeLookbehind`:this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){d_(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?zv(e,this.targetCharCodes)===void 0&&(this.found=!0):zv(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};function Hv(e,t){if(t instanceof RegExp){let n=jv(t),r=new Vv(e);return r.visit(n),r.found}return Ug(t,t=>d_(e,t.charCodeAt(0)))!==void 0}e(Hv,`canMatchCharCode`),s(Hv,`canMatchCharCode`);var Uv=`PATTERN`,Wv=`defaultMode`,Gv=`modes`;function Kv(e,t){t=dg(t,{debug:!1,safeMode:!1,positionTracking:`full`,lineTerminatorCharacters:[`\r`,` +`],tracer:s((e,t)=>t(),`tracer`)});let n=t.tracer;n(`initCharCodeToOptimizedIndexMap`,()=>{wy()});let r;n(`Reject Lexer.NA`,()=>{r=B_(e,e=>e[Uv]===Hy.NA)});let i=!1,a;n(`Transform Patterns`,()=>{i=!1,a=B(r,e=>{let t=e[Uv];if(C_(t)){let e=t.source;return e.length===1&&e!==`^`&&e!==`$`&&e!==`.`&&!t.ignoreCase?e:e.length===2&&e[0]===`\\`&&!d_([`d`,`D`,`s`,`S`,`t`,`r`,`n`,`t`,`0`,`c`,`b`,`B`,`f`,`v`,`w`,`W`],e[1])?e[1]:uy(t)}if(Cs(t))return i=!0,{exec:t};if(typeof t==`object`)return i=!0,t;if(typeof t==`string`){if(t.length===1)return t;{let e=t.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`);return uy(new RegExp(e))}}throw Error(`non exhaustive match`)})});let o,c,l,u,d;n(`misc mapping`,()=>{o=B(r,e=>e.tokenTypeIdx),c=B(r,e=>{let t=e.GROUP;if(t!==Hy.SKIPPED){if(a_(t))return t;if(T_(t))return!1;throw Error(`non exhaustive match`)}}),l=B(r,e=>{let t=e.LONGER_ALT;if(t)return I(t)?B(t,e=>m_(r,e)):[m_(r,t)]}),u=B(r,e=>e.PUSH_MODE),d=B(r,e=>V(e,`POP_MODE`))});let f;n(`Line Terminator Handling`,()=>{let e=yy(t.lineTerminatorCharacters);f=B(r,e=>!1),t.positionTracking!==`onlyOffset`&&(f=B(r,t=>V(t,`LINE_BREAKS`)?!!t.LINE_BREAKS:_y(t,e)===!1&&Hv(e,t.PATTERN)))});let p,m,h,g;n(`Misc Mapping #2`,()=>{p=B(r,my),m=B(a,hy),h=R_(r,(e,t)=>{let n=t.GROUP;return a_(n)&&n!==Hy.SKIPPED&&(e[n]=[]),e},{}),g=B(a,(e,t)=>({pattern:a[t],longerAlt:l[t],canLineTerminator:f[t],isCustom:p[t],short:m[t],group:c[t],push:u[t],pop:d[t],tokenTypeIdx:o[t],tokenType:r[t]}))});let _=!0,v=[];return t.safeMode||n(`First Char Optimization`,()=>{v=R_(r,(e,n,r)=>{if(typeof n.PATTERN==`string`)by(e,Cy(n.PATTERN.charCodeAt(0)),g[r]);else if(I(n.START_CHARS_HINT)){let t;z(n.START_CHARS_HINT,n=>{let i=Cy(typeof n==`string`?n.charCodeAt(0):n);t!==i&&(t=i,by(e,i,g[r]))})}else if(C_(n.PATTERN)){if(n.PATTERN.unicode)_=!1,t.ensureOptimizations&&Z_(`${Pv} Unable to analyze < ${n.PATTERN.toString()} > pattern. + The regexp unicode flag is not currently supported by the regexp-to-ast library. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let i=Fv(n.PATTERN,t.ensureOptimizations);U(i)&&(_=!1),z(i,t=>{by(e,t,g[r])})}}else t.ensureOptimizations&&Z_(`${Pv} TokenType: <${n.name}> is using a custom token pattern without providing parameter. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),_=!1;return e},[])}),{emptyGroups:h,patternIdxToConfig:g,charCodeToPatternIdxToConfig:v,hasCustom:i,canBeOptimized:_}}e(Kv,`analyzeTokenTypes`),s(Kv,`analyzeTokenTypes`);function qv(e,t){let n=[],r=Yv(e);n=n.concat(r.errors);let i=Xv(r.valid),a=i.valid;return n=n.concat(i.errors),n=n.concat(Jv(a)),n=n.concat(iy(a)),n=n.concat(ay(a,t)),n=n.concat(oy(a)),n}e(qv,`validatePatterns`),s(qv,`validatePatterns`);function Jv(e){let t=[],n=Rg(e,e=>C_(e[Uv]));return t=t.concat(Qv(n)),t=t.concat(ty(n)),t=t.concat(ny(n)),t=t.concat(ry(n)),t=t.concat($v(n)),t}e(Jv,`validateRegExpPattern`),s(Jv,`validateRegExpPattern`);function Yv(e){let t=Rg(e,e=>!V(e,Uv));return{errors:B(t,e=>({message:`Token Type: ->`+e.name+`<- missing static 'PATTERN' property`,type:K.MISSING_PATTERN,tokenTypes:[e]})),valid:yg(e,t)}}e(Yv,`findMissingPatterns`),s(Yv,`findMissingPatterns`);function Xv(e){let t=Rg(e,e=>{let t=e[Uv];return!C_(t)&&!Cs(t)&&!V(t,`exec`)&&!a_(t)});return{errors:B(t,e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.`,type:K.INVALID_PATTERN,tokenTypes:[e]})),valid:yg(e,t)}}e(Xv,`findInvalidPatterns`),s(Xv,`findInvalidPatterns`);var Zv=/[^\\][$]/;function Qv(t){class n extends xa{static{e(this,`EndAnchorFinder`)}static{s(this,`EndAnchorFinder`)}constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return B(Rg(t,e=>{let t=e.PATTERN;try{let e=jv(t),r=new n;return r.visit(e),r.found}catch{return Zv.test(t.source)}}),e=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:K.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}e(Qv,`findEndOfInputAnchor`),s(Qv,`findEndOfInputAnchor`);function $v(e){return B(Rg(e,e=>e.PATTERN.test(``)),e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' must not match an empty string`,type:K.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}e($v,`findEmptyMatchRegExps`),s($v,`findEmptyMatchRegExps`);var ey=/[^\\[][\^]|^\^/;function ty(t){class n extends xa{static{e(this,`StartAnchorFinder`)}static{s(this,`StartAnchorFinder`)}constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return B(Rg(t,e=>{let t=e.PATTERN;try{let e=jv(t),r=new n;return r.visit(e),r.found}catch{return ey.test(t.source)}}),e=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:K.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}e(ty,`findStartOfInputAnchor`),s(ty,`findStartOfInputAnchor`);function ny(e){return B(Rg(e,e=>{let t=e[Uv];return t instanceof RegExp&&(t.multiline||t.global)}),e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' may NOT contain global('g') or multiline('m')`,type:K.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}e(ny,`findUnsupportedFlags`),s(ny,`findUnsupportedFlags`);function ry(e){let t=[],n=B(e,n=>R_(e,(e,r)=>n.PATTERN.source===r.PATTERN.source&&!d_(t,r)&&r.PATTERN!==Hy.NA?(t.push(r),e.push(r),e):e,[]));return n=Tm(n),B(Rg(n,e=>e.length>1),e=>{let t=B(e,e=>e.name);return{message:`The same RegExp pattern ->${Gg(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(`, `)} <-`,type:K.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}e(ry,`findDuplicatePatterns`),s(ry,`findDuplicatePatterns`);function iy(e){return B(Rg(e,e=>{if(!V(e,`GROUP`))return!1;let t=e.GROUP;return t!==Hy.SKIPPED&&t!==Hy.NA&&!a_(t)}),e=>({message:`Token Type: ->`+e.name+`<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String`,type:K.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}e(iy,`findInvalidGroupType`),s(iy,`findInvalidGroupType`);function ay(e,t){return B(Rg(e,e=>e.PUSH_MODE!==void 0&&!d_(t,e.PUSH_MODE)),e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:K.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}e(ay,`findModesThatDoNotExist`),s(ay,`findModesThatDoNotExist`);function oy(e){let t=[],n=R_(e,(e,t,n)=>{let r=t.PATTERN;return r===Hy.NA||(a_(r)?e.push({str:r,idx:n,tokenType:t}):C_(r)&&cy(r)&&e.push({str:r.source,idx:n,tokenType:t})),e},[]);return z(e,(e,r)=>{z(n,({str:n,idx:i,tokenType:a})=>{if(r${a.name}<- can never be matched. +Because it appears AFTER the Token Type ->${e.name}<-in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:K.UNREACHABLE_PATTERN,tokenTypes:[e,a]})}})}),t}e(oy,`findUnreachablePatterns`),s(oy,`findUnreachablePatterns`);function sy(e,t){if(C_(t)){if(ly(t))return!1;let n=t.exec(e);return n!==null&&n.index===0}if(Cs(t))return t(e,0,[],{});if(V(t,`exec`))return t.exec(e,0,[],{});if(typeof t==`string`)return t===e;throw Error(`non exhaustive match`)}e(sy,`tryToMatchStrToPattern`),s(sy,`tryToMatchStrToPattern`);function cy(e){return Ug([`.`,`\\`,`[`,`]`,`|`,`^`,`$`,`(`,`)`,`?`,`*`,`+`,`{`],t=>e.source.indexOf(t)!==-1)===void 0}e(cy,`noMetaChar`),s(cy,`noMetaChar`);function ly(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\? property in its definition +`,type:K.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),V(e,Gv)||r.push({message:`A MultiMode Lexer cannot be initialized without a <`+Gv+`> property in its definition +`,type:K.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),V(e,Gv)&&V(e,Wv)&&!V(e.modes,e.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a ${Wv}: <${e.defaultMode}>which does not exist +`,type:K.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),V(e,Gv)&&z(e.modes,(e,t)=>{z(e,(n,i)=>{T_(n)?r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${t}> at index: <${i}> +`,type:K.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):V(n,`LONGER_ALT`)&&z(I(n.LONGER_ALT)?n.LONGER_ALT:[n.LONGER_ALT],i=>{!T_(i)&&!d_(e,i)&&r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${n.name}> outside of mode <${t}> +`,type:K.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})})}),r}e(dy,`performRuntimeChecks`),s(dy,`performRuntimeChecks`);function fy(e,t,n){let r=[],i=!1,a=B_(Tm(Rd(H(e.modes))),e=>e[Uv]===Hy.NA),o=yy(n);return t&&z(a,e=>{let t=_y(e,o);if(t!==!1){let n={message:vy(e,t),type:t.issue,tokenType:e};r.push(n)}else V(e,`LINE_BREAKS`)?e.LINE_BREAKS===!0&&(i=!0):Hv(o,e.PATTERN)&&(i=!0)}),t&&!i&&r.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:K.NO_LINE_BREAKS_FLAGS}),r}e(fy,`performWarningRuntimeChecks`),s(fy,`performWarningRuntimeChecks`);function py(e){let t={};return z(tu(e),n=>{let r=e[n];if(I(r))t[n]=[];else throw Error(`non exhaustive match`)}),t}e(py,`cloneEmptyGroups`),s(py,`cloneEmptyGroups`);function my(e){let t=e.PATTERN;if(C_(t))return!1;if(Cs(t)||V(t,`exec`))return!0;if(a_(t))return!1;throw Error(`non exhaustive match`)}e(my,`isCustomPattern`),s(my,`isCustomPattern`);function hy(e){return a_(e)&&e.length===1?e.charCodeAt(0):!1}e(hy,`isShortPattern`),s(hy,`isShortPattern`);var gy={test:s(function(e){let t=e.length;for(let n=this.lastIndex;n Token Type + Root cause: ${t.errMsg}. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===K.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. + The problem is in the <${e.name}> Token Type + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error(`non exhaustive match`)}e(vy,`buildLineBreakIssueMessage`),s(vy,`buildLineBreakIssueMessage`);function yy(e){return B(e,e=>a_(e)?e.charCodeAt(0):e)}e(yy,`getCharCodes`),s(yy,`getCharCodes`);function by(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}e(by,`addToMapOfArrays`),s(by,`addToMapOfArrays`);var xy=256,Sy=[];function Cy(e){return e255?255+~~(e/255):e}}e(wy,`initCharCodeToOptimizedIndexMap`),s(wy,`initCharCodeToOptimizedIndexMap`);function Ty(e,t){let n=e.tokenTypeIdx;return n===t.tokenTypeIdx||t.isParent===!0&&t.categoryMatchesMap[n]===!0}e(Ty,`tokenStructuredMatcher`),s(Ty,`tokenStructuredMatcher`);function Ey(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}e(Ey,`tokenStructuredMatcherNoCategories`),s(Ey,`tokenStructuredMatcherNoCategories`);var Dy=1,Oy={};function ky(e){let t=Ay(e);jy(t),Ny(t),My(t),z(t,e=>{e.isParent=e.categoryMatches.length>0})}e(ky,`augmentTokenTypes`),s(ky,`augmentTokenTypes`);function Ay(e){let t=Cm(e),n=e,r=!0;for(;r;){n=Tm(Rd(B(n,e=>e.CATEGORIES)));let e=yg(n,t);t=t.concat(e),U(e)?r=!1:n=e}return t}e(Ay,`expandCategories`),s(Ay,`expandCategories`);function jy(e){z(e,e=>{Fy(e)||(Oy[Dy]=e,e.tokenTypeIdx=Dy++),Iy(e)&&!I(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Iy(e)||(e.CATEGORIES=[]),Ly(e)||(e.categoryMatches=[]),Ry(e)||(e.categoryMatchesMap={})})}e(jy,`assignTokenDefaultProps`),s(jy,`assignTokenDefaultProps`);function My(e){z(e,e=>{e.categoryMatches=[],z(e.categoryMatchesMap,(t,n)=>{e.categoryMatches.push(Oy[n].tokenTypeIdx)})})}e(My,`assignCategoriesTokensProp`),s(My,`assignCategoriesTokensProp`);function Ny(e){z(e,e=>{Py([],e)})}e(Ny,`assignCategoriesMapProp`),s(Ny,`assignCategoriesMapProp`);function Py(e,t){z(e,e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0}),z(t.CATEGORIES,n=>{let r=e.concat(t);d_(r,n)||Py(r,n)})}e(Py,`singleAssignCategoriesToksMap`),s(Py,`singleAssignCategoriesToksMap`);function Fy(e){return V(e,`tokenTypeIdx`)}e(Fy,`hasShortKeyProperty`),s(Fy,`hasShortKeyProperty`);function Iy(e){return V(e,`CATEGORIES`)}e(Iy,`hasCategoriesProperty`),s(Iy,`hasCategoriesProperty`);function Ly(e){return V(e,`categoryMatches`)}e(Ly,`hasExtendingTokensTypesProperty`),s(Ly,`hasExtendingTokensTypesProperty`);function Ry(e){return V(e,`categoryMatchesMap`)}e(Ry,`hasExtendingTokensTypesMapProperty`),s(Ry,`hasExtendingTokensTypesMapProperty`);function zy(e){return V(e,`tokenTypeIdx`)}e(zy,`isTokenType`),s(zy,`isTokenType`);var By={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,n,r,i,a){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`}},K;(function(e){e[e.MISSING_PATTERN=0]=`MISSING_PATTERN`,e[e.INVALID_PATTERN=1]=`INVALID_PATTERN`,e[e.EOI_ANCHOR_FOUND=2]=`EOI_ANCHOR_FOUND`,e[e.UNSUPPORTED_FLAGS_FOUND=3]=`UNSUPPORTED_FLAGS_FOUND`,e[e.DUPLICATE_PATTERNS_FOUND=4]=`DUPLICATE_PATTERNS_FOUND`,e[e.INVALID_GROUP_TYPE_FOUND=5]=`INVALID_GROUP_TYPE_FOUND`,e[e.PUSH_MODE_DOES_NOT_EXIST=6]=`PUSH_MODE_DOES_NOT_EXIST`,e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]=`MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE`,e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]=`MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY`,e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]=`MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST`,e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]=`LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED`,e[e.SOI_ANCHOR_FOUND=11]=`SOI_ANCHOR_FOUND`,e[e.EMPTY_MATCH_PATTERN=12]=`EMPTY_MATCH_PATTERN`,e[e.NO_LINE_BREAKS_FLAGS=13]=`NO_LINE_BREAKS_FLAGS`,e[e.UNREACHABLE_PATTERN=14]=`UNREACHABLE_PATTERN`,e[e.IDENTIFY_TERMINATOR=15]=`IDENTIFY_TERMINATOR`,e[e.CUSTOM_LINE_BREAK=16]=`CUSTOM_LINE_BREAK`,e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]=`MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE`})(K||={});var Vy={deferDefinitionErrorsHandling:!1,positionTracking:`full`,lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,`\r`],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:By,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Vy);var Hy=class{static{e(this,`Lexer`)}static{s(this,`Lexer`)}constructor(e,t=Vy){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent <${e}>`);let{time:r,value:i}=$_(t),a=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()},typeof t==`boolean`)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=ru({},Vy,t);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n==`number`&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT(`Lexer Constructor`,()=>{let n,r=!0;this.TRACE_INIT(`Lexer Config handling`,()=>{if(this.config.lineTerminatorsPattern===Vy.lineTerminatorsPattern)this.config.lineTerminatorsPattern=gy;else if(this.config.lineTerminatorCharacters===Vy.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error(`"safeMode" and "ensureOptimizations" flags are mutually exclusive.`);this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),I(e)?n={modes:{defaultMode:Cm(e)},defaultMode:Wv}:(r=!1,n=Cm(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT(`performRuntimeChecks`,()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(dy(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT(`performWarningRuntimeChecks`,()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(fy(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},z(n.modes,(e,t)=>{n.modes[t]=B_(e,e=>T_(e))});let i=tu(n.modes);if(z(n.modes,(e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,()=>{if(this.modes.push(n),this.config.skipValidations===!1&&this.TRACE_INIT(`validatePatterns`,()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(qv(e,i))}),U(this.lexerDefinitionErrors)){ky(e);let r;this.TRACE_INIT(`analyzeTokenTypes`,()=>{r=Kv(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[n]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig,this.emptyGroups=ru({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=r.canBeOptimized}})}),this.defaultMode=n.defaultMode,!U(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let e=B(this.lexerDefinitionErrors,e=>e.message).join(`----------------------- +`);throw Error(`Errors detected in definition of Lexer: +`+e)}z(this.lexerDefinitionWarning,e=>{Q_(e.message)}),this.TRACE_INIT(`Choosing sub-methods implementations`,()=>{if(r&&(this.handleModes=Xs),this.trackStartLines===!1&&(this.computeNewColumn=_s),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Xs),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT(`Failed Optimization Warnings`,()=>{let e=R_(this.canModeBeOptimized,(e,t,n)=>(t===!1&&e.push(n),e),[]);if(t.ensureOptimizations&&!U(e))throw Error(`Lexer Modes: < ${e.join(`, `)} > cannot be optimized. + Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. + Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT(`clearRegExpParserCache`,()=>{Mv()}),this.TRACE_INIT(`toFastProperties`,()=>{ev(this)})})}tokenize(e,t=this.defaultMode){if(!U(this.lexerDefinitionErrors)){let e=B(this.lexerDefinitionErrors,e=>e.message).join(`----------------------- +`);throw Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(t,n){let r,i,a,o,c,l,u,d,f,p,m,h,g,_,v,y=t,b=y.length,x=0,S=0,ee=this.hasCustom?0:Math.floor(t.length/10),C=Array(ee),te=[],ne=this.trackStartLines?1:void 0,w=this.trackStartLines?1:void 0,re=py(this.emptyGroups),ie=this.trackStartLines,ae=this.config.lineTerminatorsPattern,oe=0,se=[],ce=[],le=[],ue=[];Object.freeze(ue);let de=!1,T=s(e=>{if(le.length===1&&e.tokenType.PUSH_MODE===void 0){let t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);te.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{le.pop();let e=xg(le);se=this.patternIdxToConfig[e],ce=this.charCodeToPatternIdxToConfig[e],oe=se.length;let t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;de=!!(ce&&t)}},`pop_mode`);function E(e){le.push(e),ce=this.charCodeToPatternIdxToConfig[e],se=this.patternIdxToConfig[e],oe=se.length,oe=se.length;let t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;de=!!(ce&&t)}e(E,`push_mode`),s(E,`push_mode`),E.call(this,n);let D,fe=this.config.recoveryEnabled;for(;xl.length){l=o,f=o.length,u=d,D=e;break}}}break}}if(f!==-1){if(p=D.group,p!==void 0&&(l=l===null?t.substring(x,x+f):l,m=D.tokenTypeIdx,h=this.createTokenInstance(l,x,m,D.tokenType,ne,w,f),this.handlePayload(h,u),p===!1?S=this.addToken(C,S,h):re[p].push(h)),ie===!0&&D.canLineTerminator===!0){let e=0,n,r;ae.lastIndex=0;do l=l===null?t.substring(x,x+f):l,n=ae.test(l),n===!0&&(r=ae.lastIndex-1,e++);while(n===!0);e===0?w=this.computeNewColumn(w,f):(ne+=e,w=f-r,this.updateTokenEndLineColumnLocation(h,p,r,e,ne,w,f))}else w=this.computeNewColumn(w,f);x+=f,this.handleModes(D,T,E,h)}else{let e=x,n=ne,r=w,a=fe===!1;for(;a===!1&&x ${Uy(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return`Redundant input, expecting EOF but found: `+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){let a=` +but found: '`+Gg(t).image+`'`;return r?`Expecting: `+r+a:`Expecting: one of these possible Token sequences: +${B(B(R_(e,(e,t)=>e.concat(t),[]),e=>`[${B(e,e=>Uy(e)).join(`, `)}]`),(e,t)=>` ${t+1}. ${e}`).join(` +`)}`+a},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){let i=` +but found: '`+Gg(t).image+`'`;return n?`Expecting: `+n+i:`Expecting: expecting at least one iteration which starts with one of these possible Token sequences:: + <${B(e,e=>`[${B(e,e=>Uy(e)).join(`,`)}]`).join(` ,`)}>`+i}};Object.freeze(ab);var ob={buildRuleNotFoundError(e,t){return`Invalid grammar, reference to a rule which is not defined: ->`+t.nonTerminalName+`<- +inside top level rule: ->`+e.name+`<-`}},sb={buildDuplicateFoundError(t,n){function r(e){return e instanceof G?e.terminalType.name:e instanceof iv?e.nonTerminalName:``}e(r,`getExtraProductionArgument2`),s(r,`getExtraProductionArgument`);let i=t.name,a=Gg(n),o=a.idx,c=vv(a),l=r(a),u=`->${c}${o>0?o:``}<- ${l?`with argument: ->${l}<-`:``} + appears more than once (${n.length} times) in the top level rule: ->${i}<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return u=u.replace(/[ \t]+/g,` `),u=u.replace(/\s\s+/g,` +`),u},buildNamespaceConflictError(e){return`Namespace conflict found in grammar. +The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>. +To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=B(e.prefixPath,e=>Uy(e)).join(`, `),n=e.alternation.idx===0?``:e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(` ,`)}> due to common lookahead prefix +in inside <${e.topLevelRule.name}> Rule, +<${t}> may appears as a prefix path in all these alternatives. +See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`},buildAlternationAmbiguityError(e){let t=e.alternation.idx===0?``:e.alternation.idx,n=e.prefixPath.length===0,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(` ,`)}> in inside <${e.topLevelRule.name}> Rule, +`;if(n)r+=`These alternatives are all empty (match no tokens), making them indistinguishable. +Only the last alternative may be empty. +`;else{let t=B(e.prefixPath,e=>Uy(e)).join(`, `);r+=`<${t}> may appears as a prefix path in all these alternatives. +`}return r+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,r},buildEmptyRepetitionError(e){let t=vv(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens. +This could lead to an infinite loop.`},buildTokenNameError(e){return`deprecated`},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule. +Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives: + inside <${e.topLevelRule.name}> Rule. + has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name;return`Left Recursion found in grammar. +rule: <${t}> can be invoked from itself (directly or indirectly) +without consuming any Tokens. The grammar path that causes this is: + ${`${t} --> ${B(e.leftRecursionPath,e=>e.name).concat([t]).join(` --> `)}`} + To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return`deprecated`},buildDuplicateRuleNameError(e){let t;return t=e.topLevelRule instanceof av?e.topLevelRule.name:e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function cb(e,t){let n=new lb(e,t);return n.resolveRefs(),n.errors}e(cb,`resolveGrammar`),s(cb,`resolveGrammar`);var lb=class extends mv{static{e(this,`GastRefResolverVisitor`)}static{s(this,`GastRefResolverVisitor`)}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){z(H(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{let t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:mS.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},ub=class extends yv{static{e(this,`AbstractNextPossibleTokensWalker`)}static{s(this,`AbstractNextPossibleTokensWalker`)}constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName=``,this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error(`The path does not start with the walker's top Rule!`);return this.ruleStack=Cm(this.path.ruleStack).reverse(),this.occurrenceStack=Cm(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}}updateExpectedNext(){U(this.ruleStack)?(this.nextProductionName=``,this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},db=class extends ub{static{e(this,`NextAfterTokenWalker`)}static{s(this,`NextAfterTokenWalker`)}constructor(e,t){super(e,t),this.path=t,this.nextTerminalName=``,this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let e=new ov({definition:t.concat(n)});this.possibleTokTypes=xv(e),this.found=!0}}},fb=class extends yv{static{e(this,`AbstractNextTerminalAfterProductionWalker`)}static{s(this,`AbstractNextTerminalAfterProductionWalker`)}constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},pb=class extends fb{static{e(this,`NextTerminalAfterManyWalker`)}static{s(this,`NextTerminalAfterManyWalker`)}walkMany(e,t,n){if(e.idx===this.occurrence){let e=Gg(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof G&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,n)}},mb=class extends fb{static{e(this,`NextTerminalAfterManySepWalker`)}static{s(this,`NextTerminalAfterManySepWalker`)}walkManySep(e,t,n){if(e.idx===this.occurrence){let e=Gg(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof G&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,n)}},hb=class extends fb{static{e(this,`NextTerminalAfterAtLeastOneWalker`)}static{s(this,`NextTerminalAfterAtLeastOneWalker`)}walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){let e=Gg(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof G&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,n)}},gb=class extends fb{static{e(this,`NextTerminalAfterAtLeastOneSepWalker`)}static{s(this,`NextTerminalAfterAtLeastOneSepWalker`)}walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){let e=Gg(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof G&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,n)}};function _b(t,n,r=[]){r=Cm(r);let i=[],a=0;function o(e){return e.concat(Cg(t,a+1))}e(o,`remainingPathWith`),s(o,`remainingPathWith`);function c(e){let t=_b(o(e),n,r);return i.concat(t)}for(e(c,`getAlternativesForProd`),s(c,`getAlternativesForProd`);r.length{U(e.definition)===!1&&(i=c(e.definition))}),i;else if(e instanceof G)r.push(e.terminalType);else throw Error(`non exhaustive match`);a++}return i.push({partialPath:r,suffixDef:Cg(t,a)}),i}e(_b,`possiblePathsFrom`),s(_b,`possiblePathsFrom`);function vb(e,t,n,r){let i=`EXIT_NONE_TERMINAL`,a=[i],o=`EXIT_ALTERNATIVE`,s=!1,c=t.length,l=c-r-1,u=[],d=[];for(d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!U(d);){let e=d.pop();if(e===o){s&&xg(d).idx<=l&&d.pop();continue}let r=e.def,f=e.idx,p=e.ruleStack,m=e.occurrenceStack;if(U(r))continue;let h=r[0];if(h===i){let e={idx:f,def:Cg(r),ruleStack:Tg(p),occurrenceStack:Tg(m)};d.push(e)}else if(h instanceof G){if(f=0;e--){let t={idx:f,def:h.definition[e].definition.concat(Cg(r)),ruleStack:p,occurrenceStack:m};d.push(t),d.push(o)}else if(h instanceof ov)d.push({idx:f,def:h.definition.concat(Cg(r)),ruleStack:p,occurrenceStack:m});else if(h instanceof av)d.push(yb(h,f,p,m));else throw Error(`non exhaustive match`)}return u}e(vb,`nextPossibleTokensAfter`),s(vb,`nextPossibleTokensAfter`);function yb(e,t,n,r){let i=Cm(n);i.push(e.name);let a=Cm(r);return a.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:a}}e(yb,`expandTopLevelRule`),s(yb,`expandTopLevelRule`);var q;(function(e){e[e.OPTION=0]=`OPTION`,e[e.REPETITION=1]=`REPETITION`,e[e.REPETITION_MANDATORY=2]=`REPETITION_MANDATORY`,e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]=`REPETITION_MANDATORY_WITH_SEPARATOR`,e[e.REPETITION_WITH_SEPARATOR=4]=`REPETITION_WITH_SEPARATOR`,e[e.ALTERNATION=5]=`ALTERNATION`})(q||={});function bb(e){if(e instanceof sv||e===`Option`)return q.OPTION;if(e instanceof W||e===`Repetition`)return q.REPETITION;if(e instanceof cv||e===`RepetitionMandatory`)return q.REPETITION_MANDATORY;if(e instanceof lv||e===`RepetitionMandatoryWithSeparator`)return q.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof uv||e===`RepetitionWithSeparator`)return q.REPETITION_WITH_SEPARATOR;if(e instanceof dv||e===`Alternation`)return q.ALTERNATION;throw Error(`non exhaustive match`)}e(bb,`getProdType`),s(bb,`getProdType`);function xb(e){let{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e,a=bb(r);return a===q.ALTERNATION?Mb(t,n,i):Nb(t,n,a,i)}e(xb,`getLookaheadPaths`),s(xb,`getLookaheadPaths`);function Sb(e,t,n,r,i,a){let o=Mb(e,t,n);return a(o,r,Ib(o)?Ey:Ty,i)}e(Sb,`buildLookaheadFuncForOr`),s(Sb,`buildLookaheadFuncForOr`);function Cb(e,t,n,r,i,a){let o=Nb(e,t,i,n),s=Ib(o)?Ey:Ty;return a(o[0],s,r)}e(Cb,`buildLookaheadFuncForOptionalProd`),s(Cb,`buildLookaheadFuncForOptionalProd`);function wb(e,t,n,r){let i=e.length,a=Pg(e,e=>Pg(e,e=>e.length===1));if(t)return function(t){let r=B(t,e=>e.GATE);for(let t=0;tRd(e)),(e,t,n)=>(z(t,t=>{V(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),z(t.categoryMatches,t=>{V(e,t)||(e[t]=n)})}),e),{});return function(){let e=this.LA(1);return t[e.tokenTypeIdx]}}return function(){for(let t=0;te.length===1),i=e.length;if(r&&!n){let t=Rd(e);if(t.length===1&&U(t[0].categoryMatches)){let e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let e=R_(t,(e,t,n)=>(e[t.tokenTypeIdx]=!0,z(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){let t=this.LA(1);return e[t.tokenTypeIdx]===!0}}}return function(){nextPath:for(let n=0;n_b([e],1)),r=Ob(n.length),i=B(n,e=>{let t={};return z(e,e=>{z(kb(e.partialPath),e=>{t[e]=!0})}),t}),a=n;for(let e=1;e<=t;e++){let n=a;a=Ob(n.length);for(let o=0;o{z(kb(e.partialPath),e=>{i[o][e]=!0})})}}}}return r}e(jb,`lookAheadSequenceFromAlternatives`),s(jb,`lookAheadSequenceFromAlternatives`);function Mb(e,t,n,r){let i=new Db(e,q.ALTERNATION,r);return t.accept(i),jb(i.result,n)}e(Mb,`getLookaheadPathsForOr`),s(Mb,`getLookaheadPathsForOr`);function Nb(e,t,n,r){let i=new Db(e,n);t.accept(i);let a=i.result,o=new Eb(t,e,n).startWalking();return jb([new ov({definition:a}),new ov({definition:o})],r)}e(Nb,`getLookaheadPathsForOptionalProd`),s(Nb,`getLookaheadPathsForOptionalProd`);function Pb(e,t){compareOtherPath:for(let n=0;n{let r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]})}e(Fb,`isStrictPrefixOfPath`),s(Fb,`isStrictPrefixOfPath`);function Ib(e){return Pg(e,e=>Pg(e,e=>Pg(e,e=>U(e.categoryMatches))))}e(Ib,`areTokenCategoriesNotUsed`),s(Ib,`areTokenCategoriesNotUsed`);function Lb(e){return B(e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}),e=>Object.assign({type:mS.CUSTOM_LOOKAHEAD_VALIDATION},e))}e(Lb,`validateLookahead`),s(Lb,`validateLookahead`);function Rb(e,t,n,r){let i=Xg(e,e=>zb(e,n)),a=tx(e,t,n),o=Xg(e,e=>Zb(e,n)),s=Xg(e,t=>Ub(t,e,r,n));return i.concat(a,o,s)}e(Rb,`validateGrammar`),s(Rb,`validateGrammar`);function zb(e,t){let n=new Hb;e.accept(n);let r=n.allProductions;return B(H(P_(Qg(r,Bb),e=>e.length>1)),n=>{let r=Gg(n),i=t.buildDuplicateFoundError(e,n),a=vv(r),o={message:i,type:mS.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:a,occurrence:r.idx},s=Vb(r);return s&&(o.parameter=s),o})}e(zb,`validateDuplicateProductions`),s(zb,`validateDuplicateProductions`);function Bb(e){return`${vv(e)}_#_${e.idx}_#_${Vb(e)}`}e(Bb,`identifyProductionForDuplicates`),s(Bb,`identifyProductionForDuplicates`);function Vb(e){return e instanceof G?e.terminalType.name:e instanceof iv?e.nonTerminalName:``}e(Vb,`getExtraProductionArgument`),s(Vb,`getExtraProductionArgument`);var Hb=class extends mv{static{e(this,`OccurrenceValidationCollector`)}static{s(this,`OccurrenceValidationCollector`)}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};function Ub(e,t,n,r){let i=[];if(R_(t,(t,n)=>n.name===e.name?t+1:t,0)>1){let t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:mS.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}e(Ub,`validateRuleDoesNotAlreadyExist`),s(Ub,`validateRuleDoesNotAlreadyExist`);function Wb(e,t,n){let r=[],i;return d_(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:mS.INVALID_RULE_OVERRIDE,ruleName:e})),r}e(Wb,`validateRuleIsOverridden`),s(Wb,`validateRuleIsOverridden`);function Gb(e,t,n,r=[]){let i=[],a=Kb(t.definition);if(U(a))return[];{let t=e.name;d_(a,e)&&i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:mS.LEFT_RECURSION,ruleName:t});let o=Xg(yg(a,r.concat([e])),t=>{let i=Cm(r);return i.push(t),Gb(e,t,n,i)});return i.concat(o)}}e(Gb,`validateNoLeftRecursion`),s(Gb,`validateNoLeftRecursion`);function Kb(e){let t=[];if(U(e))return t;let n=Gg(e);if(n instanceof iv)t.push(n.referencedRule);else if(n instanceof ov||n instanceof sv||n instanceof cv||n instanceof lv||n instanceof uv||n instanceof W)t=t.concat(Kb(n.definition));else if(n instanceof dv)t=Rd(B(n.definition,e=>Kb(e.definition)));else if(!(n instanceof G))throw Error(`non exhaustive match`);let r=gv(n),i=e.length>1;if(r&&i){let n=Cg(e);return t.concat(Kb(n))}return t}e(Kb,`getFirstNoneTerminal`),s(Kb,`getFirstNoneTerminal`);var qb=class extends mv{static{e(this,`OrCollector`)}static{s(this,`OrCollector`)}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function Jb(e,t){let n=new qb;e.accept(n);let r=n.alternations;return Xg(r,n=>Xg(Tg(n.definition),(r,i)=>U(vb([r],[],Ty,1))?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:mS.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]:[]))}e(Jb,`validateEmptyOrAlternative`),s(Jb,`validateEmptyOrAlternative`);function Yb(e,t,n){let r=new qb;e.accept(r);let i=r.alternations;return i=B_(i,e=>e.ignoreAmbiguities===!0),Xg(i,r=>{let i=r.idx,a=Mb(i,e,r.maxLookahead||t,r),o=$b(a,r,e,n),s=ex(a,r,e,n);return o.concat(s)})}e(Yb,`validateAmbiguousAlternationAlternatives`),s(Yb,`validateAmbiguousAlternationAlternatives`);var Xb=class extends mv{static{e(this,`RepetitionCollector`)}static{s(this,`RepetitionCollector`)}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};function Zb(e,t){let n=new qb;e.accept(n);let r=n.alternations;return Xg(r,n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:mS.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[])}e(Zb,`validateTooManyAlts`),s(Zb,`validateTooManyAlts`);function Qb(e,t,n){let r=[];return z(e,e=>{let i=new Xb;e.accept(i);let a=i.allProductions;z(a,i=>{let a=bb(i),o=i.maxLookahead||t,s=i.idx,c=Nb(s,e,a,o)[0];if(U(Rd(c))){let t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:t,type:mS.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),r}e(Qb,`validateSomeNonEmptyLookaheadPath`),s(Qb,`validateSomeNonEmptyLookaheadPath`);function $b(e,t,n,r){let i=[];return B(R_(e,(n,r,a)=>(t.definition[a].ignoreAmbiguities===!0||z(r,r=>{let o=[a];z(e,(e,n)=>{a!==n&&Pb(e,r)&&t.definition[n].ignoreAmbiguities!==!0&&o.push(n)}),o.length>1&&!Pb(i,r)&&(i.push(r),n.push({alts:o,path:r}))}),n),[]),e=>{let i=B(e.alts,e=>e+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:mS.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}})}e($b,`checkAlternativesAmbiguities`),s($b,`checkAlternativesAmbiguities`);function ex(e,t,n,r){let i=R_(e,(e,t,n)=>{let r=B(t,e=>({idx:n,path:e}));return e.concat(r)},[]);return Tm(Xg(i,e=>{if(t.definition[e.idx].ignoreAmbiguities===!0)return[];let a=e.idx,o=e.path;return B(Rg(i,e=>t.definition[e.idx].ignoreAmbiguities!==!0&&e.idx{let i=[e.idx+1,a+1],o=t.idx===0?``:t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:mS.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:o,alternatives:i}})}))}e(ex,`checkPrefixAlternativesAmbiguities`),s(ex,`checkPrefixAlternativesAmbiguities`);function tx(e,t,n){let r=[],i=B(t,e=>e.name);return z(e,e=>{let t=e.name;if(d_(i,t)){let i=n.buildNamespaceConflictError(e);r.push({message:i,type:mS.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),r}e(tx,`checkTerminalAndNoneTerminalsNameSpace`),s(tx,`checkTerminalAndNoneTerminalsNameSpace`);function nx(e){let t=dg(e,{errMsgProvider:ob}),n={};return z(e.rules,e=>{n[e.name]=e}),cb(n,t.errMsgProvider)}e(nx,`resolveGrammar2`),s(nx,`resolveGrammar`);function rx(e){return e=dg(e,{errMsgProvider:sb}),Rb(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}e(rx,`validateGrammar2`),s(rx,`validateGrammar`);var ix=`MismatchedTokenException`,ax=`NoViableAltException`,ox=`EarlyExitException`,sx=`NotAllInputParsedException`,cx=[ix,ax,ox,sx];Object.freeze(cx);function lx(e){return d_(cx,e.name)}e(lx,`isRecognitionException`),s(lx,`isRecognitionException`);var ux=class extends Error{static{e(this,`RecognitionException`)}static{s(this,`RecognitionException`)}constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},dx=class extends ux{static{e(this,`MismatchedTokenException`)}static{s(this,`MismatchedTokenException`)}constructor(e,t,n){super(e,t),this.previousToken=n,this.name=ix}},fx=class extends ux{static{e(this,`NoViableAltException`)}static{s(this,`NoViableAltException`)}constructor(e,t,n){super(e,t),this.previousToken=n,this.name=ax}},px=class extends ux{static{e(this,`NotAllInputParsedException`)}static{s(this,`NotAllInputParsedException`)}constructor(e,t){super(e,t),this.name=sx}},mx=class extends ux{static{e(this,`EarlyExitException`)}static{s(this,`EarlyExitException`)}constructor(e,t,n){super(e,t),this.previousToken=n,this.name=ox}},hx={},gx=`InRuleRecoveryException`,_x=class extends Error{static{e(this,`InRuleRecoveryException`)}static{s(this,`InRuleRecoveryException`)}constructor(e){super(e),this.name=gx}},vx=class{static{e(this,`Recoverable`)}static{s(this,`Recoverable`)}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=V(e,`recoveryEnabled`)?e.recoveryEnabled:fS.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=yx)}getTokenToInsert(e){let t=rb(e,``,NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){let i=this.findReSyncTokenType(),a=this.exportLexerState(),o=[],c=!1,l=this.LA(1),u=this.LA(1),d=s(()=>{let e=this.LA(0),t=new dx(this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:l,previous:e,ruleName:this.getCurrRuleFullName()}),l,this.LA(0));t.resyncedTokens=Tg(o),this.SAVE_ERROR(t)},`generateErrorMessage`);for(;!c;)if(this.tokenMatcher(u,r)){d();return}else if(n.call(this)){d(),e.apply(this,t);return}else this.tokenMatcher(u,i)?c=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,o));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){let n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new _x(`sad sad panda`)}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||U(t))return!1;let n=this.LA(1);return Ug(t,e=>this.tokenMatcher(n,e))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey();return d_(this.getFollowSetFromFollowKey(t),e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),n=2;for(;;){let r=Ug(e,e=>ib(t,e));if(r!==void 0)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return hx;let e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return B(e,(n,r)=>r===0?hx:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])})}flattenFollowSet(){return Rd(B(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e)))}getFollowSetFromFollowKey(e){if(e===hx)return[nb];let t=e.ruleName+e.idxInCallingRule+Tv+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,nb)||t.push(e),t}reSyncTo(e){let t=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return Tg(t)}attemptInRepetitionRecovery(e,t,n,r,i,a,o){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Cm(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return B(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};function yx(e,t,n,r,i,a,o){let s=this.getKeyForAutomaticLookahead(r,i),c=this.firstAfterRepMap[s];if(c===void 0){let e=this.getCurrRuleFullName(),t=this.getGAstProductions()[e];c=new a(t,i).startWalking(),this.firstAfterRepMap[s]=c}let l=c.token,u=c.occurrence,d=c.isEndOfRule;this.RULE_STACK.length===1&&d&&l===void 0&&(l=nb,u=1),l!==void 0&&u!==void 0&&this.shouldInRepetitionRecoveryBeTried(l,u,o)&&this.tryInRepetitionRecovery(e,t,n,l)}e(yx,`attemptInRepetitionRecovery`),s(yx,`attemptInRepetitionRecovery`);var bx=4,xx=8,Sx=8,Cx=1<Gb(e,e,sb))}validateEmptyOrAlternatives(e){return Xg(e,e=>Jb(e,sb))}validateAmbiguousAlternationAlternatives(e,t){return Xg(e,e=>Yb(e,t,sb))}validateSomeNonEmptyLookaheadPath(e,t){return Qb(e,t,sb)}buildLookaheadForAlternation(e){return Sb(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,wb)}buildLookaheadForOptional(e){return Cb(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,bb(e.prodType),Tb)}},jx=class{static{e(this,`LooksAhead`)}static{s(this,`LooksAhead`)}initLooksAhead(e){this.dynamicTokensEnabled=V(e,`dynamicTokensEnabled`)?e.dynamicTokensEnabled:fS.dynamicTokensEnabled,this.maxLookahead=V(e,`maxLookahead`)?e.maxLookahead:fS.maxLookahead,this.lookaheadStrategy=V(e,`lookaheadStrategy`)?e.lookaheadStrategy:new Ax({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){z(e,e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{let{alternation:t,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:o}=Nx(e);z(t,t=>{let n=t.idx===0?``:t.idx;this.TRACE_INIT(`${vv(t)}${n}`,()=>{let n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=kx(this.fullRuleNameToShort[e.name],Cx,t.idx);this.setLaFuncCache(r,n)})}),z(n,t=>{this.computeLookaheadFunc(e,t.idx,Tx,`Repetition`,t.maxLookahead,vv(t))}),z(r,t=>{this.computeLookaheadFunc(e,t.idx,wx,`Option`,t.maxLookahead,vv(t))}),z(i,t=>{this.computeLookaheadFunc(e,t.idx,Ex,`RepetitionMandatory`,t.maxLookahead,vv(t))}),z(a,t=>{this.computeLookaheadFunc(e,t.idx,Ox,`RepetitionMandatoryWithSeparator`,t.maxLookahead,vv(t))}),z(o,t=>{this.computeLookaheadFunc(e,t.idx,Dx,`RepetitionWithSeparator`,t.maxLookahead,vv(t))})})})}computeLookaheadFunc(e,t,n,r,i,a){this.TRACE_INIT(`${a}${t===0?``:t}`,()=>{let a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),o=kx(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(o,a)})}getKeyForAutomaticLookahead(e,t){return kx(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},Mx=new class extends mv{static{e(this,`DslMethodsCollectorVisitor`)}static{s(this,`DslMethodsCollectorVisitor`)}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}};function Nx(e){Mx.reset(),e.accept(Mx);let t=Mx.dslMethods;return Mx.reset(),t}e(Nx,`collectMethods`),s(Nx,`collectMethods`);function Px(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffsete.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + ${t.join(` + +`).replace(/\n/g,` + `)}`)}},`validateVisitor`)},n.prototype.constructor=n,n._RULE_NAMES=t,n}e(Vx,`createBaseSemanticVisitorConstructor`),s(Vx,`createBaseSemanticVisitorConstructor`);function Hx(e,t,n){let r=s(function(){},`derivedConstructor`);zx(r,e+`BaseSemanticsWithDefaults`);let i=Object.create(n.prototype);return z(t,e=>{i[e]=Bx}),r.prototype=i,r.prototype.constructor=r,r}e(Hx,`createBaseVisitorConstructorWithDefaults`),s(Hx,`createBaseVisitorConstructorWithDefaults`);var Ux;(function(e){e[e.REDUNDANT_METHOD=0]=`REDUNDANT_METHOD`,e[e.MISSING_METHOD=1]=`MISSING_METHOD`})(Ux||={});function Wx(e,t){return Gx(e,t)}e(Wx,`validateVisitor`),s(Wx,`validateVisitor`);function Gx(e,t){return Tm(B(Rg(t,t=>Cs(e[t])===!1),t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Ux.MISSING_METHOD,methodName:t})))}e(Gx,`validateMissingCstMethods`),s(Gx,`validateMissingCstMethods`);var Kx=class{static{e(this,`TreeBuilder`)}static{s(this,`TreeBuilder`)}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=V(e,`nodeLocationTracking`)?e.nodeLocationTracking:fS.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Xs,this.cstFinallyStateUpdate=Xs,this.cstPostTerminal=Xs,this.cstPostNonTerminal=Xs,this.cstPostRule=Xs;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Fx,this.setNodeLocationFromNode=Fx,this.cstPostRule=Xs,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Xs,this.setNodeLocationFromNode=Xs,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Px,this.setNodeLocationFromNode=Px,this.cstPostRule=Xs,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Xs,this.setNodeLocationFromNode=Xs,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Xs,this.setNodeLocationFromNode=Xs,this.cstPostRule=Xs,this.setInitialNodeLocation=Xs;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];Ix(n,t,e),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];Lx(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(T_(this.baseCstVisitorConstructor)){let e=Vx(this.className,tu(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(T_(this.baseCstVisitorWithDefaultsConstructor)){let e=Hx(this.className,tu(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},qx=class{static{e(this,`LexerAdapter`)}static{s(this,`LexerAdapter`)}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error(`Missing invocation at the end of the Parser's constructor.`);this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):dS}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?dS:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},Jx=class{static{e(this,`RecognizerApi`)}static{s(this,`RecognizerApi`)}ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=pS){if(d_(this.definedRulesNames,e)){let t={message:sb.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:mS.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);let r=this.defineRule(e,t,n);return this[e]=r,r}OVERRIDE_RULE(e,t,n=pS){let r=Wb(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);let i=this.defineRule(e,t,n);return this[e]=i,i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(lx(e))return!1;throw e}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return fv(H(this.gastProductionsCache))}},Yx=class{static{e(this,`RecognizerEngine`)}static{s(this,`RecognizerEngine`)}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Ey,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},V(t,`serializedGrammar`))throw Error(`The Parser's configuration can no longer contain a property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if(I(e)){if(U(e))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset==`number`)throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if(I(e))this.tokensMap=R_(e,(e,t)=>(e[t.name]=t,e),{});else if(V(e,`modes`)&&Pg(Rd(H(e.modes)),zy)){let t=X_(Rd(H(e.modes)));this.tokensMap=R_(t,(e,t)=>(e[t.name]=t,e),{})}else if(ns(e))this.tokensMap=Cm(e);else throw Error(` argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition`);this.tokensMap.EOF=nb;let n=Pg(V(e,`modes`)?Rd(H(e.modes)):H(e),e=>U(e.categoryMatches));this.tokenMatcher=n?Ey:Ty,ky(H(this.tokensMap))}defineRule(t,n,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${t}> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=V(r,`resyncEnabled`)?r.resyncEnabled:pS.resyncEnabled,a=V(r,`recoveryValueFunc`)?r.recoveryValueFunc:pS.recoveryValueFunc,o=this.ruleShortNameIdx<t.call(this)&&e.call(this),`lookAheadFunc`)}}else i=e;if(r.call(this)===!0)return i.call(this)}atLeastOneInternal(e,t){let n=this.getKeyForAutomaticLookahead(Ex,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof t!=`function`){i=t.DEF;let e=t.GATE;if(e!==void 0){let t=r;r=s(()=>e.call(this)&&t.call(this),`lookAheadFunc`)}}else i=t;if(r.call(this)===!0){let e=this.doSingleRepetition(i);for(;r.call(this)===!0&&e===!0;)e=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(e,q.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],r,Ex,e,hb)}atLeastOneSepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(Ox,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){r.call(this);let t=s(()=>this.tokenMatcher(this.LA(1),i),`separatorLookAheadFunc`);for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,gb],t,Ox,e,gb)}else throw this.raiseEarlyExitException(e,q.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let n=this.getKeyForAutomaticLookahead(Tx,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof t!=`function`){i=t.DEF;let e=t.GATE;if(e!==void 0){let t=r;r=s(()=>e.call(this)&&t.call(this),`lookaheadFunction`)}}else i=t;let a=!0;for(;r.call(this)===!0&&a===!0;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],r,Tx,e,pb,a)}manySepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(Dx,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){r.call(this);let t=s(()=>this.tokenMatcher(this.LA(1),i),`separatorLookAheadFunc`);for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,mb],t,Dx,e,mb)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,Ox,e,i)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let n=this.getKeyForAutomaticLookahead(Cx,t),r=I(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(i!==void 0)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new px(t,e))}}subruleInternal(e,t,n){let r;try{let i=n===void 0?void 0:n.ARGS;return this.subruleIdx=t,r=e.apply(this,i),this.cstPostNonTerminal(r,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),r}catch(t){throw this.subruleInternalError(t,n,e.ruleName)}}subruleInternalError(e,t,n){throw lx(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{let t=this.LA(1);this.tokenMatcher(t,e)===!0?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r,i=this.LA(0);throw r=n!==void 0&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new dx(r,t,i))}consumeInternalRecovery(e,t,n){if(this.recoveryEnabled&&n.name===`MismatchedTokenException`&&!this.isBackTracking()){let r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){throw e.name===gx?n:e}}throw n}saveRecogState(){let e=this.errors,t=Cm(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),nb)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},Xx=class{static{e(this,`ErrorHandler`)}static{s(this,`ErrorHandler`)}initErrorHandler(e){this._errors=[],this.errorMessageProvider=V(e,`errorMessageProvider`)?e.errorMessageProvider:fS.errorMessageProvider}SAVE_ERROR(e){if(lx(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Cm(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error(`Trying to save an Error which is not a RecognitionException`)}get errors(){return Cm(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){let r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],a=Nb(e,i,t,this.maxLookahead)[0],o=[];for(let e=1;e<=this.maxLookahead;e++)o.push(this.LA(e));let s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new mx(s,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let n=this.getCurrRuleFullName(),r=this.getGAstProductions()[n],i=Mb(e,r,this.maxLookahead),a=[];for(let e=1;e<=this.maxLookahead;e++)a.push(this.LA(e));let o=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:a,previous:o,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new fx(s,this.LA(1),o))}},Zx=class{static{e(this,`ContentAssist`)}static{s(this,`ContentAssist`)}initContentAssist(){}computeContentAssist(e,t){let n=this.gastProductionsCache[e];if(T_(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return vb([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let t=Gg(e.ruleStack),n=this.getGAstProductions()[t];return new db(n,e).startWalking()}},Qx={description:`This Object indicates the Parser is during Recording Phase`};Object.freeze(Qx);var $x=!0,eS=2**xx-1,tS=eb({name:`RECORDING_PHASE_TOKEN`,pattern:Hy.NA});ky([tS]);var nS=rb(tS,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(nS);var rS={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},iS=class{static{e(this,`GastRecorder`)}static{s(this,`GastRecorder`)}initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT(`Enable Recording`,()=>{for(let e=0;e<10;e++){let t=e>0?e:``;this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT(`Deleting Recording methods`,()=>{let e=this;for(let t=0;t<10;t++){let n=t>0?t:``;delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return dS}topLevelRuleRecord(e,t){try{let n=new av({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(e){if(e.KNOWN_RECORDER_ERROR!==!0)try{e.message+=` + This error was thrown during the "grammar recording phase" For more info see: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw e}throw e}}optionInternalRecord(e,t){return aS.call(this,sv,e,t)}atLeastOneInternalRecord(e,t){aS.call(this,cv,t,e)}atLeastOneSepFirstInternalRecord(e,t){aS.call(this,lv,t,e,$x)}manyInternalRecord(e,t){aS.call(this,W,t,e)}manySepFirstInternalRecord(e,t){aS.call(this,uv,t,e,$x)}orInternalRecord(e,t){return oS.call(this,e,t)}subruleInternalRecord(e,t,n){if(cS(t),!e||V(e,`ruleName`)===!1){let n=Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=xg(this.recordingProdStack),i=e.ruleName,a=new iv({idx:t,nonTerminalName:i,label:n?.LABEL,referencedRule:void 0});return r.definition.push(a),this.outputCst?rS:Qx}consumeInternalRecord(e,t,n){if(cS(t),!Fy(e)){let n=Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=xg(this.recordingProdStack),i=new G({idx:t,terminalType:e,label:n?.LABEL});return r.definition.push(i),nS}};function aS(e,t,n,r=!1){cS(n);let i=xg(this.recordingProdStack),a=Cs(t)?t:t.DEF,o=new e({definition:[],idx:n});return r&&(o.separator=t.SEP),V(t,`MAX_LOOKAHEAD`)&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),a.call(this),i.definition.push(o),this.recordingProdStack.pop(),Qx}e(aS,`recordProd`),s(aS,`recordProd`);function oS(e,t){cS(t);let n=xg(this.recordingProdStack),r=I(e)===!1,i=r===!1?e:e.DEF,a=new dv({definition:[],idx:t,ignoreAmbiguities:r&&e.IGNORE_AMBIGUITIES===!0});return V(e,`MAX_LOOKAHEAD`)&&(a.maxLookahead=e.MAX_LOOKAHEAD),a.hasPredicates=W_(i,e=>Cs(e.GATE)),n.definition.push(a),z(i,e=>{let t=new ov({definition:[]});a.definition.push(t),V(e,`IGNORE_AMBIGUITIES`)?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:V(e,`GATE`)&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),Qx}e(oS,`recordOrProd`),s(oS,`recordOrProd`);function sS(e){return e===0?``:`${e}`}e(sS,`getIdxSuffix`),s(sS,`getIdxSuffix`);function cS(e){if(e<0||e>eS){let t=Error(`Invalid DSL Method idx value: <${e}> + Idx value must be a none negative value smaller than ${eS+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}e(cS,`assertMethodIdxIsValid`),s(cS,`assertMethodIdxIsValid`);var lS=class{static{e(this,`PerformanceTracer`)}static{s(this,`PerformanceTracer`)}initPerformanceTracer(e){if(V(e,`traceInitPerf`)){let t=e.traceInitPerf,n=typeof t==`number`;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=fS.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent <${e}>`);let{time:r,value:i}=$_(t),a=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()}};function uS(e,t){t.forEach(t=>{let n=t.prototype;Object.getOwnPropertyNames(n).forEach(r=>{if(r===`constructor`)return;let i=Object.getOwnPropertyDescriptor(n,r);i&&(i.get||i.set)?Object.defineProperty(e.prototype,r,i):e.prototype[r]=t.prototype[r]})})}e(uS,`applyMixins`),s(uS,`applyMixins`);var dS=rb(nb,``,NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(dS);var fS=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:ab,nodeLocationTracking:`none`,traceInitPerf:!1,skipValidations:!1}),pS=Object.freeze({recoveryValueFunc:s(()=>void 0,`recoveryValueFunc`),resyncEnabled:!0}),mS;(function(e){e[e.INVALID_RULE_NAME=0]=`INVALID_RULE_NAME`,e[e.DUPLICATE_RULE_NAME=1]=`DUPLICATE_RULE_NAME`,e[e.INVALID_RULE_OVERRIDE=2]=`INVALID_RULE_OVERRIDE`,e[e.DUPLICATE_PRODUCTIONS=3]=`DUPLICATE_PRODUCTIONS`,e[e.UNRESOLVED_SUBRULE_REF=4]=`UNRESOLVED_SUBRULE_REF`,e[e.LEFT_RECURSION=5]=`LEFT_RECURSION`,e[e.NONE_LAST_EMPTY_ALT=6]=`NONE_LAST_EMPTY_ALT`,e[e.AMBIGUOUS_ALTS=7]=`AMBIGUOUS_ALTS`,e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]=`CONFLICT_TOKENS_RULES_NAMESPACE`,e[e.INVALID_TOKEN_NAME=9]=`INVALID_TOKEN_NAME`,e[e.NO_NON_EMPTY_LOOKAHEAD=10]=`NO_NON_EMPTY_LOOKAHEAD`,e[e.AMBIGUOUS_PREFIX_ALTS=11]=`AMBIGUOUS_PREFIX_ALTS`,e[e.TOO_MANY_ALTS=12]=`TOO_MANY_ALTS`,e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]=`CUSTOM_LOOKAHEAD_VALIDATION`})(mS||={});function hS(e=void 0){return function(){return e}}e(hS,`EMPTY_ALT`),s(hS,`EMPTY_ALT`);var gS=class t{static{e(this,`_Parser`)}static{s(this,`Parser`)}static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT(`performSelfAnalysis`,()=>{let e;this.selfAnalysisDone=!0;let n=this.className;this.TRACE_INIT(`toFastProps`,()=>{ev(this)}),this.TRACE_INIT(`Grammar Recording`,()=>{try{this.enableRecording(),z(this.definedRulesNames,e=>{let t=this[e].originalGrammarAction,n;this.TRACE_INIT(`${e} Rule`,()=>{n=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=n})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT(`Grammar Resolving`,()=>{r=nx({rules:H(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT(`Grammar Validations`,()=>{if(U(r)&&this.skipValidations===!1){let e=rx({rules:H(this.gastProductionsCache),tokenTypes:H(this.tokensMap),errMsgProvider:sb,grammarName:n}),t=Lb({lookaheadStrategy:this.lookaheadStrategy,rules:H(this.gastProductionsCache),tokenTypes:H(this.tokensMap),grammarName:n});this.definitionErrors=this.definitionErrors.concat(e,t)}}),U(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT(`computeAllProdsFollows`,()=>{let e=Dv(H(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT(`ComputeLookaheadFunctions`,()=>{var e,t;(t=(e=this.lookaheadStrategy).initialize)==null||t.call(e,{rules:H(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(H(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!U(this.definitionErrors))throw e=B(this.definitionErrors,e=>e.message),Error(`Parser Definition Errors detected: + ${e.join(` +------------------------------- +`)}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initContentAssist(),n.initGastRecorder(t),n.initPerformanceTracer(t),V(t,`ignoredIssues`))throw Error(`The IParserConfig property has been deprecated. + Please use the flag on the relevant DSL method instead. + See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES + For further details.`);this.skipValidations=V(t,`skipValidations`)?t.skipValidations:fS.skipValidations}};gS.DEFER_DEFINITION_ERRORS_HANDLING=!1,uS(gS,[vx,jx,Kx,qx,Yx,Jx,Xx,Zx,iS,lS]);var _S=class extends gS{static{e(this,`EmbeddedActionsParser`)}static{s(this,`EmbeddedActionsParser`)}constructor(e,t=fS){let n=Cm(t);n.outputCst=!1,super(e,n)}};function vS(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n-1}e(jS,`listCacheHas2`),s(jS,`listCacheHas`);var MS=jS;function NS(e,t){var n=this.__data__,r=TS(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}e(NS,`listCacheSet2`),s(NS,`listCacheSet`);var PS=NS;function FS(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ts))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Pw?new Ow:void 0;for(a.set(e,t),a.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=RT}e(zT,`isLength2`),s(zT,`isLength`);var BT=zT,VT=`[object Arguments]`,HT=`[object Array]`,UT=`[object Boolean]`,WT=`[object Date]`,GT=`[object Error]`,KT=`[object Function]`,qT=`[object Map]`,JT=`[object Number]`,YT=`[object Object]`,XT=`[object RegExp]`,ZT=`[object Set]`,QT=`[object String]`,$T=`[object WeakMap]`,eE=`[object ArrayBuffer]`,tE=`[object DataView]`,nE=`[object Float32Array]`,rE=`[object Float64Array]`,iE=`[object Int8Array]`,aE=`[object Int16Array]`,oE=`[object Int32Array]`,sE=`[object Uint8Array]`,cE=`[object Uint8ClampedArray]`,lE=`[object Uint16Array]`,uE=`[object Uint32Array]`,J={};J[nE]=J[rE]=J[iE]=J[aE]=J[oE]=J[sE]=J[cE]=J[lE]=J[uE]=!0,J[VT]=J[HT]=J[eE]=J[UT]=J[tE]=J[WT]=J[GT]=J[KT]=J[qT]=J[JT]=J[YT]=J[XT]=J[ZT]=J[QT]=J[$T]=!1;function dE(e){return bT(e)&&BT(e.length)&&!!J[cC(e)]}e(dE,`baseIsTypedArray2`),s(dE,`baseIsTypedArray`);var fE=dE;function pE(e){return function(t){return e(t)}}e(pE,`baseUnary2`),s(pE,`baseUnary`);var mE=pE,hE=typeof exports==`object`&&exports&&!exports.nodeType&&exports,gE=hE&&typeof module==`object`&&module&&!module.nodeType&&module,_E=gE&&gE.exports===hE&&GS.process,vE=(function(){try{return gE&&gE.require&&gE.require(`util`).types||_E&&_E.binding&&_E.binding(`util`)}catch{}})(),yE=vE&&vE.isTypedArray,bE=yE?mE(yE):fE,xE=Object.prototype.hasOwnProperty;function SE(e,t){var n=sT(e),r=!n&&DT(e),i=!n&&!r&&NT(e),a=!n&&!r&&!i&&bE(e),o=n||r||i||a,s=o?vT(e.length,String):[],c=s.length;for(var l in e)(t||xE.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||LT(l,c)))&&s.push(l);return s}e(SE,`arrayLikeKeys2`),s(SE,`arrayLikeKeys`);var CE=SE,wE=Object.prototype;function TE(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||wE)}e(TE,`isPrototype2`),s(TE,`isPrototype`);var EE=TE;function DE(e,t){return function(n){return e(t(n))}}e(DE,`overArg2`),s(DE,`overArg`);var OE=DE(Object.keys,Object),kE=Object.prototype.hasOwnProperty;function AE(e){if(!EE(e))return OE(e);var t=[];for(var n in Object(e))kE.call(e,n)&&n!=`constructor`&&t.push(n);return t}e(AE,`baseKeys2`),s(AE,`baseKeys`);var jE=AE;function ME(e){return e!=null&&BT(e.length)&&!gC(e)}e(ME,`isArrayLike2`),s(ME,`isArrayLike`);var NE=ME;function PE(e){return NE(e)?CE(e):jE(e)}e(PE,`keys2`),s(PE,`keys`);var FE=PE;function IE(e){return lT(e,FE,gT)}e(IE,`getAllKeys2`),s(IE,`getAllKeys`);var LE=IE,RE=1,zE=Object.prototype.hasOwnProperty;function BE(e,t,n,r,i,a){var o=n&RE,s=LE(e),c=s.length;if(c!=LE(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:zE.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++ltk(e,t,n)))}e(ok,`alternation`),s(ok,`alternation`);function sk(e,t,n){let r=X(e,t,n,{type:zO});return fk(e,r),dk(e,t,n,pk(e,t,r,n,ck(e,t,n)))}e(sk,`option`),s(sk,`option`);function ck(e,t,n){let r=LO(NO(n.definition,n=>tk(e,t,n)),e=>e!==void 0);return r.length===1?r[0]:r.length===0?void 0:hk(e,r)}e(ck,`block`),s(ck,`block`);function lk(e,t,n,r,i){let a=r.left,o=r.right,s=X(e,t,n,{type:qO});fk(e,s);let c=X(e,t,n,{type:JO});return a.loopback=s,c.loopback=s,e.decisionMap[RO(t,i?`RepetitionMandatoryWithSeparator`:`RepetitionMandatory`,n.idx)]=s,Y(o,s),i===void 0?(Y(s,a),Y(s,c)):(Y(s,c),Y(s,i.left),Y(i.right,a)),{left:a,right:c}}e(lk,`plus`),s(lk,`plus`);function uk(e,t,n,r,i){let a=r.left,o=r.right,s=X(e,t,n,{type:KO});fk(e,s);let c=X(e,t,n,{type:JO}),l=X(e,t,n,{type:GO});return s.loopback=l,c.loopback=l,Y(s,a),Y(s,c),Y(o,l),i===void 0?Y(l,s):(Y(l,c),Y(l,i.left),Y(i.right,a)),e.decisionMap[RO(t,i?`RepetitionWithSeparator`:`Repetition`,n.idx)]=s,{left:s,right:c}}e(uk,`star`),s(uk,`star`);function dk(e,t,n,r){let i=r.left,a=r.right;return Y(i,a),e.decisionMap[RO(t,`Option`,n.idx)]=i,r}e(dk,`optional`),s(dk,`optional`);function fk(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}e(fk,`defineDecisionState`),s(fk,`defineDecisionState`);function pk(e,t,n,r,...i){let a=X(e,t,r,{type:WO,start:n});n.end=a;for(let e of i)e===void 0?Y(n,a):(Y(n,e.left),Y(e.right,a));let o={left:n,right:a};return e.decisionMap[RO(t,mk(r),r.idx)]=n,o}e(pk,`makeAlts`),s(pk,`makeAlts`);function mk(e){if(e instanceof dv)return`Alternation`;if(e instanceof sv)return`Option`;if(e instanceof W)return`Repetition`;if(e instanceof uv)return`RepetitionWithSeparator`;if(e instanceof cv)return`RepetitionMandatory`;if(e instanceof lv)return`RepetitionMandatoryWithSeparator`;throw Error(`Invalid production type encountered`)}e(mk,`getProdType2`),s(mk,`getProdType`);function hk(e,t){let n=t.length;for(let r=0;re.alt)}get key(){let e=``;for(let t in this.map)e+=t+`:`;return e}};function Ck(e,t=!0){return`${t?`a${e.alt}`:``}s${e.state.stateNumber}:${e.stack.map(e=>e.stateNumber.toString()).join(`_`)}`}e(Ck,`getATNConfigKey`),s(Ck,`getATNConfigKey`);function wk(e,t,n){for(var r=-1,i=e.length;++r0&&n(s)?t>1?Nk(s,t-1,n,r,i):oT(i,s):r||(i[i.length]=s)}return i}e(Nk,`baseFlatten2`),s(Nk,`baseFlatten`);var Pk=Nk;function Fk(e,t){return Pk(NO(e,t),1)}e(Fk,`flatMap2`),s(Fk,`flatMap`);var Ik=Fk;function Lk(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a-1}e(Gk,`arrayIncludes2`),s(Gk,`arrayIncludes`);var Kk=Gk;function qk(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=Qk){var l=t?null:Zk(e);if(l)return Vw(l);o=!1,i=Mw,c=new Ow}else c=t?[]:s;outer:for(;++r{let i=r.toString(),a=n[i];return a===void 0?(a={atnStartState:e,decision:t,states:{}},n[i]=a,a):a}}e(SA,`createDFACache`),s(SA,`createDFACache`);var CA=class{static{e(this,`PredicateSet`)}static{s(this,`PredicateSet`)}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e=``,t=this.predicates.length;for(let n=0;nconsole.log(e))}initialize(e){this.atn=$O(e.rules),this.dfas=DA(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:n,hasPredicates:r,dynamicTokensEnabled:i}=e,a=this.dfas,o=this.logging,s=RO(n,`Alternation`,t),c=this.atn.decisionMap[s].decision,l=NO(xb({maxLookahead:1,occurrence:t,prodType:`Alternation`,rule:n}),e=>NO(e,e=>e[0]));if(EA(l,!1)&&!i){let e=xA(l,(e,t,n)=>(uA(t,t=>{t&&(e[t.tokenTypeIdx]=n,uA(t.categoryMatches,t=>{e[t]=n}))}),e),{});return r?function(t){let n=this.LA(1),r=e[n.tokenTypeIdx];if(t!==void 0&&r!==void 0){let e=t[r]?.GATE;if(e!==void 0&&e.call(this)===!1)return}return r}:function(){let t=this.LA(1);return e[t.tokenTypeIdx]}}return r?function(e){let t=new CA,n=e===void 0?0:e.length;for(let r=0;rNO(e,e=>e[0]));if(EA(l)&&l[0][0]&&!i){let e=l[0],t=iA(e);if(t.length===1&&hA(t[0].categoryMatches)){let e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let e=xA(t,(e,t)=>(t!==void 0&&(e[t.tokenTypeIdx]=!0,uA(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){let t=this.LA(1);return e[t.tokenTypeIdx]===!0}}}return function(){let e=OA.call(this,a,c,wA,o);return typeof e!=`object`&&e===0}}};function EA(e,t=!0){let n=new Set;for(let r of e){let e=new Set;for(let i of r){if(i===void 0){if(t)break;return!1}let r=[i.tokenTypeIdx].concat(i.categoryMatches);for(let t of r)if(n.has(t)){if(!e.has(t))return!1}else n.add(t),e.add(t)}}return!0}e(EA,`isLL1Sequence`),s(EA,`isLL1Sequence`);function DA(e){let t=e.decisionStates.length,n=Array(t);for(let r=0;rUy(e)).join(`, `),n=e.production.idx===0?``:e.production.idx,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(`, `)}> in <${NA(e.production)}${n}> inside <${e.topLevelRule.name}> Rule, +<${t}> may appears as a prefix path in all these alternatives. +`;return r+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,r}e(MA,`buildAmbiguityError`),s(MA,`buildAmbiguityError`);function NA(e){if(e instanceof iv)return`SUBRULE`;if(e instanceof sv)return`OPTION`;if(e instanceof dv)return`OR`;if(e instanceof cv)return`AT_LEAST_ONE`;if(e instanceof lv)return`AT_LEAST_ONE_SEP`;if(e instanceof uv)return`MANY_SEP`;if(e instanceof W)return`MANY`;if(e instanceof G)return`CONSUME`;throw Error(`non exhaustive match`)}e(NA,`getProductionDslName2`),s(NA,`getProductionDslName`);function PA(e,t,n){return{actualToken:n,possibleTokenTypes:nA(Ik(t.configs.elements,e=>e.state.transitions).filter(e=>e instanceof XO).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}e(PA,`buildAdaptivePredictError`),s(PA,`buildAdaptivePredictError`);function FA(e,t){return e.edges[t.tokenTypeIdx]}e(FA,`getExistingTargetState`),s(FA,`getExistingTargetState`);function IA(e,t,n){let r=new Sk,i=[];for(let a of e.elements){if(n.is(a.alt)===!1)continue;if(a.state.type===UO){i.push(a);continue}let e=a.state.transitions.length;for(let n=0;n0&&!GA(a))for(let e of i)a.add(e);return a}e(IA,`computeReachSet`),s(IA,`computeReachSet`);function LA(e,t){if(e instanceof XO&&ib(t,e.tokenType))return e.target}e(LA,`getReachableTarget`),s(LA,`getReachableTarget`);function RA(e,t){let n;for(let r of e.elements)if(t.is(r.alt)===!0){if(n===void 0)n=r.alt;else if(n!==r.alt)return}return n}e(RA,`getUniqueAlt`),s(RA,`getUniqueAlt`);function zA(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}e(zA,`newDFAState`),s(zA,`newDFAState`);function BA(e,t,n,r){return r=VA(e,r),t.edges[n.tokenTypeIdx]=r,r}e(BA,`addDFAEdge`),s(BA,`addDFAEdge`);function VA(e,t){if(t===xk)return t;let n=t.configs.key,r=e.states[n];return r===void 0?(t.configs.finalize(),e.states[n]=t,t):r}e(VA,`addDFAState`),s(VA,`addDFAState`);function HA(e){let t=new Sk,n=e.transitions.length;for(let r=0;r0){let n=[...e.stack];UA({state:n.pop(),alt:e.alt,stack:n},t)}else t.add(e);return}n.epsilonOnlyTransitions||t.add(e);let r=n.transitions.length;for(let i=0;i1)return!0;return!1}e(YA,`hasConflictingAltSet`),s(YA,`hasConflictingAltSet`);function XA(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}e(XA,`hasStateAssociatedWithOneAlt`),s(XA,`hasStateAssociatedWithOneAlt`),gt();var ZA=class{static{e(this,`CstNodeBuilder`)}static{s(this,`CstNodeBuilder`)}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new nj(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new ej;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){let n=new $A(e.startOffset,e.image.length,Bi(e),e.tokenType,!t);return n.grammarSource=t,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){let t=e.container;if(t){let n=t.content.indexOf(e);n>=0&&t.content.splice(n,1)}}addHiddenNodes(e){let t=[];for(let n of e){let e=new $A(n.startOffset,n.image.length,Bi(n),n.tokenType,!0);e.root=this.rootNode,t.push(e)}let n=this.current,r=!1;if(n.content.length>0){n.content.push(...t);return}for(;n.container;){let e=n.container.content.indexOf(n);if(e>0){n.container.content.splice(e,0,...t),r=!0;break}n=n.container}r||this.rootNode.content.unshift(...t)}construct(e){let t=this.current;typeof e.$type==`string`&&!e.$infix&&(this.current.astNode=e),e.$cstNode=t;let n=this.nodeStack.pop();n?.content.length===0&&this.removeNode(n)}},QA=class{static{e(this,`AbstractCstNode`)}static{s(this,`AbstractCstNode`)}get hidden(){return!1}get astNode(){let e=typeof this._astNode?.$type==`string`?this._astNode:this.container?.astNode;if(!e)throw Error(`This node has no associated AST element`);return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},$A=class extends QA{static{e(this,`LeafCstNodeImpl`)}static{s(this,`LeafCstNodeImpl`)}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,n,r,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=r,this._length=t,this._range=n}},ej=class extends QA{static{e(this,`CompositeCstNodeImpl`)}static{s(this,`CompositeCstNodeImpl`)}constructor(){super(...arguments),this.content=new tj(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){let e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===void 0){let{range:n}=e,{range:r}=t;this._rangeCache={start:n.start,end:r.end.line=0;e--){let t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},tj=class t extends Array{static{e(this,`_CstNodeContainer`)}static{s(this,`CstNodeContainer`)}constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,t.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...n){return this.addParents(n),super.splice(e,t,...n)}addParents(e){for(let t of e)t.container=this.parent}},nj=class extends ej{static{e(this,`RootCstNodeImpl`)}static{s(this,`RootCstNodeImpl`)}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text=``,this._text=e??``}},rj=Symbol(`Datatype`);function ij(e){return e.$type===rj}e(ij,`isDataTypeNode`),s(ij,`isDataTypeNode`);var aj=`​`,oj=s(e=>e.endsWith(aj)?e:e+aj,`withRuleSuffix`),sj=class{static{e(this,`AbstractLangiumParser`)}static{s(this,`AbstractLangiumParser`)}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let t=this.lexer.definition,n=e.LanguageMetaData.mode===`production`;this.wrapper=e.shared.profilers.LangiumProfiler?.isActive(`parsing`)?new mj(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask(`parsing`,e.LanguageMetaData.languageId)):new pj(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},cj=class extends sj{static{e(this,`LangiumParser`)}static{s(this,`LangiumParser`)}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new ZA,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){let n=this.computeRuleType(e),r;Or(e)&&(r=e.name,this.registerPrecedenceMap(e));let i=this.wrapper.DEFINE_RULE(oj(e.name),this.startImplementation(n,r,t).bind(this));return this.allRules.set(e.name,i),Xr(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){let t=e.name,n=new Map;for(let t=0;t0&&(t=this.construct()),t===void 0)throw Error(`No result from parser`);if(this.stack.length>0)throw Error(`Parser stack is not empty after parsing`);return t}startImplementation(e,t,n){return r=>{let i=!this.isRecording()&&e!==void 0;if(i){let n={$type:e};this.stack.push(n),e===rj?n.value=``:t!==void 0&&(n.$infixName=t)}return n(r),i?this.construct():void 0}}extractHiddenTokens(e){let t=this.lexerResult.hidden;if(!t.length)return[];let n=e.startOffset;for(let e=0;en)return t.splice(0,e);return t.splice(0,t.length)}consume(e,t,n){let r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){let e=this.extractHiddenTokens(r);this.nodeBuilder.addHiddenNodes(e);let t=this.nodeBuilder.buildLeafNode(r,n),{assignment:i,crossRef:a}=this.getAssignment(n),o=this.current;if(i){let e=Ir(n)?r.image:this.converter.convert(r.image,t);this.assign(i.operator,i.feature,e,t,a)}else if(ij(o)){let e=r.image;Ir(n)||(e=this.converter.convert(e,t).toString()),o.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset==`number`&&!isNaN(e.endOffset)}subrule(e,t,n,r,i){let a;!this.isRecording()&&!n&&(a=this.nodeBuilder.buildCompositeNode(r));let o;try{o=this.wrapper.wrapSubrule(e,t,i)}finally{this.isRecording()||(o===void 0&&!n&&(o=this.construct()),o!==void 0&&a&&a.length>0&&this.performSubruleAssignment(o,r,a))}}performSubruleAssignment(e,t,n){let{assignment:r,crossRef:i}=this.getAssignment(t);if(r)this.assign(r.operator,r.feature,e,n,i);else if(!r){let t=this.current;if(ij(t))t.value+=e.toString();else if(typeof e==`object`&&e){let n=this.assignWithoutOverride(e,t);this.stack.pop(),this.stack.push(n)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(t.feature&&t.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(t).content.push(n.$cstNode);let r={$type:e};this.stack.push(r),this.assign(t.operator,t.feature,n,n.$cstNode)}else n.$type=e}}construct(){if(this.isRecording())return;let e=this.stack.pop();return this.nodeBuilder.construct(e),`$infixName`in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):ij(e)?this.converter.convert(e.value,e.$cstNode):(In(this.astReflection,e),e)}constructInfix(e,t){let n=e.parts;if(!Array.isArray(n)||n.length===0)return;let r=e.operators;if(!Array.isArray(r)||n.length<2)return n[0];let i=0,a=-1;for(let e=0;ea?(a=o.precedence,i=e):o.precedence===a&&(o.rightAssoc||(i=e))}let o=r.slice(0,i),s=r.slice(i+1),c=n.slice(0,i+1),l=n.slice(i+1),u={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:o},d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:s},f=this.constructInfix(u,t),p=this.constructInfix(d,t);return{$type:e.$type,$cstNode:e.$cstNode,left:f,operator:r[i],right:p}}getAssignment(e){if(!this.assignmentMap.has(e)){let t=En(e,ir);this.assignmentMap.set(e,{assignment:t,crossRef:t&&mr(t.terminal)?t.terminal.isMulti?`multi`:`single`:void 0})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){let a=this.current,o;switch(o=i===`single`&&typeof n==`string`?this.linker.buildReference(a,t,r,n):i===`multi`&&typeof n==`string`?this.linker.buildMultiReference(a,t,r,n):n,e){case`=`:a[t]=o;break;case`?=`:a[t]=!0;break;case`+=`:Array.isArray(a[t])||(a[t]=[]),a[t].push(o)}}assignWithoutOverride(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];t===void 0?e[n]=r:Array.isArray(t)&&Array.isArray(r)&&(r.push(...t),e[n]=r)}let n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},lj=class{static{e(this,`AbstractParserErrorMessageProvider`)}static{s(this,`AbstractParserErrorMessageProvider`)}buildMismatchTokenMessage(e){return ab.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return ab.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return ab.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return ab.buildEarlyExitMessage(e)}},uj=class extends lj{static{e(this,`LangiumParserErrorMessageProvider`)}static{s(this,`LangiumParserErrorMessageProvider`)}buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(`:KW`)?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},dj=class extends sj{static{e(this,`LangiumCompletionParser`)}static{s(this,`LangiumCompletionParser`)}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let t=this.lexer.tokenize(e,{mode:`partial`});return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){let n=this.wrapper.DEFINE_RULE(oj(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{let n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,n,r,i){this.before(r),this.wrapper.wrapSubrule(e,t,i),this.after(r)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},fj={recoveryEnabled:!0,nodeLocationTracking:`full`,skipValidations:!0,errorMessageProvider:new uj},pj=class extends _S{static{e(this,`ChevrotainWrapper`)}static{s(this,`ChevrotainWrapper`)}constructor(e,t){let n=t&&`maxLookahead`in t;super(e,{...fj,lookaheadStrategy:n?new Ax({maxLookahead:t.maxLookahead}):new TA({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,n){return this.RULE(e,t,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},mj=class extends pj{static{e(this,`ProfilerWrapper`)}static{s(this,`ProfilerWrapper`)}constructor(e,t,n){super(e,t),this.task=n}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,n){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,n)}finally{this.task.stopSubTask(this.ruleName(t))}}};function hj(e,t,n){return gj({parser:t,tokens:n,ruleNames:new Map},e),t}e(hj,`createParser`),s(hj,`createParser`);function gj(e,t){let n=Pa(t,!1),r=N(t.rules).filter(Xr).filter(e=>n.has(e));for(let t of r){let n={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(t,vj(n,t.definition))}let i=N(t.rules).filter(Or).filter(e=>n.has(e));for(let t of i)e.parser.rule(t,_j(e,t))}e(gj,`buildRules`),s(gj,`buildRules`);function _j(e,t){let n=t.call.rule.ref;if(!n)throw Error(`Could not resolve reference to infix operator rule: `+t.call.rule.$refText);if(gi(n))throw Error(`Cannot use terminal rule in infix expression`);let r=t.operators.precedences.flatMap(e=>e.operators),i={$type:`Group`,elements:[]},a={$container:i,$type:`Assignment`,feature:`parts`,operator:`+=`,terminal:t.call},o={$container:i,$type:`Group`,elements:[],cardinality:`*`};i.elements.push(a,o);let c={$container:o,$type:`Assignment`,feature:`operators`,operator:`+=`,terminal:{$type:`Alternatives`,elements:r}},l={...a,$container:o};o.elements.push(c,l);let u=r.map(t=>e.tokens[t.value]).map((t,n)=>({ALT:s(()=>e.parser.consume(n,t,c),`ALT`)})),d;return t=>{d??=Aj(e,n),e.parser.subrule(0,d,!1,a,t),e.parser.many(0,{DEF:s(()=>{e.parser.alternatives(0,u),e.parser.subrule(1,d,!1,l,t)},`DEF`)})}}e(_j,`buildInfixRule`),s(_j,`buildInfixRule`);function vj(e,t,n=!1){let r;if(Ir(t))r=Oj(e,t);else if(Xn(t))r=yj(e,t);else if(ir(t))r=vj(e,t.terminal);else if(mr(t))r=Dj(e,t);else if(ii(t))r=bj(e,t);else if(Qn(t))r=Cj(e,t);else if(Oi(t))r=wj(e,t);else if(wr(t))r=Tj(e,t);else if(vr(t)){let n=e.consume++;r=s(()=>e.parser.consume(n,nb,t),`method`)}else throw new aa(t.$cstNode,`Unexpected element type: ${t.$type}`);return kj(e,n?void 0:Ej(t),r,t.cardinality)}e(vj,`buildElement`),s(vj,`buildElement`);function yj(e,t){let n=ro(t);return()=>e.parser.action(n,t)}e(yj,`buildAction`),s(yj,`buildAction`);function bj(e,t){let n=t.rule.ref;if(Wn(n)){let r=e.subrule++,i=Xr(n)&&n.fragment,a=t.arguments.length>0?xj(n,t.arguments):()=>({}),o;return s=>{o??=Aj(e,n),e.parser.subrule(r,o,i,t,a(s))}}if(gi(n)){let r=e.consume++,i=Mj(e,n.name);return()=>e.parser.consume(r,i,t)}if(n)oa(n);else throw new aa(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}e(bj,`buildRuleCall`),s(bj,`buildRuleCall`);function xj(e,t){if(t.some(e=>e.calledByName)){let e=t.map(e=>({parameterName:e.parameter?.ref?.name,predicate:Sj(e.value)}));return t=>{let n={};for(let{parameterName:r,predicate:i}of e)r&&(n[r]=i(t));return n}}{let n=t.map(e=>Sj(e.value));return t=>{let r={};for(let i=0;it(e)||n(e)}if(fr(e)){let t=Sj(e.left),n=Sj(e.right);return e=>t(e)&&n(e)}if(Hr(e)){let t=Sj(e.value);return e=>!t(e)}if(Jr(e)){let t=e.parameter.ref.name;return e=>e!==void 0&&e[t]===!0}if(or(e)){let t=!!e.true;return()=>t}oa(e)}e(Sj,`buildPredicate`),s(Sj,`buildPredicate`);function Cj(e,t){if(t.elements.length===1)return vj(e,t.elements[0]);{let n=[];for(let r of t.elements){let t={ALT:vj(e,r,!0)},i=Ej(r);i&&(t.GATE=Sj(i)),n.push(t)}let r=e.or++;return t=>e.parser.alternatives(r,n.map(e=>{let n={ALT:s(()=>e.ALT(t),`ALT`)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n}))}}e(Cj,`buildAlternatives`),s(Cj,`buildAlternatives`);function wj(e,t){if(t.elements.length===1)return vj(e,t.elements[0]);let n=[];for(let r of t.elements){let t={ALT:vj(e,r,!0)},i=Ej(r);i&&(t.GATE=Sj(i)),n.push(t)}let r=e.or++,i=s((e,t)=>`uGroup_${e}_${t.getRuleStack().join(`-`)}`,`idFunc`),a=s(t=>e.parser.alternatives(r,n.map((n,a)=>{let o={ALT:s(()=>!0,`ALT`)},c=e.parser;o.ALT=()=>{if(n.ALT(t),!c.isRecording()){let e=i(r,c);c.unorderedGroups.get(e)||c.unorderedGroups.set(e,[]);let t=c.unorderedGroups.get(e);t?.[a]===void 0&&(t[a]=!0)}};let l=n.GATE;return o.GATE=l?()=>l(t):()=>!c.unorderedGroups.get(i(r,c))?.[a],o})),`alternatives`),o=kj(e,Ej(t),a,`*`);return t=>{o(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}e(wj,`buildUnorderedGroup`),s(wj,`buildUnorderedGroup`);function Tj(e,t){let n=t.elements.map(t=>vj(e,t));return e=>n.forEach(t=>t(e))}e(Tj,`buildGroup`),s(Tj,`buildGroup`);function Ej(e){if(wr(e))return e.guardCondition}e(Ej,`getGuardCondition`),s(Ej,`getGuardCondition`);function Dj(e,t,n=t.terminal){if(!n){if(!t.type.ref)throw Error(`Could not resolve reference to type: `+t.type.$refText);let n=Ka(t.type.ref)?.terminal;if(!n)throw Error(`Could not find name assignment for type: `+ro(t.type.ref));return Dj(e,t,n)}if(ii(n)&&Xr(n.rule.ref)){let r=n.rule.ref,i=e.subrule++,a;return n=>{a??=Aj(e,r),e.parser.subrule(i,a,!1,t,n)}}if(ii(n)&&gi(n.rule.ref)){let r=e.consume++,i=Mj(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}if(Ir(n)){let r=e.consume++,i=Mj(e,n.value);return()=>e.parser.consume(r,i,t)}throw Error(`Could not build cross reference parser`)}e(Dj,`buildCrossReference`),s(Dj,`buildCrossReference`);function Oj(e,t){let n=e.consume++,r=e.tokens[t.value];if(!r)throw Error(`Could not find token for keyword: `+t.value);return()=>e.parser.consume(n,r,t)}e(Oj,`buildKeyword`),s(Oj,`buildKeyword`);function kj(e,t,n,r){let i=t&&Sj(t);if(!r){if(i){let t=e.or++;return r=>e.parser.alternatives(t,[{ALT:s(()=>n(r),`ALT`),GATE:s(()=>i(r),`GATE`)},{ALT:hS(),GATE:s(()=>!i(r),`GATE`)}])}return n}if(r===`*`){let t=e.many++;return r=>e.parser.many(t,{DEF:s(()=>n(r),`DEF`),GATE:i?()=>i(r):void 0})}if(r===`+`){let t=e.many++;if(i){let r=e.or++;return a=>e.parser.alternatives(r,[{ALT:s(()=>e.parser.atLeastOne(t,{DEF:s(()=>n(a),`DEF`)}),`ALT`),GATE:s(()=>i(a),`GATE`)},{ALT:hS(),GATE:s(()=>!i(a),`GATE`)}])}return r=>e.parser.atLeastOne(t,{DEF:s(()=>n(r),`DEF`)})}if(r===`?`){let t=e.optional++;return r=>e.parser.optional(t,{DEF:s(()=>n(r),`DEF`),GATE:i?()=>i(r):void 0})}oa(r)}e(kj,`wrap`),s(kj,`wrap`);function Aj(e,t){let n=jj(e,t),r=e.parser.getRule(n);if(!r)throw Error(`Rule "${n}" not found."`);return r}e(Aj,`getRule`),s(Aj,`getRule`);function jj(e,t){if(Wn(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!Xr(r);)(wr(r)||Qn(r)||Oi(r))&&(i=r.elements.indexOf(n).toString()+`:`+i),n=r,r=r.$container;return i=r.name+`:`+i,e.ruleNames.set(t,i),i}}e(jj,`getRuleName`),s(jj,`getRuleName`);function Mj(e,t){let n=e.tokens[t];if(!n)throw Error(`Token "${t}" not found."`);return n}e(Mj,`getToken`),s(Mj,`getToken`);function Nj(e){let t=e.Grammar,n=e.parser.Lexer,r=new dj(e);return hj(t,r,n.definition),r.finalize(),r}e(Nj,`createCompletionParser`),s(Nj,`createCompletionParser`);function Pj(e){let t=Fj(e);return t.finalize(),t}e(Pj,`createLangiumParser`),s(Pj,`createLangiumParser`);function Fj(e){let t=e.Grammar,n=e.parser.Lexer;return hj(t,new cj(e),n.definition)}e(Fj,`prepareLangiumParser`),s(Fj,`prepareLangiumParser`);var Ij=class{static{e(this,`DefaultTokenBuilder`)}static{s(this,`DefaultTokenBuilder`)}constructor(){this.diagnostics=[]}buildTokens(e,t){let n=N(Pa(e,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,t);return i.push(...r),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(gi).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){let t=so(e),n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,r={name:e.name,PATTERN:n};return typeof n==`function`&&(r.LINE_BREAKS=!0),e.hidden&&(r.GROUP=Oa(t)?Hy.SKIPPED:`hidden`),r}requiresCustomPattern(e){return!!(e.flags.includes(`u`)||e.flags.includes(`s`))}regexPatternFunction(e){let t=new RegExp(e,e.flags+`y`);return(e,n)=>(t.lastIndex=n,t.exec(e))}buildKeywordTokens(e,t,n){return e.filter(Wn).flatMap(e=>Mn(e).filter(Ir)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,!!n?.caseInsensitive))}buildKeywordToken(e,t,n){let r=this.buildKeywordPattern(e,n),i={name:e.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(e,t)};return typeof r==`function`&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,t){return t?new RegExp(ka(e.value),`i`):e.value}findLongerAlt(e,t){return t.reduce((t,n)=>{let r=n?.PATTERN;return r?.source&&Aa(`^`+r.source+`$`,e.value)&&t.push(n),t},[])}},Lj=class{static{e(this,`DefaultValueConverter`)}static{s(this,`DefaultValueConverter`)}convert(e,t){let n=t.grammarSource;if(mr(n)&&(n=La(n)),ii(n)){let r=n.rule.ref;if(!r)throw Error(`This cst node was not parsed by a rule.`);return this.runConverter(r,e,t)}return e}runConverter(e,t,n){switch(e.name.toUpperCase()){case`INT`:return Rj.convertInt(t);case`STRING`:return Rj.convertString(t);case`ID`:return Rj.convertID(t)}switch(oo(e)?.toLowerCase()){case`number`:return Rj.convertNumber(t);case`boolean`:return Rj.convertBoolean(t);case`bigint`:return Rj.convertBigint(t);case`date`:return Rj.convertDate(t);default:return t}}},Rj;(function(t){function n(e){let t=``;for(let n=1;n{typeof setImmediate>`u`?setTimeout(e,0):setImmediate(e)})}e(zj,`delayNextTick`),s(zj,`delayNextTick`);var Bj=0,Vj=10;function Hj(){return Bj=performance.now(),new Z.CancellationTokenSource}e(Hj,`startCancelableOperation`),s(Hj,`startCancelableOperation`);function Uj(e){Vj=e}e(Uj,`setInterruptionPeriod`),s(Uj,`setInterruptionPeriod`);var Wj=Symbol(`OperationCancelled`);function Gj(e){return e===Wj}e(Gj,`isOperationCancelled`),s(Gj,`isOperationCancelled`);async function Kj(e){if(e===Z.CancellationToken.None)return;let t=performance.now();if(t-Bj>=Vj&&(Bj=t,await zj(),Bj=performance.now()),e.isCancellationRequested)throw Wj}e(Kj,`interruptAndCheck`),s(Kj,`interruptAndCheck`);var qj=class{static{e(this,`Deferred`)}static{s(this,`Deferred`)}constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}},Jj=class t{static{e(this,`_FullTextDocument`)}static{s(this,`FullTextDocument`)}constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,n){for(let n of e)if(t.isIncremental(n)){let e=$j(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);let i=Math.max(e.start.line,0),a=Math.max(e.end.line,0),o=this._lineOffsets,s=Zj(n.text,!1,t);if(a-i===s.length)for(let e=0,t=s.length;ee?r=i:n=i+1}let i=n-1;return e=this.ensureBeforeEOL(e,t[i]),{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line];if(e.character<=0)return n;let r=e.line+1t&&Qj(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}static isFull(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}},Yj;(function(t){function n(e,t,n,r){return new Jj(e,t,n,r)}e(n,`create`),s(n,`create`),t.create=n;function r(e,t,n){if(e instanceof Jj)return e.update(t,n),e;throw Error(`TextDocument.update: document must be created by TextDocument.create`)}e(r,`update`),s(r,`update`),t.update=r;function i(e,t){let n=e.getText(),r=Xj(t.map(eM),(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),i=0,a=[];for(let t of r){let r=e.offsetAt(t.range.start);if(ri&&a.push(n.substring(i,r)),t.newText.length&&a.push(t.newText),i=e.offsetAt(t.range.end)}return a.push(n.substr(i)),a.join(``)}e(i,`applyEdits`),s(i,`applyEdits`),t.applyEdits=i})(Yj||={});function Xj(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Xj(r,t),Xj(i,t);let a=0,o=0,s=0;for(;an.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}e($j,`getWellformedRange`),s($j,`getWellformedRange`);function eM(e){let t=$j(e.range);return t===e.range?e:{newText:e.newText,range:t}}e(eM,`getWellformedEdit`),s(eM,`getWellformedEdit`);var tM;(()=>{var t={975:t=>{function n(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}e(n,`e2`),s(n,`e`);function r(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1}a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}e(r,`r2`),s(r,`r`);var i={resolve:s(function(){for(var e,t=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),n(o),o.length!==0&&(t=o+`/`+t,i=o.charCodeAt(0)===47)}return t=r(t,!i),i?t.length>0?`/`+t:`/`:t.length>0?t:`.`},`resolve`),normalize:s(function(e){if(n(e),e.length===0)return`.`;var t=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=r(e,!t)).length!==0||t||(e=`.`),e.length>0&&i&&(e+=`/`),t?`/`+e:e},`normalize`),isAbsolute:s(function(e){return n(e),e.length>0&&e.charCodeAt(0)===47},`isAbsolute`),join:s(function(){if(arguments.length===0)return`.`;for(var e,t=0;t0&&(e===void 0?e=r:e+=`/`+r)}return e===void 0?`.`:i.normalize(e)},`join`),relative:s(function(e,t){if(n(e),n(t),e===t||(e=i.resolve(e))===(t=i.resolve(t)))return``;for(var r=1;rl){if(t.charCodeAt(s+d)===47)return t.slice(s+d+1);if(d===0)return t.slice(s+d)}else o>l&&(e.charCodeAt(r+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(r+d);if(f!==t.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=r+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+t.slice(s+u):(s+=u,t.charCodeAt(s)===47&&++s,t.slice(s))},`relative`),_makeLong:s(function(e){return e},`_makeLong`),dirname:s(function(e){if(n(e),e.length===0)return`.`;for(var t=e.charCodeAt(0),r=t===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((t=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},`dirname`),basename:s(function(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);n(e);var r,i=0,a=-1,o=!0;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return``;var s=t.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===t.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},`basename`),extname:s(function(e){n(e);for(var t=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?t===-1?t=s:o!==1&&(o=1):t!==-1&&(o=-1);else if(!a){r=s+1;break}}return t===-1||i===-1||o===0||o===1&&t===i-1&&t===r+1?``:e.slice(t,i)},`extname`),format:s(function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return(function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r})(0,e)},`format`),parse:s(function(e){n(e);var t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;var r,i=e.charCodeAt(0),a=i===47;a?(t.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(t.base=t.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(t.name=e.slice(1,o),t.base=e.slice(1,c)):(t.name=e.slice(s,o),t.base=e.slice(s,c)),t.ext=e.slice(o,c)),s>0?t.dir=e.slice(0,s-1):a&&(t.dir=`/`),t},`parse`),sep:`/`,delimiter:`:`,win32:null,posix:null};i.posix=i,t.exports=i}},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}e(r,`r`),s(r,`r`),r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};let a;r.r(i),r.d(i,{URI:s(()=>f,`URI`),Utils:s(()=>te,`Utils`)}),typeof process==`object`?a=process.platform===`win32`:typeof navigator==`object`&&(a=navigator.userAgent.indexOf(`Windows`)>=0);let o=/^\w[\w\d+.-]*$/,c=/^\//,l=/^\/\//;function u(e,t){if(!e.scheme&&t)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!c.test(e.path))throw Error(`[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character`)}else if(l.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}e(u,`a`),s(u,`a`);let d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{static{e(this,`l`)}static{s(this,`l`)}static isUri(e){return e instanceof f||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=(function(e,t){return e||t?e:`file`})(e,a),this.authority=t||``,this.path=(function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t})(this.scheme,n||``),this.query=r||``,this.fragment=i||``,u(this,a))}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new m(t,n,r,i,a)}static parse(e,t=!1){let n=d.exec(e);return n?new m(n[2]||``,S(n[4]||``),S(n[5]||``),S(n[7]||``),S(n[9]||``),t):new m(``,``,``,``,``)}static file(e){let t=``;if(a&&(e=e.replace(/\\/g,`/`)),e[0]===`/`&&e[1]===`/`){let n=e.indexOf(`/`,2);n===-1?(t=e.substring(2),e=`/`):(t=e.substring(2,n),e=e.substring(n)||`/`)}return new m(`file`,t,e,``,``)}static from(e){let t=new m(e.scheme,e.authority,e.path,e.query,e.fragment);return u(t,!0),t}toString(e=!1){return y(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof f)return e;{let t=new m(e);return t._formatted=e.external,t._fsPath=e._sep===p?e.fsPath:null,t}}return e}}let p=a?1:void 0;class m extends f{static{e(this,`d`)}static{s(this,`d`)}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=v(this,!1),this._fsPath}toString(e=!1){return e?y(this,!0):(this._formatted||=y(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=p),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let h={58:`%3A`,47:`%2F`,63:`%3F`,35:`%23`,91:`%5B`,93:`%5D`,64:`%40`,33:`%21`,36:`%24`,38:`%26`,39:`%27`,40:`%28`,41:`%29`,42:`%2A`,43:`%2B`,44:`%2C`,59:`%3B`,61:`%3D`,32:`%20`};function g(e,t,n){let r,i=-1;for(let a=0;a=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=h[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}e(g,`m`),s(g,`m`);function _(e){let t;for(let n=0;n1&&e.scheme===`file`?`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,a&&(n=n.replace(/\//g,`\\`)),n}e(v,`v`),s(v,`v`);function y(e,t){let n=t?_:g,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:g(c,!1,!1)),r}e(y,`b`),s(y,`b`);function b(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+b(e.substr(3)):e}}e(b,`C`),s(b,`C`);let x=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function S(e){return e.match(x)?e.replace(x,(e=>b(e))):e}e(S,`w`),s(S,`w`);var ee=r(975);let C=ee.posix||ee;var te;(function(e){e.joinPath=function(e,...t){return e.with({path:C.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=C.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=C.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return C.basename(e.path)},e.extname=function(e){return C.extname(e.path)}})(te||={}),tM=i})();var{URI:nM,Utils:rM}=tM,iM;(function(t){t.basename=rM.basename,t.dirname=rM.dirname,t.extname=rM.extname,t.joinPath=rM.joinPath,t.resolvePath=rM.resolvePath;let n=typeof process==`object`&&process?.platform===`win32`;function r(e,t){return e?.toString()===t?.toString()}e(r,`equals`),s(r,`equals`),t.equals=r;function i(e,t){let r=typeof e==`string`?nM.parse(e).path:e.path,i=typeof t==`string`?nM.parse(t).path:t.path,a=r.split(`/`).filter(e=>e.length>0),o=i.split(`/`).filter(e=>e.length>0);if(n){let e=/^[A-Z]:$/;if(a[0]&&e.test(a[0])&&(a[0]=a[0].toLowerCase()),o[0]&&e.test(o[0])&&(o[0]=o[0].toLowerCase()),a[0]!==o[0])return i.substring(1)}let s=0;for(;s({name:e.name,uri:iM.joinPath(nM.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(iM.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){let n=e.split(`/`);e.charAt(e.length-1)===`/`&&n.pop();let r=this.root;for(let e of n){let n=r.children.get(e);if(!n){if(t)n={name:e,children:new Map,parent:r},r.children.set(e,n);else return}r=n}return r}collectValues(e){let t=[];e.element&&t.push(e.element);for(let n of e.children.values())t.push(...this.collectValues(n));return t}},Q;(function(e){e[e.Changed=0]=`Changed`,e[e.Parsed=1]=`Parsed`,e[e.IndexedContent=2]=`IndexedContent`,e[e.ComputedScopes=3]=`ComputedScopes`,e[e.Linked=4]=`Linked`,e[e.IndexedReferences=5]=`IndexedReferences`,e[e.Validated=6]=`Validated`})(Q||={});var oM=class{static{e(this,`DefaultLangiumDocumentFactory`)}static{s(this,`DefaultLangiumDocumentFactory`)}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=Z.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,t)}fromTextDocument(e,t,n){return t??=nM.parse(e.uri),Z.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromString(e,t,n){return Z.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,n){if(typeof t==`string`){let r=this.parse(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}if(`$model`in t){let n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}{let r=this.parse(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}async createAsync(e,t,n){if(typeof t==`string`){let r=await this.parseAsync(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}{let r=await this.parseAsync(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}createLangiumDocument(e,t,n,r){let i;if(n)i={parseResult:e,uri:t,state:Q.Parsed,references:[],textDocument:n};else{let n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:Q.Parsed,references:[],get textDocument(){return n()}}}return e.value.$document=i,i}async update(e,t){let n=e.parseResult.value.$cstNode?.root.fullText,r=this.textDocuments?.get(e.uri.toString()),i=r?r.getText():await this.fileSystemProvider.readFile(e.uri);if(r)Object.defineProperty(e,"textDocument",{value:r});else{let t=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:t})}return n!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=Q.Parsed,e}parse(e,t,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,n)}parseAsync(e,t,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,n)}createTextDocumentGetter(e,t){let n=this.serviceRegistry,r;return()=>r??=Yj.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t??``)}},sM=class{static{e(this,`DefaultLangiumDocuments`)}static{s(this,`DefaultLangiumDocuments`)}constructor(e){this.documentTrie=new aM,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return N(this.documentTrie.all())}addDocument(e){let t=e.uri.toString();if(this.documentTrie.has(t))throw Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){let t=e.toString();return this.documentTrie.find(t)}getDocuments(e){let t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(n),n)}createDocument(e,t,n){if(n)return this.langiumDocumentFactory.fromString(t,e,n).then(e=>(this.addDocument(e),e));{let n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&this.documentBuilder().resetToState(n,Q.Changed),n}deleteDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&(n.state=Q.Changed,this.documentTrie.delete(t)),n}deleteDocuments(e){let t=e.toString(),n=this.documentTrie.findAll(t);for(let e of n)e.state=Q.Changed;return this.documentTrie.delete(t),n}},cM=Symbol(`RefResolving`),lM=class{static{e(this,`DefaultLinker`)}static{s(this,`DefaultLinker`)}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=Z.CancellationToken.None){if(this.profiler?.isActive(`linking`)){let n=this.profiler.createTask(`linking`,this.languageId);n.start();try{for(let r of Nn(e.parseResult.value))await Kj(t),Fn(r).forEach(t=>{let i=`${r.$type}:${t.property}`;n.startSubTask(i);try{this.doLink(t,e)}finally{n.stopSubTask(i)}})}finally{n.stop()}}else for(let n of Nn(e.parseResult.value))await Kj(t),Fn(n).forEach(t=>this.doLink(t,e))}doLink(e,t){let n=e.reference;if(`_ref`in n&&n._ref===void 0){n._ref=cM;try{let t=this.getCandidate(e);fn(t)?n._ref=t:(n._nodeDescription=t,n._ref=this.loadAstNode(t)??this.createLinkingError(e,t))}catch(t){console.error(`An error occurred while resolving reference to '${n.$refText}':`,t);let r=t.message??String(t);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${r}`}}t.references.push(n)}else if(`_items`in n&&n._items===void 0){n._items=cM;try{let t=this.getCandidates(e),r=[];if(fn(t))n._linkingError=t;else for(let e of t){let t=this.loadAstNode(e);t&&r.push({ref:t,$nodeDescription:e})}n._items=r}catch(t){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${t}`},n._items=[]}t.references.push(n)}}unlink(e){for(let t of e.references)`_ref`in t?(t._ref=void 0,delete t._nodeDescription):`_items`in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){let t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>`${e.documentUri}#${e.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,n,r){let i=this,a={$refNode:n,$refText:r,_ref:void 0,get ref(){if(M(this._ref))return this._ref;if(dn(this._nodeDescription)){let n=i.loadAstNode(this._nodeDescription);this._ref=n??i.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){this._ref=cM;let n=kn(e).$document,r=i.getLinkedNode({reference:a,container:e,property:t});if(r.error&&n&&n.state0))return this._linkingError=i.createLinkingError({reference:a,container:e,property:t})}};return a}throwCyclicReferenceError(e,t,n){throw Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${n}')`)}getLinkedNode(e){try{let t=this.getCandidate(e);if(fn(t))return{error:t};let n=this.loadAstNode(t);return n?{node:n,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);let n=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node)return e.node;let t=this.langiumDocuments().getDocument(e.documentUri);if(t)return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){let n=kn(e.container).$document;return n&&n.statemr(e)&&e.isMulti)}findDeclarations(e){if(e){let t=Ga(e),n=e.astNode;if(t&&n){let r=n[t.feature];if(ln(r)||un(r))return An(r);if(Array.isArray(r)){for(let t of r)if((ln(t)||un(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return An(t)}}if(n){let t=this.nameProvider.getNameNode(n);if(t&&(t===e||zi(e,t)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){let t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(t.head());if(n){for(let t of Fn(n))if(un(t.reference)&&t.reference.items.some(t=>t.ref===e))return t.reference.items.map(e=>e.ref)}return[e]}return[e]}getNodeFromReferenceDescription(e){if(!e)return;let t=this.documents.getDocument(e.sourceUri);if(t)return this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath)}findDeclarationNodes(e){let t=this.findDeclarations(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e)??e.$cstNode;t&&n.push(t)}return n}findReferences(e,t){let n=[];t.includeDeclaration&&n.push(...this.getSelfReferences(e));let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(r=r.filter(e=>iM.equals(e.sourceUri,t.documentUri))),n.push(...r),N(n)}getSelfReferences(e){let t=this.getSelfNodes(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e);if(t){let r=On(e),i=this.nodeLocator.getAstNodePath(e);n.push({sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:Vi(t),local:!0})}}return n}},pM=class{static{e(this,`MultiMap`)}static{s(this,`MultiMap`)}constructor(e){if(this.map=new Map,e)for(let[t,n]of e)this.add(t,n)}get size(){return Cn.sum(N(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{let n=this.map.get(e);if(n){let r=n.indexOf(t);if(r>=0)return n.length===1?this.map.delete(e):n.splice(r,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){let t=this.map.get(e);return t?N(t):bn}has(e,t){if(t===void 0)return this.map.has(e);{let n=this.map.get(e);return n?n.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,n)=>t.forEach(t=>e(t,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return N(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return N(this.map.keys())}values(){return N(this.map.values()).flat()}entriesGroupedByKey(){return N(this.map.entries())}},mM=class{static{e(this,`BiMap`)}static{s(this,`BiMap`)}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[t,n]of e)this.set(t,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let t=this.map.get(e);return t!==void 0&&(this.map.delete(e),this.inverse.delete(t),!0)}},hM=class{static{e(this,`DefaultScopeComputation`)}static{s(this,`DefaultScopeComputation`)}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=Z.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,n=jn,r=Z.CancellationToken.None){let i=[];this.addExportedSymbol(e,i,t);for(let a of n(e))await Kj(r),this.addExportedSymbol(a,i,t);return i}addExportedSymbol(e,t,n){let r=this.nameProvider.getName(e);r&&t.push(this.descriptions.createDescription(e,r,n))}async collectLocalSymbols(e,t=Z.CancellationToken.None){let n=e.parseResult.value,r=new pM;for(let i of Mn(n))await Kj(t),this.addLocalSymbol(i,e,r);return r}addLocalSymbol(e,t,n){let r=e.$container;if(r){let i=this.nameProvider.getName(e);i&&n.add(r,this.descriptions.createDescription(e,i,t))}}},gM=class{static{e(this,`StreamScope`)}static{s(this,`StreamScope`)}constructor(e,t,n){this.elements=e,this.outerScope=t,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t):this.elements.find(t=>t.name===e);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===t):this.elements.filter(t=>t.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}},_M=class{static{e(this,`MapScope`)}static{s(this,`MapScope`)}constructor(e,t,n){this.elements=new Map,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(let t of e){let e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.set(e,t)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t),r=n?[n]:[];return(this.concatOuterScope||r.length>0)&&this.outerScope?N(r).concat(this.outerScope.getElements(e)):N(r)}getAllElements(){let e=N(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},vM=class{static{e(this,`MultiMapScope`)}static{s(this,`MultiMapScope`)}constructor(e,t,n){this.elements=new pM,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(let t of e){let e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.add(e,t)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t)[0];if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);return(this.concatOuterScope||n.length===0)&&this.outerScope?N(n).concat(this.outerScope.getElements(e)):N(n)}getAllElements(){let e=N(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},yM={getElement(){},getElements(){return bn},getAllElements(){return bn}},bM=class{static{e(this,`DisposableCache`)}static{s(this,`DisposableCache`)}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw Error(`This cache has already been disposed`)}},xM=class extends bM{static{e(this,`SimpleCache`)}static{s(this,`SimpleCache`)}constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){let n=t();return this.cache.set(e,n),n}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},SM=class extends bM{static{e(this,`ContextCache`)}static{s(this,`ContextCache`)}constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed(),this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();let r=this.cacheForContext(e);if(r.has(t))return r.get(t);if(n){let e=n();return r.set(t,e),e}}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){let t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){let t=this.converter(e),n=this.cache.get(t);return n||(n=new Map,this.cache.set(t,n)),n}},CM=class extends SM{static{e(this,`DocumentCache`)}static{s(this,`DocumentCache`)}constructor(e,t){super(e=>e.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,e=>{this.clear(e.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{for(let e of t)this.clear(e)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{let n=e.concat(t);for(let e of n)this.clear(e)}))}},wM=class extends xM{static{e(this,`WorkspaceCache`)}static{s(this,`WorkspaceCache`)}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{t.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},TM=class{static{e(this,`DefaultScopeProvider`)}static{s(this,`DefaultScopeProvider`)}constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new wM(e.shared)}getScope(e){let t=[],n=this.reflection.getReferenceType(e),r=On(e.container).localSymbols;if(r){let i=e.container;do r.has(i)&&t.push(r.getStream(i).filter(e=>this.reflection.isSubtype(e.type,n))),i=i.$container;while(i)}let i=this.getGlobalScope(n,e);for(let e=t.length-1;e>=0;e--)i=this.createScope(t[e],i);return i}createScope(e,t,n){return new gM(N(e),t,n)}createScopeForNodes(e,t,n){return new gM(N(e).map(e=>{let t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable(),t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new vM(this.indexManager.allElements(e)))}};function EM(e){return typeof e.$comment==`string`}e(EM,`isAstNodeWithComment`),s(EM,`isAstNodeWithComment`);function DM(e){return typeof e==`object`&&!!e&&(`$ref`in e||`$error`in e)}e(DM,`isIntermediateReference`),s(DM,`isIntermediateReference`);var OM=class{static{e(this,`DefaultJsonSerializer`)}static{s(this,`DefaultJsonSerializer`)}constructor(e){this.ignoreProperties=new Set([`$container`,`$containerProperty`,`$containerIndex`,`$document`,`$cstNode`]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){let n=t??{},r=t?.replacer,i=s((e,t)=>this.replacer(e,t,n),`defaultReplacer`),a=r?(e,t)=>r(e,t,i):i;try{return this.currentDocument=On(e),JSON.stringify(e,a,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){let n=t??{},r=JSON.parse(e);return this.linkNode(r,r,n),r}replacer(e,t,{refText:n,sourceText:r,textRegions:i,comments:a,uriConverter:o}){if(!this.ignoreProperties.has(e)){if(ln(t)){let e=t.ref,r=n?t.$refText:void 0;if(e){let t=On(e),n=``;this.currentDocument&&this.currentDocument!==t&&(n=o?o(t.uri,e):t.uri.toString());let i=this.astNodeLocator.getAstNodePath(e);return{$ref:`${n}#${i}`,$refText:r}}return{$error:t.error?.message??`Could not resolve reference`,$refText:r}}if(un(t)){let e=n?t.$refText:void 0,r=[];for(let e of t.items){let t=e.ref,n=On(e.ref),i=``;this.currentDocument&&this.currentDocument!==n&&(i=o?o(n.uri,t):n.uri.toString());let a=this.astNodeLocator.getAstNodePath(t);r.push(`${i}#${a}`)}return{$refs:r,$refText:e}}if(M(t)){let n;if(i&&(n=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&n?.$textRegion&&(n.$textRegion.documentURI=this.currentDocument?.uri.toString())),r&&!e&&(n??={...t},n.$sourceText=t.$cstNode?.text),a){n??={...t};let e=this.commentProvider.getComment(t);e&&(n.$comment=e.replace(/\r/g,``))}return n??t}return t}}addAstNodeRegionWithAssignmentsTo(e){let t=s(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),`createDocumentSegment`);if(e.$cstNode){let n=e.$textRegion=t(e.$cstNode),r=n.assignments={};return Object.keys(e).filter(e=>!e.startsWith(`$`)).forEach(n=>{let i=za(e.$cstNode,n).map(t);i.length!==0&&(r[n]=i)}),e}}linkNode(e,t,n,r,i,a){for(let[r,i]of Object.entries(e))if(Array.isArray(i))for(let a=0;a{await this.handleException(()=>e.call(t,n,r,i),`An error occurred during validation`,r,n)}}async handleException(e,t,n,r){try{await e()}catch(e){if(Gj(e))throw e;console.error(`${t}:`,e),e instanceof Error&&e.stack&&console.error(e.stack),n(`error`,`${t}: ${e instanceof Error?e.message:String(e)}`,{node:r})}}addEntry(e,t){if(e===`AstNode`){this.entries.add(`AstNode`,t);return}for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,t)}getChecks(e,t){let n=N(this.entries.get(e)).concat(this.entries.get(`AstNode`));return t&&(n=n.filter(e=>t.includes(e.category))),n.map(e=>e.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,`An error occurred during set-up of the validation`,t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,`An error occurred during tear-down of the validation`,t))}wrapPreparationException(e,t,n){return async(r,i,a,o)=>{await this.handleException(()=>e.call(n,r,i,a,o),t,i,r)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},NM=Object.freeze({validateNode:!0,validateChildren:!0}),PM=class{static{e(this,`DefaultDocumentValidator`)}static{s(this,`DefaultDocumentValidator`)}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},n=Z.CancellationToken.None){let r=e.parseResult,i=[];if(await Kj(n),(!t.categories||t.categories.includes(`built-in`))&&(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some(e=>e.data?.code===RM.LexingError)||(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some(e=>e.data?.code===RM.ParsingError))||(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>e.data?.code===RM.LinkingError))))return i;try{i.push(...await this.validateAst(r.value,t,n))}catch(e){if(Gj(e))throw e;console.error(`An error occurred during validation:`,e)}return await Kj(n),i}processLexingErrors(e,t,n){let r=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(let e of r){let n=e.severity??`error`,r={severity:IM(n),range:{start:{line:e.line-1,character:e.column-1},end:{line:e.line-1,character:e.column+e.length-1}},message:e.message,data:LM(n),source:this.getSource()};t.push(r)}}processParsingErrors(e,t,n){for(let n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if(`previousToken`in n){let t=n.previousToken;if(isNaN(t.startOffset)){let t={line:0,character:0};e={start:t,end:t}}else{let n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}}}else e=Bi(n.token);if(e){let r={severity:IM(`error`),range:e,message:n.message,data:AM(RM.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,n){for(let n of e.references){let e=n.error;if(e){let r={node:e.info.container,range:n.$refNode?.range,property:e.info.property,index:e.info.index,data:{code:RM.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic(`error`,e.message,r))}}}async validateAst(e,t,n=Z.CancellationToken.None){let r=[],i=s((e,t,n)=>{r.push(this.toDiagnostic(e,t,n))},`acceptor`);return await this.validateAstBefore(e,t,i,n),await this.validateAstNodes(e,t,i,n),await this.validateAstAfter(e,t,i,n),r}async validateAstBefore(e,t,n,r=Z.CancellationToken.None){let i=this.validationRegistry.checksBefore;for(let a of i)await Kj(r),await a(e,n,t.categories??[],r)}async validateAstNodes(e,t,n,r=Z.CancellationToken.None){if(this.profiler?.isActive(`validating`)){let i=this.profiler.createTask(`validating`,this.languageId);i.start();try{let a=Nn(e).iterator();for(let e of a){i.startSubTask(e.$type);let o=this.validateSingleNodeOptions(e,t);if(o.validateNode)try{let i=this.validationRegistry.getChecks(e.$type,t.categories);for(let t of i)await t(e,n,r)}finally{i.stopSubTask(e.$type)}o.validateChildren||a.prune()}}finally{i.stop()}}else{let i=Nn(e).iterator();for(let e of i){await Kj(r);let a=this.validateSingleNodeOptions(e,t);if(a.validateNode){let i=this.validationRegistry.getChecks(e.$type,t.categories);for(let t of i)await t(e,n,r)}a.validateChildren||i.prune()}}}validateSingleNodeOptions(e,t){return NM}async validateAstAfter(e,t,n,r=Z.CancellationToken.None){let i=this.validationRegistry.checksAfter;for(let a of i)await Kj(r),await a(e,n,t.categories??[],r)}toDiagnostic(e,t,n){return{message:t,range:FM(n),severity:IM(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};function FM(e){if(e.range)return e.range;let t;return typeof e.property==`string`?t=Ba(e.node.$cstNode,e.property,e.index):typeof e.keyword==`string`&&(t=Ua(e.node.$cstNode,e.keyword,e.index)),t??=e.node.$cstNode,t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}e(FM,`getDiagnosticRange`),s(FM,`getDiagnosticRange`);function IM(e){switch(e){case`error`:return 1;case`warning`:return 2;case`info`:return 3;case`hint`:return 4;default:throw Error(`Invalid diagnostic severity: `+e)}}e(IM,`toDiagnosticSeverity`),s(IM,`toDiagnosticSeverity`);function LM(e){switch(e){case`error`:return AM(RM.LexingError);case`warning`:return AM(RM.LexingWarning);case`info`:return AM(RM.LexingInfo);case`hint`:return AM(RM.LexingHint);default:throw Error(`Invalid diagnostic severity: `+e)}}e(LM,`toDiagnosticData`),s(LM,`toDiagnosticData`);var RM;(function(e){e.LexingError=`lexing-error`,e.LexingWarning=`lexing-warning`,e.LexingInfo=`lexing-info`,e.LexingHint=`lexing-hint`,e.ParsingError=`parsing-error`,e.LinkingError=`linking-error`})(RM||={});var zM=class{static{e(this,`DefaultAstNodeDescriptionProvider`)}static{s(this,`DefaultAstNodeDescriptionProvider`)}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n){let r=n??On(e);t??=this.nameProvider.getName(e);let i=this.astNodeLocator.getAstNodePath(e);if(!t)throw Error(`Node at path ${i} has no name.`);let a,o=s(()=>a??=Vi(this.nameProvider.getNameNode(e)??e.$cstNode),`nameSegmentGetter`);return{node:e,name:t,get nameSegment(){return o()},selectionSegment:Vi(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},BM=class{static{e(this,`DefaultReferenceDescriptionProvider`)}static{s(this,`DefaultReferenceDescriptionProvider`)}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Z.CancellationToken.None){let n=[],r=e.parseResult.value;for(let e of Nn(r))await Kj(t),Fn(e).forEach(e=>{e.reference.error||n.push(...this.createInfoDescriptions(e))});return n}createInfoDescriptions(e){let t=e.reference;if(t.error||!t.$refNode)return[];let n=[];ln(t)&&t.$nodeDescription?n=[t.$nodeDescription]:un(t)&&(n=t.items.map(e=>e.$nodeDescription).filter(e=>e!==void 0));let r=On(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),a=[],o=Vi(t.$refNode);for(let e of n)a.push({sourceUri:r,sourcePath:i,targetUri:e.documentUri,targetPath:e.path,segment:o,local:iM.equals(e.documentUri,r)});return a}},VM=class{static{e(this,`DefaultAstNodeLocator`)}static{s(this,`DefaultAstNodeLocator`)}constructor(){this.segmentSeparator=`/`,this.indexSeparator=`@`}getAstNodePath(e){if(e.$container){let t=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return t+this.segmentSeparator+n}return``}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw Error(`Missing '$containerProperty' in AST node.`);return t===void 0?e:e+this.indexSeparator+t}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{if(!e||t.length===0)return e;let n=t.indexOf(this.indexSeparator);if(n>0){let r=t.substring(0,n),i=parseInt(t.substring(n+1));return e[r]?.[i]}return e[t]},e)}},HM={};f(HM,p(yt(),1));var UM=class{static{e(this,`DefaultConfigurationProvider`)}static{s(this,`DefaultConfigurationProvider`)}constructor(e){this._ready=new qj,this.onConfigurationSectionUpdateEmitter=new HM.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){let t=this.serviceRegistry.all;e.register({section:t.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let t=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(t);t.forEach((e,t)=>{this.updateSectionConfiguration(e.section,n[t])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings==`object`&&e.settings!==null&&Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;let n=this.toSectionName(e);if(this.settings[n])return this.settings[n][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},WM=p(on(),1),GM;(function(t){function n(e){return{dispose:s(async()=>await e(),`dispose`)}}e(n,`create`),s(n,`create`),t.create=n})(GM||={});var KM=class{static{e(this,`DefaultDocumentBuilder`)}static{s(this,`DefaultDocumentBuilder`)}constructor(e){this.updateBuildOptions={validation:{categories:[`built-in`,`fast`]}},this.updateListeners=[],this.buildPhaseListeners=new pM,this.documentPhaseListeners=new pM,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Q.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=Z.CancellationToken.None){for(let n of e){let e=n.uri.toString();if(n.state===Q.Validated){if(typeof t.validation==`boolean`&&t.validation)this.resetToState(n,Q.IndexedReferences);else if(typeof t.validation==`object`){let r=this.findMissingValidationCategories(n,t);r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:{categories:r}},result:this.buildState.get(e)?.result}),n.state=Q.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=Q.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=Z.CancellationToken.None){this.currentState=Q.Changed;let r=[];for(let e of t){let t=this.langiumDocuments.deleteDocuments(e);for(let e of t)r.push(e.uri),this.cleanUpDeleted(e)}let i=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat();for(let e of i){let t=this.langiumDocuments.getDocument(e);t===void 0&&(t=this.langiumDocumentFactory.fromModel({$type:`INVALID`},e),t.state=Q.Changed,this.langiumDocuments.addDocument(t)),this.resetToState(t,Q.Changed)}let a=N(i).concat(r).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!a.has(e.uri.toString())&&this.shouldRelink(e,a)).forEach(e=>this.resetToState(e,Q.ComputedScopes)),await this.emitUpdate(i,r),await Kj(n);let o=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state=1}findMissingValidationCategories(e,t){let n=this.buildState.get(e.uri.toString()),r=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=n?.result?.validationChecks?new Set(n?.result?.validationChecks):n?.completed?r:new Set;return N(t===void 0||t.validation===!0?r:typeof t.validation==`object`?t.validation.categories??r:[]).filter(e=>!i.has(e)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{let t=await this.fileSystemProvider.stat(e);if(t.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(t))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(n=>n(e,t)))}sortDocuments(e){let t=0,n=e.length-1;for(;t=0&&!this.hasTextDocument(e[n]);)n--;te.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),GM.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case Q.Changed:case Q.Parsed:this.indexManager.removeContent(e.uri);case Q.IndexedContent:e.localSymbols=void 0;case Q.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Q.Linked:this.indexManager.removeReferences(e.uri);case Q.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Q.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Q.Changed}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,Q.Parsed,n,e=>this.langiumDocumentFactory.update(e,n)),await this.runCancelable(e,Q.IndexedContent,n,e=>this.indexManager.updateContent(e,n)),await this.runCancelable(e,Q.ComputedScopes,n,async e=>{e.localSymbols=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectLocalSymbols(e,n)});let r=e.filter(e=>this.shouldLink(e));await this.runCancelable(r,Q.Linked,n,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n)),await this.runCancelable(r,Q.IndexedReferences,n,e=>this.indexManager.updateReferences(e,n));let i=e.filter(e=>this.shouldValidate(e)?!0:(this.markAsCompleted(e),!1));await this.runCancelable(i,Q.Validated,n,async e=>{await this.validate(e,n),this.markAsCompleted(e)})}markAsCompleted(e){let t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(let n of e){let e=n.uri.toString(),r=this.buildState.get(e);(!r||r.completed)&&this.buildState.set(e,{completed:!1,options:t,result:r?.result})}}async runCancelable(e,t,n,r){for(let i of e)i.statee.state===t);await this.notifyBuildPhase(i,t,n),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),GM.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),GM.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,n){let r;return t&&`path`in t?r=t:n=t,n??=Z.CancellationToken.None,r?this.awaitDocumentState(e,r,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,t,n){let r=this.langiumDocuments.getDocument(t);return r?r.state>=e?Promise.resolve(t):n.isCancellationRequested?Promise.reject(Wj):this.currentState>=e&&e>r.state?Promise.reject(new WM.ResponseError(WM.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${Q[r.state]}, requiring ${Q[e]}, but workspace state is already ${Q[this.currentState]}. Returning undefined.`)):new Promise((r,i)=>{let a=this.onDocumentPhase(e,e=>{iM.equals(e.uri,t)&&(a.dispose(),o.dispose(),r(e.uri))}),o=n.onCancellationRequested(()=>{a.dispose(),o.dispose(),i(Wj)})}):Promise.reject(new WM.ResponseError(WM.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(Wj):new Promise((n,r)=>{let i=this.onBuildPhase(e,()=>{i.dispose(),a.dispose(),n()}),a=t.onCancellationRequested(()=>{i.dispose(),a.dispose(),r(Wj)})})}async notifyDocumentPhase(e,t,n){let r=this.documentPhaseListeners.get(t).slice();for(let t of r)try{await Kj(n),await t(e,n)}catch(e){if(!Gj(e))throw e}}async notifyBuildPhase(e,t,n){if(e.length===0)return;let r=this.buildPhaseListeners.get(t).slice();for(let t of r)await Kj(n),await t(e,n)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){let n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,r=this.getBuildOptions(e),i=typeof r.validation==`object`?{...r.validation}:{};i.categories=this.findMissingValidationCategories(e,r);let a=await n.validateDocument(e,i,t);e.diagnostics?e.diagnostics.push(...a):e.diagnostics=a;let o=this.buildState.get(e.uri.toString());o&&(o.result??={},o.result.validationChecks?o.result.validationChecks=N(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},qM=class{static{e(this,`DefaultIndexManager`)}static{s(this,`DefaultIndexManager`)}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new SM,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let n=On(e).uri,r=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{iM.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)})}),N(r)}allElements(e,t){let n=N(this.symbolIndex.keys());return t&&(n=n.filter(e=>!t||t.has(e))),n.map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){let t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){let t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=Z.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),r=e.uri.toString();this.symbolIndex.set(r,n),this.symbolByTypeIndex.clear(r)}async updateReferences(e,t=Z.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){let n=this.referenceIndex.get(e.uri.toString());return n?n.some(e=>!e.local&&t.has(e.targetUri.toString())):!1}},JM=class{static{e(this,`DefaultWorkspaceManager`)}static{s(this,`DefaultWorkspaceManager`)}constructor(e){this.initialBuildOptions={},this._ready=new qj,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=Z.CancellationToken.None){let n=await this.performStartup(e);await Kj(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){let t=[],n=s(e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},`collector`);await this.loadAdditionalDocuments(e,n);let r=[];await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,r)));let i=N(r).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e));return await this.loadWorkspaceDocuments(i,n),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{t(await this.langiumDocuments.getOrCreateDocument(e))}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return nM.parse(e.uri)}async traverseFolder(e,t){try{let n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(t){console.error(`Failure to read directory content of `+e.toString(!0),t)}}async searchFolder(e){let t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){let t=iM.basename(e.uri);return t.startsWith(`.`)?!1:e.isDirectory?t!==`node_modules`&&t!==`out`:e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},YM=class{static{e(this,`DefaultLexerErrorMessageProvider`)}static{s(this,`DefaultLexerErrorMessageProvider`)}buildUnexpectedCharactersMessage(e,t,n,r,i){return By.buildUnexpectedCharactersMessage(e,t,n,r,i)}buildUnableToPopLexerModeMessage(e){return By.buildUnableToPopLexerModeMessage(e)}},XM={mode:`full`},ZM=class{static{e(this,`DefaultLexer`)}static{s(this,`DefaultLexer`)}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);let n=eN(t)?Object.values(t):t,r=e.LanguageMetaData.mode===`production`;this.chevrotainLexer=new Hy(n,{positionTracking:`full`,skipValidations:r,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=XM){let n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(eN(e))return e;let t=$M(e)?Object.values(e.modes).flat():e,n={};return t.forEach(e=>n[e.name]=e),n}};function QM(e){return Array.isArray(e)&&(e.length===0||`name`in e[0])}e(QM,`isTokenTypeArray`),s(QM,`isTokenTypeArray`);function $M(e){return e&&`modes`in e&&`defaultMode`in e}e($M,`isIMultiModeLexerDefinition`),s($M,`isIMultiModeLexerDefinition`);function eN(e){return!QM(e)&&!$M(e)}e(eN,`isTokenTypeDictionary`),s(eN,`isTokenTypeDictionary`),gt();function tN(e,t,n){let r,i;typeof e==`string`?(i=t,r=n):(i=e.range.start,r=t),i||=b.create(0,0);let a=rN(e),o=yN(r);return fN({index:0,tokens:oN({lines:a,position:i,options:o}),position:i})}e(tN,`parseJSDoc`),s(tN,`parseJSDoc`);function nN(e,t){let n=yN(t),r=rN(e);if(r.length===0)return!1;let i=r[0],a=r[r.length-1],o=n.start,s=n.end;return!!o?.exec(i)&&!!s?.exec(a)}e(nN,`isJSDoc`),s(nN,`isJSDoc`);function rN(e){let t=``;return t=typeof e==`string`?e:e.text,t.split(Sa)}e(rN,`getLines`),s(rN,`getLines`);var iN=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,aN=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function oN(e){let t=[],n=e.position.line,r=e.position.character;for(let i=0;i=s.length){if(t.length>0){let e=b.create(n,r);t.push({type:`break`,content:``,range:x.create(e,e)})}}else{iN.lastIndex=c;let e=iN.exec(s);if(e){let i=e[0],a=e[1],o=b.create(n,r+c),l=b.create(n,r+c+i.length);t.push({type:`tag`,content:a,range:x.create(o,l)}),c+=i.length,c=uN(s,c)}if(c0&&t[t.length-1].type===`break`?t.slice(0,-1):t}e(oN,`tokenize`),s(oN,`tokenize`);function sN(e,t,n,r){let i=[];if(e.length===0){let e=b.create(n,r),a=b.create(n,r+t.length);i.push({type:`text`,content:t,range:x.create(e,a)})}else{let a=0;for(let o of e){let e=o.index,s=t.substring(a,e);s.length>0&&i.push({type:`text`,content:t.substring(a,e),range:x.create(b.create(n,a+r),b.create(n,e+r))});let c=s.length+1,l=o[1];if(i.push({type:`inline-tag`,content:l,range:x.create(b.create(n,a+c+r),b.create(n,a+c+l.length+r))}),c+=l.length,o.length===4){c+=o[2].length;let e=o[3];i.push({type:`text`,content:e,range:x.create(b.create(n,a+c+r),b.create(n,a+c+e.length+r))})}else i.push({type:`text`,content:``,range:x.create(b.create(n,a+c+r),b.create(n,a+c+r))});a=e+o[0].length}let o=t.substring(a);o.length>0&&i.push({type:`text`,content:o,range:x.create(b.create(n,a+r),b.create(n,a+r+o.length))})}return i}e(sN,`buildInlineTokens`),s(sN,`buildInlineTokens`);var cN=/\S/,lN=/\s*$/;function uN(e,t){let n=e.substring(t).match(cN);return n?t+n.index:e.length}e(uN,`skipWhitespace`),s(uN,`skipWhitespace`);function dN(e){let t=e.match(lN);if(t&&typeof t.index==`number`)return t.index}e(dN,`lastCharacter`),s(dN,`lastCharacter`);function fN(e){let t=b.create(e.position.line,e.position.character);if(e.tokens.length===0)return new xN([],x.create(t,t));let n=[];for(;e.indext.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>`name`in e)}toString(){let e=``;for(let t of this.elements)if(e.length===0)e=t.toString();else{let n=t.toString();e+=DN(e)+n}return e.trim()}toMarkdown(e){let t=``;for(let n of this.elements)if(t.length===0)t=n.toMarkdown(e);else{let r=n.toMarkdown(e);t+=DN(t)+r}return t.trim()}},SN=class{static{e(this,`JSDocTagImpl`)}static{s(this,`JSDocTagImpl`)}constructor(e,t,n,r){this.name=e,this.content=t,this.inline=n,this.range=r}toString(){let e=`@${this.name}`,t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e} +${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){let t=this.content.toMarkdown(e);if(this.inline){let n=CN(this.name,t,e??{});if(typeof n==`string`)return n}let n=``;e?.tag===`italic`||e?.tag===void 0?n=`*`:e?.tag===`bold`?n=`**`:e?.tag===`bold-italic`&&(n=`***`);let r=`${n}@${this.name}${n}`;return this.content.inlines.length===1?r=`${r} \u2014 ${t}`:this.content.inlines.length>1&&(r=`${r} +${t}`),this.inline?`{${r}}`:r}};function CN(e,t,n){if(e===`linkplain`||e===`linkcode`||e===`link`){let r=t.indexOf(` `),i=t;if(r>0){let e=uN(t,r);i=t.substring(e),t=t.substring(0,r)}return(e===`linkcode`||e===`link`&&n.link===`code`)&&(i=`\`${i}\``),n.renderLink?.(t,i)??wN(t,i)}}e(CN,`renderInlineTag`),s(CN,`renderInlineTag`);function wN(e,t){try{return nM.parse(e,!0),`[${t}](${e})`}catch{return e}}e(wN,`renderLinkDefault`),s(wN,`renderLinkDefault`);var TN=class{static{e(this,`JSDocTextImpl`)}static{s(this,`JSDocTextImpl`)}constructor(e,t){this.inlines=e,this.range=t}toString(){let e=``;for(let t=0;tn.range.start.line&&(e+=` +`)}return e}toMarkdown(e){let t=``;for(let n=0;nr.range.start.line&&(t+=` +`)}return t}},EN=class{static{e(this,`JSDocLineImpl`)}static{s(this,`JSDocLineImpl`)}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}};function DN(e){return e.endsWith(` +`)?` +`:` + +`}e(DN,`fillNewlines`),s(DN,`fillNewlines`);var ON=class{static{e(this,`JSDocDocumentationProvider`)}static{s(this,`JSDocDocumentationProvider`)}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let t=this.commentProvider.getComment(e);if(t&&nN(t))return tN(t).toMarkdown({renderLink:s((t,n)=>this.documentationLinkRenderer(e,t,n),`renderLink`),renderTag:s(t=>this.documentationTagRenderer(e,t),`renderTag`)})}documentationLinkRenderer(e,t,n){let r=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(r&&r.nameSegment){let e=r.nameSegment.range.start.line+1,t=r.nameSegment.range.start.character+1;return`[${n}](${r.documentUri.with({fragment:`L${e},${t}`}).toString()})`}}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){let n=On(e).localSymbols;if(!n)return;let r=e;do{let e=n.getStream(r).find(e=>e.name===t);if(e)return e;r=r.$container}while(r)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}},kN=class{static{e(this,`DefaultCommentProvider`)}static{s(this,`DefaultCommentProvider`)}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return EM(e)?e.$comment:qi(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},AN=class{static{e(this,`DefaultAsyncParser`)}static{s(this,`DefaultAsyncParser`)}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},jN=class{static{e(this,`AbstractThreadedAsyncParser`)}static{s(this,`AbstractThreadedAsyncParser`)}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){let t=this.queue.shift();t&&(e.lock(),t.resolve(e))}}),this.workerPool.push(e)}}async parse(e,t){let n=await this.acquireParserWorker(t),r=new qj,i,a=t.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(e).then(e=>{let t=this.hydrator.hydrate(e);r.resolve(t)}).catch(e=>{r.reject(e)}).finally(()=>{a.dispose(),clearTimeout(i)}),r.promise}terminateWorker(e){e.terminate();let t=this.workerPool.indexOf(e);t>=0&&this.workerPool.splice(t,1)}async acquireParserWorker(e){this.initializeWorkers();for(let e of this.workerPool)if(e.ready)return e.lock(),e;let t=new qj;return e.onCancellationRequested(()=>{let e=this.queue.indexOf(t);e>=0&&this.queue.splice(e,1),t.reject(Wj)}),this.queue.push(t),t.promise}},MN=class{static{e(this,`ParserWorker`)}static{s(this,`ParserWorker`)}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,n,r){this.onReadyEmitter=new HM.Emitter,this.deferred=new qj,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=r,t(e=>{let t=e;this.deferred.resolve(t),this.unlock()}),n(e=>{this.deferred.reject(e),this.unlock()})}terminate(){this.deferred.reject(Wj),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw Error(`Parser worker is busy`);return this._parsing=!0,this.deferred=new qj,this.sendMessage(e),this.deferred.promise}},NN=class{static{e(this,`DefaultWorkspaceLock`)}static{s(this,`DefaultWorkspaceLock`)}constructor(){this.previousTokenSource=new Z.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let t=Hj();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n=Z.CancellationToken.None){let r=new qj,i={action:t,deferred:r,cancellationToken:n};return e.push(i),this.performNextOperation(),r.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:n})=>{try{let r=await Promise.resolve().then(()=>e(n));t.resolve(r)}catch(e){Gj(e)?t.resolve(void 0):t.reject(e)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},PN=class{static{e(this,`DefaultHydrator`)}static{s(this,`DefaultHydrator`)}constructor(e){this.grammarElementIdMap=new mM,this.tokenTypeIdMap=new mM,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){let t=new Map,n=new Map;for(let n of Nn(e))t.set(n,{});if(e.$cstNode)for(let t of Li(e.$cstNode))n.set(t,{});return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){let n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(let[r,i]of Object.entries(e))if(!r.startsWith(`$`)){if(Array.isArray(i)){let e=[];n[r]=e;for(let n of i)M(n)?e.push(this.dehydrateAstNode(n,t)):ln(n)?e.push(this.dehydrateReference(n,t)):e.push(n)}else M(i)?n[r]=this.dehydrateAstNode(i,t):ln(i)?n[r]=this.dehydrateReference(i,t):i!==void 0&&(n[r]=i)}return n}dehydrateReference(e,t){let n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=t.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,t){let n=t.cstNodes.get(e);return gn(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=t.astNodes.get(e.astNode),mn(e)?n.content=e.content.map(e=>this.dehydrateCstNode(e,t)):hn(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){let t=e.value,n=this.createHydrationContext(t);return`$cstNode`in t&&this.hydrateCstNode(t.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){let t=new Map,n=new Map;for(let n of Nn(e))t.set(n,{});let r;if(e.$cstNode)for(let t of Li(e.$cstNode)){let e;`fullText`in t?(e=new nj(t.fullText),r=e):`content`in t?e=new ej:`tokenType`in t&&(e=this.hydrateCstLeafNode(t)),e&&(n.set(t,e),e.root=r)}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){let n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for(let[r,i]of Object.entries(e))if(!r.startsWith(`$`)){if(Array.isArray(i)){let e=[];n[r]=e;for(let a of i)M(a)?e.push(this.setParent(this.hydrateAstNode(a,t),n)):ln(a)?e.push(this.hydrateReference(a,n,r,t)):e.push(a)}else M(i)?n[r]=this.setParent(this.hydrateAstNode(i,t),n):ln(i)?n[r]=this.hydrateReference(i,n,r,t):i!==void 0&&(n[r]=i)}return n}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){let r=t.cstNodes.get(e);if(typeof e.grammarSource==`number`&&(r.grammarSource=this.getGrammarElement(e.grammarSource)),r.astNode=t.astNodes.get(e.astNode),mn(r))for(let i of e.content){let e=this.hydrateCstNode(i,t,n++);r.content.push(e)}return r}hydrateCstLeafNode(e){let t=this.getTokenType(e.tokenType),n=e.offset,r=e.length,i=e.startLine,a=e.startColumn,o=e.endLine,s=e.endColumn,c=e.hidden;return new $A(n,r,{start:{line:i,character:a},end:{line:o,character:s}},t,c)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(let t of Nn(this.grammar))Hn(t)&&this.grammarElementIdMap.set(t,e++)}};function FN(e){return{documentation:{CommentProvider:s(e=>new kN(e),`CommentProvider`),DocumentationProvider:s(e=>new ON(e),`DocumentationProvider`)},parser:{AsyncParser:s(e=>new AN(e),`AsyncParser`),GrammarConfig:s(e=>vo(e),`GrammarConfig`),LangiumParser:s(e=>Pj(e),`LangiumParser`),CompletionParser:s(e=>Nj(e),`CompletionParser`),ValueConverter:s(()=>new Lj,`ValueConverter`),TokenBuilder:s(()=>new Ij,`TokenBuilder`),Lexer:s(e=>new ZM(e),`Lexer`),ParserErrorMessageProvider:s(()=>new uj,`ParserErrorMessageProvider`),LexerErrorMessageProvider:s(()=>new YM,`LexerErrorMessageProvider`)},workspace:{AstNodeLocator:s(()=>new VM,`AstNodeLocator`),AstNodeDescriptionProvider:s(e=>new zM(e),`AstNodeDescriptionProvider`),ReferenceDescriptionProvider:s(e=>new BM(e),`ReferenceDescriptionProvider`)},references:{Linker:s(e=>new lM(e),`Linker`),NameProvider:s(()=>new dM,`NameProvider`),ScopeProvider:s(e=>new TM(e),`ScopeProvider`),ScopeComputation:s(e=>new hM(e),`ScopeComputation`),References:s(e=>new fM(e),`References`)},serializer:{Hydrator:s(e=>new PN(e),`Hydrator`),JsonSerializer:s(e=>new OM(e),`JsonSerializer`)},validation:{DocumentValidator:s(e=>new PM(e),`DocumentValidator`),ValidationRegistry:s(e=>new MM(e),`ValidationRegistry`)},shared:s(()=>e.shared,`shared`)}}e(FN,`createDefaultCoreModule`),s(FN,`createDefaultCoreModule`);function IN(e){return{ServiceRegistry:s(e=>new kM(e),`ServiceRegistry`),workspace:{LangiumDocuments:s(e=>new sM(e),`LangiumDocuments`),LangiumDocumentFactory:s(e=>new oM(e),`LangiumDocumentFactory`),DocumentBuilder:s(e=>new KM(e),`DocumentBuilder`),IndexManager:s(e=>new qM(e),`IndexManager`),WorkspaceManager:s(e=>new JM(e),`WorkspaceManager`),FileSystemProvider:s(t=>e.fileSystemProvider(t),`FileSystemProvider`),WorkspaceLock:s(()=>new NN,`WorkspaceLock`),ConfigurationProvider:s(e=>new UM(e),`ConfigurationProvider`)},profilers:{}}}e(IN,`createDefaultSharedCoreModule`),s(IN,`createDefaultSharedCoreModule`);var LN;(function(e){e.merge=(e,t)=>WN(WN({},e),t)})(LN||={});function RN(e,t,n,r,i,a,o,s,c){return VN([e,t,n,r,i,a,o,s,c].reduce(WN,{}))}e(RN,`inject`),s(RN,`inject`);var zN=Symbol(`isProxy`);function BN(e){if(e&&e[zN])for(let t of Object.values(e))BN(t);return e}e(BN,`eagerLoad`),s(BN,`eagerLoad`);function VN(e,t){let n=new Proxy({},{deleteProperty:s(()=>!1,`deleteProperty`),set:s(()=>{throw Error(`Cannot set property on injected service container`)},`set`),get:s((r,i)=>i===zN||UN(r,i,e,t||n),`get`),getOwnPropertyDescriptor:s((r,i)=>(UN(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),`getOwnPropertyDescriptor`),has:s((t,n)=>n in e,`has`),ownKeys:s(()=>[...Object.getOwnPropertyNames(e)],`ownKeys`)});return n}e(VN,`_inject`),s(VN,`_inject`);var HN=Symbol();function UN(e,t,n,r){if(t in e){if(e[t]instanceof Error)throw Error(`Construction failure. Please make sure that your dependencies are constructable. Cause: `+e[t]);if(e[t]===HN)throw Error(`Cycle detected. Please make "`+String(t)+`" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies`);return e[t]}if(t in n){let i=n[t];e[t]=HN;try{e[t]=typeof i==`function`?i(r):VN(i,r)}catch(n){throw e[t]=n instanceof Error?n:void 0,n}return e[t]}}e(UN,`_resolve`),s(UN,`_resolve`);function WN(e,t){if(t){for(let[n,r]of Object.entries(t))if(r!=null){if(typeof r==`object`){let t=e[n];e[n]=WN(typeof t==`object`&&t?t:{},r)}else e[n]=r}}return e}e(WN,`_merge`),s(WN,`_merge`);var GN={indentTokenName:`INDENT`,dedentTokenName:`DEDENT`,whitespaceTokenName:`WS`,ignoreIndentationDelimiters:[]},KN;(function(e){e.REGULAR=`indentation-sensitive`,e.IGNORE_INDENTATION=`ignore-indentation`})(KN||={});var qN=class extends Ij{static{e(this,`IndentationAwareTokenBuilder`)}static{s(this,`IndentationAwareTokenBuilder`)}constructor(e=GN){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...GN,...e},this.indentTokenType=eb({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=eb({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){let n=super.buildTokens(e,t);if(!QM(n))throw Error(`Invalid tokens built by default builder`);let{indentTokenName:r,dedentTokenName:i,whitespaceTokenName:a,ignoreIndentationDelimiters:o}=this.options,s,c,l,u=[];for(let e of n){for(let[t,n]of o)e.name===t?e.PUSH_MODE=KN.IGNORE_INDENTATION:e.name===n&&(e.POP_MODE=!0);e.name===i?s=e:e.name===r?c=e:e.name===a?l=e:u.push(e)}if(!s||!c||!l)throw Error(`Some indentation/whitespace tokens not found!`);return o.length>0?{modes:{[KN.REGULAR]:[s,c,...u,l],[KN.IGNORE_INDENTATION]:[...u,l]},defaultMode:KN.REGULAR}:[s,c,l,...u]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return t===0||`\r +`.includes(e[t-1])}matchWhitespace(e,t,n,r){this.whitespaceRegExp.lastIndex=t;let i=this.whitespaceRegExp.exec(e);return{currIndentLevel:i?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:i}}createIndentationTokenInstance(e,t,n,r){let i=this.getLineNumber(t,r);return rb(e,n,r,r+n.length,i,i,1,n.length)}getLineNumber(e,t){return e.substring(0,t).split(/\r\n|\r|\n/).length}indentMatcher(e,t,n,r){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:i,prevIndentLevel:a,match:o}=this.matchWhitespace(e,t,n,r);return i<=a?null:(this.indentationStack.push(i),o)}dedentMatcher(e,t,n,r){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:i,prevIndentLevel:a,match:o}=this.matchWhitespace(e,t,n,r);if(i>=a)return null;let s=this.indentationStack.lastIndexOf(i);if(s===-1)return this.diagnostics.push({severity:`error`,message:`Invalid dedent level ${i} at offset: ${t}. Current indentation stack: ${this.indentationStack}`,offset:t,length:o?.[0]?.length??0,line:this.getLineNumber(e,t),column:1}),null;let c=this.indentationStack.length-s-1,l=e.substring(0,t).match(/[\r\n]+$/)?.[0].length??1;for(let r=0;r1;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,``,e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},JN=class extends ZM{static{e(this,`IndentationAwareLexer`)}static{s(this,`IndentationAwareLexer`)}constructor(e){if(super(e),e.parser.TokenBuilder instanceof qN)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw Error(`IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder`)}tokenize(e,t=XM){let n=super.tokenize(e),r=n.report;t?.mode===`full`&&n.tokens.push(...r.remainingDedents),r.remainingDedents=[];let{indentTokenType:i,dedentTokenType:a}=this.indentationTokenBuilder,o=i.tokenTypeIdx,s=a.tokenTypeIdx,c=[],l=n.tokens.length-1;for(let e=0;e=0&&c.push(n.tokens[l]),n.tokens=c,n}},YN={};u(YN,{AstUtils:e(()=>wn,`AstUtils`),BiMap:e(()=>mM,`BiMap`),Cancellation:e(()=>Z,`Cancellation`),ContextCache:e(()=>SM,`ContextCache`),CstUtils:e(()=>cn,`CstUtils`),DONE_RESULT:e(()=>xn,`DONE_RESULT`),Deferred:e(()=>qj,`Deferred`),Disposable:e(()=>GM,`Disposable`),DisposableCache:e(()=>bM,`DisposableCache`),DocumentCache:e(()=>CM,`DocumentCache`),EMPTY_STREAM:e(()=>bn,`EMPTY_STREAM`),ErrorWithLocation:e(()=>aa,`ErrorWithLocation`),GrammarUtils:e(()=>ia,`GrammarUtils`),MultiMap:e(()=>pM,`MultiMap`),OperationCancelled:e(()=>Wj,`OperationCancelled`),Reduction:e(()=>Cn,`Reduction`),RegExpUtils:e(()=>ca,`RegExpUtils`),SimpleCache:e(()=>xM,`SimpleCache`),StreamImpl:e(()=>_n,`StreamImpl`),TreeStreamImpl:e(()=>Sn,`TreeStreamImpl`),URI:e(()=>nM,`URI`),UriTrie:e(()=>aM,`UriTrie`),UriUtils:e(()=>iM,`UriUtils`),WorkspaceCache:e(()=>wM,`WorkspaceCache`),assertCondition:e(()=>sa,`assertCondition`),assertUnreachable:e(()=>oa,`assertUnreachable`),delayNextTick:e(()=>zj,`delayNextTick`),interruptAndCheck:e(()=>Kj,`interruptAndCheck`),isOperationCancelled:e(()=>Gj,`isOperationCancelled`),loadGrammarFromJson:e(()=>tP,`loadGrammarFromJson`),setInterruptionPeriod:e(()=>Uj,`setInterruptionPeriod`),startCancelableOperation:e(()=>Hj,`startCancelableOperation`),stream:e(()=>N,`stream`)}),f(YN,HM);var XN=class{static{e(this,`EmptyFileSystemProvider`)}static{s(this,`EmptyFileSystemProvider`)}stat(e){throw Error(`No file system is available.`)}statSync(e){throw Error(`No file system is available.`)}async exists(){return!1}existsSync(){return!1}readBinary(){throw Error(`No file system is available.`)}readBinarySync(){throw Error(`No file system is available.`)}readFile(){throw Error(`No file system is available.`)}readFileSync(){throw Error(`No file system is available.`)}async readDirectory(){return[]}readDirectorySync(){return[]}},ZN={fileSystemProvider:s(()=>new XN,`fileSystemProvider`)},QN={Grammar:s(()=>void 0,`Grammar`),LanguageMetaData:s(()=>({caseInsensitive:!1,fileExtensions:[`.langium`],languageId:`langium`}),`LanguageMetaData`)},$N={AstReflection:s(()=>new Fi,`AstReflection`)};function eP(){let e=RN(IN(ZN),$N),t=RN(FN({shared:e}),QN);return e.ServiceRegistry.register(t),t}e(eP,`createMinimalGrammarServices`),s(eP,`createMinimalGrammarServices`);function tP(e){let t=eP(),n=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(n,nM.parse(`memory:/${n.name??`grammar`}.langium`)),n}e(tP,`loadGrammarFromJson`),s(tP,`loadGrammarFromJson`),f(sn,YN);var nP=class{static{e(this,`DefaultLangiumProfiler`)}static{s(this,`DefaultLangiumProfiler`)}constructor(e){this.activeCategories=new Set,this.allCategories=new Set([`validating`,`parsing`,`linking`]),this.activeCategories=e??new Set(this.allCategories),this.records=new pM}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(e=>this.activeCategories.add(e)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(e=>this.activeCategories.delete(e)):this.activeCategories.clear()}createTask(e,t){if(!this.isActive(e))throw Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${t}'.`),new rP(t=>this.records.add(e,this.dumpRecord(e,t)),t)}dumpRecord(t,n){console.info(`Task ${t}.${n.identifier} executed in ${n.duration.toFixed(2)}ms and ended at ${n.date.toISOString()}`);let r=[];for(let e of n.entries.keys()){let t=n.entries.get(e),i=t.reduce((e,t)=>e+t);r.push({name:`${n.identifier}.${e}`,count:t.length,duration:i})}let i=n.duration-r.map(e=>e.duration).reduce((e,t)=>e+t,0);r.push({name:n.identifier,count:1,duration:i}),r.sort((e,t)=>t.duration-e.duration);function a(e){return Math.round(100*e)/100}return e(a,`Round`),s(a,`Round`),console.table(r.map(e=>({Element:e.name,Count:e.count,"Self %":a(100*e.duration/n.duration),"Time (ms)":a(e.duration)}))),n}getRecords(...e){return e.length===0?this.records.values():this.records.entries().filter(t=>e.some(e=>e===t[0])).flatMap(e=>e[1])}},rP=class{static{e(this,`ProfilingTask`)}static{s(this,`ProfilingTask`)}constructor(e,t){this.stack=[],this.entries=new pM,this.addRecord=e,this.identifier=t}start(){if(this.startTime!==void 0)throw Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(this.startTime===void 0)throw Error(`Task "${this.identifier}" was not started.`);if(this.stack.length!==0)throw Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(e=>e.id).join(`, `)}.`);let e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){let t=this.stack.pop();if(!t)throw Error(`Task "${this.identifier}.${e}" was not started.`);if(t.id!==e)throw Error(`Sub-Task "${t.id}" is not already stopped.`);let n=performance.now()-t.start;this.stack.at(-1)!==void 0&&(this.stack[this.stack.length-1].content+=n);let r=n-t.content;this.entries.add(e,r)}},iP;(e=>{e.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/}})(iP||={});var aP;(e=>{e.Terminals={DOMAIN_NAME:/complex|complicated|clear|chaotic|confusion/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(aP||={});var oP;(e=>{e.Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/}})(oP||={});var sP;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})(sP||={});var cP;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(cP||={});var lP;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(lP||={});var uP;(e=>{e.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(uP||={});var dP;(e=>{e.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(dP||={});var fP;(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ABNF_RULENAME:/[A-Za-z][A-Za-z0-9-]*/,ABNF_STRING:/"[^"]*"/,ABNF_NUMVAL:/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\.[0-9A-Fa-f]+)*/,ABNF_REPEAT:/[0-9]*\*[0-9]*/,ABNF_EXACT_REPEAT:/[0-9]+/,ABNF_WHITESPACE:/[\t \r\n]+/,ABNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,ABNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,ABNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ABNF_COMMENT:/;[^\n\r]*/}})(fP||={});var pP;(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EBNF_ID:/[A-Z_a-z][\w-]*/,EBNF_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,EBNF_SPECIAL_SEQUENCE:/\?(?=[^?;]*[^?\s;][^?;]*\?)[^?;]*\?/,EBNF_WHITESPACE:/[\t \r\n]+/,EBNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EBNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EBNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EBNF_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//,EBNF_ISO_COMMENT:/\(\*[\s\S]*?\*\)/}})(pP||={});var mP;(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,RR_ID:/[A-Z_a-z][\w-]*/,RR_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,RR_WHITESPACE:/[\t \r\n]+/,RR_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,RR_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,RR_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,RR_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//}})(mP||={});var hP;(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,PEG_ID:/[A-Z_a-z][\w-]*/,PEG_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,PEG_WHITESPACE:/[\t \r\n]+/,PEG_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,PEG_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,PEG_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,PEG_LINE_COMMENT:/#[^\n\r]*/}})(hP||={});var gP;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(gP||={});var _P;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,CLASS_ANNOTATION:/[ \t]+:::[ \t]*[A-Za-z_][\w-]*/,ICON_ANNOTATION:/[ \t]+icon\([\w-]*(?::[\w-]+)?\)/,DESC_ANNOTATION:/[ \t]+##[^\n\r]*/,INDENTATION:/[ \t]{1,}/,QUOTED_NAME:/"[^"]*"|'[^']*'/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,BARE_NAME:/(?!:::|icon\(|##)[^ \t\n\r"'](?:(?![ \t]+:::[ \t]*[A-Za-z_]|[ \t]+icon\(|[ \t]+##)[^\n\r])*/}})(_P||={});var vP;(e=>{e.Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(vP||={}),{...iP.Terminals,...aP.Terminals,...oP.Terminals,...sP.Terminals,...cP.Terminals,...lP.Terminals,...uP.Terminals,...dP.Terminals,...fP.Terminals,...pP.Terminals,...mP.Terminals,...hP.Terminals,..._P.Terminals,...gP.Terminals,...vP.Terminals};var yP={$type:`AbnfAlternation`,alternatives:`alternatives`},bP={$type:`AbnfConcatenation`,elements:`elements`},xP={$type:`AbnfElement`,primary:`primary`,repeat:`repeat`},SP={$type:`AbnfGroup`,element:`element`},CP={$type:`AbnfNumVal`,value:`value`},wP={$type:`AbnfOptionalGroup`,element:`element`},TP={$type:`AbnfPrimary`},EP={$type:`AbnfRule`,definition:`definition`,name:`name`},DP={$type:`AbnfRuleName`,name:`name`},OP={$type:`AbnfStringLiteral`,value:`value`},kP={$type:`Accelerator`,name:`name`,x:`x`,y:`y`},AP={$type:`Alignment`,direction:`direction`,members:`members`},jP={$type:`Anchor`,evolution:`evolution`,name:`name`,visibility:`visibility`},MP={$type:`Annotation`,number:`number`,text:`text`,x:`x`,y:`y`},NP={$type:`Annotations`,x:`x`,y:`y`},PP={$type:`Architecture`,accDescr:`accDescr`,accTitle:`accTitle`,alignments:`alignments`,edges:`edges`,groups:`groups`,junctions:`junctions`,services:`services`,title:`title`};function FP(e){return $.isInstance(e,PP.$type)}e(FP,`isArchitecture`),s(FP,`isArchitecture`);var IP={$type:`Axis`,label:`label`,name:`name`},LP={$type:`Branch`,name:`name`,order:`order`};function RP(e){return $.isInstance(e,LP.$type)}e(RP,`isBranch`),s(RP,`isBranch`);var zP={$type:`Checkout`,branch:`branch`},BP={$type:`CherryPicking`,id:`id`,parent:`parent`,tags:`tags`},VP={$type:`ClassDefStatement`,className:`className`,styleText:`styleText`},HP={$type:`Commit`,id:`id`,message:`message`,tags:`tags`,type:`type`};function UP(e){return $.isInstance(e,HP.$type)}e(UP,`isCommit`),s(UP,`isCommit`);var WP={$type:`Common`,accDescr:`accDescr`,accTitle:`accTitle`,title:`title`},GP={$type:`Component`,decorator:`decorator`,evolution:`evolution`,inertia:`inertia`,label:`label`,name:`name`,visibility:`visibility`},KP={$type:`Curve`,entries:`entries`,label:`label`,name:`name`},qP={$type:`Cynefin`,accDescr:`accDescr`,accTitle:`accTitle`,domains:`domains`,title:`title`,transitions:`transitions`};function JP(e){return $.isInstance(e,qP.$type)}e(JP,`isCynefin`),s(JP,`isCynefin`);var YP={$type:`Deaccelerator`,name:`name`,x:`x`,y:`y`},XP={$type:`Decorator`,strategy:`strategy`},ZP={$type:`Direction`,accDescr:`accDescr`,accTitle:`accTitle`,dir:`dir`,statements:`statements`,title:`title`},QP={$type:`DomainBlock`,domain:`domain`,items:`items`};function $P(e){return $.isInstance(e,QP.$type)}e($P,`isDomainBlock`),s($P,`isDomainBlock`);var eF={$type:`DomainItem`,label:`label`};function tF(e){return $.isInstance(e,eF.$type)}e(tF,`isDomainItem`),s(tF,`isDomainItem`);var nF={$type:`EbnfChoice`,alternatives:`alternatives`},rF={$type:`EbnfExceptionPostfix`,except:`except`},iF={$type:`EbnfGroup`,element:`element`},aF={$type:`EbnfNonTerminal`,name:`name`},oF={$type:`EbnfOneOrMorePostfix`,operator:`operator`},sF={$type:`EbnfOptional`,element:`element`},cF={$type:`EbnfOptionalPostfix`,operator:`operator`},lF={$type:`EbnfPostfix`},uF={$type:`EbnfPrimary`},dF={$type:`EbnfRepetition`,element:`element`},fF={$type:`EbnfRule`,definition:`definition`,name:`name`},pF={$type:`EbnfSequence`,elements:`elements`},mF={$type:`EbnfSpecial`,text:`text`},hF={$type:`EbnfTerm`,base:`base`,postfixes:`postfixes`},gF={$type:`EbnfTerminal`,value:`value`},_F={$type:`EbnfZeroOrMorePostfix`,operator:`operator`},vF={$type:`Edge`,lhsDir:`lhsDir`,lhsGroup:`lhsGroup`,lhsId:`lhsId`,lhsInto:`lhsInto`,rhsDir:`rhsDir`,rhsGroup:`rhsGroup`,rhsId:`rhsId`,rhsInto:`rhsInto`,title:`title`},yF={$type:`EmDataEntity`,dataBlockValue:`dataBlockValue`,dataType:`dataType`,name:`name`},bF={$type:`EmFrame`},xF={$type:`EmGwt`,givenStatements:`givenStatements`,sourceFrame:`sourceFrame`,thenStatements:`thenStatements`,whenStatements:`whenStatements`},SF={$type:`EmGwtStatement`,entityIdentifier:`entityIdentifier`},CF={$type:`EmModelEntity`,name:`name`};function wF(e){return e===`rmo`||e===`readmodel`||e===`ui`||e===`cmd`||e===`command`||e===`evt`||e===`event`||e===`pcr`||e===`processor`}e(wF,`isEmModelEntityType`),s(wF,`isEmModelEntityType`);var TF={$type:`EmNoteEntity`,dataBlockValue:`dataBlockValue`,dataType:`dataType`,sourceFrame:`sourceFrame`},EF={$type:`EmResetFrame`,dataInlineValue:`dataInlineValue`,dataReference:`dataReference`,dataType:`dataType`,entityIdentifier:`entityIdentifier`,modelEntityType:`modelEntityType`,name:`name`,sourceFrames:`sourceFrames`};function DF(e){return $.isInstance(e,EF.$type)}e(DF,`isEmResetFrame`),s(DF,`isEmResetFrame`);var OF={$type:`EmTimeFrame`,dataInlineValue:`dataInlineValue`,dataReference:`dataReference`,dataType:`dataType`,entityIdentifier:`entityIdentifier`,modelEntityType:`modelEntityType`,name:`name`,sourceFrames:`sourceFrames`},kF={$type:`Entry`,axis:`axis`,value:`value`},AF={$type:`EventModel`,accDescr:`accDescr`,accTitle:`accTitle`,dataEntities:`dataEntities`,frames:`frames`,gwtEntities:`gwtEntities`,modelEntities:`modelEntities`,noteEntities:`noteEntities`,title:`title`},jF={$type:`Evolution`,stages:`stages`},MF={$type:`EvolutionStage`,boundary:`boundary`,name:`name`,secondName:`secondName`},NF={$type:`Evolve`,component:`component`,target:`target`},PF={$type:`GitGraph`,accDescr:`accDescr`,accTitle:`accTitle`,statements:`statements`,title:`title`};function FF(e){return $.isInstance(e,PF.$type)}e(FF,`isGitGraph`),s(FF,`isGitGraph`);var IF={$type:`Group`,icon:`icon`,id:`id`,in:`in`,title:`title`},LF={$type:`Info`,accDescr:`accDescr`,accTitle:`accTitle`,title:`title`};function RF(e){return $.isInstance(e,LF.$type)}e(RF,`isInfo`),s(RF,`isInfo`);var zF={$type:`Item`,classSelector:`classSelector`,name:`name`},BF={$type:`Junction`,id:`id`,in:`in`},VF={$type:`Label`,negX:`negX`,negY:`negY`,offsetX:`offsetX`,offsetY:`offsetY`},HF={$type:`Leaf`,classSelector:`classSelector`,name:`name`,value:`value`},UF={$type:`Link`,arrow:`arrow`,from:`from`,fromPort:`fromPort`,linkLabel:`linkLabel`,to:`to`,toPort:`toPort`},WF={$type:`Merge`,branch:`branch`,id:`id`,tags:`tags`,type:`type`};function GF(e){return $.isInstance(e,WF.$type)}e(GF,`isMerge`),s(GF,`isMerge`);var KF={$type:`Note`,evolution:`evolution`,text:`text`,visibility:`visibility`},qF={$type:`Option`,name:`name`,value:`value`},JF={$type:`Packet`,accDescr:`accDescr`,accTitle:`accTitle`,blocks:`blocks`,title:`title`};function YF(e){return $.isInstance(e,JF.$type)}e(YF,`isPacket`),s(YF,`isPacket`);var XF={$type:`PacketBlock`,bits:`bits`,end:`end`,label:`label`,start:`start`};function ZF(e){return $.isInstance(e,XF.$type)}e(ZF,`isPacketBlock`),s(ZF,`isPacketBlock`);var QF={$type:`PegAny`,dot:`dot`},$F={$type:`PegGroup`,element:`element`},eI={$type:`PegIdentifier`,name:`name`},tI={$type:`PegLiteral`,value:`value`},nI={$type:`PegOrderedChoice`,alternatives:`alternatives`},rI={$type:`PegPrefix`,operator:`operator`,suffix:`suffix`},iI={$type:`PegPrimary`},aI={$type:`PegRule`,definition:`definition`,name:`name`},oI={$type:`PegSequence`,elements:`elements`},sI={$type:`PegSuffix`,operator:`operator`,primary:`primary`},cI={$type:`Pie`,accDescr:`accDescr`,accTitle:`accTitle`,sections:`sections`,showData:`showData`,title:`title`};function lI(e){return $.isInstance(e,cI.$type)}e(lI,`isPie`),s(lI,`isPie`);var uI={$type:`PieSection`,label:`label`,value:`value`};function dI(e){return $.isInstance(e,uI.$type)}e(dI,`isPieSection`),s(dI,`isPieSection`);var fI={$type:`Pipeline`,components:`components`,parent:`parent`},pI={$type:`PipelineComponent`,evolution:`evolution`,label:`label`,name:`name`},mI={$type:`Radar`,accDescr:`accDescr`,accTitle:`accTitle`,axes:`axes`,curves:`curves`,options:`options`,title:`title`},hI={$type:`Railroad`,accDescr:`accDescr`,accTitle:`accTitle`,rules:`rules`,title:`title`};function gI(e){return $.isInstance(e,hI.$type)}e(gI,`isRailroad`),s(gI,`isRailroad`);var _I={$type:`RailroadAbnf`,accDescr:`accDescr`,accTitle:`accTitle`,rules:`rules`,title:`title`};function vI(e){return $.isInstance(e,_I.$type)}e(vI,`isRailroadAbnf`),s(vI,`isRailroadAbnf`);var yI={$type:`RailroadChoiceExpr`,alternatives:`alternatives`},bI={$type:`RailroadEbnf`,accDescr:`accDescr`,accTitle:`accTitle`,rules:`rules`,title:`title`};function xI(e){return $.isInstance(e,bI.$type)}e(xI,`isRailroadEbnf`),s(xI,`isRailroadEbnf`);var SI={$type:`RailroadExpression`},CI={$type:`RailroadNonTerminalExpr`,name:`name`},wI={$type:`RailroadOneOrMoreExpr`,element:`element`},TI={$type:`RailroadOptionalExpr`,element:`element`},EI={$type:`RailroadPeg`,accDescr:`accDescr`,accTitle:`accTitle`,rules:`rules`,title:`title`};function DI(e){return $.isInstance(e,EI.$type)}e(DI,`isRailroadPeg`),s(DI,`isRailroadPeg`);var OI={$type:`RailroadRule`,definition:`definition`,name:`name`},kI={$type:`RailroadSequenceExpr`,elements:`elements`},AI={$type:`RailroadSpecialExpr`,text:`text`},jI={$type:`RailroadTerminalExpr`,value:`value`},MI={$type:`RailroadZeroOrMoreExpr`,element:`element`},NI={$type:`Section`,classSelector:`classSelector`,name:`name`},PI={$type:`Service`,icon:`icon`,iconText:`iconText`,id:`id`,in:`in`,title:`title`},FI={$type:`Size`,height:`height`,width:`width`},II={$type:`Statement`},LI={$type:`Transition`,from:`from`,label:`label`,to:`to`};function RI(e){return $.isInstance(e,LI.$type)}e(RI,`isTransition`),s(RI,`isTransition`);var zI={$type:`Treemap`,accDescr:`accDescr`,accTitle:`accTitle`,title:`title`,TreemapRows:`TreemapRows`};function BI(e){return $.isInstance(e,zI.$type)}e(BI,`isTreemap`),s(BI,`isTreemap`);var VI={$type:`TreemapRow`,indent:`indent`,item:`item`},HI={$type:`TreeNode`,classAnnotation:`classAnnotation`,descAnnotation:`descAnnotation`,iconAnnotation:`iconAnnotation`,indent:`indent`,name:`name`},UI={$type:`TreeView`,accDescr:`accDescr`,accTitle:`accTitle`,nodes:`nodes`,title:`title`},WI={$type:`Wardley`,accDescr:`accDescr`,accelerators:`accelerators`,accTitle:`accTitle`,anchors:`anchors`,annotation:`annotation`,annotations:`annotations`,components:`components`,deaccelerators:`deaccelerators`,evolution:`evolution`,evolves:`evolves`,links:`links`,notes:`notes`,pipelines:`pipelines`,size:`size`,title:`title`};function GI(e){return $.isInstance(e,WI.$type)}e(GI,`isWardley`),s(GI,`isWardley`);var KI=class extends pn{static{e(this,`MermaidAstReflection`)}constructor(){super(...arguments),this.types={AbnfAlternation:{name:yP.$type,properties:{alternatives:{name:yP.alternatives,defaultValue:[]}},superTypes:[]},AbnfConcatenation:{name:bP.$type,properties:{elements:{name:bP.elements,defaultValue:[]}},superTypes:[]},AbnfElement:{name:xP.$type,properties:{primary:{name:xP.primary},repeat:{name:xP.repeat}},superTypes:[]},AbnfGroup:{name:SP.$type,properties:{element:{name:SP.element}},superTypes:[TP.$type]},AbnfNumVal:{name:CP.$type,properties:{value:{name:CP.value}},superTypes:[TP.$type]},AbnfOptionalGroup:{name:wP.$type,properties:{element:{name:wP.element}},superTypes:[TP.$type]},AbnfPrimary:{name:TP.$type,properties:{},superTypes:[]},AbnfRule:{name:EP.$type,properties:{definition:{name:EP.definition},name:{name:EP.name}},superTypes:[]},AbnfRuleName:{name:DP.$type,properties:{name:{name:DP.name}},superTypes:[TP.$type]},AbnfStringLiteral:{name:OP.$type,properties:{value:{name:OP.value}},superTypes:[TP.$type]},Accelerator:{name:kP.$type,properties:{name:{name:kP.name},x:{name:kP.x},y:{name:kP.y}},superTypes:[]},Alignment:{name:AP.$type,properties:{direction:{name:AP.direction},members:{name:AP.members,defaultValue:[]}},superTypes:[]},Anchor:{name:jP.$type,properties:{evolution:{name:jP.evolution},name:{name:jP.name},visibility:{name:jP.visibility}},superTypes:[]},Annotation:{name:MP.$type,properties:{number:{name:MP.number},text:{name:MP.text},x:{name:MP.x},y:{name:MP.y}},superTypes:[]},Annotations:{name:NP.$type,properties:{x:{name:NP.x},y:{name:NP.y}},superTypes:[]},Architecture:{name:PP.$type,properties:{accDescr:{name:PP.accDescr},accTitle:{name:PP.accTitle},alignments:{name:PP.alignments,defaultValue:[]},edges:{name:PP.edges,defaultValue:[]},groups:{name:PP.groups,defaultValue:[]},junctions:{name:PP.junctions,defaultValue:[]},services:{name:PP.services,defaultValue:[]},title:{name:PP.title}},superTypes:[]},Axis:{name:IP.$type,properties:{label:{name:IP.label},name:{name:IP.name}},superTypes:[]},Branch:{name:LP.$type,properties:{name:{name:LP.name},order:{name:LP.order}},superTypes:[II.$type]},Checkout:{name:zP.$type,properties:{branch:{name:zP.branch}},superTypes:[II.$type]},CherryPicking:{name:BP.$type,properties:{id:{name:BP.id},parent:{name:BP.parent},tags:{name:BP.tags,defaultValue:[]}},superTypes:[II.$type]},ClassDefStatement:{name:VP.$type,properties:{className:{name:VP.className},styleText:{name:VP.styleText}},superTypes:[]},Commit:{name:HP.$type,properties:{id:{name:HP.id},message:{name:HP.message},tags:{name:HP.tags,defaultValue:[]},type:{name:HP.type}},superTypes:[II.$type]},Common:{name:WP.$type,properties:{accDescr:{name:WP.accDescr},accTitle:{name:WP.accTitle},title:{name:WP.title}},superTypes:[]},Component:{name:GP.$type,properties:{decorator:{name:GP.decorator},evolution:{name:GP.evolution},inertia:{name:GP.inertia,defaultValue:!1},label:{name:GP.label},name:{name:GP.name},visibility:{name:GP.visibility}},superTypes:[]},Curve:{name:KP.$type,properties:{entries:{name:KP.entries,defaultValue:[]},label:{name:KP.label},name:{name:KP.name}},superTypes:[]},Cynefin:{name:qP.$type,properties:{accDescr:{name:qP.accDescr},accTitle:{name:qP.accTitle},domains:{name:qP.domains,defaultValue:[]},title:{name:qP.title},transitions:{name:qP.transitions,defaultValue:[]}},superTypes:[]},Deaccelerator:{name:YP.$type,properties:{name:{name:YP.name},x:{name:YP.x},y:{name:YP.y}},superTypes:[]},Decorator:{name:XP.$type,properties:{strategy:{name:XP.strategy}},superTypes:[]},Direction:{name:ZP.$type,properties:{accDescr:{name:ZP.accDescr},accTitle:{name:ZP.accTitle},dir:{name:ZP.dir},statements:{name:ZP.statements,defaultValue:[]},title:{name:ZP.title}},superTypes:[PF.$type]},DomainBlock:{name:QP.$type,properties:{domain:{name:QP.domain},items:{name:QP.items,defaultValue:[]}},superTypes:[]},DomainItem:{name:eF.$type,properties:{label:{name:eF.label}},superTypes:[]},EbnfChoice:{name:nF.$type,properties:{alternatives:{name:nF.alternatives,defaultValue:[]}},superTypes:[]},EbnfExceptionPostfix:{name:rF.$type,properties:{except:{name:rF.except}},superTypes:[lF.$type]},EbnfGroup:{name:iF.$type,properties:{element:{name:iF.element}},superTypes:[uF.$type]},EbnfNonTerminal:{name:aF.$type,properties:{name:{name:aF.name}},superTypes:[uF.$type]},EbnfOneOrMorePostfix:{name:oF.$type,properties:{operator:{name:oF.operator}},superTypes:[lF.$type]},EbnfOptional:{name:sF.$type,properties:{element:{name:sF.element}},superTypes:[uF.$type]},EbnfOptionalPostfix:{name:cF.$type,properties:{operator:{name:cF.operator}},superTypes:[lF.$type]},EbnfPostfix:{name:lF.$type,properties:{},superTypes:[]},EbnfPrimary:{name:uF.$type,properties:{},superTypes:[]},EbnfRepetition:{name:dF.$type,properties:{element:{name:dF.element}},superTypes:[uF.$type]},EbnfRule:{name:fF.$type,properties:{definition:{name:fF.definition},name:{name:fF.name}},superTypes:[]},EbnfSequence:{name:pF.$type,properties:{elements:{name:pF.elements,defaultValue:[]}},superTypes:[]},EbnfSpecial:{name:mF.$type,properties:{text:{name:mF.text}},superTypes:[uF.$type]},EbnfTerm:{name:hF.$type,properties:{base:{name:hF.base},postfixes:{name:hF.postfixes,defaultValue:[]}},superTypes:[]},EbnfTerminal:{name:gF.$type,properties:{value:{name:gF.value}},superTypes:[uF.$type]},EbnfZeroOrMorePostfix:{name:_F.$type,properties:{operator:{name:_F.operator}},superTypes:[lF.$type]},Edge:{name:vF.$type,properties:{lhsDir:{name:vF.lhsDir},lhsGroup:{name:vF.lhsGroup,defaultValue:!1},lhsId:{name:vF.lhsId},lhsInto:{name:vF.lhsInto,defaultValue:!1},rhsDir:{name:vF.rhsDir},rhsGroup:{name:vF.rhsGroup,defaultValue:!1},rhsId:{name:vF.rhsId},rhsInto:{name:vF.rhsInto,defaultValue:!1},title:{name:vF.title}},superTypes:[]},EmDataEntity:{name:yF.$type,properties:{dataBlockValue:{name:yF.dataBlockValue},dataType:{name:yF.dataType},name:{name:yF.name}},superTypes:[]},EmFrame:{name:bF.$type,properties:{},superTypes:[]},EmGwt:{name:xF.$type,properties:{givenStatements:{name:xF.givenStatements,defaultValue:[]},sourceFrame:{name:xF.sourceFrame,referenceType:bF.$type},thenStatements:{name:xF.thenStatements,defaultValue:[]},whenStatements:{name:xF.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:SF.$type,properties:{entityIdentifier:{name:SF.entityIdentifier,referenceType:CF.$type}},superTypes:[]},EmModelEntity:{name:CF.$type,properties:{name:{name:CF.name}},superTypes:[]},EmNoteEntity:{name:TF.$type,properties:{dataBlockValue:{name:TF.dataBlockValue},dataType:{name:TF.dataType},sourceFrame:{name:TF.sourceFrame,referenceType:bF.$type}},superTypes:[]},EmResetFrame:{name:EF.$type,properties:{dataInlineValue:{name:EF.dataInlineValue},dataReference:{name:EF.dataReference,referenceType:yF.$type},dataType:{name:EF.dataType},entityIdentifier:{name:EF.entityIdentifier},modelEntityType:{name:EF.modelEntityType},name:{name:EF.name},sourceFrames:{name:EF.sourceFrames,defaultValue:[],referenceType:bF.$type}},superTypes:[bF.$type]},EmTimeFrame:{name:OF.$type,properties:{dataInlineValue:{name:OF.dataInlineValue},dataReference:{name:OF.dataReference,referenceType:yF.$type},dataType:{name:OF.dataType},entityIdentifier:{name:OF.entityIdentifier},modelEntityType:{name:OF.modelEntityType},name:{name:OF.name},sourceFrames:{name:OF.sourceFrames,defaultValue:[],referenceType:bF.$type}},superTypes:[bF.$type]},Entry:{name:kF.$type,properties:{axis:{name:kF.axis,referenceType:IP.$type},value:{name:kF.value}},superTypes:[]},EventModel:{name:AF.$type,properties:{accDescr:{name:AF.accDescr},accTitle:{name:AF.accTitle},dataEntities:{name:AF.dataEntities,defaultValue:[]},frames:{name:AF.frames,defaultValue:[]},gwtEntities:{name:AF.gwtEntities,defaultValue:[]},modelEntities:{name:AF.modelEntities,defaultValue:[]},noteEntities:{name:AF.noteEntities,defaultValue:[]},title:{name:AF.title}},superTypes:[]},Evolution:{name:jF.$type,properties:{stages:{name:jF.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:MF.$type,properties:{boundary:{name:MF.boundary},name:{name:MF.name},secondName:{name:MF.secondName}},superTypes:[]},Evolve:{name:NF.$type,properties:{component:{name:NF.component},target:{name:NF.target}},superTypes:[]},GitGraph:{name:PF.$type,properties:{accDescr:{name:PF.accDescr},accTitle:{name:PF.accTitle},statements:{name:PF.statements,defaultValue:[]},title:{name:PF.title}},superTypes:[]},Group:{name:IF.$type,properties:{icon:{name:IF.icon},id:{name:IF.id},in:{name:IF.in},title:{name:IF.title}},superTypes:[]},Info:{name:LF.$type,properties:{accDescr:{name:LF.accDescr},accTitle:{name:LF.accTitle},title:{name:LF.title}},superTypes:[]},Item:{name:zF.$type,properties:{classSelector:{name:zF.classSelector},name:{name:zF.name}},superTypes:[]},Junction:{name:BF.$type,properties:{id:{name:BF.id},in:{name:BF.in}},superTypes:[]},Label:{name:VF.$type,properties:{negX:{name:VF.negX,defaultValue:!1},negY:{name:VF.negY,defaultValue:!1},offsetX:{name:VF.offsetX},offsetY:{name:VF.offsetY}},superTypes:[]},Leaf:{name:HF.$type,properties:{classSelector:{name:HF.classSelector},name:{name:HF.name},value:{name:HF.value}},superTypes:[zF.$type]},Link:{name:UF.$type,properties:{arrow:{name:UF.arrow},from:{name:UF.from},fromPort:{name:UF.fromPort},linkLabel:{name:UF.linkLabel},to:{name:UF.to},toPort:{name:UF.toPort}},superTypes:[]},Merge:{name:WF.$type,properties:{branch:{name:WF.branch},id:{name:WF.id},tags:{name:WF.tags,defaultValue:[]},type:{name:WF.type}},superTypes:[II.$type]},Note:{name:KF.$type,properties:{evolution:{name:KF.evolution},text:{name:KF.text},visibility:{name:KF.visibility}},superTypes:[]},Option:{name:qF.$type,properties:{name:{name:qF.name},value:{name:qF.value,defaultValue:!1}},superTypes:[]},Packet:{name:JF.$type,properties:{accDescr:{name:JF.accDescr},accTitle:{name:JF.accTitle},blocks:{name:JF.blocks,defaultValue:[]},title:{name:JF.title}},superTypes:[]},PacketBlock:{name:XF.$type,properties:{bits:{name:XF.bits},end:{name:XF.end},label:{name:XF.label},start:{name:XF.start}},superTypes:[]},PegAny:{name:QF.$type,properties:{dot:{name:QF.dot}},superTypes:[iI.$type]},PegGroup:{name:$F.$type,properties:{element:{name:$F.element}},superTypes:[iI.$type]},PegIdentifier:{name:eI.$type,properties:{name:{name:eI.name}},superTypes:[iI.$type]},PegLiteral:{name:tI.$type,properties:{value:{name:tI.value}},superTypes:[iI.$type]},PegOrderedChoice:{name:nI.$type,properties:{alternatives:{name:nI.alternatives,defaultValue:[]}},superTypes:[]},PegPrefix:{name:rI.$type,properties:{operator:{name:rI.operator},suffix:{name:rI.suffix}},superTypes:[]},PegPrimary:{name:iI.$type,properties:{},superTypes:[]},PegRule:{name:aI.$type,properties:{definition:{name:aI.definition},name:{name:aI.name}},superTypes:[]},PegSequence:{name:oI.$type,properties:{elements:{name:oI.elements,defaultValue:[]}},superTypes:[]},PegSuffix:{name:sI.$type,properties:{operator:{name:sI.operator},primary:{name:sI.primary}},superTypes:[]},Pie:{name:cI.$type,properties:{accDescr:{name:cI.accDescr},accTitle:{name:cI.accTitle},sections:{name:cI.sections,defaultValue:[]},showData:{name:cI.showData,defaultValue:!1},title:{name:cI.title}},superTypes:[]},PieSection:{name:uI.$type,properties:{label:{name:uI.label},value:{name:uI.value}},superTypes:[]},Pipeline:{name:fI.$type,properties:{components:{name:fI.components,defaultValue:[]},parent:{name:fI.parent}},superTypes:[]},PipelineComponent:{name:pI.$type,properties:{evolution:{name:pI.evolution},label:{name:pI.label},name:{name:pI.name}},superTypes:[]},Radar:{name:mI.$type,properties:{accDescr:{name:mI.accDescr},accTitle:{name:mI.accTitle},axes:{name:mI.axes,defaultValue:[]},curves:{name:mI.curves,defaultValue:[]},options:{name:mI.options,defaultValue:[]},title:{name:mI.title}},superTypes:[]},Railroad:{name:hI.$type,properties:{accDescr:{name:hI.accDescr},accTitle:{name:hI.accTitle},rules:{name:hI.rules,defaultValue:[]},title:{name:hI.title}},superTypes:[]},RailroadAbnf:{name:_I.$type,properties:{accDescr:{name:_I.accDescr},accTitle:{name:_I.accTitle},rules:{name:_I.rules,defaultValue:[]},title:{name:_I.title}},superTypes:[]},RailroadChoiceExpr:{name:yI.$type,properties:{alternatives:{name:yI.alternatives,defaultValue:[]}},superTypes:[SI.$type]},RailroadEbnf:{name:bI.$type,properties:{accDescr:{name:bI.accDescr},accTitle:{name:bI.accTitle},rules:{name:bI.rules,defaultValue:[]},title:{name:bI.title}},superTypes:[]},RailroadExpression:{name:SI.$type,properties:{},superTypes:[]},RailroadNonTerminalExpr:{name:CI.$type,properties:{name:{name:CI.name}},superTypes:[SI.$type]},RailroadOneOrMoreExpr:{name:wI.$type,properties:{element:{name:wI.element}},superTypes:[SI.$type]},RailroadOptionalExpr:{name:TI.$type,properties:{element:{name:TI.element}},superTypes:[SI.$type]},RailroadPeg:{name:EI.$type,properties:{accDescr:{name:EI.accDescr},accTitle:{name:EI.accTitle},rules:{name:EI.rules,defaultValue:[]},title:{name:EI.title}},superTypes:[]},RailroadRule:{name:OI.$type,properties:{definition:{name:OI.definition},name:{name:OI.name}},superTypes:[]},RailroadSequenceExpr:{name:kI.$type,properties:{elements:{name:kI.elements,defaultValue:[]}},superTypes:[SI.$type]},RailroadSpecialExpr:{name:AI.$type,properties:{text:{name:AI.text}},superTypes:[SI.$type]},RailroadTerminalExpr:{name:jI.$type,properties:{value:{name:jI.value}},superTypes:[SI.$type]},RailroadZeroOrMoreExpr:{name:MI.$type,properties:{element:{name:MI.element}},superTypes:[SI.$type]},Section:{name:NI.$type,properties:{classSelector:{name:NI.classSelector},name:{name:NI.name}},superTypes:[zF.$type]},Service:{name:PI.$type,properties:{icon:{name:PI.icon},iconText:{name:PI.iconText},id:{name:PI.id},in:{name:PI.in},title:{name:PI.title}},superTypes:[]},Size:{name:FI.$type,properties:{height:{name:FI.height},width:{name:FI.width}},superTypes:[]},Statement:{name:II.$type,properties:{},superTypes:[]},Transition:{name:LI.$type,properties:{from:{name:LI.from},label:{name:LI.label},to:{name:LI.to}},superTypes:[]},TreeNode:{name:HI.$type,properties:{classAnnotation:{name:HI.classAnnotation},descAnnotation:{name:HI.descAnnotation},iconAnnotation:{name:HI.iconAnnotation},indent:{name:HI.indent},name:{name:HI.name}},superTypes:[]},TreeView:{name:UI.$type,properties:{accDescr:{name:UI.accDescr},accTitle:{name:UI.accTitle},nodes:{name:UI.nodes,defaultValue:[]},title:{name:UI.title}},superTypes:[]},Treemap:{name:zI.$type,properties:{accDescr:{name:zI.accDescr},accTitle:{name:zI.accTitle},title:{name:zI.title},TreemapRows:{name:zI.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:VI.$type,properties:{indent:{name:VI.indent},item:{name:VI.item}},superTypes:[]},Wardley:{name:WI.$type,properties:{accDescr:{name:WI.accDescr},accelerators:{name:WI.accelerators,defaultValue:[]},accTitle:{name:WI.accTitle},anchors:{name:WI.anchors,defaultValue:[]},annotation:{name:WI.annotation,defaultValue:[]},annotations:{name:WI.annotations,defaultValue:[]},components:{name:WI.components,defaultValue:[]},deaccelerators:{name:WI.deaccelerators,defaultValue:[]},evolution:{name:WI.evolution},evolves:{name:WI.evolves,defaultValue:[]},links:{name:WI.links,defaultValue:[]},notes:{name:WI.notes,defaultValue:[]},pipelines:{name:WI.pipelines,defaultValue:[]},size:{name:WI.size},title:{name:WI.title}},superTypes:[]}}}static{s(this,`MermaidAstReflection`)}},$=new KI,qI,JI=s(()=>qI??=tP(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"alignments","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Alignment","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"align"},{"$type":"Assignment","feature":"direction","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"row"},{"$type":"Keyword","value":"column"}]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@20"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`),`ArchitectureGrammarGrammar`),YI,XI=s(()=>YI??=tP(`{"$type":"Grammar","isDeclared":true,"name":"CynefinGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Cynefin","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"cynefin-beta"},{"$type":"Keyword","value":"cynefin-beta:"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"domains","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"transitions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"domain","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Assignment","feature":"items","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainItem","definition":{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Transition","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":"-->"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"DOMAIN_NAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complex"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complicated"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"clear"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"chaotic"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"confusion"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`CynefinGrammarGrammar`),ZI,QI=s(()=>ZI??=tP('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}'),`EventModelingGrammar`),$I,eL=s(()=>$I??=tP(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`),`GitGraphGrammarGrammar`),tL,nL=s(()=>tL??=tP(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`InfoGrammarGrammar`),rL,iL=s(()=>rL??=tP(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`PacketGrammarGrammar`),aL,oL=s(()=>aL??=tP(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`PieGrammarGrammar`),sL,cL=s(()=>sL??=tP(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`),`RadarGrammarGrammar`),lL,uL=s(()=>lL??=tP(`{"$type":"Grammar","isDeclared":true,"name":"RailroadAbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_RULENAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Za-z][A-Za-z0-9-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_NUMVAL","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\\\\.[0-9A-Fa-f]+)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]*\\\\*[0-9]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_EXACT_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_COMMENT","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadAbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-abnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfAlternation","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfConcatenation","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfElement","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfStringLiteral","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfNumVal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRuleName","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfOptionalGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadAbnf","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfAlternation","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfConcatenation","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfElement","attributes":[{"$type":"TypeAttribute","name":"repeat","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"AbnfStringLiteral","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfNumVal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfRuleName","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"AbnfOptionalGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]}],"imports":[],"types":[]}`),`RailroadAbnfGrammarGrammar`),dL,fL=s(()=>dL??=tP(`{"$type":"Grammar","isDeclared":true,"name":"RailroadEbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_SPECIAL_SEQUENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\?(?=[^?;]*[^?\\\\s;][^?;]*\\\\?)[^?;]*\\\\?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_ISO_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\(\\\\*[\\\\s\\\\S]*?\\\\*\\\\)/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadEbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-ebnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"="},{"$type":"Keyword","value":"::="}]},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"|"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":",","cardinality":"?"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerm","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"base","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"postfixes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerminal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfNonTerminal","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSpecial","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptional","returnType":{"$ref":"#/interfaces@11"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRepetition","returnType":{"$ref":"#/interfaces@12"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPostfix","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptionalPostfix","returnType":{"$ref":"#/interfaces@13"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfZeroOrMorePostfix","returnType":{"$ref":"#/interfaces@14"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOneOrMorePostfix","returnType":{"$ref":"#/interfaces@15"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfExceptionPostfix","returnType":{"$ref":"#/interfaces@16"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"except","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadEbnf","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfTerm","attributes":[{"$type":"TypeAttribute","name":"base","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false},{"$type":"TypeAttribute","name":"postfixes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfPostfix","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfNonTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfSpecial","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptional","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfRepetition","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptionalPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfZeroOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfOneOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfExceptionPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"except","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}]}],"imports":[],"types":[]}`),`RailroadEbnfGrammarGrammar`),pL,mL=s(()=>pL??=tP(`{"$type":"Grammar","isDeclared":true,"name":"RailroadGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"RR_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"Railroad","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadExpression","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSequenceExpr","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"sequence"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadChoiceExpr","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"choice"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOptionalExpr","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"optional"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOneOrMoreExpr","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"oneOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadZeroOrMoreExpr","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"zeroOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadTerminalExpr","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"terminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadNonTerminalExpr","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"nonterminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSpecialExpr","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"special"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"Railroad","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadExpression","attributes":[],"superTypes":[]},{"$type":"Interface","name":"RailroadSequenceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadChoiceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOptionalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOneOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadZeroOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadNonTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadSpecialExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}`),`RailroadGrammarGrammar`),hL,gL=s(()=>hL??=tP(`{"$type":"Grammar","isDeclared":true,"name":"RailroadPegGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/#[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadPeg","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-peg-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"<-"},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegOrderedChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrefix","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"&"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"!"}}],"cardinality":"?"},{"$type":"Assignment","feature":"suffix","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSuffix","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrimary","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegLiteral","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegIdentifier","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegAny","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Assignment","feature":"dot","operator":"=","terminal":{"$type":"Keyword","value":"."}},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadPeg","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegOrderedChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegPrefix","attributes":[{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"suffix","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSuffix","attributes":[{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}},"isOptional":false},{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"PegPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"PegLiteral","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegIdentifier","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegGroup","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"PegAny","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"dot","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}`),`RailroadPegGrammarGrammar`),_L,vL=s(()=>_L??=tP(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`),`TreemapGrammarGrammar`),yL,bL=s(()=>yL??=tP(`{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"CLASS_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+:::[ \\\\t]*[A-Za-z_][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ICON_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+icon\\\\([\\\\w-]*(?::[\\\\w-]+)?\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"DESC_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+##[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"QUOTED_NAME","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"BARE_NAME","definition":{"$type":"RegexToken","regex":"/(?!:::|icon\\\\(|##)[^ \\\\t\\\\n\\\\r\\"'](?:(?![ \\\\t]+:::[ \\\\t]*[A-Za-z_]|[ \\\\t]+icon\\\\(|[ \\\\t]+##)[^\\\\n\\\\r])*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"classAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"iconAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"descAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n *\\n * Supports both quoted labels (\\"my file\\") and bare labels (index.js).\\n * Annotations (:::class, icon(), ## description) are parsed directly into\\n * AST fields by the grammar. Value conversion for stripping quotes, extracting\\n * class names, icon names, and description text happens in valueConverter.ts.\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treeView keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`),`TreeViewGrammarGrammar`),xL,SL=s(()=>xL??=tP(`{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`WardleyGrammarGrammar`),CL={languageId:`architecture`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},wL={languageId:`cynefin`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},TL={languageId:`eventmodeling`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},EL={languageId:`gitGraph`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},DL={languageId:`info`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},OL={languageId:`packet`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},kL={languageId:`pie`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},AL={languageId:`radar`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},jL={languageId:`railroadAbnf`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},ML={languageId:`railroadEbnf`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},NL={languageId:`railroad`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},PL={languageId:`railroadPeg`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},FL={languageId:`treemap`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},IL={languageId:`treeView`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},LL={languageId:`wardley`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},RL={AstReflection:s(()=>new KI,`AstReflection`)},zL={Grammar:s(()=>JI(),`Grammar`),LanguageMetaData:s(()=>CL,`LanguageMetaData`),parser:{}},BL={Grammar:s(()=>XI(),`Grammar`),LanguageMetaData:s(()=>wL,`LanguageMetaData`),parser:{}},VL={Grammar:s(()=>QI(),`Grammar`),LanguageMetaData:s(()=>TL,`LanguageMetaData`),parser:{}},HL={Grammar:s(()=>eL(),`Grammar`),LanguageMetaData:s(()=>EL,`LanguageMetaData`),parser:{}},UL={Grammar:s(()=>nL(),`Grammar`),LanguageMetaData:s(()=>DL,`LanguageMetaData`),parser:{}},WL={Grammar:s(()=>iL(),`Grammar`),LanguageMetaData:s(()=>OL,`LanguageMetaData`),parser:{}},GL={Grammar:s(()=>oL(),`Grammar`),LanguageMetaData:s(()=>kL,`LanguageMetaData`),parser:{}},KL={Grammar:s(()=>cL(),`Grammar`),LanguageMetaData:s(()=>AL,`LanguageMetaData`),parser:{}},qL={Grammar:s(()=>uL(),`Grammar`),LanguageMetaData:s(()=>jL,`LanguageMetaData`),parser:{}},JL={Grammar:s(()=>fL(),`Grammar`),LanguageMetaData:s(()=>ML,`LanguageMetaData`),parser:{}},YL={Grammar:s(()=>mL(),`Grammar`),LanguageMetaData:s(()=>NL,`LanguageMetaData`),parser:{}},XL={Grammar:s(()=>gL(),`Grammar`),LanguageMetaData:s(()=>PL,`LanguageMetaData`),parser:{}},ZL={Grammar:s(()=>vL(),`Grammar`),LanguageMetaData:s(()=>FL,`LanguageMetaData`),parser:{}},QL={Grammar:s(()=>bL(),`Grammar`),LanguageMetaData:s(()=>IL,`LanguageMetaData`),parser:{}},$L={Grammar:s(()=>SL(),`Grammar`),LanguageMetaData:s(()=>LL,`LanguageMetaData`),parser:{}},eR={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},tR=class extends Lj{static{e(this,`AbstractMermaidValueConverter`)}static{s(this,`AbstractMermaidValueConverter`)}runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);return r===void 0&&(r=this.runCustomConverter(e,t,n)),r===void 0?super.runConverter(e,t,n):r}runCommonConverter(e,t,n){let r=eR[e.name];if(r===void 0)return;let i=r.exec(t);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm,` `);if(i[2]!==void 0)return i[2].replace(/^\s*/gm,``).replace(/\s+$/gm,``).replace(/[\t ]{2,}/gm,` `).replace(/[\n\r]{2,}/gm,` +`)}}},nR=class extends tR{static{e(this,`CommonValueConverter`)}static{s(this,`CommonValueConverter`)}runCustomConverter(e,t,n){}},rR=class extends Ij{static{e(this,`AbstractMermaidTokenBuilder`)}static{s(this,`AbstractMermaidTokenBuilder`)}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,n){let r=super.buildKeywordTokens(e,t,n);return r.forEach(e=>{this.keywords.has(e.name)&&e.PATTERN!==void 0&&(e.PATTERN=RegExp(e.PATTERN.toString()+`(?:(?=%%)|(?!\\S))`))}),r}};(class extends rR{static{e(this,`CommonTokenBuilder`)}static{s(this,`CommonTokenBuilder`)}});export{IN as C,FN as S,DF as T,XL as _,BL as a,$L as b,HL as c,WL as d,GL as f,YL as g,JL as h,nR as i,UL as l,qL as m,tR as n,ZN as o,KL as p,zL as r,VL as s,rR as t,RL as u,QL as v,RN as w,s as x,ZL as y}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-AQ2D6KKF-AxjphkEe.js b/lecture-01/assets/chunk-AQ2D6KKF-AxjphkEe.js new file mode 100644 index 0000000000000000000000000000000000000000..cb6085a105eda9133707f7cd5d6ea7d69e804cb0 --- /dev/null +++ b/lecture-01/assets/chunk-AQ2D6KKF-AxjphkEe.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as t}from"./chunk-FO5PYUIK-CPzj2963.js";import{G as n,S as r}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";var i=Object.freeze({left:0,top:0,width:16,height:16}),a=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),o=Object.freeze({...i,...a}),s=Object.freeze({...o,body:``,hidden:!1}),c=Object.freeze({width:null,height:null}),l=Object.freeze({...c,...a}),u=e((e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!d(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!d(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!d(e,n)?null:e}return null},`stringToIcon`),d=e((e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1,`validateIconName`);function f(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}e(f,`mergeIconTransformations`);function p(e,t){let n=f(e,t);for(let r in s)r in a?r in e&&!(r in n)&&(n[r]=a[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}e(p,`mergeIconData`);function m(t,n){let r=t.icons,i=t.aliases||Object.create(null),a=Object.create(null);function o(e){if(r[e])return a[e]=[];if(!(e in a)){a[e]=null;let t=i[e]&&i[e].parent,n=t&&o(t);n&&(a[e]=[t].concat(n))}return a[e]}return e(o,`resolve`),(n||Object.keys(r).concat(Object.keys(i))).forEach(o),a}e(m,`getIconsTree`);function h(t,n,r){let i=t.icons,a=t.aliases||Object.create(null),o={};function s(e){o=p(i[e]||a[e],o)}return e(s,`parse`),s(n),r.forEach(s),p(t,o)}e(h,`internalGetIconData`);function g(e,t){if(e.icons[t])return h(e,t,[]);let n=m(e,[t])[t];return n?h(e,t,n):null}e(g,`getIconData`);var _=/(-?[0-9.]*[0-9]+[0-9.]*)/g,v=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(_);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=v.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}e(y,`calculateSize`);function b(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(``,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}e(b,`splitSVGDefs`);function x(e,t){return e?``+e+``+t:t}e(x,`mergeDefsAndContent`);function S(e,t,n){let r=b(e);return x(r.defs,t+r.content+n)}e(S,`wrapSVGContent`);var C=e(e=>e===`unset`||e===`undefined`||e===`none`,`isUnsetKeyword`);function w(t,n){let r={...o,...t},i={...l,...n},a={left:r.left,top:r.top,width:r.width,height:r.height},s=r.body;[r,i].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,i=e.rotate;n?r?i+=2:(t.push(`translate(`+(a.width+a.left).toString()+` `+(0-a.top).toString()+`)`),t.push(`scale(-1 1)`),a.top=a.left=0):r&&(t.push(`translate(`+(0-a.left).toString()+` `+(a.height+a.top).toString()+`)`),t.push(`scale(1 -1)`),a.top=a.left=0);let o;switch(i<0&&(i-=Math.floor(i/4)*4),i%=4,i){case 1:o=a.height/2+a.top,t.unshift(`rotate(90 `+o.toString()+` `+o.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(a.width/2+a.left).toString()+` `+(a.height/2+a.top).toString()+`)`);break;case 3:o=a.width/2+a.left,t.unshift(`rotate(-90 `+o.toString()+` `+o.toString()+`)`)}i%2==1&&(a.left!==a.top&&(o=a.left,a.left=a.top,a.top=o),a.width!==a.height&&(o=a.width,a.width=a.height,a.height=o)),t.length&&(s=S(s,``,``))});let c=i.width,u=i.height,d=a.width,f=a.height,p,m;c===null?(m=u===null?`1em`:u===`auto`?f:u,p=y(m,d/f)):(p=c===`auto`?d:c,m=u===null?y(p,f/d):u===`auto`?f:u);let h={},g=e((e,t)=>{C(t)||(h[e]=t.toString())},`setAttr`);g(`width`,p),g(`height`,m);let _=[a.left,a.top,d,f];return h.viewBox=_.join(` `),{attributes:h,viewBox:_,body:s}}e(w,`iconToSVG`);var T=/\sid="(\S+)"/g,E=`IconifyId`+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),D=0;function O(e,t=E){let n=[],r;for(;r=T.exec(e);)n.push(r[1]);if(!n.length)return e;let i=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(n=>{let r=typeof t==`function`?t(n):t+(D++).toString(),a=n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+a+`)([")]|\\.[a-z])`,`g`),`$1`+r+i+`$3`)}),e=e.replace(new RegExp(i,`g`),``),e}e(O,`replaceIDs`);function k(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return``+e+``}e(k,`iconToHTML`);var A={body:`?`,height:80,width:80},j=new Map,M=new Map,N=e(e=>{for(let n of e){if(!n.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(t.debug(`Registering icon pack:`,n.name),`loader`in n)M.set(n.name,n.loader);else if(`icons`in n)j.set(n.name,n.icons);else throw t.error(`Invalid icon loader:`,n),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),P=e(async(e,n)=>{let r=u(e,!0,n!==void 0);if(!r)throw Error(`Invalid icon name: ${e}`);let i=r.prefix||n;if(!i)throw Error(`Icon name must contain a prefix: ${e}`);let a=j.get(i);if(!a){let e=M.get(i);if(!e)throw Error(`Icon set not found: ${r.prefix}`);try{a={...await e(),prefix:i},j.set(i,a)}catch(e){throw t.error(e),Error(`Failed to load icon set: ${r.prefix}`)}}let o=g(a,r.name);if(!o)throw Error(`Icon not found: ${e}`);return o},`getRegisteredIconData`),F=e(async e=>{try{return await P(e),!0}catch{return!1}},`isIconAvailable`),I=e(async(e,i,a)=>{let o;try{o=await P(e,i?.fallbackPrefix)}catch(e){t.error(e),o=A}let s=w(o,i),c=k(O(s.body),{...s.attributes,...a});return n(c,r())},`getIconSVG`);export{A as i,F as n,N as r,I as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-BPTLHSDI-QRS_xuYz.js b/lecture-01/assets/chunk-BPTLHSDI-QRS_xuYz.js new file mode 100644 index 0000000000000000000000000000000000000000..84985bcbfe6d2d3088989397a390b5f4472c6ba6 --- /dev/null +++ b/lecture-01/assets/chunk-BPTLHSDI-QRS_xuYz.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as t}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as n}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";var r=e(e=>{let{securityLevel:r}=n(),i=t(`body`);if(r===`sandbox`){let n=t(`#i${e}`).node()?.contentDocument??document;i=t(n.body)}return i.select(`#${e}`)},`selectSvgElement`);export{r as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-BQKPLVCE-CH-bQZj9.js b/lecture-01/assets/chunk-BQKPLVCE-CH-bQZj9.js new file mode 100644 index 0000000000000000000000000000000000000000..caaa88126f53d26b4ec51a4e656ee464d0d5eced --- /dev/null +++ b/lecture-01/assets/chunk-BQKPLVCE-CH-bQZj9.js @@ -0,0 +1,4 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/info-DKCQHKI2-33YBBPSM-Bpamt84E.js","assets/chunk-A7G5T7E5-C2HISlqa.js","assets/chunk-PTVI3W5X-DVfdoxm6.js","assets/chunk-6OZ7KPF7-CpRlDBGl.js","assets/packet-7NZHBO7P-4S63VQ2U-B1bmXRL8.js","assets/chunk-LJTN6OYE-BTsXVLFU.js","assets/pie-RZYD4A2V-Z4KIYNQL-CIuLkzY1.js","assets/chunk-Z6Q54H3S-B8XyqzVF.js","assets/treeView-QDETBFTQ-LXWSYSUM-65Gdg4e5.js","assets/chunk-4KMQCWFH-ClzK3uec.js","assets/architecture-TIHT7OUA-BWQ77455-BpewYfMR.js","assets/chunk-S7Q6ZHN2-CSIi0_Nw.js","assets/gitGraph-TEB2WS4Q-EIY3NVGF-B7z_rRcc.js","assets/chunk-IIWGMRJM-k15frrBU.js","assets/eventmodeling-45OFAUF4-3WKU7OSU-BRi7es1H.js","assets/chunk-6QIBY7DQ-xR0SR3RB.js","assets/radar-I7S5WNFK-UWZYMAIF-C3y3vUe8.js","assets/chunk-SLCUJWJ3-Bzf1BoPP.js","assets/railroad-3IZDKUUU-NPR2B6A7-dVr-qo4D.js","assets/chunk-43ACQNTO-CVHKukau.js","assets/railroad-ebnf-EBAXGLYW-KNIRPJJ3-C3J20xdH.js","assets/chunk-FXRKSSP6-BDxrggHz.js","assets/railroad-abnf-AHOZXSZD-ZQ2ZTVQN-b86BQvgz.js","assets/chunk-RRYK4PFG-DZMcopsb.js","assets/railroad-peg-LSFZ7HO6-HLXQPOFZ-BwD06NSa.js","assets/chunk-IT6C5QXO-BI6Sf-cR.js","assets/treemap-6X3UGDF4-KSRZGEBQ-DphJ9Pgz.js","assets/chunk-GMJQP6DO-gEw8rKqu.js","assets/wardley-OPB4EBWU-NNLCSONB-Eduvm1r0.js","assets/chunk-ODPFZSHR-BUzFQ4Zq.js","assets/cynefin-VYW2F7L2-VU6BHR45-DkJfH4OC.js","assets/chunk-NYCIP5HP-BZs_nZUU.js"])))=>i.map(i=>d[i]); +import{t as e}from"./preload-helper-DpA04vUI.js";import{r as t}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{x as n}from"./chunk-A7G5T7E5-C2HISlqa.js";var r={},i={info:n(async()=>{let{createInfoServices:t}=await e(async()=>{let{createInfoServices:e}=await import(`./info-DKCQHKI2-33YBBPSM-Bpamt84E.js`);return{createInfoServices:e}},__vite__mapDeps([0,1,2,3]));r.info=t().Info.parser.LangiumParser},`info`),packet:n(async()=>{let{createPacketServices:t}=await e(async()=>{let{createPacketServices:e}=await import(`./packet-7NZHBO7P-4S63VQ2U-B1bmXRL8.js`);return{createPacketServices:e}},__vite__mapDeps([4,1,2,5]));r.packet=t().Packet.parser.LangiumParser},`packet`),pie:n(async()=>{let{createPieServices:t}=await e(async()=>{let{createPieServices:e}=await import(`./pie-RZYD4A2V-Z4KIYNQL-CIuLkzY1.js`);return{createPieServices:e}},__vite__mapDeps([6,1,2,7]));r.pie=t().Pie.parser.LangiumParser},`pie`),treeView:n(async()=>{let{createTreeViewServices:t}=await e(async()=>{let{createTreeViewServices:e}=await import(`./treeView-QDETBFTQ-LXWSYSUM-65Gdg4e5.js`);return{createTreeViewServices:e}},__vite__mapDeps([8,1,2,9]));r.treeView=t().TreeView.parser.LangiumParser},`treeView`),architecture:n(async()=>{let{createArchitectureServices:t}=await e(async()=>{let{createArchitectureServices:e}=await import(`./architecture-TIHT7OUA-BWQ77455-BpewYfMR.js`);return{createArchitectureServices:e}},__vite__mapDeps([10,1,2,11]));r.architecture=t().Architecture.parser.LangiumParser},`architecture`),gitGraph:n(async()=>{let{createGitGraphServices:t}=await e(async()=>{let{createGitGraphServices:e}=await import(`./gitGraph-TEB2WS4Q-EIY3NVGF-B7z_rRcc.js`);return{createGitGraphServices:e}},__vite__mapDeps([12,1,2,13]));r.gitGraph=t().GitGraph.parser.LangiumParser},`gitGraph`),eventmodeling:n(async()=>{let{createEventModelingServices:t}=await e(async()=>{let{createEventModelingServices:e}=await import(`./eventmodeling-45OFAUF4-3WKU7OSU-BRi7es1H.js`);return{createEventModelingServices:e}},__vite__mapDeps([14,1,2,15]));r.eventmodeling=t().EventModel.parser.LangiumParser},`eventmodeling`),radar:n(async()=>{let{createRadarServices:t}=await e(async()=>{let{createRadarServices:e}=await import(`./radar-I7S5WNFK-UWZYMAIF-C3y3vUe8.js`);return{createRadarServices:e}},__vite__mapDeps([16,1,2,17]));r.radar=t().Radar.parser.LangiumParser},`radar`),railroad:n(async()=>{let{createRailroadServices:t}=await e(async()=>{let{createRailroadServices:e}=await import(`./railroad-3IZDKUUU-NPR2B6A7-dVr-qo4D.js`);return{createRailroadServices:e}},__vite__mapDeps([18,1,2,19]));r.railroad=t().Railroad.parser.LangiumParser},`railroad`),railroadEbnf:n(async()=>{let{createRailroadEbnfServices:t}=await e(async()=>{let{createRailroadEbnfServices:e}=await import(`./railroad-ebnf-EBAXGLYW-KNIRPJJ3-C3J20xdH.js`);return{createRailroadEbnfServices:e}},__vite__mapDeps([20,1,2,21]));r.railroadEbnf=t().RailroadEbnf.parser.LangiumParser},`railroadEbnf`),railroadAbnf:n(async()=>{let{createRailroadAbnfServices:t}=await e(async()=>{let{createRailroadAbnfServices:e}=await import(`./railroad-abnf-AHOZXSZD-ZQ2ZTVQN-b86BQvgz.js`);return{createRailroadAbnfServices:e}},__vite__mapDeps([22,1,2,23]));r.railroadAbnf=t().RailroadAbnf.parser.LangiumParser},`railroadAbnf`),railroadPeg:n(async()=>{let{createRailroadPegServices:t}=await e(async()=>{let{createRailroadPegServices:e}=await import(`./railroad-peg-LSFZ7HO6-HLXQPOFZ-BwD06NSa.js`);return{createRailroadPegServices:e}},__vite__mapDeps([24,1,2,25]));r.railroadPeg=t().RailroadPeg.parser.LangiumParser},`railroadPeg`),treemap:n(async()=>{let{createTreemapServices:t}=await e(async()=>{let{createTreemapServices:e}=await import(`./treemap-6X3UGDF4-KSRZGEBQ-DphJ9Pgz.js`);return{createTreemapServices:e}},__vite__mapDeps([26,1,2,27]));r.treemap=t().Treemap.parser.LangiumParser},`treemap`),wardley:n(async()=>{let{createWardleyServices:t}=await e(async()=>{let{createWardleyServices:e}=await import(`./wardley-OPB4EBWU-NNLCSONB-Eduvm1r0.js`);return{createWardleyServices:e}},__vite__mapDeps([28,1,2,29]));r.wardley=t().Wardley.parser.LangiumParser},`wardley`),cynefin:n(async()=>{let{createCynefinServices:t}=await e(async()=>{let{createCynefinServices:e}=await import(`./cynefin-VYW2F7L2-VU6BHR45-DkJfH4OC.js`);return{createCynefinServices:e}},__vite__mapDeps([30,1,2,31]));r.cynefin=t().Cynefin.parser.LangiumParser},`cynefin`)};async function a(e,t){let n=i[e];if(!n)throw Error(`Unknown diagram type: ${e}`);r[e]||await n();let a=r[e].parse(t);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new o(a);return a.value}t(a,`parse`),n(a,`parse`);var o=class extends Error{static{t(this,`MermaidParseError`)}constructor(e){let t=e.lexerErrors.map(e=>`Lexer error on line ${e.line!==void 0&&!isNaN(e.line)?e.line:`?`}, column ${e.column!==void 0&&!isNaN(e.column)?e.column:`?`}: ${e.message}`).join(` +`),n=e.parserErrors.map(e=>`Parse error on line ${e.token.startLine!==void 0&&!isNaN(e.token.startLine)?e.token.startLine:`?`}, column ${e.token.startColumn!==void 0&&!isNaN(e.token.startColumn)?e.token.startColumn:`?`}: ${e.message}`).join(` +`);super(`Parsing failed: ${t} ${n}`),this.result=e}static{n(this,`MermaidParseError`)}};export{a as n,o as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-BYAF6FXG-DqiL_6qO.js b/lecture-01/assets/chunk-BYAF6FXG-DqiL_6qO.js new file mode 100644 index 0000000000000000000000000000000000000000..5fde537ba1ab6d439ddc47773cb9a4daa05c7593 --- /dev/null +++ b/lecture-01/assets/chunk-BYAF6FXG-DqiL_6qO.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as t}from"./chunk-FO5PYUIK-CPzj2963.js";import{l as n}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";var r=e((e,r,o,s)=>{e.attr(`class`,o);let{width:c,height:l,x:u,y:d}=i(e,r);n(e,l,c,s);let f=a(u,d,c,l,r);e.attr(`viewBox`,f),t.debug(`viewBox configured: ${f} with padding: ${r}`)},`setupViewPortForSVG`),i=e((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+t*2,height:n.height+t*2,x:n.x,y:n.y}},`calculateDimensionsWithPadding`),a=e((e,t,n,r,i)=>`${e-i} ${t-i} ${n} ${r}`,`createViewBox`);export{r as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-DKH7L6O3-pKUB4f-O.js b/lecture-01/assets/chunk-DKH7L6O3-pKUB4f-O.js new file mode 100644 index 0000000000000000000000000000000000000000..b25e2bd6fbf6b9777371df674a19dbab3df80c8a --- /dev/null +++ b/lecture-01/assets/chunk-DKH7L6O3-pKUB4f-O.js @@ -0,0 +1,62 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as t,T as n}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as r,D as i,G as a,I as o,K as s,M as c,S as l,v as u}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as d}from"./chunk-PLCLPJVV-BfMyJHbe.js";import{a as f,i as p,r as m,t as h}from"./chunk-XXV7AQMY-qeLKYxsH.js";import{d as g,o as _,r as v}from"./chunk-OX6ZKUVE-roiHi12N.js";import{n as y,t as b}from"./chunk-YV36FAQU-CkTVkoM6.js";import{t as x}from"./chunk-AQ2D6KKF-AxjphkEe.js";import{n as S}from"./chunk-2V3FENDJ-B1mkZICr.js";var C=e(async(e,n,i)=>{let o,s=n.useHtmlLabels||u(r()?.htmlLabels);o=i||`node default`;let c=e.insert(`g`).attr(`class`,o).attr(`id`,n.domId||n.id),l=c.insert(`g`).attr(`class`,`label`).attr(`style`,g(n.labelStyle)),d;d=n.label===void 0?``:typeof n.label==`string`?n.label:n.label[0];let f=!!n.icon||!!n.img,p=n.labelType===`markdown`,m=await S(l,a(_(d),r()),{useHtmlLabels:s,width:n.width||r().flowchart?.wrappingWidth,classes:p?`markdown-node-label`:``,style:n.labelStyle,addSvgBackground:f,markdown:p},r()),h=m.getBBox(),v=(n?.padding??0)/2;if(s){let e=m.children[0],n=t(m);await b(e,d),h=e.getBoundingClientRect(),n.attr(`width`,h.width),n.attr(`height`,h.height)}return s?l.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`):l.attr(`transform`,`translate(0, `+-h.height/2+`)`),n.centerLabel&&l.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`),l.insert(`rect`,`:first-child`),{shapeSvg:c,bbox:h,halfPadding:v,label:l}},`labelHelper`),w=e(async(e,n,o)=>{let s=o.useHtmlLabels??i(r()),c=e.insert(`g`).attr(`class`,`label`).attr(`style`,o.labelStyle||``),l=await S(c,a(_(n),r()),{useHtmlLabels:s,width:o.width||r()?.flowchart?.wrappingWidth,style:o.labelStyle,addSvgBackground:!!o.icon||!!o.img}),u=l.getBBox(),d=o.padding/2;if(i(r())){let e=l.children[0],n=t(l);u=e.getBoundingClientRect(),n.attr(`width`,u.width),n.attr(`height`,u.height)}return s?c.attr(`transform`,`translate(`+-u.width/2+`, `+-u.height/2+`)`):c.attr(`transform`,`translate(0, `+-u.height/2+`)`),o.centerLabel&&c.attr(`transform`,`translate(`+-u.width/2+`, `+-u.height/2+`)`),c.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:u,halfPadding:d,label:c}},`insertLabel`),T=e((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),E=e((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function D(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e(D,`createPathFromPoints`);function O(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}e(O,`generateFullSineWavePoints`);function k(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;ie.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=n.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=n.find(e=>e.getAttribute(`fill`)!==`none`),o=n.find(e=>e.getAttribute(`stroke`)!==`none`),s=e((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}e(A,`mergePaths`);var j=e((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),M=e(async(e,t,n,a=!1,o=!1)=>{let s=t||``;typeof s==`object`&&(s=s[0]);let c=r(),l=i(c);return await S(e,s,{style:n,isTitle:a,useHtmlLabels:l,markdown:!1,isNode:o,width:1/0},c)},`createLabel`),N=e((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),P=e(async(e,i)=>{let a=r(),{themeVariables:o,handDrawnSeed:s}=a,{clusterBkg:c,clusterBorder:l}=o,m=l,{labelStyles:h,nodeStyles:g,borderStyles:_,backgroundStyles:v}=p(i),y=e.insert(`g`).attr(`class`,`cluster swimlane `+(i.cssClasses||``)).attr(`id`,i.id).attr(`data-id`,i.id).attr(`data-et`,`cluster`).attr(`data-look`,i.look),b=u(a.flowchart.htmlLabels),x=i.direction===`LR`,C=y.insert(`g`).attr(`class`,`cluster-label swimlane-label`),w=await S(C,i.label,{style:i.labelStyle,useHtmlLabels:b,isNode:!0,width:i.width}),T=w.getBBox();if(b){let e=w.children[0],n=t(w);T=e.getBoundingClientRect(),n.attr(`width`,T.width),n.attr(`height`,T.height)}let E=i.padding??0,D=i.width<=T.width+E?T.width+E:i.width;i.diff=i.width<=T.width+E?(D-i.width)/2-E:-E;let O=i.height,k=i.y-O/2,A=i.y+O/2,M=i.x-D/2,N=i.swimlaneContentTop===void 0?k+O/3:i.swimlaneContentTop,P=x?4:0,F=T.height+2*P,I,L;if(x){let e=Math.max(F,T.height+2*P),t=M+e,n=Math.max(0,D-e);if(i.look===`handDrawn`){let r=d.svg(y),a=f(i,{roughness:.7,fill:c,stroke:m,fillWeight:3,seed:s}),o=f(i,{roughness:.7,fill:`none`,stroke:m,seed:s}),l=r.rectangle(M,k,e,O,a);I=y.insert(()=>l,`:first-child`);let u=r.rectangle(t,k,n,O,o);L=y.insert(()=>u,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,_.join(`;`)),I.select(`path`).attr(`style`,v.join(`;`).replace(`fill`,`stroke`))}else I=y.insert(`rect`,`:first-child`),L=y.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,g).attr(`x`,M).attr(`y`,k).attr(`width`,e).attr(`height`,O).attr(`fill`,c).attr(`stroke`,m),L.attr(`class`,`swimlane-body`).attr(`style`,g).attr(`x`,t).attr(`y`,k).attr(`width`,n).attr(`height`,O).attr(`fill`,`none`).attr(`stroke`,m);let r=M+e/2,a=i.y;C.attr(`transform`,`translate(${r}, ${a}) rotate(-90) translate(${-T.width/2}, ${-T.height/2})`)}else{let e=Math.max(0,N-k),t=Math.min(F,e),n=k+t,r=Math.max(0,A-n),a=i.x-D/2;if(i.look===`handDrawn`){let e=d.svg(y),o=f(i,{roughness:.7,fill:c,stroke:m,fillWeight:3,seed:s}),l=f(i,{roughness:.7,fill:`none`,stroke:m,seed:s}),u=e.rectangle(a,k,D,t,o);I=y.insert(()=>u,`:first-child`);let p=e.rectangle(a,n,D,r,l);L=y.insert(()=>p,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,_.join(`;`)),I.select(`path`).attr(`style`,v.join(`;`).replace(`fill`,`stroke`))}else I=y.insert(`rect`,`:first-child`),L=y.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,g).attr(`x`,a).attr(`y`,k).attr(`width`,D).attr(`height`,t).attr(`fill`,c).attr(`stroke`,m),L.attr(`class`,`swimlane-body`).attr(`style`,g).attr(`x`,a).attr(`y`,n).attr(`width`,D).attr(`height`,r).attr(`fill`,`none`).attr(`stroke`,m);let o=i.x-T.width/2,l=k+(t-T.height)/2;C.attr(`transform`,`translate(${o}, ${l})`)}if(n.trace(`Swimlane data `,i,JSON.stringify(i)),h){let e=C.select(`span`);e&&e.attr(`style`,h)}return i.offsetX=0,i.width=D,i.height=O,i.offsetY=T.height-E/2,i.intersect=function(e){return j(i,e)},{cluster:y,labelBBox:T}},`swimlane`),F=e(async(e,a)=>{n.info(`Creating subgraph rect for `,a.id,a);let o=r(),{themeVariables:s,handDrawnSeed:c}=o,{clusterBkg:l,clusterBorder:u}=s,{labelStyles:m,nodeStyles:h,borderStyles:g,backgroundStyles:_}=p(a),v=e.insert(`g`).attr(`class`,`cluster `+a.cssClasses).attr(`id`,a.domId).attr(`data-look`,a.look),b=i(o),x=v.insert(`g`).attr(`class`,`cluster-label `),C;C=a.labelType===`markdown`?await S(x,a.label,{style:a.labelStyle,useHtmlLabels:b,isNode:!0,width:a.width}):await M(x,a.label,a.labelStyle||``,!1,!0);let w=C.getBBox();if(i(o)){let e=C.children[0],n=t(C);w=e.getBoundingClientRect(),n.attr(`width`,w.width),n.attr(`height`,w.height)}let T=a.width<=w.width+a.padding?w.width+a.padding:a.width;a.diff=a.width<=w.width+a.padding?(T-a.width)/2-a.padding:-a.padding;let E=a.height,D=a.x-T/2,O=a.y-E/2;n.trace(`Data `,a,JSON.stringify(a));let k;if(a.look===`handDrawn`){let e=d.svg(v),t=f(a,{roughness:.7,fill:l,stroke:u,fillWeight:3,seed:c}),r=e.path(N(D,O,T,E,0),t);k=v.insert(()=>(n.debug(`Rough node insert CXC`,r),r),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,g.join(`;`)),k.select(`path`).attr(`style`,_.join(`;`).replace(`fill`,`stroke`))}else k=v.insert(`rect`,`:first-child`),k.attr(`style`,h).attr(`rx`,a.rx).attr(`ry`,a.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=y(o);if(x.attr(`transform`,`translate(${a.x-w.width/2}, ${a.y-a.height/2+A})`),m){let e=x.select(`span`);e&&e.attr(`style`,m)}let P=k.node().getBBox();return a.offsetX=0,a.width=P.width,a.height=P.height,a.offsetY=w.height-a.padding/2,a.intersect=function(e){return j(a,e)},{cluster:v,labelBBox:w}},`rect`),I={rect:F,squareRect:F,roundedWithTitle:e(async(e,n)=>{let a=r(),{themeVariables:o,handDrawnSeed:s}=a,{altBackground:c,compositeBackground:l,compositeTitleBackground:u,nodeBorder:f}=o,p=e.insert(`g`).attr(`class`,n.cssClasses).attr(`id`,n.domId).attr(`data-id`,n.id).attr(`data-look`,n.look),m=p.insert(`g`,`:first-child`),h=p.insert(`g`).attr(`class`,`cluster-label`),g=p.append(`rect`),_=await M(h,n.label,n.labelStyle,void 0,!0),v=_.getBBox();if(i(a)){let e=_.children[0],n=t(_);v=e.getBoundingClientRect(),n.attr(`width`,v.width),n.attr(`height`,v.height)}let y=0*n.padding,b=y/2,x=(n.width<=v.width+n.padding?v.width+n.padding:n.width)+y;n.diff=n.width<=v.width+n.padding?(x-n.width)/2-n.padding:-n.padding;let S=n.height+y,C=n.height+y-v.height-6,w=n.x-x/2,T=n.y-S/2;n.width=x;let E=n.y-n.height/2-b+v.height+2,D;if(n.look===`handDrawn`){let e=n.cssClasses.includes(`statediagram-cluster-alt`),t=d.svg(p),r=n.rx||n.ry?t.path(N(w,T,x,S,10),{roughness:.7,fill:u,fillStyle:`solid`,stroke:f,seed:s}):t.rectangle(w,T,x,S,{seed:s});D=p.insert(()=>r,`:first-child`);let i=t.rectangle(w,E,x,C,{fill:e?c:l,fillStyle:e?`hachure`:`solid`,stroke:f,seed:s});D=p.insert(()=>r,`:first-child`),g=p.insert(()=>i)}else D=m.insert(`rect`,`:first-child`),D.attr(`class`,`outer`).attr(`x`,w).attr(`y`,T).attr(`width`,x).attr(`height`,S).attr(`data-look`,n.look),g.attr(`class`,`inner`).attr(`x`,w).attr(`y`,E).attr(`width`,x).attr(`height`,C);return h.attr(`transform`,`translate(${n.x-v.width/2}, ${T+1-(i(a)?0:3)})`),n.height=D.node().getBBox().height,n.offsetX=0,n.offsetY=v.height-n.padding/2,n.labelBBox=v,n.intersect=function(e){return j(n,e)},{cluster:p,labelBBox:v}},`roundedWithTitle`),noteGroup:e((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return j(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:e((e,t)=>{let{themeVariables:n,handDrawnSeed:i}=r(),{nodeBorder:a}=n,o=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),s=o.insert(`g`,`:first-child`),c=0*t.padding,l=t.width+c;t.diff=-t.padding;let u=t.height+c,f=t.x-l/2,p=t.y-u/2;t.width=l;let m;if(t.look===`handDrawn`){let e=d.svg(o).rectangle(f,p,l,u,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:a,seed:i});m=o.insert(()=>e,`:first-child`)}else{m=s.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),m.attr(`class`,e).attr(`x`,f).attr(`y`,p).attr(`width`,l).attr(`height`,u).attr(`data-look`,t.look)}return t.height=m.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return j(t,e)},{cluster:o,labelBBox:{}}},`divider`),kanbanSection:e(async(e,a)=>{n.info(`Creating subgraph rect for `,a.id,a);let o=r(),{themeVariables:s,handDrawnSeed:c}=o,{clusterBkg:l,clusterBorder:u}=s,{labelStyles:m,nodeStyles:h,borderStyles:g,backgroundStyles:_}=p(a),v=e.insert(`g`).attr(`class`,`cluster `+a.cssClasses).attr(`id`,a.domId).attr(`data-look`,a.look),b=i(o),x=v.insert(`g`).attr(`class`,`cluster-label `),C=await S(x,a.label,{style:a.labelStyle,useHtmlLabels:b,isNode:!0,width:a.width}),w=C.getBBox();if(i(o)){let e=C.children[0],n=t(C);w=e.getBoundingClientRect(),n.attr(`width`,w.width),n.attr(`height`,w.height)}let T=a.width<=w.width+a.padding?w.width+a.padding:a.width;a.diff=a.width<=w.width+a.padding?(T-a.width)/2-a.padding:-a.padding;let E=a.height,D=a.x-T/2,O=a.y-E/2;n.trace(`Data `,a,JSON.stringify(a));let k;if(a.look===`handDrawn`){let e=d.svg(v),t=f(a,{roughness:.7,fill:l,stroke:u,fillWeight:4,seed:c}),r=e.path(N(D,O,T,E,a.rx),t);k=v.insert(()=>(n.debug(`Rough node insert CXC`,r),r),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,g.join(`;`)),k.select(`path`).attr(`style`,_.join(`;`).replace(`fill`,`stroke`))}else k=v.insert(`rect`,`:first-child`),k.attr(`style`,h).attr(`rx`,a.rx).attr(`ry`,a.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=y(o);if(x.attr(`transform`,`translate(${a.x-w.width/2}, ${a.y-a.height/2+A})`),m){let e=x.select(`span`);e&&e.attr(`style`,m)}let M=k.node().getBBox();return a.offsetX=0,a.width=M.width,a.height=M.height,a.offsetY=w.height-a.padding/2,a.intersect=function(e){return j(a,e)},{cluster:v,labelBBox:w}},`kanbanSection`),swimlane:P},L=new Map,ee=e(async(e,t)=>{let n=await I[t.shape||`rect`](e,t);return L.set(t.id,n),n},`insertCluster`),R=e(()=>{L=new Map},`clear`);function z(e,t){return e.intersect(t)}e(z,`intersectNode`);var te=z;function B(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x0}e(re,`sameSign`);var ie=ne;function W(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return au,`:first-child`);return m.attr(`class`,`anchor`).attr(`style`,g(s)),T(t,m),t.intersect=function(e){return n.info(`Circle intersect`,t,1,e),G.circle(t,1,e)},o}e(K,`anchor`);function ae(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}e(ae,`generateArcPoints`);function oe(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}e(oe,`calculateArcSagitta`);async function se(t,n){let{labelStyles:r,nodeStyles:i}=p(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?16:a,s=n.look===`neo`?12:a,c=e(e=>e+s,`calcTotalHeight`),l=e(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:m}=await C(t,n,E(n)),h=c(n?.height?n?.height:m.height),[g,_]=l(h),v=oe(h,g,_),y=(n?.width?n?.width:m.width)+o*2+v-v,b=h,{cssStyles:x}=n,S=[{x:y/2,y:-b/2},{x:-y/2,y:-b/2},...ae(-y/2,-b/2,-y/2,b/2,g,_,!1),{x:y/2,y:b/2},...ae(y/2,b/2,y/2,-b/2,g,_,!0)],w=d.svg(u),O=f(n,{});n.look!==`handDrawn`&&(O.roughness=0,O.fillStyle=`solid`);let k=D(S),A=w.path(k,O),j=u.insert(()=>A,`:first-child`);return j.attr(`class`,`basic label-container outer-path`),x&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,x),i&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,i),j.attr(`transform`,`translate(${g/2}, 0)`),T(n,j),n.intersect=function(e){return G.polygon(n,S,e)},u}e(se,`bowTieRect`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}e(q,`insertPolygonShape`);var ce=12;async function le(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+ce),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),m=l,h=-u,g=[{x:0+ce,y:h},{x:m,y:h},{x:m,y:0},{x:0,y:0},{x:0,y:h+ce},{x:0+ce,y:h}],_,{cssStyles:v}=t;if(t.look===`handDrawn`){let e=d.svg(s),n=f(t,{}),r=D(g),i=e.path(r,n);_=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),v&&_.attr(`style`,v)}else _=q(s,l,u,g);return r&&_.attr(`style`,r),T(t,_),t.intersect=function(e){return G.polygon(t,g,e)},s}e(le,`card`);function ue(e,t){let{nodeStyles:n}=p(t);t.label=``;let r=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=d.svg(r),c=f(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=D(o),u=s.path(l,c),m=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return G.polygon(t,o,e)},r}e(ue,`choice`);async function de(e,t,r){let{labelStyles:i,nodeStyles:a}=p(t);t.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await C(e,t,E(t)),l=r?.padding??c,u=t.look===`neo`?s.width/2+32:s.width/2+l,m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=d.svg(o),n=f(t,{}),r=e.circle(0,0,u*2,n);m=o.insert(()=>r,`:first-child`),m.attr(`class`,`basic label-container`).attr(`style`,g(h))}else m=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return T(t,m),t.calcIntersect=function(e,t){let n=e.width/2;return G.circle(e,n,t)},t.intersect=function(e){return n.info(`Circle intersect`,t,u,e),G.circle(t,u,e)},o}e(de,`circle`);function fe(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y} + M ${i.x},${i.y} L ${o.x},${o.y}`}e(fe,`createLine`);function pe(e,t){let{labelStyles:r,nodeStyles:i}=p(t);t.labelStyle=r,t.label=``;let a=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:s}=t,c=d.svg(a),l=f(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),m=fe(o),h=c.path(m,l),g=a.insert(()=>u,`:first-child`);return g.insert(()=>h),g.attr(`class`,`outer-path`),s&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,s),i&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,i),T(t,g),t.intersect=function(e){return n.info(`crossedCircle intersect`,t,{radius:o,point:e}),G.circle(t,o,e)},a}e(pe,`crossedCircle`);function J(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iw,`:first-child`).attr(`stroke-opacity`,0),O.insert(()=>x,`:first-child`),O.attr(`class`,`text`),h&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${m}, 0)`),o.attr(`transform`,`translate(${-l/2+m-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,_,e)},i}e(me,`curlyBraceLeft`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iw,`:first-child`).attr(`stroke-opacity`,0),O.insert(()=>x,`:first-child`),O.attr(`class`,`text`),h&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${-m}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,_,e)},i}e(he,`curlyBraceRight`);function X(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iA,`:first-child`).attr(`stroke-opacity`,0),j.insert(()=>S,`:first-child`),j.insert(()=>O,`:first-child`),j.attr(`class`,`text`),h&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,r),j.attr(`transform`,`translate(${m-m/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,j),t.intersect=function(e){return G.polygon(t,v,e)},i}e(ge,`curlyBraces`);async function _e(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),m=u/2,{cssStyles:h}=t,g=d.svg(s),_=f(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=l,y=u,b=v-m,x=y/4,S=[{x:b,y:0},{x,y:0},{x:0,y:y/2},{x,y},{x:b,y},...k(-b,-y/2,m,50,270,90)],w=D(S),O=g.path(w,_),A=s.insert(()=>O,`:first-child`);return A.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&A.selectChildren(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&A.selectChildren(`path`).attr(`style`,r),A.attr(`transform`,`translate(${-l/2}, ${-u/2})`),T(t,A),t.intersect=function(e){return G.polygon(t,S,e)},s}e(_e,`curvedTrapezoid`);var ve=e((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),ye=e((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),be=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),xe=8,Se=8;async function Ce(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-o,t.widtho,`:first-child`),v=s.insert(()=>a,`:first-child`),v.attr(`class`,`basic label-container`),y&&v.attr(`style`,y)}else{let e=ve(0,0,u,_,m,h);v=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,g(y)).attr(`style`,r)}return v.attr(`label-offset-y`,h),v.attr(`transform`,`translate(${-u/2}, ${-(_/2+h)})`),T(t,v),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(e){let n=G.rect(t,e),r=n.x-(t.x??0);if(m!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-h)){let i=h*h*(1-r*r/(m*m));i>0&&(i=Math.sqrt(i)),i=h-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}e(Ce,`cylinder`);async function we(e,t,n){let{labelStyles:r,nodeStyles:i}=p(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await C(e,t,E(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,m,{rx:h,ry:_}=t,{cssStyles:v}=t;if(n?.rx&&n.ry&&(h=n.rx,_=n.ry),t.look===`handDrawn`){let e=d.svg(a),n=f(t,{}),r=h||_?e.path(N(l,u,s,c,h||0),n):e.rectangle(l,u,s,c,n);m=a.insert(()=>r,`:first-child`),m.attr(`class`,`basic label-container`).attr(`style`,g(v))}else m=a.insert(`rect`,`:first-child`),m.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,g(h)).attr(`ry`,g(_)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return T(t,m),t.calcIntersect=function(e,t){return G.rect(e,t)},t.intersect=function(e){return G.rect(t,e)},a}e(we,`drawRect`);async function Te(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await we(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=d.svg(c),n=f(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,p=(Number(l.attr(`height`))||s)??0;return u>0&&p>0&&l.attr(`stroke-dasharray`,`${u} ${p}`),c}e(Te,`datastore`);async function Ee(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=s.width+i,u=s.height+a,m=u*.2,h=-l/2,g=-u/2-m/2,{cssStyles:_}=t,v=d.svg(o),y=f(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=[{x:h,y:g+m},{x:-h,y:g+m},{x:-h,y:-g},{x:h,y:-g},{x:h,y:g},{x:-h,y:g},{x:-h,y:g+m}],x=v.polygon(b.map(e=>[e.x,e.y]),y),S=o.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${h+(t.padding??0)/2-(s.x-(s.left??0))}, ${g+m+(t.padding??0)/2-(s.y-(s.top??0))})`),T(t,S),t.intersect=function(e){return G.rect(t,e)},o}e(Ee,`dividedRectangle`);async function De(e,t){let{labelStyles:r,nodeStyles:i}=p(t),a=t.look===`neo`?12:5;t.labelStyle=r;let o=t.padding??0,s=t.look===`neo`?16:o,{shapeSvg:c,bbox:l}=await C(e,t,E(t)),u=(t?.width?t?.width/2:l.width/2)+(s??0),m=u-a,h,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=d.svg(c),n=f(t,{roughness:.2,strokeWidth:2.5}),r=f(t,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,u*2,n),a=e.circle(0,0,m*2,r);h=c.insert(`g`,`:first-child`),h.attr(`class`,g(t.cssClasses)).attr(`style`,g(_)),h.node()?.appendChild(i),h.node()?.appendChild(a)}else{h=c.insert(`g`,`:first-child`);let e=h.insert(`circle`,`:first-child`),t=h.insert(`circle`);h.attr(`class`,`basic label-container`).attr(`style`,i),e.attr(`class`,`outer-circle`).attr(`style`,i).attr(`r`,u).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,i).attr(`r`,m).attr(`cx`,0).attr(`cy`,0)}return T(t,h),t.intersect=function(e){return n.info(`DoubleCircle intersect`,t,u,e),G.circle(t,u,e)},c}e(De,`doublecircle`);function Oe(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=p(t);t.label=``,t.labelStyle=i;let o=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=d.svg(o),{nodeBorder:l}=r,u=f(t,{fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let m=c.circle(0,0,14,u),h=o.insert(()=>m,`:first-child`);return h.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),s&&s.length>0&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),T(t,h),t.intersect=function(e){return n.info(`filledCircle intersect`,t,{radius:7,point:e}),G.circle(t,7,e)},o}e(Oe,`filledCircle`);var ke=10,Ae=10;async function je(e,t){let{labelStyles:r,nodeStyles:i}=p(t);t.labelStyle=r;let a=t.padding??0,o=t.look===`neo`?a*2:a;(t.width||t.height)&&(t.height=t?.height??0,t.heightx,`:first-child`).attr(`transform`,`translate(${-m/2}, ${m/2})`).attr(`class`,`outer-path`);return _&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,_),i&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,i),t.width=u,t.height=m,T(t,S),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-m/2+(t.padding??0)/2+(c.y-(c.top??0))})`),t.intersect=function(e){return n.info(`Triangle intersect`,t,g,e),G.polygon(t,g,e)},s}e(je,`flippedTriangle`);function Me(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=p(t);t.label=``;let o=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,m=-1*l/2,h=d.svg(o),g=f(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=h.rectangle(u,m,c,l,g),v=o.insert(()=>_,`:first-child`);s&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,a),T(t,v);let y=r?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(e){return G.rect(t,e)},o}e(Me,`forkJoin`);async function Ne(e,t){let{labelStyles:r,nodeStyles:i}=p(t);t.labelStyle=r;let a=t.look===`neo`?16:t.padding??0,o=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10),t.width=(t?.width??0)-a*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width?t?.width:Math.max(15,c.width))+a*2,u=(t?.height?t?.height:Math.max(10,c.height))+o*2,m=u/2,{cssStyles:h}=t,g=d.svg(s),_=f(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=[{x:-l/2,y:-u/2},{x:l/2-m,y:-u/2},...k(-l/2+m,0,m,50,90,270),{x:l/2-m,y:u/2},{x:-l/2,y:u/2}],y=D(v),b=g.path(y,_),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,h),i&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,i),T(t,x),t.intersect=function(e){return n.info(`Pill intersect`,t,{radius:m,point:e}),G.polygon(t,v,e)},s}e(Ne,`halfRoundedRectangle`);var Pe=e((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function Fe(e,t){let{labelStyles:n,nodeStyles:r}=p(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await C(e,t,E(t)),u=(t?.height?t?.height:l.height)+o,m=u/i,h=(t?.width?t?.width:l.width)+2*m+s,g=[{x:m,y:0},{x:h-m,y:0},{x:h,y:-u/2},{x:h-m,y:-u},{x:m,y:-u},{x:0,y:-u/2}],_,{cssStyles:v}=t;if(t.look===`handDrawn`){let e=d.svg(c),n=f(t,{}),r=Pe(0,0,h,u,m),i=e.path(r,n);_=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-h/2}, ${u/2})`),v&&_.attr(`style`,v)}else _=q(c,h,u,g);return r&&_.attr(`style`,r),t.width=h,t.height=u,T(t,_),t.intersect=function(e){return G.polygon(t,g,e)},c}e(Fe,`hexagon`);async function Ie(e,t){let{labelStyles:r,nodeStyles:i}=p(t);t.label=``,t.labelStyle=r;let{shapeSvg:a}=await C(e,t,E(t)),o=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:c}=t,l=d.svg(a),u=f(t,{});t.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let m=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],h=D(m),g=l.path(h,u),_=a.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container outer-path`),c&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,c),i&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,i),_.attr(`transform`,`translate(${-o/2}, ${-s/2})`),T(t,_),t.intersect=function(e){return n.info(`Pill intersect`,t,{points:m}),G.polygon(t,m,e)},a}e(Ie,`hourglass`);async function Le(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=p(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:m,label:g}=await C(e,t,`icon-shape default`),_=t.pos===`t`,v=c,y=c,{nodeBorder:b}=r,{stylesMap:S}=h(t),w=-y/2,E=-v/2,D=t.label?8:0,O=d.svg(u),k=f(t,{stroke:`none`,fill:`none`});t.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`);let A=O.rectangle(w,E,y,v,k),j=Math.max(y,m.width),M=v+m.height+D,N=O.rectangle(-j/2,-M/2,j,M,{...k,fill:`transparent`,stroke:`none`}),P=u.insert(()=>A,`:first-child`),F=u.insert(()=>N);if(t.icon){let e=u.append(`g`);e.html(`${await x(t.icon,{height:c,width:c,fallbackPrefix:``})}`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${_?m.height/2+D/2-i/2-o:-m.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${S.get(`stroke`)??b};`)}return g.attr(`transform`,`translate(${-m.width/2-(m.x-(m.left??0))},${_?-M/2:M/2-m.height})`),P.attr(`transform`,`translate(0,${_?m.height/2+D/2:-m.height/2-D/2})`),T(t,F),t.intersect=function(e){if(n.info(`iconSquare intersect`,t,e),!t.label)return G.rect(t,e);let r=t.x??0,i=t.y??0,a=t.height??0,o=[];return o=_?[{x:r-m.width/2,y:i-a/2},{x:r+m.width/2,y:i-a/2},{x:r+m.width/2,y:i-a/2+m.height+D},{x:r+y/2,y:i-a/2+m.height+D},{x:r+y/2,y:i+a/2},{x:r-y/2,y:i+a/2},{x:r-y/2,y:i-a/2+m.height+D},{x:r-m.width/2,y:i-a/2+m.height+D}]:[{x:r-y/2,y:i-a/2},{x:r+y/2,y:i-a/2},{x:r+y/2,y:i-a/2+v},{x:r+m.width/2,y:i-a/2+v},{x:r+m.width/2/2,y:i+a/2},{x:r-m.width/2,y:i+a/2},{x:r-m.width/2,y:i-a/2+v},{x:r-y/2,y:i-a/2+v}],G.polygon(t,o,e)},u}e(Le,`icon`);async function Re(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=p(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:m,label:g}=await C(e,t,`icon-shape default`),_=t.label?8:0,v=t.pos===`t`,{nodeBorder:y,mainBkg:b}=r,{stylesMap:S}=h(t),w=d.svg(u),E=f(t,{});t.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`),E.stroke=S.get(`fill`)??b;let D=u.append(`g`);t.icon&&D.html(`${await x(t.icon,{height:c,width:c,fallbackPrefix:``})}`);let O=D.node().getBBox(),k=O.width,A=O.height,j=O.x,M=O.y,N=Math.max(k,A)*Math.SQRT2+40,P=w.circle(0,0,N,E),F=Math.max(N,m.width),I=N+m.height+_,L=w.rectangle(-F/2,-I/2,F,I,{...E,fill:`transparent`,stroke:`none`}),ee=u.insert(()=>P,`:first-child`),R=u.insert(()=>L);return D.attr(`transform`,`translate(${-k/2-j},${v?m.height/2+_/2-A/2-M:-m.height/2-_/2-A/2-M})`),D.attr(`style`,`color: ${S.get(`stroke`)??y};`),g.attr(`transform`,`translate(${-m.width/2-(m.x-(m.left??0))},${v?-I/2:I/2-m.height})`),ee.attr(`transform`,`translate(0,${v?m.height/2+_/2:-m.height/2-_/2})`),T(t,R),t.intersect=function(e){return n.info(`iconSquare intersect`,t,e),G.rect(t,e)},u}e(Re,`iconCircle`);async function ze(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=p(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:m,halfPadding:g,label:_}=await C(e,t,`icon-shape default`),v=t.pos===`t`,y=c+g*2,b=c+g*2,{nodeBorder:S,mainBkg:w}=r,{stylesMap:E}=h(t),D=-b/2,O=-y/2,k=t.label?8:0,A=d.svg(u),j=f(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=E.get(`fill`)??w;let M=A.path(N(D,O,b,y,5),j),P=Math.max(b,m.width),F=y+m.height+k,I=A.rectangle(-P/2,-F/2,P,F,{...j,fill:`transparent`,stroke:`none`}),L=u.insert(()=>M,`:first-child`).attr(`class`,`icon-shape2`),ee=u.insert(()=>I);if(t.icon){let e=u.append(`g`);e.html(`${await x(t.icon,{height:c,width:c,fallbackPrefix:``})}`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${v?m.height/2+k/2-i/2-o:-m.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${E.get(`stroke`)??S};`)}return _.attr(`transform`,`translate(${-m.width/2-(m.x-(m.left??0))},${v?-F/2:F/2-m.height})`),L.attr(`transform`,`translate(0,${v?m.height/2+k/2:-m.height/2-k/2})`),T(t,ee),t.intersect=function(e){if(n.info(`iconSquare intersect`,t,e),!t.label)return G.rect(t,e);let r=t.x??0,i=t.y??0,a=t.height??0,o=[];return o=v?[{x:r-m.width/2,y:i-a/2},{x:r+m.width/2,y:i-a/2},{x:r+m.width/2,y:i-a/2+m.height+k},{x:r+b/2,y:i-a/2+m.height+k},{x:r+b/2,y:i+a/2},{x:r-b/2,y:i+a/2},{x:r-b/2,y:i-a/2+m.height+k},{x:r-m.width/2,y:i-a/2+m.height+k}]:[{x:r-b/2,y:i-a/2},{x:r+b/2,y:i-a/2},{x:r+b/2,y:i-a/2+y},{x:r+m.width/2,y:i-a/2+y},{x:r+m.width/2/2,y:i+a/2},{x:r-m.width/2,y:i+a/2},{x:r-m.width/2,y:i-a/2+y},{x:r-b/2,y:i-a/2+y}],G.polygon(t,o,e)},u}e(ze,`iconRounded`);async function Be(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=p(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:m,halfPadding:g,label:_}=await C(e,t,`icon-shape default`),v=t.pos===`t`,y=c+g*2,b=c+g*2,{nodeBorder:S,mainBkg:w}=r,{stylesMap:E}=h(t),D=-b/2,O=-y/2,k=t.label?8:0,A=d.svg(u),j=f(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=E.get(`fill`)??w;let M=A.path(N(D,O,b,y,.1),j),P=Math.max(b,m.width),F=y+m.height+k,I=A.rectangle(-P/2,-F/2,P,F,{...j,fill:`transparent`,stroke:`none`}),L=u.insert(()=>M,`:first-child`),ee=u.insert(()=>I);if(t.icon){let e=u.append(`g`);e.html(`${await x(t.icon,{height:c,width:c,fallbackPrefix:``})}`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${v?m.height/2+k/2-i/2-o:-m.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${E.get(`stroke`)??S};`)}return _.attr(`transform`,`translate(${-m.width/2-(m.x-(m.left??0))},${v?-F/2:F/2-m.height})`),L.attr(`transform`,`translate(0,${v?m.height/2+k/2:-m.height/2-k/2})`),T(t,ee),t.intersect=function(e){if(n.info(`iconSquare intersect`,t,e),!t.label)return G.rect(t,e);let r=t.x??0,i=t.y??0,a=t.height??0,o=[];return o=v?[{x:r-m.width/2,y:i-a/2},{x:r+m.width/2,y:i-a/2},{x:r+m.width/2,y:i-a/2+m.height+k},{x:r+b/2,y:i-a/2+m.height+k},{x:r+b/2,y:i+a/2},{x:r-b/2,y:i+a/2},{x:r-b/2,y:i-a/2+m.height+k},{x:r-m.width/2,y:i-a/2+m.height+k}]:[{x:r-b/2,y:i-a/2},{x:r+b/2,y:i-a/2},{x:r+b/2,y:i-a/2+y},{x:r+m.width/2,y:i-a/2+y},{x:r+m.width/2/2,y:i+a/2},{x:r-m.width/2,y:i+a/2},{x:r-m.width/2,y:i-a/2+y},{x:r-b/2,y:i-a/2+y}],G.polygon(t,o,e)},u}e(Be,`iconSquare`);async function Ve(e,t,{config:{flowchart:r}}){let i=new Image;i.src=t?.img??``,await i.decode();let a=Number(i.naturalWidth.toString().replace(`px`,``)),o=Number(i.naturalHeight.toString().replace(`px`,``));t.imageAspectRatio=a/o;let{labelStyles:s}=p(t);t.labelStyle=s;let c=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;let l=Math.max(t.label?c??0:0,t?.assetWidth??a),u=t.constraint===`on`&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,m=t.constraint===`on`?u/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(u,c??0);let{shapeSvg:h,bbox:g,label:_}=await C(e,t,`image-shape default`),v=t.pos===`t`,y=-u/2,b=-m/2,x=t.label?8:0,S=d.svg(h),w=f(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let E=S.rectangle(y,b,u,m,w),D=Math.max(u,g.width),O=m+g.height+x,k=S.rectangle(-D/2,-O/2,D,O,{...w,fill:`none`,stroke:`none`}),A=h.insert(()=>E,`:first-child`),j=h.insert(()=>k);if(t.img){let e=h.append(`image`);e.attr(`href`,t.img),e.attr(`width`,u),e.attr(`height`,m),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${v?O/2-m:-O/2})`)}return _.attr(`transform`,`translate(${-g.width/2-(g.x-(g.left??0))},${v?-m/2-g.height/2-x/2:m/2-g.height/2+x/2})`),A.attr(`transform`,`translate(0,${v?g.height/2+x/2:-g.height/2-x/2})`),T(t,j),t.intersect=function(e){if(n.info(`iconSquare intersect`,t,e),!t.label)return G.rect(t,e);let r=t.x??0,i=t.y??0,a=t.height??0,o=[];return o=v?[{x:r-g.width/2,y:i-a/2},{x:r+g.width/2,y:i-a/2},{x:r+g.width/2,y:i-a/2+g.height+x},{x:r+u/2,y:i-a/2+g.height+x},{x:r+u/2,y:i+a/2},{x:r-u/2,y:i+a/2},{x:r-u/2,y:i-a/2+g.height+x},{x:r-g.width/2,y:i-a/2+g.height+x}]:[{x:r-u/2,y:i-a/2},{x:r+u/2,y:i-a/2},{x:r+u/2,y:i-a/2+m},{x:r+g.width/2,y:i-a/2+m},{x:r+g.width/2/2,y:i+a/2},{x:r-g.width/2,y:i+a/2},{x:r-g.width/2,y:i-a/2+m},{x:r-u/2,y:i-a/2+m}],G.polygon(t,o,e)},h}e(Ve,`imageSquare`);async function He(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=Math.max(c.width+(o??0)*2,t?.width??0),u=Math.max(c.height+(a??0)*2,t?.height??0),m=[{x:0,y:0},{x:l,y:0},{x:l+3*u/6,y:-u},{x:-3*u/6,y:-u}],h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=d.svg(s),n=f(t,{}),r=D(m),i=e.path(r,n);h=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),g&&h.attr(`style`,g)}else h=q(s,l,u,m);return r&&h.attr(`style`,r),t.width=l,t.height=u,T(t,h),t.intersect=function(e){return G.polygon(t,m,e)},s}e(He,`inv_trapezoid`);async function Ue(e,t){let{shapeSvg:n,bbox:r,label:i}=await C(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),T(t,a),t.intersect=function(e){return G.rect(t,e)},n}e(Ue,`labelRect`);async function We(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,m=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=d.svg(s),n=f(t,{}),r=D(m),i=e.path(r,n);h=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),g&&h.attr(`style`,g)}else h=q(s,u,l,m);return r&&h.attr(`style`,r),t.width=u,t.height=l,T(t,h),t.intersect=function(e){return G.polygon(t,m,e)},s}e(We,`lean_left`);async function Ge(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,m=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=d.svg(s),n=f(t,{}),r=D(m),i=e.path(r,n);h=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),g&&h.attr(`style`,g)}else h=q(s,u,l,m);return r&&h.attr(`style`,r),t.width=u,t.height=l,T(t,h),t.intersect=function(e){return G.polygon(t,m,e)},s}e(Ge,`lean_right`);function Ke(e,t){let{labelStyles:r,nodeStyles:i}=p(t);t.label=``,t.labelStyle=r;let a=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:o}=t,s=Math.max(35,t?.width??0),c=Math.max(35,t?.height??0),l=[{x:s,y:0},{x:0,y:c+7/2},{x:s-14,y:c+7/2},{x:0,y:2*c},{x:s,y:c-7/2},{x:14,y:c-7/2}],u=d.svg(a),m=f(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=D(l),g=u.path(h,m),_=a.insert(()=>g,`:first-child`);return _.attr(`class`,`outer-path`),o&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,o),i&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,i),_.attr(`transform`,`translate(-${s/2},${-c})`),T(t,_),t.intersect=function(e){return n.info(`lightningBolt intersect`,t,e),G.polygon(t,l,e)},a}e(Ke,`lightningBolt`);var qe=e((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),Je=e((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),Ye=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Xe=10,Ze=10;async function Qe(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.widtho,`:first-child`).attr(`class`,`line`),y=s.insert(()=>a,`:first-child`),y.attr(`class`,`basic label-container`),b&&y.attr(`style`,b)}else{let e=qe(0,0,u,_,m,h,v);y=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,g(b)).attr(`style`,r)}return y.attr(`label-offset-y`,h),y.attr(`transform`,`translate(${-u/2}, ${-(_/2+h)})`),T(t,y),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+h-(c.y-(c.top??0))})`),t.intersect=function(e){let n=G.rect(t,e),r=n.x-(t.x??0);if(m!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-h)){let i=h*h*(1-r*r/(m*m));i>0&&(i=Math.sqrt(i)),i=h-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}e(Qe,`linedCylinder`);async function $e(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,m=(t?.height?t?.height:c.height)+(o??0)*2,h=t.look===`neo`?m/4:m/8,g=m+h,{cssStyles:_}=t,v=d.svg(s),y=f(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=[{x:-u/2-u/2*.1,y:-g/2},{x:-u/2-u/2*.1,y:g/2},...O(-u/2-u/2*.1,g/2,u/2+u/2*.1,g/2,h,.8),{x:u/2+u/2*.1,y:-g/2},{x:-u/2-u/2*.1,y:-g/2},{x:-u/2,y:-g/2},{x:-u/2,y:g/2*1.1},{x:-u/2,y:-g/2}],x=v.polygon(b.map(e=>[e.x,e.y]),y),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,r),S.attr(`transform`,`translate(0,${-h/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-m/2+(t.padding??0)-h/2-(c.y-(c.top??0))})`),T(t,S),t.intersect=function(e){return G.polygon(t,b,e)},s}e($e,`linedWaveEdgedRect`);async function et(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await C(e,t,E(t)),m=(t?.width?t?.width:l.width)+a*2+2*s,h=(t?.height?t?.height:l.height)+o*2+2*s,g=m-2*s,_=h-2*s,v=-g/2,y=-_/2,{cssStyles:b}=t,x=d.svg(c),S=f(t,{}),w=[{x:v-s,y:y+s},{x:v-s,y:y+_+s},{x:v+g-s,y:y+_+s},{x:v+g-s,y:y+_},{x:v+g,y:y+_},{x:v+g,y:y+_-s},{x:v+g+s,y:y+_-s},{x:v+g+s,y:y-s},{x:v+s,y:y-s},{x:v+s,y},{x:v,y},{x:v,y:y+s}],O=[{x:v,y:y+s},{x:v+g-s,y:y+s},{x:v+g-s,y:y+_},{x:v+g,y:y+_},{x:v+g,y},{x:v,y}];t.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let k=D(w),j=x.path(k,S),M=D(O),N=x.path(M,S);t.look!==`handDrawn`&&(j=A(j),N=A(N));let P=c.insert(`g`,`:first-child`);return P.insert(()=>j),P.insert(()=>N),P.attr(`class`,`basic label-container outer-path`),b&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,b),r&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),T(t,P),t.intersect=function(e){return G.polygon(t,w,e)},c}e(et,`multiRect`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let m=Math.max(a.width,t?.width??0)+c*2,h=Math.max(a.height,t?.height??0)+l*3,g=t.look===`neo`?h/4:h/8,_=h+(u?g/2:-g/2),v=-m/2,y=-_/2,{cssStyles:b}=t,x=O(v-10,y+_+10,v+m-10,y+_+10,g,.8),S=x?.[x.length-1],w=[{x:v-10,y:y+10},{x:v-10,y:y+_+10},...x,{x:v+m-10,y:S.y-10},{x:v+m,y:S.y-10},{x:v+m,y:S.y-20},{x:v+m+10,y:S.y-20},{x:v+m+10,y:y-10},{x:v+10,y:y-10},{x:v+10,y},{x:v,y},{x:v,y:y+10}],k=[{x:v,y:y+10},{x:v+m-10,y:y+10},{x:v+m-10,y:S.y-10},{x:v+m,y:S.y-10},{x:v+m,y},{x:v,y}],A=d.svg(i),j=f(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`);let M=D(w),N=A.path(M,j),P=D(k),F=A.path(P,j),I=i.insert(()=>N,`:first-child`);return I.insert(()=>F),I.attr(`class`,`basic label-container outer-path`),b&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,b),r&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,r),I.attr(`transform`,`translate(0,${-g/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-g/2-(a.y-(a.top??0))})`),T(t,I),t.intersect=function(e){return G.polygon(t,w,e)},i}e(tt,`multiWaveEdgedRectangle`);async function nt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:a}=p(t);t.labelStyle=r,t.useHtmlLabels||i(l())||(t.centerLabel=!0);let{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),u=Math.max(s.width+(t.padding??0)*2,t?.width??0),m=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=-u/2,g=-m/2,{cssStyles:_}=t,v=d.svg(o),y=f(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=v.rectangle(h,g,u,m,y),x=o.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),c.attr(`class`,`label noteLabel`),_&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,_),a&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,a),c.attr(`transform`,`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),T(t,x),t.intersect=function(e){return G.rect(t,e)},o}e(nt,`note`);var rt=e((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function it(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=d.svg(i),n=f(t,{}),r=rt(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=q(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),T(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=G.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}e(it,`question`);async function at(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width??c.width)+(t.look===`neo`?a*2:a),m=(t?.height??c.height)+(t.look===`neo`?o*2:o),h=-u/2,g=-m/2,_=g/2,v=[{x:h+_,y:g},{x:h,y:0},{x:h+_,y:-g},{x:-h,y:-g},{x:-h,y:g}],{cssStyles:y}=t,b=d.svg(s),x=f(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=D(v),w=b.path(S,x),O=s.insert(()=>w,`:first-child`);return O.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${-_/2},0)`),l.attr(`transform`,`translate(${-_/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,v,e)},s}e(at,`rect_left_inv_arrow`);async function ot(e,a){let{labelStyles:o,nodeStyles:s}=p(a);a.labelStyle=o;let c;c=a.cssClasses?`node `+a.cssClasses:`node default`;let l=e.insert(`g`).attr(`class`,c).attr(`id`,a.domId||a.id),u=l.insert(`g`),m=l.insert(`g`).attr(`class`,`label`).attr(`style`,s),h=a.description,g=a.label,_=await M(m,g,a.labelStyle,!0,!0),v={width:0,height:0};if(i(r())){let e=_.children[0],n=t(_);v=e.getBoundingClientRect(),n.attr(`width`,v.width),n.attr(`height`,v.height)}n.info(`Text 2`,h);let y=h||[],b=_.getBBox(),x=await M(m,Array.isArray(y)?y.join(`
    `):y,a.labelStyle,!0,!0),S=x.children[0],C=t(x);v=S.getBoundingClientRect(),C.attr(`width`,v.width),C.attr(`height`,v.height);let w=(a.padding||0)/2;t(x).attr(`transform`,`translate( `+(v.width>b.width?0:(b.width-v.width)/2)+`, `+(b.height+w+5)+`)`),t(_).attr(`transform`,`translate( `+(v.width(n.debug(`Rough node insert CXC`,r),i),`:first-child`),A=l.insert(()=>(n.debug(`Rough node insert CXC`,r),r),`:first-child`)}else A=u.insert(`rect`,`:first-child`),j=u.insert(`line`),A.attr(`class`,`outer title-state`).attr(`style`,s).attr(`x`,-v.width/2-w).attr(`y`,-v.height/2-w).attr(`width`,v.width+(a.padding||0)).attr(`height`,v.height+(a.padding||0)),j.attr(`class`,`divider`).attr(`x1`,-v.width/2-w).attr(`x2`,v.width/2+w).attr(`y1`,-v.height/2-w+b.height+w).attr(`y2`,-v.height/2-w+b.height+w);return T(a,A),a.intersect=function(e){return G.rect(a,e)},l}e(ot,`rectWithTitle`);async function st(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return we(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}e(st,`roundedRect`);var Z=8;async function ct(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?Z:Z*2),u=(t?.height??s.height)+a*2,m=l-Z,h=u,_=Z-l/2,v=-u/2,{cssStyles:y}=t,b=d.svg(o),x=f(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=[{x:_,y:v},{x:_+m,y:v},{x:_+m,y:v+h},{x:_-Z,y:v+h},{x:_-Z,y:v},{x:_,y:v},{x:_,y:v+h}],w=b.polygon(S.map(e=>[e.x,e.y]),x),D=o.insert(()=>w,`:first-child`);return D.attr(`class`,`basic label-container outer-path`).attr(`style`,g(y)),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),y&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${Z/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),T(t,D),t.intersect=function(e){return G.rect(t,e)},o}e(ct,`shadedProcess`);async function lt(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+a*2,m=((t?.height?t?.height:c.height)+o*2)*1.5,h=u,g=m/1.5,_=-h/2,v=-g/2,{cssStyles:y}=t,b=d.svg(s),x=f(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=[{x:_,y:v},{x:_,y:v+g},{x:_+h,y:v+g},{x:_+h,y:v-g/2}],w=D(S),O=b.path(w,x),k=s.insert(()=>O,`:first-child`);return k.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,r),k.attr(`transform`,`translate(0, ${g/4})`),l.attr(`transform`,`translate(${-h/2+(t.padding??0)-(c.x-(c.left??0))}, ${-g/4+(t.padding??0)-(c.y-(c.top??0))})`),T(t,k),t.intersect=function(e){return G.polygon(t,S,e)},s}e(lt,`slopedRect`);async function ut(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return we(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}e(ut,`squareRect`);async function dt(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),m=l/2,{cssStyles:h}=t,g=d.svg(s),_=f(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=[{x:-u/2+m,y:-l/2},{x:u/2-m,y:-l/2},...k(-u/2+m,0,m,50,90,270),{x:u/2-m,y:l/2},...k(u/2-m,0,m,50,270,450)],y=D(v),b=g.path(y,_),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,r),T(t,x),t.intersect=function(e){return G.polygon(t,v,e)},s}e(dt,`stadium`);async function ft(e,t){return we(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}e(ft,`state`);function pt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=p(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),m=d.svg(u),h=f(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=m.circle(0,0,t.width,{...h,stroke:o,strokeWidth:2}),_=s??c,v=(t.width??0)*5/14,y=m.circle(0,0,v,{...h,fill:_,stroke:_,strokeWidth:2,fillStyle:`solid`}),b=u.insert(()=>g,`:first-child`);if(b.insert(()=>y),t.look!==`handDrawn`&&b.attr(`class`,`outer-path`),a&&b.selectAll(`path`).attr(`style`,a),i&&b.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;b.attr(`style`,`filter:url(#${n})`)}return T(t,b),t.intersect=function(e){return G.circle(t,(t.width??0)/2,e)},u}e(pt,`stateEnd`);function mt(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=d.svg(a).circle(0,0,t.width,m(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return T(t,o),t.intersect=function(e){return G.circle(t,(t.width??7)/2,e)},a}e(mt,`stateStart`);var ht=8;async function gt(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width??c.width)+2*ht+a,u=(t?.height??c.height)+o,m=l-2*ht,h=u,_=-l/2,v=-u/2,y=[{x:0,y:0},{x:m,y:0},{x:m,y:-h},{x:0,y:-h},{x:0,y:0},{x:-8,y:0},{x:m+8,y:0},{x:m+8,y:-h},{x:-8,y:-h},{x:-8,y:0}];if(t.look===`handDrawn`){let e=d.svg(s),n=f(t,{}),r=e.rectangle(_,v,m+16,h,n),i=e.line(_+ht,v,_+ht,v+h,n),a=e.line(_+ht+m,v,_+ht+m,v+h,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,g(c)),T(t,o)}else{let e=q(s,m,h,y);r&&e.attr(`style`,r),T(t,e)}return t.intersect=function(e){return G.polygon(t,y,e)},s}e(gt,`subroutine`);var _t=.2;async function vt(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-_t*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height?t?.height:c.height)+o*2,u=_t*l,m=_t*l,h=(t?.width?t?.width:c.width)+a*2+u-u,g=l,_=-h/2,v=-g/2,{cssStyles:y}=t,b=d.svg(s),x=f(t,{}),S=[{x:_-u/2,y:v},{x:_+h+u/2,y:v},{x:_+h+u/2,y:v+g},{x:_-u/2,y:v+g}],w=[{x:_+h-u/2,y:v+g},{x:_+h+u/2,y:v+g},{x:_+h+u/2,y:v+g-m}];t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let O=D(S),k=b.path(O,x),A=D(w),j=b.path(A,{...x,fillStyle:`solid`}),M=s.insert(()=>j,`:first-child`);return M.insert(()=>k,`:first-child`),M.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),T(t,M),t.intersect=function(e){return G.polygon(t,S,e)},s}e(vt,`taggedRect`);async function yt(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,m=.2*c,h=c+l,{cssStyles:g}=t,_=d.svg(i),v=f(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:-s/2-s/2*.1,y:h/2},...O(-s/2-s/2*.1,h/2,s/2+s/2*.1,h/2,l,.8),{x:s/2+s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:-h/2}],b=-s/2+s/2*.1,x=-h/2-m*.4,S=[{x:b+s-u,y:(x+c)*1.3},{x:b+s,y:x+c-m},{x:b+s,y:(x+c)*.9},...O(b+s,(x+c)*1.25,b+s-u,(x+c)*1.3,-c*.02,.5)],w=D(y),k=_.path(w,v),A=D(S),j=_.path(A,{...v,fillStyle:`solid`}),M=i.insert(()=>j,`:first-child`);return M.insert(()=>k,`:first-child`),M.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),M.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),T(t,M),t.intersect=function(e){return G.polygon(t,y,e)},i}e(yt,`taggedWaveEdgedRectangle`);async function bt(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),T(t,u),t.intersect=function(e){return G.rect(t,e)},i}e(bt,`text`);var xt=e((e,t,n,r,i,a)=>`M${e},${t} + a${i},${a} 0,0,1 0,${-r} + l${n},0 + a${i},${a} 0,0,1 0,${r} + M${n},${-r} + a${i},${a} 0,0,0 0,${r} + l${-n},0`,`createCylinderPathD`),St=e((e,t,n,r,i,a)=>[`M${e},${t}`,`M${e+n},${t}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(` `),`createOuterCylinderPathD`),Ct=e((e,t,n,r,i,a)=>[`M${e+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(` `),`createInnerCylinderPathD`),wt=5,Tt=10;async function Et(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?12:i/2;if(t.width||t.height){let e=t.height??0;t.height=(t.height??0)-a,t.heighta,`:first-child`),v=o.insert(()=>i,`:first-child`),v.attr(`class`,`basic label-container`),_&&v.attr(`style`,_)}else{let e=xt(0,0,h,l,m,u);v=o.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,g(_)).attr(`style`,r),v.attr(`class`,`basic label-container outer-path`),_&&v.selectAll(`path`).attr(`style`,_),r&&v.selectAll(`path`).attr(`style`,r)}return v.attr(`label-offset-x`,m),v.attr(`transform`,`translate(${-h/2}, ${l/2} )`),c.attr(`transform`,`translate(${-(s.width/2)-m-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),T(t,v),t.intersect=function(e){let n=G.rect(t,e),r=n.y-(t.y??0);if(u!=0&&(Math.abs(r)<(t.height??0)/2||Math.abs(r)==(t.height??0)/2&&Math.abs(n.x-(t.x??0))>(t.width??0)/2-m)){let i=m*m*(1-r*r/(u*u));i!=0&&(i=Math.sqrt(Math.abs(i))),i=m-i,e.x-(t.x??0)>0&&(i=-i),n.x+=i}return n},o}e(Et,`tiltedCylinder`);async function Dt(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=(t.look,i),o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,m=[{x:-3*l/6,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:0,y:-l}],h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=d.svg(s),n=f(t,{}),r=D(m),i=e.path(r,n);h=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),g&&h.attr(`style`,g)}else h=q(s,u,l,m);return r&&h.attr(`style`,r),t.width=u,t.height=l,T(t,h),t.intersect=function(e){return G.polygon(t,m,e)},s}e(Dt,`trapezoid`);async function Ot(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<5&&(t.height=5),t.width=(t.width??0)-a*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o*2,{cssStyles:m}=t,h=d.svg(s),g=f(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-l/2*.8,y:-u/2},{x:l/2*.8,y:-u/2},{x:l/2,y:-u/2*.6},{x:l/2,y:u/2},{x:-l/2,y:u/2},{x:-l/2,y:-u/2*.6}],v=D(_),y=h.path(v,g),b=s.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,r),T(t,b),t.intersect=function(e){return G.polygon(t,_,e)},s}e(Ot,`trapezoidalPentagon`);var kt=10,At=10;async function jt(e,t){let{labelStyles:i,nodeStyles:a}=p(t);t.labelStyle=i;let o=t.padding??0,s=t.look===`neo`?o*2:o;(t.width||t.height)&&(t.width=((t?.width??0)-s)/2,t.widthO,`:first-child`).attr(`transform`,`translate(${-_/2}, ${_/2})`).attr(`class`,`outer-path`);return b&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,b),a&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,a),t.width=g,t.height=_,T(t,k),m.attr(`transform`,`translate(${-l.width/2-(l.x-(l.left??0))}, ${_/2-(l.height+(t.padding??0)/(h?2:1)-(l.y-(l.top??0)))})`),t.intersect=function(e){return n.info(`Triangle intersect`,t,y,e),G.polygon(t,y,e)},c}e(jt,`triangle`);async function Mt(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=!0;(t.width||t.height)&&(s=!1,t.width=(t?.width??0)-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:c,bbox:l,label:u}=await C(e,t,E(t)),m=(t?.width?t?.width:l.width)+(a??0)*2,h=(t?.height?t?.height:l.height)+(o??0)*2,g=t.look===`neo`?h/4:h/8,_=h+(s?g:-g),{cssStyles:v}=t,y=14-m,b=y>0?y/2:0,x=d.svg(c),S=f(t,{});t.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let w=[{x:-m/2-b,y:_/2},...O(-m/2-b,_/2,m/2+b,_/2,g,.8),{x:m/2+b,y:-_/2},{x:-m/2-b,y:-_/2}],k=D(w),A=x.path(k,S),j=c.insert(()=>A,`:first-child`);return j.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,r),j.attr(`transform`,`translate(0,${-g/2})`),u.attr(`transform`,`translate(${-m/2+(t.padding??0)-(l.x-(l.left??0))},${-h/2+(t.padding??0)-g-(l.y-(l.top??0))})`),T(t,j),t.intersect=function(e){return G.polygon(t,w,e)},c}e(Mt,`waveEdgedRectangle`);async function Nt(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?20:i;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);let e=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-20/9*e),t.width-=a*2}let{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o,m=u/8,h=u+m*2,{cssStyles:g}=t,_=d.svg(s),v=f(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:-l/2,y:h/2},...O(-l/2,h/2,l/2,h/2,m,1),{x:l/2,y:-h/2},...O(l/2,-h/2,-l/2,-h/2,m,-1)],b=D(y),x=_.path(b,v),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container`),g&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,r),T(t,S),t.intersect=function(e){return G.polygon(t,y,e)},s}e(Nt,`waveRectangle`);var Q=10;async function Pt(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-i*2-Q,10),t.height=Math.max((t?.height??0)-a*2-Q,10));let{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=(t?.width?t?.width:s.width)+i*2+Q,u=(t?.height?t?.height:s.height)+a*2+Q,m=l-Q,h=u-Q,g=-m/2,_=-h/2,{cssStyles:v}=t,y=d.svg(o),b=f(t,{}),x=[{x:g-Q,y:_-Q},{x:g-Q,y:_+h},{x:g+m,y:_+h},{x:g+m,y:_-Q}],S=`M${g-Q},${_-Q} L${g+m},${_-Q} L${g+m},${_+h} L${g-Q},${_+h} L${g-Q},${_-Q} + M${g-Q},${_} L${g+m},${_} + M${g},${_-Q} L${g},${_+h}`;t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let w=y.path(S,b),D=o.insert(()=>w,`:first-child`);return D.attr(`transform`,`translate(${Q/2}, ${Q/2})`),D.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${-(s.width/2)+Q/2-(s.x-(s.left??0))}, ${-(s.height/2)+Q/2-(s.y-(s.top??0))})`),T(t,D),t.intersect=function(e){return G.polygon(t,x,e)},o}e(Pt,`windowPane`);var Ft=new Set([`redux-color`,`redux-dark-color`]),It=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]);async function Lt(e,n){let r=n;r.alias&&(n.label=r.alias);let{theme:i,themeVariables:a}=l(),{rowEven:o,rowOdd:s,nodeBorder:c,borderColorArray:m}=a;if(n.look===`handDrawn`){let{themeVariables:t}=l(),{background:r}=t;await Lt(e,{...n,id:n.id+`-background`,domId:(n.domId||n.id)+`-background`,look:`default`,cssStyles:[`stroke: none`,`fill: ${r}`]})}let h=l();n.useHtmlLabels=h.htmlLabels;let g=h.er?.diagramPadding??10,_=h.er?.entityPadding??6,{cssStyles:y}=n,{labelStyles:b,nodeStyles:x}=p(n);if(r.attributes.length===0&&n.label){let t={rx:0,ry:0,labelPaddingX:g,labelPaddingY:g*1.5,classes:``};v(n.label,h)+t.labelPaddingX*20){let e=w.width+g*2-(A+j+M+N);A+=e/I,j+=e/I,M>0&&(M+=e/I),N>0&&(N+=e/I)}let ee=A+j+M+N,R=d.svg(C),z=f(n,{});n.look!==`handDrawn`&&(z.roughness=0,z.fillStyle=`solid`);let te=0;k.length>0&&(te=k.reduce((e,t)=>e+(t?.rowHeight??0),0));let B=Math.max(L.width+g*2,n?.width||0,ee),V=Math.max((te??0)+w.height,n?.height||0),H=-B/2,U=-V/2;if(C.selectAll(`g:not(:first-child)`).each((e,n,r)=>{let i=t(r[n]),a=i.attr(`transform`),o=0,s=0;if(a){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(o=parseFloat(e[1]),s=parseFloat(e[2]),i.attr(`class`).includes(`attribute-name`)?o+=A:i.attr(`class`).includes(`attribute-keys`)?o+=A+j:i.attr(`class`).includes(`attribute-comment`)&&(o+=A+j+M))}i.attr(`transform`,`translate(${H+g/2+o}, ${s+U+w.height+_/2})`)}),C.select(`.name`).attr(`transform`,`translate(`+-w.width/2+`, `+(U+_/2)+`)`),i!=null&&Ft.has(i)){let e=r.colorIndex??0;C.attr(`data-color-id`,`color-${e%m.length}`)}let ne=R.rectangle(H,U,B,V,z),re=C.insert(()=>ne,`:first-child`).attr(`class`,`outer-path`).attr(`style`,y.join(``));O.push(0);for(let[e,t]of k.entries()){let n=(e+1)%2==0&&t.yOffset!==0,r=R.rectangle(H,w.height+U+t?.yOffset,B,t?.rowHeight,{...z,fill:n?o:s,stroke:c});C.insert(()=>r,`g.label`).attr(`style`,y.join(``)).attr(`class`,`row-rect-${n?`even`:`odd`}`)}let ie=1e-4,W=zt(H,w.height+U,B+H,w.height+U,ie),K=R.polygon(W.map(e=>[e.x,e.y]),z);if(C.insert(()=>K).attr(`class`,`divider`),W=zt(A+H,w.height+U,A+H,V+U,ie),K=R.polygon(W.map(e=>[e.x,e.y]),z),C.insert(()=>K).attr(`class`,`divider`),P){let e=A+j+H;W=zt(e,w.height+U,e,V+U,ie),K=R.polygon(W.map(e=>[e.x,e.y]),z),C.insert(()=>K).attr(`class`,`divider`)}if(F){let e=A+j+M+H;W=zt(e,w.height+U,e,V+U,ie),K=R.polygon(W.map(e=>[e.x,e.y]),z),C.insert(()=>K).attr(`class`,`divider`)}for(let e of O){let t=w.height+U+e;W=zt(H,t,B+H,t,ie),K=R.polygon(W.map(e=>[e.x,e.y]),z),C.insert(()=>K).attr(`class`,`divider`)}if(T(n,re),x&&n.look!==`handDrawn`){if(i!=null&&It.has(i))C.selectAll(`path`).attr(`style`,x);else{let e=x.split(`;`)?.filter(e=>e.includes(`stroke`))?.map(e=>`${e}`).join(`; `);C.selectAll(`path`).attr(`style`,e??``),C.selectAll(`.row-rect-even path`).attr(`style`,x)}}return n.intersect=function(e){return G.rect(n,e)},C}e(Lt,`erBox`);async function Rt(e,n,r,i=0,a=0,s=[],c=``){let l=e.insert(`g`).attr(`class`,`label ${s.join(` `)}`).attr(`transform`,`translate(${i}, ${a})`).attr(`style`,c);n!==o(n)&&(n=o(n),n=n.replaceAll(`<`,`<`).replaceAll(`>`,`>`));let d=l.node().appendChild(await S(l,n,{width:v(n,r)+100,style:c,useHtmlLabels:r.htmlLabels},r));if(n.includes(`<`)||n.includes(`>`)){let e=d.children[0];for(e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`);e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`)}let f=d.getBBox();if(u(r.htmlLabels)){let e=d.children[0];e.style.textAlign=`start`;let n=t(d);f=e.getBoundingClientRect(),n.attr(`width`,f.width),n.attr(`height`,f.height)}return f}e(Rt,`addText`);function zt(e,t,n,r,i){return e===n?[{x:e-i/2,y:t},{x:e+i/2,y:t},{x:n+i/2,y:r},{x:n-i/2,y:r}]:[{x:e,y:t-i/2},{x:e,y:t+i/2},{x:n,y:r+i/2},{x:n,y:r-i/2}]}e(zt,`lineToPolygon`);async function Bt(e,t,n,r,i=n.class.padding??12){let a=r?0:3,o=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId||t.id),s=null,c=null,l=null,u=null,d=0,f=0,p=0;if(s=o.insert(`g`).attr(`class`,`annotation-group text`),t.annotations.length>0){let e=t.annotations[0];await Vt(s,{text:`\xAB${e}\xBB`},0),d=s.node().getBBox().height}c=o.insert(`g`).attr(`class`,`label-group text`),await Vt(c,t,0,[`font-weight: bolder`]);let m=c.node().getBBox();f=m.height,l=o.insert(`g`).attr(`class`,`members-group text`);let h=0;for(let e of t.members){let t=await Vt(l,e,h,[e.parseClassifier()]);h+=t+a}p=l.node().getBBox().height,p<=0&&(p=i/2),u=o.insert(`g`).attr(`class`,`methods-group text`);let g=0;for(let e of t.methods){let t=await Vt(u,e,g,[e.parseClassifier()]);g+=t+a}let _=o.node().getBBox();if(s!==null){let e=s.node().getBBox();s.attr(`transform`,`translate(${-e.width/2})`)}return c.attr(`transform`,`translate(${-m.width/2}, ${d})`),_=o.node().getBBox(),l.attr(`transform`,`translate(0, ${d+f+i*2})`),_=o.node().getBBox(),u.attr(`transform`,`translate(0, ${d+f+(p?p+i*4:i*2)})`),_=o.node().getBBox(),{shapeSvg:o,bbox:_}}e(Bt,`textHelper`);async function Vt(n,r,i,a=[]){let o=n.insert(`g`).attr(`class`,`label`).attr(`style`,a.join(`; `)),d=l(),f=`useHtmlLabels`in r?r.useHtmlLabels:u(d.htmlLabels)??!0,p=``;p=`text`in r?r.text:r.label,!f&&p.startsWith(`\\`)&&(p=p.substring(1)),c(p)&&(f=!0);let m=await S(o,s(_(p)),{width:v(p,d)+50,classes:`markdown-node-label`,useHtmlLabels:f},d),h,g=1;if(f){let n=m.children[0],r=t(m);g=n.innerHTML.split(`
    `).length,n.innerHTML.includes(``)&&(g+=n.innerHTML.split(``).length-1);let i=n.getElementsByTagName(`img`);if(i){let t=p.replace(/]*>/g,``).trim()===``;await Promise.all([...i].map(n=>new Promise(r=>{function i(){if(n.style.display=`flex`,n.style.flexDirection=`column`,t){let e=d.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,t=parseInt(e,10)*5+`px`;n.style.minWidth=t,n.style.maxWidth=t}else n.style.width=`100%`;r(n)}e(i,`setupImage`),setTimeout(()=>{n.complete&&i()}),n.addEventListener(`error`,i),n.addEventListener(`load`,i)})))}h=n.getBoundingClientRect(),r.attr(`width`,h.width),r.attr(`height`,h.height)}else{a.includes(`font-weight: bolder`)&&t(m).selectAll(`tspan`).attr(`font-weight`,``),g=m.children.length;let e=m.children[0];(m.textContent===``||m.textContent.includes(`>`))&&(e.textContent=p[0]+p.substring(1).replaceAll(`>`,`>`).replaceAll(`<`,`<`).trim(),p[1]===` `&&(e.textContent=e.textContent[0]+` `+e.textContent.substring(1))),e.textContent===`undefined`&&(e.textContent=``),h=m.getBBox()}return o.attr(`transform`,`translate(0,`+(-h.height/(2*g)+i)+`)`),h.height}e(Vt,`addText`);async function Ht(e,n){let i=r(),{themeVariables:a}=i,{useGradient:o}=a,s=i.class.padding??12,c=s,l=n.useHtmlLabels??u(i.htmlLabels)??!0,m=n;m.annotations=m.annotations??[],m.members=m.members??[],m.methods=m.methods??[];let{shapeSvg:h,bbox:g}=await Bt(e,n,i,l,c),{labelStyles:_,nodeStyles:v}=p(n);n.labelStyle=_,n.cssStyles=m.styles||``;let y=m.styles?.join(`;`)||v||``;n.cssStyles||=y.replaceAll(`!important`,``).split(`;`);let b=m.members.length===0&&m.methods.length===0&&!i.class?.hideEmptyMembersBox,x=d.svg(h),S=f(n,{});n.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let C=Math.max(n.width??0,g.width),w=Math.max(n.height??0,g.height),E=(n.height??0)>g.height;m.members.length===0&&m.methods.length===0?w+=c:m.members.length>0&&m.methods.length===0&&(w+=c*2);let D=-C/2,O=-w/2,k=b?s*2:m.members.length===0&&m.methods.length===0?-s:0;E&&(k=s*2);let A=x.rectangle(D-s,O-s-(b?s:m.members.length===0&&m.methods.length===0?-s/2:0),C+2*s,w+2*s+k,S),j=h.insert(()=>A,`:first-child`);j.attr(`class`,`basic label-container outer-path`);let M=j.node().getBBox(),N=h.select(`.annotation-group`).node().getBBox().height-(b?s/2:0)||0,P=h.select(`.label-group`).node().getBBox().height-(b?s/2:0)||0,F=h.select(`.members-group`).node().getBBox().height-(b?s/2:0)||0,I=(N+P+O+s-(O-s-(b?s:m.members.length===0&&m.methods.length===0?-s/2:0)))/2;if(h.selectAll(`.text`).each((e,n,r)=>{let a=t(r[n]),o=a.attr(`transform`),u=0;if(o){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);e&&(u=parseFloat(e[2]))}let d=u+O+s-(b?s:m.members.length===0&&m.methods.length===0?-s/2:0);if(a.attr(`class`).includes(`methods-group`)){let e=Math.max(F,c/2);d=E?Math.max(I,N+P+e+O+c*2+s)+c*2:N+P+e+O+c*4+s}m.members.length===0&&m.methods.length===0&&i.class?.hideEmptyMembersBox&&(d=m.annotations.length>0?u-c:u),l||(d-=4);let f=D;(a.attr(`class`).includes(`label-group`)||a.attr(`class`).includes(`annotation-group`))&&(f=-a.node()?.getBBox().width/2||0,h.selectAll(`text`).each(function(e,t,n){window.getComputedStyle(n[t]).textAnchor===`middle`&&(f=0)})),a.attr(`transform`,`translate(${f}, ${d})`)}),m.members.length>0||m.methods.length>0||b){let e=N+P+O+s,t=x.line(M.x,e,M.x+M.width,e+.001,S);h.insert(()=>t).attr(`class`,`divider${n.look===`neo`&&!o?` neo-line`:``}`).attr(`style`,y)}if(b||m.members.length>0||m.methods.length>0){let e=N+P+F+O+c*2+s,t=x.line(M.x,E?Math.max(I,e):e,M.x+M.width,(E?Math.max(I,e):e)+.001,S);h.insert(()=>t).attr(`class`,`divider${n.look===`neo`&&!o?` neo-line`:``}`).attr(`style`,y)}if(m.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,y),j.select(`:nth-child(2)`).attr(`style`,y),h.selectAll(`.divider`).select(`path`).attr(`style`,y),n.labelStyle?h.selectAll(`span`).attr(`style`,n.labelStyle):h.selectAll(`span`).attr(`style`,y),!l){let e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(y);if(t){let e=t[0].replace(`color`,`fill`);h.selectAll(`tspan`).attr(`style`,e)}else if(_){let t=e.exec(_);if(t){let e=t[0].replace(`color`,`fill`);h.selectAll(`tspan`).attr(`style`,e)}}}return T(n,j),n.intersect=function(e){return G.rect(n,e)},h}e(Ht,`classBox`);async function Ut(e,n){let{labelStyles:i,nodeStyles:a}=p(n);n.labelStyle=i;let o=n,s=n,c=`verifyMethod`in n,l=E(n),{themeVariables:u}=r(),{borderColorArray:m,requirementEdgeLabelBackground:h}=u,g=e.insert(`g`).attr(`class`,l).attr(`id`,n.domId??n.id),_;_=c?await $(g,`<<${o.type}>>`,0,n.labelStyle):await $(g,`<<Element>>`,0,n.labelStyle);let v=_,y=await $(g,o.name,v,n.labelStyle+`; font-weight: bold;`);if(v+=y+20,c){let e=await $(g,`${o.requirementId?`ID: ${o.requirementId}`:``}`,v,n.labelStyle);v+=e;let t=await $(g,`${o.text?`Text: ${o.text}`:``}`,v,n.labelStyle);v+=t;let r=await $(g,`${o.risk?`Risk: ${o.risk}`:``}`,v,n.labelStyle);v+=r,await $(g,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:``}`,v,n.labelStyle)}else{let e=await $(g,`${s.type?`Type: ${s.type}`:``}`,v,n.labelStyle);v+=e,await $(g,`${s.docRef?`Doc Ref: ${s.docRef}`:``}`,v,n.labelStyle)}let b=(g.node()?.getBBox().width??200)+20,x=(g.node()?.getBBox().height??200)+20,S=-b/2,C=-x/2,w=d.svg(g),D=f(n,{});n.look!==`handDrawn`&&(D.roughness=0,D.fillStyle=`solid`);let O=w.rectangle(S,C,b,x,D),k=g.insert(()=>O,`:first-child`);if(k.attr(`class`,`basic label-container outer-path`).attr(`style`,a),m?.length){let e=n.colorIndex??0;g.attr(`data-color-id`,`color-${e%m.length}`)}if(g.selectAll(`.label`).each((e,n,r)=>{let i=t(r[n]),a=i.attr(`transform`),o=0,s=0;if(a){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(o=parseFloat(e[1]),s=parseFloat(e[2]))}let c=s-x/2,l=S+10;(n===0||n===1)&&(l=o),i.attr(`transform`,`translate(${l}, ${c+20})`)}),v>_+y+20){let e=C+_+y+20,t;if(n.look===`neo`){let n=.001,r=[[S,e],[S+b,e],[S+b,e+n],[S,e+n]];t=w.polygon(r,D)}else t=w.line(S,e,S+b,e,D);g.insert(()=>t).attr(`class`,`divider`)}return T(n,k),n.intersect=function(e){return G.rect(n,e)},a&&n.look!==`handDrawn`&&(h||m?.length)&&g.selectAll(`path`).attr(`style`,a),g}e(Ut,`requirementBox`);async function $(e,n,i,a=``){if(n===``)return 0;let o=e.insert(`g`).attr(`class`,`label`).attr(`style`,a),c=r(),l=c.htmlLabels??!0,u=await S(o,s(_(n)),{width:v(n,c)+50,classes:`markdown-node-label`,useHtmlLabels:l,style:a},c),d;if(l){let e=u.children[0],n=t(u);d=e.getBoundingClientRect(),n.attr(`width`,d.width),n.attr(`height`,d.height)}else{let e=u.children[0];for(let t of e.children)a&&t.setAttribute(`style`,a);d=u.getBBox(),d.height+=6}return o.attr(`transform`,`translate(${-d.width/2},${-d.height/2+i})`),d.height}e($,`addText`);var Wt=e(e=>{switch(e){case`Very High`:return`red`;case`High`:return`orange`;case`Medium`:return null;case`Low`:return`blue`;case`Very Low`:return`lightblue`}},`colorFromPriority`);async function Gt(e,t,{config:n}){let{labelStyles:r,nodeStyles:i}=p(t);t.labelStyle=r||``;let a=t.width;t.width=(t.width??200)-10;let{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=t.padding||10,u=``,m;`ticket`in t&&t.ticket&&n?.kanban?.ticketBaseUrl&&(u=n?.kanban?.ticketBaseUrl.replace(`#TICKET#`,t.ticket),m=o.insert(`svg:a`,`:first-child`).attr(`class`,`kanban-ticket-link`).attr(`xlink:href`,u).attr(`target`,`_blank`));let h={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||``,width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},g,_;m?{label:g,bbox:_}=await w(m,`ticket`in t&&t.ticket||``,h):{label:g,bbox:_}=await w(o,`ticket`in t&&t.ticket||``,h);let{label:v,bbox:y}=await w(o,`assigned`in t&&t.assigned||``,h);t.width=a;let b=t?.width||0,x=Math.max(_.height,y.height)/2,S=Math.max(s.height+20,t?.height||0)+x,D=-b/2,O=-S/2;c.attr(`transform`,`translate(`+(l-b/2)+`, `+(-x-s.height/2)+`)`),g.attr(`transform`,`translate(`+(l-b/2)+`, `+(-x+s.height/2)+`)`),v.attr(`transform`,`translate(`+(l+b/2-y.width-20)+`, `+(-x+s.height/2)+`)`);let k,{rx:A,ry:j}=t,{cssStyles:M}=t;if(t.look===`handDrawn`){let e=d.svg(o),n=f(t,{}),r=A||j?e.path(N(D,O,b,S,A||0),n):e.rectangle(D,O,b,S,n);k=o.insert(()=>r,`:first-child`),k.attr(`class`,`basic label-container`).attr(`style`,M||null)}else{k=o.insert(`rect`,`:first-child`),k.attr(`class`,`basic label-container __APA__`).attr(`style`,i).attr(`rx`,A??5).attr(`ry`,j??5).attr(`x`,D).attr(`y`,O).attr(`width`,b).attr(`height`,S);let e=`priority`in t&&t.priority;if(e){let t=o.append(`line`),n=D+2,r=O+Math.floor((A??0)/2),i=O+S-Math.floor((A??0)/2);t.attr(`x1`,n).attr(`y1`,r).attr(`x2`,n).attr(`y2`,i).attr(`stroke-width`,`4`).attr(`stroke`,Wt(e))}}return T(t,k),t.height=S,t.intersect=function(e){return G.rect(t,e)},o}e(Gt,`kanbanItem`);async function Kt(e,t){let{labelStyles:r,nodeStyles:i}=p(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await C(e,t,E(t)),l=o.width+10*s,u=o.height+8*s,m=.15*l,{cssStyles:h}=t,_=o.width+20,v=o.height+20,y=Math.max(l,_),b=Math.max(u,v);c.attr(`transform`,`translate(${-o.width/2}, ${-o.height/2})`);let x,S=`M0 0 + a${m},${m} 1 0,0 ${y*.25},${-1*b*.1} + a${m},${m} 1 0,0 ${y*.25},0 + a${m},${m} 1 0,0 ${y*.25},0 + a${m},${m} 1 0,0 ${y*.25},${b*.1} + + a${m},${m} 1 0,0 ${y*.15},${b*.33} + a${m*.8},${m*.8} 1 0,0 0,${b*.34} + a${m},${m} 1 0,0 ${-1*y*.15},${b*.33} + + a${m},${m} 1 0,0 ${-1*y*.25},${b*.15} + a${m},${m} 1 0,0 ${-1*y*.25},0 + a${m},${m} 1 0,0 ${-1*y*.25},0 + a${m},${m} 1 0,0 ${-1*y*.25},${-1*b*.15} + + a${m},${m} 1 0,0 ${-1*y*.1},${-1*b*.33} + a${m*.8},${m*.8} 1 0,0 0,${-1*b*.34} + a${m},${m} 1 0,0 ${y*.1},${-1*b*.33} + H0 V0 Z`;if(t.look===`handDrawn`){let e=d.svg(a),n=f(t,{}),r=e.path(S,n);x=a.insert(()=>r,`:first-child`),x.attr(`class`,`basic label-container`).attr(`style`,g(h))}else x=a.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`d`,S);return x.attr(`transform`,`translate(${-y/2}, ${-b/2})`),T(t,x),t.calcIntersect=function(e,t){return G.rect(e,t)},t.intersect=function(e){return n.info(`Bang intersect`,t,e),G.rect(t,e)},a}e(Kt,`bang`);async function qt(e,t){let{labelStyles:r,nodeStyles:i}=p(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await C(e,t,E(t)),l=o.width+2*s,u=o.height+2*s,m=.15*l,h=.25*l,_=.35*l,v=.2*l,{cssStyles:y}=t,b,x=`M0 0 + a${m},${m} 0 0,1 ${l*.25},${-1*l*.1} + a${_},${_} 1 0,1 ${l*.4},${-1*l*.1} + a${h},${h} 1 0,1 ${l*.35},${l*.2} + + a${m},${m} 1 0,1 ${l*.15},${u*.35} + a${v},${v} 1 0,1 ${-1*l*.15},${u*.65} + + a${h},${m} 1 0,1 ${-1*l*.25},${l*.15} + a${_},${_} 1 0,1 ${-1*l*.5},0 + a${m},${m} 1 0,1 ${-1*l*.25},${-1*l*.15} + + a${m},${m} 1 0,1 ${-1*l*.1},${-1*u*.35} + a${v},${v} 1 0,1 ${l*.1},${-1*u*.65} + H0 V0 Z`;if(t.look===`handDrawn`){let e=d.svg(a),n=f(t,{}),r=e.path(x,n);b=a.insert(()=>r,`:first-child`),b.attr(`class`,`basic label-container`).attr(`style`,g(y))}else b=a.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`d`,x);return c.attr(`transform`,`translate(${-o.width/2}, ${-o.height/2})`),b.attr(`transform`,`translate(${-l/2}, ${-u/2})`),T(t,b),t.calcIntersect=function(e,t){return G.rect(e,t)},t.intersect=function(e){return n.info(`Cloud intersect`,t,e),G.rect(t,e)},a}e(qt,`cloud`);async function Jt(e,t){let{labelStyles:n,nodeStyles:r}=p(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await C(e,t,E(t)),c=a.width+8*o,l=a.height+2*o,u=t.look===`neo`?` + M${-c/2} ${l/2-5} + v${-l+10} + q0,-5 5,-5 + h${c-10} + q5,0 5,5 + v${l-5} + H${-c/2} + Z + `:` + M${-c/2} ${l/2-5} + v${-l+10} + q0,-5 5,-5 + h${c-10} + q5,0 5,5 + v${l-10} + q0,5 -5,5 + h${-(c-10)} + q-5,0 -5,-5 + Z + `;if(!t.domId)throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let d=i.append(`path`).attr(`id`,t.domId).attr(`class`,`node-bkg node-`+t.type).attr(`style`,r).attr(`d`,u);return i.append(`line`).attr(`class`,`node-line-`).attr(`x1`,-c/2).attr(`y1`,l/2).attr(`x2`,c/2).attr(`y2`,l/2),s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>s.node()),T(t,d),t.calcIntersect=function(e,t){return G.rect(e,t)},t.intersect=function(e){return G.rect(t,e)},i}e(Jt,`defaultMindmapNode`);async function Yt(e,t){return de(e,t,{padding:t.padding??0})}e(Yt,`mindmapCircle`);var Xt=[{semanticName:`Process`,name:`Rectangle`,shortName:`rect`,description:`Standard process shape`,aliases:[`proc`,`process`,`rectangle`],internalAliases:[`squareRect`],handler:ut},{semanticName:`Event`,name:`Rounded Rectangle`,shortName:`rounded`,description:`Represents an event`,aliases:[`event`],internalAliases:[`roundedRect`],handler:st},{semanticName:`Terminal Point`,name:`Stadium`,shortName:`stadium`,description:`Terminal point`,aliases:[`terminal`,`pill`],handler:dt},{semanticName:`Subprocess`,name:`Framed Rectangle`,shortName:`fr-rect`,description:`Subprocess`,aliases:[`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],handler:gt},{semanticName:`Database`,name:`Cylinder`,shortName:`cyl`,description:`Database storage`,aliases:[`db`,`database`,`cylinder`],handler:Ce},{semanticName:`Data Store`,name:`Data Store`,shortName:`datastore`,description:`Data flow diagram data store`,aliases:[`data-store`],handler:Te},{semanticName:`Start`,name:`Circle`,shortName:`circle`,description:`Starting point`,aliases:[`circ`],handler:de},{semanticName:`Bang`,name:`Bang`,shortName:`bang`,description:`Bang`,aliases:[`bang`],handler:Kt},{semanticName:`Cloud`,name:`Cloud`,shortName:`cloud`,description:`cloud`,aliases:[`cloud`],handler:qt},{semanticName:`Decision`,name:`Diamond`,shortName:`diam`,description:`Decision-making step`,aliases:[`decision`,`diamond`,`question`],handler:it},{semanticName:`Prepare Conditional`,name:`Hexagon`,shortName:`hex`,description:`Preparation or condition step`,aliases:[`hexagon`,`prepare`],handler:Fe},{semanticName:`Data Input/Output`,name:`Lean Right`,shortName:`lean-r`,description:`Represents input or output`,aliases:[`lean-right`,`in-out`],internalAliases:[`lean_right`],handler:Ge},{semanticName:`Data Input/Output`,name:`Lean Left`,shortName:`lean-l`,description:`Represents output or input`,aliases:[`lean-left`,`out-in`],internalAliases:[`lean_left`],handler:We},{semanticName:`Priority Action`,name:`Trapezoid Base Bottom`,shortName:`trap-b`,description:`Priority action`,aliases:[`priority`,`trapezoid-bottom`,`trapezoid`],handler:Dt},{semanticName:`Manual Operation`,name:`Trapezoid Base Top`,shortName:`trap-t`,description:`Represents a manual task`,aliases:[`manual`,`trapezoid-top`,`inv-trapezoid`],internalAliases:[`inv_trapezoid`],handler:He},{semanticName:`Stop`,name:`Double Circle`,shortName:`dbl-circ`,description:`Represents a stop point`,aliases:[`double-circle`],internalAliases:[`doublecircle`],handler:De},{semanticName:`Text Block`,name:`Text Block`,shortName:`text`,description:`Text block`,handler:bt},{semanticName:`Card`,name:`Notched Rectangle`,shortName:`notch-rect`,description:`Represents a card`,aliases:[`card`,`notched-rectangle`],handler:le},{semanticName:`Lined/Shaded Process`,name:`Lined Rectangle`,shortName:`lin-rect`,description:`Lined process shape`,aliases:[`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],handler:ct},{semanticName:`Start`,name:`Small Circle`,shortName:`sm-circ`,description:`Small starting point`,aliases:[`start`,`small-circle`],internalAliases:[`stateStart`],handler:mt},{semanticName:`Stop`,name:`Framed Circle`,shortName:`fr-circ`,description:`Stop point`,aliases:[`stop`,`framed-circle`],internalAliases:[`stateEnd`],handler:pt},{semanticName:`Fork/Join`,name:`Filled Rectangle`,shortName:`fork`,description:`Fork or join in process flow`,aliases:[`join`],internalAliases:[`forkJoin`],handler:Me},{semanticName:`Collate`,name:`Hourglass`,shortName:`hourglass`,description:`Represents a collate operation`,aliases:[`hourglass`,`collate`],handler:Ie},{semanticName:`Comment`,name:`Curly Brace`,shortName:`brace`,description:`Adds a comment`,aliases:[`comment`,`brace-l`],handler:me},{semanticName:`Comment Right`,name:`Curly Brace`,shortName:`brace-r`,description:`Adds a comment`,handler:he},{semanticName:`Comment with braces on both sides`,name:`Curly Braces`,shortName:`braces`,description:`Adds a comment`,handler:ge},{semanticName:`Com Link`,name:`Lightning Bolt`,shortName:`bolt`,description:`Communication link`,aliases:[`com-link`,`lightning-bolt`],handler:Ke},{semanticName:`Document`,name:`Document`,shortName:`doc`,description:`Represents a document`,aliases:[`doc`,`document`],handler:Mt},{semanticName:`Delay`,name:`Half-Rounded Rectangle`,shortName:`delay`,description:`Represents a delay`,aliases:[`half-rounded-rectangle`],handler:Ne},{semanticName:`Direct Access Storage`,name:`Horizontal Cylinder`,shortName:`h-cyl`,description:`Direct access storage`,aliases:[`das`,`horizontal-cylinder`],handler:Et},{semanticName:`Disk Storage`,name:`Lined Cylinder`,shortName:`lin-cyl`,description:`Disk storage`,aliases:[`disk`,`lined-cylinder`],handler:Qe},{semanticName:`Display`,name:`Curved Trapezoid`,shortName:`curv-trap`,description:`Represents a display`,aliases:[`curved-trapezoid`,`display`],handler:_e},{semanticName:`Divided Process`,name:`Divided Rectangle`,shortName:`div-rect`,description:`Divided process shape`,aliases:[`div-proc`,`divided-rectangle`,`divided-process`],handler:Ee},{semanticName:`Extract`,name:`Triangle`,shortName:`tri`,description:`Extraction process`,aliases:[`extract`,`triangle`],handler:jt},{semanticName:`Internal Storage`,name:`Window Pane`,shortName:`win-pane`,description:`Internal storage`,aliases:[`internal-storage`,`window-pane`],handler:Pt},{semanticName:`Junction`,name:`Filled Circle`,shortName:`f-circ`,description:`Junction point`,aliases:[`junction`,`filled-circle`],handler:Oe},{semanticName:`Loop Limit`,name:`Trapezoidal Pentagon`,shortName:`notch-pent`,description:`Loop limit step`,aliases:[`loop-limit`,`notched-pentagon`],handler:Ot},{semanticName:`Manual File`,name:`Flipped Triangle`,shortName:`flip-tri`,description:`Manual file operation`,aliases:[`manual-file`,`flipped-triangle`],handler:je},{semanticName:`Manual Input`,name:`Sloped Rectangle`,shortName:`sl-rect`,description:`Manual input step`,aliases:[`manual-input`,`sloped-rectangle`],handler:lt},{semanticName:`Multi-Document`,name:`Stacked Document`,shortName:`docs`,description:`Multiple documents`,aliases:[`documents`,`st-doc`,`stacked-document`],handler:tt},{semanticName:`Multi-Process`,name:`Stacked Rectangle`,shortName:`st-rect`,description:`Multiple processes`,aliases:[`procs`,`processes`,`stacked-rectangle`],handler:et},{semanticName:`Stored Data`,name:`Bow Tie Rectangle`,shortName:`bow-rect`,description:`Stored data`,aliases:[`stored-data`,`bow-tie-rectangle`],handler:se},{semanticName:`Summary`,name:`Crossed Circle`,shortName:`cross-circ`,description:`Summary`,aliases:[`summary`,`crossed-circle`],handler:pe},{semanticName:`Tagged Document`,name:`Tagged Document`,shortName:`tag-doc`,description:`Tagged document`,aliases:[`tag-doc`,`tagged-document`],handler:yt},{semanticName:`Tagged Process`,name:`Tagged Rectangle`,shortName:`tag-rect`,description:`Tagged process`,aliases:[`tagged-rectangle`,`tag-proc`,`tagged-process`],handler:vt},{semanticName:`Paper Tape`,name:`Flag`,shortName:`flag`,description:`Paper tape`,aliases:[`paper-tape`],handler:Nt},{semanticName:`Odd`,name:`Odd`,shortName:`odd`,description:`Odd shape`,internalAliases:[`rect_left_inv_arrow`],handler:at},{semanticName:`Lined Document`,name:`Lined Document`,shortName:`lin-doc`,description:`Lined document`,aliases:[`lined-document`],handler:$e}],Zt=e(()=>{let e=[...Object.entries({state:ft,choice:ue,note:nt,rectWithTitle:ot,labelRect:Ue,iconSquare:Be,iconCircle:Re,icon:Le,iconRounded:ze,imageSquare:Ve,anchor:K,kanbanItem:Gt,mindmapCircle:Yt,defaultMindmapNode:Jt,classBox:Ht,erBox:Lt,requirementBox:Ut}),...Xt.flatMap(e=>[e.shortName,...`aliases`in e?e.aliases:[],...`internalAliases`in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(e)},`generateShapeMap`)();function Qt(e){return e in Zt}e(Qt,`isValidShape`);var $t=new Map;async function en(e,t,n){let r,i;t.shape===`rect`&&(t.shape=t.rx&&t.ry?`roundedRect`:`squareRect`);let a=t.shape?Zt[t.shape]:void 0;if(!a)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;n.config.securityLevel===`sandbox`?o=`_top`:t.linkTarget&&(o=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,o??null),i=await a(r,t,n)}else i=await a(e,t,n),r=i;return r.attr(`data-look`,g(t.look)),t.tooltip&&i.attr(`title`,t.tooltip),$t.set(t.id,r),t.haveCallback&&r.attr(`class`,r.attr(`class`)+` clickable`),r}e(en,`insertNode`);var tn=e((e,t)=>{$t.set(t.id,e)},`setNodeElem`),nn=e(()=>{$t.clear()},`clear`),rn=e(e=>{let t=$t.get(e.id);n.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let r=e.diff||0;return e.clusterNode?t.attr(`transform`,`translate(`+(e.x+r-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):t.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),r},`positionNode`);export{en as a,rn as c,ee as i,tn as l,nn as n,Qt as o,M as r,C as s,R as t,T as u}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-EMKVYAI2-C4ZARs9V.js b/lecture-01/assets/chunk-EMKVYAI2-C4ZARs9V.js new file mode 100644 index 0000000000000000000000000000000000000000..00308391392788d1424da97605b6fece5aec8464 --- /dev/null +++ b/lecture-01/assets/chunk-EMKVYAI2-C4ZARs9V.js @@ -0,0 +1,321 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";function t(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=t.length?{done:!0}:{done:!1,value:t[i++]}},`n`),e:e(function(e){throw e},`e`),f:a}}throw TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,s=!0,c=!1;return{s:e(function(){r=r.call(t)},`s`),n:e(function(){var e=r.next();return s=e.done,e},`n`),e:e(function(e){c=!0,o=e},`e`),f:e(function(){try{s||r.return==null||r.return()}finally{if(c)throw o}},`f`)}}e(s,`_createForOfIteratorHelper`);function c(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}e(c,`_defineProperty$1`);function l(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}e(l,`_iterableToArray`);function u(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}e(u,`_iterableToArrayLimit`);function d(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}e(d,`_nonIterableRest`);function f(){throw TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}e(f,`_nonIterableSpread`);function p(e,t){return n(e)||u(e,t)||v(e,t)||d()}e(p,`_slicedToArray`);function m(e){return r(e)||l(e)||v(e)||f()}e(m,`_toConsumableArray`);function h(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}e(h,`_toPrimitive`);function g(e){var t=h(e,`string`);return typeof t==`symbol`?t:t+``}e(g,`_toPropertyKey`);function _(e){"@babel/helpers - typeof";return _=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_(e)}e(_,`_typeof`);function v(e,n){if(e){if(typeof e==`string`)return t(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}e(v,`_unsupportedIterableToArray`);var y=typeof window>`u`?null:window,b=y?y.navigator:null;y&&y.document;var x=_(``),S=_({}),C=_(function(){}),w=typeof HTMLElement>`u`?`undefined`:_(HTMLElement),T=e(function(e){return e&&e.instanceString&&D(e.instanceString)?e.instanceString():null},`instanceStr`),E=e(function(e){return e!=null&&_(e)==x},`string`),D=e(function(e){return e!=null&&_(e)===C},`fn`),O=e(function(e){return!P(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},`array`),k=e(function(e){return e!=null&&_(e)===S&&!O(e)&&e.constructor===Object},`plainObject`),A=e(function(e){return e!=null&&_(e)===S},`object`),j=e(function(e){return e!=null&&_(e)===_(1)&&!isNaN(e)},`number`),M=e(function(e){return j(e)&&Math.floor(e)===e},`integer`),N=e(function(e){if(w!==`undefined`)return e!=null&&e instanceof HTMLElement},`htmlElement`),P=e(function(e){return F(e)||I(e)},`elementOrCollection`),F=e(function(e){return T(e)===`collection`&&e._private.single},`element`),I=e(function(e){return T(e)===`collection`&&!e._private.single},`collection`),L=e(function(e){return T(e)===`core`},`core`),R=e(function(e){return T(e)===`stylesheet`},`stylesheet`),z=e(function(e){return T(e)===`event`},`event`),B=e(function(e){return e==null||!!(e===``||e.match(/^\s+$/))},`emptyString`),V=e(function(e){return typeof HTMLElement>`u`?!1:e instanceof HTMLElement},`domElement`),H=e(function(e){return k(e)&&j(e.x1)&&j(e.x2)&&j(e.y1)&&j(e.y2)},`boundingBox`),U=e(function(e){return A(e)&&D(e.then)},`promise`),W=e(function(){return b&&b.userAgent.match(/msie|trident|edge/i)},`ms`),G=e(function(t,n){n||=e(function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return`undefined`;for(var e=[],t=0;tt)},`ascending`),ce=e(function(e,t){return-1*se(e,t)},`descending`),Z=Object.assign==null?function(e){for(var t=arguments,n=1;n1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}e(u,`hue2rgb`);var d=RegExp(`^`+re+`$`).exec(t);if(d){if(r=parseInt(d[1]),r<0?r=(360- -1*r%360)%360:r>360&&(r%=360),r/=360,i=parseFloat(d[2]),i<0||i>100||(i/=100,a=parseFloat(d[3]),a<0||a>100)||(a/=100,o=d[4],o!==void 0&&(o=parseFloat(o),o<0||o>1)))return;if(i===0)s=c=l=Math.round(a*255);else{var f=a<.5?a*(1+i):a+i-a*i,p=2*a-f;s=Math.round(255*u(p,f,r+1/3)),c=Math.round(255*u(p,f,r)),l=Math.round(255*u(p,f,r-1/3))}n=[s,c,l,o]}return n},`hsl2tuple`),de=e(function(e){var t,n=RegExp(`^`+te+`$`).exec(e);if(n){t=[];for(var r=[],i=1;i<=3;i++){var a=n[i];if(a[a.length-1]===`%`&&(r[i]=!0),a=parseFloat(a),r[i]&&(a=a/100*255),a<0||a>255)return;t.push(Math.floor(a))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var c=n[4];if(c!==void 0){if(c=parseFloat(c),c<0||c>1)return;t.push(c)}}return t},`rgb2tuple`),fe=e(function(e){return me[e.toLowerCase()]},`colorname2tuple`),pe=e(function(e){return(O(e)?e:null)||fe(e)||le(e)||de(e)||ue(e)},`color2tuple`),me={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},he=e(function(e){for(var t=e.map,n=e.keys,r=n.length,i=0;i=c||t<0||v&&n>=f}e(C,`shouldInvoke`);function w(){var e=n();if(C(e))return T(e);m=setTimeout(w,S(e))}e(w,`timerExpired`);function T(e){return m=void 0,y&&u?b(e):(u=d=void 0,p)}e(T,`trailingEdge`);function E(){m!==void 0&&clearTimeout(m),g=0,u=h=d=m=void 0}e(E,`cancel`);function D(){return m===void 0?p:T(n())}e(D,`flush`);function O(){var e=n(),t=C(e);if(u=arguments,d=this,h=e,t){if(m===void 0)return x(h);if(v)return clearTimeout(m),m=setTimeout(w,c),b(h)}return m===void 0&&(m=setTimeout(w,c)),p}return e(O,`debounced`),O.cancel=E,O.flush=D,O}return e(s,`debounce`),it=s,it}e(ot,`requireDebounce`);var st=ve(ot()),ct=y?y.performance:null,lt=ct&&ct.now?function(){return ct.now()}:function(){return Date.now()},ut=(function(){if(y){if(y.requestAnimationFrame)return function(e){y.requestAnimationFrame(e)};if(y.mozRequestAnimationFrame)return function(e){y.mozRequestAnimationFrame(e)};if(y.webkitRequestAnimationFrame)return function(e){y.webkitRequestAnimationFrame(e)};if(y.msRequestAnimationFrame)return function(e){y.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout(function(){e(lt())},1e3/60)}})(),dt=e(function(e){return ut(e)},`requestAnimationFrame`),ft=lt,pt=9261,mt=65599,ht=5381,gt=e(function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pt,n;n=e.next(),!n.done;)t=t*mt+n.value|0;return t},`hashIterableInts`),_t=e(function(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:pt)*mt+e|0},`hashInt`),vt=e(function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ht;return(t<<5)+t+e|0},`hashIntAlt`),yt=e(function(e,t){return e*2097152+t},`combineHashes`),bt=e(function(e){return e[0]*2097152+e[1]},`combineHashesArray`),xt=e(function(e,t){return[_t(e[0],t[0]),vt(e[1],t[1])]},`hashArrays`),St=e(function(t,n){var r={value:0,done:!1},i=0,a=t.length;return gt({next:e(function(){return i=0;r--)e[r]===t&&e.splice(r,1)},`removeFromArray`),Jt=e(function(e){e.splice(0,e.length)},`clearArray`),Yt=e(function(e,t){for(var n=0;n`u`?`undefined`:_(Set))===$t?en:Set,nn=e(function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||t===void 0||!L(e)){Lt(`An element must have a core reference and parameters set`);return}var r=t.group;if(r??=t.data&&t.data.source!=null&&t.data.target!=null?`edges`:`nodes`,r!==`nodes`&&r!==`edges`){Lt("An element must be of type `nodes` or `edges`; you specified `"+r+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:t.selectable===void 0||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:t.grabbable===void 0||!!t.grabbable,pannable:t.pannable===void 0?r===`edges`:!!t.pannable,active:!1,classes:new tn,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x??(i.position.x=0),i.position.y??(i.position.y=0),t.renderedPosition){var a=t.renderedPosition,o=e.pan(),s=e.zoom();i.position={x:(a.x-o.x)/s,y:(a.y-o.y)/s}}var c=[];O(t.classes)?c=t.classes:E(t.classes)&&(c=t.classes.split(/\s+/));for(var l=0,u=c.length;lt)},`defaultCmp`),u=e(function(e,t,n,a,o){var s;if(n??=0,o??=r,n<0)throw Error(`lo must be non-negative`);for(a??=e.length;nn;0<=n?t++:t--)l.push(t);return l}).apply(this).reverse(),c=[],a=0,o=s.length;ah;0<=h?++f:--f)g.push(o(e,n));return g},`nsmallest`),h=e(function(e,t,n,i){var a,o,s;for(i??=r,a=e[n];n>t;){if(s=n-1>>1,o=e[s],i(a,o)<0){e[n]=o,n=s;continue}break}return e[n]=a},`_siftdown`),g=e(function(e,t,n){var i,a,o,s,c;for(n??=r,a=e.length,c=t,o=e[t],i=2*t+1;i0;){var S=v.pop(),C=g(S),w=S.id();if(f[w]=C,C!==1/0)for(var T=S.neighborhood().intersect(m),D=0;D0)for(n.unshift(t);d[i];){var a=d[i];n.unshift(a.edge),n.unshift(a.node),r=a.node,i=r.id()}return s.spawn(n)},`pathTo`)}},`dijkstra`)},gn={kruskal:e(function(t){t||=function(e){return 1};for(var n=this.byGroup(),r=n.nodes,i=n.edges,a=r.length,o=Array(a),s=r,c=e(function(e){for(var t=0;t0;){if(x(),C++,b===u){for(var w=[],T=a,E=u,D=_[E];w.unshift(T),D!=null&&w.unshift(D),T=g[E],T!=null;)E=T.id(),D=_[E];return{found:!0,distance:d[b],path:this.spawn(w),steps:C}}p[b]=!0;for(var O=y._private.edges,k=0;kD&&(m[T]=D,_[T]=w,v[T]=b),!a){var O=w*u+C;!a&&m[O]>D&&(m[O]=D,_[O]=C,v[O]=b)}}}for(var k=0;k1&&arguments[1]!==void 0?arguments[1]:o,r=y(e),i=[],a=r;;){if(a==null)return n.spawn();var s=v(a),l=s.edge,u=s.pred;if(i.unshift(a[0]),a.same(t)&&i.length>0)break;l!=null&&i.unshift(l),a=u}return c.spawn(i)},`pathTo`),S=0;S=0;l--){var u=c[l],d=u[1],f=u[2];(t[d]===o&&t[f]===s||t[d]===s&&t[f]===o)&&c.splice(l,1)}for(var p=0;pr;)t=wn(Math.floor(Math.random()*t.length),e,t),n--;return t},`contractUntil`),En={kargerStein:e(function(){var t=this,n=this.byGroup(),r=n.nodes,i=n.edges;i.unmergeBy(function(e){return e.isLoop()});var a=r.length,o=i.length,s=Math.ceil((Math.log(a)/Math.LN2)**2),c=Math.floor(a/Cn);if(a<2){Lt(`At least 2 nodes are required for Karger-Stein algorithm`);return}for(var l=[],u=0;u1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=-1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=0,i=0,a=t;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;r?e=e.slice(t,n):(n0&&e.splice(0,t));for(var o=0,s=e.length-1;s>=0;s--){var c=e[s];a?isFinite(c)||(e[s]=-1/0,o++):e.splice(s,1)}i&&e.sort(function(e,t){return e-t});var l=e.length,u=Math.floor(l/2);return l%2==0?(e[u-1+o]+e[u+o])/2:e[u+1+o]},`median`),Fn=e(function(e){return Math.PI*e/180},`deg2rad`),In=e(function(e,t){return Math.atan2(t,e)-Math.PI/2},`getAngleFromDisp`),Ln=Math.log2||function(e){return Math.log(e)/Math.log(2)},Rn=e(function(e){return e>0?1:e<0?-1:0},`signum`),zn=e(function(e,t){return Math.sqrt(Bn(e,t))},`dist`),Bn=e(function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},`sqdist`),Vn=e(function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},`makeBoundingBox`),qn=e(function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},`copyBoundingBox`),Jn=e(function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},`clearBoundingBox`),Yn=e(function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},`updateBoundingBox`),Xn=e(function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},`expandBoundingBoxByPoint`),Zn=e(function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},`expandBoundingBox`),Qn=e(function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,r,i,a;if(t.length===1)n=r=i=a=t[0];else if(t.length===2)n=i=t[0],a=r=t[1];else if(t.length===4){var o=p(t,4);n=o[0],r=o[1],i=o[2],a=o[3]}return e.x1-=a,e.x2+=r,e.y1-=n,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},`expandBoundingBoxSides`),$n=e(function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},`assignBoundingBox`),er=e(function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},`boundingBoxesIntersect`),tr=e(function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},`inBoundingBox`),nr=e(function(e,t){return tr(e,t.x,t.y)},`pointInBoundingBox`),rr=e(function(e,t){return tr(e,t.x1,t.y1)&&tr(e,t.x2,t.y2)},`boundingBoxInBoundingBox`),ir=Math.hypot??function(e,t){return Math.sqrt(e*e+t*t)};function ar(t,n){if(t.length<3)throw Error(`Need at least 3 vertices`);var r=e(function(e,t){return{x:e.x+t.x,y:e.y+t.y}},`add`),i=e(function(e,t){return{x:e.x-t.x,y:e.y-t.y}},`sub`),a=e(function(e,t){return{x:e.x*t,y:e.y*t}},`scale`),o=e(function(e,t){return e.x*t.y-e.y*t.x},`cross`),s=e(function(e){var t=ir(e.x,e.y);return t===0?{x:0,y:0}:{x:e.x/t,y:e.y/t}},`normalize`),c=e(function(e){for(var t=0,n=0;n7&&arguments[7]!==void 0?arguments[7]:`auto`,c=s===`auto`?jr(i,a):s,l=i/2,u=a/2;c=Math.min(c,l,u);var d=c!==l,f=c!==u,p;if(d){var m=n-l+c-o,h=r-u-o;if(p=Cr(e,t,n,r,m,h,n+l-c+o,h,!1),p.length>0)return p}if(f){var g=n+l+o;if(p=Cr(e,t,n,r,g,r-u+c-o,g,r+u-c+o,!1),p.length>0)return p}if(d){var _=n-l+c-o,v=r+u+o;if(p=Cr(e,t,n,r,_,v,n+l-c+o,v,!1),p.length>0)return p}if(f){var y=n-l-o;if(p=Cr(e,t,n,r,y,r-u+c-o,y,r+u-c+o,!1),p.length>0)return p}var b,x=n-l+c,S=r-u+c;if(b=xr(e,t,n,r,x,S,c+o),b.length>0&&b[0]<=x&&b[1]<=S)return[b[0],b[1]];var C=n+l-c,w=r-u+c;if(b=xr(e,t,n,r,C,w,c+o),b.length>0&&b[0]>=C&&b[1]<=w)return[b[0],b[1]];var T=n+l-c,E=r+u-c;if(b=xr(e,t,n,r,T,E,c+o),b.length>0&&b[0]>=T&&b[1]>=E)return[b[0],b[1]];var D=n-l+c,O=r+u-c;return b=xr(e,t,n,r,D,O,c+o),b.length>0&&b[0]<=D&&b[1]>=O?[b[0],b[1]]:[]},`roundRectangleIntersectLine`),cr=e(function(e,t,n,r,i,a,o){var s=o,c=Math.min(n,i),l=Math.max(n,i),u=Math.min(r,a),d=Math.max(r,a);return c-s<=e&&e<=l+s&&u-s<=t&&t<=d+s},`inLineVicinity`),lr=e(function(e,t,n,r,i,a,o,s,c){var l={x1:Math.min(n,o,i)-c,x2:Math.max(n,o,i)+c,y1:Math.min(r,s,a)-c,y2:Math.max(r,s,a)+c};return!(el.x2||tl.y2)},`inBezierVicinity`),ur=e(function(e,t,n,r){n-=r;var i=t*t-4*e*n;if(i<0)return[];var a=Math.sqrt(i),o=2*e;return[(-t+a)/o,(-t-a)/o]},`solveQuadratic`),dr=e(function(e,t,n,r,i){e===0&&(e=1e-5),t/=e,n/=e,r/=e;var a,o=(3*n-t*t)/9,s=-(27*r)+t*(9*n-t*t*2),c,l,u,d,f;if(s/=54,a=o*o*o+s*s,i[1]=0,d=t/3,a>0){l=s+Math.sqrt(a),l=l<0?-((-l)**(1/3)):l**(1/3),u=s-Math.sqrt(a),u=u<0?-((-u)**(1/3)):u**(1/3),i[0]=-d+l+u,d+=(l+u)/2,i[4]=i[2]=-d,d=Math.sqrt(3)*(-u+l)/2,i[3]=d,i[5]=-d;return}if(i[5]=i[3]=0,a===0){f=s<0?-((-s)**(1/3)):s**(1/3),i[0]=-d+2*f,i[4]=i[2]=-(f+d);return}o=-o,c=o*o*o,c=Math.acos(s/Math.sqrt(c)),f=2*Math.sqrt(o),i[0]=-d+f*Math.cos(c/3),i[2]=-d+f*Math.cos((c+2*Math.PI)/3),i[4]=-d+f*Math.cos((c+4*Math.PI)/3)},`solveCubic`),fr=e(function(e,t,n,r,i,a,o,s){var c=1*n*n-4*n*i+2*n*o+4*i*i-4*i*o+o*o+r*r-4*r*a+2*r*s+4*a*a-4*a*s+s*s,l=9*n*i-3*n*n-3*n*o-6*i*i+3*i*o+9*r*a-3*r*r-3*r*s-6*a*a+3*a*s,u=3*n*n-6*n*i+n*o-n*e+2*i*i+2*i*e-o*e+3*r*r-6*r*a+r*s-r*t+2*a*a+2*a*t-s*t,d=1*n*i-n*n+n*e-i*e+r*a-r*r+r*t-a*t,f=[];dr(c,l,u,d,f);for(var p=1e-7,m=[],h=0;h<6;h+=2)Math.abs(f[h+1])=0&&f[h]<=1&&m.push(f[h]);m.push(1),m.push(0);for(var g=-1,_,v,y,b=0;b=0?yc?(e-i)*(e-i)+(t-a)*(t-a):l-d},`sqdistToFiniteLine`),mr=e(function(e,t,n){for(var r,i,a,o,s,c=0,l=0;l=e&&e>=a||r<=e&&e<=a)s=(e-r)/(a-r)*(o-i)+i,s>t&&c++;else continue}return c%2!=0},`pointInsidePolygonPoints`),hr=e(function(e,t,n,r,i,a,o,s,c){var l=Array(n.length),u;s[0]==null?u=s:(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2);for(var d=Math.cos(-u),f=Math.sin(-u),p=0;p0?_r(vr(l,-c)):l)},`pointInsidePolygon`),gr=e(function(e,t,n,r,i,a,o,s){for(var c=Array(n.length*2),l=0;l=0&&h<=1&&_.push(h),g>=0&&g<=1&&_.push(g),_.length===0)return[];var v=_[0]*s[0]+e,y=_[0]*s[1]+t;return _.length>1?_[0]==_[1]?[v,y]:[v,y,_[1]*s[0]+e,_[1]*s[1]+t]:[v,y]},`intersectLineCircle`),Sr=e(function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},`midOfThree`),Cr=e(function(e,t,n,r,i,a,o,s,c){var l=e-i,u=n-e,d=o-i,f=t-a,p=r-t,m=s-a,h=d*f-m*l,g=u*f-p*l,_=m*u-d*p;if(_!==0){var v=h/_,y=g/_,b=.001,x=0-b,S=1+b;return x<=v&&v<=S&&x<=y&&y<=S||c?[e+v*u,t+v*p]:[]}return h===0||g===0?Sr(e,n,o)===o?[o,s]:Sr(e,n,i)===i?[i,a]:Sr(i,o,n)===n?[n,r]:[]:[]},`finiteLinesIntersect`),wr=e(function(e,t,n,r,i){var a=[],o=r/2,s=i/2,c=t,l=n;a.push({x:c+o*e[0],y:l+s*e[1]});for(var u=1;u0?_r(vr(u,-s)):u}else f=n;for(var m,h,g,_,v=0;v2){for(var p=[l[0],l[1]],m=(p[0]-e)**2+(p[1]-t)**2,h=1;hu&&(u=t)},`set`),get:e(function(e){return l[e]},`get`)},f=0;f0?v.edgesTo(_)[0]:_.edgesTo(v)[0];var b=i(y);_=_.id(),l[_]>l[m]+b&&(l[_]=l[m]+b,u.nodes.indexOf(_)<0?u.push(_):u.updateItem(_),r[_]=0,n[_]=[]),l[_]==l[m]+b&&(r[_]=r[_]+r[m],n[_].push(m))}else for(var x=0;x0;){for(var T=t.pop(),E=0;E0&&o.push(n[s]);o.length!==0&&i.push(r.collection(o))}return i},`assign`),ti=e(function(e,t){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:ai,o=r,s,c,l=0;l=2?di(e,t,n,0,ci,li):di(e,t,n,0,si)},`euclidean`),squaredEuclidean:e(function(e,t,n){return di(e,t,n,0,ci)},`squaredEuclidean`),manhattan:e(function(e,t,n){return di(e,t,n,0,si)},`manhattan`),max:e(function(e,t,n){return di(e,t,n,-1/0,ui)},`max`)};fi[`squared-euclidean`]=fi.squaredEuclidean,fi.squaredeuclidean=fi.squaredEuclidean;function pi(e,t,n,r,i,a){var o=D(e)?e:fi[e]||fi.euclidean;return t===0&&D(e)?o(i,a):o(t,n,r,i,a)}e(pi,`clusteringDistance`);var mi=Kt({k:2,m:2,sensitivityThreshold:1e-4,distance:`euclidean`,maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),hi=e(function(e){return mi(e)},`setOptions`),gi=e(function(t,n,r,i,a){var o=a===`kMedoids`?function(e){return i[e](r)}:function(e){return r[e]},s=e(function(e){return i[e](n)},`getQ`),c=r,l=n;return pi(t,i.length,o,s,c,l)},`getDist`),_i=e(function(e,t,n){for(var r=n.length,i=Array(r),a=Array(r),o=Array(t),s=null,c=0;cn)return!1;return!0},`haveMatricesConverged`),Si=e(function(e,t,n){for(var r=0;ro&&(o=t[c][l],s=l);i[s].push(e[c])}for(var u=0;u=a.threshold||a.mode===`dendrogram`&&t.length===1)return!1;var m=n[o],h=n[i[o]],g=a.mode===`dendrogram`?{left:m,right:h,key:m.key}:{value:m.value.concat(h.value),key:m.key};t[m.index]=g,t.splice(h.index,1),n[m.key]=g;for(var _=0;_r[h.key][v.key]&&(c=r[h.key][v.key])):a.linkage===`max`?(c=r[m.key][v.key],r[m.key][v.key]0&&r.push(i);return r},`findExemplars`),Ki=e(function(e,t,n){for(var r=[],i=0;io&&(a=c,o=t[i*e+c])}a>0&&r.push(a)}for(var l=0;lc&&(s=l,c=u)}n[i]=a[s]}return r=Ki(e,t,n),r},`assign`),Ji=e(function(e){for(var t=this.cy(),n=this.nodes(),r=Hi(e),i={},a=0;a=E?(D=E,E=k,O=A):k>D&&(D=k);for(var j=0;j0);S[w%r.minIterations*o+L]=R,I+=R}if(I>0&&(w>=r.minIterations-1||w==r.maxIterations-1)){for(var z=0,B=0;B1||i>1)&&(s=!0),d[t]=[],e.outgoers().forEach(function(e){e.isEdge()&&d[t].push(e.id())})}else f[t]=[void 0,e.target().id()]}):o.forEach(function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(c?l?s=!0:l=t:c=t),d[t]=[],e.connectedEdges().forEach(function(e){return d[t].push(e.id())})):f[t]=[e.source().id(),e.target().id()]});var p={found:!1,trail:void 0};if(s)return p;if(l&&c){if(a){if(u&&l!=u)return p;u=l}else if(u&&l!=u&&c!=u)return p;else u||=l}else u||=o[0].id();var m=e(function(e){for(var t=e,n=[e],r,i,o;d[t].length;)r=d[t].shift(),i=f[r][0],o=f[r][1],t==o?!a&&t!=i&&(d[i]=d[i].filter(function(e){return e!=r}),t=i):(d[o]=d[o].filter(function(e){return e!=r}),t=o),n.unshift(r),n.unshift(t);return n},`walk`),h=[],g=[];for(g=m(u);g.length!=1;)d[g[0]].length==0?(h.unshift(o.getElementById(g.shift())),h.unshift(o.getElementById(g.shift()))):g=m(g.shift()).concat(g);for(var _ in h.unshift(o.getElementById(g.shift())),d)if(d[_].length)return p;return p.found=!0,p.trail=this.spawn(h,!0),p},`hierholzer`)},Qi=e(function(){var t=this,n={},r=0,i=0,a=[],o=[],s={},c=e(function(e,r){for(var i=o.length-1,s=[],c=t.spawn();o[i].x!=e||o[i].y!=r;)s.push(o.pop().edge),i--;s.push(o.pop().edge),s.forEach(function(e){var r=e.connectedNodes().intersection(t);c.merge(e),r.forEach(function(e){var r=e.id(),i=e.connectedEdges().intersection(t);c.merge(e),n[r].cutVertex?c.merge(i.filter(function(e){return e.isLoop()})):c.merge(i)})}),a.push(c)},`buildComponent`),l=e(function(e,u,d){e===d&&(i+=1),n[u]={id:r,low:r++,cutVertex:!1};var f=t.getElementById(u).connectedEdges().intersection(t);if(f.size()===0)a.push(t.spawn(t.getElementById(u)));else{var p,m,h,g;f.forEach(function(t){p=t.source().id(),m=t.target().id(),h=p===u?m:p,h!==d&&(g=t.id(),s[g]||(s[g]=!0,o.push({x:u,y:h,edge:t})),h in n?n[u].low=Math.min(n[u].low,n[h].id):(l(e,h,u),n[u].low=Math.min(n[u].low,n[h].low),n[u].id<=n[h].low&&(n[u].cutVertex=!0,c(u,h))))})}},`biconnectedSearch`);t.forEach(function(e){if(e.isNode()){var t=e.id();t in n||(i=0,l(t,t),n[t].cutVertex=i>1)}});var u=Object.keys(n).filter(function(e){return n[e].cutVertex}).map(function(e){return t.getElementById(e)});return{cut:t.spawn(u),components:a}},`hopcroftTarjanBiconnected`),$i={hopcroftTarjanBiconnected:Qi,htbc:Qi,htb:Qi,hopcroftTarjanBiconnectedComponents:Qi},ea=e(function(){var t=this,n={},r=0,i=[],a=[],o=t.spawn(t),s=e(function(e){if(a.push(e),n[e]={index:r,low:r++,explored:!1},t.getElementById(e).connectedEdges().intersection(t).forEach(function(t){var r=t.target().id();r!==e&&(r in n||s(r),n[r].explored||(n[e].low=Math.min(n[e].low,n[r].low)))}),n[e].index===n[e].low){for(var c=t.spawn();;){var l=a.pop();if(c.merge(t.getElementById(l)),n[l].low=n[e].index,n[l].explored=!0,l===e)break}var u=c.edgesWith(c),d=c.merge(u);i.push(d),o=o.difference(d)}},`stronglyConnectedSearch`);return t.forEach(function(e){if(e.isNode()){var t=e.id();t in n||s(t)}}),{cut:o,components:i}},`tarjanStronglyConnected`),ta={tarjanStronglyConnected:ea,tsc:ea,tscc:ea,tarjanStronglyConnectedComponents:ea},na={};[an,hn,gn,vn,bn,Sn,En,Rr,Br,Hr,Wr,ii,ji,Bi,Yi,Zi,$i,ta].forEach(function(e){Z(na,e)});var ra=0,ia=1,aa=2,oa=e(function(e){if(!(this instanceof oa))return new oa(e);this.id=`Thenable/1.0.7`,this.state=ra,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e==`function`&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))},`api`);oa.prototype={fulfill:e(function(e){return sa(this,ia,`fulfillValue`,e)},`fulfill`),reject:e(function(e){return sa(this,aa,`rejectReason`,e)},`reject`),then:e(function(e,t){var n=this,r=new oa;return n.onFulfilled.push(ua(e,r,`fulfill`)),n.onRejected.push(ua(t,r,`reject`)),ca(n),r.proxy},`then`)};var sa=e(function(e,t,n,r){return e.state===ra&&(e.state=t,e[n]=r,ca(e)),e},`deliver`),ca=e(function(e){e.state===ia?la(e,`onFulfilled`,e.fulfillValue):e.state===aa&&la(e,`onRejected`,e.rejectReason)},`execute`),la=e(function(t,n,r){if(t[n].length!==0){var i=t[n];t[n]=[];var a=e(function(){for(var e=0;e0},`animatedImpl`)},`animated`),clearQueue:e(function(){return e(function(){var e=this,t=e.length===void 0?[e]:e;if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1}return e(n,`listCacheHas`),Eo=n,Eo}e(Oo,`require_listCacheHas`);var ko,Ao;function jo(){if(Ao)return ko;Ao=1;var t=yo();function n(e,n){var r=this.__data__,i=t(r,e);return i<0?(++this.size,r.push([e,n])):r[i][1]=n,this}return e(n,`listCacheSet`),ko=n,ko}e(jo,`require_listCacheSet`);var Mo,No;function Po(){if(No)return Mo;No=1;var t=po(),n=So(),r=To(),i=Oo(),a=jo();function o(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e0&&this.spawn(r).updateStyle().emit(`class`),t},`classes`),addClass:e(function(e){return this.toggleClass(e,!0)},`addClass`),hasClass:e(function(e){var t=this[0];return t!=null&&t._private.classes.has(e)},`hasClass`),toggleClass:e(function(e,t){O(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=t===void 0,i=[],a=0,o=n.length;a0&&this.spawn(i).updateStyle().emit(`class`),n},`toggleClass`),removeClass:e(function(e){return this.toggleClass(e,!1)},`removeClass`),flashClass:e(function(e,t){var n=this;if(t==null)t=250;else if(t===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},t),n},`flashClass`)};hc.className=hc.classNames=hc.classes;var gc={metaChar:`[\\!\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\\`\\{\\|\\}\\~]`,comparatorOp:`=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=`,boolOp:`\\?|\\!|\\^`,string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:X,meta:`degree|indegree|outdegree`,separator:`\\s*,\\s*`,descendant:`\\s+`,child:`\\s+>\\s+`,subject:`\\$`,group:`node|edge|\\*`,directedEdge:`\\s+->\\s+`,undirectedEdge:`\\s+<->\\s+`};gc.variable=`(?:[\\w-.]|(?:\\\\`+gc.metaChar+`))+`,gc.className=`(?:[\\w-]|(?:\\\\`+gc.metaChar+`))+`,gc.value=gc.string+`|`+gc.number,gc.id=gc.variable,(function(){var e=gc.comparatorOp.split(`|`),t,n;for(n=0;n=0)&&t!==`=`&&(gc.comparatorOp+=`|\\!`+t)})();var _c=e(function(){return{checks:[]}},`newQuery`),Q={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},vc=[{selector:`:selected`,matches:e(function(e){return e.selected()},`matches`)},{selector:`:unselected`,matches:e(function(e){return!e.selected()},`matches`)},{selector:`:selectable`,matches:e(function(e){return e.selectable()},`matches`)},{selector:`:unselectable`,matches:e(function(e){return!e.selectable()},`matches`)},{selector:`:locked`,matches:e(function(e){return e.locked()},`matches`)},{selector:`:unlocked`,matches:e(function(e){return!e.locked()},`matches`)},{selector:`:visible`,matches:e(function(e){return e.visible()},`matches`)},{selector:`:hidden`,matches:e(function(e){return!e.visible()},`matches`)},{selector:`:transparent`,matches:e(function(e){return e.transparent()},`matches`)},{selector:`:grabbed`,matches:e(function(e){return e.grabbed()},`matches`)},{selector:`:free`,matches:e(function(e){return!e.grabbed()},`matches`)},{selector:`:removed`,matches:e(function(e){return e.removed()},`matches`)},{selector:`:inside`,matches:e(function(e){return!e.removed()},`matches`)},{selector:`:grabbable`,matches:e(function(e){return e.grabbable()},`matches`)},{selector:`:ungrabbable`,matches:e(function(e){return!e.grabbable()},`matches`)},{selector:`:animated`,matches:e(function(e){return e.animated()},`matches`)},{selector:`:unanimated`,matches:e(function(e){return!e.animated()},`matches`)},{selector:`:parent`,matches:e(function(e){return e.isParent()},`matches`)},{selector:`:childless`,matches:e(function(e){return e.isChildless()},`matches`)},{selector:`:child`,matches:e(function(e){return e.isChild()},`matches`)},{selector:`:orphan`,matches:e(function(e){return e.isOrphan()},`matches`)},{selector:`:nonorphan`,matches:e(function(e){return e.isChild()},`matches`)},{selector:`:compound`,matches:e(function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()},`matches`)},{selector:`:loop`,matches:e(function(e){return e.isLoop()},`matches`)},{selector:`:simple`,matches:e(function(e){return e.isSimple()},`matches`)},{selector:`:active`,matches:e(function(e){return e.active()},`matches`)},{selector:`:inactive`,matches:e(function(e){return!e.active()},`matches`)},{selector:`:backgrounding`,matches:e(function(e){return e.backgrounding()},`matches`)},{selector:`:nonbackgrounding`,matches:e(function(e){return!e.backgrounding()},`matches`)}].sort(function(e,t){return ce(e.selector,t.selector)}),yc=(function(){for(var e={},t,n=0;n0&&l.edgeCount>0)return zt("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(l.edgeCount>1)return zt("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;l.edgeCount===1&&zt("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},`parse`),toString:e(function(){if(this.toStringCache!=null)return this.toStringCache;for(var t=e(function(e){return e??``},`clean`),n=e(function(e){return E(e)?`"`+e+`"`:t(e)},`cleanVal`),r=e(function(e){return` `+e+` `},`space`),i=e(function(e,i){var o=e.type,s=e.value;switch(o){case Q.GROUP:var c=t(s);return c.substring(0,c.length-1);case Q.DATA_COMPARE:var l=e.field,u=e.operator;return`[`+l+r(t(u))+n(s)+`]`;case Q.DATA_BOOL:var d=e.operator,f=e.field;return`[`+t(d)+f+`]`;case Q.DATA_EXIST:return`[`+e.field+`]`;case Q.META_COMPARE:var p=e.operator;return`[[`+e.field+r(t(p))+n(s)+`]]`;case Q.STATE:return s;case Q.ID:return`#`+s;case Q.CLASS:return`.`+s;case Q.PARENT:case Q.CHILD:return a(e.parent,i)+r(`>`)+a(e.child,i);case Q.ANCESTOR:case Q.DESCENDANT:return a(e.ancestor,i)+` `+a(e.descendant,i);case Q.COMPOUND_SPLIT:var m=a(e.left,i),h=a(e.subject,i),g=a(e.right,i);return m+(m.length>0?` `:``)+h+g;case Q.TRUE:return``}},`checkToString`),a=e(function(e,t){return e.checks.reduce(function(n,r,a){return n+(t===e&&a===0?`$`:``)+i(r,t)},``)},`queryToString`),o=``,s=0;s1&&s=0&&(t=t.replace(`!`,``),u=!0),t.indexOf(`@`)>=0&&(t=t.replace(`@`,``),l=!0),(i||o||l)&&(s=!i&&!a?``:``+e,c=``+n),l&&(e=s=s.toLowerCase(),n=c=c.toLowerCase()),t){case`*=`:r=s.indexOf(c)>=0;break;case`$=`:r=s.indexOf(c,s.length-c.length)>=0;break;case`^=`:r=s.indexOf(c)===0;break;case`=`:r=e===n;break;case`>`:d=!0,r=e>n;break;case`>=`:d=!0,r=e>=n;break;case`<`:d=!0,r=e0;){var l=i.shift();t(l),a.add(l.id()),o&&r(i,a,l)}return e}e(Vc,`forEachCompound`);function Hc(e,t,n){if(n.isParent())for(var r=n._private.children,i=0;i1&&arguments[1]!==void 0?arguments[1]:!0;return Vc(this,e,t,Hc)};function Uc(e,t,n){if(n.isChild()){var r=n._private.parent;t.has(r.id())||e.push(r)}}e(Uc,`addParent`),Bc.forEachUp=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Vc(this,e,t,Uc)};function Wc(e,t,n){Uc(e,t,n),Hc(e,t,n)}e(Wc,`addParentAndChildren`),Bc.forEachUpAndDown=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Vc(this,e,t,Wc)},Bc.ancestors=Bc.parents;var Gc=Kc={data:pc.data({field:`data`,bindingEvent:`data`,allowBinding:!0,allowSetting:!0,settingEvent:`data`,settingTriggersEvent:!0,triggerFnName:`trigger`,allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:pc.removeData({field:`data`,event:`data`,triggerFnName:`trigger`,triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:pc.data({field:`scratch`,bindingEvent:`scratch`,allowBinding:!0,allowSetting:!0,settingEvent:`scratch`,settingTriggersEvent:!0,triggerFnName:`trigger`,allowGetting:!0,updateStyle:!0}),removeScratch:pc.removeData({field:`scratch`,event:`scratch`,triggerFnName:`trigger`,triggerEvent:!0,updateStyle:!0}),rscratch:pc.data({field:`rscratch`,allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:pc.removeData({field:`rscratch`,triggerEvent:!1}),id:e(function(){var e=this[0];if(e)return e._private.data.id},`id`)},Kc;Gc.attr=Gc.data,Gc.removeAttr=Gc.removeData;var qc=Kc,Jc={};function Yc(e){return function(t){var n=this;if(t===void 0&&(t=!0),n.length!==0&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],a=i._private.edges,o=0;ot}),minIndegree:Xc(`indegree`,function(e,t){return et}),minOutdegree:Xc(`outdegree`,function(e,t){return et})}),Z(Jc,{totalDegree:e(function(e){for(var t=0,n=this.nodes(),r=0;r0,d=u;u&&(l=l[0]);var f=d?l.position():{x:0,y:0};t===void 0?i!==void 0&&c.position({x:i.x+f.x,y:i.y+f.y}):c.position(e,t+f[e])}else{var p=n.position(),m=o?n.parent():null,h=m&&m.length>0,g=h;h&&(m=m[0]);var _=g?m.position():{x:0,y:0};return i={x:p.x-_.x,y:p.y-_.y},e===void 0?i:i[e]}}else if(!a)return;return this},`relativePosition`)},Zc.modelPosition=Zc.point=Zc.position,Zc.modelPositions=Zc.points=Zc.positions,Zc.renderedPoint=Zc.renderedPosition,Zc.relativePoint=Zc.relativePosition;var tl=Qc,nl=rl={},rl;rl.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),i=n.pan(),a=t.x1*r+i.x,o=t.x2*r+i.x,s=t.y1*r+i.y,c=t.y2*r+i.y;return{x1:a,x2:o,y1:s,y2:c,w:o-a,h:c-s}},rl.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=this.cy();return!t.styleEnabled()||!t.hasCompoundNodes()||this.forEachUp(function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify(`bounds`)}}),this},rl.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0&&arguments[0],n=this.cy();if(!n.styleEnabled()||!n.hasCompoundNodes()||!t&&n.batching())return this;function r(t){if(!t.isParent())return;var n=t._private,r=t.children(),i=t.pstyle(`compound-sizing-wrt-labels`).value===`include`,a={width:{val:t.pstyle(`min-width`).pfValue,left:t.pstyle(`min-width-bias-left`),right:t.pstyle(`min-width-bias-right`)},height:{val:t.pstyle(`min-height`).pfValue,top:t.pstyle(`min-height-bias-top`),bottom:t.pstyle(`min-height-bias-bottom`)}},o=r.boundingBox({includeLabels:i,includeOverlays:!1,useCache:!1}),s=n.position;(o.w===0||o.h===0)&&(o={w:t.pstyle(`width`).pfValue,h:t.pstyle(`height`).pfValue},o.x1=s.x-o.w/2,o.x2=s.x+o.w/2,o.y1=s.y-o.h/2,o.y2=s.y+o.h/2);function c(e,t,n){var r=0,i=0,a=t+n;return e>0&&a>0&&(r=t/a*e,i=n/a*e),{biasDiff:r,biasComplementDiff:i}}e(c,`computeBiasValues`);function l(e,t,n,r){if(n.units===`%`)switch(r){case`width`:return e>0?n.pfValue*e:0;case`height`:return t>0?n.pfValue*t:0;case`average`:return e>0&&t>0?n.pfValue*(e+t)/2:0;case`min`:return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case`max`:return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}else if(n.units===`px`)return n.pfValue;else return 0}e(l,`computePaddingValues`);var u=a.width.left.value;a.width.left.units===`px`&&a.width.val>0&&(u=u*100/a.width.val);var d=a.width.right.value;a.width.right.units===`px`&&a.width.val>0&&(d=d*100/a.width.val);var f=a.height.top.value;a.height.top.units===`px`&&a.height.val>0&&(f=f*100/a.height.val);var p=a.height.bottom.value;a.height.bottom.units===`px`&&a.height.val>0&&(p=p*100/a.height.val);var m=c(a.width.val-o.w,u,d),h=m.biasDiff,g=m.biasComplementDiff,_=c(a.height.val-o.h,f,p),v=_.biasDiff,y=_.biasComplementDiff;n.autoPadding=l(o.w,o.h,t.pstyle(`padding`),t.pstyle(`padding-relative-to`).value),n.autoWidth=Math.max(o.w,a.width.val),s.x=(-h+o.x1+o.x2+g)/2,n.autoHeight=Math.max(o.h,a.height.val),s.y=(-v+o.y1+o.y2+y)/2}e(r,`update`);for(var i=0;ie.x2?r:e.x2,e.y1=ne.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},`updateBounds`),ol=e(function(e,t){return t==null?e:al(e,t.x1,t.y1,t.x2,t.y2)},`updateBoundsFromBox`),sl=e(function(e,t,n){return Xt(e,t,n)},`prefixedProperty`),cl=e(function(e,t,n){if(!t.cy().headless()){var r=t._private,i=r.rstyle,a=i.arrowWidth/2,o=t.pstyle(n+`-arrow-shape`).value,s,c;if(o!==`none`){n===`source`?(s=i.srcX,c=i.srcY):n===`target`?(s=i.tgtX,c=i.tgtY):(s=i.midX,c=i.midY);var l=r.arrowBounds=r.arrowBounds||{},u=l[n]=l[n]||{};u.x1=s-a,u.y1=c-a,u.x2=s+a,u.y2=c+a,u.w=u.x2-u.x1,u.h=u.y2-u.y1,Zn(u,1),al(e,u.x1,u.y1,u.x2,u.y2)}}},`updateBoundsFromArrow`),ll=e(function(t,n,r){if(!n.cy().headless()){var i=r?r+`-`:``,a=n._private,o=a.rstyle;if(n.pstyle(i+`label`).strValue){var s=n.pstyle(`text-halign`),c=n.pstyle(`text-valign`),l=sl(o,`labelWidth`,r),u=sl(o,`labelHeight`,r),d=sl(o,`labelX`,r),f=sl(o,`labelY`,r),p=n.pstyle(i+`text-margin-x`).pfValue,m=n.pstyle(i+`text-margin-y`).pfValue,h=n.isEdge(),g=n.pstyle(i+`text-rotation`),_=n.pstyle(`text-outline-width`).pfValue,v=n.pstyle(`text-border-width`).pfValue/2,y=n.pstyle(`text-background-padding`).pfValue,b=2,x=u,S=l,C=S/2,w=x/2,T,E,D,O;if(h)T=d-C,E=d+C,D=f-w,O=f+w;else{switch(s.value){case`left`:T=d-S,E=d;break;case`center`:T=d-C,E=d+C;break;case`right`:T=d,E=d+S}switch(c.value){case`top`:D=f-x,O=f;break;case`center`:D=f-w,O=f+w;break;case`bottom`:D=f,O=f+x}}var k=p-Math.max(_,v)-y-b,A=p+Math.max(_,v)+y+b,j=m-Math.max(_,v)-y-b,M=m+Math.max(_,v)+y+b;T+=k,E+=A,D+=j,O+=M;var N=r||`main`,P=a.labelBounds,F=P[N]=P[N]||{};F.x1=T,F.y1=D,F.x2=E,F.y2=O,F.w=E-T,F.h=O-D,F.leftPad=k,F.rightPad=A,F.topPad=j,F.botPad=M;var I=h&&g.strValue===`autorotate`,L=g.pfValue!=null&&g.pfValue!==0;if(I||L){var R=I?sl(a.rstyle,`labelAngle`,r):g.pfValue,z=Math.cos(R),B=Math.sin(R),V=(T+E)/2,H=(D+O)/2;if(!h){switch(s.value){case`left`:V=E;break;case`right`:V=T}switch(c.value){case`top`:H=O;break;case`bottom`:H=D}}var U=e(function(e,t){return e-=V,t-=H,{x:e*z-t*B+V,y:e*B+t*z+H}},`rotate`),W=U(T,D),G=U(T,O),K=U(E,D),q=U(E,O);T=Math.min(W.x,G.x,K.x,q.x),E=Math.max(W.x,G.x,K.x,q.x),D=Math.min(W.y,G.y,K.y,q.y),O=Math.max(W.y,G.y,K.y,q.y)}var J=N+`Rot`,Y=P[J]=P[J]||{};Y.x1=T,Y.y1=D,Y.x2=E,Y.y2=O,Y.w=E-T,Y.h=O-D,al(t,T,D,E,O),al(a.labelBounds.all,T,D,E,O)}return t}},`updateBoundsFromLabel`),ul=e(function(e,t){if(!t.cy().headless()){var n=t.pstyle(`outline-opacity`).value,r=t.pstyle(`outline-width`).value+t.pstyle(`outline-offset`).value;dl(e,t,n,r,`outside`,r/2)}},`updateBoundsFromOutline`),dl=e(function(e,t,n,r,i,a){if(!(n===0||r<=0||i===`inside`)){var o=t.cy().renderer(),s=o.nodeShapes[o.getNodeShape(t)];if(s){var c=t.position(),l=c.x,u=c.y,d=t.width(),f=t.height();s.hasMiterBounds?(i===`center`&&(r/=2),ol(e,s.miterBounds(l,u,d,f,r))):a!=null&&a>0&&Qn(e,[a,a,a,a])}}},`updateBoundsFromMiter`),fl=e(function(e,t){if(!t.cy().headless()){var n=t.pstyle(`border-opacity`).value,r=t.pstyle(`border-width`).pfValue,i=t.pstyle(`border-position`).value;dl(e,t,n,r,i)}},`updateBoundsFromMiterBorder`),pl=e(function(t,n){var r=t._private.cy,i=r.styleEnabled(),a=r.headless(),o=Kn(),s=t._private,c=t.isNode(),l=t.isEdge(),u,d,f,p,m,h,g=s.rstyle,_=c&&i?t.pstyle(`bounds-expansion`).pfValue:[0],v=e(function(e){return e.pstyle(`display`).value!==`none`},`isDisplayed`),y=!i||v(t)&&(!l||v(t.source())&&v(t.target()));if(y){var b=0,x=0;i&&n.includeOverlays&&(b=t.pstyle(`overlay-opacity`).value,b!==0&&(x=t.pstyle(`overlay-padding`).value));var S=0,C=0;i&&n.includeUnderlays&&(S=t.pstyle(`underlay-opacity`).value,S!==0&&(C=t.pstyle(`underlay-padding`).value));var w=Math.max(x,C),T=0,E=0;if(i&&(T=t.pstyle(`width`).pfValue,E=T/2),c&&n.includeNodes){var D=t.position();m=D.x,h=D.y;var O=t.outerWidth()/2,k=t.outerHeight()/2;u=m-O,d=m+O,f=h-k,p=h+k,al(o,u,f,d,p),i&&ul(o,t),i&&n.includeOutlines&&!a&&ul(o,t),i&&fl(o,t)}else if(l&&n.includeEdges){if(i&&!a){var A=t.pstyle(`curve-style`).strValue;if(u=Math.min(g.srcX,g.midX,g.tgtX),d=Math.max(g.srcX,g.midX,g.tgtX),f=Math.min(g.srcY,g.midY,g.tgtY),p=Math.max(g.srcY,g.midY,g.tgtY),u-=E,d+=E,f-=E,p+=E,al(o,u,f,d,p),A===`haystack`){var j=g.haystackPts;if(j&&j.length===2){if(u=j[0].x,f=j[0].y,d=j[1].x,p=j[1].y,u>d){var M=u;u=d,d=M}if(f>p){var N=f;f=p,p=N}al(o,u-E,f-E,d+E,p+E)}}else if(A===`bezier`||A===`unbundled-bezier`||ee(A,`segments`)||ee(A,`taxi`)){var P;switch(A){case`bezier`:case`unbundled-bezier`:P=g.bezierPts;break;case`segments`:case`taxi`:case`round-segments`:case`round-taxi`:P=g.linePts}if(P!=null)for(var F=0;Fd){var z=u;u=d,d=z}if(f>p){var B=f;f=p,p=B}u-=E,d+=E,f-=E,p+=E,al(o,u,f,d,p)}}if(i&&n.includeEdges&&l&&(cl(o,t,`mid-source`),cl(o,t,`mid-target`),cl(o,t,`source`),cl(o,t,`target`)),i&&t.pstyle(`ghost`).value===`yes`){var V=t.pstyle(`ghost-offset-x`).pfValue,H=t.pstyle(`ghost-offset-y`).pfValue;al(o,o.x1+V,o.y1+H,o.x2+V,o.y2+H)}var U=s.bodyBounds=s.bodyBounds||{};$n(U,o),Qn(U,_),Zn(U,1),i&&(u=o.x1,d=o.x2,f=o.y1,p=o.y2,al(o,u-w,f-w,d+w,p+w));var W=s.overlayBounds=s.overlayBounds||{};$n(W,o),Qn(W,_),Zn(W,1);var G=s.labelBounds=s.labelBounds||{};G.all==null?G.all=Kn():Jn(G.all),i&&n.includeLabels&&(n.includeMainLabels&&ll(o,t,null),l&&(n.includeSourceLabels&&ll(o,t,`source`),n.includeTargetLabels&&ll(o,t,`target`)))}return o.x1=il(o.x1),o.y1=il(o.y1),o.x2=il(o.x2),o.y2=il(o.y2),o.w=il(o.x2-o.x1),o.h=il(o.y2-o.y1),o.w>0&&o.h>0&&y&&(Qn(o,_),Zn(o,1)),o},`boundingBoxImpl`),ml=e(function(t){var n=0,r=e(function(e){return+!!e<0&&arguments[0]!==void 0?arguments[0]:Rl,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;c--)s(c);return this},Bl.removeAllListeners=function(){return this.removeListener(`*`)},Bl.emit=Bl.trigger=function(t,n,r){var i=this.listeners,a=i.length;return this.emitting++,O(n)||(n=[n]),Ul(this,function(t,o){r!=null&&(i=[{event:o.event,type:o.type,namespace:o.namespace,callback:r}],a=i.length);for(var s=e(function(){var e=i[c];if(e.type===o.type&&(!e.namespace||e.namespace===o.namespace||e.namespace===Fl)&&t.eventMatches(t.context,e,o)){var r=[o];n!=null&&Yt(r,n),t.beforeEmit(t.context,e,o),e.conf&&e.conf.one&&(t.listeners=t.listeners.filter(function(t){return t!==e}));var a=t.callbackContext(t.context,e,o),s=e.callback.apply(a,r);t.afterEmit(t.context,e,o),s===!1&&(o.stopPropagation(),o.preventDefault())}},`_loop2`),c=0;c1&&!r){var i=this.length-1,a=this[i],o=a._private.data.id;this[i]=void 0,this[e]=a,n.set(o,{ele:a,index:e})}return this.length--,this},`unmergeAt`),unmergeOne:e(function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this},`unmergeOne`),unmerge:e(function(e){var t=this._private.cy;if(!e)return this;if(e&&E(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--){var n=this[t];e(n)&&this.unmergeAt(t)}return this},`unmergeBy`),map:e(function(e,t){for(var n=[],r=this,i=0;in&&(n=s,r=o)}return{value:n,ele:r}},`max`),min:e(function(e,t){for(var n=1/0,r,i=this,a=0;a=0&&i`u`?`undefined`:_(Symbol))!=t&&_(Symbol.iterator)!=t&&(Zl[Symbol.iterator]=function(){var t=this,n={value:void 0,done:!1},r=0,i=this.length;return c({next:e(function(){return r1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],r=n.cy();if(r.styleEnabled()&&n)return n._private.styleDirty&&(n._private.styleDirty=!1,r.style().apply(n)),n._private.style[e]??(t?r.style().getDefaultProperty(e):null)},`parsedStyle`),numericStyle:e(function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return n.pfValue===void 0?n.value:n.pfValue}},`numericStyle`),numericStyleUnits:e(function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},`numericStyleUnits`),renderedStyle:e(function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];if(n)return t.style().getRenderedStyle(n,e)},`renderedStyle`),style:e(function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,i=n.style();if(k(e)){var a=e;i.applyBypass(this,a,r),this.emitAndNotify(`style`)}else if(E(e)){if(t===void 0){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}i.applyBypass(this,e,t,r),this.emitAndNotify(`style`)}else if(e===void 0){var s=this[0];return s?i.getRawStyle(s):void 0}return this},`style`),removeStyle:e(function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),i=this;if(e===void 0)for(var a=0;a0&&t.push(u[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)},`neighborhood`),closedNeighborhood:e(function(e){return this.neighborhood().add(this).filter(e)},`closedNeighborhood`),openNeighborhood:e(function(e){return this.neighborhood(e)},`openNeighborhood`)}),uu.neighbourhood=uu.neighborhood,uu.closedNeighbourhood=uu.closedNeighborhood,uu.openNeighbourhood=uu.openNeighborhood,Z(uu,{source:zc(e(function(e){var t=this[0],n;return t&&(n=t._private.source||t.cy().collection()),n&&e?n.filter(e):n},`sourceImpl`),`source`),target:zc(e(function(e){var t=this[0],n;return t&&(n=t._private.target||t.cy().collection()),n&&e?n.filter(e):n},`targetImpl`),`target`),sources:mu({attr:`source`}),targets:mu({attr:`target`})});function mu(t){return e(function(e){for(var n=[],r=0;r0);return o},`components`),component:e(function(){var e=this[0];return e.cy().mutableElements().components(e)[0]},`component`)}),uu.componentsOf=uu.components;var _u=e(function(t,n){var r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],i=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(t===void 0){Lt(`A collection must have a reference to the core`);return}var a=new Qt,o=!1;if(!n)n=[];else if(n.length>0&&k(n[0])&&!F(n[0])){o=!0;for(var s=[],c=new tn,l=0,u=n.length;l0&&arguments[0]!==void 0?arguments[0]:!0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,i=r.cy(),a=i._private,o=[],s=[],c,l=0,u=r.length;l0){for(var L=c.length===r.length?r:new _u(i,c),R=0;R0&&arguments[0]!==void 0?arguments[0]:!0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,i=[],a={},o=r._private.cy;function s(e){for(var t=e._private.edges,n=0;n0&&(t?D.emitAndNotify(`remove`):n&&D.emit(`remove`));for(var O=0;O0?i=o:n=o;while(Math.abs(a)>1e-7&&++s<10);return o}e(_,`binarySubdivide`);function v(e){for(var n=0,i=1,s=a-1;i!==s&&l[i]<=e;++i)n+=o;--i;var c=(e-l[i])/(l[i+1]-l[i]),u=n+c*o,d=m(u,t,r);return d>=.001?h(e,u):d===0?u:_(e,n,n+o)}e(v,`getTForX`);var y=!1;function b(){y=!0,(t!==n||r!==i)&&g()}e(b,`precompute`);var x=e(function(e){return y||b(),t===n&&r===i?e:e===0?0:e===1?1:p(v(e),n,i)},`f`);x.getControlPoints=function(){return[{x:t,y:n},{x:r,y:i}]};var S=`generateBezier(`+[t,n,r,i]+`)`;return x.toString=function(){return S},x}e(bu,`generateCubicBezier`);var xu=(function(){function t(e){return-e.tension*e.x-e.friction*e.v}e(t,`springAccelerationForState`);function n(e,n,r){var i={x:e.x+r.dx*n,v:e.v+r.dv*n,tension:e.tension,friction:e.friction};return{dx:i.v,dv:t(i)}}e(n,`springEvaluateStateWithDerivative`);function r(e,r){var i={dx:e.v,dv:t(e)},a=n(e,r*.5,i),o=n(e,r*.5,a),s=n(e,r,o),c=1/6*(i.dx+2*(a.dx+o.dx)+s.dx),l=1/6*(i.dv+2*(a.dv+o.dv)+s.dv);return e.x+=c*r,e.v+=l*r,e}return e(r,`springIntegrateState`),e(function e(t,n,i){var a={x:-1,v:0,tension:null,friction:null},o=[0],s=0,c=1/1e4,l=16/1e3,u,d,f;for(t=parseFloat(t)||500,n=parseFloat(n)||20,i||=null,a.tension=t,a.friction=n,u=i!==null,u?(s=e(t,n),d=s/i*l):d=l;f=r(f||a,d),o.push(1+f.x),s+=16,Math.abs(f.x)>c&&Math.abs(f.v)>c;);return u?function(e){return o[e*(o.length-1)|0]}:s},`springRK4Factory`)})(),Su=e(function(e,t,n,r){var i=bu(e,t,n,r);return function(e,t,n){return e+(t-e)*i(n)}},`cubicBezier`),Cu={linear:e(function(e,t,n){return e+(t-e)*n},`linear`),ease:Su(.25,.1,.25,1),"ease-in":Su(.42,0,1,1),"ease-out":Su(0,0,.58,1),"ease-in-out":Su(.42,0,.58,1),"ease-in-sine":Su(.47,0,.745,.715),"ease-out-sine":Su(.39,.575,.565,1),"ease-in-out-sine":Su(.445,.05,.55,.95),"ease-in-quad":Su(.55,.085,.68,.53),"ease-out-quad":Su(.25,.46,.45,.94),"ease-in-out-quad":Su(.455,.03,.515,.955),"ease-in-cubic":Su(.55,.055,.675,.19),"ease-out-cubic":Su(.215,.61,.355,1),"ease-in-out-cubic":Su(.645,.045,.355,1),"ease-in-quart":Su(.895,.03,.685,.22),"ease-out-quart":Su(.165,.84,.44,1),"ease-in-out-quart":Su(.77,0,.175,1),"ease-in-quint":Su(.755,.05,.855,.06),"ease-out-quint":Su(.23,1,.32,1),"ease-in-out-quint":Su(.86,0,.07,1),"ease-in-expo":Su(.95,.05,.795,.035),"ease-out-expo":Su(.19,1,.22,1),"ease-in-out-expo":Su(1,0,0,1),"ease-in-circ":Su(.6,.04,.98,.335),"ease-out-circ":Su(.075,.82,.165,1),"ease-in-out-circ":Su(.785,.135,.15,.86),spring:e(function(e,t,n){if(n===0)return Cu.linear;var r=xu(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},`spring`),"cubic-bezier":Su};function wu(e,t,n,r,i){if(r===1||t===n)return n;var a=i(t,n,r);return e==null?a:((e.roundValue||e.color)&&(a=Math.round(a)),e.min!==void 0&&(a=Math.max(a,e.min)),e.max!==void 0&&(a=Math.min(a,e.max)),a)}e(wu,`getEasedValue`);function Tu(e,t){return e.pfValue!=null||e.value!=null?e.pfValue!=null&&(t==null||t.type.units!==`%`)?e.pfValue:e.value:e}e(Tu,`getValue`);function Eu(e,t,n,r,i){var a=i==null?null:i.type;n<0?n=0:n>1&&(n=1);var o=Tu(e,i),s=Tu(t,i);if(j(o)&&j(s))return wu(a,o,s,n,r);if(O(o)&&O(s)){for(var c=[],l=0;l0?(d===`spring`&&f.push(o.duration),o.easingImpl=Cu[d].apply(null,f)):o.easingImpl=Cu[d]}}var p=o.easingImpl,m=o.duration===0?1:(n-c)/o.duration;if(o.applying&&(m=o.progress),m<0?m=0:m>1&&(m=1),o.delay==null){var h=o.startPosition,g=o.position;if(g&&i&&!e.locked()){var _={};Ou(h.x,g.x)&&(_.x=Eu(h.x,g.x,m,p)),Ou(h.y,g.y)&&(_.y=Eu(h.y,g.y,m,p)),e.position(_)}var v=o.startPan,y=o.pan,b=a.pan,x=y!=null&&r;x&&(Ou(v.x,y.x)&&(b.x=Eu(v.x,y.x,m,p)),Ou(v.y,y.y)&&(b.y=Eu(v.y,y.y,m,p)),e.emit(`pan`));var S=o.startZoom,C=o.zoom,w=C!=null&&r;w&&(Ou(S,C)&&(a.zoom=Gn(a.minZoom,Eu(S,C,m,p),a.maxZoom)),e.emit(`zoom`)),(x||w)&&e.emit(`viewport`);var T=o.style;if(T&&T.length>0&&i){for(var D=0;D=0;t--){var n=e[t];n()}e.splice(0,e.length)},`callbacks`),d=o.length-1;d>=0;d--){var f=o[d],p=f._private;if(p.stopped){o.splice(d,1),p.hooked=!1,p.playing=!1,p.started=!1,u(p.frames);continue}!p.playing&&!p.applying||(p.playing&&p.applying&&(p.applying=!1),p.started||ku(n,f,t),Du(n,f,t,r),p.applying&&=!1,u(p.frames),p.step!=null&&p.step(t),f.completed()&&(o.splice(d,1),p.hooked=!1,p.playing=!1,p.started=!1,u(p.completes)),c=!0)}return!r&&o.length===0&&s.length===0&&i.push(n),c}e(a,`stepOne`);for(var o=!1,s=0;s0?n.notify(`draw`,r):n.notify(`draw`)),r.unmerge(i),n.emit(`step`)}e(Au,`stepAll`);var ju={animate:pc.animate(),animation:pc.animation(),animated:pc.animated(),clearQueue:pc.clearQueue(),delay:pc.delay(),delayAnimation:pc.delayAnimation(),stop:pc.stop(),addToAnimationPool:e(function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},`addToAnimationPool`),stopAnimationLoop:e(function(){this._private.animationsRunning=!1},`stopAnimationLoop`),startAnimationLoop:e(function(){var t=this;if(t._private.animationsRunning=!0,!t.styleEnabled())return;function n(){t._private.animationsRunning&&dt(e(function(e){Au(e,t),n()},`animationStep`))}e(n,`headlessStep`);var r=t.renderer();r&&r.beforeRender?r.beforeRender(e(function(e,n){Au(n,t)},`rendererAnimationStep`),r.beforeRenderPriorities.animations):n()},`startAnimationLoop`)},Mu={qualifierCompare:e(function(e,t){return e==null||t==null?e==null&&t==null:e.sameText(t)},`qualifierCompare`),eventMatches:e(function(e,t,n){var r=t.qualifier;return r==null||e!==n.target&&F(n.target)&&r.matches(n.target)},`eventMatches`),addEventFields:e(function(e,t){t.cy=e,t.target=e},`addEventFields`),callbackContext:e(function(e,t,n){return t.qualifier==null?e:n.target},`callbackContext`)},Nu=e(function(e){return E(e)?new Ic(e):e},`argSelector`),Pu={createEmitter:e(function(){var e=this._private;return e.emitter||=new zl(Mu,this),this},`createEmitter`),emitter:e(function(){return this._private.emitter},`emitter`),on:e(function(e,t,n){return this.emitter().on(e,Nu(t),n),this},`on`),removeListener:e(function(e,t,n){return this.emitter().removeListener(e,Nu(t),n),this},`removeListener`),removeAllListeners:e(function(){return this.emitter().removeAllListeners(),this},`removeAllListeners`),one:e(function(e,t,n){return this.emitter().one(e,Nu(t),n),this},`one`),once:e(function(e,t,n){return this.emitter().one(e,Nu(t),n),this},`once`),emit:e(function(e,t){return this.emitter().emit(e,t),this},`emit`),emitAndNotify:e(function(e,t){return this.emit(e),this.notify(e,t),this},`emitAndNotify`)};pc.eventAliasesOn(Pu);var Fu={png:e(function(e){var t=this._private.renderer;return e||={},t.png(e)},`png`),jpg:e(function(e){var t=this._private.renderer;return e||={},e.bg=e.bg||`#fff`,t.jpg(e)},`jpg`)};Fu.jpeg=Fu.jpg;var Iu={layout:e(function(e){var t=this;if(e==null){Lt(`Layout options must be specified to make a layout`);return}if(e.name==null){Lt("A `name` must be specified to make a layout");return}var n=e.name,r=t.extension(`layout`,n);if(r==null){Lt("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}return new r(Z({},e,{cy:t,eles:E(e.eles)?t.$(e.eles):e.eles==null?t.$():e.eles}))},`layout`)};Iu.createLayout=Iu.makeLayout=Iu.layout;var Lu={notify:e(function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();t!=null&&r.merge(t);return}if(n.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,t)}},`notify`),notifications:e(function(e){var t=this._private;return e===void 0?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},`notifications`),noNotifications:e(function(e){this.notifications(!1),e(),this.notifications(!0)},`noNotifications`),batching:e(function(){return this._private.batchCount>0},`batching`),startBatch:e(function(){var e=this._private;return e.batchCount??=0,e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},`startBatch`),endBatch:e(function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)})}return this},`endBatch`),batch:e(function(e){return this.startBatch(),e(),this.endBatch(),this},`batch`),batchData:e(function(e){var t=this;return this.batch(function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]})},`destroyRenderer`),onRender:e(function(e){return this.on(`render`,e)},`onRender`),offRender:e(function(e){return this.off(`render`,e)},`offRender`)};zu.invalidateDimensions=zu.resize;var Bu={collection:e(function(e,t){return E(e)?this.$(e):P(e)?e.collection():O(e)?(t||={},new _u(this,e,t.unique,t.removed)):new _u(this)},`collection`),nodes:e(function(e){var t=this.$(function(e){return e.isNode()});return e?t.filter(e):t},`nodes`),edges:e(function(e){var t=this.$(function(e){return e.isEdge()});return e?t.filter(e):t},`edges`),$:e(function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},`$`),mutableElements:e(function(){return this._private.elements},`mutableElements`)};Bu.elements=Bu.filter=Bu.$;var Vu={},Hu=`t`,Uu=`f`;Vu.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(f||d&&p){var m=void 0;f&&p||f?m=l.properties:p&&(m=l.mappedProperties);for(var h=0;h1&&(x=1),c.color){var C=i.valueMin[0],w=i.valueMax[0],T=i.valueMin[1],E=i.valueMax[1],D=i.valueMin[2],O=i.valueMax[2],k=i.valueMin[3]==null?1:i.valueMin[3],A=i.valueMax[3]==null?1:i.valueMax[3],M=[Math.round(C+(w-C)*x),Math.round(T+(E-T)*x),Math.round(D+(O-D)*x),Math.round(k+(A-k)*x)];o={bypass:i.bypass,name:i.name,value:M,strValue:`rgb(`+M[0]+`, `+M[1]+`, `+M[2]+`)`}}else if(c.number){var N=i.valueMin+(i.valueMax-i.valueMin)*x;o=this.parse(i.name,N,i.bypass,p)}else return!1;if(!o)return g(),!1;o.mapping=i,i=o;break;case s.data:for(var P=i.field.split(`.`),F=f.data,I=0;I0&&a>0){for(var s={},c=!1,l=0;l0?e.delayAnimation(o).play().promise().then(t):t()}).then(function(){return e.animation({style:s,duration:a,easing:e.pstyle(`transition-timing-function`).value,queue:!1}).play().promise()}).then(function(){n.removeBypasses(e,i),e.emitAndNotify(`style`),r.transitioning=!1})}else r.transitioning&&=(this.removeBypasses(e,i),e.emitAndNotify(`style`),!1)},Vu.checkTrigger=function(e,t,n,r,i,a){var o=this.properties[t],s=i(o);e.removed()||s!=null&&s(n,r,e)&&a(o)},Vu.checkZOrderTrigger=function(e,t,n,r){var i=this;this.checkTrigger(e,t,n,r,function(e){return e.triggersZOrder},function(){i._private.cy.notify(`zorder`,e)})},Vu.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBounds},function(t){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache()})},Vu.checkConnectedEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfConnectedEdges},function(t){e.connectedEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},Vu.checkParallelEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfParallelEdges},function(t){e.parallelEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},Vu.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r),this.checkConnectedEdgesBoundsTrigger(e,t,n,r),this.checkParallelEdgesBoundsTrigger(e,t,n,r)};var Wu={};Wu.applyBypass=function(e,t,n,r){var i=this,a=[],o=!0;if(t===`*`||t===`**`){if(n!==void 0)for(var s=0;sa.length?i.substr(a.length):``}e(c,`removeSelAndBlockFromRemaining`);function l(){o=o.length>s.length?o.substr(s.length):``}for(e(l,`removePropAndValFromRem`);!i.match(/^\s*$/);){var u=i.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!u){zt(`Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: `+i);break}a=u[0];var d=u[1];if(d!==`core`&&new Ic(d).invalid){zt(`Skipping parsing of block: Invalid selector found in string stylesheet: `+d),c();continue}var f=u[2],p=!1;o=f;for(var m=[];!o.match(/^\s*$/);){var h=o.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!h){zt(`Skipping parsing of block: Invalid formatting of style property and value definitions found in:`+f),p=!0;break}s=h[0];var g=h[1],_=h[2];if(!n.properties[g]){zt(`Skipping property: Invalid property name in: `+s),l();continue}if(!r.parse(g,_)){zt(`Skipping property: Invalid property definition in: `+s),l();continue}m.push({name:g,val:_}),l()}if(p){c();break}r.selector(d);for(var v=0;v=7&&n[0]===`d`&&(d=new RegExp(c.data.regex).exec(n))){if(r)return!1;var p=c.data;return{name:t,value:d,strValue:``+n,mapped:p,field:d[1],bypass:r}}if(n.length>=10&&n[0]===`m`&&(f=new RegExp(c.mapData.regex).exec(n))){if(r||u.multiple)return!1;var m=c.mapData;if(!(u.color||u.number))return!1;var h=this.parse(t,f[4]);if(!h||h.mapped)return!1;var g=this.parse(t,f[5]);if(!g||g.mapped)return!1;if(h.pfValue===g.pfValue||h.strValue===g.strValue)return zt("`"+t+`: `+n+"` is not a valid mapper because the output range is zero; converting to `"+t+`: `+h.strValue+"`"),this.parse(t,h.strValue);if(u.color){var _=h.value,v=g.value;if(_[0]===v[0]&&_[1]===v[1]&&_[2]===v[2]&&(_[3]===v[3]||(_[3]==null||_[3]===1)&&(v[3]==null||v[3]===1)))return!1}return{name:t,value:f,strValue:``+n,mapped:m,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:h.value,valueMax:g.value,bypass:r}}}if(u.multiple&&i!==`multiple`){var y=l?n.split(/\s+/):O(n)?n:[n];if(u.evenMultiple&&y.length%2!=0)return null;for(var b=[],x=[],S=[],C=``,w=!1,T=0;T0?` `:``)+k.strValue}return u.validate&&!u.validate(b,x)?null:u.singleEnum&&w?b.length===1&&E(b[0])?{name:t,value:b[0],strValue:b[0],bypass:r}:null:{name:t,value:b,pfValue:S,strValue:C,bypass:r,units:x}}var A=e(function(){for(var e=0;eu.max||u.strictMax&&n===u.max))return null;var I={name:t,value:n,strValue:``+n+(j||``),units:j,bypass:r};return I.pfValue=u.unitless||j!==`px`&&j!==`em`||j===`px`||!j?n:this.getEmSizeInPixels()*n,(j===`ms`||j===`s`)&&(I.pfValue=j===`ms`?n:1e3*n),(j===`deg`||j===`rad`)&&(I.pfValue=j===`rad`?n:Fn(n)),j===`%`&&(I.pfValue=n/100),I}if(u.propList){var L=[],R=``+n;if(R!==`none`){for(var z=R.split(/\s*,\s*|\s+/),B=0;B0&&o>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){s=Math.min((a-2*t)/n.w,(o-2*t)/n.h),s=s>this._private.maxZoom?this._private.maxZoom:s,s=s=n.minZoom&&(n.maxZoom=t),this},`zoomRange`),minZoom:e(function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},`minZoom`),maxZoom:e(function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},`maxZoom`),getZoomedViewport:e(function(e){var t=this._private,n=t.pan,r=t.zoom,i,a,o=!1;if(t.zoomingEnabled||(o=!0),j(e)?a=e:k(e)&&(a=e.level,e.position==null?e.renderedPosition!=null&&(i=e.renderedPosition):i=On(e.position,r,n),i!=null&&!t.panningEnabled&&(o=!0)),a=a>t.maxZoom?t.maxZoom:a,a=at.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=s,i.push(`zoom`))}if(r&&(!a||!e.cancelOnFailedZoom)&&t.panningEnabled){var c=e.pan;j(c.x)&&(t.pan.x=c.x,o=!1),j(c.y)&&(t.pan.y=c.y,o=!1),o||i.push(`pan`)}return i.length>0&&(i.push(`viewport`),this.emit(i.join(` `)),this.notify(`viewport`)),this},`viewport`),center:e(function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit(`pan viewport`),this.notify(`viewport`)),this},`center`),getCenterPan:e(function(e,t){if(this._private.panningEnabled){if(E(e)){var n=e;e=this.mutableElements().filter(n)}else P(e)||(e=this.mutableElements());if(e.length!==0){var r=e.boundingBox(),i=this.width(),a=this.height();return t=t===void 0?this._private.zoom:t,{x:(i-t*(r.x1+r.x2))/2,y:(a-t*(r.y1+r.y2))/2}}}},`getCenterPan`),reset:e(function(){return!this._private.panningEnabled||!this._private.zoomingEnabled||this.viewport({pan:{x:0,y:0},zoom:1}),this},`reset`),invalidateSize:e(function(){this._private.sizeCache=null},`invalidateSize`),size:e(function(){var t=this._private,n=t.container,r=this;return t.sizeCache=t.sizeCache||(n?(function(){var t=r.window().getComputedStyle(n),i=e(function(e){return parseFloat(t.getPropertyValue(e))},`val`);return{width:n.clientWidth-i(`padding-left`)-i(`padding-right`),height:n.clientHeight-i(`padding-top`)-i(`padding-bottom`)}})():{width:1,height:1})},`size`),width:e(function(){return this.size().width},`width`),height:e(function(){return this.size().height},`height`),extent:e(function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},`extent`),renderedExtent:e(function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},`renderedExtent`),multiClickDebounceTime:e(function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this},`multiClickDebounceTime`)};td.centre=td.center,td.autolockNodes=td.autolock,td.autoungrabifyNodes=td.autoungrabify;var nd={data:pc.data({field:`data`,bindingEvent:`data`,allowBinding:!0,allowSetting:!0,settingEvent:`data`,settingTriggersEvent:!0,triggerFnName:`trigger`,allowGetting:!0,updateStyle:!0}),removeData:pc.removeData({field:`data`,event:`data`,triggerFnName:`trigger`,triggerEvent:!0,updateStyle:!0}),scratch:pc.data({field:`scratch`,bindingEvent:`scratch`,allowBinding:!0,allowSetting:!0,settingEvent:`scratch`,settingTriggersEvent:!0,triggerFnName:`trigger`,allowGetting:!0,updateStyle:!0}),removeScratch:pc.removeData({field:`scratch`,event:`scratch`,triggerFnName:`trigger`,triggerEvent:!0,updateStyle:!0})};nd.attr=nd.data,nd.removeAttr=nd.removeData;var rd=e(function(t){var n=this;t=Z({},t);var r=t.container;r&&!N(r)&&N(r[0])&&(r=r[0]);var i=r?r._cyreg:null;i||={},i&&i.cy&&(i.cy.destroy(),i={});var a=i.readies=i.readies||[];r&&(r._cyreg=i),i.cy=n;var o=y!==void 0&&r!==void 0&&!t.headless,s=t;s.layout=Z({name:o?`grid`:`null`},s.layout),s.renderer=Z({name:o?`canvas`:`null`},s.renderer);var c=e(function(e,t,n){return t===void 0?n===void 0?e:n:t},`defVal`),l=this._private={container:r,ready:!1,options:s,elements:new _u(this),listeners:[],aniEles:new _u(this),data:s.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:c(!0,s.zoomingEnabled),userZoomingEnabled:c(!0,s.userZoomingEnabled),panningEnabled:c(!0,s.panningEnabled),userPanningEnabled:c(!0,s.userPanningEnabled),boxSelectionEnabled:c(!0,s.boxSelectionEnabled),autolock:c(!1,s.autolock,s.autolockNodes),autoungrabify:c(!1,s.autoungrabify,s.autoungrabifyNodes),autounselectify:c(!1,s.autounselectify),styleEnabled:s.styleEnabled===void 0?o:s.styleEnabled,zoom:j(s.zoom)?s.zoom:1,pan:{x:k(s.pan)&&j(s.pan.x)?s.pan.x:0,y:k(s.pan)&&j(s.pan.y)?s.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:c(250,s.multiClickDebounceTime)};this.createEmitter(),this.selectionType(s.selectionType),this.zoomRange({min:s.minZoom,max:s.maxZoom});var u=e(function(e,t){if(e.some(U))return fa.all(e).then(t);t(e)},`loadExtData`);l.styleEnabled&&n.setStyle([]);var d=Z({},s,s.renderer);n.initRenderer(d);var f=e(function(e,t,r){n.notifications(!1);var i=n.mutableElements();i.length>0&&i.remove(),e!=null&&(k(e)||O(e))&&n.add(e),n.one(`layoutready`,function(e){n.notifications(!0),n.emit(e),n.one(`load`,t),n.emitAndNotify(`load`)}).one(`layoutstop`,function(){n.one(`done`,r),n.emit(`done`)});var a=Z({},n._private.options.layout);a.eles=n.elements(),n.layout(a).run()},`setElesAndLayout`);u([s.style,s.elements],function(e){var t=e[0],r=e[1];l.styleEnabled&&n.style().append(t),f(r,function(){n.startAnimationLoop(),l.ready=!0,D(s.ready)&&n.on(`ready`,s.ready);for(var e=0;e0,c=!!t.boundingBox,l=Kn(c?t.boundingBox:structuredClone(n.extent())),u;if(P(t.roots))u=t.roots;else if(O(t.roots)){for(var d=[],f=0;f0;){var N=M(),F=D(N,A);if(F)N.outgoers().filter(function(e){return e.isNode()&&r.has(e)}).forEach(j);else if(F===null){zt("Detected double maximal shift for node `"+N.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var I=0;if(t.avoidOverlap)for(var L=0;L0&&v[0].length<=3?a/2:0),s=2*Math.PI/v[r].length*i;return r===0&&v[0].length===1&&(o=1),{x:X.x+o*Math.cos(s),y:X.y+o*Math.sin(s)}}var u=v[r].length,d=Math.max(u===1?0:c?(l.w-t.padding*2-te.w)/((t.grid?re:u)-1):(l.w-t.padding*2-te.w)/((t.grid?re:u)+1),I);return{x:X.x+(i+1-(u+1)/2)*d,y:X.y+(r+1-(W+1)/2)*ne}},`getPositionTopBottom`),ae={downward:0,leftward:90,upward:180,rightward:-90};Object.keys(ae).indexOf(t.direction)===-1&&Lt(`Invalid direction '${t.direction}' specified for breadthfirst layout. Valid values are: ${Object.keys(ae).join(`, `)}`);var oe=e(function(e){return Ot(ie(e),l,ae[t.direction])},`getPosition`);return r.nodes().layoutPositions(this,t,oe),this};var ud={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:e(function(e,t){return!0},`animateFilter`),ready:void 0,stop:void 0,transform:e(function(e,t){return t},`transform`)};function dd(e){this.options=Z({},ud,e)}e(dd,`CircleLayout`),dd.prototype.run=function(){var t=this.options,n=t,r=t.cy,i=n.eles,a=n.counterclockwise===void 0?n.clockwise:!n.counterclockwise,o=i.nodes().not(`:parent`);n.sort&&(o=o.sort(n.sort));for(var s=Kn(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),c={x:s.x1+s.w/2,y:s.y1+s.h/2},l=(n.sweep===void 0?2*Math.PI-2*Math.PI/o.length:n.sweep)/Math.max(1,o.length-1),u,d=0,f=0;f1&&n.avoidOverlap){d*=1.75;var g=Math.cos(l)-Math.cos(0),_=Math.sin(l)-Math.sin(0),v=Math.sqrt(d*d/(g*g+_*_));u=Math.max(v,u)}var y=e(function(e,t){var r=n.startAngle+t*l*(a?1:-1),i=u*Math.cos(r),o=u*Math.sin(r);return{x:c.x+i,y:c.y+o}},`getPos`);return i.nodes().layoutPositions(this,n,y),this};var fd={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:e(function(e){return e.degree()},`concentric`),levelWidth:e(function(e){return e.maxDegree()/4},`levelWidth`),animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:e(function(e,t){return!0},`animateFilter`),ready:void 0,stop:void 0,transform:e(function(e,t){return t},`transform`)};function pd(e){this.options=Z({},fd,e)}e(pd,`ConcentricLayout`),pd.prototype.run=function(){for(var e=this.options,t=e,n=t.counterclockwise===void 0?t.clockwise:!t.counterclockwise,r=e.cy,i=t.eles,a=i.nodes().not(`:parent`),o=Kn(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},c=[],l=0,u=0;u0&&Math.abs(_[0].value-y.value)>=h&&(_=[],g.push(_)),_.push(y)}var b=l+t.minNodeSpacing;if(!t.avoidOverlap){var x=g.length>0&&g[0].length>1,S=(Math.min(o.w,o.h)/2-b)/(g.length+x?1:0);b=Math.min(b,S)}for(var C=0,w=0;w1&&t.avoidOverlap){var D=Math.cos(E)-Math.cos(0),O=Math.sin(E)-Math.sin(0),k=Math.sqrt(b*b/(D*D+O*O));C=Math.max(k,C)}T.r=C,C+=b}if(t.equidistant){for(var A=0,j=0,M=0;M=t.numIter||(wd(i,t),i.temperature*=t.coolingFactor,i.temperature=t.animationThreshold&&o(),dt(d)):(Id(i,t),c())},`frame`);d()}else{for(;u;)u=s(l),l++;Id(i,t),c()}return this},gd.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit(`layoutstop`),this},gd.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var _d=e(function(e,t,n){for(var r=n.eles.edges(),i=n.eles.nodes(),a=Kn(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},s=n.eles.components(),c={},l=0;l0){o.graphSet.push(C);for(var l=0;lr.count?0:r.graph},`findLCA`),yd=e(function(e,t,n,r){var i=r.graphSet[n];if(-10)var c=r.nodeOverlap*s,l=Math.sqrt(i*i+a*a),u=c*i/l,d=c*a/l;else var f=kd(e,i,a),p=kd(t,-1*i,-1*a),m=p.x-f.x,h=p.y-f.y,g=m*m+h*h,l=Math.sqrt(g),c=(e.nodeRepulsion+t.nodeRepulsion)/g,u=c*m/l,d=c*h/l;e.isLocked||(e.offsetX-=u,e.offsetY-=d),t.isLocked||(t.offsetX+=u,t.offsetY+=d)}},`nodeRepulsion`),Od=e(function(e,t,n,r){if(n>0)var i=e.maxX-t.minX;else var i=t.maxX-e.minX;if(r>0)var a=e.maxY-t.minY;else var a=t.maxY-e.minY;return i>=0&&a>=0?Math.sqrt(i*i+a*a):0},`nodesOverlap`),kd=e(function(e,t,n){var r=e.positionX,i=e.positionY,a=e.height||1,o=e.width||1,s=n/t,c=a/o,l={};return t===0&&0n?(l.x=r,l.y=i+a/2,l):0t&&-1*c<=s&&s<=c?(l.x=r-o/2,l.y=i-o*n/2/t,l):0=c)?(l.x=r+a*t/2/n,l.y=i+a/2,l):0>n&&(s<=-1*c||s>=c)?(l.x=r-a*t/2/n,l.y=i-a/2,l):l},`findClippingPoint`),Ad=e(function(e,t){for(var n=0;nn){var h=t.gravity*f/m,g=t.gravity*p/m;d.offsetX+=h,d.offsetY+=g}}}}},`calculateGravityForces`),Md=e(function(e,t){var n=[],r=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;r<=i;){var a=n[r++],o=e.idToIndex[a],s=e.layoutNodes[o],c=s.children;if(0n)var i={x:n*e/r,y:n*t/r};else var i={x:e,y:t};return i},`limitForce`),Fd=e(function(e,t){var n=e.parentId;if(n!=null){var r=t.layoutNodes[t.idToIndex[n]],i=!1;if((r.maxX==null||e.maxX+r.padRight>r.maxX)&&(r.maxX=e.maxX+r.padRight,i=!0),(r.minX==null||e.minX-r.padLeftr.maxY)&&(r.maxY=e.maxY+r.padBottom,i=!0),(r.minY==null||e.minY-r.padToph&&(f+=m+t.componentSpacing,d=0,p=0,m=0)}}},`separateComponents`),Ld={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:e(function(e){},`position`),sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:e(function(e,t){return!0},`animateFilter`),ready:void 0,stop:void 0,transform:e(function(e,t){return t},`transform`)};function Rd(e){this.options=Z({},Ld,e)}e(Rd,`GridLayout`),Rd.prototype.run=function(){var t=this.options,n=t,r=t.cy,i=n.eles,a=i.nodes().not(`:parent`);n.sort&&(a=a.sort(n.sort));var o=Kn(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(o.h===0||o.w===0)i.nodes().layoutPositions(this,n,function(e){return{x:o.x1,y:o.y1}});else{var s=a.size(),c=Math.sqrt(s*o.h/o.w),l=Math.round(c),u=Math.round(o.w/o.h*c),d=e(function(e){if(e==null)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},`small`),f=e(function(e){if(e==null)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},`large`),p=n.rows,m=n.cols==null?n.columns:n.cols;if(p!=null&&m!=null)l=p,u=m;else if(p!=null&&m==null)l=p,u=Math.ceil(s/l);else if(p==null&&m!=null)u=m,l=Math.ceil(s/u);else if(u*l>s){var h=d(),g=f();(h-1)*g>=s?d(h-1):(g-1)*h>=s&&f(g-1)}else for(;u*l=s?f(v+1):d(_+1)}var y=o.w/u,b=o.h/l;if(n.condense&&(y=0,b=0),n.avoidOverlap)for(var x=0;x=u&&(M=0,j++)},`moveToNextCell`),P={},F=0;F(y=pr(t,n,b[x],b[x+1],b[x+2],b[x+3])))return _(e,y),!0}else if(i.edgeType===`bezier`||i.edgeType===`multibezier`||i.edgeType===`self`||i.edgeType===`compound`){for(var b=i.allpts,x=0;x+5(y=fr(t,n,b[x],b[x+1],b[x+2],b[x+3],b[x+4],b[x+5])))return _(e,y),!0}for(var h=h||r.source,g=g||r.target,S=a.getArrowWidth(s,l),C=[{name:`source`,x:i.arrowStartX,y:i.arrowStartY,angle:i.srcArrowAngle},{name:`target`,x:i.arrowEndX,y:i.arrowEndY,angle:i.tgtArrowAngle},{name:`mid-source`,x:i.midX,y:i.midY,angle:i.midsrcArrowAngle},{name:`mid-target`,x:i.midX,y:i.midY,angle:i.midtgtArrowAngle}],x=0;x0&&(v(h),v(g))}e(y,`checkEdge`);function b(e,t,n){return Xt(e,t,n)}e(b,`preprop`);function x(r,i){var a=r._private,o=p,s=i?i+`-`:``;r.boundingBox();var c=a.labelBounds[i||`main`],l=r.pstyle(s+`label`).value;if(!(r.pstyle(`text-events`).strValue!==`yes`||!l)){var u=b(a.rscratch,`labelX`,i),d=b(a.rscratch,`labelY`,i),f=b(a.rscratch,`labelAngle`,i),m=r.pstyle(s+`text-margin-x`).pfValue,h=r.pstyle(s+`text-margin-y`).pfValue,g=c.x1-o-m,v=c.x2+o-m,y=c.y1-o-h,x=c.y2+o-h;if(f){var S=Math.cos(f),C=Math.sin(f),w=e(function(e,t){return e-=u,t-=d,{x:e*S-t*C+u,y:e*C+t*S+d}},`rotate`),T=w(g,y),E=w(g,x),D=w(v,y),O=w(v,x);if(mr(t,n,[T.x+m,T.y+h,D.x+m,D.y+h,O.x+m,O.y+h,E.x+m,E.y+h]))return _(r),!0}else if(tr(c,t,n))return _(r),!0}}e(x,`checkLabel`);for(var S=s.length-1;S>=0;S--){var C=s[S];C.isNode()?v(C)||x(C):y(C)||x(C)||x(C,`source`)||x(C,`target`)}return c},Xd.getAllInBox=function(t,n,r,i){var a=this.getCachedZSortedEles().interactive,o=2/this.cy.zoom(),s=[],c=Math.min(t,r),l=Math.max(t,r),u=Math.min(n,i),d=Math.max(n,i);t=c,r=l,n=u,i=d;var f=Kn({x1:t,y1:n,x2:r,y2:i}),m=[{x:f.x1,y:f.y1},{x:f.x2,y:f.y1},{x:f.x2,y:f.y2},{x:f.x1,y:f.y2}],h=[[m[0],m[1]],[m[1],m[2]],[m[2],m[3]],[m[3],m[0]]];function g(e,t,n){return Xt(e,t,n)}e(g,`preprop`);function _(t,n){var r=t._private,i=o,a=``;t.boundingBox();var s=r.labelBounds.main;if(!s)return null;var c=g(r.rscratch,`labelX`,n),l=g(r.rscratch,`labelY`,n),u=g(r.rscratch,`labelAngle`,n),d=t.pstyle(a+`text-margin-x`).pfValue,f=t.pstyle(a+`text-margin-y`).pfValue,p=s.x1-i-d,m=s.x2+i-d,h=s.y1-i-f,_=s.y2+i-f;if(u){var v=Math.cos(u),y=Math.sin(u),b=e(function(e,t){return e-=c,t-=l,{x:e*v-t*y+c,y:e*y+t*v+l}},`rotate`);return[b(p,h),b(m,h),b(m,_),b(p,_)]}return[{x:p,y:h},{x:m,y:h},{x:m,y:_},{x:p,y:_}]}e(_,`getRotatedLabelBox`);function v(t,n,r,i){function a(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}return e(a,`ccw`),a(t,r,i)!==a(n,r,i)&&a(t,n,r)!==a(t,n,i)}e(v,`doLinesIntersect`);for(var y=0;y0?-(Math.PI-e.ang):Math.PI+e.ang},`invertVec`),bf=e(function(e,t,n,r,i){if(e===_f?yf(tf,ef):vf(t,e,ef),vf(t,n,tf),nf=ef.nx*tf.ny-ef.ny*tf.nx,rf=ef.nx*tf.nx-ef.ny*-tf.ny,sf=Math.asin(Math.max(-1,Math.min(1,nf))),Math.abs(sf)<1e-6){Qd=t.x,$d=t.y,lf=df=0;return}af=1,of=!1,rf<0?sf<0?sf=Math.PI+sf:(sf=Math.PI-sf,af=-1,of=!0):sf>0&&(af=-1,of=!0),df=t.radius===void 0?r:t.radius,cf=sf/2,ff=Math.min(ef.len/2,tf.len/2),i?(uf=Math.abs(Math.cos(cf)*df/Math.sin(cf)),uf>ff?(uf=ff,lf=Math.abs(uf*Math.sin(cf)/Math.cos(cf))):lf=df):(uf=Math.min(ff,df),lf=Math.abs(uf*Math.sin(cf)/Math.cos(cf))),hf=t.x+tf.nx*uf,gf=t.y+tf.ny*uf,Qd=hf-tf.ny*lf*af,$d=gf+tf.nx*lf*af,pf=t.x+ef.nx*uf,mf=t.y+ef.ny*uf,_f=t},`calcCornerArc`);function xf(e,t){t.radius===0?e.lineTo(t.cx,t.cy):e.arc(t.cx,t.cy,t.radius,t.startAngle,t.endAngle,t.counterClockwise)}e(xf,`drawPreparedRoundCorner`);function Sf(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return r===0||t.radius===0?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(bf(e,t,n,r,i),{cx:Qd,cy:$d,radius:lf,startX:pf,startY:mf,stopX:hf,stopY:gf,startAngle:ef.ang+Math.PI/2*af,endAngle:tf.ang-Math.PI/2*af,counterClockwise:of})}e(Sf,`getRoundCorner`);var Cf=.01,wf=Math.sqrt(2*Cf),Tf={};Tf.findMidptPtsEtc=function(t,n){var r=n.posPts,i=n.intersectionPts,a=n.vectorNormInverse,o,s=t.pstyle(`source-endpoint`),c=t.pstyle(`target-endpoint`),l=s.units!=null&&c.units!=null,u=e(function(e,t,n,r){var i=r-t,a=n-e,o=Math.sqrt(a*a+i*i);return{x:-i/o,y:a/o}},`recalcVectorNormInverse`);switch(t.pstyle(`edge-distances`).value){case`node-position`:o=r;break;case`intersection`:o=i;break;case`endpoints`:if(l){var d=p(this.manualEndptToPx(t.source()[0],s),2),f=d[0],m=d[1],h=p(this.manualEndptToPx(t.target()[0],c),2),g=h[0],_=h[1],v={x1:f,y1:m,x2:g,y2:_};a=u(f,m,g,_),o=v}else zt(`Edge ${t.id()} has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).`),o=i}return{midptPts:o,vectorNormInverse:a}},Tf.findHaystackPoints=function(e){for(var t=0;t0?Math.max(e-t,0):Math.min(e+t,0)},`subDWH`),k=O(E,w),A=O(D,T),j=!1;v===u?_=Math.abs(k)>Math.abs(A)?a:i:v===l||v===c?(_=i,j=!0):(v===o||v===s)&&(_=a,j=!0);var M=_===i,N=M?A:k,P=M?D:E,F=Rn(P),I=!1;!(j&&(b||S))&&(v===c&&P<0||v===l&&P>0||v===o&&P>0||v===s&&P<0)&&(F*=-1,N=F*Math.abs(N),I=!0);var L=b?(x<0?1+x:x)*N:(x<0?N:0)+x*F,R=e(function(e){return Math.abs(e)=Math.abs(N)},`getIsTooClose`),z=R(L),B=R(Math.abs(N)-Math.abs(L));if((z||B)&&!I){if(M){var V=Math.abs(P)<=p/2,H=Math.abs(E)<=m/2;if(V){var U=(d.x1+d.x2)/2;r.segpts=[U,d.y1,U,d.y2]}else if(H){var W=(d.y1+d.y2)/2;r.segpts=[d.x1,W,d.x2,W]}else r.segpts=[d.x1,d.y2]}else{var G=Math.abs(P)<=f/2,K=Math.abs(D)<=h/2;if(G){var q=(d.y1+d.y2)/2;r.segpts=[d.x1,q,d.x2,q]}else if(K){var J=(d.x1+d.x2)/2;r.segpts=[J,d.y1,J,d.y2]}else r.segpts=[d.x2,d.y1]}}else if(M){var Y=d.y1+L+(g?p/2*F:0);r.segpts=[d.x1,Y,d.x2,Y]}else{var ee=d.x1+L+(g?f/2*F:0);r.segpts=[ee,d.y1,ee,d.y2]}if(r.isRound){var X=t.pstyle(`taxi-radius`).value,te=t.pstyle(`radius-type`).value[0]===`arc-radius`;r.radii=Array(r.segpts.length/2).fill(X),r.isArcRadius=Array(r.segpts.length/2).fill(te)}},Tf.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if(n.edgeType===`bezier`){var r=t.srcPos,i=t.tgtPos,a=t.srcW,o=t.srcH,s=t.tgtW,c=t.tgtH,l=t.srcShape,u=t.tgtShape,d=t.srcCornerRadius,f=t.tgtCornerRadius,p=t.srcRs,m=t.tgtRs,h=!j(n.startX)||!j(n.startY),g=!j(n.arrowStartX)||!j(n.arrowStartY),_=!j(n.endX)||!j(n.endY),v=!j(n.arrowEndX)||!j(n.arrowEndY),y=3*(this.getArrowWidth(e.pstyle(`width`).pfValue,e.pstyle(`arrow-scale`).value)*this.arrowShapeWidth),b=zn({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),x=bh.poolIndex()){var g=m;m=h,h=g}var _=u.srcPos=m.position(),v=u.tgtPos=h.position(),y=u.srcW=m.outerWidth(),b=u.srcH=m.outerHeight(),x=u.tgtW=h.outerWidth(),C=u.tgtH=h.outerHeight(),w=u.srcShape=r.nodeShapes[n.getNodeShape(m)],T=u.tgtShape=r.nodeShapes[n.getNodeShape(h)],E=u.srcCornerRadius=m.pstyle(`corner-radius`).value===`auto`?`auto`:m.pstyle(`corner-radius`).pfValue,D=u.tgtCornerRadius=h.pstyle(`corner-radius`).value===`auto`?`auto`:h.pstyle(`corner-radius`).pfValue,O=u.tgtRs=h._private.rscratch,k=u.srcRs=m._private.rscratch;u.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var A=0;A=wf||(G=Math.sqrt(Math.max(W*W,Cf)+Math.max(U*U,Cf)));var K=u.vector={x:W,y:U},q=u.vectorNorm={x:K.x/G,y:K.y/G},J={x:-q.y,y:q.x};u.nodesOverlap=!j(G)||T.checkPoint(L[0],L[1],0,x,C,v.x,v.y,D,O)||w.checkPoint(z[0],z[1],0,y,b,_.x,_.y,E,k),u.vectorNormInverse=J,d={nodesOverlap:u.nodesOverlap,dirCounts:u.dirCounts,calculatedIntersection:!0,hasBezier:u.hasBezier,hasUnbundled:u.hasUnbundled,eles:u.eles,srcPos:v,srcRs:O,tgtPos:_,tgtRs:k,srcW:x,srcH:C,tgtW:y,tgtH:b,srcIntn:B,tgtIntn:R,srcShape:T,tgtShape:w,posPts:{x1:H.x2,y1:H.y2,x2:H.x1,y2:H.y1},intersectionPts:{x1:V.x2,y1:V.y2,x2:V.x1,y2:V.y1},vector:{x:-K.x,y:-K.y},vectorNorm:{x:-q.x,y:-q.y},vectorNormInverse:{x:-J.x,y:-J.y}}}var Y=I?d:u;N.nodesOverlap=Y.nodesOverlap,N.srcIntn=Y.srcIntn,N.tgtIntn=Y.tgtIntn,N.isRound=P.startsWith(`round`),i&&(m.isParent()||m.isChild()||h.isParent()||h.isChild())&&(m.parents().anySame(h)||h.parents().anySame(m)||m.same(h)&&m.isParent())?n.findCompoundLoopPoints(M,Y,A,F):m===h?n.findLoopPoints(M,Y,A,F):P.endsWith(`segments`)?n.findSegmentsPoints(M,Y):P.endsWith(`taxi`)?n.findTaxiPoints(M,Y):P===`straight`||!F&&u.eles.length%2==1&&A===Math.floor(u.eles.length/2)?n.findStraightEdgePoints(M):n.findBezierPoints(M,Y,A,F,I),n.findEndpoints(M),n.tryToCorrectInvalidPoints(M,Y),n.checkForInvalidEdgeWarning(M),n.storeAllpts(M),n.storeEdgeProjections(M),n.calculateArrowAngles(M),n.recalculateEdgeLabelProjections(M),n.calculateLabelAngles(M)}},`_loop`),S=0;S0){var te=s,ne=Bn(te,An(i)),re=Bn(te,An(X)),ie=ne;re2&&Bn(te,{x:X[2],y:X[3]})0){var ge=c,_e=Bn(ge,An(i)),ve=Bn(ge,An(he)),ye=_e;ve<_e&&(i=[he[0],he[1]],ye=ve),he.length>2&&Bn(ge,{x:he[2],y:he[3]})=l||v){d={cp:h,segment:_};break}}if(d)break}var y=d.cp,b=d.segment,x=(l-f)/b.length,S=b.t1-b.t0,C=a?b.t0+S*x:b.t1-S*x;C=Gn(0,C,1),n=Un(y.p0,y.p1,y.p2,C),r=Nf(y.p0,y.p1,y.p2,C);break;case`straight`:case`segments`:case`haystack`:for(var w=0,T,E,D,O,k=i.allpts.length,A=0;A+3=l));A+=2);var j=(l-E)/T;j=Gn(0,j,1),n=Wn(D,O,j),r=Mf(D,O)}s(`labelX`,e,n.x),s(`labelY`,e,n.y),s(`labelAutoAngle`,e,r)}},`calculateEndProjection`);l(`source`),l(`target`),this.applyLabelDimensions(t)}},Af.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,`source`),this.applyPrefixedLabelDimensions(e,`target`))},Af.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),i=Ct(r,e._private.labelDimsKey);if(Xt(n.rscratch,`prefixedLabelDimsKey`,t)!==i){Zt(n.rscratch,`prefixedLabelDimsKey`,t,i);var a=this.calculateLabelDimensions(e,r),o=e.pstyle(`line-height`).pfValue,s=e.pstyle(`text-wrap`).strValue,c=Xt(n.rscratch,`labelWrapCachedLines`,t)||[],l=s===`wrap`?Math.max(c.length,1):1,u=a.height/l,d=u*o,f=a.width,p=a.height+(l-1)*(o-1)*u;Zt(n.rstyle,`labelWidth`,t,f),Zt(n.rscratch,`labelWidth`,t,f),Zt(n.rstyle,`labelHeight`,t,p),Zt(n.rscratch,`labelHeight`,t,p),Zt(n.rscratch,`labelLineHeight`,t,d)}},Af.getLabelText=function(t,n){var r=t._private,i=n?n+`-`:``,a=t.pstyle(i+`label`).strValue,o=t.pstyle(`text-transform`).value,c=e(function(e,t){return t?(Zt(r.rscratch,e,n,t),t):Xt(r.rscratch,e,n)},`rscratch`);if(!a)return``;o==`none`||(o==`uppercase`?a=a.toUpperCase():o==`lowercase`&&(a=a.toLowerCase()));var l=t.pstyle(`text-wrap`).value;if(l===`wrap`){var u=c(`labelKey`);if(u!=null&&c(`labelWrapKey`)===u)return c(`labelWrapCachedText`);for(var d=`​`,f=a.split(` +`),p=t.pstyle(`text-max-width`).pfValue,m=t.pstyle(`text-overflow-wrap`).value===`anywhere`,h=[],g=/[\s\u200b]+|$/g,_=0;_p){var b=v.matchAll(g),x=``,S=0,C=s(b),w;try{for(C.s();!(w=C.n()).done;){var T=w.value,E=T[0],D=v.substring(S,T.index);S=T.index+E.length;var O=x.length===0?D:x+D+E;this.calculateLabelDimensions(t,O).width<=p?x+=D+E:(x&&h.push(x),x=D+E)}}catch(e){C.e(e)}finally{C.f()}x.match(/^[\s\u200b]+$/)||h.push(x)}else h.push(v)}c(`labelWrapCachedLines`,h),a=c(`labelWrapCachedText`,h.join(` +`)),c(`labelWrapKey`,u)}else if(l===`ellipsis`){var k=t.pstyle(`text-max-width`).pfValue,A=``,j=`…`,M=!1;if(this.calculateLabelDimensions(t,a).widthk);N++)A+=a[N],N===a.length-1&&(M=!0);return M||(A+=j),A}return a},Af.getLabelJustification=function(e){var t=e.pstyle(`text-justification`).strValue,n=e.pstyle(`text-halign`).strValue;if(t===`auto`){if(e.isNode())switch(n){case`left`:return`right`;case`right`:return`left`;default:return`center`}else return`center`}else return t},Af.calculateLabelDimensions=function(e,t){var n=this.cy.window().document,r=0,i=e.pstyle(`font-style`).strValue,a=e.pstyle(`font-size`).pfValue,o=e.pstyle(`font-family`).strValue,s=e.pstyle(`font-weight`).strValue,c=this.labelCalcCanvas,l=this.labelCalcCanvasContext;if(!c){c=this.labelCalcCanvas=n.createElement(`canvas`),l=this.labelCalcCanvasContext=c.getContext(`2d`);var u=c.style;u.position=`absolute`,u.left=`-9999px`,u.top=`-9999px`,u.zIndex=`-1`,u.visibility=`hidden`,u.pointerEvents=`none`}l.font=`${i} ${s} ${a}px ${o}`;for(var d=0,f=0,p=t.split(` +`),m=0;m1&&arguments[1]!==void 0?arguments[1]:!0;if(n.merge(e),t)for(var r=0;r=t.desktopTapThreshold2}var D=o(n);x&&(t.hoverData.tapholdCancelled=!0);var O=e(function(){var e=t.hoverData.dragDelta=t.hoverData.dragDelta||[];e.length===0?(e.push(y[0]),e.push(y[1])):(e[0]+=y[0],e[1]+=y[1])},`updateDragDelta`);r=!0,a(h,[`mousemove`,`vmousemove`,`tapdrag`],n,{x:u[0],y:u[1]});var k=e(function(e){return{originalEvent:n,type:e,position:{x:u[0],y:u[1]}}},`makeEvent`),A=e(function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||i.emit(k(`boxstart`)),p[4]=1,t.hoverData.selecting=!0,t.redrawHint(`select`,!0),t.redraw()},`goIntoBoxMode`);if(t.hoverData.which===3){if(x){var M=k(`cxtdrag`);v?v.emit(M):i.emit(M),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||h!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit(k(`cxtdragout`)),t.hoverData.cxtOver=h,h&&h.emit(k(`cxtdragover`)))}}else if(t.hoverData.dragging){if(r=!0,i.panningEnabled()&&i.userPanningEnabled()){var N;if(t.hoverData.justStartedPan){var P=t.hoverData.mdownPos;N={x:(u[0]-P[0])*c,y:(u[1]-P[1])*c},t.hoverData.justStartedPan=!1}else N={x:y[0]*c,y:y[1]*c};i.panBy(N),i.emit(k(`dragpan`)),t.hoverData.dragged=!0}u=t.projectIntoViewport(n.clientX,n.clientY)}else if(p[4]==1&&(v==null||v.pannable()))x&&(!t.hoverData.dragging&&i.boxSelectionEnabled()&&(D||!i.panningEnabled()||!i.userPanningEnabled())?A():!t.hoverData.selecting&&i.panningEnabled()&&i.userPanningEnabled()&&s(v,t.hoverData.downs)&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,p[4]=0,t.data.bgActivePosistion=An(d),t.redrawHint(`select`,!0),t.redraw()),v&&v.pannable()&&v.active()&&v.unactivate());else{if(v&&v.pannable()&&v.active()&&v.unactivate(),(!v||!v.grabbed())&&h!=_&&(_&&a(_,[`mouseout`,`tapdragout`],n,{x:u[0],y:u[1]}),h&&a(h,[`mouseover`,`tapdragover`],n,{x:u[0],y:u[1]}),t.hoverData.last=h),v){if(x){if(i.boxSelectionEnabled()&&D)v&&v.grabbed()&&(g(b),v.emit(k(`freeon`)),b.emit(k(`free`)),t.dragData.didDrag&&(v.emit(k(`dragfreeon`)),b.emit(k(`dragfree`)))),A();else if(v&&v.grabbed()&&t.nodeIsDraggable(v)){var F=!t.dragData.didDrag;F&&t.redrawHint(`eles`,!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||m(b,{inDragLayer:!0});var I={x:0,y:0};if(j(y[0])&&j(y[1])&&(I.x+=y[0],I.y+=y[1],F)){var L=t.hoverData.dragDelta;L&&j(L[0])&&j(L[1])&&(I.x+=L[0],I.y+=L[1])}t.hoverData.draggingEles=!0,b.silentShift(I).emit(k(`position`)).emit(k(`drag`)),t.redrawHint(`drag`,!0),t.redraw()}}else O()}r=!0}if(p[2]=u[0],p[3]=u[1],r)return n.stopPropagation&&n.stopPropagation(),n.preventDefault&&n.preventDefault(),!1}},`mousemoveHandler`),!1);var D,O,k;t.registerBinding(n,`mouseup`,e(function(n){if(!(t.hoverData.which===1&&n.which!==1&&t.hoverData.capture)&&t.hoverData.capture){t.hoverData.capture=!1;var i=t.cy,s=t.projectIntoViewport(n.clientX,n.clientY),c=t.selection,l=t.findNearestElement(s[0],s[1],!0,!1),u=t.dragData.possibleDragElements,d=t.hoverData.down,f=o(n);t.data.bgActivePosistion&&(t.redrawHint(`select`,!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,d&&d.unactivate();var p=e(function(e){return{originalEvent:n,type:e,position:{x:s[0],y:s[1]}}},`makeEvent`);if(t.hoverData.which===3){var m=p(`cxttapend`);if(d?d.emit(m):i.emit(m),!t.hoverData.cxtDragged){var h=p(`cxttap`);d?d.emit(h):i.emit(h)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(a(l,[`mouseup`,`tapend`,`vmouseup`],n,{x:s[0],y:s[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(a(d,[`click`,`tap`,`vclick`],n,{x:s[0],y:s[1]}),O=!1,n.timeStamp-k<=i.multiClickDebounceTime()?(D&&clearTimeout(D),O=!0,k=null,a(d,[`dblclick`,`dbltap`,`vdblclick`],n,{x:s[0],y:s[1]})):(D=setTimeout(function(){O||a(d,[`oneclick`,`onetap`,`voneclick`],n,{x:s[0],y:s[1]})},i.multiClickDebounceTime()),k=n.timeStamp)),d==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!o(n)&&(i.$(r).unselect([`tapunselect`]),u.length>0&&t.redrawHint(`eles`,!0),t.dragData.possibleDragElements=u=i.collection()),l==d&&!t.dragData.didDrag&&!t.hoverData.selecting&&l!=null&&l._private.selectable&&(t.hoverData.dragging||(i.selectionType()===`additive`||f?l.selected()?l.unselect([`tapunselect`]):l.select([`tapselect`]):f||(i.$(r).unmerge(l).unselect([`tapunselect`]),l.select([`tapselect`]))),t.redrawHint(`eles`,!0)),t.hoverData.selecting){var _=i.collection(t.getAllInBox(c[0],c[1],c[2],c[3]));t.redrawHint(`select`,!0),_.length>0&&t.redrawHint(`eles`,!0),i.emit(p(`boxend`));var v=e(function(e){return e.selectable()&&!e.selected()},`eleWouldBeSelected`);i.selectionType()===`additive`||f||i.$(r).unmerge(_).unselect(),_.emit(p(`box`)).stdFilter(v).select().emit(p(`boxselect`)),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint(`select`,!0),t.redrawHint(`eles`,!0),t.redraw()),!c[4]){t.redrawHint(`drag`,!0),t.redrawHint(`eles`,!0);var y=d&&d.grabbed();g(u),y&&(d.emit(p(`freeon`)),u.emit(p(`free`)),t.dragData.didDrag&&(d.emit(p(`dragfreeon`)),u.emit(p(`dragfree`))))}}c[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}},`mouseupHandler`),!1);var A=[],M=4,N,P=1e5,F=e(function(e,t){for(var n=0;n=M){var i=A;if(N=F(i,5),!N){var a=Math.abs(i[0]);N=I(i)&&a>5}if(N)for(var o=0;o5&&(r=Rn(r)*5),f=r/-250,N&&(f/=P,f*=3),f*=t.wheelSensitivity,e.deltaMode===1&&(f*=33);var p=s.zoom()*10**f;e.type===`gesturechange`&&(p=t.gestureStartZoom*e.scale),s.zoom({level:p,renderedPosition:{x:d[0],y:d[1]}}),s.emit({type:e.type===`gesturechange`?`pinchzoom`:`scrollzoom`,originalEvent:e,position:{x:u[0],y:u[1]}})}}}},`wheelHandler`);t.registerBinding(t.container,`wheel`,L,!0),t.registerBinding(n,`scroll`,e(function(e){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},`scrollHandler`),!0),t.registerBinding(t.container,`gesturestart`,e(function(e){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||e.preventDefault()},`gestureStartHandler`),!0),t.registerBinding(t.container,`gesturechange`,function(e){t.hasTouchStarted||L(e)},!0),t.registerBinding(t.container,`mouseout`,e(function(e){var n=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:`mouseout`,position:{x:n[0],y:n[1]}})},`mouseOutHandler`),!1),t.registerBinding(t.container,`mouseover`,e(function(e){var n=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:`mouseover`,position:{x:n[0],y:n[1]}})},`mouseOverHandler`),!1);var R,z,B,V,H,U,W,G,K,q,J,Y,ee,X=e(function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},`distance`),te=e(function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)},`distanceSq`),ne;t.registerBinding(t.container,`touchstart`,ne=e(function(n){if(t.hasTouchStarted=!0,T(n)){v(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var r=t.cy,i=t.touchData.now,o=t.touchData.earlier;if(n.touches[0]){var s=t.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);i[0]=s[0],i[1]=s[1]}if(n.touches[1]){var s=t.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY);i[2]=s[0],i[3]=s[1]}if(n.touches[2]){var s=t.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY);i[4]=s[0],i[5]=s[1]}var c=e(function(e){return{originalEvent:n,type:e,position:{x:i[0],y:i[1]}}},`makeEvent`);if(n.touches[1]){t.touchData.singleTouchMoved=!0,g(t.dragData.touchDragEles);var l=t.findContainerClientCoords();K=l[0],q=l[1],J=l[2],Y=l[3],R=n.touches[0].clientX-K,z=n.touches[0].clientY-q,B=n.touches[1].clientX-K,V=n.touches[1].clientY-q,ee=0<=R&&R<=J&&0<=B&&B<=J&&0<=z&&z<=Y&&0<=V&&V<=Y;var d=r.pan(),f=r.zoom();H=X(R,z,B,V),U=te(R,z,B,V),W=[(R+B)/2,(z+V)/2],G=[(W[0]-d.x)/f,(W[1]-d.y)/f];var p=200,_=p*p;if(U<_&&!n.touches[2]){var y=t.findNearestElement(i[0],i[1],!0,!0),b=t.findNearestElement(i[2],i[3],!0,!0);y&&y.isNode()?(y.activate().emit(c(`cxttapstart`)),t.touchData.start=y):b&&b.isNode()?(b.activate().emit(c(`cxttapstart`)),t.touchData.start=b):r.emit(c(`cxttapstart`)),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,t.redraw();return}}if(n.touches[2])r.boxSelectionEnabled()&&n.preventDefault();else if(!n.touches[1]&&n.touches[0]){var x=t.findNearestElements(i[0],i[1],!0,!0),S=x[0];if(S!=null&&(S.activate(),t.touchData.start=S,t.touchData.starts=x,t.nodeIsGrabbable(S))){var C=t.dragData.touchDragEles=r.collection(),w=null;t.redrawHint(`eles`,!0),t.redrawHint(`drag`,!0),S.selected()?(w=r.$(function(e){return e.selected()&&t.nodeIsGrabbable(e)}),m(w,{addToList:C})):h(S,{addToList:C}),u(S),S.emit(c(`grabon`)),w?w.forEach(function(e){e.emit(c(`grab`))}):S.emit(c(`grab`))}a(S,[`touchstart`,`tapstart`,`vmousedown`],n,{x:i[0],y:i[1]}),S??(t.data.bgActivePosistion={x:s[0],y:s[1]},t.redrawHint(`select`,!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout(function(){t.touchData.singleTouchMoved===!1&&!t.pinching&&!t.touchData.selecting&&a(t.touchData.start,[`taphold`],n,{x:i[0],y:i[1]})},t.tapholdDuration)}if(n.touches.length>=1){for(var E=t.touchData.startPosition=[null,null,null,null,null,null],D=0;D=t.touchTapThreshold2}if(r&&t.touchData.cxt){n.preventDefault();var S=n.touches[0].clientX-K,C=n.touches[0].clientY-q,w=n.touches[1].clientX-K,E=n.touches[1].clientY-q,D=te(S,C,w,E),O=D/U,k=150,A=k*k,M=1.5;if(O>=M*M||D>=A){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint(`select`,!0);var N=f(`cxttapend`);t.touchData.start?(t.touchData.start.unactivate().emit(N),t.touchData.start=null):o.emit(N)}}if(r&&t.touchData.cxt){var N=f(`cxtdrag`);t.data.bgActivePosistion=void 0,t.redrawHint(`select`,!0),t.touchData.start?t.touchData.start.emit(N):o.emit(N),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var P=t.findNearestElement(c[0],c[1],!0,!0);(!t.touchData.cxtOver||P!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit(f(`cxtdragout`)),t.touchData.cxtOver=P,P&&P.emit(f(`cxtdragover`)))}else if(r&&n.touches[2]&&o.boxSelectionEnabled())n.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||o.emit(f(`boxstart`)),t.touchData.selecting=!0,t.touchData.didSelect=!0,i[4]=1,!i||i.length===0||i[0]===void 0?(i[0]=(c[0]+c[2]+c[4])/3,i[1]=(c[1]+c[3]+c[5])/3,i[2]=(c[0]+c[2]+c[4])/3+1,i[3]=(c[1]+c[3]+c[5])/3+1):(i[2]=(c[0]+c[2]+c[4])/3,i[3]=(c[1]+c[3]+c[5])/3),t.redrawHint(`select`,!0),t.redraw();else if(r&&n.touches[1]&&!t.touchData.didSelect&&o.zoomingEnabled()&&o.panningEnabled()&&o.userZoomingEnabled()&&o.userPanningEnabled()){n.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint(`select`,!0);var F=t.dragData.touchDragEles;if(F){t.redrawHint(`drag`,!0);for(var I=0;I0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint(`select`,!0),t.redraw())}},`touchmoveHandler`),!1);var ie;t.registerBinding(n,`touchcancel`,ie=e(function(e){var n=t.touchData.start;t.touchData.capture=!1,n&&n.unactivate()},`touchcancelHandler`));var ae,oe,se,ce;if(t.registerBinding(n,`touchend`,ae=e(function(n){var i=t.touchData.start;if(t.touchData.capture)n.touches.length===0&&(t.touchData.capture=!1),n.preventDefault();else return;var o=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var s=t.cy,c=s.zoom(),l=t.touchData.now,u=t.touchData.earlier;if(n.touches[0]){var d=t.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);l[0]=d[0],l[1]=d[1]}if(n.touches[1]){var d=t.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY);l[2]=d[0],l[3]=d[1]}if(n.touches[2]){var d=t.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY);l[4]=d[0],l[5]=d[1]}var f=e(function(e){return{originalEvent:n,type:e,position:{x:l[0],y:l[1]}}},`makeEvent`);i&&i.unactivate();var p;if(t.touchData.cxt){if(p=f(`cxttapend`),i?i.emit(p):s.emit(p),!t.touchData.cxtDragged){var m=f(`cxttap`);i?i.emit(m):s.emit(m)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!n.touches[2]&&s.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var h=s.collection(t.getAllInBox(o[0],o[1],o[2],o[3]));o[0]=void 0,o[1]=void 0,o[2]=void 0,o[3]=void 0,o[4]=0,t.redrawHint(`select`,!0),s.emit(f(`boxend`));var _=e(function(e){return e.selectable()&&!e.selected()},`eleWouldBeSelected`);h.emit(f(`box`)).stdFilter(_).select().emit(f(`boxselect`)),h.nonempty()&&t.redrawHint(`eles`,!0),t.redraw()}if(i?.unactivate(),n.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint(`select`,!0);else if(!n.touches[1]&&!n.touches[0]&&!n.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint(`select`,!0);var v=t.dragData.touchDragEles;if(i!=null){var y=i._private.grabbed;g(v),t.redrawHint(`drag`,!0),t.redrawHint(`eles`,!0),y&&(i.emit(f(`freeon`)),v.emit(f(`free`)),t.dragData.didDrag&&(i.emit(f(`dragfreeon`)),v.emit(f(`dragfree`)))),a(i,[`touchend`,`tapend`,`vmouseup`,`tapdragout`],n,{x:l[0],y:l[1]}),i.unactivate(),t.touchData.start=null}else a(t.findNearestElement(l[0],l[1],!0,!0),[`touchend`,`tapend`,`vmouseup`,`tapdragout`],n,{x:l[0],y:l[1]});var b=t.touchData.startPosition[0]-l[0],x=b*b,S=t.touchData.startPosition[1]-l[1],C=(x+S*S)*c*c;t.touchData.singleTouchMoved||(i||s.$(`:selected`).unselect([`tapunselect`]),a(i,[`tap`,`vclick`],n,{x:l[0],y:l[1]}),oe=!1,n.timeStamp-ce<=s.multiClickDebounceTime()?(se&&clearTimeout(se),oe=!0,ce=null,a(i,[`dbltap`,`vdblclick`],n,{x:l[0],y:l[1]})):(se=setTimeout(function(){oe||a(i,[`onetap`,`voneclick`],n,{x:l[0],y:l[1]})},s.multiClickDebounceTime()),ce=n.timeStamp)),i!=null&&!t.dragData.didDrag&&i._private.selectable&&C`u`){var Z=[],le=e(function(e){return{clientX:e.clientX,clientY:e.clientY,force:1,identifier:e.pointerId,pageX:e.pageX,pageY:e.pageY,radiusX:e.width/2,radiusY:e.height/2,screenX:e.screenX,screenY:e.screenY,target:e.target}},`makeTouch`),ue=e(function(e){return{event:e,touch:le(e)}},`makePointer`),de=e(function(e){Z.push(ue(e))},`addPointer`),fe=e(function(e){for(var t=0;t0)return l[0]}return null},`getCurveT`),m=Object.keys(f),h=0;h0?d:sr(i,a,e,t,n,r,o,s)},`intersectLine`),checkPoint:e(function(e,t,n,r,i,a,o,s){s=s===`auto`?jr(r,i):s;var c=2*s;if(hr(e,t,this.points,a,o,r,i-c,[0,-1],n)||hr(e,t,this.points,a,o,r-c,i,[0,-1],n))return!0;var l=r/2+2*n,u=i/2+2*n;return!!(mr(e,t,[a-l,o-u,a-l,o,a+l,o,a+l,o-u])||br(e,t,c,c,a+r/2-s,o+i/2-s,n)||br(e,t,c,c,a-r/2+s,o+i/2-s,n))},`checkPoint`)}},Gf.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon(`triangle`,Or(3,0)),this.generateRoundPolygon(`round-triangle`,Or(3,0)),this.generatePolygon(`rectangle`,Or(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon(`diamond`,n),this.generateRoundPolygon(`round-diamond`,n),this.generatePolygon(`pentagon`,Or(5,0)),this.generateRoundPolygon(`round-pentagon`,Or(5,0)),this.generatePolygon(`hexagon`,Or(6,0)),this.generateRoundPolygon(`round-hexagon`,Or(6,0)),this.generatePolygon(`heptagon`,Or(7,0)),this.generateRoundPolygon(`round-heptagon`,Or(7,0)),this.generatePolygon(`octagon`,Or(8,0)),this.generateRoundPolygon(`round-octagon`,Or(8,0));var r=Array(20),i=Ar(5,0),a=Ar(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=t.deqFastCost*h)break}else if(e){if(p>=t.deqCost*c||p>=t.deqAvgCost*s)break}else if(m>=t.deqNoDrawCost*Xf)break;var g=t.deq(n,d,u);if(g.length>0)for(var _=0;_0&&(t.onDeqd(n,l),!e&&t.shouldRedraw(n,l,d,u)&&i())},`dequeue`),o=t.priority||It;r.beforeRender(a,o(n))}},`setupDequeueingImpl`)},`setupDequeueing`)},Qf=(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pt;i(this,t),this.idsByKey=new Qt,this.keyForId=new Qt,this.cachesByLvl=new Qt,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=n}return e(t,`ElementTextureCacheLookup`),o(t,[{key:`getIdsFor`,value:e(function(e){e??Lt(`Can not get id list for null key`);var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new tn,t.set(e,n)),n},`getIdsFor`)},{key:`addIdForKey`,value:e(function(e,t){e!=null&&this.getIdsFor(e).add(t)},`addIdForKey`)},{key:`deleteIdForKey`,value:e(function(e,t){e!=null&&this.getIdsFor(e).delete(t)},`deleteIdForKey`)},{key:`getNumberOfIdsForKey`,value:e(function(e){return e==null?0:this.getIdsFor(e).size},`getNumberOfIdsForKey`)},{key:`updateKeyMappingFor`,value:e(function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)},`updateKeyMappingFor`)},{key:`deleteKeyMappingFor`,value:e(function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)},`deleteKeyMappingFor`)},{key:`keyHasChangedFor`,value:e(function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)},`keyHasChangedFor`)},{key:`isInvalid`,value:e(function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)},`isInvalid`)},{key:`getCachesAt`,value:e(function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new Qt,t.set(e,r),n.push(e)),r},`getCachesAt`)},{key:`getCache`,value:e(function(e,t){return this.getCachesAt(t).get(e)},`getCache`)},{key:`get`,value:e(function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return r!=null&&this.updateKeyMappingFor(e),r},`get`)},{key:`getForCachedKey`,value:e(function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)},`getForCachedKey`)},{key:`hasCache`,value:e(function(e,t){return this.getCachesAt(t).has(e)},`hasCache`)},{key:`has`,value:e(function(e,t){var n=this.getKey(e);return this.hasCache(n,t)},`has`)},{key:`setCache`,value:e(function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)},`setCache`)},{key:`set`,value:e(function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)},`set`)},{key:`deleteCache`,value:e(function(e,t){this.getCachesAt(t).delete(e)},`deleteCache`)},{key:`delete`,value:e(function(e,t){var n=this.getKey(e);this.deleteCache(n,t)},`_delete`)},{key:`invalidateKey`,value:e(function(e){var t=this;this.lvls.forEach(function(n){return t.deleteCache(e,n)})},`invalidateKey`)},{key:`invalidate`,value:e(function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||this.getNumberOfIdsForKey(n)===0},`invalidate`)}])})(),$f=25,ep=50,tp=-4,np=3,rp=7.99,ip=8,ap=1024,op=1024,sp=1024,cp=.2,lp=.8,up=10,dp=.15,fp=.1,pp=.9,mp=.9,hp=100,gp=1,_p={dequeue:`dequeue`,downscale:`downscale`,highQuality:`highQuality`},vp=Kt({getKey:null,doesEleInvalidateKey:Pt,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Nt,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),yp=e(function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=vp(t);Z(n,r),n.lookup=new Qf(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},`ElementTextureCache`),bp=yp.prototype;bp.reasons=_p,bp.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},bp.getRetiredTextureQueue=function(e){var t=this,n=t.eleImgCaches.retired=t.eleImgCaches.retired||{};return n[e]=n[e]||[]},bp.getElementQueue=function(){var e=this;return e.eleCacheQueue=e.eleCacheQueue||new pn(function(e,t){return t.reqs-e.reqs})},bp.getElementKeyToQueue=function(){var e=this;return e.eleKeyToCacheQueue=e.eleKeyToCacheQueue||{}},bp.getElement=function(t,n,r,i,a){var o=this,s=this.renderer,c=s.cy.zoom(),l=this.lookup;if(!n||n.w===0||n.h===0||isNaN(n.w)||isNaN(n.h)||!t.visible()||t.removed()||!o.allowEdgeTxrCaching&&t.isEdge()||!o.allowParentTxrCaching&&t.isParent())return null;if(i??=Math.ceil(Ln(c*r)),i=rp||i>np)return null;var u=2**i,d=n.h*u,f=n.w*u,p=s.eleTextBiggerThanMin(t,u);if(!this.isVisible(t,p))return null;var m=l.get(t,i);if(m&&m.invalidated&&(m.invalidated=!1,m.texture.invalidatedWidth-=m.width),m)return m;var h=d<=$f?$f:d<=ep?ep:Math.ceil(d/ep)*ep;if(d>sp||f>op)return null;var g=o.getTextureQueue(h),_=g[g.length-2],v=e(function(){return o.recycleTexture(h,f)||o.addTexture(h,f)},`addNewTxr`);_||=g[g.length-1],_||=v(),_.width-_.usedWidthi;O--)E=o.getElement(t,n,r,O,_p.downscale);D()}else return o.queueElement(t,C.level-1),C}else{var k;if(!b&&!x&&!S)for(var A=i-1;A>=tp;A--){var j=l.get(t,A);if(j){k=j;break}}if(y(k))return o.queueElement(t,i),k;_.context.translate(_.usedWidth,0),_.context.scale(u,u),this.drawElement(_.context,t,n,p,!1),_.context.scale(1/u,1/u),_.context.translate(-_.usedWidth,0)}return m={x:_.usedWidth,texture:_,level:i,scale:u,width:f,height:d,scaledLabelShown:p},_.usedWidth+=Math.ceil(f+ip),_.eleCaches.push(m),l.set(t,i,m),o.checkTextureFullness(_),m},bp.invalidateElements=function(e){for(var t=0;t=cp*e.width&&this.retireTexture(e)},bp.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>lp&&e.fullnessChecks>=up?qt(t,e):e.fullnessChecks++},bp.retireTexture=function(e){var t=this,n=e.height,r=t.getTextureQueue(n),i=this.lookup;qt(r,e),e.retired=!0;for(var a=e.eleCaches,o=0;o=t)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,Jt(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),qt(i,o),r.push(o),o}},bp.queueElement=function(e,t){var n=this,r=n.getElementQueue(),i=n.getElementKeyToQueue(),a=this.getKey(e),o=i[a];if(o)o.level=Math.max(o.level,t),o.eles.merge(e),o.reqs++,r.updateItem(o);else{var s={eles:e.spawn().merge(e),level:t,reqs:1,key:a};r.push(s),i[a]=s}},bp.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=[],a=t.lookup,o=0;o0;o++){var s=n.pop(),c=s.key,l=s.eles[0],u=a.hasCache(l,s.level);if(r[c]=null,!u){i.push(s);var d=t.getBoundingBox(l);t.getElement(l,d,e,s.level,_p.dequeue)}}return i},bp.removeFromQueue=function(e){var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=this.getKey(e),a=r[i];a!=null&&(a.eles.length===1?(a.reqs=Mt,n.updateItem(a),n.pop(),r[i]=null):a.eles.unmerge(e))},bp.onDequeue=function(e){this.onDequeues.push(e)},bp.offDequeue=function(e){qt(this.onDequeues,e)},bp.setupDequeueing=Zf.setupDequeueing({deqRedrawThreshold:hp,deqCost:dp,deqAvgCost:fp,deqNoDrawCost:pp,deqFastCost:mp,deq:e(function(e,t,n){return e.dequeue(t,n)},`deq`),onDeqd:e(function(e,t){for(var n=0;n=wp||r>Cp)return null}i.validateLayersElesOrdering(r,t);var s=i.layersByLevel,c=2**r,l=s[r]=s[r]||[],u,d=i.levelIsComplete(r,t),f,p=e(function(){var n=e(function(e){if(i.validateLayersElesOrdering(e,t),i.levelIsComplete(e,t))return f=s[e],!0},`canUseAsTmpLvl`),a=e(function(e){if(!f)for(var t=r+e;Sp<=t&&t<=Cp&&!n(t);t+=e);},`checkLvls`);a(1),a(-1);for(var o=l.length-1;o>=0;o--){var c=l[o];c.invalid&&qt(l,c)}},`checkTempLevels`);if(!d)p();else return l;var m=e(function(){if(!u){u=Kn();for(var e=0;ePp||a>Pp||n*a>Np)return null;var o=i.makeLayer(u,r);if(t!=null){var s=l.indexOf(t)+1;l.splice(s,0,o)}else(e.insert===void 0||e.insert)&&l.unshift(o);return o},`makeLayer`);if(i.skipping&&!o)return null;for(var g=null,_=t.length/xp,v=!o,y=0;y=_||!rr(g.bb,b.boundingBox()))&&(g=h({insert:!0,after:g}),!g))return null;f||v?i.queueLayer(g,b):i.drawEleInLayer(g,b,r,n),g.eles.push(b),S[r]=g}return f||(v?null:l)},Lp.getEleLevelForLayerLevel=function(e,t){return e},Lp.drawEleInLayer=function(e,t,n,r){var i=this,a=this.renderer,o=e.context,s=t.boundingBox();s.w===0||s.h===0||!t.visible()||(n=i.getEleLevelForLayerLevel(n,r),a.setImgSmoothing(o,!1),a.drawCachedElement(o,t,null,null,n,Fp),a.setImgSmoothing(o,!0))},Lp.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||n.length===0)return!1;for(var r=0,i=0;i0||a.invalid)return!1;r+=a.eles.length}return r===t.length},Lp.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){t=!0;break}}return t},Lp.invalidateElements=function(t){var n=this;t.length!==0&&(n.lastInvalidationTime=ft(),!(t.length===0||!n.haveLayers())&&n.updateElementsInLayers(t,e(function(e,t,r){n.invalidateLayer(e)},`invalAssocLayers`)))},Lp.invalidateLayer=function(e){if(this.lastInvalidationTime=ft(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];qt(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var i=0;i3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,c=n._private.rscratch;if(!(o&&!n.visible())&&!(c.badLine||c.allpts==null||isNaN(c.allpts[0]))){var l;r&&(l=r,t.translate(-l.x1,-l.y1));var u=o?n.pstyle(`opacity`).value:1,d=o?n.pstyle(`line-opacity`).value:1,f=n.pstyle(`curve-style`).value,p=n.pstyle(`line-style`).value,m=n.pstyle(`width`).pfValue,h=n.pstyle(`line-cap`).value,g=n.pstyle(`line-outline-width`).value,_=n.pstyle(`line-outline-color`).value,v=u*d,y=u*d,b=e(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v;f===`straight-triangle`?(s.eleStrokeStyle(t,n,e),s.drawEdgeTrianglePath(n,t,c.allpts)):(t.lineWidth=m,t.lineCap=h,s.eleStrokeStyle(t,n,e),s.drawEdgePath(n,t,c.allpts,p),t.lineCap=`butt`)},`drawLine`),x=e(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v;if(t.lineWidth=m+g,t.lineCap=h,g>0)s.colorStrokeStyle(t,_[0],_[1],_[2],e);else{t.lineCap=`butt`;return}f===`straight-triangle`?s.drawEdgeTrianglePath(n,t,c.allpts):(s.drawEdgePath(n,t,c.allpts,p),t.lineCap=`butt`)},`drawLineOutline`),S=e(function(){a&&s.drawEdgeOverlay(t,n)},`drawOverlay`),C=e(function(){a&&s.drawEdgeUnderlay(t,n)},`drawUnderlay`),w=e(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y;s.drawArrowheads(t,n,e)},`drawArrows`),T=e(function(){s.drawElementText(t,n,null,i)},`drawText`);if(t.lineJoin=`round`,n.pstyle(`ghost`).value===`yes`){var E=n.pstyle(`ghost-offset-x`).pfValue,D=n.pstyle(`ghost-offset-y`).pfValue,O=v*n.pstyle(`ghost-opacity`).value;t.translate(E,D),b(O),w(O),t.translate(-E,-D)}else x();C(),b(),w(),S(),T(),r&&t.translate(l.x1,l.y1)}};var tm=e(function(e){if(![`overlay`,`underlay`].includes(e))throw Error(`Invalid state`);return function(t,n){if(n.visible()){var r=n.pstyle(`${e}-opacity`).value;if(r!==0){var i=this,a=i.usePaths(),o=n._private.rscratch,s=2*n.pstyle(`${e}-padding`).pfValue,c=n.pstyle(`${e}-color`).value;t.lineWidth=s,t.lineCap=o.edgeType===`self`&&!a?`butt`:`round`,i.colorStrokeStyle(t,c[0],c[1],c[2],r),i.drawEdgePath(n,t,o.allpts,`solid`)}}}},`drawEdgeOverlayUnderlay`);em.drawEdgeOverlay=tm(`overlay`),em.drawEdgeUnderlay=tm(`underlay`),em.drawEdgePath=function(e,t,n,r){var i=e._private.rscratch,a=t,o,c=!1,l=this.usePaths(),u=e.pstyle(`line-dash-pattern`).pfValue,d=e.pstyle(`line-dash-offset`).pfValue;if(l){var f=n.join(`$`);i.pathCacheKey&&i.pathCacheKey===f?(o=t=i.pathCache,c=!0):(o=t=new Path2D,i.pathCacheKey=f,i.pathCache=o)}if(a.setLineDash)switch(r){case`dotted`:a.setLineDash([1,1]);break;case`dashed`:a.setLineDash(u),a.lineDashOffset=d;break;case`solid`:a.setLineDash([])}if(!c&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),i.edgeType){case`bezier`:case`self`:case`compound`:case`multibezier`:for(var p=2;p+35&&arguments[5]!==void 0?arguments[5]:!0,o=this;if(r==null){if(a&&!o.eleTextBiggerThanMin(t))return}else if(r===!1)return;if(t.isNode()){var s=t.pstyle(`label`);if(!s||!s.value)return;e.textAlign=o.getLabelJustification(t),e.textBaseline=`bottom`}else{var c=t.element()._private.rscratch.badLine,l=t.pstyle(`label`),u=t.pstyle(`source-label`),d=t.pstyle(`target-label`);if(c||(!l||!l.value)&&(!u||!u.value)&&(!d||!d.value))return;e.textAlign=`center`,e.textBaseline=`bottom`}var f=!n,p;n&&(p=n,e.translate(-p.x1,-p.y1)),i==null?(o.drawText(e,t,null,f,a),t.isEdge()&&(o.drawText(e,t,`source`,f,a),o.drawText(e,t,`target`,f,a))):o.drawText(e,t,i,f,a),n&&e.translate(p.x1,p.y1)},rm.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:!0,r=t.pstyle(`font-style`).strValue,i=t.pstyle(`font-size`).pfValue+`px`,a=t.pstyle(`font-family`).strValue,o=t.pstyle(`font-weight`).strValue,s=n?t.effectiveOpacity()*t.pstyle(`text-opacity`).value:1,c=t.pstyle(`text-outline-opacity`).value*s,l=t.pstyle(`color`).value,u=t.pstyle(`text-outline-color`).value;e.font=r+` `+o+` `+i+` `+a,e.lineJoin=`round`,this.colorFillStyle(e,l[0],l[1],l[2],s),this.colorStrokeStyle(e,u[0],u[1],u[2],c)};function im(e,t,n,r,i){var a=Math.min(r,i)/2,o=t+r/2,s=n+i/2;e.beginPath(),e.arc(o,s,a,0,Math.PI*2),e.closePath()}e(im,`circle`);function am(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,o=Math.min(a,r/2,i/2);e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath()}e(am,`roundRect`),rm.getTextAngle=function(e,t){var n,r=e._private.rscratch,i=t?t+`-`:``,a=e.pstyle(i+`text-rotation`);if(a.strValue===`autorotate`){var o=Xt(r,`labelAngle`,t);n=e.isEdge()?o:0}else n=a.strValue===`none`?0:a.pfValue;return n},rm.drawText=function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=t._private.rscratch,o=i?t.effectiveOpacity():1;if(!(i&&(o===0||t.pstyle(`text-opacity`).value===0))){n===`main`&&(n=null);var s=Xt(a,`labelX`,n),c=Xt(a,`labelY`,n),l,u,d=this.getLabelText(t,n);if(d!=null&&d!==``&&!isNaN(s)&&!isNaN(c)){this.setupTextStyle(e,t,i);var f=n?n+`-`:``,p=Xt(a,`labelWidth`,n),m=Xt(a,`labelHeight`,n),h=t.pstyle(f+`text-margin-x`).pfValue,g=t.pstyle(f+`text-margin-y`).pfValue,_=t.isEdge(),v=t.pstyle(`text-halign`).value,y=t.pstyle(`text-valign`).value;_&&(v=`center`,y=`center`),s+=h,c+=g;var b=r?this.getTextAngle(t,n):0;switch(b!==0&&(l=s,u=c,e.translate(l,u),e.rotate(b),s=0,c=0),y){case`top`:break;case`center`:c+=m/2;break;case`bottom`:c+=m}var x=t.pstyle(`text-background-opacity`).value,S=t.pstyle(`text-border-opacity`).value,C=t.pstyle(`text-border-width`).pfValue,w=t.pstyle(`text-background-padding`).pfValue,T=t.pstyle(`text-background-shape`).strValue,E=T===`round-rectangle`||T===`roundrectangle`,D=T===`circle`,O=2;if(x>0||C>0&&S>0){var k=e.fillStyle,A=e.strokeStyle,j=e.lineWidth,M=t.pstyle(`text-background-color`).value,N=t.pstyle(`text-border-color`).value,P=t.pstyle(`text-border-style`).value,F=x>0,I=C>0&&S>0,L=s-w;switch(v){case`left`:L-=p;break;case`center`:L-=p/2}var R=c-m-w,z=p+2*w,B=m+2*w;if(F&&(e.fillStyle=`rgba(${M[0]},${M[1]},${M[2]},${x*o})`),I&&(e.strokeStyle=`rgba(${N[0]},${N[1]},${N[2]},${S*o})`,e.lineWidth=C,e.setLineDash))switch(P){case`dotted`:e.setLineDash([1,1]);break;case`dashed`:e.setLineDash([4,2]);break;case`double`:e.lineWidth=C/4,e.setLineDash([]);break;default:e.setLineDash([])}if(E?(e.beginPath(),am(e,L,R,z,B,O)):D?(e.beginPath(),im(e,L,R,z,B)):(e.beginPath(),e.rect(L,R,z,B)),F&&e.fill(),I&&e.stroke(),I&&P===`double`){var V=C/2;e.beginPath(),E?am(e,L+V,R+V,z-2*V,B-2*V,O):e.rect(L+V,R+V,z-2*V,B-2*V),e.stroke()}e.fillStyle=k,e.strokeStyle=A,e.lineWidth=j,e.setLineDash&&e.setLineDash([])}var H=2*t.pstyle(`text-outline-width`).pfValue;if(H>0&&(e.lineWidth=H),t.pstyle(`text-wrap`).value===`wrap`){var U=Xt(a,`labelWrapCachedLines`,n),W=Xt(a,`labelLineHeight`,n),G=p/2,K=this.getLabelJustification(t);switch(K===`auto`||(v===`left`?K===`left`?s+=-p:K===`center`&&(s+=-G):v===`center`?K===`left`?s+=-G:K===`right`&&(s+=G):v===`right`&&(K===`center`?s+=G:K===`right`&&(s+=p))),y){case`top`:c-=(U.length-1)*W;break;case`center`:case`bottom`:c-=(U.length-1)*W}for(var q=0;q0&&e.strokeText(U[q],s,c),e.fillText(U[q],s,c),c+=W}else H>0&&e.strokeText(d,s,c),e.fillText(d,s,c);b!==0&&(e.rotate(-b),e.translate(-l,-u))}}};var om={};om.drawNode=function(t,n,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,c,l,u=n._private,d=u.rscratch,f=n.position();if(!(!j(f.x)||!j(f.y))&&!(o&&!n.visible())){var p=o?n.effectiveOpacity():1,m=s.usePaths(),h,g=!1,_=n.padding();c=n.width()+2*_,l=n.height()+2*_;var v;r&&(v=r,t.translate(-v.x1,-v.y1));for(var y=n.pstyle(`background-image`).value,b=Array(y.length),x=Array(y.length),S=0,C=0;C0&&arguments[0]!==void 0?arguments[0]:O;s.eleFillStyle(t,n,e)},`setupShapeColor`),G=e(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:L;s.colorStrokeStyle(t,k[0],k[1],k[2],e)},`setupBorderColor`),K=e(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:V;s.colorStrokeStyle(t,z[0],z[1],z[2],e)},`setupOutlineColor`),q=e(function(e,t,n,r){var i=s.nodePathCache=s.nodePathCache||[],a=wt(n===`polygon`?n+`,`+r.join(`,`):n,``+t,``+e,``+U),o=i[a],c,l=!1;return o==null?(c=new Path2D,i[a]=d.pathCache=c):(c=o,l=!0,d.pathCache=c),{path:c,cacheHit:l}},`getPath`),J=n.pstyle(`shape`).strValue,Y=n.pstyle(`shape-polygon-points`).pfValue;if(m){t.translate(f.x,f.y);var ee=q(c,l,J,Y);h=ee.path,g=ee.cacheHit}var X=e(function(){if(!g){var e=f;m&&(e={x:0,y:0}),s.nodeShapes[s.getNodeShape(n)].draw(h||t,e.x,e.y,c,l,U,d)}m?t.fill(h):t.fill()},`drawShape`),te=e(function(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=u.backgrounding,a=0,o=0;o0&&arguments[0]!==void 0&&arguments[0],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p;s.hasPie(n)&&(s.drawPie(t,n,r),e&&(m||s.nodeShapes[s.getNodeShape(n)].draw(t,f.x,f.y,c,l,U,d)))},`drawPie`),re=e(function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p;s.hasStripe(n)&&(t.save(),m?t.clip(d.pathCache):(s.nodeShapes[s.getNodeShape(n)].draw(t,f.x,f.y,c,l,U,d),t.clip()),s.drawStripe(t,n,r),t.restore(),e&&(m||s.nodeShapes[s.getNodeShape(n)].draw(t,f.x,f.y,c,l,U,d)))},`drawStripe`),ie=e(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,n=(E>0?E:-E)*e,r=E>0?0:255;E!==0&&(s.colorFillStyle(t,r,r,r,n),m?t.fill(h):t.fill())},`darken`),ae=e(function(){if(D>0){if(t.lineWidth=D,t.lineCap=N,t.lineJoin=M,t.setLineDash)switch(A){case`dotted`:t.setLineDash([1,1]);break;case`dashed`:t.setLineDash(F),t.lineDashOffset=I;break;case`solid`:case`double`:t.setLineDash([])}if(P!==`center`){if(t.save(),t.lineWidth*=2,P===`inside`)m?t.clip(h):t.clip();else{var e=new Path2D;e.rect(-c/2-D,-l/2-D,c+2*D,l+2*D),e.addPath(h),t.clip(e,`evenodd`)}m?t.stroke(h):t.stroke(),t.restore()}else m?t.stroke(h):t.stroke();if(A===`double`){t.lineWidth=D/3;var n=t.globalCompositeOperation;t.globalCompositeOperation=`destination-out`,m?t.stroke(h):t.stroke(),t.globalCompositeOperation=n}t.setLineDash&&t.setLineDash([])}},`drawBorder`),oe=e(function(){if(R>0){if(t.lineWidth=R,t.lineCap=`butt`,t.setLineDash)switch(B){case`dotted`:t.setLineDash([1,1]);break;case`dashed`:t.setLineDash([4,2]);break;case`solid`:case`double`:t.setLineDash([])}var e=f;m&&(e={x:0,y:0});var r=s.getNodeShape(n),i=D;P===`inside`&&(i=0),P===`outside`&&(i*=2);var a=(c+i+(R+H))/c,o=(l+i+(R+H))/l,u=c*a,d=l*o,p=s.nodeShapes[r].points,h;if(m&&(h=q(u,d,r,p).path),r===`ellipse`)s.drawEllipsePath(h||t,e.x,e.y,u,d);else if([`round-diamond`,`round-heptagon`,`round-hexagon`,`round-octagon`,`round-pentagon`,`round-polygon`,`round-triangle`,`round-tag`].includes(r)){var g=0,_=0,v=0;r===`round-diamond`?g=(i+H+R)*1.4:r===`round-heptagon`?(g=(i+H+R)*1.075,v=-(i/2+H+R)/35):r===`round-hexagon`?g=(i+H+R)*1.12:r===`round-pentagon`?(g=(i+H+R)*1.13,v=-(i/2+H+R)/15):r===`round-tag`?(g=(i+H+R)*1.12,_=(i/2+R+H)*.07):r===`round-triangle`&&(g=(i+H+R)*(Math.PI/2),v=-(i+H/2+R)/Math.PI),g!==0&&(a=(c+g)/c,u=c*a,[`round-hexagon`,`round-tag`].includes(r)||(o=(l+g)/l,d=l*o)),U=U===`auto`?Mr(u,d):U;for(var y=u/2,b=d/2,x=U+(i+R+H)/2,S=Array(p.length/2),C=Array(p.length/2),w=0;w0){if(r||=n.position(),i==null||a==null){var f=n.padding();i=n.width()+2*f,a=n.height()+2*f}o.colorFillStyle(t,l[0],l[1],l[2],c),o.nodeShapes[u].draw(t,r.x,r.y,i+s*2,a+s*2,d),t.fill()}}}},`drawNodeOverlayUnderlay`);om.drawNodeOverlay=sm(`overlay`),om.drawNodeUnderlay=sm(`underlay`),om.hasPie=function(e){return e=e[0],e._private.hasPie},om.hasStripe=function(e){return e=e[0],e._private.hasStripe},om.drawPie=function(e,t,n,r){t=t[0],r||=t.position();var i=t.cy().style(),a=t.pstyle(`pie-size`),o=t.pstyle(`pie-hole`),s=t.pstyle(`pie-start-angle`).pfValue,c=r.x,l=r.y,u=t.width(),d=t.height(),f=Math.min(u,d)/2,p,m=0;if(this.usePaths()&&(c=0,l=0),a.units===`%`?f*=a.pfValue:a.pfValue!==void 0&&(f=a.pfValue/2),o.units===`%`?p=f*o.pfValue:o.pfValue!==void 0&&(p=o.pfValue/2),!(p>=f))for(var h=1;h<=i.pieBackgroundN;h++){var g=t.pstyle(`pie-`+h+`-background-size`).value,_=t.pstyle(`pie-`+h+`-background-color`).value,v=t.pstyle(`pie-`+h+`-background-opacity`).value*n,y=g/100;y+m>1&&(y=1-m);var b=1.5*Math.PI+2*Math.PI*m;b+=s;var x=2*Math.PI*y,S=b+x;g===0||m>=1||m+y>1||(p===0?(e.beginPath(),e.moveTo(c,l),e.arc(c,l,f,b,S),e.closePath()):(e.beginPath(),e.arc(c,l,f,b,S),e.arc(c,l,p,S,b,!0),e.closePath()),this.colorFillStyle(e,_[0],_[1],_[2],v),e.fill(),m+=y)}},om.drawStripe=function(e,t,n,r){t=t[0],r||=t.position();var i=t.cy().style(),a=r.x,o=r.y,s=t.width(),c=t.height(),l=0,u=this.usePaths();e.save();var d=t.pstyle(`stripe-direction`).value,f=t.pstyle(`stripe-size`);switch(d){case`vertical`:break;case`righward`:e.rotate(-Math.PI/2)}var p=s,m=c;f.units===`%`?(p*=f.pfValue,m*=f.pfValue):f.pfValue!==void 0&&(p=f.pfValue,m=f.pfValue),u&&(a=0,o=0),o-=p/2,a-=m/2;for(var h=1;h<=i.stripeBackgroundN;h++){var g=t.pstyle(`stripe-`+h+`-background-size`).value,_=t.pstyle(`stripe-`+h+`-background-color`).value,v=t.pstyle(`stripe-`+h+`-background-opacity`).value*n,y=g/100;y+l>1&&(y=1-l),!(g===0||l>=1||l+y>1)&&(e.beginPath(),e.rect(a,o+m*l,p,m*y),e.closePath(),this.colorFillStyle(e,_[0],_[1],_[2],v),e.fill(),l+=y)}e.restore()};var cm={},lm=100;cm.getPixelRatio=function(){var e=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var t=this.cy.window(),n=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(t.devicePixelRatio||1)/n},cm.paintCache=function(e){for(var t=this.paintCaches=this.paintCaches||[],n=!0,r,i=0;in.minMbLowQualFrames&&(n.motionBlurPxRatio=n.mbPxRBlurry)),n.clearingMotionBlur&&(n.motionBlurPxRatio=1),n.textureDrawLastFrame&&!f&&(d[n.NODE]=!0,d[n.SELECT_BOX]=!0);var y=r.style(),b=r.zoom(),x=s===void 0?b:s,S=r.pan(),C={x:S.x,y:S.y},w={zoom:b,pan:{x:S.x,y:S.y}},T=n.prevViewport;T!==void 0&&w.zoom===T.zoom&&w.pan.x===T.pan.x&&w.pan.y===T.pan.y&&!(g&&!h)&&(n.motionBlurPxRatio=1),c&&(C=c),x*=l,C.x*=l,C.y*=l;var E=n.getCachedZSortedEles();function D(e,t,r,i,a){var o=e.globalCompositeOperation;e.globalCompositeOperation=`destination-out`,n.colorFillStyle(e,255,255,255,n.motionBlurTransparency),e.fillRect(t,r,i,a),e.globalCompositeOperation=o}e(D,`mbclear`);function O(e,t){var r,o,l,d;!n.clearingMotionBlur&&(e===u.bufferContexts[n.MOTIONBLUR_BUFFER_NODE]||e===u.bufferContexts[n.MOTIONBLUR_BUFFER_DRAG])?(r={x:S.x*m,y:S.y*m},o=b*m,l=n.canvasWidth*m,d=n.canvasHeight*m):(r=C,o=x,l=n.canvasWidth,d=n.canvasHeight),e.setTransform(1,0,0,1,0,0),t===`motionBlur`?D(e,0,0,l,d):!i&&(t===void 0||t)&&e.clearRect(0,0,l,d),a||(e.translate(r.x,r.y),e.scale(o,o)),c&&e.translate(c.x,c.y),s&&e.scale(s,s)}if(e(O,`setContextTransform`),f||(n.textureDrawLastFrame=!1),f){if(n.textureDrawLastFrame=!0,!n.textureCache){n.textureCache={},n.textureCache.bb=r.mutableElements().boundingBox(),n.textureCache.texture=n.data.bufferCanvases[n.TEXTURE_BUFFER];var k=n.data.bufferContexts[n.TEXTURE_BUFFER];k.setTransform(1,0,0,1,0,0),k.clearRect(0,0,n.canvasWidth*n.textureMult,n.canvasHeight*n.textureMult),n.render({forcedContext:k,drawOnlyNodeLayer:!0,forcedPxRatio:l*n.textureMult});var w=n.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:n.canvasWidth,height:n.canvasHeight};w.mpan={x:(0-w.pan.x)/w.zoom,y:(0-w.pan.y)/w.zoom}}d[n.DRAG]=!1,d[n.NODE]=!1;var A=u.contexts[n.NODE],j=n.textureCache.texture,w=n.textureCache.viewport;A.setTransform(1,0,0,1,0,0),p?D(A,0,0,w.width,w.height):A.clearRect(0,0,w.width,w.height);var M=y.core(`outside-texture-bg-color`).value,N=y.core(`outside-texture-bg-opacity`).value;n.colorFillStyle(A,M[0],M[1],M[2],N),A.fillRect(0,0,w.width,w.height);var b=r.zoom();O(A,!1),A.clearRect(w.mpan.x,w.mpan.y,w.width/w.zoom/l,w.height/w.zoom/l),A.drawImage(j,w.mpan.x,w.mpan.y,w.width/w.zoom/l,w.height/w.zoom/l)}else n.textureOnViewport&&!i&&(n.textureCache=null);var P=r.extent(),F=n.pinching||n.hoverData.dragging||n.swipePanning||n.data.wheelZooming||n.hoverData.draggingEles||n.cy.animated(),I=n.hideEdgesOnViewport&&F,L=[];if(L[n.NODE]=!d[n.NODE]&&p&&!n.clearedForMotionBlur[n.NODE]||n.clearingMotionBlur,L[n.NODE]&&(n.clearedForMotionBlur[n.NODE]=!0),L[n.DRAG]=!d[n.DRAG]&&p&&!n.clearedForMotionBlur[n.DRAG]||n.clearingMotionBlur,L[n.DRAG]&&(n.clearedForMotionBlur[n.DRAG]=!0),d[n.NODE]||a||o||L[n.NODE]){var R=p&&!L[n.NODE]&&m!==1,A=i||(R?n.data.bufferContexts[n.MOTIONBLUR_BUFFER_NODE]:u.contexts[n.NODE]);O(A,p&&!R?`motionBlur`:void 0),I?n.drawCachedNodes(A,E.nondrag,l,P):n.drawLayeredElements(A,E.nondrag,l,P),n.debug&&n.drawDebugPoints(A,E.nondrag),!a&&!p&&(d[n.NODE]=!1)}if(!o&&(d[n.DRAG]||a||L[n.DRAG])){var R=p&&!L[n.DRAG]&&m!==1,A=i||(R?n.data.bufferContexts[n.MOTIONBLUR_BUFFER_DRAG]:u.contexts[n.DRAG]);O(A,p&&!R?`motionBlur`:void 0),I?n.drawCachedNodes(A,E.drag,l,P):n.drawCachedElements(A,E.drag,l,P),n.debug&&n.drawDebugPoints(A,E.drag),!a&&!p&&(d[n.DRAG]=!1)}if(this.drawSelectionRectangle(t,O),p&&m!==1){var z=u.contexts[n.NODE],B=n.data.bufferCanvases[n.MOTIONBLUR_BUFFER_NODE],V=u.contexts[n.DRAG],H=n.data.bufferCanvases[n.MOTIONBLUR_BUFFER_DRAG],U=e(function(e,t,r){e.setTransform(1,0,0,1,0,0),r||!v?e.clearRect(0,0,n.canvasWidth,n.canvasHeight):D(e,0,0,n.canvasWidth,n.canvasHeight);var i=m;e.drawImage(t,0,0,n.canvasWidth*i,n.canvasHeight*i,0,0,n.canvasWidth,n.canvasHeight)},`drawMotionBlur`);(d[n.NODE]||L[n.NODE])&&(U(z,B,L[n.NODE]),d[n.NODE]=!1),(d[n.DRAG]||L[n.DRAG])&&(U(V,H,L[n.DRAG]),d[n.DRAG]=!1)}n.prevViewport=w,n.clearingMotionBlur&&(n.clearingMotionBlur=!1,n.motionBlurCleared=!0,n.motionBlur=!0),p&&(n.motionBlurTimeout=setTimeout(function(){n.motionBlurTimeout=null,n.clearedForMotionBlur[n.NODE]=!1,n.clearedForMotionBlur[n.DRAG]=!1,n.motionBlur=!1,n.clearingMotionBlur=!f,n.mbFrames=0,d[n.NODE]=!0,d[n.DRAG]=!0,n.redraw()},lm)),i||r.emit(`render`)};var um;cm.drawSelectionRectangle=function(e,t){var n=this,r=n.cy,i=n.data,a=r.style(),o=e.drawOnlyNodeLayer,s=e.drawAllLayers,c=i.canvasNeedsRedraw,l=e.forcedContext;if(n.showFps||!o&&c[n.SELECT_BOX]&&!s){var u=l||i.contexts[n.SELECT_BOX];if(t(u),n.selection[4]==1&&(n.hoverData.selecting||n.touchData.selecting)){var d=n.cy.zoom(),f=a.core(`selection-box-border-width`).value/d;u.lineWidth=f,u.fillStyle=`rgba(`+a.core(`selection-box-color`).value[0]+`,`+a.core(`selection-box-color`).value[1]+`,`+a.core(`selection-box-color`).value[2]+`,`+a.core(`selection-box-opacity`).value+`)`,u.fillRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]),f>0&&(u.strokeStyle=`rgba(`+a.core(`selection-box-border-color`).value[0]+`,`+a.core(`selection-box-border-color`).value[1]+`,`+a.core(`selection-box-border-color`).value[2]+`,`+a.core(`selection-box-opacity`).value+`)`,u.strokeRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]))}if(i.bgActivePosistion&&!n.hoverData.selecting){var d=n.cy.zoom(),p=i.bgActivePosistion;u.fillStyle=`rgba(`+a.core(`active-bg-color`).value[0]+`,`+a.core(`active-bg-color`).value[1]+`,`+a.core(`active-bg-color`).value[2]+`,`+a.core(`active-bg-opacity`).value+`)`,u.beginPath(),u.arc(p.x,p.y,a.core(`active-bg-size`).pfValue/d,0,2*Math.PI),u.fill()}var m=n.lastRedrawTime;if(n.showFps&&m){m=Math.round(m);var h=Math.round(1e3/m),g=`1 frame = `+m+` ms = `+h+` fps`;u.setTransform(1,0,0,1,0,0),u.fillStyle=`rgba(255, 0, 0, 0.75)`,u.strokeStyle=`rgba(255, 0, 0, 0.75)`,u.font=`30px Arial`,um||=u.measureText(g).actualBoundingBoxAscent,u.fillText(g,0,um),u.strokeRect(0,um+10,250,20),u.fillRect(0,um+10,250*Math.min(h/60,1),20)}s||(c[n.SELECT_BOX]=!1)}};function dm(e,t,n){var r=e.createShader(t);if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw Error(e.getShaderInfoLog(r));return r}e(dm,`compileShader`);function fm(e,t,n){var r=dm(e,e.VERTEX_SHADER,t),i=dm(e,e.FRAGMENT_SHADER,n),a=e.createProgram();if(e.attachShader(a,r),e.attachShader(a,i),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS))throw Error(`Could not initialize shaders`);return a}e(fm,`createProgram`);function pm(e,t,n){n===void 0&&(n=t);var r=e.makeOffscreenCanvas(t,n),i=r.context=r.getContext(`2d`);return r.clear=function(){return i.clearRect(0,0,r.width,r.height)},r.clear(),r}e(pm,`createTextureCanvas`);function mm(e){var t=e.pixelRatio,n=e.cy.zoom(),r=e.cy.pan();return{zoom:n*t,pan:{x:r.x*t,y:r.y*t}}}e(mm,`getEffectivePanZoom`);function hm(e){var t=e.pixelRatio;return e.cy.zoom()*t}e(hm,`getEffectiveZoom`);function gm(e,t,n,r,i){var a=r*n+t.x,o=i*n+t.y;return o=Math.round(e.canvasHeight-o),[a,o]}e(gm,`modelToRenderedPosition`);function _m(e,t){return t.picking?!0:e.pstyle(`background-fill`).value!==`solid`||e.pstyle(`background-image`).strValue!==`none`?!1:e.pstyle(`border-width`).value===0||e.pstyle(`border-opacity`).value===0||e.pstyle(`border-style`).value===`solid`}e(_m,`isSimpleShape`);function vm(e,t){if(e.length!==t.length)return!1;for(var n=0;n>0&255)/255,n[1]=(e>>8&255)/255,n[2]=(e>>16&255)/255,n[3]=(e>>24&255)/255,n}e(bm,`indexToVec4`);function xm(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}e(xm,`vec4ToIndex`);function Sm(e,t){var n=e.createTexture();return n.buffer=function(t){e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_NEAREST),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null)},n.deleteTexture=function(){e.deleteTexture(n)},n}e(Sm,`createTexture`);function Cm(e,t){switch(t){case`float`:return[1,e.FLOAT,4];case`vec2`:return[2,e.FLOAT,4];case`vec3`:return[3,e.FLOAT,4];case`vec4`:return[4,e.FLOAT,4];case`int`:return[1,e.INT,4];case`ivec2`:return[2,e.INT,4]}}e(Cm,`getTypeInfo`);function wm(e,t,n){switch(t){case e.FLOAT:return new Float32Array(n);case e.INT:return new Int32Array(n)}}e(wm,`createTypedArray`);function Tm(e,t,n,r,i,a){switch(t){case e.FLOAT:return new Float32Array(n.buffer,a*r,i);case e.INT:return new Int32Array(n.buffer,a*r,i)}}e(Tm,`createTypedArrayView`);function Em(e,t,n,r){var i=p(Cm(e,t),2),a=i[0],o=i[1],s=wm(e,o,r),c=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,c),e.bufferData(e.ARRAY_BUFFER,s,e.STATIC_DRAW),o===e.FLOAT?e.vertexAttribPointer(n,a,o,!1,0,0):o===e.INT&&e.vertexAttribIPointer(n,a,o,0,0),e.enableVertexAttribArray(n),e.bindBuffer(e.ARRAY_BUFFER,null),c}e(Em,`createBufferStaticDraw`);function Dm(e,t,n,r){var i=p(Cm(e,n),3),a=i[0],o=i[1],s=i[2],c=wm(e,o,t*a),l=a*s,u=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,u),e.bufferData(e.ARRAY_BUFFER,t*l,e.DYNAMIC_DRAW),e.enableVertexAttribArray(r),o===e.FLOAT?e.vertexAttribPointer(r,a,o,!1,l,0):o===e.INT&&e.vertexAttribIPointer(r,a,o,l,0),e.vertexAttribDivisor(r,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var d=Array(t),f=0;fi&&(a=i/t,o=t*a,s=n*a),{scale:a,texW:o,texH:s}},`getScale`)},{key:`draw`,value:e(function(t,n,r){var i=this;if(this.locked)throw Error(`can't draw, atlas is locked`);var a=this.texSize,o=this.texRows,s=this.texHeight,c=this.getScale(n),l=c.scale,u=c.texW,d=c.texH,f=e(function(e,t){if(r&&t){var i=t.context,a=e.x,o=e.row,c=a,u=s*o;i.save(),i.translate(c,u),i.scale(l,l),r(i,n),i.restore()}},`drawAt`),p=[null,null],m=e(function(){f(i.freePointer,i.canvas),p[0]={x:i.freePointer.x,y:i.freePointer.row*s,w:u,h:d},p[1]={x:i.freePointer.x+u,y:i.freePointer.row*s,w:0,h:d},i.freePointer.x+=u,i.freePointer.x==a&&(i.freePointer.x=0,i.freePointer.row++)},`drawNormal`),h=e(function(){var e=i.scratch,t=i.canvas;e.clear(),f({x:0,row:0},e);var n=a-i.freePointer.x,r=u-n,o=s,c=i.freePointer.x,l=i.freePointer.row*s,m=n;t.context.drawImage(e,0,0,m,o,c,l,m,o),p[0]={x:c,y:l,w:m,h:d};var h=n,g=(i.freePointer.row+1)*s,_=r;t&&t.context.drawImage(e,h,0,_,o,0,g,_,o),p[1]={x:0,y:g,w:_,h:d},i.freePointer.x=r,i.freePointer.row++},`drawWrapped`),g=e(function(){i.freePointer.x=0,i.freePointer.row++},`moveToStartOfNextRow`);if(this.freePointer.x+u<=a)m();else if(this.freePointer.row>=o-1)return!1;else this.freePointer.x===a?(g(),m()):this.enableWrapping?h():(g(),m());return this.keyToLocation.set(t,p),this.needsBuffer=!0,p},`draw`)},{key:`getOffsets`,value:e(function(e){return this.keyToLocation.get(e)},`getOffsets`)},{key:`isEmpty`,value:e(function(){return this.freePointer.x===0&&this.freePointer.row===0},`isEmpty`)},{key:`canFit`,value:e(function(e){if(this.locked)return!1;var t=this.texSize,n=this.texRows,r=this.getScale(e).texW;return this.freePointer.x+r>t?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},i=r.forceRedraw,a=i!==void 0&&i,o=r.filterEle,c=o===void 0?function(){return!0}:o,l=r.filterType,u=l===void 0?function(){return!0}:l,d=!1,f=!1,p=s(t),m;try{for(p.s();!(m=p.n()).done;){var h=m.value;if(c(h)){var g=s(this.renderTypes.values()),_;try{var v=e(function(){var e=_.value,t=e.type;if(u(t)){var r=n.collections.get(e.collection),i=e.getKey(h),o=Array.isArray(i)?i:[i];if(a)o.forEach(function(e){return r.markKeyForGC(e)}),f=!0;else{var s=e.getID?e.getID(h):h.id(),c=n._key(t,s),l=n.typeAndIdToKey.get(c);l!==void 0&&!vm(o,l)&&(d=!0,n.typeAndIdToKey.delete(c),l.forEach(function(e){return r.markKeyForGC(e)}))}}},`_loop2`);for(g.s();!(_=g.n()).done;)v()}catch(e){g.e(e)}finally{g.f()}}}}catch(e){p.e(e)}finally{p.f()}return f&&(this.gc(),d=!1),d},`invalidate`)},{key:`gc`,value:e(function(){var e=s(this.collections.values()),t;try{for(e.s();!(t=e.n()).done;)t.value.gc()}catch(t){e.e(t)}finally{e.f()}},`gc`)},{key:`getOrCreateAtlas`,value:e(function(e,t,n,r){var i=this.renderTypes.get(t),a=this.collections.get(i.collection),o=!1,s=a.draw(r,n,function(t){i.drawClipped?(t.save(),t.beginPath(),t.rect(0,0,n.w,n.h),t.clip(),i.drawElement(t,e,n,!0,!0),t.restore()):i.drawElement(t,e,n,!0,!0),o=!0});if(o){var c=i.getID?i.getID(e):e.id(),l=this._key(t,c);this.typeAndIdToKey.has(l)?this.typeAndIdToKey.get(l).push(r):this.typeAndIdToKey.set(l,[r])}return s},`getOrCreateAtlas`)},{key:`getAtlasInfo`,value:e(function(e,t){var n=this,r=this.renderTypes.get(t),i=r.getKey(e);return(Array.isArray(i)?i:[i]).map(function(i){var a=r.getBoundingBox(e,i),o=n.getOrCreateAtlas(e,t,a,i),s=p(o.getOffsets(i),2),c=s[0];return{atlas:o,tex:c,tex1:c,tex2:s[1],bb:a}})},`getAtlasInfo`)},{key:`getDebugInfo`,value:e(function(){var e=[],t=s(this.collections),n;try{for(t.s();!(n=t.n()).done;){var r=p(n.value,2),i=r[0],a=r[1].getCounts(),o=a.keyCount,c=a.atlasCount;e.push({type:i,keyCount:o,atlasCount:c})}}catch(e){t.e(e)}finally{t.f()}return e},`getDebugInfo`)}])})(),Hm=(function(){function t(e){i(this,t),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]}return e(t,`AtlasBatchManager`),o(t,[{key:`getMaxAtlasesPerBatch`,value:e(function(){return this.maxAtlasesPerBatch},`getMaxAtlasesPerBatch`)},{key:`getAtlasSize`,value:e(function(){return this.atlasSize},`getAtlasSize`)},{key:`getIndexArray`,value:e(function(){return Array.from({length:this.maxAtlasesPerBatch},function(e,t){return t})},`getIndexArray`)},{key:`startBatch`,value:e(function(){this.batchAtlases=[]},`startBatch`)},{key:`getAtlasCount`,value:e(function(){return this.batchAtlases.length},`getAtlasCount`)},{key:`getAtlases`,value:e(function(){return this.batchAtlases},`getAtlases`)},{key:`canAddToCurrentBatch`,value:e(function(e){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(e)},`canAddToCurrentBatch`)},{key:`getAtlasIndexForBatch`,value:e(function(e){var t=this.batchAtlases.indexOf(e);if(t<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw Error(`cannot add more atlases to batch`);this.batchAtlases.push(e),t=this.batchAtlases.length-1}return t},`getAtlasIndexForBatch`)}])})(),Um=` + float circleSD(vec2 p, float r) { + return distance(vec2(0), p) - r; // signed distance + } +`,Wm=` + float rectangleSD(vec2 p, vec2 b) { + vec2 d = abs(p)-b; + return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0); + } +`,Gm=` + float roundRectangleSD(vec2 p, vec2 b, vec4 cr) { + cr.xy = (p.x > 0.0) ? cr.xy : cr.zw; + cr.x = (p.y > 0.0) ? cr.x : cr.y; + vec2 q = abs(p) - b + cr.x; + return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x; + } +`,Km=` + float ellipseSD(vec2 p, vec2 ab) { + p = abs( p ); // symmetry + + // find root with Newton solver + vec2 q = ab*(p-ab); + float w = (q.x1.0) ? d : -d; + } +`,qm={SCREEN:{name:`screen`,screen:!0},PICKING:{name:`picking`,picking:!0}},Jm={IGNORE:1,USE_BB:2},Ym=0,Xm=1,Zm=2,Qm=3,$m=4,eh=5,th=6,nh=7,rh=(function(){function t(e,n,r){i(this,t),this.r=e,this.gl=n,this.maxInstances=r.webglBatchSize,this.atlasSize=r.webglTexSize,this.bgColor=r.bgColor,this.debug=r.webglDebug,this.batchDebugInfo=[],r.enableWrapping=!0,r.createTextureCanvas=pm,this.atlasManager=new Vm(e,r),this.batchManager=new Hm(r),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(qm.SCREEN),this.pickingProgram=this._createShaderProgram(qm.PICKING),this.vao=this._createVAO()}return e(t,`ElementDrawingWebGL`),o(t,[{key:`addAtlasCollection`,value:e(function(e,t){this.atlasManager.addAtlasCollection(e,t)},`addAtlasCollection`)},{key:`addTextureAtlasRenderType`,value:e(function(e,t){this.atlasManager.addRenderType(e,t)},`addTextureAtlasRenderType`)},{key:`addSimpleShapeRenderType`,value:e(function(e,t){this.simpleShapeOptions.set(e,t)},`addSimpleShapeRenderType`)},{key:`invalidate`,value:e(function(t){var n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).type,r=this.atlasManager;return n?r.invalidate(t,{filterType:e(function(e){return e===n},`filterType`),forceRedraw:!0}):r.invalidate(t)},`invalidate`)},{key:`gc`,value:e(function(){this.atlasManager.gc()},`gc`)},{key:`_createShaderProgram`,value:e(function(e){var t=this.gl,n=`#version 300 es + precision highp float; + + uniform mat3 uPanZoomMatrix; + uniform int uAtlasSize; + + // instanced + in vec2 aPosition; // a vertex from the unit square + + in mat3 aTransform; // used to transform verticies, eg into a bounding box + in int aVertType; // the type of thing we are rendering + + // the z-index that is output when using picking mode + in vec4 aIndex; + + // For textures + in int aAtlasId; // which shader unit/atlas to use + in vec4 aTex; // x/y/w/h of texture in atlas + + // for edges + in vec4 aPointAPointB; + in vec4 aPointCPointD; + in vec2 aLineWidth; // also used for node border width + + // simple shapes + in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left] + in vec4 aColor; // also used for edges + in vec4 aBorderColor; // aLineWidth is used for border width + + // output values passed to the fragment shader + out vec2 vTexCoord; + out vec4 vColor; + out vec2 vPosition; + // flat values are not interpolated + flat out int vAtlasId; + flat out int vVertType; + flat out vec2 vTopRight; + flat out vec2 vBotLeft; + flat out vec4 vCornerRadius; + flat out vec4 vBorderColor; + flat out vec2 vBorderWidth; + flat out vec4 vIndex; + + void main(void) { + int vid = gl_VertexID; + vec2 position = aPosition; // TODO make this a vec3, simplifies some code below + + if(aVertType == ${Ym}) { + float texX = aTex.x; // texture coordinates + float texY = aTex.y; + float texW = aTex.z; + float texH = aTex.w; + + if(vid == 1 || vid == 2 || vid == 4) { + texX += texW; + } + if(vid == 2 || vid == 4 || vid == 5) { + texY += texH; + } + + float d = float(uAtlasSize); + vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1 + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + } + else if(aVertType == ${$m} || aVertType == ${nh} + || aVertType == ${eh} || aVertType == ${th}) { // simple shapes + + // the bounding box is needed by the fragment shader + vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat + vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat + vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated + + // calculations are done in the fragment shader, just pass these along + vColor = aColor; + vCornerRadius = aCornerRadius; + vBorderColor = aBorderColor; + vBorderWidth = aLineWidth; + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + } + else if(aVertType == ${Xm}) { + vec2 source = aPointAPointB.xy; + vec2 target = aPointAPointB.zw; + + // adjust the geometry so that the line is centered on the edge + position.y = position.y - 0.5; + + // stretch the unit square into a long skinny rectangle + vec2 xBasis = target - source; + vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x)); + vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y; + + gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0); + vColor = aColor; + } + else if(aVertType == ${Zm}) { + vec2 pointA = aPointAPointB.xy; + vec2 pointB = aPointAPointB.zw; + vec2 pointC = aPointCPointD.xy; + vec2 pointD = aPointCPointD.zw; + + // adjust the geometry so that the line is centered on the edge + position.y = position.y - 0.5; + + vec2 p0, p1, p2, pos; + if(position.x == 0.0) { // The left side of the unit square + p0 = pointA; + p1 = pointB; + p2 = pointC; + pos = position; + } else { // The right side of the unit square, use same approach but flip the geometry upside down + p0 = pointD; + p1 = pointC; + p2 = pointB; + pos = vec2(0.0, -position.y); + } + + vec2 p01 = p1 - p0; + vec2 p12 = p2 - p1; + vec2 p21 = p1 - p2; + + // Find the normal vector. + vec2 tangent = normalize(normalize(p12) + normalize(p01)); + vec2 normal = vec2(-tangent.y, tangent.x); + + // Find the vector perpendicular to p0 -> p1. + vec2 p01Norm = normalize(vec2(-p01.y, p01.x)); + + // Determine the bend direction. + float sigma = sign(dot(p01 + p21, normal)); + float width = aLineWidth[0]; + + if(sign(pos.y) == -sigma) { + // This is an intersecting vertex. Adjust the position so that there's no overlap. + vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm); + gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); + } else { + // This is a non-intersecting vertex. Treat it like a mitre join. + vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm); + gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); + } + + vColor = aColor; + } + else if(aVertType == ${Qm} && vid < 3) { + // massage the first triangle into an edge arrow + if(vid == 0) + position = vec2(-0.15, -0.3); + if(vid == 1) + position = vec2( 0.0, 0.0); + if(vid == 2) + position = vec2( 0.15, -0.3); + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + vColor = aColor; + } + else { + gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space + } + + vAtlasId = aAtlasId; + vVertType = aVertType; + vIndex = aIndex; + } + `,r=this.batchManager.getIndexArray(),i=fm(t,n,`#version 300 es + precision highp float; + + // declare texture unit for each texture atlas in the batch + ${r.map(function(e){return`uniform sampler2D uTexture${e};`}).join(` + `)} + + uniform vec4 uBGColor; + uniform float uZoom; + + in vec2 vTexCoord; + in vec4 vColor; + in vec2 vPosition; // model coordinates + + flat in int vAtlasId; + flat in vec4 vIndex; + flat in int vVertType; + flat in vec2 vTopRight; + flat in vec2 vBotLeft; + flat in vec4 vCornerRadius; + flat in vec4 vBorderColor; + flat in vec2 vBorderWidth; + + out vec4 outColor; + + ${Um} + ${Wm} + ${Gm} + ${Km} + + vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha + return vec4( + top.rgb + (bot.rgb * (1.0 - top.a)), + top.a + (bot.a * (1.0 - top.a)) + ); + } + + vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance + // scale to the zoom level so that borders don't look blurry when zoomed in + // note 1.5 is an aribitrary value chosen because it looks good + return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); + } + + void main(void) { + if(vVertType == ${Ym}) { + // look up the texel from the texture unit + ${r.map(function(e){return`if(vAtlasId == ${e}) outColor = texture(uTexture${e}, vTexCoord);`}).join(` + else `)} + } + else if(vVertType == ${Qm}) { + // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out'; + outColor = blend(vColor, uBGColor); + outColor.a = 1.0; // make opaque, masks out line under arrow + } + else if(vVertType == ${$m} && vBorderWidth == vec2(0.0)) { // simple rectangle with no border + outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done + } + else if(vVertType == ${$m} || vVertType == ${nh} + || vVertType == ${eh} || vVertType == ${th}) { // use SDF + + float outerBorder = vBorderWidth[0]; + float innerBorder = vBorderWidth[1]; + float borderPadding = outerBorder * 2.0; + float w = vTopRight.x - vBotLeft.x - borderPadding; + float h = vTopRight.y - vBotLeft.y - borderPadding; + vec2 b = vec2(w/2.0, h/2.0); // half width, half height + vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center + + float d; // signed distance + if(vVertType == ${$m}) { + d = rectangleSD(p, b); + } else if(vVertType == ${nh} && w == h) { + d = circleSD(p, b.x); // faster than ellipse + } else if(vVertType == ${nh}) { + d = ellipseSD(p, b); + } else { + d = roundRectangleSD(p, b, vCornerRadius.wzyx); + } + + // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling + // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box + if(d > 0.0) { + if(d > outerBorder) { + discard; + } else { + outColor = distInterp(vBorderColor, vec4(0), d - outerBorder); + } + } else { + if(d > innerBorder) { + vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor; + vec4 innerBorderColor = blend(vBorderColor, vColor); + outColor = distInterp(innerBorderColor, outerColor, d); + } + else { + vec4 outerColor; + if(innerBorder == 0.0 && outerBorder == 0.0) { + outerColor = vec4(0); + } else if(innerBorder == 0.0) { + outerColor = vBorderColor; + } else { + outerColor = blend(vBorderColor, vColor); + } + outColor = distInterp(vColor, outerColor, d - innerBorder); + } + } + } + else { + outColor = vColor; + } + + ${e.picking?`if(outColor.a == 0.0) discard; + else outColor = vIndex;`:``} + } + `);i.aPosition=t.getAttribLocation(i,`aPosition`),i.aIndex=t.getAttribLocation(i,`aIndex`),i.aVertType=t.getAttribLocation(i,`aVertType`),i.aTransform=t.getAttribLocation(i,`aTransform`),i.aAtlasId=t.getAttribLocation(i,`aAtlasId`),i.aTex=t.getAttribLocation(i,`aTex`),i.aPointAPointB=t.getAttribLocation(i,`aPointAPointB`),i.aPointCPointD=t.getAttribLocation(i,`aPointCPointD`),i.aLineWidth=t.getAttribLocation(i,`aLineWidth`),i.aColor=t.getAttribLocation(i,`aColor`),i.aCornerRadius=t.getAttribLocation(i,`aCornerRadius`),i.aBorderColor=t.getAttribLocation(i,`aBorderColor`),i.uPanZoomMatrix=t.getUniformLocation(i,`uPanZoomMatrix`),i.uAtlasSize=t.getUniformLocation(i,`uAtlasSize`),i.uBGColor=t.getUniformLocation(i,`uBGColor`),i.uZoom=t.getUniformLocation(i,`uZoom`),i.uTextures=[];for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:qm.SCREEN;this.panZoomMatrix=e,this.renderTarget=t,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()},`startFrame`)},{key:`startBatch`,value:e(function(){this.instanceCount=0,this.batchManager.startBatch()},`startBatch`)},{key:`endFrame`,value:e(function(){this.endBatch()},`endFrame`)},{key:`_isVisible`,value:e(function(e,t){return e.visible()?t&&t.isVisible?t.isVisible(e):!0:!1},`_isVisible`)},{key:`drawTexture`,value:e(function(e,t,n){var r=this.atlasManager,i=this.batchManager,a=r.getRenderTypeOpts(n);if(this._isVisible(e,a)&&!(e.isEdge()&&!this._isValidEdge(e))){if(this.renderTarget.picking&&a.getTexPickingMode){var o=a.getTexPickingMode(e);if(o===Jm.IGNORE)return;if(o==Jm.USE_BB){this.drawPickingRectangle(e,t,n);return}}var c=s(r.getAtlasInfo(e,n)),l;try{for(c.s();!(l=c.n()).done;){var u=l.value,d=u.atlas,f=u.tex1,m=u.tex2;i.canAddToCurrentBatch(d)||this.endBatch();for(var h=i.getAtlasIndexForBatch(d),g=0,_=[[f,!0],[m,!1]];g<_.length;g++){var v=p(_[g],2),y=v[0],b=v[1];if(y.w!=0){var x=this.instanceCount;this.vertTypeBuffer.getView(x)[0]=Ym,bm(t,this.indexBuffer.getView(x));var S=this.atlasIdBuffer.getView(x);S[0]=h;var C=this.texBuffer.getView(x);C[0]=y.x,C[1]=y.y,C[2]=y.w,C[3]=y.h;var w=this.transformBuffer.getMatrixView(x);this.setTransformMatrix(e,w,a,u,b),this.instanceCount++,b||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(e){c.e(e)}finally{c.f()}}},`drawTexture`)},{key:`setTransformMatrix`,value:e(function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=0;if(n.shapeProps&&n.shapeProps.padding&&(a=e.pstyle(n.shapeProps.padding).pfValue),r){var o=r.bb,s=r.tex1,c=r.tex2,l=s.w/(s.w+c.w);i||(l=1-l);var u=this._getAdjustedBB(o,a,i,l);this._applyTransformMatrix(t,u,n,e)}else{var d=n.getBoundingBox(e),f=this._getAdjustedBB(d,a,!0,1);this._applyTransformMatrix(t,f,n,e)}},`setTransformMatrix`)},{key:`_applyTransformMatrix`,value:e(function(e,t,n,r){var i,a;Mm(e);var o=n.getRotation?n.getRotation(r):0;if(o!==0){var s=n.getRotationPoint(r),c=s.x,l=s.y;Pm(e,e,[c,l]),Fm(e,e,o);var u=n.getRotationOffset(r);i=u.x+(t.xOffset||0),a=u.y+(t.yOffset||0)}else i=t.x1,a=t.y1;Pm(e,e,[i,a]),Im(e,e,[t.w,t.h])},`_applyTransformMatrix`)},{key:`_getAdjustedBB`,value:e(function(e,t,n,r){var i=e.x1,a=e.y1,o=e.w,s=e.h,c=e.yOffset;t&&(i-=t,a-=t,o+=2*t,s+=2*t);var l=0,u=o*r;return n&&r<1?o=u:!n&&r<1&&(l=o-u,i+=l,o=u),{x1:i,y1:a,w:o,h:s,xOffset:l,yOffset:c}},`_getAdjustedBB`)},{key:`drawPickingRectangle`,value:e(function(e,t,n){var r=this.atlasManager.getRenderTypeOpts(n),i=this.instanceCount;this.vertTypeBuffer.getView(i)[0]=$m,bm(t,this.indexBuffer.getView(i)),ym([0,0,0],1,this.colorBuffer.getView(i));var a=this.transformBuffer.getMatrixView(i);this.setTransformMatrix(e,a,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()},`drawPickingRectangle`)},{key:`drawNode`,value:e(function(e,t,n){var r=this.simpleShapeOptions.get(n);if(this._isVisible(e,r)){var i=r.shapeProps,a=this._getVertTypeForShape(e,i.shape);if(a===void 0||r.isSimple&&!r.isSimple(e,this.renderTarget)){this.drawTexture(e,t,n);return}var o=this.instanceCount;if(this.vertTypeBuffer.getView(o)[0]=a,a===eh||a===th){var s=r.getBoundingBox(e),c=this._getCornerRadius(e,i.radius,s),l=this.cornerRadiusBuffer.getView(o);l[0]=c,l[1]=c,l[2]=c,l[3]=c,a===th&&(l[0]=0,l[2]=0)}bm(t,this.indexBuffer.getView(o));var u=this.renderTarget.picking?1:n===`node-body`?e.effectiveOpacity():1,d=this.renderTarget.picking?1:e.pstyle(i.opacity).value*u,f=e.pstyle(i.color).value;ym(f,d,this.colorBuffer.getView(o));var p=this.lineWidthBuffer.getView(o);if(p[0]=0,p[1]=0,i.border){var m=e.pstyle(`border-width`).value;if(m>0){var h=e.pstyle(`border-color`).value;ym(h,u*e.pstyle(`border-opacity`).value,this.borderColorBuffer.getView(o));var g=e.pstyle(`border-position`).value;if(g===`inside`)p[0]=0,p[1]=-m;else if(g===`outside`)p[0]=m,p[1]=0;else{var _=m/2;p[0]=_,p[1]=-_}}}var v=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(e,v,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},`drawNode`)},{key:`_getVertTypeForShape`,value:e(function(e,t){switch(e.pstyle(t).value){case`rectangle`:return $m;case`ellipse`:return nh;case`roundrectangle`:case`round-rectangle`:return eh;case`bottom-round-rectangle`:return th;default:return}},`_getVertTypeForShape`)},{key:`_getCornerRadius`,value:e(function(e,t,n){var r=n.w,i=n.h;if(e.pstyle(t).value===`auto`)return jr(r,i);var a=e.pstyle(t).pfValue,o=r/2,s=i/2;return Math.min(a,s,o)},`_getCornerRadius`)},{key:`drawEdgeArrow`,value:e(function(e,t,n){if(e.visible()){var r=e._private.rscratch,i,a,o;if(n===`source`?(i=r.arrowStartX,a=r.arrowStartY,o=r.srcArrowAngle):(i=r.arrowEndX,a=r.arrowEndY,o=r.tgtArrowAngle),!(isNaN(i)||i==null||isNaN(a)||a==null||isNaN(o)||o==null)&&e.pstyle(n+`-arrow-shape`).value!==`none`){var s=e.pstyle(n+`-arrow-color`).value,c=e.pstyle(`opacity`).value*e.pstyle(`line-opacity`).value,l=e.pstyle(`width`).pfValue,u=e.pstyle(`arrow-scale`).value,d=this.r.getArrowWidth(l,u),f=this.instanceCount,p=this.transformBuffer.getMatrixView(f);Mm(p),Pm(p,p,[i,a]),Im(p,p,[d,d]),Fm(p,p,o),this.vertTypeBuffer.getView(f)[0]=Qm,bm(t,this.indexBuffer.getView(f)),ym(s,c,this.colorBuffer.getView(f)),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},`drawEdgeArrow`)},{key:`drawEdgeLine`,value:e(function(e,t){if(e.visible()){var n=this._getEdgePoints(e);if(n){var r=e.pstyle(`opacity`).value,i=e.pstyle(`line-opacity`).value,a=e.pstyle(`width`).pfValue,o=e.pstyle(`line-color`).value,s=r*i;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),n.length==4){var c=this.instanceCount;this.vertTypeBuffer.getView(c)[0]=Xm,bm(t,this.indexBuffer.getView(c)),ym(o,s,this.colorBuffer.getView(c));var l=this.lineWidthBuffer.getView(c);l[0]=a;var u=this.pointAPointBBuffer.getView(c);u[0]=n[0],u[1]=n[1],u[2]=n[2],u[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var d=0;d=this.maxInstances&&this.endBatch()}}}},`drawEdgeLine`)},{key:`_isValidEdge`,value:e(function(e){var t=e._private.rscratch;return!(t.badLine||t.allpts==null||isNaN(t.allpts[0]))},`_isValidEdge`)},{key:`_getEdgePoints`,value:e(function(e){var t=e._private.rscratch;if(this._isValidEdge(e)){var n=t.allpts;if(n.length==4)return n;var r=this._getNumSegments(e);return this._getCurveSegmentPoints(n,r)}},`_getEdgePoints`)},{key:`_getNumSegments`,value:e(function(e){return Math.min(15,this.maxInstances)},`_getNumSegments`)},{key:`_getCurveSegmentPoints`,value:e(function(e,t){if(e.length==4)return e;for(var n=Array((t+1)*2),r=0;r<=t;r++)if(r==0)n[0]=e[0],n[1]=e[1];else if(r==t)n[r*2]=e[e.length-2],n[r*2+1]=e[e.length-1];else{var i=r/t;this._setCurvePoint(e,i,n,r*2)}return n},`_getCurveSegmentPoints`)},{key:`_setCurvePoint`,value:e(function(e,t,n,r){if(e.length<=2)n[r]=e[0],n[r+1]=e[1];else{for(var i=Array(e.length-2),a=0;a0}},`isLayerVisible`),c=e(function(e){return e.pstyle(`text-events`).strValue===`yes`?Jm.USE_BB:Jm.IGNORE},`getTexPickingMode`),l=e(function(e){var t=e.position(),n=t.x,r=t.y,i=e.outerWidth(),a=e.outerHeight();return{w:i,h:a,x1:n-i/2,y1:r-a/2}},`getBBForSimpleShape`);r.drawing.addAtlasCollection(`node`,{texRows:t.webglTexRowsNodes}),r.drawing.addAtlasCollection(`label`,{texRows:t.webglTexRows}),r.drawing.addTextureAtlasRenderType(`node-body`,{collection:`node`,getKey:n.getStyleKey,getBoundingBox:n.getElementBox,drawElement:n.drawElement}),r.drawing.addSimpleShapeRenderType(`node-body`,{getBoundingBox:l,isSimple:_m,shapeProps:{shape:`shape`,color:`background-color`,opacity:`background-opacity`,radius:`corner-radius`,border:!0}}),r.drawing.addSimpleShapeRenderType(`node-overlay`,{getBoundingBox:l,isVisible:s(`overlay`),shapeProps:{shape:`overlay-shape`,color:`overlay-color`,opacity:`overlay-opacity`,padding:`overlay-padding`,radius:`overlay-corner-radius`}}),r.drawing.addSimpleShapeRenderType(`node-underlay`,{getBoundingBox:l,isVisible:s(`underlay`),shapeProps:{shape:`underlay-shape`,color:`underlay-color`,opacity:`underlay-opacity`,padding:`underlay-padding`,radius:`underlay-corner-radius`}}),r.drawing.addTextureAtlasRenderType(`label`,{collection:`label`,getTexPickingMode:c,getKey:sh(n.getLabelKey,null),getBoundingBox:ch(n.getLabelBox,null),drawClipped:!0,drawElement:n.drawLabel,getRotation:a(null),getRotationPoint:n.getLabelRotationPoint,getRotationOffset:n.getLabelRotationOffset,isVisible:o(`label`)}),r.drawing.addTextureAtlasRenderType(`edge-source-label`,{collection:`label`,getTexPickingMode:c,getKey:sh(n.getSourceLabelKey,`source`),getBoundingBox:ch(n.getSourceLabelBox,`source`),drawClipped:!0,drawElement:n.drawSourceLabel,getRotation:a(`source`),getRotationPoint:n.getSourceLabelRotationPoint,getRotationOffset:n.getSourceLabelRotationOffset,isVisible:o(`source-label`)}),r.drawing.addTextureAtlasRenderType(`edge-target-label`,{collection:`label`,getTexPickingMode:c,getKey:sh(n.getTargetLabelKey,`target`),getBoundingBox:ch(n.getTargetLabelBox,`target`),drawClipped:!0,drawElement:n.drawTargetLabel,getRotation:a(`target`),getRotationPoint:n.getTargetLabelRotationPoint,getRotationOffset:n.getTargetLabelRotationOffset,isVisible:o(`target-label`)});var u=st(function(){console.log(`garbage collect flag set`),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(e,t){var n=!1;t&&t.length>0&&(n|=r.drawing.invalidate(t)),n&&u()}),lh(r)};function ah(e){var t=e.cy.container();return pe(t&&t.style&&t.style.backgroundColor||`white`)}e(ah,`getBGColor`);function oh(e,t){var n=e._private.rscratch;return Xt(n,`labelWrapCachedLines`,t)||[]}e(oh,`getLabelLines`);var sh=e(function(e,t){return function(n){var r=e(n),i=oh(n,t);return i.length>1?i.map(function(e,t){return`${r}_${t}`}):r}},`getStyleKeysForLabel`),ch=e(function(e,t){return function(n,r){var i=e(n);if(typeof r==`string`){var a=r.indexOf(`_`);if(a>0){var o=Number(r.substring(a+1)),s=oh(n,t),c=i.h/s.length,l=c*o,u=i.y1+l;return{x1:i.x1,w:i.w,y1:u,h:c,yOffset:l}}}return i}},`getBoundingBoxForLabel`);function lh(e){var t=e.render;e.render=function(n){n||={};var r=e.cy;e.webgl&&(r.zoom()>rp?(uh(e),t.call(e,n)):(dh(e),bh(e,n,qm.SCREEN)))};var n=e.matchCanvasSize;e.matchCanvasSize=function(t){n.call(e,t),e.pickingFrameBuffer.setFramebufferAttachmentSizes(e.canvasWidth,e.canvasHeight),e.pickingFrameBuffer.needsDraw=!0},e.findNearestElements=function(t,n,r,i){return vh(e,t,n)};var r=e.invalidateCachedZSortedEles;e.invalidateCachedZSortedEles=function(){r.call(e),e.pickingFrameBuffer.needsDraw=!0};var i=e.notify;e.notify=function(t,n){i.call(e,t,n),t===`viewport`||t===`bounds`?e.pickingFrameBuffer.needsDraw=!0:t===`background`&&e.drawing.invalidate(n,{type:`node-body`})}}e(lh,`overrideCanvasRendererFunctions`);function uh(e){var t=e.data.contexts[e.WEBGL];t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}e(uh,`clearWebgl`);function dh(t){var n=e(function(e){e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t.canvasWidth,t.canvasHeight),e.restore()},`clear`);n(t.data.contexts[t.NODE]),n(t.data.contexts[t.DRAG])}e(dh,`clearCanvas`);function fh(e){var t=e.canvasWidth,n=e.canvasHeight,r=mm(e),i=r.pan,a=r.zoom,o=jm();Pm(o,o,[i.x,i.y]),Im(o,o,[a,a]);var s=jm();Lm(s,t,n);var c=jm();return Nm(c,s,o),c}e(fh,`createPanZoomMatrix`);function ph(e,t){var n=e.canvasWidth,r=e.canvasHeight,i=mm(e),a=i.pan,o=i.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,n,r),t.translate(a.x,a.y),t.scale(o,o)}e(ph,`setContextTransform`);function mh(e,t){e.drawSelectionRectangle(t,function(t){return ph(e,t)})}e(mh,`drawSelectionRectangle`);function hh(e){var t=e.data.contexts[e.NODE];t.save(),ph(e,t),t.strokeStyle=`rgba(0, 0, 0, 0.3)`,t.beginPath(),t.moveTo(-1e3,0),t.lineTo(1e3,0),t.stroke(),t.beginPath(),t.moveTo(0,-1e3),t.lineTo(0,1e3),t.stroke(),t.restore()}e(hh,`drawAxes`);function gh(t){var n=e(function(e,n,r){for(var i=e.atlasManager.getAtlasCollection(n),a=t.data.contexts[t.NODE],o=i.atlases,s=0;s=0&&b.add(S)}return b}e(_h,`getPickingIndexes`);function vh(e,t,n){var r=_h(e,t,n),i=e.getCachedZSortedEles(),a,o,c=s(r),l;try{for(c.s();!(l=c.n()).done;){var u=i[l.value];if(!a&&u.isNode()&&(a=u),!o&&u.isEdge()&&(o=u),a&&o)break}}catch(e){c.e(e)}finally{c.f()}return[a,o].filter(Boolean)}e(vh,`findNearestElementsWebgl`);function yh(e,t,n){var r=e.drawing;t+=1,n.isNode()?(r.drawNode(n,t,`node-underlay`),r.drawNode(n,t,`node-body`),r.drawTexture(n,t,`label`),r.drawNode(n,t,`node-overlay`)):(r.drawEdgeLine(n,t),r.drawEdgeArrow(n,t,`source`),r.drawEdgeArrow(n,t,`target`),r.drawTexture(n,t,`label`),r.drawTexture(n,t,`edge-source-label`),r.drawTexture(n,t,`edge-target-label`))}e(yh,`drawEle`);function bh(e,t,n){var r;e.webglDebug&&(r=performance.now());var i=e.drawing,a=0;if(n.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&mh(e,t),e.data.canvasNeedsRedraw[e.NODE]||n.picking){var o=e.data.contexts[e.WEBGL];n.screen?(o.clearColor(0,0,0,0),o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),o.viewport(0,0,o.canvas.width,o.canvas.height);var c=fh(e),l=e.getCachedZSortedEles();if(a=l.length,i.startFrame(c,n),n.screen){for(var u=0;u0&&a>0){f.clearRect(0,0,i,a),f.globalCompositeOperation=`source-over`;var p=this.getCachedZSortedEles();if(e.full)f.translate(-n.x1*c,-n.y1*c),f.scale(c,c),this.drawElements(f,p),f.scale(1/c,1/c),f.translate(n.x1*c,n.y1*c);else{var m=t.pan(),h={x:m.x*c,y:m.y*c};c*=t.zoom(),f.translate(h.x,h.y),f.scale(c,c),this.drawElements(f,p),f.scale(1/c,1/c),f.translate(-h.x,-h.y)}e.bg&&(f.globalCompositeOperation=`destination-over`,f.fillStyle=e.bg,f.rect(0,0,i,a),f.fill())}return d};function kh(e,t){for(var n=atob(e),r=new ArrayBuffer(n.length),i=new Uint8Array(r),a=0;a`u`?`undefined`:_(OffscreenCanvas))===`undefined`?(n=this.cy.window().document.createElement(`canvas`),n.width=e,n.height=t):n=new OffscreenCanvas(e,t),n},[Bp,qp,em,nm,rm,om,cm,ih,xh,Oh,Mh].forEach(function(e){Z($,e)});var Ih=[{type:`layout`,extensions:Gd},{type:`renderer`,extensions:[{name:`null`,impl:Kd},{name:`base`,impl:Jf},{name:`canvas`,impl:Nh}]}],Lh={},Rh={};function zh(t,n,r){var i=r,a=e(function(e){zt("Can not register `"+n+"` for `"+t+"` since `"+e+"` already exists in the prototype and can not be overridden")},`overrideErr`);if(t===`core`){if(rd.prototype[n])return a(n);rd.prototype[n]=r}else if(t===`collection`){if(_u.prototype[n])return a(n);_u.prototype[n]=r}else if(t===`layout`){for(var o=e(function(e){this.options=e,r.call(this,e),k(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[],this.createEmitter()},`Layout`),s=o.prototype=Object.create(r.prototype),c=[],l=0;l=t?e:``+Array(t+1-r.length).join(n)+e},`m`),y={s:v,z:t(function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+v(r,2,`0`)+`:`+v(i,2,`0`)},`z`),m:t(function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;x[s]=t,i=s}return!r&&i&&(b=i),i||!r&&b},`t`),T=t(function(e,t){if(C(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new D(n)},`O`),E=y;E.l=w,E.i=C,E.w=function(e,t){return T(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var D=(function(){function _(e){this.$L=w(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[S]=!0}t(_,`M`);var v=_.prototype;return v.parse=function(e){this.$d=(function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(h);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)})(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return E},v.isValid=function(){return this.$d.toString()!==m},v.isSame=function(e,t){var n=T(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return T(e){},`trace`),debug:t((...e)=>{},`debug`),info:t((...e)=>{},`info`),warn:t((...e)=>{},`warn`),error:t((...e)=>{},`error`),fatal:t((...e)=>{},`fatal`)},s=t(function(e=`fatal`){let t=a.fatal;typeof e==`string`?e.toLowerCase()in a&&(t=a[e]):typeof e==`number`&&(t=e),o.trace=()=>{},o.debug=()=>{},o.info=()=>{},o.warn=()=>{},o.error=()=>{},o.fatal=()=>{},t<=a.fatal&&(o.fatal=console.error?console.error.bind(console,c(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,c(`FATAL`))),t<=a.error&&(o.error=console.error?console.error.bind(console,c(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,c(`ERROR`))),t<=a.warn&&(o.warn=console.warn?console.warn.bind(console,c(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,c(`WARN`))),t<=a.info&&(o.info=console.info?console.info.bind(console,c(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,c(`INFO`))),t<=a.debug&&(o.debug=console.debug?console.debug.bind(console,c(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,c(`DEBUG`))),t<=a.trace&&(o.trace=console.debug?console.debug.bind(console,c(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,c(`TRACE`)))},`setLogLevel`),c=t(e=>`%c${(0,i.default)().format(`ss.SSS`)} : ${e} : `,`format`);function l(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}t(l,`max`);function u(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}t(u,`min`);function d(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}t(d,`ascending`);function f(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}t(f,`descending`);function p(e){let n,r,i;e.length===2?(n=e===d||e===f?e:m,r=e,i=e):(n=d,r=t((t,n)=>d(e(t),n),`compare2`),i=t((t,n)=>e(t)-n,`delta`));function a(e,t,i=0,a=e.length){if(i>>1;r(e[n],t)<0?i=n+1:a=n}while(i>>1;r(e[n],t)<=0?i=n+1:a=n}while(in&&i(e[o-1],t)>-i(e[o],t)?o-1:o}return t(s,`center`),{left:a,center:s,right:o}}t(p,`bisector`);function m(){return 0}t(m,`zero`);function h(e){return e===null?NaN:+e}t(h,`number`);var g=p(d),_=g.right;g.left,p(h).center;var v=_,y=class extends Map{static{t(this,`InternMap`)}constructor(e,t=C){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(b(this,e))}has(e){return super.has(b(this,e))}set(e,t){return super.set(x(this,e),t)}delete(e){return super.delete(S(this,e))}};function b({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}t(b,`intern_get`);function x({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}t(x,`intern_set`);function S({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}t(S,`intern_delete`);function C(e){return typeof e==`object`&&e?e.valueOf():e}t(C,`keyof`);var w=Math.sqrt(50),T=Math.sqrt(10),E=Math.sqrt(2);function D(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=w?10:a>=T?5:a>=E?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/lt&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*lt&&--c),c0))return[];if(e===t)return[e];let r=t=i))return[];let s=a-i+1,c=Array(s);if(r){if(o<0)for(let e=0;e+e(t)}t(F,`number`);function ae(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}t(ae,`center`);function oe(){return!this.__axis}t(oe,`entering`);function se(e,n){var r=[],i=null,a=null,o=6,s=6,c=3,l=typeof window<`u`&&window.devicePixelRatio>1?0:.5,u=e===N||e===P?-1:1,d=e===P||e===ee?`x`:`y`,f=e===N||e===te?re:ie;function p(t){var p=i??(n.ticks?n.ticks.apply(n,r):n.domain()),m=a??(n.tickFormat?n.tickFormat.apply(n,r):M),h=Math.max(o,0)+c,g=n.range(),_=+g[0]+l,v=+g[g.length-1]+l,y=(n.bandwidth?ae:F)(n.copy(),l),b=t.selection?t.selection():t,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,n).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(d+`2`,u*o)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(d,u*h).attr(`dy`,e===N?`0em`:e===te?`0.71em`:`0.32em`)),t!==b&&(x=x.transition(t),S=S.transition(t),T=T.transition(t),E=E.transition(t),C=C.transition(t).attr(`opacity`,ne).attr(`transform`,function(e){return isFinite(e=y(e))?f(e+l):this.getAttribute(`transform`)}),w.attr(`opacity`,ne).attr(`transform`,function(e){var t=this.parentNode.__axis;return f((t&&isFinite(t=t(e))?t:y(e))+l)})),C.remove(),x.attr(`d`,e===P||e===ee?s?`M`+u*s+`,`+_+`H`+l+`V`+v+`H`+u*s:`M`+l+`,`+_+`V`+v:s?`M`+_+`,`+u*s+`V`+l+`H`+v+`V`+u*s:`M`+_+`,`+l+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return f(y(e)+l)}),T.attr(d+`2`,u*o),E.attr(d,u*h).text(m),b.filter(oe).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===ee?`start`:e===P?`end`:`middle`),b.each(function(){this.__axis=y})}return t(p,`axis`),p.scale=function(e){return arguments.length?(n=e,p):n},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(e){return arguments.length?(r=e==null?[]:Array.from(e),p):r.slice()},p.tickValues=function(e){return arguments.length?(i=e==null?null:Array.from(e),p):i&&i.slice()},p.tickFormat=function(e){return arguments.length?(a=e,p):a},p.tickSize=function(e){return arguments.length?(o=s=+e,p):o},p.tickSizeInner=function(e){return arguments.length?(o=+e,p):o},p.tickSizeOuter=function(e){return arguments.length?(s=+e,p):s},p.tickPadding=function(e){return arguments.length?(c=+e,p):c},p.offset=function(e){return arguments.length?(l=+e,p):l},p}t(se,`axis`);function ce(e){return se(N,e)}t(ce,`axisTop`);function le(e){return se(te,e)}t(le,`axisBottom`);function ue(){}t(ue,`none`);function de(e){return e==null?ue:function(){return this.querySelector(e)}}t(de,`default`);function fe(e){typeof e!=`function`&&(e=de(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i=v&&(v=_+1);!(b=g[v])&&++v=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}t(Ve,`default`);function He(e){e||=Ue;function n(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}t(n,`compareNode`);for(var r=this._groups,i=r.length,a=Array(i),o=0;ot?1:e>=t?0:NaN}t(Ue,`ascending`);function We(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}t(We,`default`);function Ge(){return Array.from(this)}t(Ge,`default`);function Ke(){for(var e=this._groups,t=0,n=e.length;t=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),Ze.hasOwnProperty(t)?{space:Ze[t],local:e}:e}t(Qe,`default`);function $e(e){return function(){this.removeAttribute(e)}}t($e,`attrRemove`);function et(e){return function(){this.removeAttributeNS(e.space,e.local)}}t(et,`attrRemoveNS`);function tt(e,t){return function(){this.setAttribute(e,t)}}t(tt,`attrConstant`);function nt(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}t(nt,`attrConstantNS`);function rt(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}t(rt,`attrFunction`);function it(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}t(it,`attrFunctionNS`);function at(e,t){var n=Qe(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?et:$e:typeof t==`function`?n.local?it:rt:n.local?nt:tt)(n,t))}t(at,`default`);function ot(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}t(ot,`default`);function st(e){return function(){this.style.removeProperty(e)}}t(st,`styleRemove`);function ct(e,t,n){return function(){this.style.setProperty(e,t,n)}}t(ct,`styleConstant`);function lt(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}t(lt,`styleFunction`);function ut(e,t,n){return arguments.length>1?this.each((t==null?st:typeof t==`function`?lt:ct)(e,t,n??``)):dt(this.node(),e)}t(ut,`default`);function dt(e,t){return e.style.getPropertyValue(t)||ot(e).getComputedStyle(e,null).getPropertyValue(t)}t(dt,`styleValue`);function ft(e){return function(){delete this[e]}}t(ft,`propertyRemove`);function pt(e,t){return function(){this[e]=t}}t(pt,`propertyConstant`);function mt(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}t(mt,`propertyFunction`);function ht(e,t){return arguments.length>1?this.each((t==null?ft:typeof t==`function`?mt:pt)(e,t)):this.node()[e]}t(ht,`default`);function gt(e){return e.trim().split(/^|\s+/)}t(gt,`classArray`);function _t(e){return e.classList||new vt(e)}t(_t,`classList`);function vt(e){this._node=e,this._names=gt(e.getAttribute(`class`)||``)}t(vt,`ClassList`),vt.prototype={add:t(function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},`add`),remove:t(function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},`remove`),contains:t(function(e){return this._names.indexOf(e)>=0},`contains`)};function yt(e,t){for(var n=_t(e),r=-1,i=t.length;++r=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}t(Xt,`parseTypenames`);function Zt(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Mn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Mn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=yn.exec(e))?new R(t[1],t[2],t[3],1):(t=bn.exec(e))?new R(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=xn.exec(e))?Mn(t[1],t[2],t[3],t[4]):(t=Sn.exec(e))?Mn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Cn.exec(e))?Vn(t[1],t[2]/100,t[3]/100,1):(t=wn.exec(e))?Vn(t[1],t[2]/100,t[3]/100,t[4]):Tn.hasOwnProperty(e)?jn(Tn[e]):e===`transparent`?new R(NaN,NaN,NaN,0):null}t(An,`color`);function jn(e){return new R(e>>16&255,e>>8&255,e&255,1)}t(jn,`rgbn`);function Mn(e,t,n,r){return r<=0&&(e=t=n=NaN),new R(e,t,n,r)}t(Mn,`rgba`);function Nn(e){return e instanceof pn||(e=An(e)),e?(e=e.rgb(),new R(e.r,e.g,e.b,e.opacity)):new R}t(Nn,`rgbConvert`);function Pn(e,t,n,r){return arguments.length===1?Nn(e):new R(e,t,n,r??1)}t(Pn,`rgb`);function R(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}t(R,`Rgb`),dn(R,Pn,fn(pn,{brighter(e){return e=e==null?hn:hn**+e,new R(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?mn:mn**+e,new R(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new R(zn(this.r),zn(this.g),zn(this.b),Rn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Fn,formatHex:Fn,formatHex8:In,formatRgb:Ln,toString:Ln}));function Fn(){return`#${Bn(this.r)}${Bn(this.g)}${Bn(this.b)}`}t(Fn,`rgb_formatHex`);function In(){return`#${Bn(this.r)}${Bn(this.g)}${Bn(this.b)}${Bn((isNaN(this.opacity)?1:this.opacity)*255)}`}t(In,`rgb_formatHex8`);function Ln(){let e=Rn(this.opacity);return`${e===1?`rgb(`:`rgba(`}${zn(this.r)}, ${zn(this.g)}, ${zn(this.b)}${e===1?`)`:`, ${e})`}`}t(Ln,`rgb_formatRgb`);function Rn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}t(Rn,`clampa`);function zn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}t(zn,`clampi`);function Bn(e){return e=zn(e),(e<16?`0`:``)+e.toString(16)}t(Bn,`hex`);function Vn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new z(e,t,n,r)}t(Vn,`hsla`);function Hn(e){if(e instanceof z)return new z(e.h,e.s,e.l,e.opacity);if(e instanceof pn||(e=An(e)),!e)return new z;if(e instanceof z)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n0&&c<1?0:o,new z(o,s,c,e.opacity)}t(Hn,`hslConvert`);function Un(e,t,n,r){return arguments.length===1?Hn(e):new z(e,t,n,r??1)}t(Un,`hsl`);function z(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}t(z,`Hsl`),dn(z,Un,fn(pn,{brighter(e){return e=e==null?hn:hn**+e,new z(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?mn:mn**+e,new z(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new R(Kn(e>=240?e-240:e+120,i,r),Kn(e,i,r),Kn(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new z(Wn(this.h),Gn(this.s),Gn(this.l),Rn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Rn(this.opacity);return`${e===1?`hsl(`:`hsla(`}${Wn(this.h)}, ${Gn(this.s)*100}%, ${Gn(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function Wn(e){return e=(e||0)%360,e<0?e+360:e}t(Wn,`clamph`);function Gn(e){return Math.max(0,Math.min(1,e||0))}t(Gn,`clampt`);function Kn(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}t(Kn,`hsl2rgb`);var qn=Math.PI/180,Jn=180/Math.PI,Yn=18,Xn=.96422,Zn=1,Qn=.82521,$n=4/29,er=6/29,tr=3*er*er,nr=er*er*er;function rr(e){if(e instanceof B)return new B(e.l,e.a,e.b,e.opacity);if(e instanceof V)return dr(e);e instanceof R||(e=Nn(e));var t=cr(e.r),n=cr(e.g),r=cr(e.b),i=ar((.2225045*t+.7168786*n+.0606169*r)/Zn),a,o;return t===n&&n===r?a=o=i:(a=ar((.4360747*t+.3850649*n+.1430804*r)/Xn),o=ar((.0139322*t+.0971045*n+.7141733*r)/Qn)),new B(116*i-16,500*(a-i),200*(i-o),e.opacity)}t(rr,`labConvert`);function ir(e,t,n,r){return arguments.length===1?rr(e):new B(e,t,n,r??1)}t(ir,`lab`);function B(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}t(B,`Lab`),dn(B,ir,fn(pn,{brighter(e){return new B(this.l+Yn*(e??1),this.a,this.b,this.opacity)},darker(e){return new B(this.l-Yn*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=Xn*or(t),e=Zn*or(e),n=Qn*or(n),new R(sr(3.1338561*t-1.6168667*e-.4906146*n),sr(-.9787684*t+1.9161415*e+.033454*n),sr(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function ar(e){return e>nr?e**(1/3):e/tr+$n}t(ar,`xyz2lab`);function or(e){return e>er?e*e*e:tr*(e-$n)}t(or,`lab2xyz`);function sr(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}t(sr,`lrgb2rgb`);function cr(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}t(cr,`rgb2lrgb`);function lr(e){if(e instanceof V)return new V(e.h,e.c,e.l,e.opacity);if(e instanceof B||(e=rr(e)),e.a===0&&e.b===0)return new V(NaN,0()=>e,`default`);function pr(e,t){return function(n){return e+n*t}}t(pr,`linear`);function mr(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}t(mr,`exponential`);function hr(e,t){var n=t-e;return n?pr(e,n>180||n<-180?n-360*Math.round(n/360):n):fr(isNaN(e)?t:e)}t(hr,`hue`);function gr(e){return(e=+e)==1?_r:function(t,n){return n-t?mr(t,n,e):fr(isNaN(t)?n:t)}}t(gr,`gamma`);function _r(e,t){var n=t-e;return n?pr(e,n):fr(isNaN(e)?t:e)}t(_r,`nogamma`);function vr(e){return function(t,n){var r=e((t=ur(t)).h,(n=ur(n)).h),i=_r(t.c,n.c),a=_r(t.l,n.l),o=_r(t.opacity,n.opacity);return function(e){return t.h=r(e),t.c=i(e),t.l=a(e),t.opacity=o(e),t+``}}}t(vr,`hcl`);var yr=vr(hr);function br(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}t(br,`basis`);function xr(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=rn&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:H(r,i)})),n=jr.lastIndex;return n180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(a(n)+`rotate(`,null,i)-2,x:H(e,t)}))}t(s,`rotate`);function c(e,t,n,r){e===t?t&&n.push(a(n)+`skewX(`+t+i):r.push({i:n.push(a(n)+`skewX(`,null,i)-2,x:H(e,t)})}t(c,`skewX`);function l(e,t,n,r,i,o){if(e!==n||t!==r){var s=i.push(a(i)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:H(e,n)},{i:s-2,x:H(t,r)})}else(n!==1||r!==1)&&i.push(a(i)+`scale(`+n+`,`+r+`)`)}return t(l,`scale`),function(t,n){var r=[],i=[];return t=e(t),n=e(n),o(t.translateX,t.translateY,n.translateX,n.translateY,r,i),s(t.rotate,n.rotate,r,i),c(t.skewX,n.skewX,r,i),l(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}t(Kr,`default`);function qr(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}t(qr,`formatDecimalParts`);function Jr(e){return e=qr(Math.abs(e)),e?e[1]:NaN}t(Jr,`default`);function Yr(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}t(Yr,`default`);function Xr(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}t(Xr,`default`);var Zr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qr(e){if(!(t=Zr.exec(e)))throw Error(`invalid format: `+e);var t;return new $r({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}t(Qr,`formatSpecifier`),Qr.prototype=$r.prototype;function $r(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}t($r,`FormatSpecifier`),$r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function ei(e){out:for(var t=e.length,n=1,r=-1,i;n0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}t(ei,`default`);var ti;function ni(e,t){var n=qr(e,t);if(!n)return e+``;var r=n[0],i=n[1],a=i-(ti=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+qr(e,Math.max(0,t+a-1))[0]}t(ni,`default`);function ri(e,t){var n=qr(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}t(ri,`default`);var ii={"%":t((e,t)=>(e*100).toFixed(t),`%`),b:t(e=>Math.round(e).toString(2),`b`),c:t(e=>e+``,`c`),d:Kr,e:t((e,t)=>e.toExponential(t),`e`),f:t((e,t)=>e.toFixed(t),`f`),g:t((e,t)=>e.toPrecision(t),`g`),o:t(e=>Math.round(e).toString(8),`o`),p:t((e,t)=>ri(e*100,t),`p`),r:ri,s:ni,X:t(e=>Math.round(e).toString(16).toUpperCase(),`X`),x:t(e=>Math.round(e).toString(16),`x`)};function ai(e){return e}t(ai,`default`);var oi=Array.prototype.map,si=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function ci(e){var n=e.grouping===void 0||e.thousands===void 0?ai:Yr(oi.call(e.grouping,Number),e.thousands+``),r=e.currency===void 0?``:e.currency[0]+``,i=e.currency===void 0?``:e.currency[1]+``,a=e.decimal===void 0?`.`:e.decimal+``,o=e.numerals===void 0?ai:Xr(oi.call(e.numerals,String)),s=e.percent===void 0?`%`:e.percent+``,c=e.minus===void 0?`−`:e.minus+``,l=e.nan===void 0?`NaN`:e.nan+``;function u(e){e=Qr(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):ii[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=p===`$`?r:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``,x=p===`$`?i:/[%p]/.test(y)?s:``,S=ii[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var t=b,r=x,i,s,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?l:S(Math.abs(e),_),v&&(e=ei(e)),w&&+e==0&&f!==`+`&&(w=!1),t=(w?f===`(`?f:c:f===`-`||f===`(`?``:f)+t,r=(y===`s`?si[8+ti/3]:``)+r+(w&&f===`(`?`)`:``),C){for(i=-1,s=e.length;++ip||p>57){r=(p===46?a+e.slice(i+1):e.slice(i))+r,e=e.slice(0,i);break}}}g&&!m&&(e=n(e,1/0));var T=t.length+e.length+r.length,E=T>1)+t+e+r+E.slice(T);break;default:e=E+t+e+r}return o(e)}return t(w,`format`),w.toString=function(){return e+``},w}t(u,`newFormat`);function d(e,t){var n=u((e=Qr(e),e.type=`f`,e)),r=Math.max(-8,Math.min(8,Math.floor(Jr(t)/3)))*3,i=10**-r,a=si[8+r/3];return function(e){return n(i*e)+a}}return t(d,`formatPrefix`),{format:u,formatPrefix:d}}t(ci,`default`);var li,ui,di;fi({thousands:`,`,grouping:[3],currency:[`$`,``]});function fi(e){return li=ci(e),ui=li.format,di=li.formatPrefix,li}t(fi,`defaultLocale`);function pi(e){return Math.max(0,-Jr(Math.abs(e)))}t(pi,`default`);function mi(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Jr(t)/3)))*3-Jr(Math.abs(e)))}t(mi,`default`);function hi(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Jr(t)-Jr(e))+1}t(hi,`default`);function gi(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}t(gi,`count`);function _i(){return this.eachAfter(gi)}t(_i,`default`);function vi(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}t(vi,`default`);function yi(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}t(yi,`default`);function bi(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o=0;)n+=r[i].value;t.value=n})}t(Si,`default`);function Ci(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}t(Ci,`default`);function wi(e){for(var t=this,n=Ti(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}t(wi,`default`);function Ti(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}t(Ti,`leastCommonAncestor`);function Ei(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}t(Ei,`default`);function Di(){return Array.from(this)}t(Di,`default`);function Oi(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}t(Oi,`default`);function ki(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}t(ki,`default`);function*Ai(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i=0;--s)i.push(a=o[s]=new Li(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(Ii)}t(ji,`hierarchy`);function Mi(){return ji(this).eachBefore(Fi)}t(Mi,`node_copy`);function Ni(e){return e.children}t(Ni,`objectChildren`);function Pi(e){return Array.isArray(e)?e[1]:null}t(Pi,`mapChildren`);function Fi(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}t(Fi,`copyData`);function Ii(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}t(Ii,`computeHeight`);function Li(e){this.data=e,this.depth=this.height=0,this.parent=null}t(Li,`Node`),Li.prototype=ji.prototype={constructor:Li,count:_i,each:vi,eachAfter:bi,eachBefore:yi,find:xi,sum:Si,sort:Ci,path:wi,ancestors:Ei,descendants:Di,leaves:Oi,links:ki,copy:Mi,[Symbol.iterator]:Ai};function Ri(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}t(Ri,`default`);function zi(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++sv&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p1?t:1)},r}),`custom`)(Vi);function Wi(e){if(typeof e!=`function`)throw Error();return e}t(Wi,`required`);function Gi(){return 0}t(Gi,`constantZero`);function Ki(e){return function(){return e}}t(Ki,`default`);function qi(){var e=Ui,n=!1,r=1,i=1,a=[0],o=Gi,s=Gi,c=Gi,l=Gi,u=Gi;function d(e){return e.x0=e.y0=0,e.x1=r,e.y1=i,e.eachBefore(f),a=[0],n&&e.eachBefore(Ri),e}t(d,`treemap`);function f(t){var n=a[t.depth],r=t.x0+n,i=t.y0+n,d=t.x1-n,f=t.y1-n;dt&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}t(na,`clamper`);function ra(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i2?ia:ra,l=u=null,f}t(d,`rescale`);function f(t){return t==null||isNaN(t=+t)?o:(l||=c(e.map(i),n,r))(i(s(t)))}return t(f,`scale`),f.invert=function(t){return s(a((u||=c(n,e.map(i),H))(t)))},f.domain=function(t){return arguments.length?(e=Array.from(t,Qi),d()):e.slice()},f.range=function(e){return arguments.length?(n=Array.from(e),d()):n.slice()},f.rangeRound=function(e){return n=Array.from(e),r=Ir,d()},f.clamp=function(e){return arguments.length?(s=e?!0:ea,d()):s!==ea},f.interpolate=function(e){return arguments.length?(r=e,d()):r},f.unknown=function(e){return arguments.length?(o=e,f):o},function(e,t){return i=e,a=t,d()}}t(oa,`transformer`);function sa(){return oa()(ea,ea)}t(sa,`continuous`);function ca(e,t,n,r){var i=A(e,t,n),a;switch(r=Qr(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=mi(i,o))&&(r.precision=a),di(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=hi(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=pi(i))&&(r.precision=a-(r.type===`%`)*2)}return ui(r)}t(ca,`tickFormat`);function la(e){var t=e.domain;return e.ticks=function(e){var n=t();return O(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return ca(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s0;){if(l=k(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}t(la,`linearish`);function ua(){var e=sa();return e.copy=function(){return aa(e,ua())},Ji.apply(e,arguments),la(e)}t(ua,`linear`);var da=new Date,fa=new Date;function U(e,n,r,i){function a(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return t(a,`interval`),a.floor=t=>(e(t=new Date(+t)),t),a.ceil=t=>(e(t=new Date(t-1)),n(t,1),e(t),t),a.round=e=>{let t=a(e),n=a.ceil(e);return e-t(n(e=new Date(+e),t==null?1:Math.floor(t)),e),a.range=(t,r,i)=>{let o=[];if(t=a.ceil(t),i=i==null?1:Math.floor(i),!(t0))return o;let s;do o.push(s=new Date(+t)),n(t,i),e(t);while(sU(n=>{if(n>=n)for(;e(n),!t(n);)n.setTime(n-1)},(e,r)=>{if(e>=e){if(r<0)for(;++r<=0;)for(;n(e,-1),!t(e););else for(;--r>=0;)for(;n(e,1),!t(e););}}),r&&(a.count=(t,n)=>(da.setTime(+t),fa.setTime(+n),e(da),e(fa),Math.floor(r(da,fa))),a.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?a.filter(i?t=>i(t)%e===0:t=>a.count(0,t)%e===0):a)),a}t(U,`timeInterval`);var pa=U(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);pa.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?U(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):pa),pa.range;var ma=1e3,W=ma*60,ha=W*60,ga=ha*24,_a=ga*7,va=ga*30,ya=ga*365,ba=U(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ma)},(e,t)=>(t-e)/ma,e=>e.getUTCSeconds());ba.range;var xa=U(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ma)},(e,t)=>{e.setTime(+e+t*W)},(e,t)=>(t-e)/W,e=>e.getMinutes());xa.range;var Sa=U(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*W)},(e,t)=>(t-e)/W,e=>e.getUTCMinutes());Sa.range;var Ca=U(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ma-e.getMinutes()*W)},(e,t)=>{e.setTime(+e+t*ha)},(e,t)=>(t-e)/ha,e=>e.getHours());Ca.range;var wa=U(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ha)},(e,t)=>(t-e)/ha,e=>e.getUTCHours());wa.range;var Ta=U(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*W)/ga,e=>e.getDate()-1);Ta.range;var Ea=U(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ga,e=>e.getUTCDate()-1);Ea.range;var Da=U(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ga,e=>Math.floor(e/ga));Da.range;function Oa(e){return U(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*W)/_a)}t(Oa,`timeWeekday`);var ka=Oa(0),Aa=Oa(1),ja=Oa(2),Ma=Oa(3),Na=Oa(4),Pa=Oa(5),Fa=Oa(6);ka.range,Aa.range,ja.range,Ma.range,Na.range,Pa.range,Fa.range;function Ia(e){return U(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/_a)}t(Ia,`utcWeekday`);var La=Ia(0),Ra=Ia(1),za=Ia(2),Ba=Ia(3),Va=Ia(4),Ha=Ia(5),Ua=Ia(6);La.range,Ra.range,za.range,Ba.range,Va.range,Ha.range,Ua.range;var Wa=U(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Wa.range;var Ga=U(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Ga.range;var Ka=U(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ka.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:U(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),Ka.range;var qa=U(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());qa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:U(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),qa.range;function Ja(e,n,r,i,a,o){let s=[[ba,1,ma],[ba,5,5*ma],[ba,15,15*ma],[ba,30,30*ma],[o,1,W],[o,5,5*W],[o,15,15*W],[o,30,30*W],[a,1,ha],[a,3,3*ha],[a,6,6*ha],[a,12,12*ha],[i,1,ga],[i,2,2*ga],[r,1,_a],[n,1,va],[n,3,3*va],[e,1,ya]];function c(e,t,n){let r=te).right(s,i);if(a===s.length)return e.every(A(t/ya,n/ya,r));if(a===0)return pa.every(Math.max(A(t,n,r),1));let[o,c]=s[i/s[a-1][2]53)return null;`w`in r||(r.w=1),`Z`in r?(a=eo(to(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?Ra.ceil(a):Ra(a),a=Ea.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=$a(to(r.y,0,1)),o=a.getDay(),a=o>4||o===0?Aa.ceil(a):Aa(a),a=Ta.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?eo(to(r.y,0,1)).getUTCDay():$a(to(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,eo(r)):$a(r)}}t(w,`newParse`);function T(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=S[s in ro?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}t(T,`parseSpecifier`);function E(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=d.get(r[0].toLowerCase()),n+r[0].length):-1}t(E,`parsePeriod`);function D(e,t,n){var r=m.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1}t(D,`parseShortWeekday`);function O(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1}t(O,`parseWeekday`);function k(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1}t(k,`parseShortMonth`);function A(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=_.get(r[0].toLowerCase()),n+r[0].length):-1}t(A,`parseMonth`);function j(e,t,r){return T(e,n,t,r)}t(j,`parseLocaleDateTime`);function M(e,t,n){return T(e,r,t,n)}t(M,`parseLocaleDate`);function N(e,t,n){return T(e,i,t,n)}t(N,`parseLocaleTime`);function ee(e){return s[e.getDay()]}t(ee,`formatShortWeekday`);function te(e){return o[e.getDay()]}t(te,`formatWeekday`);function P(e){return l[e.getMonth()]}t(P,`formatShortMonth`);function ne(e){return c[e.getMonth()]}t(ne,`formatMonth`);function re(e){return a[+(e.getHours()>=12)]}t(re,`formatPeriod`);function ie(e){return 1+~~(e.getMonth()/3)}t(ie,`formatQuarter`);function F(e){return s[e.getUTCDay()]}t(F,`formatUTCShortWeekday`);function ae(e){return o[e.getUTCDay()]}t(ae,`formatUTCWeekday`);function oe(e){return l[e.getUTCMonth()]}t(oe,`formatUTCShortMonth`);function se(e){return c[e.getUTCMonth()]}t(se,`formatUTCMonth`);function ce(e){return a[+(e.getUTCHours()>=12)]}t(ce,`formatUTCPeriod`);function le(e){return 1+~~(e.getUTCMonth()/3)}return t(le,`formatUTCQuarter`),{format:t(function(e){var t=C(e+=``,b);return t.toString=function(){return e},t},`format`),parse:t(function(e){var t=w(e+=``,!1);return t.toString=function(){return e},t},`parse`),utcFormat:t(function(e){var t=C(e+=``,x);return t.toString=function(){return e},t},`utcFormat`),utcParse:t(function(e){var t=w(e+=``,!0);return t.toString=function(){return e},t},`utcParse`)}}t(no,`formatLocale`);var ro={"-":``,_:` `,0:`0`},G=/^\s*\d+/,io=/^%/,ao=/[\\^$*+?|[\]().{}]/g;function K(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a[e.toLowerCase(),t]))}t(co,`formatLookup`);function lo(e,t,n){var r=G.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}t(lo,`parseWeekdayNumberSunday`);function uo(e,t,n){var r=G.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}t(uo,`parseWeekdayNumberMonday`);function fo(e,t,n){var r=G.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}t(fo,`parseWeekNumberSunday`);function po(e,t,n){var r=G.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}t(po,`parseWeekNumberISO`);function mo(e,t,n){var r=G.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}t(mo,`parseWeekNumberMonday`);function ho(e,t,n){var r=G.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}t(ho,`parseFullYear`);function go(e,t,n){var r=G.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}t(go,`parseYear`);function _o(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}t(_o,`parseZone`);function vo(e,t,n){var r=G.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}t(vo,`parseQuarter`);function yo(e,t,n){var r=G.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}t(yo,`parseMonthNumber`);function bo(e,t,n){var r=G.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}t(bo,`parseDayOfMonth`);function xo(e,t,n){var r=G.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}t(xo,`parseDayOfYear`);function So(e,t,n){var r=G.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}t(So,`parseHour24`);function Co(e,t,n){var r=G.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}t(Co,`parseMinutes`);function wo(e,t,n){var r=G.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}t(wo,`parseSeconds`);function To(e,t,n){var r=G.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}t(To,`parseMilliseconds`);function Eo(e,t,n){var r=G.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}t(Eo,`parseMicroseconds`);function Do(e,t,n){var r=io.exec(t.slice(n,n+1));return r?n+r[0].length:-1}t(Do,`parseLiteralPercent`);function Oo(e,t,n){var r=G.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}t(Oo,`parseUnixTimestamp`);function ko(e,t,n){var r=G.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}t(ko,`parseUnixTimestampSeconds`);function Ao(e,t){return K(e.getDate(),t,2)}t(Ao,`formatDayOfMonth`);function jo(e,t){return K(e.getHours(),t,2)}t(jo,`formatHour24`);function Mo(e,t){return K(e.getHours()%12||12,t,2)}t(Mo,`formatHour12`);function No(e,t){return K(1+Ta.count(Ka(e),e),t,3)}t(No,`formatDayOfYear`);function Po(e,t){return K(e.getMilliseconds(),t,3)}t(Po,`formatMilliseconds`);function Fo(e,t){return Po(e,t)+`000`}t(Fo,`formatMicroseconds`);function Io(e,t){return K(e.getMonth()+1,t,2)}t(Io,`formatMonthNumber`);function Lo(e,t){return K(e.getMinutes(),t,2)}t(Lo,`formatMinutes`);function Ro(e,t){return K(e.getSeconds(),t,2)}t(Ro,`formatSeconds`);function zo(e){var t=e.getDay();return t===0?7:t}t(zo,`formatWeekdayNumberMonday`);function Bo(e,t){return K(ka.count(Ka(e)-1,e),t,2)}t(Bo,`formatWeekNumberSunday`);function Vo(e){var t=e.getDay();return t>=4||t===0?Na(e):Na.ceil(e)}t(Vo,`dISO`);function Ho(e,t){return e=Vo(e),K(Na.count(Ka(e),e)+(Ka(e).getDay()===4),t,2)}t(Ho,`formatWeekNumberISO`);function Uo(e){return e.getDay()}t(Uo,`formatWeekdayNumberSunday`);function Wo(e,t){return K(Aa.count(Ka(e)-1,e),t,2)}t(Wo,`formatWeekNumberMonday`);function Go(e,t){return K(e.getFullYear()%100,t,2)}t(Go,`formatYear`);function Ko(e,t){return e=Vo(e),K(e.getFullYear()%100,t,2)}t(Ko,`formatYearISO`);function qo(e,t){return K(e.getFullYear()%1e4,t,4)}t(qo,`formatFullYear`);function Jo(e,t){var n=e.getDay();return e=n>=4||n===0?Na(e):Na.ceil(e),K(e.getFullYear()%1e4,t,4)}t(Jo,`formatFullYearISO`);function Yo(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+K(t/60|0,`0`,2)+K(t%60,`0`,2)}t(Yo,`formatZone`);function Xo(e,t){return K(e.getUTCDate(),t,2)}t(Xo,`formatUTCDayOfMonth`);function Zo(e,t){return K(e.getUTCHours(),t,2)}t(Zo,`formatUTCHour24`);function Qo(e,t){return K(e.getUTCHours()%12||12,t,2)}t(Qo,`formatUTCHour12`);function $o(e,t){return K(1+Ea.count(qa(e),e),t,3)}t($o,`formatUTCDayOfYear`);function es(e,t){return K(e.getUTCMilliseconds(),t,3)}t(es,`formatUTCMilliseconds`);function ts(e,t){return es(e,t)+`000`}t(ts,`formatUTCMicroseconds`);function ns(e,t){return K(e.getUTCMonth()+1,t,2)}t(ns,`formatUTCMonthNumber`);function rs(e,t){return K(e.getUTCMinutes(),t,2)}t(rs,`formatUTCMinutes`);function is(e,t){return K(e.getUTCSeconds(),t,2)}t(is,`formatUTCSeconds`);function as(e){var t=e.getUTCDay();return t===0?7:t}t(as,`formatUTCWeekdayNumberMonday`);function os(e,t){return K(La.count(qa(e)-1,e),t,2)}t(os,`formatUTCWeekNumberSunday`);function ss(e){var t=e.getUTCDay();return t>=4||t===0?Va(e):Va.ceil(e)}t(ss,`UTCdISO`);function cs(e,t){return e=ss(e),K(Va.count(qa(e),e)+(qa(e).getUTCDay()===4),t,2)}t(cs,`formatUTCWeekNumberISO`);function ls(e){return e.getUTCDay()}t(ls,`formatUTCWeekdayNumberSunday`);function us(e,t){return K(Ra.count(qa(e)-1,e),t,2)}t(us,`formatUTCWeekNumberMonday`);function ds(e,t){return K(e.getUTCFullYear()%100,t,2)}t(ds,`formatUTCYear`);function fs(e,t){return e=ss(e),K(e.getUTCFullYear()%100,t,2)}t(fs,`formatUTCYearISO`);function ps(e,t){return K(e.getUTCFullYear()%1e4,t,4)}t(ps,`formatUTCFullYear`);function ms(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Va(e):Va.ceil(e),K(e.getUTCFullYear()%1e4,t,4)}t(ms,`formatUTCFullYearISO`);function hs(){return`+0000`}t(hs,`formatUTCZone`);function gs(){return`%`}t(gs,`formatLiteralPercent`);function _s(e){return+e}t(_s,`formatUnixTimestamp`);function vs(e){return Math.floor(e/1e3)}t(vs,`formatUnixTimestampSeconds`);var ys,bs;xs({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function xs(e){return ys=no(e),bs=ys.format,ys.parse,ys.utcFormat,ys.utcParse,ys}t(xs,`defaultLocale`);function Ss(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a1?0:e<-1?Fs:Math.acos(e)}t(Rs,`acos`);function zs(e){return e>=1?Is:e<=-1?-Is:Math.asin(e)}t(zs,`asin`);var Bs=Math.PI,Vs=2*Bs,Hs=1e-6,Us=Vs-Hs;function Ws(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw Error(`invalid digits: ${e}`);if(t>15)return Ws;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;tHs){if(!(Math.abs(u*s-c*l)>Hs)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Bs-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Hs&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Hs||Math.abs(this._y1-l)>Hs)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%Vs+Vs),d>Us?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Hs&&this._append`A${n},${n},0,${+(d>=Bs)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function qs(){return new Ks}t(qs,`path`),qs.prototype=Ks.prototype;function Js(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Ks(t)}t(Js,`withPath`);function Ys(e){return e.innerRadius}t(Ys,`arcInnerRadius`);function Xs(e){return e.outerRadius}t(Xs,`arcOuterRadius`);function Zs(e){return e.startAngle}t(Zs,`arcStartAngle`);function Qs(e){return e.endAngle}t(Qs,`arcEndAngle`);function $s(e){return e&&e.padAngle}t($s,`arcPadAngle`);function ec(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*fA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x01:-u,y01:-d,x11:w*(i/x-1),y11:T*(i/x-1)}}t(tc,`cornerTangents`);function nc(){var e=Ys,n=Xs,r=q(0),i=null,a=Zs,o=Qs,s=$s,c=null,l=Js(u);function u(){var t,u,d=+e.apply(this,arguments),f=+n.apply(this,arguments),p=a.apply(this,arguments)-Is,m=o.apply(this,arguments)-Is,h=As(m-p),g=m>p;if(c||=t=l(),fX))c.moveTo(0,0);else if(h>Ls-X)c.moveTo(f*js(p),f*Y(p)),c.arc(0,0,f,p,m,!g),d>X&&(c.moveTo(d*js(m),d*Y(m)),c.arc(0,0,d,m,p,g));else{var _=p,v=m,y=p,b=m,x=h,S=h,C=s.apply(this,arguments)/2,w=C>X&&(i?+i.apply(this,arguments):Ps(d*d+f*f)),T=Ns(As(f-d)/2,+r.apply(this,arguments)),E=T,D=T,O,k;if(w>X){var A=zs(w/d*Y(C)),j=zs(w/f*Y(C));(x-=A*2)>X?(A*=g?1:-1,y+=A,b-=A):(x=0,y=b=(p+m)/2),(S-=j*2)>X?(j*=g?1:-1,_+=j,v-=j):(S=0,_=v=(p+m)/2)}var M=f*js(_),N=f*Y(_),ee=d*js(b),te=d*Y(b);if(T>X){var P=f*js(v),ne=f*Y(v),re=d*js(y),ie=d*Y(y),F;if(hX?D>X?(O=tc(re,ie,M,N,f,D,g),k=tc(P,ne,ee,te,f,D,g),c.moveTo(O.cx+O.x01,O.cy+O.y01),DX)||!(x>X)?c.lineTo(ee,te):E>X?(O=tc(ee,te,P,ne,d,-E,g),k=tc(M,N,re,ie,d,-E,g),c.lineTo(O.cx+O.x01,O.cy+O.y01),Ee?1:t>=e?0:NaN}t(lc,`default`);function uc(e){return e}t(uc,`default`);function dc(){var e=uc,n=lc,r=null,i=q(0),a=q(Ls),o=q(0);function s(t){var s,c=(t=ac(t)).length,l,u,d=0,f=Array(c),p=Array(c),m=+i.apply(this,arguments),h=Math.min(Ls,Math.max(-Ls,a.apply(this,arguments)-m)),g,_=Math.min(Math.abs(h)/c,o.apply(this,arguments)),v=_*(h<0?-1:1),y;for(s=0;s0&&(d+=y);for(n==null?r!=null&&f.sort(function(e,n){return r(t[e],t[n])}):f.sort(function(e,t){return n(p[e],p[t])}),s=0,u=d?(h-c*v)/d:0;s0?y*u:0)+v,p[l]={data:t[l],index:s,value:y,startAngle:m,endAngle:g,padAngle:_};return p}return t(s,`pie`),s.value=function(t){return arguments.length?(e=typeof t==`function`?t:q(+t),s):e},s.sortValues=function(e){return arguments.length?(n=e,r=null,s):n},s.sort=function(e){return arguments.length?(r=e,n=null,s):r},s.startAngle=function(e){return arguments.length?(i=typeof e==`function`?e:q(+e),s):i},s.endAngle=function(e){return arguments.length?(a=typeof e==`function`?e:q(+e),s):a},s.padAngle=function(e){return arguments.length?(o=typeof e==`function`?e:q(+e),s):o},s}t(dc,`default`);var fc=class{static{t(this,`Bump`)}constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function pc(e){return new fc(e,!0)}t(pc,`bumpX`);function mc(e){return new fc(e,!1)}t(mc,`bumpY`);function hc(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}t(hc,`point`);function gc(e){this._context=e}t(gc,`Basis`),gc.prototype={areaStart:t(function(){this._line=0},`areaStart`),areaEnd:t(function(){this._line=NaN},`areaEnd`),lineStart:t(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},`lineStart`),lineEnd:t(function(){switch(this._point){case 3:hc(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},`lineEnd`),point:t(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:hc(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},`point`)};function _c(e){return new gc(e)}t(_c,`default`);function vc(){}t(vc,`default`);function yc(e){this._context=e}t(yc,`BasisClosed`),yc.prototype={areaStart:vc,areaEnd:vc,lineStart:t(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},`lineStart`),lineEnd:t(function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},`lineEnd`),point:t(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:hc(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},`point`)};function bc(e){return new yc(e)}t(bc,`default`);function xc(e){this._context=e}t(xc,`BasisOpen`),xc.prototype={areaStart:t(function(){this._line=0},`areaStart`),areaEnd:t(function(){this._line=NaN},`areaEnd`),lineStart:t(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},`lineStart`),lineEnd:t(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},`lineEnd`),point:t(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:hc(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},`point`)};function Sc(e){return new xc(e)}t(Sc,`default`);function Cc(e,t){this._basis=new gc(e),this._beta=t}t(Cc,`Bundle`),Cc.prototype={lineStart:t(function(){this._x=[],this._y=[],this._basis.lineStart()},`lineStart`),lineEnd:t(function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},`lineEnd`),point:t(function(e,t){this._x.push(+e),this._y.push(+t)},`point`)};var wc=t((function e(n){function r(e){return n===1?new gc(e):new Cc(e,n)}return t(r,`bundle`),r.beta=function(t){return e(+t)},r}),`custom`)(.85);function Tc(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}t(Tc,`point`);function Ec(e,t){this._context=e,this._k=(1-t)/6}t(Ec,`Cardinal`),Ec.prototype={areaStart:t(function(){this._line=0},`areaStart`),areaEnd:t(function(){this._line=NaN},`areaEnd`),lineStart:t(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},`lineStart`),lineEnd:t(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Tc(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},`lineEnd`),point:t(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Tc(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},`point`)};var Dc=t((function e(n){function r(e){return new Ec(e,n)}return t(r,`cardinal`),r.tension=function(t){return e(+t)},r}),`custom`)(0);function Oc(e,t){this._context=e,this._k=(1-t)/6}t(Oc,`CardinalClosed`),Oc.prototype={areaStart:vc,areaEnd:vc,lineStart:t(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},`lineStart`),lineEnd:t(function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},`lineEnd`),point:t(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Tc(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},`point`)};var kc=t((function e(n){function r(e){return new Oc(e,n)}return t(r,`cardinal`),r.tension=function(t){return e(+t)},r}),`custom`)(0);function Ac(e,t){this._context=e,this._k=(1-t)/6}t(Ac,`CardinalOpen`),Ac.prototype={areaStart:t(function(){this._line=0},`areaStart`),areaEnd:t(function(){this._line=NaN},`areaEnd`),lineStart:t(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},`lineStart`),lineEnd:t(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},`lineEnd`),point:t(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Tc(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},`point`)};var jc=t((function e(n){function r(e){return new Ac(e,n)}return t(r,`cardinal`),r.tension=function(t){return e(+t)},r}),`custom`)(0);function Mc(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>X){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>X){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}t(Mc,`point`);function Nc(e,t){this._context=e,this._alpha=t}t(Nc,`CatmullRom`),Nc.prototype={areaStart:t(function(){this._line=0},`areaStart`),areaEnd:t(function(){this._line=NaN},`areaEnd`),lineStart:t(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},`lineStart`),lineEnd:t(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},`lineEnd`),point:t(function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Mc(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},`point`)};var Pc=t((function e(n){function r(e){return n?new Nc(e,n):new Ec(e,0)}return t(r,`catmullRom`),r.alpha=function(t){return e(+t)},r}),`custom`)(.5);function Fc(e,t){this._context=e,this._alpha=t}t(Fc,`CatmullRomClosed`),Fc.prototype={areaStart:vc,areaEnd:vc,lineStart:t(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},`lineStart`),lineEnd:t(function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},`lineEnd`),point:t(function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Mc(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},`point`)};var Ic=t((function e(n){function r(e){return n?new Fc(e,n):new Oc(e,0)}return t(r,`catmullRom`),r.alpha=function(t){return e(+t)},r}),`custom`)(.5);function Lc(e,t){this._context=e,this._alpha=t}t(Lc,`CatmullRomOpen`),Lc.prototype={areaStart:t(function(){this._line=0},`areaStart`),areaEnd:t(function(){this._line=NaN},`areaEnd`),lineStart:t(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},`lineStart`),lineEnd:t(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},`lineEnd`),point:t(function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Mc(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},`point`)};var Rc=t((function e(n){function r(e){return n?new Lc(e,n):new Ac(e,0)}return t(r,`catmullRom`),r.alpha=function(t){return e(+t)},r}),`custom`)(.5);function zc(e){this._context=e}t(zc,`LinearClosed`),zc.prototype={areaStart:vc,areaEnd:vc,lineStart:t(function(){this._point=0},`lineStart`),lineEnd:t(function(){this._point&&this._context.closePath()},`lineEnd`),point:t(function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))},`point`)};function Bc(e){return new zc(e)}t(Bc,`default`);function Vc(e){return e<0?-1:1}t(Vc,`sign`);function Hc(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Vc(a)+Vc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}t(Hc,`slope3`);function Uc(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}t(Uc,`slope2`);function Wc(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}t(Wc,`point`);function Gc(e){this._context=e}t(Gc,`MonotoneX`),Gc.prototype={areaStart:t(function(){this._line=0},`areaStart`),areaEnd:t(function(){this._line=NaN},`areaEnd`),lineStart:t(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},`lineStart`),lineEnd:t(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Wc(this,this._t0,Uc(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},`lineEnd`),point:t(function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Wc(this,Uc(this,n=Hc(this,e,t)),n);break;default:Wc(this,this._t0,n=Hc(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}},`point`)};function Kc(e){this._context=new qc(e)}t(Kc,`MonotoneY`),(Kc.prototype=Object.create(Gc.prototype)).point=function(e,t){Gc.prototype.point.call(this,t,e)};function qc(e){this._context=e}t(qc,`ReflectContext`),qc.prototype={moveTo:t(function(e,t){this._context.moveTo(t,e)},`moveTo`),closePath:t(function(){this._context.closePath()},`closePath`),lineTo:t(function(e,t){this._context.lineTo(t,e)},`lineTo`),bezierCurveTo:t(function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)},`bezierCurveTo`)};function Jc(e){return new Gc(e)}t(Jc,`monotoneX`);function Yc(e){return new Kc(e)}t(Yc,`monotoneY`);function Xc(e){this._context=e}t(Xc,`Natural`),Xc.prototype={areaStart:t(function(){this._line=0},`areaStart`),areaEnd:t(function(){this._line=NaN},`areaEnd`),lineStart:t(function(){this._x=[],this._y=[]},`lineStart`),lineEnd:t(function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Zc(e),i=Zc(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},`lineEnd`),point:t(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t},`point`)};function el(e){return new $c(e,.5)}t(el,`default`);function tl(e){return new $c(e,0)}t(tl,`stepBefore`);function nl(e){return new $c(e,1)}t(nl,`stepAfter`);var rl={value:t(()=>{},`value`)};function il(){for(var e=0,t=arguments.length,n={},r;e=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}t(ol,`parseTypenames`),al.prototype=il.prototype={constructor:al,on:t(function(e,t){var n=this._,r=ol(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a0)for(var n=Array(i),r=0,i,a;r=0&&e._call.call(void 0,t),e=e._next;--ul}t(Tl,`timerFlush`);function El(){_l=(gl=yl.now())+vl,ul=dl=0;try{Tl()}finally{ul=0,Ol(),_l=0}}t(El,`wake`);function Dl(){var e=yl.now(),t=e-gl;t>pl&&(vl-=t,gl=e)}t(Dl,`poke`);function Ol(){for(var e,t=ml,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ml=n);hl=e,kl(r)}t(Ol,`nap`);function kl(e){ul||(dl&&=clearTimeout(dl),e-_l>24?(e<1/0&&(dl=setTimeout(El,e-yl.now()-vl)),fl&&=clearInterval(fl)):(fl||=(gl=yl.now(),setInterval(Dl,pl)),ul=1,bl(El)))}t(kl,`sleep`);function Al(e,t,n){var r=new Cl;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}t(Al,`default`);var jl=ll(`start`,`end`,`cancel`,`interrupt`),Ml=[],Nl=0,Pl=1,Fl=2,Il=3,Ll=4,Rl=5,zl=6;function Bl(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Hl(e,n,{name:t,index:r,group:i,on:jl,tween:Ml,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Nl})}t(Bl,`default`);function Vl(e,t){var n=Q(e,t);if(n.state>Nl)throw Error(`too late; already scheduled`);return n}t(Vl,`init`);function Z(e,t){var n=Q(e,t);if(n.state>Il)throw Error(`too late; already running`);return n}t(Z,`set`);function Q(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}t(Q,`get`);function Hl(e,n,r){var i=e.__transition,a;i[n]=r,r.timer=wl(o,0,r.time);function o(e){r.state=Pl,r.timer.restart(s,r.delay,r.time),r.delay<=e&&s(e-r.delay)}t(o,`schedule`);function s(t){var o,u,d,f;if(r.state!==Pl)return l();for(o in i)if(f=i[o],f.name===r.name){if(f.state===Il)return Al(s);f.state===Ll?(f.state=zl,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete i[o]):+oFl&&r.state=0&&(e=e.slice(0,t)),!e||e===`start`})}t(bu,`start`);function xu(e,t,n){var r,i,a=bu(t)?Vl:Z;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}t(xu,`onFunction`);function Su(e,t){var n=this._id;return arguments.length<2?Q(this.node(),n).on.on(e):this.each(xu(n,e,t))}t(Su,`default`);function Cu(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}t(Cu,`removeFunction`);function wu(){return this.on(`end.remove`,Cu(this._id))}t(wu,`default`);function Tu(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=de(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o{let t=e.slice(1,-1),n=``;for(let e=0;enew u,`TokenBuilder`),ValueConverter:l(()=>new f,`ValueConverter`)}};function m(e=a){let i=c(t(e),s),o=c(n({shared:i}),r,p);return i.ServiceRegistry.register(o),{shared:i,RailroadEbnf:o}}e(m,`createRailroadEbnfServices`),l(m,`createRailroadEbnfServices`);export{m as n,p as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-GMJQP6DO-gEw8rKqu.js b/lecture-01/assets/chunk-GMJQP6DO-gEw8rKqu.js new file mode 100644 index 0000000000000000000000000000000000000000..97386ecb7f21ef4abccdd2b4e58f32e21b73dca1 --- /dev/null +++ b/lecture-01/assets/chunk-GMJQP6DO-gEw8rKqu.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{C as t,S as n,n as r,o as i,t as a,u as o,w as s,x as c,y as l}from"./chunk-A7G5T7E5-C2HISlqa.js";var u=class extends a{static{e(this,`TreemapTokenBuilder`)}static{c(this,`TreemapTokenBuilder`)}constructor(){super([`treemap`])}},d=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,f=class extends r{static{e(this,`TreemapValueConverter`)}static{c(this,`TreemapValueConverter`)}runCustomConverter(e,t,n){if(e.name===`NUMBER2`)return parseFloat(t.replace(/,/g,``));if(e.name===`SEPARATOR`||e.name===`STRING2`)return t.substring(1,t.length-1);if(e.name===`INDENTATION`)return t.length;if(e.name===`ClassDef`){if(typeof t!=`string`)return t;let e=d.exec(t);if(e)return{$type:`ClassDefStatement`,className:e[1],styleText:e[2]||void 0}}}};function p(e){let t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){let e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}e(p,`registerValidationChecks`),c(p,`registerValidationChecks`);var m=class{static{e(this,`TreemapValidator`)}static{c(this,`TreemapValidator`)}checkSingleRoot(e,t){let n;for(let r of e.TreemapRows)r.item&&(n===void 0&&r.indent===void 0?n=0:(r.indent===void 0||n!==void 0&&n>=parseInt(r.indent,10))&&t(`error`,`Multiple root nodes are not allowed in a treemap.`,{node:r,property:`item`}))}},h={parser:{TokenBuilder:c(()=>new u,`TokenBuilder`),ValueConverter:c(()=>new f,`ValueConverter`)},validation:{TreemapValidator:c(()=>new m,`TreemapValidator`)}};function g(e=i){let r=s(t(e),o),a=s(n({shared:r}),l,h);return r.ServiceRegistry.register(a),p(a),{shared:r,Treemap:a}}e(g,`createTreemapServices`),c(g,`createTreemapServices`);export{g as n,h as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-GUDDZZ3A-DadEmnfX.js b/lecture-01/assets/chunk-GUDDZZ3A-DadEmnfX.js new file mode 100644 index 0000000000000000000000000000000000000000..967572f666ff258707b690abb5aebd1047c4674e --- /dev/null +++ b/lecture-01/assets/chunk-GUDDZZ3A-DadEmnfX.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as t}from"./chunk-FO5PYUIK-CPzj2963.js";import{_ as n,m as r,r as i,t as a}from"./chunk-XAKTCX7R-DiVetB2y.js";function o(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:s(e),edges:c(e)};return r(e.graph())||(t.value=i(e.graph())),t}e(o,`write`);function s(e){return n(e.nodes(),function(t){var n=e.node(t),i=e.parent(t),a={v:t};return r(n)||(a.value=n),r(i)||(a.parent=i),a})}e(s,`writeNodes`);function c(e){return n(e.edges(),function(t){var n=e.edge(t),i={v:t.v,w:t.w};return r(t.name)||(i.name=t.name),r(n)||(i.value=n),i})}e(c,`writeEdges`);var l=new Map,u=new Map,d=new Map,f=e(()=>{u.clear(),d.clear(),l.clear()},`clear`),p=e((e,n)=>{let r=u.get(n)||[];return t.trace(`In isDescendant`,n,` `,e,` = `,r.includes(e)),r.includes(e)},`isDescendant`),m=e((e,n)=>{let r=u.get(n)||[];return t.info(`Descendants of `,n,` is `,r),t.info(`Edge is `,e),e.v===n||e.w===n?!1:r?r.includes(e.v)||p(e.v,n)||p(e.w,n)||r.includes(e.w):(t.debug(`Tilt, `,n,`,not in descendants`),!1)},`edgeInCluster`),h=e((e,n,r,i)=>{t.warn(`Copying children of `,e,`root`,i,`data`,n.node(e),i);let a=n.children(e)||[];e!==i&&a.push(e),t.warn(`Copying (nodes) clusterId`,e,`nodes`,a),a.forEach(a=>{if(n.children(a).length>0)h(a,n,r,i);else{let o=n.node(a);t.info(`cp `,a,` to `,i,` with parent `,e),r.setNode(a,o),i!==n.parent(a)&&(t.warn(`Setting parent`,a,n.parent(a)),r.setParent(a,n.parent(a))),e!==i&&a!==e?(t.debug(`Setting parent`,a,e),r.setParent(a,e)):(t.info(`In copy `,e,`root`,i,`data`,n.node(e),i),t.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,e!==i,`node!==clusterId`,a!==e));let s=n.edges(a);t.debug(`Copying Edges`,s),s.forEach(a=>{t.info(`Edge`,a);let o=n.edge(a.v,a.w,a.name);t.info(`Edge data`,o,i);try{if(m(a,i)){let e=u.get(i)||[],s=e.includes(a.v)||p(a.v,i)||a.v===i,c=e.includes(a.w)||p(a.w,i)||a.w===i;if(s&&c)t.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),t.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]));else{let e=s?i:a.v,r=c?i:a.w;t.info(`Rebinding cross-boundary edge as `,e,r,o,a.name),n.setEdge(e,r,o,a.name)}}else t.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,e)}catch(e){t.error(e)}})}t.debug(`Removing node`,a),n.removeNode(a)})},`copy`),g=e((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)d.set(i,e),r=[...r,...g(i,t)];return r},`extractDescendants`),_=e((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),v=e((e,n,r)=>{let i=n.children(e);if(t.trace(`Searching children of id `,e,i),i.length<1)return e;let a;for(let e of i){let t=v(e,n,r),i=_(n,r,t);if(t){if(i.length>0)a=t;else return t}}return a},`findNonClusterChild`),y=e(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,`getAnchorId`),b=e((e,n)=>{if(!e||n>10){t.debug(`Opting out, no graph `);return}t.debug(`Opting in, graph `),e.nodes().forEach(function(n){e.children(n).length>0&&(t.warn(`Cluster identified`,n,` Replacement id in edges: `,v(n,e,n)),u.set(n,g(n,e)),l.set(n,{id:v(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){let r=e.children(n),i=e.edges();r.length>0?(t.debug(`Cluster identified`,n,u),i.forEach(e=>{p(e.v,n)^p(e.w,n)&&(t.warn(`Edge: `,e,` leaves cluster `,n),t.warn(`Descendants of XXX `,n,`: `,u.get(n)),l.get(n).externalConnections=!0)})):t.debug(`Not a cluster `,n,u)});for(let t of l.keys()){let n=l.get(t).id,r=e.parent(n);r!==t&&l.has(r)&&!l.get(r).externalConnections&&(l.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&l.get(t)?.externalConnections&&i&&w(e,n,t)){let r=T(e,t,e.parent(n));r&&(l.get(t).id=r)}}e.edges().forEach(function(n){let r=e.edge(n);t.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(n)),t.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(e.edge(n)));let i=n.v,a=n.w;if(t.warn(`Fix XXX`,l,`ids:`,n.v,n.w,`Translating: `,l.get(n.v),` --- `,l.get(n.w)),l.get(n.v)||l.get(n.w)){if(t.warn(`Fixing and trying - removing XXX`,n.v,n.w,n.name),i=y(n.v),a=y(n.w),e.removeEdge(n.v,n.w,n.name),i!==n.v){let t=e.parent(i);l.get(t).externalConnections=!0,r.fromCluster=n.v}if(a!==n.w){let t=e.parent(a);l.get(t).externalConnections=!0,r.toCluster=n.w}t.warn(`Fix Replacing with XXX`,i,a,n.name),e.setEdge(i,a,r,n.name)}}),t.warn(`Adjusted Graph`,o(e)),x(e,0),t.trace(l)},`adjustClustersAndEdges`),x=e((e,n)=>{if(t.warn(`extractor - `,n,o(e),e.children(`D`)),n>10){t.error(`Bailing out`);return}let r=e.nodes(),i=!1;for(let t of r){let n=e.children(t);i||=n.length>0}if(!i){t.debug(`Done, no node has children`,e.nodes());return}t.debug(`Nodes = `,r,n);for(let i of r)if(t.debug(`Extracting node`,i,l,l.has(i)&&!l.get(i).externalConnections,!e.parent(i),e.node(i),e.children(`D`),` Depth `,n),!l.has(i))t.debug(`Not a cluster`,i,n);else if(l.get(i)?.clusterData?.explicitDir&&e.children(i)&&e.children(i).length>0){t.warn(`Cluster with explicit dir, creating subgraph for children`,i,n);let r=l.get(i).clusterData.dir,s=new a({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});h(i,e,s,i);let c=e.node(i)||{};e.setNode(i,{...c,clusterNode:!0,id:i,clusterData:l.get(i).clusterData,label:l.get(i).label,graph:s}),t.warn(`Subgraph for cluster with explicit dir created:`,i,o(s))}else if(!l.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){t.warn(`Cluster without external connections, without a parent and with children`,i,n);let r=e.graph().rankdir===`TB`?`LR`:`TB`;l.get(i)?.clusterData?.dir&&(r=l.get(i).clusterData.dir,t.warn(`Fixing dir`,l.get(i).clusterData.dir,r));let s=new a({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});h(i,e,s,i);let c=e.node(i)||{};e.setNode(i,{...c,clusterNode:!0,id:i,clusterData:l.get(i).clusterData,label:l.get(i).label,graph:s}),t.debug(`Old graph after copy`,o(e))}else t.warn(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!l.get(i).externalConnections,` no parent: `,!e.parent(i),` children `,e.children(i)&&e.children(i).length>0,e.children(`D`),n),t.debug(l);r=e.nodes(),t.warn(`New list of nodes`,r);for(let i of r){let r=e.node(i);t.warn(` Now next level`,i,r),r?.clusterNode&&x(r.graph,n+1)}},`extractor`),S=e((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=S(e,e.children(t));n=[...n,...r]}),n},`sorter`),C=e(e=>S(e,e.children()),`sortNodesByHierarchy`),w=e((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=l.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),T=e((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||p(i,n))continue;let r=v(i,e,t);if(r&&!w(e,r,t))return r}return null},`findSafeAnchorNode`);export{C as a,v as i,f as n,o,l as r,b as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-HPLX5OYV-zid2YVw5.js b/lecture-01/assets/chunk-HPLX5OYV-zid2YVw5.js new file mode 100644 index 0000000000000000000000000000000000000000..d35012b26bd2a4a285bed26f5a741bbf25a19c52 --- /dev/null +++ b/lecture-01/assets/chunk-HPLX5OYV-zid2YVw5.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as t}from"./chunk-FO5PYUIK-CPzj2963.js";var n=e((e,n)=>{let r;return n===`sandbox`&&(r=t(`#i`+e)),t(n===`sandbox`?r.nodes()[0].contentDocument.body:`body`).select(`[id="${e}"]`)},`getDiagramElement`);export{n as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-IALYP65X-Bv3ioVcB.js b/lecture-01/assets/chunk-IALYP65X-Bv3ioVcB.js new file mode 100644 index 0000000000000000000000000000000000000000..644af39430f0723433d50ae4c0c14fd7c220cf3b --- /dev/null +++ b/lecture-01/assets/chunk-IALYP65X-Bv3ioVcB.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";var t=class{constructor(e){this.init=e,this.records=this.init()}static{e(this,`ImperativeState`)}reset(){this.records=this.init()}};export{t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-IIWGMRJM-k15frrBU.js b/lecture-01/assets/chunk-IIWGMRJM-k15frrBU.js new file mode 100644 index 0000000000000000000000000000000000000000..7b9a97f584d583e13dc5d9bfa505eb3cc7eb87af --- /dev/null +++ b/lecture-01/assets/chunk-IIWGMRJM-k15frrBU.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{C as t,S as n,c as r,i,o as a,t as o,u as s,w as c,x as l}from"./chunk-A7G5T7E5-C2HISlqa.js";var u=class extends o{static{e(this,`GitGraphTokenBuilder`)}static{l(this,`GitGraphTokenBuilder`)}constructor(){super([`gitGraph`])}},d={parser:{TokenBuilder:l(()=>new u,`TokenBuilder`),ValueConverter:l(()=>new i,`ValueConverter`)}};function f(e=a){let i=c(t(e),s),o=c(n({shared:i}),r,d);return i.ServiceRegistry.register(o),{shared:i,GitGraph:o}}e(f,`createGitGraphServices`),l(f,`createGitGraphServices`);export{f as n,d as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-IPM4HZQ6-CQmHNgJe.js b/lecture-01/assets/chunk-IPM4HZQ6-CQmHNgJe.js new file mode 100644 index 0000000000000000000000000000000000000000..16a9301bd1f539149544fdb0b0d19fd8c9ec16ed --- /dev/null +++ b/lecture-01/assets/chunk-IPM4HZQ6-CQmHNgJe.js @@ -0,0 +1 @@ +import{r as e,t}from"./chunk-PTVI3W5X-DVfdoxm6.js";var n=t({"../../node_modules/.pnpm/@braintree+sanitize-url@7.1.2/node_modules/@braintree/sanitize-url/dist/constants.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[`.`,`/`],e.BLANK_URL=`about:blank`}}),r=t({"../../node_modules/.pnpm/@braintree+sanitize-url@7.1.2/node_modules/@braintree/sanitize-url/dist/index.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=c;var r=n();function i(e){return r.relativeFirstCharacters.indexOf(e[0])>-1}e(i,`isRelativeUrlWithoutProtocol`);function a(e){return e.replace(r.ctrlCharactersRegex,``).replace(r.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}e(a,`decodeHtmlCharacters`);function o(e){return URL.canParse(e)}e(o,`isValidUrl`);function s(e){try{return decodeURIComponent(e)}catch{return e}}e(s,`decodeURI`);function c(e){if(!e)return r.BLANK_URL;var t,n=s(e.trim());do n=a(n).replace(r.htmlCtrlEntityRegex,``).replace(r.ctrlCharactersRegex,``).replace(r.whitespaceEscapeCharsRegex,``).trim(),n=s(n),t=n.match(r.ctrlCharactersRegex)||n.match(r.htmlEntitiesRegex)||n.match(r.htmlCtrlEntityRegex)||n.match(r.whitespaceEscapeCharsRegex);while(t&&t.length>0);var c=n;if(!c)return r.BLANK_URL;if(i(c))return c;var l=c.trimStart(),u=l.match(r.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(r.invalidProtocolRegex.test(d))return r.BLANK_URL;var f=l.replace(/\\/g,`/`);if(d===`mailto:`||d.includes(`://`))return f;if(d===`http:`||d===`https:`){if(!o(f))return r.BLANK_URL;var p=new URL(f);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return f}e(c,`sanitizeUrl`)}});export{r as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-IT6C5QXO-BI6Sf-cR.js b/lecture-01/assets/chunk-IT6C5QXO-BI6Sf-cR.js new file mode 100644 index 0000000000000000000000000000000000000000..4f086f68496a0be14b2abfdb344e2f1b2a942ddb --- /dev/null +++ b/lecture-01/assets/chunk-IT6C5QXO-BI6Sf-cR.js @@ -0,0 +1,2 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{C as t,S as n,_ as r,n as i,o as a,t as o,u as s,w as c,x as l}from"./chunk-A7G5T7E5-C2HISlqa.js";var u=class extends o{static{e(this,`RailroadPegTokenBuilder`)}static{l(this,`RailroadPegTokenBuilder`)}constructor(){super([`railroad-peg-beta`])}},d=l(e=>{let t=e.slice(1,-1),n=``;for(let e=0;enew u,`TokenBuilder`),ValueConverter:l(()=>new f,`ValueConverter`)}};function m(e=a){let i=c(t(e),s),o=c(n({shared:i}),r,p);return i.ServiceRegistry.register(o),{shared:i,RailroadPeg:o}}e(m,`createRailroadPegServices`),l(m,`createRailroadPegServices`);export{m as n,p as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-LJTN6OYE-BTsXVLFU.js b/lecture-01/assets/chunk-LJTN6OYE-BTsXVLFU.js new file mode 100644 index 0000000000000000000000000000000000000000..bf614b6af79563eda71987052bbf69460737a454 --- /dev/null +++ b/lecture-01/assets/chunk-LJTN6OYE-BTsXVLFU.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{C as t,S as n,d as r,i,o as a,t as o,u as s,w as c,x as l}from"./chunk-A7G5T7E5-C2HISlqa.js";var u=class extends o{static{e(this,`PacketTokenBuilder`)}static{l(this,`PacketTokenBuilder`)}constructor(){super([`packet`])}},d={parser:{TokenBuilder:l(()=>new u,`TokenBuilder`),ValueConverter:l(()=>new i,`ValueConverter`)}};function f(e=a){let i=c(t(e),s),o=c(n({shared:i}),r,d);return i.ServiceRegistry.register(o),{shared:i,Packet:o}}e(f,`createPacketServices`),l(f,`createPacketServices`);export{f as n,d as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-MPM6TOF7-5cxd71sq.js b/lecture-01/assets/chunk-MPM6TOF7-5cxd71sq.js new file mode 100644 index 0000000000000000000000000000000000000000..30dd9cdb099ce4d6e850fd281329ae9b13778d96 --- /dev/null +++ b/lecture-01/assets/chunk-MPM6TOF7-5cxd71sq.js @@ -0,0 +1,10 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{A as t,B as n,I as r,R as i,T as a,_ as o,c as s,j as c,k as l,l as u,m as d,u as f,w as p,x as m,z as h}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as g,D as _,S as v}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as y}from"./chunk-PLCLPJVV-BfMyJHbe.js";import{i as b,n as x}from"./chunk-XXV7AQMY-qeLKYxsH.js";import{d as S,v as C}from"./chunk-OX6ZKUVE-roiHi12N.js";import{n as ee}from"./chunk-YV36FAQU-CkTVkoM6.js";import{n as w}from"./chunk-2V3FENDJ-B1mkZICr.js";import{r as T}from"./chunk-DKH7L6O3-pKUB4f-O.js";import{i as E,n as te,r as D,t as O}from"./chunk-RTI7CJYH-CrTK6TD7.js";var ne=e((e,t,n,r,i,a=!1,o)=>{t.arrowTypeStart&&j(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&j(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),k={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_barb_neo:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,fill:!1},aggregation:{type:`aggregation`,fill:!1},extension:{type:`extension`,fill:!1},composition:{type:`composition`,fill:!0},dependency:{type:`dependency`,fill:!0},lollipop:{type:`lollipop`,fill:!1},only_one:{type:`onlyOne`,fill:!1},zero_or_one:{type:`zeroOrOne`,fill:!1},one_or_more:{type:`oneOrMore`,fill:!1},zero_or_more:{type:`zeroOrMore`,fill:!1},requirement_arrow:{type:`requirement_arrow`,fill:!1},requirement_contains:{type:`requirement_contains`,fill:!1}},A=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],j=e((e,t,n,r,i,o,s=!1,c)=>{let l=k[n],u=l&&A.includes(l.type);if(!l){a.warn(`Unknown arrow type: ${n}`);return}let d=`${i}_${o}-${l.type}${t===`start`?`Start`:`End`}${s&&u?`-margin`:``}`;if(c&&c.trim()!==``){let n=`${d}_${c.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(n)){let e=document.getElementById(d);if(e){let t=e.cloneNode(!0);t.id=n,t.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,c),l.fill&&e.setAttribute(`fill`,c)}),e.parentNode?.appendChild(t)}}e.attr(`marker-${t}`,`url(${r}#${n})`)}else e.attr(`marker-${t}`,`url(${r}#${d})`)},`addEdgeMarker`),re=e(e=>typeof e==`string`?e:g()?.flowchart?.curve,`resolveEdgeCurveType`),M=new Map,N=new Map,P=e(()=>{M.clear(),N.clear()},`clear`),F=e(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),I=e(async(e,t)=>{let n=g(),i=_(n),{labelStyles:o}=b(t);t.labelStyle=o;let s=e.insert(`g`).attr(`class`,`edgeLabel`),c=s.insert(`g`).attr(`class`,`label`).attr(`data-id`,t.id),l=t.labelType===`markdown`,u=await w(e,t.label,{style:F(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:l,width:void 0},n);c.node().appendChild(u),a.info(`abc82`,t,t.labelType);let d=u.getBBox(),f=d;if(i){let e=u.children[0],t=r(u);d=e.getBoundingClientRect(),f=d,t.attr(`width`,d.width),t.attr(`height`,d.height)}else{let e=r(u).select(`text`).node();e&&typeof e.getBBox==`function`&&(f=e.getBBox())}c.attr(`transform`,O(f,i)),M.set(t.id,s),t.width=d.width,t.height=d.height;let p;if(t.startLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),a=n.insert(`g`).attr(`class`,`inner`),o=await T(a,t.startLabelLeft,F(t.labelStyle)||``,!1,!1);p=o;let s=o.getBBox();if(i){let e=o.children[0],t=r(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}a.attr(`transform`,O(s,i)),N.get(t.id)||N.set(t.id,{}),N.get(t.id).startLeft=n,L(p,t.startLabelLeft)}if(t.startLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),a=n.insert(`g`).attr(`class`,`inner`),o=await T(a,t.startLabelRight,F(t.labelStyle)||``,!1,!1);p=o;let s=o.getBBox();if(i){let e=o.children[0],t=r(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}a.attr(`transform`,O(s,i)),N.get(t.id)||N.set(t.id,{}),N.get(t.id).startRight=n,L(p,t.startLabelRight)}if(t.endLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),a=n.insert(`g`).attr(`class`,`inner`),o=await T(n,t.endLabelLeft,F(t.labelStyle)||``,!1,!1);p=o;let s=o.getBBox();if(i){let e=o.children[0],t=r(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}a.attr(`transform`,O(s,i)),N.get(t.id)||N.set(t.id,{}),N.get(t.id).endLeft=n,L(p,t.endLabelLeft)}if(t.endLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),a=n.insert(`g`).attr(`class`,`inner`),o=await T(n,t.endLabelRight,F(t.labelStyle)||``,!1,!1);p=o;let s=o.getBBox();if(i){let e=o.children[0],t=r(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}a.attr(`transform`,O(s,i)),N.get(t.id)||N.set(t.id,{}),N.get(t.id).endRight=n,L(p,t.endLabelRight)}return u},`insertEdgeLabel`);function L(e,t){_(g())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}e(L,`setTerminalWidth`);var R=e((e,t)=>{a.debug(`Moving label abc88 `,e.id,e.label,M.get(e.id),t);let n=t.updatedPath?t.updatedPath:t.originalPath,r=g(),{subGraphTitleTotalMargin:i}=ee(r);if(e.label){let r=M.get(e.id),o=e.x,s=e.y;if(n){let r=C.calcLabelPosition(n);a.debug(`Moving label `+e.label+` from (`,o,`,`,s,`) to (`,r.x,`,`,r.y,`) abc88`),t.updatedPath&&(o=r.x,s=r.y)}r.attr(`transform`,`translate(${o}, ${s+i/2})`)}if(e.startLabelLeft){let t=N.get(e.id).startLeft,r=e.x,i=e.y;if(n){let t=C.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=N.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=C.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=N.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=C.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=N.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=C.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}},`positionEdgeLabel`),ie=e((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith(`-to-label`)||!Array.isArray(t)||t.length!==2)return t;let[n,r]=t,i=Math.abs(r.x-n.x),a=Math.abs(r.y-n.y);return i<.001||a<.001?t:a>=i?[n,{x:n.x,y:r.y},r]:[n,{x:r.x,y:n.y},r]},`orthogonalizeToLabelClippedPoints`),z=e((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),B=e((e,t,n)=>{a.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(n)} + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let r=e.x,i=e.y,o=Math.abs(r-n.x),s=e.width/2,c=n.xMath.abs(r-t.x)*l){let e=n.y{a.warn(`abc88 cutPathAtIntersect`,e,t);let n=[],r=e[0],i=!1;return e.forEach(e=>{if(a.info(`abc88 checking point`,e,t),!z(t,e)&&!i){let o=B(t,r,e);a.debug(`abc88 inside`,e,r,o),a.debug(`abc88 intersection`,o,t);let s=!1;n.forEach(e=>{s||=e.x===o.x&&e.y===o.y}),n.some(e=>e.x===o.x&&e.y===o.y)?a.warn(`abc88 no intersect`,o,n):n.push(o),i=!0}else a.warn(`abc88 outside`,e,r),r=e,i||n.push(e)}),a.debug(`returning points`,n),n},`cutPathAtIntersect`);function H(e){let t=[],n=[];for(let r=1;r5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),n.push(r))}return{cornerPoints:t,cornerPointPositions:n}}e(H,`extractCornerPoints`);var U=e(function(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=n/Math.sqrt(r*r+i*i);return{x:t.x-a*r,y:t.y-a*i}},`findAdjacentPoint`),ae=e(function(e){let{cornerPointPositions:t}=H(e),n=[];for(let r=0;r10&&Math.abs(i.y-t.y)>=10?(a.debug(`Corner point fixing`,Math.abs(i.x-t.x),Math.abs(i.y-t.y)),f=o.x===s.x?{x:l<0?s.x-5+d:s.x+5-d,y:u<0?s.y-d:s.y+d}:{x:l<0?s.x-d:s.x+d,y:u<0?s.y-5+d:s.y+5-d}):a.debug(`Corner point skipping fixing`,Math.abs(i.x-t.x),Math.abs(i.y-t.y)),n.push(f,c)}else n.push(e[r]);return n},`fixCorners`),oe=e((e,t,n)=>{let r=e-t-n,i=Math.floor(r/4);return`0 ${t} ${Array(i).fill(`2 2`).join(` `)} ${n}`},`generateDashArray`),W=e(function(e,_,v,b,ee,w,T,D=!1){if(!T)throw Error(`insertEdge: missing diagramId for edge "${_.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:O,layout:k}=g(),A=_.points,j=!1,M=ee;var N=w;let P=[];for(let e in _.cssCompiledStyles)x(e)||P.push(_.cssCompiledStyles[e]);if(k===`swimlane`){if(N.intersect&&M.intersect&&Array.isArray(A)&&A.length>=2){if(A.length===2)A=[M.intersect(A[0]),N.intersect(A[1])];else{let e=A.slice(1,-1),t=e[0],n=e[e.length-1],r=.5,i=Math.abs(A[A.length-1].x-n.x)!Number.isNaN(e.y)),L=re(_.curve);L!==`rounded`&&(I=ae(I));let R=p;switch(L){case`linear`:R=p;break;case`basis`:R=s;break;case`cardinal`:R=d;break;case`bumpX`:R=u;break;case`bumpY`:R=f;break;case`catmullRom`:R=o;break;case`monotoneX`:R=l;break;case`monotoneY`:R=t;break;case`natural`:R=c;break;case`step`:R=n;break;case`stepAfter`:R=i;break;case`stepBefore`:R=h;break;case`rounded`:R=p;break;default:R=s}let{x:z,y:B}=te(_),H=m().x(z).y(B).curve(R),U;switch(_.thickness){case`normal`:U=`edge-thickness-normal`;break;case`thick`:U=`edge-thickness-thick`;break;case`invisible`:U=`edge-thickness-invisible`;break;default:U=`edge-thickness-normal`}switch(_.pattern){case`solid`:U+=` edge-pattern-solid`;break;case`dotted`:U+=` edge-pattern-dotted`;break;case`dashed`:U+=` edge-pattern-dashed`;break;default:U+=` edge-pattern-solid`}let W,K=L===`rounded`?G(q(I,_),5):H(I),J=Array.isArray(_.style)?_.style:[_.style],Y=J.find(e=>e?.startsWith(`stroke:`)),X=``;_.animate&&(X=`edge-animation-fast`),_.animation&&(X=`edge-animation-`+_.animation);let Z=!1;if(_.look===`handDrawn`){let t=y.svg(e);Object.assign([],I);let n=t.path(K,{roughness:.3,seed:O});U+=` transition`,W=r(n).select(`path`).attr(`id`,`${T}-${_.id}`).attr(`class`,` `+U+(_.classes?` `+_.classes:``)+(X?` `+X:``)).attr(`style`,J?J.reduce((e,t)=>e+`;`+t,``):``);let i=W.attr(`d`);W.attr(`d`,i),e.node().appendChild(W.node())}else{let t=P.join(`;`),n=J?J.reduce((e,t)=>e+t+`;`,``):``,r=(t?t+`;`+n+`;`:n)+`;`+(J?J.reduce((e,t)=>e+`;`+t,``):``);W=e.append(`path`).attr(`d`,K).attr(`id`,`${T}-${_.id}`).attr(`class`,` `+U+(_.classes?` `+_.classes:``)+(X?` `+X:``)).attr(`style`,r),Y=r.match(/stroke:([^;]+)/)?.[1],Z=_.animate===!0||!!_.animation||t.includes(`animation`);let i=W.node(),a=typeof i.getTotalLength==`function`?i.getTotalLength():0,o=E[_.arrowTypeStart]||0,s=E[_.arrowTypeEnd]||0;if(_.look===`neo`&&!Z){let e=`stroke-dasharray: ${_.pattern===`dotted`||_.pattern===`dashed`?oe(a,o,s):`0 ${o} ${a-o-s} ${s}`}; stroke-dashoffset: 0;`;W.attr(`style`,e+W.attr(`style`))}}W.attr(`data-edge`,!0),W.attr(`data-et`,`edge`),W.attr(`data-id`,_.id),W.attr(`data-points`,F),W.attr(`data-look`,S(_.look)),_.showPoints&&I.forEach(t=>{e.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,t.x).attr(`cy`,t.y)});let Q=``;(g().flowchart.arrowMarkerAbsolute||g().state.arrowMarkerAbsolute)&&(Q=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,Q=Q.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),a.info(`arrowTypeStart`,_.arrowTypeStart),a.info(`arrowTypeEnd`,_.arrowTypeEnd);let se=!Z&&_?.look===`neo`;ne(W,_,Q,T,b,se,Y);let ce=Math.floor(A.length/2),le=A[ce];C.isLabelCoordinateInPath(le,W.attr(`d`))||(j=!0);let $={};return j&&($.updatedPath=A),$.originalPath=_.points,$},`insertEdge`);function G(e,t){if(e.length<2)return``;let n=``,r=e.length,i=1e-5;for(let a=0;a({...e}));if(e.length>=2&&D[t.arrowTypeStart]){let r=D[t.arrowTypeStart],i=e[0],a=e[1],{angle:o}=K(i,a),s=r*Math.cos(o),c=r*Math.sin(o);n[0].x=i.x+s,n[0].y=i.y+c}let r=e.length;if(r>=2&&D[t.arrowTypeEnd]){let i=D[t.arrowTypeEnd],a=e[r-1],o=e[r-2],{angle:s}=K(o,a),c=i*Math.cos(s),l=i*Math.sin(s);n[r-1].x=a.x-c,n[r-1].y=a.y-l}return n}e(q,`applyMarkerOffsetsToPoints`);var J=e((e,t,n,r)=>{t.forEach(t=>{Y[t](e,n,r)})},`insertMarkers`),Y={extension:e((e,t,n)=>{a.trace(`Making markers for `,n),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionStart`).attr(`class`,`marker extension `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionEnd`).attr(`class`,`marker extension `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`),e.append(`marker`).attr(`id`,n+`_`+t+`-extensionStart-margin`).attr(`class`,`marker extension `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,7 18,13 18,1`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionEnd-margin`).attr(`class`,`marker extension `+t).attr(`refX`,9).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,1 10,13 18,7`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`)},`extension`),composition:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart-margin`).attr(`class`,`marker composition `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`viewBox`,`0 0 15 15`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd-margin`).attr(`class`,`marker composition `+t).attr(`refX`,3.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`composition`),aggregation:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`aggregation`),dependency:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).attr(`refX`,6).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,4).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,16).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`dependency`),lollipop:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2)},`lollipop`),point:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,4.5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 5 L 10 10 L 10 0 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,11.5).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,10.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 11.5 7 L 0 14 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,1).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0,7 11.5,14 11.5,0`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`point`),circle:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,11).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refY`,5).attr(`refX`,12.25).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-2).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`circle`),cross:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,12).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,-1).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,17.7).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,-3.5).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5).style(`stroke-dasharray`,`1,0`)},`cross`),barb:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`barb`),barbNeo:e((e,t,n)=>{let{themeVariables:r}=v(),{transitionColor:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd-margin`).attr(`refX`,17).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`).attr(`fill`,`${i}`)},`barbNeo`),only_one:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`)},`only_one`),zero_or_one:e((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,21).attr(`cy`,9).attr(`r`,6),r.append(`path`).attr(`d`,`M9,0 L9,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,9).attr(`r`,6),i.append(`path`).attr(`d`,`M21,0 L21,18`)},`zero_or_one`),one_or_more:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`)},`one_or_more`),zero_or_more:e((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,48).attr(`cy`,18).attr(`r`,6),r.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,18).attr(`r`,6),i.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`)},`zero_or_more`),only_one_neo:e((e,t,n)=>{let{themeVariables:r}=v(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`).attr(`stroke-width`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`).attr(`stroke-width`,`${i}`)},`only_one_neo`),zero_or_one_neo:e((e,t,n)=>{let{themeVariables:r}=v(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,21).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),o.append(`path`).attr(`d`,`M9,0 L9,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,9).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),s.append(`path`).attr(`d`,`M21,0 L21,18`).attr(`stroke-width`,`${i}`)},`zero_or_one_neo`),one_or_more_neo:e((e,t,n)=>{let{themeVariables:r}=v(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`).attr(`stroke-width`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`).attr(`stroke-width`,`${i}`)},`one_or_more_neo`),zero_or_more_neo:e((e,t,n)=>{let{themeVariables:r}=v(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,45.5).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),o.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,11).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),s.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`).attr(`stroke-width`,`${i}`)},`zero_or_more_neo`),requirement_arrow:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,0 + L20,10 + M20,10 + L0,20`)},`requirement_arrow`),requirement_contains:e((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`g`);r.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),r.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),r.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10)},`requirement_contains`),requirement_arrow_neo:e((e,t,n)=>{let{themeVariables:r}=v(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`stroke-width`,`${i}`).attr(`viewBox`,`0 0 25 20`).append(`path`).attr(`d`,`M0,0 + L20,10 + M20,10 + L0,20`).attr(`stroke-linejoin`,`miter`)},`requirement_arrow_neo`),requirement_contains_neo:e((e,t,n)=>{let{themeVariables:r}=v(),{strokeWidth:i}=r,a=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`g`);a.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),a.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),a.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10),a.selectAll(`*`).attr(`stroke-width`,`${i}`)},`requirement_contains_neo`)},X=J;export{X as a,I as i,M as n,R as o,W as r,N as s,P as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-MX3EQCGM-dfbghwBz.js b/lecture-01/assets/chunk-MX3EQCGM-dfbghwBz.js new file mode 100644 index 0000000000000000000000000000000000000000..948791fa1cc03f672ca5b56ce70ce341b9763282 --- /dev/null +++ b/lecture-01/assets/chunk-MX3EQCGM-dfbghwBz.js @@ -0,0 +1,156 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as t,T as n}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as r,E as i,H as a,J as o,L as s,Q as c,Y as l,Z as u,a as d,b as f,c as p,j as m,o as h,p as g,x as ee}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{n as te,t as ne}from"./chunk-PWCFYZI5-Dz1excih.js";import{l as re,v as _}from"./chunk-OX6ZKUVE-roiHi12N.js";import{o as v}from"./chunk-DKH7L6O3-pKUB4f-O.js";import{r as y,t as b}from"./chunk-STSWKLMO-1NGmNrHs.js";import{t as x}from"./chunk-RTBOCTTP-BZPyT8j-.js";import{t as S}from"./chunk-ZICDAICJ-CB44yeNY.js";import{t as C}from"./chunk-HPLX5OYV-zid2YVw5.js";import{t as w}from"./chunk-BYAF6FXG-DqiL_6qO.js";var T=`flowchart-`,E=class{constructor(){this.vertexCounter=0,this.config=r(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=l,this.setAccDescription=o,this.setDiagramTitle=c,this.getAccTitle=ee,this.getAccDescription=f,this.getDiagramTitle=i,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{e(this,`FlowDB`)}sanitizeText(e){return p.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,t,i,a,o,s,c={},l){if(!e||e.trim().length===0)return;let u;if(l!==void 0){let e;e=l.includes(` +`)?l+` +`:`{ +`+l+` +}`,u=te(e,{schema:ne})}let d=this.edges.find(t=>t.id===e);if(d){let e=u;e?.animate!==void 0&&(d.animate=e.animate),e?.animation!==void 0&&(d.animation=e.animation),e?.curve!==void 0&&(d.interpolate=e.curve);return}let f,p=this.vertices.get(e);if(p===void 0&&(t===void 0&&i===void 0&&a!=null&&n.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`),p={id:e,labelType:`text`,domId:T+e+`-`+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,p)),this.vertexCounter++,t===void 0?p.text===void 0&&(p.text=e):(this.config=r(),f=this.sanitizeText(t.text.trim()),p.labelType=t.type,f.startsWith(`"`)&&f.endsWith(`"`)&&(f=f.substring(1,f.length-1)),p.text=f),i!==void 0&&(p.type=i),a?.forEach(e=>{p.styles.push(e)}),o?.forEach(e=>{p.classes.push(e)}),s!==void 0&&(p.dir=s),p.props===void 0?p.props=c:c!==void 0&&Object.assign(p.props,c),u!==void 0){if(u.shape){if(u.shape!==u.shape.toLowerCase()||u.shape.includes(`_`))throw Error(`No such shape: ${u.shape}. Shape names should be lowercase.`);if(!v(u.shape))throw Error(`No such shape: ${u.shape}.`);p.type=u?.shape}u?.label&&(p.text=u?.label,p.labelType=this.sanitizeNodeLabelType(u?.labelType)),u?.icon&&(p.icon=u?.icon,!u.label?.trim()&&p.text===e&&(p.text=``)),u?.form&&(p.form=u?.form),u?.pos&&(p.pos=u?.pos),u?.img&&(p.img=u?.img,!u.label?.trim()&&p.text===e&&(p.text=``)),u?.constraint&&(p.constraint=u.constraint),u.w&&(p.assetWidth=Number(u.w)),u.h&&(p.assetHeight=Number(u.h))}}addSingleLink(e,t,r,i){let a={start:e,end:t,type:void 0,text:``,labelType:`text`,classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};n.info(`abc78 Got edge...`,a);let o=r.text;if(o!==void 0&&(a.text=this.sanitizeText(o.text.trim()),a.text.startsWith(`"`)&&a.text.endsWith(`"`)&&(a.text=a.text.substring(1,a.text.length-1)),a.labelType=this.sanitizeNodeLabelType(o.type)),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length>10?10:r.length),i&&!this.edges.some(e=>e.id===i))a.id=i,a.isUserDefinedId=!0;else{let e=this.edges.filter(e=>e.start===a.start&&e.end===a.end);a.id=e.length===0?re(a.start,a.end,{counter:0,prefix:`L`}):re(a.start,a.end,{counter:e.length+1,prefix:`L`})}if(this.edges.length<(this.config.maxEdges??500))n.info(`Pushing edge...`),this.edges.push(a);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. + +Initialize mermaid with maxEdges set to a higher number to allow more edges. +You cannot set this config via configuration inside the diagram as it is a secure config. +You have to call mermaid.initialize.`)}isLinkData(e){return typeof e==`object`&&!!e&&`id`in e&&typeof e.id==`string`}addLink(e,t,r){let i=this.isLinkData(r)?r.id.replace(`@`,``):void 0;n.info(`addLink`,e,t,i);for(let n of e)for(let a of t){let o=n===e[e.length-1],s=a===t[0];o&&s?this.addSingleLink(n,a,r,i):this.addSingleLink(n,a,r,void 0)}}updateLinkInterpolate(e,t){e.forEach(e=>{e==="default"?this.edges.defaultInterpolate=t:this.edges[e].interpolate=t})}updateLink(e,t){e.forEach(e=>{if(typeof e==`number`&&e>=this.edges.length)throw Error(`The index ${e} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);e==="default"?this.edges.defaultStyle=t:(this.edges[e].style=t,(this.edges[e]?.style?.length??0)>0&&!this.edges[e]?.style?.some(e=>e?.startsWith(`fill`))&&this.edges[e]?.style?.push(`fill:none`))})}addClass(e,t){let n=t.join().replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);e.split(`,`).forEach(e=>{let t=this.classes.get(e);t===void 0&&(t={id:e,styles:[],textStyles:[]},this.classes.set(e,t)),n?.forEach(e=>{if(/color/.exec(e)){let n=e.replace(`fill`,`bgFill`);t.textStyles.push(n)}t.styles.push(e)})})}setDirection(e){this.direction=e.trim(),/.*/.exec(this.direction)&&(this.direction=`LR`),/.*v/.exec(this.direction)&&(this.direction=`TB`),this.direction===`TD`&&(this.direction=`TB`)}setClass(e,t){for(let n of e.split(`,`)){let e=this.vertices.get(n);e&&e.classes.push(t);let r=this.edges.find(e=>e.id===n);r&&r.classes.push(t);let i=this.subGraphLookup.get(n);i&&i.classes.push(t)}}setTooltip(e,t){if(t!==void 0){t=this.sanitizeText(t);for(let n of e.split(`,`))this.tooltips.set(this.version===`gen-1`?this.lookUpDomId(n):n,t)}}setClickFun(e,t,n){if(r().securityLevel!==`loose`||t===void 0)return;let i=[];if(typeof n==`string`){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{let n=this.lookUpDomId(e),r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener(`click`,()=>{_.runFunc(t,...i)},!1)}))}setLink(e,t,n){e.split(`,`).forEach(e=>{let r=this.vertices.get(e);r!==void 0&&(r.link=_.formatUrl(t,this.config),r.linkTarget=n)}),this.setClass(e,`clickable`)}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,t,n){e.split(`,`).forEach(e=>{this.setClickFun(e,t,n)}),this.setClass(e,`clickable`)}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let n=S();t(e).select(`svg`).selectAll(`g.node`).on(`mouseover`,e=>{let r=t(e.currentTarget),i=r.attr(`title`);if(i===null)return;let a=e.currentTarget?.getBoundingClientRect();n.transition().duration(200).style(`opacity`,`.9`),n.text(r.attr(`title`)).style(`left`,window.scrollX+a.left+(a.right-a.left)/2+`px`).style(`top`,window.scrollY+a.bottom+`px`),n.html(s.sanitize(i)),r.classed(`hover`,!0)}).on(`mouseout`,e=>{n.transition().duration(500).style(`opacity`,0),t(e.currentTarget).classed(`hover`,!1)})}clear(e=`gen-2`){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId=``,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=r(),h()}setGen(e){this.version=e||`gen-2`}defaultStyle(){return`fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;`}addSubGraph(t,i,a){let o=t.text.trim(),s=a.text;t===a&&/\s/.exec(a.text)&&(o=void 0);let c=e(e=>{let t={boolean:{},number:{},string:{}},n=[],r;return{nodeList:e.filter(function(e){let i=typeof e;return e.stmt&&e.stmt===`dir`?(r=e.value,!1):e.trim()===``?!1:i in t?t[i].hasOwnProperty(e)?!1:t[i][e]=!0:!n.includes(e)&&n.push(e)}),dir:r}},`uniq`)(i.flat()),l=c.nodeList,u=c.dir,d=u!==void 0,f=r().flowchart??{},p=u??(f.inheritDir?this.getDirection()??r().direction??void 0:void 0);if(this.version===`gen-1`)for(let e=0;e2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=t,this.subGraphs[t].id===e)return{result:!0,count:0};let r=0,i=1;for(;r=0){let n=this.indexNodes2(e,t);if(n.result)return{result:!0,count:i+n.count};i+=n.count}r+=1}return{result:!1,count:i}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2(`none`,this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(e){let t=e.trim(),n=`arrow_open`;switch(t[0]){case`<`:n=`arrow_point`,t=t.slice(1);break;case`x`:n=`arrow_cross`,t=t.slice(1);break;case`o`:n=`arrow_circle`,t=t.slice(1)}let r=`normal`;return t.includes(`=`)&&(r=`thick`),t.includes(`.`)&&(r=`dotted`),{type:n,stroke:r}}countChar(e,t){let n=t.length,r=0;for(let i=0;i`:r=`arrow_point`,t.startsWith(`<`)&&(r=`double_`+r,n=n.slice(1));break;case`o`:r=`arrow_circle`,t.startsWith(`o`)&&(r=`double_`+r,n=n.slice(1))}let i=`normal`,a=n.length-1;n.startsWith(`=`)&&(i=`thick`),n.startsWith(`~`)&&(i=`invisible`);let o=this.countChar(`.`,n);return o&&(i=`dotted`,a=o),{type:r,stroke:i,length:a}}destructLink(e,t){let n=this.destructEndLink(e),r;if(t){if(r=this.destructStartLink(t),r.stroke!==n.stroke)return{type:`INVALID`,stroke:`INVALID`};if(r.type===`arrow_open`)r.type=n.type;else{if(r.type!==n.type)return{type:`INVALID`,stroke:`INVALID`};r.type=`double_`+r.type}return r.type===`double_arrow`&&(r.type=`double_arrow_point`),r.length=n.length,r}return n}exists(e,t){for(let n of e)if(n.nodes.includes(t))return!0;return!1}makeUniq(e,t){let n=[];return e.nodes.forEach((r,i)=>{this.exists(t,r)||n.push(e.nodes[i])}),{nodes:n}}getTypeFromVertex(e){if(e.img)return`imageSquare`;if(e.icon)return e.form===`circle`?`iconCircle`:e.form===`square`?`iconSquare`:e.form===`rounded`?`iconRounded`:`icon`;switch(e.type){case`square`:case void 0:return`squareRect`;case`round`:return`roundedRect`;case`ellipse`:return`ellipse`;default:return e.type}}findNode(e,t){return e.find(e=>e.id===t)}destructEdgeType(e){let t=`none`,n=`arrow_point`;switch(e){case`arrow_point`:case`arrow_circle`:case`arrow_cross`:n=e;break;case`double_arrow_point`:case`double_arrow_circle`:case`double_arrow_cross`:t=e.replace(`double_`,``),n=t}return{arrowTypeStart:t,arrowTypeEnd:n}}addNodeFromVertex(e,t,n,r,i,a){let o=n.get(e.id),s=r.get(e.id)??!1,c=this.findNode(t,e.id);if(c)c.cssStyles=e.styles,c.cssCompiledStyles=this.getCompiledStyles(e.classes),c.cssClasses=e.classes.join(` `);else{let n={id:e.id,label:e.text,labelType:e.labelType,labelStyle:``,parentId:o,padding:i.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles([`default`,`node`,...e.classes]),cssClasses:`default `+e.classes.join(` `),dir:e.dir,domId:e.domId,look:a,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};s?t.push({...n,isGroup:!0,shape:`rect`}):t.push({...n,isGroup:!1,shape:this.getTypeFromVertex(e)})}}getCompiledStyles(e){let t=[];for(let n of e){let e=this.classes.get(n);e?.styles&&(t=[...t,...e.styles??[]].map(e=>e.trim())),e?.textStyles&&(t=[...t,...e.textStyles??[]].map(e=>e.trim()))}return t}getData(){let e=r(),t=[],n=[],i=this.getSubGraphs(),a=new Map,o=new Map;for(let e=i.length-1;e>=0;e--){let t=i[e];t.nodes.length>0&&o.set(t.id,!0);for(let e of t.nodes)a.set(e,t.id)}for(let n=i.length-1;n>=0;n--){let r=i[n];t.push({id:r.id,label:r.title,labelStyle:``,labelType:r.labelType,parentId:a.get(r.id),padding:8,cssCompiledStyles:this.getCompiledStyles(r.classes),cssClasses:r.classes.join(` `),shape:`rect`,dir:r.dir===`TD`?`TB`:r.dir,explicitDir:r.hasExplicitDir,isGroup:!0,look:e.look})}this.getVertices().forEach(n=>{this.addNodeFromVertex(n,t,a,o,e,e.look||`classic`)});let s=this.getEdges();return s.forEach((t,r)=>{let{arrowTypeStart:i,arrowTypeEnd:a}=this.destructEdgeType(t.type),o=[...s.defaultStyle??[]];t.style&&o.push(...t.style);let c={id:re(t.start,t.end,{counter:r,prefix:`L`},t.id),isUserDefinedId:t.isUserDefinedId,start:t.start,end:t.end,type:t.type??`normal`,label:t.text,labelType:t.labelType,labelpos:`c`,thickness:t.stroke,minlen:t.length,classes:t?.stroke===`invisible`?``:`edge-thickness-normal edge-pattern-solid flowchart-link`,arrowTypeStart:t?.stroke===`invisible`||t?.type===`arrow_open`?`none`:i,arrowTypeEnd:t?.stroke===`invisible`||t?.type===`arrow_open`?`none`:a,arrowheadStyle:`fill: #333`,cssCompiledStyles:this.getCompiledStyles(t.classes),labelStyle:o,style:o,pattern:t.stroke,look:e.look,animate:t.animate,animation:t.animation,curve:t.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};n.push(c)}),{nodes:t,edges:n,other:{},config:e}}defaultConfig(){return g.flowchart}},D={getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`),draw:e(async function(e,t,i,a,o){n.info(`REF0:`),n.info(`Drawing state diagram (v2)`,t);let{securityLevel:s,flowchart:c,layout:l}=r();a.db.setDiagramId(t),n.debug(`Before getData: `);let u=a.db.getData();n.debug(`Data: `,u);let d=C(t,s),f=a.db.getDirection();u.type=a.type,u.layoutAlgorithm=b(l),u.layoutAlgorithm===`dagre`&&l===`elk`&&n.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),u.direction=f,u.nodeSpacing=c?.nodeSpacing||50,u.rankSpacing=c?.rankSpacing||50,u.markers=[`point`,`circle`,`cross`],u.diagramId=t,n.debug(`REF1:`,u),await y(u,d,o);let p=u.config.flowchart?.diagramPadding??8;_.insertTitle(d,`flowchartTitleText`,c?.titleTopMargin||0,a.db.getDiagramTitle()),w(d,p,`flowchart`,c?.useMaxWidth||!1)},`draw`)},O=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],o=[2,2],s=[1,13],c=[1,14],l=[1,15],u=[1,16],d=[1,23],f=[1,25],p=[1,26],m=[1,27],h=[1,50],g=[1,49],ee=[1,29],te=[1,30],ne=[1,31],re=[1,32],_=[1,33],v=[1,45],y=[1,47],b=[1,43],x=[1,48],S=[1,44],C=[1,51],w=[1,46],T=[1,52],E=[1,53],D=[1,34],O=[1,35],ie=[1,36],ae=[1,37],oe=[1,38],k=[1,58],A=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],j=[1,62],M=[1,61],N=[1,63],se=[8,9,11,75,77,78],ce=[1,79],le=[1,92],ue=[1,97],de=[1,96],fe=[1,93],pe=[1,89],me=[1,95],he=[1,91],ge=[1,98],_e=[1,94],ve=[1,99],ye=[1,90],be=[8,9,10,11,40,75,77,78],P=[8,9,10,11,40,46,75,77,78],F=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],xe=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],Se=[44,60,89,102,105,106,109,111,114,115,116],Ce=[1,122],we=[1,123],Te=[1,125],Ee=[1,124],De=[44,60,62,74,89,102,105,106,109,111,114,115,116],Oe=[1,134],ke=[1,148],Ae=[1,149],je=[1,150],Me=[1,151],Ne=[1,136],Pe=[1,138],Fe=[1,142],Ie=[1,143],Le=[1,144],Re=[1,145],ze=[1,146],Be=[1,147],Ve=[1,152],He=[1,153],Ue=[1,132],We=[1,133],Ge=[1,140],Ke=[1,135],qe=[1,139],Je=[1,137],Ye=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],Xe=[1,155],Ze=[1,157],I=[8,9,11],L=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],R=[1,177],z=[1,173],B=[1,174],V=[1,178],H=[1,175],U=[1,176],Qe=[77,116,119],W=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],$e=[10,106],et=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],G=[1,248],K=[1,246],q=[1,250],J=[1,244],Y=[1,245],X=[1,247],Z=[1,249],Q=[1,251],tt=[1,269],nt=[8,9,11,106],$=[8,9,10,11,60,84,105,106,109,110,111,112],rt={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:`error`,8:`SEMI`,9:`NEWLINE`,10:`SPACE`,11:`EOF`,12:`GRAPH`,13:`NODIR`,14:`DIR`,27:`subgraph`,29:`SQS`,31:`SQE`,32:`end`,34:`acc_title`,35:`acc_title_value`,36:`acc_descr`,37:`acc_descr_value`,38:`acc_descr_multiline_value`,40:`SHAPE_DATA`,44:`AMP`,46:`STYLE_SEPARATOR`,48:`DOUBLECIRCLESTART`,49:`DOUBLECIRCLEEND`,50:`PS`,51:`PE`,52:`(-`,53:`-)`,54:`STADIUMSTART`,55:`STADIUMEND`,56:`SUBROUTINESTART`,57:`SUBROUTINEEND`,58:`VERTEX_WITH_PROPS_START`,59:`NODE_STRING[field]`,60:`COLON`,61:`NODE_STRING[value]`,62:`PIPE`,63:`CYLINDERSTART`,64:`CYLINDEREND`,65:`DIAMOND_START`,66:`DIAMOND_STOP`,67:`TAGEND`,68:`TRAPSTART`,69:`TRAPEND`,70:`INVTRAPSTART`,71:`INVTRAPEND`,74:`TESTSTR`,75:`START_LINK`,77:`LINK`,78:`LINK_ID`,80:`STR`,81:`MD_STR`,84:`STYLE`,85:`LINKSTYLE`,86:`CLASSDEF`,87:`CLASS`,88:`CLICK`,89:`DOWN`,90:`UP`,93:`idString[vertex]`,94:`idString[class]`,95:`CALLBACKNAME`,96:`CALLBACKARGS`,97:`HREF`,98:`LINK_TARGET`,99:`STR[link]`,100:`STR[tooltip]`,102:`DEFAULT`,104:`INTERPOLATE`,105:`NUM`,106:`COMMA`,109:`NODE_STRING`,110:`UNIT`,111:`BRKT`,112:`PCT`,114:`MINUS`,115:`MULT`,116:`UNICODE_TEXT`,117:`TEXT`,118:`TAGSTART`,119:`EDGE_TEXT`,121:`direction_tb`,122:`direction_bt`,123:`direction_rl`,124:`direction_lr`,125:`direction_td`},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 2:this.$=[];break;case 3:(!Array.isArray(a[s])||a[s].length>0)&&a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 183:this.$=a[s];break;case 11:r.setDirection(`TB`),this.$=`TB`;break;case 12:r.setDirection(a[s-1]),this.$=a[s-1];break;case 27:this.$=a[s-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 34:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 35:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 37:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 38:case 39:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 43:this.$=a[s-1]+a[s];break;case 44:this.$=a[s];break;case 45:r.addVertex(a[s-1][a[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s]),r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 46:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 47:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 48:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 49:r.addVertex(a[s-1][a[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s]),this.$={stmt:a[s-1],nodes:a[s-1],shapeData:a[s]};break;case 50:this.$={stmt:a[s],nodes:a[s]};break;case 51:this.$=[a[s]];break;case 52:r.addVertex(a[s-5][a[s-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s-4]),this.$=a[s-5].concat(a[s]);break;case 53:this.$=a[s-4].concat(a[s]);break;case 54:this.$=a[s];break;case 55:this.$=a[s-2],r.setClass(a[s-2],a[s]);break;case 56:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`square`);break;case 57:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`doublecircle`);break;case 58:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],`circle`);break;case 59:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`ellipse`);break;case 60:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`stadium`);break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`subroutine`);break;case 62:this.$=a[s-7],r.addVertex(a[s-7],a[s-1],`rect`,void 0,void 0,void 0,Object.fromEntries([[a[s-5],a[s-3]]]));break;case 63:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`cylinder`);break;case 64:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`round`);break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`diamond`);break;case 66:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],`hexagon`);break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`odd`);break;case 68:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`trapezoid`);break;case 69:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`inv_trapezoid`);break;case 70:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`lean_right`);break;case 71:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`lean_left`);break;case 72:this.$=a[s],r.addVertex(a[s]);break;case 73:a[s-1].text=a[s],this.$=a[s-1];break;case 74:case 75:a[s-2].text=a[s-1],this.$=a[s-2];break;case 76:this.$=a[s];break;case 77:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 78:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1],id:a[s-3]};break;case 79:this.$={text:a[s],type:`text`};break;case 80:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 81:this.$={text:a[s],type:`string`};break;case 82:this.$={text:a[s],type:`markdown`};break;case 83:var c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 84:var c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length,id:a[s-1]};break;case 85:this.$=a[s-1];break;case 86:this.$={text:a[s],type:`text`};break;case 87:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 88:this.$={text:a[s],type:`string`};break;case 89:case 104:this.$={text:a[s],type:`markdown`};break;case 101:this.$={text:a[s],type:`text`};break;case 102:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 103:this.$={text:a[s],type:`text`};break;case 105:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 106:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 107:case 115:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 108:case 116:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 109:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 110:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 111:this.$=a[s-2],r.setLink(a[s-2],a[s]);break;case 112:this.$=a[s-4],r.setLink(a[s-4],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 113:this.$=a[s-4],r.setLink(a[s-4],a[s-2],a[s]);break;case 114:this.$=a[s-6],r.setLink(a[s-6],a[s-4],a[s]),r.setTooltip(a[s-6],a[s-2]);break;case 117:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 118:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 119:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 120:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 121:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 122:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 123:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 124:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 125:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 126:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 127:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 128:case 130:this.$=[a[s]];break;case 129:case 131:a[s-2].push(a[s]),this.$=a[s-2];break;case 133:this.$=a[s-1]+a[s];break;case 181:this.$=a[s];break;case 182:this.$=a[s-1]+``+a[s];break;case 184:this.$=a[s-1]+``+a[s];break;case 185:this.$={stmt:`dir`,value:`TB`};break;case 186:this.$={stmt:`dir`,value:`BT`};break;case 187:this.$={stmt:`dir`,value:`RL`};break;case 188:this.$={stmt:`dir`,value:`LR`};break;case 189:this.$={stmt:`dir`,value:`TD`}}},`anonymous`),table:[{3:1,4:2,9:n,10:r,12:i},{1:[3]},t(a,o,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,33:24,34:f,36:p,38:m,42:28,43:39,44:h,45:40,47:41,60:g,84:ee,85:te,86:ne,87:re,88:_,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E,121:D,122:O,123:ie,124:ae,125:oe},t(a,[2,9]),t(a,[2,10]),t(a,[2,11]),{8:[1,55],9:[1,56],10:k,15:54,18:57},t(A,[2,3]),t(A,[2,4]),t(A,[2,5]),t(A,[2,6]),t(A,[2,7]),t(A,[2,8]),{8:j,9:M,11:N,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:j,9:M,11:N,21:68},{8:j,9:M,11:N,21:69},{8:j,9:M,11:N,21:70},{8:j,9:M,11:N,21:71},{8:j,9:M,11:N,21:72},{8:j,9:M,10:[1,73],11:N,21:74},t(A,[2,36]),{35:[1,75]},{37:[1,76]},t(A,[2,39]),t(se,[2,50],{18:77,39:78,10:k,40:ce}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:le,44:ue,60:de,80:[1,87],89:fe,95:[1,84],97:[1,85],101:86,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye,120:88},t(A,[2,185]),t(A,[2,186]),t(A,[2,187]),t(A,[2,188]),t(A,[2,189]),t(be,[2,51]),t(be,[2,54],{46:[1,100]}),t(P,[2,72],{113:113,29:[1,101],44:h,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:g,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:v,102:y,105:b,106:x,109:S,111:C,114:w,115:T,116:E}),t(F,[2,181]),t(F,[2,142]),t(F,[2,143]),t(F,[2,144]),t(F,[2,145]),t(F,[2,146]),t(F,[2,147]),t(F,[2,148]),t(F,[2,149]),t(F,[2,150]),t(F,[2,151]),t(F,[2,152]),t(a,[2,12]),t(a,[2,18]),t(a,[2,19]),{9:[1,114]},t(xe,[2,26],{18:115,10:k}),t(A,[2,27]),{42:116,43:39,44:h,45:40,47:41,60:g,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E},t(A,[2,40]),t(A,[2,41]),t(A,[2,42]),t(Se,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Ce,81:we,116:Te,119:Ee},{75:[1,126],77:[1,127]},t(De,[2,83]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),t(A,[2,31]),t(A,[2,32]),{10:Oe,12:ke,14:Ae,27:je,28:128,32:Me,44:Ne,60:Pe,75:Fe,80:[1,130],81:[1,131],83:141,84:Ie,85:Le,86:Re,87:ze,88:Be,89:Ve,90:He,91:129,105:Ue,109:We,111:Ge,114:Ke,115:qe,116:Je},t(Ye,o,{5:154}),t(A,[2,37]),t(A,[2,38]),t(se,[2,48],{44:Xe}),t(se,[2,49],{18:156,10:k,40:Ze}),t(be,[2,44]),{44:h,47:158,60:g,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E},{102:[1,159],103:160,105:[1,161]},{44:h,47:162,60:g,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E},{44:h,47:163,60:g,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E},t(I,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},t(I,[2,115],{120:168,10:[1,167],14:le,44:ue,60:de,89:fe,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye}),t(I,[2,117],{10:[1,169]}),t(L,[2,183]),t(L,[2,170]),t(L,[2,171]),t(L,[2,172]),t(L,[2,173]),t(L,[2,174]),t(L,[2,175]),t(L,[2,176]),t(L,[2,177]),t(L,[2,178]),t(L,[2,179]),t(L,[2,180]),{44:h,47:170,60:g,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E},{30:171,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:179,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:181,50:[1,180],67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:182,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:183,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:184,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{109:[1,185]},{30:186,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:187,65:[1,188],67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:189,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:190,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:191,67:R,80:z,81:B,82:172,116:V,117:H,118:U},t(F,[2,182]),t(a,[2,20]),t(xe,[2,25]),t(se,[2,46],{39:192,18:193,10:k,40:ce}),t(Se,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{77:[1,197],79:198,116:Te,119:Ee},t(Qe,[2,79]),t(Qe,[2,81]),t(Qe,[2,82]),t(Qe,[2,168]),t(Qe,[2,169]),{76:199,79:121,80:Ce,81:we,116:Te,119:Ee},t(De,[2,84]),{8:j,9:M,10:Oe,11:N,12:ke,14:Ae,21:201,27:je,29:[1,200],32:Me,44:Ne,60:Pe,75:Fe,83:141,84:Ie,85:Le,86:Re,87:ze,88:Be,89:Ve,90:He,91:202,105:Ue,109:We,111:Ge,114:Ke,115:qe,116:Je},t(W,[2,101]),t(W,[2,103]),t(W,[2,104]),t(W,[2,157]),t(W,[2,158]),t(W,[2,159]),t(W,[2,160]),t(W,[2,161]),t(W,[2,162]),t(W,[2,163]),t(W,[2,164]),t(W,[2,165]),t(W,[2,166]),t(W,[2,167]),t(W,[2,90]),t(W,[2,91]),t(W,[2,92]),t(W,[2,93]),t(W,[2,94]),t(W,[2,95]),t(W,[2,96]),t(W,[2,97]),t(W,[2,98]),t(W,[2,99]),t(W,[2,100]),{6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,203],33:24,34:f,36:p,38:m,42:28,43:39,44:h,45:40,47:41,60:g,84:ee,85:te,86:ne,87:re,88:_,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E,121:D,122:O,123:ie,124:ae,125:oe},{10:k,18:204},{44:[1,205]},t(be,[2,43]),{10:[1,206],44:h,60:g,89:v,102:y,105:b,106:x,109:S,111:C,113:113,114:w,115:T,116:E},{10:[1,207]},{10:[1,208],106:[1,209]},t($e,[2,128]),{10:[1,210],44:h,60:g,89:v,102:y,105:b,106:x,109:S,111:C,113:113,114:w,115:T,116:E},{10:[1,211],44:h,60:g,89:v,102:y,105:b,106:x,109:S,111:C,113:113,114:w,115:T,116:E},{80:[1,212]},t(I,[2,109],{10:[1,213]}),t(I,[2,111],{10:[1,214]}),{80:[1,215]},t(L,[2,184]),{80:[1,216],98:[1,217]},t(be,[2,55],{113:113,44:h,60:g,89:v,102:y,105:b,106:x,109:S,111:C,114:w,115:T,116:E}),{31:[1,218],67:R,82:219,116:V,117:H,118:U},t(et,[2,86]),t(et,[2,88]),t(et,[2,89]),t(et,[2,153]),t(et,[2,154]),t(et,[2,155]),t(et,[2,156]),{49:[1,220],67:R,82:219,116:V,117:H,118:U},{30:221,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{51:[1,222],67:R,82:219,116:V,117:H,118:U},{53:[1,223],67:R,82:219,116:V,117:H,118:U},{55:[1,224],67:R,82:219,116:V,117:H,118:U},{57:[1,225],67:R,82:219,116:V,117:H,118:U},{60:[1,226]},{64:[1,227],67:R,82:219,116:V,117:H,118:U},{66:[1,228],67:R,82:219,116:V,117:H,118:U},{30:229,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{31:[1,230],67:R,82:219,116:V,117:H,118:U},{67:R,69:[1,231],71:[1,232],82:219,116:V,117:H,118:U},{67:R,69:[1,234],71:[1,233],82:219,116:V,117:H,118:U},t(se,[2,45],{18:156,10:k,40:Ze}),t(se,[2,47],{44:Xe}),t(Se,[2,75]),t(Se,[2,74]),{62:[1,235],67:R,82:219,116:V,117:H,118:U},t(Se,[2,77]),t(Qe,[2,80]),{77:[1,236],79:198,116:Te,119:Ee},{30:237,67:R,80:z,81:B,82:172,116:V,117:H,118:U},t(Ye,o,{5:238}),t(W,[2,102]),t(A,[2,35]),{43:239,44:h,45:40,47:41,60:g,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E},{10:k,18:240},{10:G,60:K,84:q,92:241,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{10:G,60:K,84:q,92:252,104:[1,253],105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{10:G,60:K,84:q,92:254,104:[1,255],105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{105:[1,256]},{10:G,60:K,84:q,92:257,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{44:h,47:258,60:g,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E},t(I,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},t(I,[2,116]),t(I,[2,118],{10:[1,262]}),t(I,[2,119]),t(P,[2,56]),t(et,[2,87]),t(P,[2,57]),{51:[1,263],67:R,82:219,116:V,117:H,118:U},t(P,[2,64]),t(P,[2,59]),t(P,[2,60]),t(P,[2,61]),{109:[1,264]},t(P,[2,63]),t(P,[2,65]),{66:[1,265],67:R,82:219,116:V,117:H,118:U},t(P,[2,67]),t(P,[2,68]),t(P,[2,70]),t(P,[2,69]),t(P,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(Se,[2,78]),{31:[1,266],67:R,82:219,116:V,117:H,118:U},{6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,267],33:24,34:f,36:p,38:m,42:28,43:39,44:h,45:40,47:41,60:g,84:ee,85:te,86:ne,87:re,88:_,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E,121:D,122:O,123:ie,124:ae,125:oe},t(be,[2,53]),{43:268,44:h,45:40,47:41,60:g,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E},t(I,[2,121],{106:tt}),t(nt,[2,130],{108:270,10:G,60:K,84:q,105:J,109:Y,110:X,111:Z,112:Q}),t($,[2,132]),t($,[2,134]),t($,[2,135]),t($,[2,136]),t($,[2,137]),t($,[2,138]),t($,[2,139]),t($,[2,140]),t($,[2,141]),t(I,[2,122],{106:tt}),{10:[1,271]},t(I,[2,123],{106:tt}),{10:[1,272]},t($e,[2,129]),t(I,[2,105],{106:tt}),t(I,[2,106],{113:113,44:h,60:g,89:v,102:y,105:b,106:x,109:S,111:C,114:w,115:T,116:E}),t(I,[2,110]),t(I,[2,112],{10:[1,273]}),t(I,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:j,9:M,11:N,21:278},t(A,[2,34]),t(be,[2,52]),{10:G,60:K,84:q,105:J,107:279,108:243,109:Y,110:X,111:Z,112:Q},t($,[2,133]),{14:le,44:ue,60:de,89:fe,101:280,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye,120:88},{14:le,44:ue,60:de,89:fe,101:281,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye,120:88},{98:[1,282]},t(I,[2,120]),t(P,[2,58]),{30:283,67:R,80:z,81:B,82:172,116:V,117:H,118:U},t(P,[2,66]),t(Ye,o,{5:284}),t(nt,[2,131],{108:270,10:G,60:K,84:q,105:J,109:Y,110:X,111:Z,112:Q}),t(I,[2,126],{120:168,10:[1,285],14:le,44:ue,60:de,89:fe,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye}),t(I,[2,127],{120:168,10:[1,286],14:le,44:ue,60:de,89:fe,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye}),t(I,[2,114]),{31:[1,287],67:R,82:219,116:V,117:H,118:U},{6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,288],33:24,34:f,36:p,38:m,42:28,43:39,44:h,45:40,47:41,60:g,84:ee,85:te,86:ne,87:re,88:_,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E,121:D,122:O,123:ie,124:ae,125:oe},{10:G,60:K,84:q,92:289,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{10:G,60:K,84:q,92:290,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},t(P,[2,62]),t(A,[2,33]),t(I,[2,124],{106:tt}),t(I,[2,125],{106:tt})],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var ee in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ee)&&(g.yy[ee]=this.yy[ee]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var te=h.yylloc;o.push(te);var ne=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function re(e){r.length-=2*e,a.length-=e,o.length-=e}e(re,`popStack`);function _(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(_,`lex`);for(var v,y,b,x,S,C={},w,T,E,D;;){if(b=r[r.length-1],this.defaultActions[b]?x=this.defaultActions[b]:(v??=_(),x=s[b]&&s[b][v]),x===void 0||!x.length||!x[0]){var O=``;for(w in D=[],s[b])this.terminals_[w]&&w>f&&D.push(`'`+this.terminals_[w]+`'`);O=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+D.join(`, `)+`, got '`+(this.terminals_[v]||v)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(v==p?`end of input`:`'`+(this.terminals_[v]||v)+`'`),this.parseError(O,{text:h.match,token:this.terminals_[v]||v,line:h.yylineno,loc:te,expected:D})}if(x[0]instanceof Array&&x.length>1)throw Error(`Parse Error: multiple actions possible at state: `+b+`, token: `+v);switch(x[0]){case 1:r.push(v),a.push(h.yytext),o.push(h.yylloc),r.push(x[1]),v=null,y?(v=y,y=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,te=h.yylloc,d>0&&d--);break;case 2:if(T=this.productions_[x[1]][1],C.$=a[a.length-T],C._$={first_line:o[o.length-(T||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(T||1)].first_column,last_column:o[o.length-1].last_column},ne&&(C._$.range=[o[o.length-(T||1)].range[0],o[o.length-1].range[1]]),S=this.performAction.apply(C,[c,u,l,g.yy,x[1],a,o].concat(m)),S!==void 0)return S;T&&(r=r.slice(0,-1*T*2),a=a.slice(0,-1*T),o=o.slice(0,-1*T)),r.push(this.productions_[x[1]][0]),a.push(C.$),o.push(C._$),E=s[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},`parse`)};rt.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:e(function(e,t,n,r){switch(n){case 0:return this.begin(`acc_title`),34;case 1:return this.popState(),`acc_title_value`;case 2:return this.begin(`acc_descr`),36;case 3:return this.popState(),`acc_descr_value`;case 4:this.begin(`acc_descr_multiline`);break;case 5:this.popState();break;case 6:return`acc_descr_multiline_value`;case 7:return this.pushState(`shapeData`),t.yytext=``,40;case 8:return this.pushState(`shapeDataStr`),40;case 9:return this.popState(),40;case 10:return t.yytext=t.yytext.replace(/\n\s*/g,`
    `),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin(`callbackname`);break;case 14:this.popState();break;case 15:this.popState(),this.begin(`callbackargs`);break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return`MD_STR`;case 20:this.popState();break;case 21:this.begin(`md_string`);break;case 22:return`STR`;case 23:this.popState();break;case 24:this.pushState(`string`);break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin(`click`);break;case 33:this.popState();break;case 34:return 88;case 35:return e.lex.firstGraph()&&this.begin(`dir`),12;case 36:return e.lex.firstGraph()&&this.begin(`dir`),12;case 37:return e.lex.firstGraph()&&this.begin(`dir`),12;case 38:return e.lex.firstGraph()&&this.begin(`dir`),12;case 39:return 27;case 40:return 32;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return 98;case 45:return this.popState(),13;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return this.popState(),14;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 124;case 60:return 125;case 61:return 78;case 62:return 105;case 63:return 111;case 64:return 46;case 65:return 60;case 66:return 44;case 67:return 8;case 68:return 106;case 69:return 115;case 70:return this.popState(),77;case 71:return this.pushState(`edgeText`),75;case 72:return 119;case 73:return this.popState(),77;case 74:return this.pushState(`thickEdgeText`),75;case 75:return 119;case 76:return this.popState(),77;case 77:return this.pushState(`dottedEdgeText`),75;case 78:return 119;case 79:return 77;case 80:return this.popState(),53;case 81:return`TEXT`;case 82:return this.pushState(`ellipseText`),52;case 83:return this.popState(),55;case 84:return this.pushState(`text`),54;case 85:return this.popState(),57;case 86:return this.pushState(`text`),56;case 87:return 58;case 88:return this.pushState(`text`),67;case 89:return this.popState(),64;case 90:return this.pushState(`text`),63;case 91:return this.popState(),49;case 92:return this.pushState(`text`),48;case 93:return this.popState(),69;case 94:return this.popState(),71;case 95:return 117;case 96:return this.pushState(`trapText`),68;case 97:return this.pushState(`trapText`),70;case 98:return 118;case 99:return 67;case 100:return 90;case 101:return`SEP`;case 102:return 89;case 103:return 115;case 104:return 111;case 105:return 44;case 106:return 109;case 107:return 114;case 108:return 116;case 109:return this.popState(),62;case 110:return this.pushState(`text`),62;case 111:return this.popState(),51;case 112:return this.pushState(`text`),50;case 113:return this.popState(),31;case 114:return this.pushState(`text`),29;case 115:return this.popState(),66;case 116:return this.pushState(`text`),65;case 117:return`TEXT`;case 118:return`QUOTE`;case 119:return 9;case 120:return 10;case 121:return 11}},`anonymous`),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:swimlane-beta\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}}})();function it(){this.yy={}}return e(it,`Parser`),it.prototype=rt,rt.Parser=it,new it})();O.parser=O;var ie=O,ae=Object.assign({},ie);ae.parse=e=>{let t=e.replace(/}\s*\n/g,`} +`);return ie.parse(t)};var oe=ae,k=e((e,t)=>{let n=d,r=n(e,`r`),i=n(e,`g`),o=n(e,`b`);return a(r,i,o,t)},`fade`),A=e(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span { + color: ${e.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .label text,span { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: ${e.strokeWidth??1}px; + } + .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { + text-anchor: middle; + } + + .node .katex path { + fill: #000; + stroke: #000; + stroke-width: 1px; + } + + .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + + .root .anchor path { + fill: ${e.lineColor} !important; + stroke-width: 0; + stroke: ${e.lineColor}; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: ${e.strokeWidth??2}px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${k(e.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${e.clusterBkg}; + stroke: ${e.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } + + rect.text { + fill: none; + stroke-width: 0; + } + + .icon-shape, .image-shape { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + padding: 2px; + } + .label rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + ${x()} +`,`getStyles`),j=e(({defaultLayout:t,styles:n=A}={})=>({parser:oe,get db(){return new E},renderer:D,styles:n,init:e(e=>{e.flowchart||={};let n=m().layout??t??e.layout;n&&u({layout:n}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,u({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},`init`)}),`createFlowDiagram`),M=j();export{M as n,A as r,j as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-NEZ6ONQZ-CuHA0Ldj.js b/lecture-01/assets/chunk-NEZ6ONQZ-CuHA0Ldj.js new file mode 100644 index 0000000000000000000000000000000000000000..7ea98b173a3c38baad5bf790e5543093c0b42c05 --- /dev/null +++ b/lecture-01/assets/chunk-NEZ6ONQZ-CuHA0Ldj.js @@ -0,0 +1,127 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/katex-FWVWKTT3-_q1X5PuC.js","assets/chunk-PTVI3W5X-DVfdoxm6.js"])))=>i.map(i=>d[i]); +import{t as e}from"./preload-helper-DpA04vUI.js";import{n as t,r as n}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{L as r,T as i}from"./chunk-FO5PYUIK-CPzj2963.js";var a=n((e,t,{depth:n=2}={})=>{let r={depth:n};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(t=>a(e,t,r)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(t=>{e.includes(t)||e.push(t)}),e;if(e==null||n<=0)return typeof e==`object`&&e&&typeof t==`object`?Object.assign(e,t):t;if(t!=null&&typeof e==`object`&&typeof t==`object`){let r=e;Object.entries(t).forEach(([t,i])=>{if(typeof i==`object`){if(i===null)return;Object.hasOwn(e,t)||Object.defineProperty(e,t,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),r[t]===void 0&&(r[t]=Array.isArray(i)?[]:{}),typeof r[t]==`object`&&(r[t]=a(r[t],i,{depth:n-1}))}else typeof r[t]!=`object`&&(Object.hasOwn(e,t)?r[t]=i:Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0}))})}return e},`assignWithDepth`),o=a,s={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:n(e=>e>=255?255:e<0?0:e,`r`),g:n(e=>e>=255?255:e<0?0:e,`g`),b:n(e=>e>=255?255:e<0?0:e,`b`),h:n(e=>e%360,`h`),s:n(e=>e>=100?100:e<0?0:e,`s`),l:n(e=>e>=100?100:e<0?0:e,`l`),a:n(e=>e>=1?1:e<0?0:e,`a`)},toLinear:n(e=>{let t=e/255;return e>.03928?((t+.055)/1.055)**2.4:t/12.92},`toLinear`),hue2rgb:n((e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),`hue2rgb`),hsl2rgb:n(({h:e,s:t,l:n},r)=>{if(!t)return n*2.55;e/=360,t/=100,n/=100;let i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;switch(r){case`r`:return s.hue2rgb(a,i,e+1/3)*255;case`g`:return s.hue2rgb(a,i,e)*255;case`b`:return s.hue2rgb(a,i,e-1/3)*255}},`hsl2rgb`),rgb2hsl:n(({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;let i=Math.max(e,t,n),a=Math.min(e,t,n),o=(i+a)/2;if(r===`l`)return o*100;if(i===a)return 0;let s=i-a,c=o>.5?s/(2-i-a):s/(i+a);if(r===`s`)return c*100;switch(i){case e:return((t-n)/s+(tt>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),`clamp`),round:n(e=>Math.round(e*1e10)/1e10,`round`)},unit:{dec2hex:n(e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`},`dec2hex`)}},l={};for(let e=0;e<=255;e++)l[e]=c.unit.dec2hex(e);var u={ALL:0,RGB:1,HSL:2},d=class{static{n(this,`Type`)}constructor(){this.type=u.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw Error(`Cannot change both RGB and HSL channels at the same time`);this.type=e}reset(){this.type=u.ALL}is(e){return this.type===e}},f=new class{static{n(this,`Channels`)}constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new d}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=u.ALL,this}_ensureHSL(){let e=this.data,{h:t,s:n,l:r}=e;t===void 0&&(e.h=c.channel.rgb2hsl(e,`h`)),n===void 0&&(e.s=c.channel.rgb2hsl(e,`s`)),r===void 0&&(e.l=c.channel.rgb2hsl(e,`l`))}_ensureRGB(){let e=this.data,{r:t,g:n,b:r}=e;t===void 0&&(e.r=c.channel.hsl2rgb(e,`r`)),n===void 0&&(e.g=c.channel.hsl2rgb(e,`g`)),r===void 0&&(e.b=c.channel.hsl2rgb(e,`b`))}get r(){let e=this.data,t=e.r;return!this.type.is(u.HSL)&&t!==void 0?t:(this._ensureHSL(),c.channel.hsl2rgb(e,`r`))}get g(){let e=this.data,t=e.g;return!this.type.is(u.HSL)&&t!==void 0?t:(this._ensureHSL(),c.channel.hsl2rgb(e,`g`))}get b(){let e=this.data,t=e.b;return!this.type.is(u.HSL)&&t!==void 0?t:(this._ensureHSL(),c.channel.hsl2rgb(e,`b`))}get h(){let e=this.data,t=e.h;return!this.type.is(u.RGB)&&t!==void 0?t:(this._ensureRGB(),c.channel.rgb2hsl(e,`h`))}get s(){let e=this.data,t=e.s;return!this.type.is(u.RGB)&&t!==void 0?t:(this._ensureRGB(),c.channel.rgb2hsl(e,`s`))}get l(){let e=this.data,t=e.l;return!this.type.is(u.RGB)&&t!==void 0?t:(this._ensureRGB(),c.channel.rgb2hsl(e,`l`))}get a(){return this.data.a}set r(e){this.type.set(u.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(u.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(u.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(u.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(u.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(u.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},`transparent`),ee={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:n(e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(ee.re);if(!t)return;let n=t[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,l=a?0:-1,u=o?255:15;return f.set({r:(r>>c*(l+3)&u)*s,g:(r>>c*(l+2)&u)*s,b:(r>>c*(l+1)&u)*s,a:a?(r&u)*s/255:1},e)},`parse`),stringify:n(e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`#${l[Math.round(t)]}${l[Math.round(n)]}${l[Math.round(r)]}${l[Math.round(i*255)]}`:`#${l[Math.round(t)]}${l[Math.round(n)]}${l[Math.round(r)]}`},`stringify`)},p=ee,m={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:n(e=>{let t=e.match(m.hueRe);if(t){let[,e,n]=t;switch(n){case`grad`:return c.channel.clamp.h(parseFloat(e)*.9);case`rad`:return c.channel.clamp.h(parseFloat(e)*180/Math.PI);case`turn`:return c.channel.clamp.h(parseFloat(e)*360)}}return c.channel.clamp.h(parseFloat(e))},`_hue2deg`),parse:n(e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let n=e.match(m.re);if(!n)return;let[,r,i,a,o,s]=n;return f.set({h:m._hue2deg(r),s:c.channel.clamp.s(parseFloat(i)),l:c.channel.clamp.l(parseFloat(a)),a:o?c.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},`parse`),stringify:n(e=>{let{h:t,s:n,l:r,a:i}=e;return i<1?`hsla(${c.lang.round(t)}, ${c.lang.round(n)}%, ${c.lang.round(r)}%, ${i})`:`hsl(${c.lang.round(t)}, ${c.lang.round(n)}%, ${c.lang.round(r)}%)`},`stringify`)},te=m,ne={colors:{aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyanaqua:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,transparent:`#00000000`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},parse:n(e=>{e=e.toLowerCase();let t=ne.colors[e];if(t)return p.parse(t)},`parse`),stringify:n(e=>{let t=p.stringify(e);for(let e in ne.colors)if(ne.colors[e]===t)return e},`stringify`)},re=ne,ie={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:n(e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let n=e.match(ie.re);if(!n)return;let[,r,i,a,o,s,l,u,d]=n;return f.set({r:c.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:c.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:c.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:u?c.channel.clamp.a(d?parseFloat(u)/100:parseFloat(u)):1},e)},`parse`),stringify:n(e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`rgba(${c.lang.round(t)}, ${c.lang.round(n)}, ${c.lang.round(r)}, ${c.lang.round(i)})`:`rgb(${c.lang.round(t)}, ${c.lang.round(n)}, ${c.lang.round(r)})`},`stringify`)},h=ie,g={format:{keyword:re,hex:p,rgb:h,rgba:h,hsl:te,hsla:te},parse:n(e=>{if(typeof e!=`string`)return e;let t=p.parse(e)||h.parse(e)||te.parse(e)||re.parse(e);if(t)return t;throw Error(`Unsupported color format: "${e}"`)},`parse`),stringify:n(e=>!e.changed&&e.color?e.color:e.type.is(u.HSL)||e.data.r===void 0?te.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?h.stringify(e):p.stringify(e),`stringify`)},ae=n((e,t)=>{let n=g.parse(e);for(let e in t)n[e]=c.channel.clamp[e](t[e]);return g.stringify(n)},`change`),_=n((e,t,n=0,r=1)=>{if(typeof e!=`number`)return ae(e,{a:t});let i=f.set({r:c.channel.clamp.r(e),g:c.channel.clamp.g(t),b:c.channel.clamp.b(n),a:c.channel.clamp.a(r)});return g.stringify(i)},`rgba`),oe=n((e,t)=>c.lang.round(g.parse(e)[t]),`channel`),se=n(e=>{let{r:t,g:n,b:r}=g.parse(e),i=.2126*c.channel.toLinear(t)+.7152*c.channel.toLinear(n)+.0722*c.channel.toLinear(r);return c.lang.round(i)},`luminance`),ce=n(e=>se(e)>=.5,`isLight`),v=n(e=>!ce(e),`isDark`),y=n((e,t,n)=>{let r=g.parse(e),i=r[t],a=c.channel.clamp[t](i+n);return i!==a&&(r[t]=a),g.stringify(r)},`adjustChannel`),b=n((e,t)=>y(e,`l`,t),`lighten`),x=n((e,t)=>y(e,`l`,-t),`darken`),le=n((e,t)=>y(e,`a`,-t),`transparentize`),S=n((e,t)=>{let n=g.parse(e),r={};for(let e in t)t[e]&&(r[e]=n[e]+t[e]);return ae(e,r)},`adjust`),ue=n((e,t,n=50)=>{let{r,g:i,b:a,a:o}=g.parse(e),{r:s,g:c,b:l,a:u}=g.parse(t),d=n/100,f=d*2-1,ee=o-u,p=((f*ee===-1?f:(f+ee)/(1+f*ee))+1)/2,m=1-p;return _(r*p+s*m,i*p+c*m,a*p+l*m,o*d+u*(1-d))},`mix`),C=n((e,t=100)=>{let n=g.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,ue(n,e,t)},`invert`),w=`#ffffff`,T=`#f2f2f2`,E=n((e,t)=>t?S(e,{s:-40,l:10}):S(e,{s:-40,l:-10}),`mkBorder`),D=class{static{n(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#fff4dd`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.useGradient=!0,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||E(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||E(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||E(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||E(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||b(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||`navy`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||x(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||x(this.mainBkg,10)):(this.rowOdd=this.rowOdd||b(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||b(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},de=n(e=>{let t=new D;return t.calculate(e),t},`getThemeVariables`),O=class{static{n(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=b(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=E(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=E(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.lineColor=C(this.background),this.textColor=C(this.background),this.mainBkg=`#1f2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=b(C(`#323D47`),10),this.lineColor=`calculated`,this.border1=`#ccc`,this.border2=_(255,255,255,.25),this.arrowheadColor=`calculated`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#F9FFFE`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`calculated`,this.activationBkgColor=`calculated`,this.sequenceNumberColor=`black`,this.clusterBkg=`#302F3D`,this.sectionBkgColor=x(`#EAE8D9`,30),this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`#EAE8D9`,this.excludeBkgColor=x(this.sectionBkgColor,10),this.taskBorderColor=_(255,255,255,70),this.taskBkgColor=`calculated`,this.taskTextColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=_(255,255,255,50),this.activeTaskBkgColor=`#81B1DB`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#E83737`,this.critBkgColor=`#E83737`,this.taskTextDarkColor=`calculated`,this.todayLineColor=`#DB5757`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=this.rowOdd||b(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||x(this.mainBkg,10),this.labelColor=`calculated`,this.errorBkgColor=`#a44141`,this.errorTextColor=`#ddd`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`}updateColors(){this.secondBkg=b(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=b(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=b(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=C(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#555`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=`#f4f4f4`,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||`#0b0000`,this.cScale2=this.cScale2||`#4d1037`,this.cScale3=this.cScale3||`#3f5258`,this.cScale4=this.cScale4||`#4f2f1b`,this.cScale5=this.cScale5||`#6e0a0a`,this.cScale6=this.cScale6||`#3b0048`,this.cScale7=this.cScale7||`#995a01`,this.cScale8=this.cScale8||`#154706`,this.cScale9=this.cScale9||`#161722`,this.cScale10=this.cScale10||`#00296f`,this.cScale11=this.cScale11||`#01629c`,this.cScale12=this.cScale12||`#010029`,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330});for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},fe=n(e=>{let t=new O;return t.calculate(e),t},`getThemeVariables`),k=class{static{n(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#ECECFF`,this.secondaryColor=S(this.primaryColor,{h:120}),this.secondaryColor=`#ffffde`,this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=E(this.primaryColor,this.darkMode),this.secondaryBorderColor=E(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=E(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.lineColor=C(this.background),this.textColor=C(this.background),this.background=`white`,this.mainBkg=`#ECECFF`,this.secondBkg=`#ffffde`,this.lineColor=`#333333`,this.border1=`#9370DB`,this.primaryBorderColor=E(this.primaryColor,this.darkMode),this.border2=`#aaaa33`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`rgba(232,232,232, 0.8)`,this.textColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.clusterBkg=`#FBFBFF`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor=`calculated`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBorderColor=`calculated`,this.critBkgColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.sectionBkgColor=_(102,102,255,.49),this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#fff400`,this.taskBorderColor=`#534fbc`,this.taskBkgColor=`#8a90dd`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`#534fbc`,this.activeTaskBkgColor=`#bfc7ff`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`navy`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=`calculated`,this.rowEven=`calculated`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))`,this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||x(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||x(this.tertiaryColor,40);for(let e=0;e{this[e]===`calculated`&&(this[e]=void 0)}),typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},pe=n(e=>{let t=new k;return t.calculate(e),t},`getThemeVariables`),me=class{static{n(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#cde498`,this.secondaryColor=`#cdffb2`,this.background=`white`,this.mainBkg=`#cde498`,this.secondBkg=`#cdffb2`,this.lineColor=`green`,this.border1=`#13540c`,this.border2=`#6eaa49`,this.arrowheadColor=`green`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.tertiaryColor=b(`#cde498`,10),this.primaryBorderColor=E(this.primaryColor,this.darkMode),this.secondaryBorderColor=E(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=E(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.primaryColor),this.lineColor=C(this.background),this.textColor=C(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#333`,this.edgeLabelBackground=`#e8e8e8`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`#333`,this.signalTextColor=`#333`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`#326932`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`#6eaa49`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#6eaa49`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`#487e3a`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))`}updateColors(){this.actorBorder=x(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||x(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||x(this.tertiaryColor,40);for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},A=n(e=>{let t=new me;return t.calculate(e),t},`getThemeVariables`),he=class{static{n(this,`Theme`)}constructor(){this.primaryColor=`#eee`,this.contrast=`#707070`,this.secondaryColor=b(this.contrast,55),this.background=`#ffffff`,this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=E(this.primaryColor,this.darkMode),this.secondaryBorderColor=E(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=E(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.lineColor=C(this.background),this.textColor=C(this.background),this.mainBkg=`#eee`,this.secondBkg=`calculated`,this.lineColor=`#666`,this.border1=`#999`,this.border2=`calculated`,this.note=`#ffa`,this.text=`#333`,this.critical=`#d42`,this.done=`#bbb`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`white`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=this.actorBorder,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`calculated`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBkgColor=`calculated`,this.critBorderColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.rowOdd=this.rowOdd||b(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||`#f4f4f4`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){this.secondBkg=b(this.contrast,55),this.border2=this.contrast,this.actorBorder=b(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor=`#999`,this.noteBkgColor=`#666`,this.noteTextColor=`#fff`,this.cScale0=this.cScale0||`#555`,this.cScale1=this.cScale1||`#F4F4F4`,this.cScale2=this.cScale2||`#555`,this.cScale3=this.cScale3||`#BBB`,this.cScale4=this.cScale4||`#777`,this.cScale5=this.cScale5||`#999`,this.cScale6=this.cScale6||`#DDD`,this.cScale7=this.cScale7||`#FFF`,this.cScale8=this.cScale8||`#DDD`,this.cScale9=this.cScale9||`#BBB`,this.cScale10=this.cScale10||`#999`,this.cScale11=this.cScale11||`#777`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},ge=n(e=>{let t=new he;return t.calculate(e),t},`getThemeVariables`),_e=class{static{n(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=E(this.primaryColor,this.darkMode),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#000000`,this.stateBorder=`#000000`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));`,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||E(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||E(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||E(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||E(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=S(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||b(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||S(e,{h:30}),this.cScale4=this.cScale4||S(e,{h:60}),this.cScale5=this.cScale5||S(e,{h:90}),this.cScale6=this.cScale6||S(e,{h:120}),this.cScale7=this.cScale7||S(e,{h:150}),this.cScale8=this.cScale8||S(e,{h:210,l:150}),this.cScale9=this.cScale9||S(e,{h:270}),this.cScale10=this.cScale10||S(e,{h:300}),this.cScale11=this.cScale11||S(e,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},ve=n(e=>{let t=new _e;return t.calculate(e),t},`getThemeVariables`),j=class{static{n(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=b(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=E(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=E(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.mainBkg=`#2a2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=b(C(`#323D47`),10),this.border1=`#ccc`,this.border2=_(255,255,255,.25),this.arrowheadColor=C(this.background),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||E(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||E(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||E(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||E(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||b(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},ye=n(e=>{let t=new j;return t.calculate(e),t},`getThemeVariables`),M=class{static{n(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=E(`#28253D`,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.clusterBkg=`#F9F9FB`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||E(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||E(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||E(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||E(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#FEF9C3`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=S(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||b(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground=`#F9F9FB`,this.altBackground=`#F9F9FB`,this.stateEdgeLabelBackground=`#FFFFFF`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},be=n(e=>{let t=new M;return t.calculate(e),t},`getThemeVariables`),xe=class{static{n(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=b(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=E(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=E(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=b(C(`#323D47`),10),this.border1=`#ccc`,this.border2=_(255,255,255,.25),this.arrowheadColor=C(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.filterColor=`#FFFFFF`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||E(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||E(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||E(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||E(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||b(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground=`#16141F`,this.altBackground=`#16141F`,this.compositeTitleBackground=`#16141F`,this.stateEdgeLabelBackground=`#16141F`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Se=n(e=>{let t=new xe;return t.calculate(e),t},`getThemeVariables`),Ce=class{static{n(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=E(this.primaryColor,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[`#FDF4FF`,`#F0FDFA`,`#FFF7ED`,`#ECFEFF`,`#F0FDF4`,`#F5F3FF`,`#FEF2F2`,`#FEFCE8`,`#EEF2FF`,`#F7FEE7`,`#F0F9FF`,`#FFF1F2`],this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||E(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||E(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||E(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||E(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=S(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||b(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},we=n(e=>{let t=new Ce;return t.calculate(e),t},`getThemeVariables`),Te=class{static{n(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=b(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=E(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=E(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=b(C(`#323D47`),10),this.border1=`#ccc`,this.border2=_(255,255,255,.25),this.arrowheadColor=C(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[],this.filterColor=`#FFFFFF`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||E(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||E(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||E(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||E(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor=`#FFFFFF`,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||b(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},N={base:{getThemeVariables:de},dark:{getThemeVariables:fe},default:{getThemeVariables:pe},forest:{getThemeVariables:A},neutral:{getThemeVariables:ge},neo:{getThemeVariables:ve},"neo-dark":{getThemeVariables:ye},redux:{getThemeVariables:be},"redux-dark":{getThemeVariables:Se},"redux-color":{getThemeVariables:we},"redux-dark-color":{getThemeVariables:n(e=>{let t=new Te;return t.calculate(e),t},`getThemeVariables`)}},P={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:`basis`,padding:15,defaultRenderer:`dagre-wrapper`,wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:`arc`,ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:`"Open Sans", sans-serif`,actorFontWeight:400,noteFontSize:14,noteFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,noteFontWeight:400,noteAlign:`center`,messageFontSize:16,messageFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:`%Y-%m-%d`,topAxis:!1,displayMode:``,weekday:`sunday`},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],titleColor:``,titleFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,titleFontSize:`4ex`},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:`dagre-wrapper`,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:`20`,compositTitleSize:35,radius:5,defaultRenderer:`dagre-wrapper`},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:`TB`,minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:`gray`,fill:`honeydew`,fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:`right`,highlightSlice:``},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:`top`,yAxisPosition:`left`,quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:`vertical`,plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:`#f9f9f9`,text_color:`#333`,rect_border_size:`0.5px`,rect_border_color:`#bbb`,rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:`cose-bilkent`},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:``},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:`main`,mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:`"Open Sans", sans-serif`,personFontWeight:`normal`,external_personFontSize:14,external_personFontFamily:`"Open Sans", sans-serif`,external_personFontWeight:`normal`,systemFontSize:14,systemFontFamily:`"Open Sans", sans-serif`,systemFontWeight:`normal`,external_systemFontSize:14,external_systemFontFamily:`"Open Sans", sans-serif`,external_systemFontWeight:`normal`,system_dbFontSize:14,system_dbFontFamily:`"Open Sans", sans-serif`,system_dbFontWeight:`normal`,external_system_dbFontSize:14,external_system_dbFontFamily:`"Open Sans", sans-serif`,external_system_dbFontWeight:`normal`,system_queueFontSize:14,system_queueFontFamily:`"Open Sans", sans-serif`,system_queueFontWeight:`normal`,external_system_queueFontSize:14,external_system_queueFontFamily:`"Open Sans", sans-serif`,external_system_queueFontWeight:`normal`,boundaryFontSize:14,boundaryFontFamily:`"Open Sans", sans-serif`,boundaryFontWeight:`normal`,messageFontSize:12,messageFontFamily:`"Open Sans", sans-serif`,messageFontWeight:`normal`,containerFontSize:14,containerFontFamily:`"Open Sans", sans-serif`,containerFontWeight:`normal`,external_containerFontSize:14,external_containerFontFamily:`"Open Sans", sans-serif`,external_containerFontWeight:`normal`,container_dbFontSize:14,container_dbFontFamily:`"Open Sans", sans-serif`,container_dbFontWeight:`normal`,external_container_dbFontSize:14,external_container_dbFontFamily:`"Open Sans", sans-serif`,external_container_dbFontWeight:`normal`,container_queueFontSize:14,container_queueFontFamily:`"Open Sans", sans-serif`,container_queueFontWeight:`normal`,external_container_queueFontSize:14,external_container_queueFontFamily:`"Open Sans", sans-serif`,external_container_queueFontWeight:`normal`,componentFontSize:14,componentFontFamily:`"Open Sans", sans-serif`,componentFontWeight:`normal`,external_componentFontSize:14,external_componentFontFamily:`"Open Sans", sans-serif`,external_componentFontWeight:`normal`,component_dbFontSize:14,component_dbFontFamily:`"Open Sans", sans-serif`,component_dbFontWeight:`normal`,external_component_dbFontSize:14,external_component_dbFontFamily:`"Open Sans", sans-serif`,external_component_dbFontWeight:`normal`,component_queueFontSize:14,component_queueFontFamily:`"Open Sans", sans-serif`,component_queueFontWeight:`normal`,external_component_queueFontSize:14,external_component_queueFontFamily:`"Open Sans", sans-serif`,external_component_queueFontWeight:`normal`,wrap:!0,wrapPadding:10,person_bg_color:`#08427B`,person_border_color:`#073B6F`,external_person_bg_color:`#686868`,external_person_border_color:`#8A8A8A`,system_bg_color:`#1168BD`,system_border_color:`#3C7FC0`,system_db_bg_color:`#1168BD`,system_db_border_color:`#3C7FC0`,system_queue_bg_color:`#1168BD`,system_queue_border_color:`#3C7FC0`,external_system_bg_color:`#999999`,external_system_border_color:`#8A8A8A`,external_system_db_bg_color:`#999999`,external_system_db_border_color:`#8A8A8A`,external_system_queue_bg_color:`#999999`,external_system_queue_border_color:`#8A8A8A`,container_bg_color:`#438DD5`,container_border_color:`#3C7FC0`,container_db_bg_color:`#438DD5`,container_db_border_color:`#3C7FC0`,container_queue_bg_color:`#438DD5`,container_queue_border_color:`#3C7FC0`,external_container_bg_color:`#B3B3B3`,external_container_border_color:`#A6A6A6`,external_container_db_bg_color:`#B3B3B3`,external_container_db_border_color:`#A6A6A6`,external_container_queue_bg_color:`#B3B3B3`,external_container_queue_border_color:`#A6A6A6`,component_bg_color:`#85BBF0`,component_border_color:`#78A8D8`,component_db_bg_color:`#85BBF0`,component_db_border_color:`#78A8D8`,component_queue_bg_color:`#85BBF0`,component_queue_border_color:`#78A8D8`,external_component_bg_color:`#CCCCCC`,external_component_border_color:`#BFBFBF`,external_component_db_bg_color:`#CCCCCC`,external_component_db_border_color:`#BFBFBF`,external_component_queue_bg_color:`#CCCCCC`,external_component_queue_border_color:`#BFBFBF`},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:`gradient`,nodeAlignment:`justify`,showValues:!0,prefix:``,suffix:``,nodeWidth:10,nodePadding:12,labelStyle:`legacy`},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:``,filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:`default`,look:`classic`,handDrawnSeed:0,layout:`dagre`,maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:`"trebuchet ms", verdana, arial, sans-serif;`,logLevel:5,securityLevel:`strict`,startOnLoad:!0,arrowMarkerAbsolute:!1,secure:[`secure`,`securityLevel`,`startOnLoad`,`maxTextSize`,`suppressErrorRendering`,`maxEdges`],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Ee={...P,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:`BRANDES_KOEPF`,forceNodeModelOrder:!1,considerModelOrder:`NODES_AND_EDGES`},themeCSS:void 0,themeVariables:N.default.getThemeVariables(),sequence:{...P.sequence,messageFont:n(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`),noteFont:n(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},`noteFont`),actorFont:n(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},`actorFont`)},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...P.gantt,tickInterval:void 0,useWidth:void 0},c4:{...P.c4,useWidth:void 0,personFont:n(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},`personFont`),flowchart:{...P.flowchart,inheritDir:!1},external_personFont:n(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},`external_personFont`),systemFont:n(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},`systemFont`),external_systemFont:n(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},`external_systemFont`),system_dbFont:n(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},`system_dbFont`),external_system_dbFont:n(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},`external_system_dbFont`),system_queueFont:n(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},`system_queueFont`),external_system_queueFont:n(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},`external_system_queueFont`),containerFont:n(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},`containerFont`),external_containerFont:n(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},`external_containerFont`),container_dbFont:n(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},`container_dbFont`),external_container_dbFont:n(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},`external_container_dbFont`),container_queueFont:n(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},`container_queueFont`),external_container_queueFont:n(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},`external_container_queueFont`),componentFont:n(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},`componentFont`),external_componentFont:n(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},`external_componentFont`),component_dbFont:n(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},`component_dbFont`),external_component_dbFont:n(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},`external_component_dbFont`),component_queueFont:n(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},`component_queueFont`),external_component_queueFont:n(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},`external_component_queueFont`),boundaryFont:n(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},`boundaryFont`),messageFont:n(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`)},pie:{...P.pie,useWidth:984},xyChart:{...P.xyChart,useWidth:void 0},requirement:{...P.requirement,useWidth:void 0},packet:{...P.packet},eventmodeling:{...P.eventmodeling},treeView:{...P.treeView,useWidth:void 0},radar:{...P.radar},railroad:{...P.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...P.ishikawa},sankey:{...P.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:`,`},venn:{...P.venn},cynefin:{...P.cynefin}},F=n((e,t=``)=>Object.keys(e).reduce((n,r)=>Array.isArray(e[r])?n:typeof e[r]==`object`&&e[r]!==null?[...n,t+r,...F(e[r],``)]:[...n,t+r],[]),`keyify`),I=new Set(F(Ee,``)),De=Ee,Oe={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},ke=n((e,t)=>{for(let n of Object.keys(e)){let r=e[n];(n.startsWith(`__`)||n.includes(`proto`)||n.includes(`constr`)||typeof r!=`string`||!t.test(r))&&(i.debug(`sanitize deleting dictionary entry:`,n,r),delete e[n])}},`sanitizeDictionaryConfig`),Ae=n(e=>{if(i.debug(`sanitizeDirective called with`,e),!(typeof e!=`object`||!e)){if(Array.isArray(e)){e.forEach(e=>Ae(e));return}for(let t of Object.keys(e)){if(i.debug(`Checking key`,t),t.startsWith(`__`)||t.includes(`proto`)||t.includes(`constr`)||!I.has(t)||e[t]==null){i.debug(`sanitize deleting key: `,t),delete e[t];continue}if(typeof e[t]==`object`){let n=Oe[t];n?ke(e[t],n):(i.debug(`sanitizing object`,t),Ae(e[t]));continue}for(let n of[`themeCSS`,`fontFamily`,`altFontFamily`])t.includes(n)&&(i.debug(`sanitizing css option`,t),e[t]=je(e[t]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let n=e.themeVariables[t];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]=``)}i.debug(`After sanitization`,e)}},`sanitizeDirective`),je=n(e=>{let t=0,n=0;for(let r of e){if(t!(e===!1||[`false`,`null`,`0`].includes(String(e).trim().toLowerCase())),`evaluate`),R=o({},L),z,B=[],V=o({},L),Ne=n((e,t)=>{let n=o({},e),r={};for(let e of t)U(e),r=o(r,e);if(n=o(n,r),r.theme&&r.theme in N){let e=o(o({},z).themeVariables||{},r.themeVariables);n.theme&&n.theme in N&&(n.themeVariables=N[n.theme].getThemeVariables(e))}return V=n,We(V),V},`updateCurrentConfig`),Pe=n(e=>(R=o({},L),R=o(R,e),e.theme&&N[e.theme]&&(R.themeVariables=N[e.theme].getThemeVariables(e.themeVariables)),Ne(R,B),R),`setSiteConfig`),Fe=n(e=>{z=o({},e)},`saveConfigFromInitialize`),Ie=n(e=>(R=o(R,e),Ne(R,B),R),`updateSiteConfig`),Le=n(()=>o({},R),`getSiteConfig`),Re=n(e=>(Ne(V,[e]),H()),`setConfig`),H=n(()=>o({},V),`getConfig`),U=n(e=>{e&&([`secure`,...R.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(i.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith(`__`)&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]==`string`&&(e[t].includes(`<`)||e[t].includes(`>`)||e[t].includes(`url(data:`))&&delete e[t],typeof e[t]==`object`&&U(e[t])}))},`sanitize`),ze=n(e=>{Ae(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),B.push(e),Ne(R,B)},`addDirective`),Be=n((e=R)=>{B=[],Ne(e,B)},`reset`),Ve={LAZY_LOAD_DEPRECATED:`The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.`,FLOWCHART_HTML_LABELS_DEPRECATED:`flowchart.htmlLabels is deprecated. Please use global htmlLabels instead.`},He={},Ue=n(e=>{He[e]||(i.warn(Ve[e]),He[e]=!0)},`issueWarning`),We=n(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Ue(`LAZY_LOAD_DEPRECATED`)},`checkConfig`),W=n(()=>{let e={};z&&(e=o(e,z));for(let t of B)e=o(e,t);return e},`getUserDefinedConfig`),G=n(e=>(e.flowchart?.htmlLabels!=null&&Ue(`FLOWCHART_HTML_LABELS_DEPRECATED`),Me(e.htmlLabels??e.flowchart?.htmlLabels??!0)),`getEffectiveHtmlLabels`),Ge=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Ke=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,qe=/\s*%%.*\n/gm,Je=class extends Error{static{n(this,`UnknownDiagramError`)}constructor(e){super(e),this.name=`UnknownDiagramError`}},K={},Ye=n(function(e,t){e=e.replace(Ge,``).replace(Ke,``).replace(qe,` +`);for(let[n,{detector:r}]of Object.entries(K))if(r(e,t))return n;throw new Je(`No diagram type detected matching given configuration for text: ${e}`)},`detectType`),Xe=n((...e)=>{for(let{id:t,detector:n,loader:r}of e)Ze(t,n,r)},`registerLazyLoadedDiagrams`),Ze=n((e,t,n)=>{K[e]&&i.warn(`Detector with key ${e} already exists. Overwriting.`),K[e]={detector:t,loader:n},i.debug(`Detector with key ${e} added${n?` with loader`:``}`)},`addDetector`),Qe=n(e=>K[e].loader,`getDiagramLoader`),{entries:$e,setPrototypeOf:et,isFrozen:tt,getPrototypeOf:nt,getOwnPropertyDescriptor:rt}=Object,{freeze:q,seal:J,create:it}=Object,{apply:at,construct:ot}=typeof Reflect<`u`&&Reflect;q||=n(function(e){return e},`freeze`),J||=n(function(e){return e},`seal`),at||=n(function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},`apply`),ot||=n(function(e){return new e(...[...arguments].slice(1))},`construct`);var st=Z(Array.prototype.forEach),ct=Z(Array.prototype.lastIndexOf),lt=Z(Array.prototype.pop),ut=Z(Array.prototype.push),dt=Z(Array.prototype.splice),ft=Z(String.prototype.toLowerCase),pt=Z(String.prototype.toString),mt=Z(String.prototype.match),ht=Z(String.prototype.replace),gt=Z(String.prototype.indexOf),_t=Z(String.prototype.trim),Y=Z(Object.prototype.hasOwnProperty),X=Z(RegExp.prototype.test),vt=yt(TypeError);function Z(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return at(e,t,n)}}n(Z,`unapply`);function yt(e){return function(){return ot(e,[...arguments])}}n(yt,`unconstruct`);function Q(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ft;et&&et(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(tt(t)||(t[r]=e),i=e)}e[i]=!0}return e}n(Q,`addToSet`);function bt(e){for(let t=0;t/gm),Ft=J(/\$\{[\w\W]*/gm),It=J(/^data-[\-\w.\u00B7-\uFFFF]+$/),Lt=J(/^aria-[\-\w]+$/),Rt=J(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),zt=J(/^(?:\w+script|data):/i),Bt=J(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Vt=J(/^html$/i),Ht=J(/^[a-z][.\w]*(-[.\w]+)+$/i),Ut=Object.freeze({__proto__:null,ARIA_ATTR:Lt,ATTR_WHITESPACE:Bt,CUSTOM_ELEMENT:Ht,DATA_ATTR:It,DOCTYPE_NAME:Vt,ERB_EXPR:Pt,IS_ALLOWED_URI:Rt,IS_SCRIPT_OR_DATA:zt,MUSTACHE_EXPR:Nt,TMPLIT_EXPR:Ft}),Wt={element:1,text:3,progressingInstruction:7,comment:8,document:9},Gt=n(function(){return typeof window>`u`?null:window},`getGlobal`),Kt=n(function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},`_createTrustedTypesPolicy`),qt=n(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},`_createHooksMap`);function Jt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Gt(),t=n(e=>Jt(e),`DOMPurify`);if(t.version=`3.4.0`,t.removed=[],!e||!e.document||e.document.nodeType!==Wt.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e,i=r,a=i.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:c,Element:l,NodeFilter:u,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:ee,trustedTypes:p}=e,m=l.prototype,te=xt(m,`cloneNode`),ne=xt(m,`remove`),re=xt(m,`nextSibling`),ie=xt(m,`childNodes`),h=xt(m,`parentNode`);if(typeof s==`function`){let e=r.createElement(`template`);e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let g,ae=``,{implementation:_,createNodeIterator:oe,createDocumentFragment:se,getElementsByTagName:ce}=r,{importNode:v}=i,y=qt();t.isSupported=typeof $e==`function`&&typeof h==`function`&&_&&_.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:b,ERB_EXPR:x,TMPLIT_EXPR:le,DATA_ATTR:S,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:C,ATTR_WHITESPACE:w,CUSTOM_ELEMENT:T}=Ut,{IS_ALLOWED_URI:E}=Ut,D=null,de=Q({},[...St,...Ct,...wt,...Et,...Ot]),O=null,fe=Q({},[...kt,...At,...jt,...Mt]),k=Object.seal(it(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pe=null,me=null,A=Object.seal(it(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),he=!0,ge=!0,_e=!1,ve=!0,j=!1,ye=!0,M=!1,be=!1,xe=!1,Se=!1,Ce=!1,we=!1,Te=!0,N=!1,P=!0,Ee=!1,F={},I=null,De=Q({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Oe=null,ke=Q({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ae=null,je=Q({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),L=`http://www.w3.org/1998/Math/MathML`,Me=`http://www.w3.org/2000/svg`,R=`http://www.w3.org/1999/xhtml`,z=R,B=!1,V=null,Ne=Q({},[L,Me,R],pt),Pe=Q({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Fe=Q({},[`annotation-xml`]),Ie=Q({},[`title`,`style`,`font`,`a`,`script`]),Le=null,Re=[`application/xhtml+xml`,`text/html`],H=null,U=null,ze=r.createElement(`form`),Be=n(function(e){return e instanceof RegExp||e instanceof Function},`isRegexOrFunction`),Ve=n(function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(U&&U===e)){if((!e||typeof e!=`object`)&&(e={}),e=$(e),Le=Re.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,H=Le===`application/xhtml+xml`?pt:ft,D=Y(e,`ALLOWED_TAGS`)?Q({},e.ALLOWED_TAGS,H):de,O=Y(e,`ALLOWED_ATTR`)?Q({},e.ALLOWED_ATTR,H):fe,V=Y(e,`ALLOWED_NAMESPACES`)?Q({},e.ALLOWED_NAMESPACES,pt):Ne,Ae=Y(e,`ADD_URI_SAFE_ATTR`)?Q($(je),e.ADD_URI_SAFE_ATTR,H):je,Oe=Y(e,`ADD_DATA_URI_TAGS`)?Q($(ke),e.ADD_DATA_URI_TAGS,H):ke,I=Y(e,`FORBID_CONTENTS`)?Q({},e.FORBID_CONTENTS,H):De,pe=Y(e,`FORBID_TAGS`)?Q({},e.FORBID_TAGS,H):$({}),me=Y(e,`FORBID_ATTR`)?Q({},e.FORBID_ATTR,H):$({}),F=Y(e,`USE_PROFILES`)?e.USE_PROFILES:!1,he=e.ALLOW_ARIA_ATTR!==!1,ge=e.ALLOW_DATA_ATTR!==!1,_e=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ve=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,j=e.SAFE_FOR_TEMPLATES||!1,ye=e.SAFE_FOR_XML!==!1,M=e.WHOLE_DOCUMENT||!1,Se=e.RETURN_DOM||!1,Ce=e.RETURN_DOM_FRAGMENT||!1,we=e.RETURN_TRUSTED_TYPE||!1,xe=e.FORCE_BODY||!1,Te=e.SANITIZE_DOM!==!1,N=e.SANITIZE_NAMED_PROPS||!1,P=e.KEEP_CONTENT!==!1,Ee=e.IN_PLACE||!1,E=e.ALLOWED_URI_REGEXP||Rt,z=e.NAMESPACE||R,Pe=e.MATHML_TEXT_INTEGRATION_POINTS||Pe,Fe=e.HTML_INTEGRATION_POINTS||Fe,k=e.CUSTOM_ELEMENT_HANDLING||it(null),e.CUSTOM_ELEMENT_HANDLING&&Be(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(k.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Be(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(k.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(k.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),j&&(ge=!1),Ce&&(Se=!0),F&&(D=Q({},Ot),O=it(null),F.html===!0&&(Q(D,St),Q(O,kt)),F.svg===!0&&(Q(D,Ct),Q(O,At),Q(O,Mt)),F.svgFilters===!0&&(Q(D,wt),Q(O,At),Q(O,Mt)),F.mathMl===!0&&(Q(D,Et),Q(O,jt),Q(O,Mt))),A.tagCheck=null,A.attributeCheck=null,e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?A.tagCheck=e.ADD_TAGS:(D===de&&(D=$(D)),Q(D,e.ADD_TAGS,H))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?A.attributeCheck=e.ADD_ATTR:(O===fe&&(O=$(O)),Q(O,e.ADD_ATTR,H))),e.ADD_URI_SAFE_ATTR&&Q(Ae,e.ADD_URI_SAFE_ATTR,H),e.FORBID_CONTENTS&&(I===De&&(I=$(I)),Q(I,e.FORBID_CONTENTS,H)),e.ADD_FORBID_CONTENTS&&(I===De&&(I=$(I)),Q(I,e.ADD_FORBID_CONTENTS,H)),P&&(D[`#text`]=!0),M&&Q(D,[`html`,`head`,`body`]),D.table&&(Q(D,[`tbody`]),delete pe.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw vt(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw vt(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);g=e.TRUSTED_TYPES_POLICY,ae=g.createHTML(``)}else g===void 0&&(g=Kt(p,a)),g!==null&&typeof ae==`string`&&(ae=g.createHTML(``));q&&q(e),U=e}},`_parseConfig`),He=Q({},[...Ct,...wt,...Tt]),Ue=Q({},[...Et,...Dt]),We=n(function(e){let t=h(e);(!t||!t.tagName)&&(t={namespaceURI:z,tagName:`template`});let n=ft(e.tagName),r=ft(t.tagName);return V[e.namespaceURI]?e.namespaceURI===Me?t.namespaceURI===R?n===`svg`:t.namespaceURI===L?n===`svg`&&(r===`annotation-xml`||Pe[r]):!!He[n]:e.namespaceURI===L?t.namespaceURI===R?n===`math`:t.namespaceURI===Me?n===`math`&&Fe[r]:!!Ue[n]:e.namespaceURI===R?t.namespaceURI===Me&&!Fe[r]||t.namespaceURI===L&&!Pe[r]?!1:!Ue[n]&&(Ie[n]||!He[n]):!!(Le===`application/xhtml+xml`&&V[e.namespaceURI]):!1},`_checkValidNamespace`),W=n(function(e){ut(t.removed,{element:e});try{h(e).removeChild(e)}catch{ne(e)}},`_forceRemove`),G=n(function(e,n){try{ut(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{ut(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`){if(Se||Ce)try{W(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},`_removeAttribute`),Ge=n(function(e){let t=null,n=null;if(xe)e=``+e;else{let t=mt(e,/^[\r\n\t ]+/);n=t&&t[0]}Le===`application/xhtml+xml`&&z===R&&(e=``+e+``);let i=g?g.createHTML(e):e;if(z===R)try{t=new ee().parseFromString(i,Le)}catch{}if(!t||!t.documentElement){t=_.createDocument(z,`template`,null);try{t.documentElement.innerHTML=B?ae:i}catch{}}let a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),z===R?ce.call(t,M?`html`:`body`)[0]:M?t.documentElement:a},`_initDocument`),Ke=n(function(e){return oe.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},`_createNodeIterator`),qe=n(function(e){return e instanceof f&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof d)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},`_isClobbered`),Je=n(function(e){return typeof c==`function`&&e instanceof c},`_isNode`);function K(e,n,r){st(e,e=>{e.call(t,n,r,U)})}n(K,`_executeHooks`);let Ye=n(function(e){let n=null;if(K(y.beforeSanitizeElements,e,null),qe(e))return W(e),!0;let r=H(e.nodeName);if(K(y.uponSanitizeElement,e,{tagName:r,allowedTags:D}),ye&&e.hasChildNodes()&&!Je(e.firstElementChild)&&X(/<[/\w!]/g,e.innerHTML)&&X(/<[/\w!]/g,e.textContent)||ye&&e.namespaceURI===R&&r===`style`&&Je(e.firstElementChild)||e.nodeType===Wt.progressingInstruction||ye&&e.nodeType===Wt.comment&&X(/<[/\w]/g,e.data))return W(e),!0;if(pe[r]||!(A.tagCheck instanceof Function&&A.tagCheck(r))&&!D[r]){if(!pe[r]&&Ze(r)&&(k.tagNameCheck instanceof RegExp&&X(k.tagNameCheck,r)||k.tagNameCheck instanceof Function&&k.tagNameCheck(r)))return!1;if(P&&!I[r]){let t=h(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=te(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return W(e),!0}return e instanceof l&&!We(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&X(/<\/no(script|embed|frames)/i,e.innerHTML)?(W(e),!0):(j&&e.nodeType===Wt.text&&(n=e.textContent,st([b,x,le],e=>{n=ht(n,e,` `)}),e.textContent!==n&&(ut(t.removed,{element:e.cloneNode()}),e.textContent=n)),K(y.afterSanitizeElements,e,null),!1)},`_sanitizeElements`),Xe=n(function(e,t,n){if(me[t]||Te&&(t===`id`||t===`name`)&&(n in r||n in ze))return!1;if(!(ge&&!me[t]&&X(S,t))&&!(he&&X(ue,t))&&!(A.attributeCheck instanceof Function&&A.attributeCheck(t,e))){if(!O[t]||me[t]){if(!(Ze(e)&&(k.tagNameCheck instanceof RegExp&&X(k.tagNameCheck,e)||k.tagNameCheck instanceof Function&&k.tagNameCheck(e))&&(k.attributeNameCheck instanceof RegExp&&X(k.attributeNameCheck,t)||k.attributeNameCheck instanceof Function&&k.attributeNameCheck(t,e))||t===`is`&&k.allowCustomizedBuiltInElements&&(k.tagNameCheck instanceof RegExp&&X(k.tagNameCheck,n)||k.tagNameCheck instanceof Function&&k.tagNameCheck(n))))return!1}else if(!Ae[t]&&!X(E,ht(n,w,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&>(n,`data:`)===0&&Oe[e])&&!(_e&&!X(C,ht(n,w,``)))&&n)return!1}return!0},`_isValidAttribute`),Ze=n(function(e){return e!==`annotation-xml`&&mt(e,T)},`_isBasicCustomElement`),Qe=n(function(e){K(y.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||qe(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:O,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=H(a),l=s,u=a===`value`?l:_t(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,K(y.uponSanitizeAttribute,e,r),u=r.attrValue,N&&(c===`id`||c===`name`)&&(G(a,e),u=`user-content-`+u),ye&&X(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){G(a,e);continue}if(c===`attributename`&&mt(u,`href`)){G(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){G(a,e);continue}if(!ve&&X(/\/>/i,u)){G(a,e);continue}j&&st([b,x,le],e=>{u=ht(u,e,` `)});let d=H(e.nodeName);if(!Xe(d,c,u)){G(a,e);continue}if(g&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=g.createHTML(u);break;case`TrustedScriptURL`:u=g.createScriptURL(u)}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),qe(e)?W(e):lt(t.removed)}catch{G(a,e)}}K(y.afterSanitizeAttributes,e,null)},`_sanitizeAttributes`),et=n(function(e){let t=null,n=Ke(e);for(K(y.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)K(y.uponSanitizeShadowNode,t,null),Ye(t),Qe(t),t.content instanceof o&&et(t.content);K(y.afterSanitizeShadowDOM,e,null)},`_sanitizeShadowDOM`);return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=null,a=null,s=null,l=null;if(B=!e,B&&(e=``),typeof e!=`string`&&!Je(e)){if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw vt(`dirty is not a string, aborting`)}else throw vt(`toString is not a function`)}if(!t.isSupported)return e;if(be||Ve(n),t.removed=[],typeof e==`string`&&(Ee=!1),Ee){if(e.nodeName){let t=H(e.nodeName);if(!D[t]||pe[t])throw vt(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof c)r=Ge(``),a=r.ownerDocument.importNode(e,!0),a.nodeType===Wt.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?r=a:r.appendChild(a);else{if(!Se&&!j&&!M&&e.indexOf(`<`)===-1)return g&&we?g.createHTML(e):e;if(r=Ge(e),!r)return Se?null:we?ae:``}r&&xe&&W(r.firstChild);let u=Ke(Ee?e:r);for(;s=u.nextNode();)Ye(s),Qe(s),s.content instanceof o&&et(s.content);if(Ee)return e;if(Se){if(j){r.normalize();let e=r.innerHTML;st([b,x,le],t=>{e=ht(e,t,` `)}),r.innerHTML=e}if(Ce)for(l=se.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(O.shadowroot||O.shadowrootmode)&&(l=v.call(i,l,!0)),l}let d=M?r.outerHTML:r.innerHTML;return M&&D[`!doctype`]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&X(Vt,r.ownerDocument.doctype.name)&&(d=` +`+d),j&&st([b,x,le],e=>{d=ht(d,e,` `)}),g&&we?g.createHTML(d):d},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ve(e),be=!0},t.clearConfig=function(){U=null,be=!1},t.isValidAttribute=function(e,t,n){U||Ve({});let r=H(e),i=H(t);return Xe(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&ut(y[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=ct(y[e],t);return n===-1?void 0:dt(y[e],n,1)[0]}return lt(y[e])},t.removeHooks=function(e){y[e]=[]},t.removeAllHooks=function(){y=qt()},t}n(Jt,`createDOMPurify`);var Yt=Jt(),Xt=//gi,Zt=n(e=>e?cn(e).replace(/\\n/g,`#br#`).split(`#br#`):[``],`getRows`),Qt=(()=>{let e=!1;return()=>{e||=($t(),!0)}})();function $t(){let e=`data-temp-href-target`;Yt.addHook(`beforeSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(`target`)&&t.setAttribute(e,t.getAttribute(`target`)??``)}),Yt.addHook(`afterSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(e)&&(t.setAttribute(`target`,t.getAttribute(e)??``),t.removeAttribute(e),t.getAttribute(`target`)===`_blank`&&t.setAttribute(`rel`,`noopener`))})}n($t,`setupDompurifyHooks`);var en=n(e=>(Qt(),Yt.sanitize(e)),`removeScript`),tn=n((e,t)=>{if(G(t)){let n=t.securityLevel;n===`antiscript`||n===`strict`||n===`sandbox`?e=en(e):n!==`loose`&&(e=cn(e),e=e.replace(//g,`>`),e=e.replace(/=/g,`=`),e=sn(e))}return e},`sanitizeMore`),nn=n((e,t)=>e&&(e=t.dompurifyConfig?Yt.sanitize(tn(e,t),t.dompurifyConfig).toString():Yt.sanitize(tn(e,t),{FORBID_TAGS:[`style`]}).toString(),e),`sanitizeText`),rn=n((e,t)=>typeof e==`string`?nn(e,t):e.flat().map(e=>nn(e,t)),`sanitizeTextOrArray`),an=n(e=>Xt.test(e),`hasBreaks`),on=n(e=>e.split(Xt),`splitBreaks`),sn=n(e=>e.replace(/#br#/g,`
    `),`placeholderToBreak`),cn=n(e=>e.replace(Xt,`#br#`),`breakToPlaceholder`),ln=n(e=>{let t=``;return e&&(t=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},`getUrl`),un=n(function(...e){let t=e.filter(e=>!isNaN(e));return Math.max(...t)},`getMax`),dn=n(function(...e){let t=e.filter(e=>!isNaN(e));return Math.min(...t)},`getMin`),fn=n(function(e){let t=e.split(/(,)/),n=[];for(let e=0;e0&&e+1Math.max(0,e.split(t).length-1),`countOccurrence`),mn=n((e,t)=>{let n=pn(e,`~`),r=pn(t,`~`);return n===1&&r===1},`shouldCombineSets`),hn=n(e=>{let t=pn(e,`~`),n=!1;if(t<=1)return e;t%2!=0&&e.startsWith(`~`)&&(e=e.substring(1),n=!0);let r=[...e],i=r.indexOf(`~`),a=r.lastIndexOf(`~`);for(;i!==-1&&a!==-1&&i!==a;)r[i]=`<`,r[a]=`>`,i=r.indexOf(`~`),a=r.lastIndexOf(`~`);return n&&r.unshift(`~`),r.join(``)},`processSet`),gn=n(()=>window.MathMLElement!==void 0,`isMathMLSupported`),_n=/\$\$(.*?)\$\$/g,vn=n(e=>(e.match(_n)?.length??0)>0,`hasKatex`),yn=n(async(e,t)=>{let n=document.createElement(`div`);n.innerHTML=await xn(e,t),n.id=`katex-temp`,n.style.visibility=`hidden`,n.style.position=`absolute`,n.style.top=`0`,document.querySelector(`body`)?.insertAdjacentElement(`beforeend`,n);let r={width:n.clientWidth,height:n.clientHeight};return n.remove(),r},`calculateMathMLDimensions`),bn=n(async(t,n)=>{if(!vn(t))return t;if(!(gn()||n.legacyMathML||n.forceLegacyMathML))return t.replace(_n,`MathML is unsupported in this environment.`);{let{default:r}=await e(async()=>{let{default:e}=await import(`./katex-FWVWKTT3-_q1X5PuC.js`);return{default:e}},__vite__mapDeps([0,1])),i=n.forceLegacyMathML||!gn()&&n.legacyMathML?`htmlAndMathml`:`mathml`;return t.split(Xt).map(e=>vn(e)?`
    ${e}
    `:`
    ${e}
    `).join(``).replace(_n,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g,` `).replace(//g,``))}},`renderKatexUnsanitized`),xn=n(async(e,t)=>nn(await bn(e,t),t),`renderKatexSanitized`),Sn={getRows:Zt,sanitizeText:nn,sanitizeTextOrArray:rn,hasBreaks:an,splitBreaks:on,lineBreakRegex:Xt,removeScript:en,getUrl:ln,evaluate:Me,getMax:un,getMin:dn},Cn=n(function(e,t){for(let n of t)e.attr(n[0],n[1])},`d3Attrs`),wn=n(function(e,t,n){let r=new Map;return n?(r.set(`width`,`100%`),r.set(`style`,`max-width: ${t}px;`)):(r.set(`height`,e),r.set(`width`,t)),r},`calculateSvgSizeAttrs`),Tn=n(function(e,t,n,r){Cn(e,wn(t,n,r))},`configureSvgSize`),En=n(function(e,t,n,r){let a=t.node().getBBox(),o=a.width,s=a.height;i.info(`SVG bounds: ${o}x${s}`,a);let c=0,l=0;i.info(`Graph bounds: ${c}x${l}`,e),c=o+n*2,l=s+n*2,i.info(`Calculated bounds: ${c}x${l}`),Tn(t,l,c,r);let u=`${a.x-n} ${a.y-n} ${a.width+2*n} ${a.height+2*n}`;t.attr(`viewBox`,u)},`setupGraphViewbox`),Dn={};function On(e){return[...e.cssRules].map(e=>e.cssText).join(` +`)}n(On,`cssStyleSheetToString`);var kn=n((e,t,n,r)=>{let a=``;return e in Dn&&Dn[e]?a=Dn[e]({...n,svgId:r}):i.warn(`No theme found for ${e}`),`& { + font-family: ${n.fontFamily}; + font-size: ${n.fontSize}; + fill: ${n.textColor} + } + @keyframes edge-animation-frame { + from { + stroke-dashoffset: 0; + } + } + @keyframes dash { + to { + stroke-dashoffset: 0; + } + } + & .edge-animation-slow { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 50s linear infinite; + stroke-linecap: round; + } + & .edge-animation-fast { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 20s linear infinite; + stroke-linecap: round; + } + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${n.errorBkgColor}; + } + & .error-text { + fill: ${n.errorTextColor}; + stroke: ${n.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: ${n.strokeWidth??1}px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + & .edge-thickness-invisible { + stroke-width: 0; + fill: none; + } + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${n.lineColor}; + stroke: ${n.lineColor}; + } + & .marker.cross { + stroke: ${n.lineColor}; + } + + & svg { + font-family: ${n.fontFamily}; + font-size: ${n.fontSize}; + } + & p { + margin: 0 + } + + ${a} + .node .neo-node { + stroke: ${n.nodeBorder}; + } + + [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon { + stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder}; + filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`}; + } + [data-look="neo"].swimlane.cluster rect { + filter: none; + } + + + [data-look="neo"].node path { + stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder}; + stroke-width: ${n.strokeWidth??1}px; + } + + [data-look="neo"].node .outer-path { + filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`}; + } + + [data-look="neo"].node .neo-line path { + stroke: ${n.nodeBorder}; + filter: none; + } + + [data-look="neo"].node circle{ + stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder}; + filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`}; + } + + [data-look="neo"].node circle .state-start{ + fill: #000000; + } + + [data-look="neo"].icon-shape .icon { + fill: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder}; + filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`}; + } + + [data-look="neo"].icon-shape .icon-neo path { + stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder}; + filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`}; + } + + ${t} +`},`getStyles`),An=n((e,t)=>{t!==void 0&&(Dn[e]=t)},`addStylesForDiagram`),jn=kn,Mn={};t(Mn,{clear:()=>Ln,getAccDescription:()=>Vn,getAccTitle:()=>zn,getDiagramTitle:()=>Un,setAccDescription:()=>Bn,setAccTitle:()=>Rn,setDiagramTitle:()=>Hn});var Nn=``,Pn=``,Fn=``,In=n(e=>nn(e,H()),`sanitizeText`),Ln=n(()=>{Nn=``,Fn=``,Pn=``},`clear`),Rn=n(e=>{Nn=In(e).replace(/^\s+/g,``)},`setAccTitle`),zn=n(()=>Nn,`getAccTitle`),Bn=n(e=>{Fn=In(e).replace(/\n\s+/g,` +`)},`setAccDescription`),Vn=n(()=>Fn,`getAccDescription`),Hn=n(e=>{Pn=In(e)},`setDiagramTitle`),Un=n(()=>Pn,`getDiagramTitle`),Wn=i,Gn=r,Kn=H,qn=Re,Jn=L,Yn=n(e=>nn(e,Kn()),`sanitizeText`),Xn=En,Zn=n(()=>Mn,`getCommonDb`),Qn={},$n=n((e,t,n)=>{Qn[e]&&Wn.warn(`Diagram with id ${e} already registered. Overwriting.`),Qn[e]=t,n&&Ze(e,n),An(e,t.styles),t.injectUtils?.(Wn,Gn,Kn,Yn,Xn,Zn(),()=>{})},`registerDiagram`),er=n(e=>{if(e in Qn)return Qn[e];throw new tr(e)},`getDiagram`),tr=class extends Error{static{n(this,`DiagramNotFoundError`)}constructor(e){super(`Diagram ${e} not found.`)}};export{Pe as $,ln as A,xn as B,Kn as C,G as D,Un as E,Xt as F,nn as G,_ as H,fn as I,Bn as J,Yn as K,Yt as L,vn as M,v as N,Le as O,b as P,Hn as Q,$n as R,H as S,Qe as T,je as U,Be as V,Ae as W,Re as X,Rn as Y,qn as Z,Ke as _,oe as a,Ie as at,Vn as b,Sn as c,x as d,En as et,L as f,K as g,Ye as h,yn as i,le as it,W as j,pe as k,Tn as l,De as m,ze as n,jn as nt,Ln as o,Jn as p,Fe as q,o as r,N as rt,Mn as s,Je as t,Xn as tt,On as u,Me as v,er as w,zn as x,Ge as y,Xe as z}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-NYCIP5HP-BZs_nZUU.js b/lecture-01/assets/chunk-NYCIP5HP-BZs_nZUU.js new file mode 100644 index 0000000000000000000000000000000000000000..492fb2fddca1c72156a6fd61b973e98a766cbe52 --- /dev/null +++ b/lecture-01/assets/chunk-NYCIP5HP-BZs_nZUU.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{C as t,S as n,a as r,i,o as a,t as o,u as s,w as c,x as l}from"./chunk-A7G5T7E5-C2HISlqa.js";var u=class extends o{static{e(this,`CynefinTokenBuilder`)}static{l(this,`CynefinTokenBuilder`)}constructor(){super([`cynefin-beta`])}},d={parser:{TokenBuilder:l(()=>new u,`TokenBuilder`),ValueConverter:l(()=>new i,`ValueConverter`)}};function f(e=a){let i=c(t(e),s),o=c(n({shared:i}),r,d);return i.ServiceRegistry.register(o),{shared:i,Cynefin:o}}e(f,`createCynefinServices`),l(f,`createCynefinServices`);export{f as n,d as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-ODPFZSHR-BUzFQ4Zq.js b/lecture-01/assets/chunk-ODPFZSHR-BUzFQ4Zq.js new file mode 100644 index 0000000000000000000000000000000000000000..75a5df794a3e802567f59b4f25455a85dbb638bd --- /dev/null +++ b/lecture-01/assets/chunk-ODPFZSHR-BUzFQ4Zq.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{C as t,S as n,b as r,n as i,o as a,u as o,w as s,x as c}from"./chunk-A7G5T7E5-C2HISlqa.js";var l=class extends i{static{e(this,`WardleyValueConverter`)}static{c(this,`WardleyValueConverter`)}runCustomConverter(e,t,n){switch(e.name.toUpperCase()){case`LINK_LABEL`:return t.substring(1).trim();default:return}}},u={parser:{ValueConverter:c(()=>new l,`ValueConverter`)}};function d(e=a){let i=s(t(e),o),c=s(n({shared:i}),r,u);return i.ServiceRegistry.register(c),{shared:i,Wardley:c}}e(d,`createWardleyServices`),c(d,`createWardleyServices`);export{d as n,u as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-OVFB7FZ2-DfSjEz3X.js b/lecture-01/assets/chunk-OVFB7FZ2-DfSjEz3X.js new file mode 100644 index 0000000000000000000000000000000000000000..a78d41617c940885b78604f9cb3fc1c475ea7953 --- /dev/null +++ b/lecture-01/assets/chunk-OVFB7FZ2-DfSjEz3X.js @@ -0,0 +1,231 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as t,T as n}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as r,E as i,J as a,L as o,Q as s,Y as c,b as l,c as u,o as d,x as f}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{c as p,v as m}from"./chunk-OX6ZKUVE-roiHi12N.js";import{r as h}from"./chunk-STSWKLMO-1NGmNrHs.js";import{t as g}from"./chunk-ZICDAICJ-CB44yeNY.js";import{t as _}from"./chunk-HPLX5OYV-zid2YVw5.js";import{t as v}from"./chunk-BYAF6FXG-DqiL_6qO.js";var y=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],j=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NL`,6:`SD`,14:`DESCR`,15:`-->`,16:`HIDE_EMPTY`,17:`scale`,18:`WIDTH`,19:`COMPOSIT_STATE`,20:`STRUCT_START`,21:`STRUCT_STOP`,22:`STATE_DESCR`,23:`AS`,24:`ID`,25:`FORK`,26:`JOIN`,27:`CHOICE`,28:`CONCURRENT`,29:`note`,31:`NOTE_TEXT`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,38:`CLICK`,39:`STRING`,40:`HREF`,41:`classDef`,42:`CLASSDEF_ID`,43:`CLASSDEF_STYLEOPTS`,44:`DEFAULT`,45:`style`,46:`STYLE_IDS`,47:`STYLEDEF_STYLEOPTS`,48:`class`,49:`CLASSENTITY_IDS`,50:`STYLECLASS`,51:`direction_tb`,52:`direction_bt`,53:`direction_rl`,54:`direction_lr`,56:`;`,57:`EDGE_STATE`,58:`STYLE_SEPARATOR`,59:`left_of`,60:`right_of`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``}}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,7]),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(A,[2,11]),t(A,[2,12],{14:[1,40],15:[1,41]}),t(A,[2,16]),{18:[1,42]},t(A,[2,18],{20:[1,43]}),{23:[1,44]},t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(A,[2,28]),{34:[1,49]},{36:[1,50]},t(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(j,[2,44],{58:[1,56]}),t(j,[2,45],{58:[1,57]}),t(A,[2,38]),t(A,[2,39]),t(A,[2,40]),t(A,[2,41]),t(A,[2,6]),t(A,[2,13]),{13:58,24:f,57:k},t(A,[2,17]),t(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(A,[2,29]),t(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(A,[2,34]),t(A,[2,35]),t(A,[2,36]),t(A,[2,37]),t(j,[2,46]),t(j,[2,47]),t(A,[2,15]),t(A,[2,19]),t(M,a,{7:78}),t(A,[2,26]),t(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,32]),t(A,[2,33]),t(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};N.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(t,n,r,i){function a(){let e=n.yytext.indexOf(`%%`);if(e===0)return!1;if(e>0){let r=n.yytext.slice(0,e),i=n.yytext.slice(e);i&&t.lexer.unput(i),n.yytext=r}return!0}switch(e(a,`processId`),r){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState(`SCALE`),17;case 14:return 18;case 15:this.popState();break;case 16:return this.begin(`acc_title`),33;case 17:return this.popState(),`acc_title_value`;case 18:return this.begin(`acc_descr`),35;case 19:return this.popState(),`acc_descr_value`;case 20:this.begin(`acc_descr_multiline`);break;case 21:this.popState();break;case 22:return`acc_descr_multiline_value`;case 23:return this.pushState(`CLASSDEF`),41;case 24:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 25:return this.popState(),this.pushState(`CLASSDEFID`),42;case 26:return this.popState(),43;case 27:return this.pushState(`CLASS`),48;case 28:return this.popState(),this.pushState(`CLASS_STYLE`),49;case 29:return this.popState(),50;case 30:return this.pushState(`STYLE`),45;case 31:return this.popState(),this.pushState(`STYLEDEF_STYLES`),46;case 32:return this.popState(),47;case 33:return this.pushState(`SCALE`),17;case 34:return 18;case 35:this.popState();break;case 36:this.pushState(`STATE`);break;case 37:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 42:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState(`STATE_STRING`);break;case 48:return this.pushState(`STATE_ID`),`AS`;case 49:return a()?(this.popState(),`ID`):void 0;case 50:this.popState();break;case 51:return`STATE_DESCR`;case 52:throw Error(`Error: State name must be a single word. Found: "`+n.yytext.trim()+`"`);case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState(`struct`),20;case 56:return this.popState(),21;case 57:break;case 58:return this.begin(`NOTE`),29;case 59:return this.popState(),this.pushState(`NOTE_ID`),59;case 60:return this.popState(),this.pushState(`NOTE_ID`),60;case 61:this.popState(),this.pushState(`FLOATING_NOTE`);break;case 62:return this.popState(),this.pushState(`FLOATING_NOTE_ID`),`AS`;case 63:break;case 64:return`NOTE_TEXT`;case 65:return a()?(this.popState(),`ID`):void 0;case 66:return a()?(this.popState(),this.pushState(`NOTE_TEXT`),24):void 0;case 67:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;case 68:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:return a()?24:void 0;case 74:return n.yytext=n.yytext.trim(),14;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return`INVALID`}},`anonymous`),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}}})();function P(){this.yy={}}return e(P,`Parser`),P.prototype=N,N.Parser=P,new P})();y.parser=y;var b=y,x=`TB`,S=`TB`,C=`dir`,w=`state`,T=`root`,E=`relation`,D=`classDef`,O=`style`,k=`applyClass`,A=`default`,j=`divider`,M=`fill:none`,N=`fill: #333`,P=`c`,ee=`markdown`,F=`normal`,I=`rect`,L=`rectWithTitle`,te=`stateStart`,ne=`stateEnd`,R=`divider`,re=`roundedWithTitle`,ie=`note`,ae=`noteGroup`,z=`statediagram`,oe=`${z}-state`,B=`transition`,se=`note`,ce=`${B} note-edge`,le=`${z}-${se}`,ue=`${z}-cluster`,de=`${z}-cluster-alt`,V=`parent`,H=`note`,fe=`state`,U=`----`,pe=`${U}${H}`,W=`${U}${V}`,G=e((e,t=S)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`),me={getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`),draw:e(async function(e,t,i,a){n.info(`REF0:`),n.info(`Drawing state diagram (v2)`,t);let{securityLevel:o,state:s,layout:c}=r();a.db.extract(a.db.getRootDocV2());let l=a.db.getData(),u=_(t,o);l.type=a.type,l.layoutAlgorithm=c,l.nodeSpacing=s?.nodeSpacing||50,l.rankSpacing=s?.rankSpacing||50,l.markers=r().look===`neo`?[`barbNeo`]:[`barb`],l.diagramId=t,await h(l,u);try{(typeof a.db.getLinks==`function`?a.db.getLinks():new Map).forEach((e,t)=>{let r=typeof t==`string`?t:typeof t?.id==`string`?t.id:``,i=l.nodes.find(e=>e.id===r);if(!r){n.warn(`⚠️ Invalid or missing stateId from key:`,JSON.stringify(t));return}let a=u.node()?.querySelectorAll(`g.node, g.rough-node`),o;if(a?.forEach(e=>{let t=e.textContent?.trim();(e.id===i?.domId||t===r)&&(o=e)}),!o){n.warn(`⚠️ Could not find node matching text:`,r);return}let s=o.parentNode;if(!s){n.warn(`⚠️ Node has no parent, cannot wrap:`,r);return}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`a`),d=e.url.replace(/^"+|"+$/g,``);if(c.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,d),c.setAttribute(`target`,`_blank`),e.tooltip){let t=e.tooltip.replace(/^"+|"+$/g,``);c.setAttribute(`title`,t),o.setAttribute(`title`,t)}s.replaceChild(c,o),c.appendChild(o),n.info(`🔗 Wrapped node in tag for:`,r,e.url)})}catch(e){n.error(`❌ Error injecting clickable links:`,e)}m.insertTitle(u,`statediagramTitleText`,s?.titleTopMargin??25,a.db.getDiagramTitle()),v(u,8,z,s?.useMaxWidth??!0)},`draw`),getDir:G},K=new Map,q=0;function J(e=``,t=0,n=``,r=U){return`${fe}-${e}${n!==null&&n.length>0?`${r}${n}`:``}-${t}`}e(J,`stateDomId`);var he=e((e,t,i,a,o,s,c,l)=>{n.trace(`items`,t),t.forEach(t=>{switch(t.stmt){case w:Z(e,t,i,a,o,s,c,l);break;case A:Z(e,t,i,a,o,s,c,l);break;case E:{Z(e,t.state1,i,a,o,s,c,l),Z(e,t.state2,i,a,o,s,c,l);let n=c===`neo`,d={id:`edge`+q,start:t.state1.id,end:t.state2.id,arrowhead:`normal`,arrowTypeEnd:n?`arrow_barb_neo`:`arrow_barb`,style:M,labelStyle:``,label:u.sanitizeText(t.description??``,r()),arrowheadStyle:N,labelpos:P,labelType:ee,thickness:F,classes:B,look:c};o.push(d),q++}}})},`setupDoc`),ge=e((e,t=S)=>{let n=t;if(e.doc)for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`);function Y(e,t,n){if(!t.id||t.id===``||t.id===``)return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(` `).forEach(e=>{let r=n.get(e);r&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...r.styles])}));let r=e.find(e=>e.id===t.id);r?Object.assign(r,t):e.push(t)}e(Y,`insertOrUpdateNode`);function X(e){return e?.classes?.join(` `)??``}e(X,`getClassesFromDbInfo`);function _e(e){return e?.styles??[]}e(_e,`getStylesFromDbInfo`);var Z=e((e,t,i,a,o,s,c,l)=>{let d=t.id,f=i.get(d),p=X(f),m=_e(f),h=r();if(n.info(`dataFetcher parsedItem`,t,f,m),d!==`root`){let r=I;t.start===!0?r=te:t.start===!1&&(r=ne),t.type!==A&&(r=t.type),K.get(d)||K.set(d,{id:d,shape:r,description:u.sanitizeText(d,h),cssClasses:`${p} ${oe}`,cssStyles:m});let i=K.get(d);t.description&&(Array.isArray(i.description)?(i.shape=L,i.description.push(t.description)):i.description?.length&&i.description.length>0?(i.shape=L,i.description=i.description===d?[t.description]:[i.description,t.description]):(i.shape=I,i.description=t.description),i.description=u.sanitizeTextOrArray(i.description,h)),i.description?.length===1&&i.shape===L&&(i.shape=i.type===`group`?re:I),!i.type&&t.doc&&(n.info(`Setting cluster for XCX`,d,ge(t)),i.type=`group`,i.isGroup=!0,i.dir=ge(t),i.explicitDir=t.doc.some(e=>e.stmt===`dir`),i.shape=t.type===j?R:re,i.cssClasses=`${i.cssClasses} ${ue} ${s?de:``}`);let f={labelStyle:``,shape:i.shape,label:i.description,cssClasses:i.cssClasses,cssCompiledStyles:[],cssStyles:i.cssStyles,id:d,dir:i.dir,domId:J(d,q),type:i.type,isGroup:i.type===`group`,padding:8,rx:10,ry:10,look:c,labelType:`markdown`};if(f.shape===R&&(f.label=``),e&&e.id!==`root`&&(n.trace(`Setting node `,d,` to be child of its parent `,e.id),f.parentId=e.id),f.centerLabel=!0,t.note){let e={labelStyle:``,shape:ie,label:t.note.text,labelType:`markdown`,cssClasses:le,cssStyles:[],cssCompiledStyles:[],id:d+pe+`-`+q,domId:J(d,q,H),type:i.type,isGroup:i.type===`group`,padding:h.flowchart?.padding,look:c,position:t.note.position},n=d+W,r={labelStyle:``,shape:ae,label:t.note.text,cssClasses:i.cssClasses,cssStyles:[],id:d+W,domId:J(d,q,V),type:`group`,isGroup:!0,padding:16,look:c,position:t.note.position};q++,r.id=n,e.parentId=n,Y(a,r,l),Y(a,e,l),Y(a,f,l);let s=d,u=e.id;t.note.position===`left of`&&(s=e.id,u=d),o.push({id:s+`-`+u,start:s,end:u,arrowhead:`none`,arrowTypeEnd:``,style:M,labelStyle:``,classes:ce,arrowheadStyle:N,labelpos:P,labelType:ee,thickness:F,look:c})}else Y(a,f,l)}t.doc&&(n.trace(`Adding nodes children `),he(t,t.doc,i,a,o,!s,c,l))},`dataFetcher`),ve=e(()=>{K.clear(),q=0},`reset`),Q={START_NODE:`[*]`,START_TYPE:`start`,END_NODE:`[*]`,END_TYPE:`end`,COLOR_KEYWORD:`color`,FILL_KEYWORD:`fill`,BG_FILL:`bgFill`,STYLECLASS_SEP:`,`},ye=e(()=>new Map,`newClassesList`),be=e(()=>({relations:[],states:new Map,documents:{}}),`newDoc`),$=e(e=>JSON.parse(JSON.stringify(e)),`clone`),xe=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=ye(),this.documents={root:be()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=f,this.setAccTitle=c,this.getAccDescription=l,this.setAccDescription=a,this.setDiagramTitle=s,this.getDiagramTitle=i,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{e(this,`StateDB`)}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let t of Array.isArray(e)?e:e.doc)switch(t.stmt){case w:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case E:this.addRelation(t.state1,t.state2,t.description);break;case D:this.addStyleClass(t.id.trim(),t.classes);break;case O:this.handleStyleDef(t);break;case k:this.setCssClass(t.id.trim(),t.styleClass);break;case`click`:this.addLink(t.id,t.url,t.tooltip)}let t=this.getStates(),n=r();ve(),Z(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,n.look,this.classes);for(let e of this.nodes)if(Array.isArray(e.label)){if(e.description=e.label.slice(1),e.isGroup&&e.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${e.id}]`);e.label=e.label[0]}}handleStyleDef(e){let t=e.id.trim().split(`,`),n=e.styleClass.split(`,`);for(let e of t){let t=this.getState(e);if(!t){let n=e.trim();this.addState(n),t=this.getState(n)}t&&(t.styles=n.map(e=>e.replace(/;/g,``)?.trim()))}}setRootDoc(e){n.info(`Setting root doc`,e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,t,n){if(t.stmt===E){this.docTranslator(e,t.state1,!0),this.docTranslator(e,t.state2,!1);return}if(t.stmt===w&&(t.id===Q.START_NODE?(t.id=e.id+(n?`_start`:`_end`),t.start=n):t.id=t.id.trim()),t.stmt!==T&&t.stmt!==w||!t.doc)return;let r=[],i=[];for(let e of t.doc)if(e.type===j){let t=$(e);t.doc=$(i),r.push(t),i=[]}else i.push(e);if(r.length>0&&i.length>0){let e={stmt:w,id:p(),type:`divider`,doc:$(i)};r.push($(e)),t.doc=r}t.doc.forEach(e=>this.docTranslator(t,e,!0))}getRootDocV2(){return this.docTranslator({id:T,stmt:T},{id:T,stmt:T,doc:this.rootDoc},!0),{id:T,doc:this.rootDoc}}addState(e,t=A,i=void 0,a=void 0,o=void 0,s=void 0,c=void 0,l=void 0){let d=e?.trim();if(!this.currentDocument.states.has(d))n.info(`Adding state `,d,a),this.currentDocument.states.set(d,{stmt:w,id:d,descriptions:[],type:t,doc:i,note:o,classes:[],styles:[],textStyles:[]});else{let e=this.currentDocument.states.get(d);if(!e)throw Error(`State not found: ${d}`);e.doc||=i,e.type||=t}if(a&&(n.info(`Setting state description`,d,a),(Array.isArray(a)?a:[a]).forEach(e=>this.addDescription(d,e.trim()))),o){let e=this.currentDocument.states.get(d);if(!e)throw Error(`State not found: ${d}`);e.note=o,e.note.text=u.sanitizeText(e.note.text,r())}s&&(n.info(`Setting state classes`,d,s),(Array.isArray(s)?s:[s]).forEach(e=>this.setCssClass(d,e.trim()))),c&&(n.info(`Setting state styles`,d,c),(Array.isArray(c)?c:[c]).forEach(e=>this.setStyle(d,e.trim()))),l&&(n.info(`Setting state styles`,d,c),(Array.isArray(l)?l:[l]).forEach(e=>this.setTextStyle(d,e.trim())))}clear(e){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:be()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=ye(),e||(this.links=new Map,d())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){n.info(`Documents = `,this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,r){this.links.set(e,{url:t,tooltip:r}),n.warn(`Adding link`,e,t,r)}getLinks(){return this.links}startIdIfNeeded(e=``){return e===Q.START_NODE?(this.startEndCount++,`${Q.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e=``,t=A){return e===Q.START_NODE?Q.START_TYPE:t}endIdIfNeeded(e=``){return e===Q.END_NODE?(this.startEndCount++,`${Q.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e=``,t=A){return e===Q.END_NODE?Q.END_TYPE:t}addRelationObjs(e,t,n=``){let i=this.startIdIfNeeded(e.id.trim()),a=this.startTypeIfNeeded(e.id.trim(),e.type),o=this.startIdIfNeeded(t.id.trim()),s=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(i,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(o,s,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.currentDocument.relations.push({id1:i,id2:o,relationTitle:u.sanitizeText(n,r())})}addRelation(e,t,n){if(typeof e==`object`&&typeof t==`object`)this.addRelationObjs(e,t,n);else if(typeof e==`string`&&typeof t==`string`){let i=this.startIdIfNeeded(e.trim()),a=this.startTypeIfNeeded(e),o=this.endIdIfNeeded(t.trim()),s=this.endTypeIfNeeded(t);this.addState(i,a),this.addState(o,s),this.currentDocument.relations.push({id1:i,id2:o,relationTitle:n?u.sanitizeText(n,r()):void 0})}}addDescription(e,t){let n=this.currentDocument.states.get(e),i=t.startsWith(`:`)?t.replace(`:`,``).trim():t;n?.descriptions?.push(u.sanitizeText(i,r()))}cleanupLabel(e){return e.startsWith(`:`)?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,t=``){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let n=this.classes.get(e);t&&n&&t.split(Q.STYLECLASS_SEP).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(Q.COLOR_KEYWORD).exec(e)){let e=t.replace(Q.FILL_KEYWORD,Q.BG_FILL).replace(Q.COLOR_KEYWORD,Q.FILL_KEYWORD);n.textStyles.push(e)}n.styles.push(t)})}getClasses(){return this.classes}setupToolTips(e){let n=g();t(e).select(`svg`).selectAll(`g.node, g.rough-node`).on(`mouseover`,e=>{let r=t(e.currentTarget),i=r.attr(`title`);if(i===null)return;let a=e.currentTarget?.getBoundingClientRect();n.transition().duration(200).style(`opacity`,`.9`),n.style(`left`,window.scrollX+a.left+(a.right-a.left)/2+`px`).style(`top`,window.scrollY+a.bottom+`px`),n.html(o.sanitize(i)),r.classed(`hover`,!0)}).on(`mouseout`,e=>{n.transition().duration(500).style(`opacity`,0),t(e.currentTarget).classed(`hover`,!1)})}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=this.getState(e);if(!n){let t=e.trim();this.addState(t),n=this.getState(t)}n?.classes?.push(t)})}setStyle(e,t){this.getState(e)?.styles?.push(t)}setTextStyle(e,t){this.getState(e)?.textStyles?.push(t)}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===C)}getDirection(){return this.getDirectionStatement()?.value??x}setDirection(e){let t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:C,value:e})}trimColon(e){return e.startsWith(`:`)?e.slice(1).trim():e.trim()}getData(){let e=r();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:G(this.getRootDocV2())}}getConfig(){return r().state}},Se=e(e=>` +defs [id$="-barbEnd"] { + fill: ${e.transitionColor}; + stroke: ${e.transitionColor}; + } +g.stateGroup text { + fill: ${e.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${e.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${e.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; +} + +g.stateGroup line { + stroke: ${e.lineColor}; + stroke-width: ${e.strokeWidth||1}; +} + +.transition { + stroke: ${e.transitionColor}; + stroke-width: ${e.strokeWidth||1}; + fill: none; +} + +.stateGroup .composit { + fill: ${e.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${e.noteBorderColor}; + fill: ${e.noteBkgColor}; + + text { + fill: ${e.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${e.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${e.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; +} +.edgeLabel .label text { + fill: ${e.transitionLabelColor||e.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${e.transitionLabelColor||e.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${e.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${e.specialStateColor}; + stroke: ${e.specialStateColor}; +} + +.node .fork-join { + fill: ${e.specialStateColor}; + stroke: ${e.specialStateColor}; +} + +.node circle.state-end { + fill: ${e.innerEndBackground}; + stroke: ${e.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${e.compositeBackground||e.background}; + // stroke: ${e.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${e.stateBkg||e.mainBkg}; + stroke: ${e.stateBorder||e.nodeBorder}; + stroke-width: ${e.strokeWidth||1}px; +} +.node polygon { + fill: ${e.mainBkg}; + stroke: ${e.stateBorder||e.nodeBorder};; + stroke-width: ${e.strokeWidth||1}px; +} +[id$="-barbEnd"] { + fill: ${e.lineColor}; +} + +.statediagram-cluster rect { + fill: ${e.compositeTitleBackground}; + stroke: ${e.stateBorder||e.nodeBorder}; + stroke-width: ${e.strokeWidth||1}px; +} + +.cluster-label, .nodeLabel { + color: ${e.stateLabelColor}; + // line-height: 1; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${e.stateBorder||e.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${e.compositeBackground||e.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${e.altBackground?e.altBackground:`#efefef`}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${e.altBackground?e.altBackground:`#efefef`}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${e.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${e.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${e.noteTextColor}; +} + +[id$="-dependencyStart"], [id$="-dependencyEnd"] { + fill: ${e.lineColor}; + stroke: ${e.lineColor}; + stroke-width: ${e.strokeWidth||1}; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; +} + +[data-look="neo"].statediagram-cluster rect { + fill: ${e.mainBkg}; + stroke: ${e.useGradient?`url(`+e.svgId+`-gradient)`:e.stateBorder||e.nodeBorder}; + stroke-width: ${e.strokeWidth??1}; +} +[data-look="neo"].statediagram-cluster rect.outer { + rx: ${e.radius}px; + ry: ${e.radius}px; + filter: ${e.dropShadow?e.dropShadow.replace(`url(#drop-shadow)`,`url(${e.svgId}-drop-shadow)`):`none`} +} +`,`getStyles`);export{Se as i,b as n,me as r,xe as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-OX6ZKUVE-roiHi12N.js b/lecture-01/assets/chunk-OX6ZKUVE-roiHi12N.js new file mode 100644 index 0000000000000000000000000000000000000000..e18897ccd3561299ad63e89f0d9f564305b8c7d7 --- /dev/null +++ b/lecture-01/assets/chunk-OX6ZKUVE-roiHi12N.js @@ -0,0 +1,2 @@ +import{i as e,r as t}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{A as n,B as r,C as i,I as a,R as o,T as s,_ as c,c as l,d as u,f as d,g as ee,h as te,j as ne,k as re,l as ie,m as ae,o as oe,p as se,s as ce,u as le,w as ue,z as de}from"./chunk-FO5PYUIK-CPzj2963.js";import{W as fe,_ as f,c as p,h as pe,r as me}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as he}from"./chunk-IPM4HZQ6-CQmHNgJe.js";var ge=e(he(),1);function _e(e){return Number.isSafeInteger(e)&&e>=0}t(_e,`isLength`);function m(e){return e!=null&&typeof e!=`function`&&_e(e.length)}t(m,`isArrayLike`);function ve(e){return e===`__proto__`}t(ve,`isUnsafeProperty`);function h(e){return e==null||typeof e!=`object`&&typeof e!=`function`}t(h,`isPrimitive`);function g(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}t(g,`getSymbols`);function _(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}t(_,`getTag`);var v=`[object RegExp]`,y=`[object String]`,b=`[object Number]`,x=`[object Boolean]`,S=`[object Arguments]`,C=`[object Symbol]`,w=`[object Date]`,T=`[object Map]`,E=`[object Set]`,ye=`[object Array]`,D=`[object ArrayBuffer]`,O=`[object Object]`,k=`[object DataView]`,be=`[object Uint8Array]`,xe=`[object Uint8ClampedArray]`,Se=`[object Uint16Array]`,Ce=`[object Uint32Array]`,A=`[object Int8Array]`,j=`[object Int16Array]`,we=`[object Int32Array]`,Te=`[object Float32Array]`,Ee=`[object Float64Array]`;function M(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}t(M,`isTypedArray`);function De(e,t){return N(e,void 0,e,new Map,t)}t(De,`cloneDeepWith`);function N(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(h(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(_(e)===O&&typeof e.constructor!=`function`){let t={};return a.set(e,t),P(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case b:case y:case x:{let t=new e.constructor(e?.valueOf());return P(t,e),t}case S:{let t={};return P(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}t(ke,`cloneDeepWith`);function F(e){return ke(e)}t(F,`cloneDeep`);function I(e){return typeof e==`object`&&!!e&&_(e)===`[object Arguments]`}t(I,`isArguments`);function L(e){return typeof e==`object`&&!!e}t(L,`isObjectLike`);function Ae(e){return L(e)&&m(e)}t(Ae,`isArrayLikeObject`);function je(e){return Array.isArray(e)}t(je,`isArray`);function R(e,n){if(typeof e!=`function`||n!=null&&typeof n!=`function`)throw TypeError(`Expected a function`);let r=t(function(...t){let i=n?n.apply(this,t):t[0],a=r.cache;if(a.has(i))return a.get(i);let o=e.apply(this,t);return r.cache=a.set(i,o)||a,o},`memoized`);return r.cache=new(R.Cache||Map),r}t(R,`memoize`),R.Cache=Map;function Me(){}t(Me,`noop`);function Ne(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}t(Ne,`isPrototype`);function z(e){return M(e)}t(z,`isTypedArray`);function Pe(e){if(h(e))return e;let t=_(e);if(!Fe(e))return{};if(je(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(z(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===D)return new ArrayBuffer(e.byteLength);if(t===k){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===x||t===b||t===y){let n=e.constructor,r=new n(e.valueOf());return t===y?Le(r,e):B(r,e),r}if(t===w)return new Date(Number(e));if(t===v){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===C)return Object(Symbol.prototype.valueOf.call(e));if(t===T){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===E){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===S){let t=e,n={};return B(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return Re(n,e),B(n,e),Ie(n,e),n}t(Pe,`clone`);function Fe(e){switch(_(e)){case S:case ye:case D:case k:case x:case w:case Te:case Ee:case A:case j:case we:case T:case b:case O:case v:case E:case y:case C:case be:case xe:case Se:case Ce:return!0;default:return!1}}t(Fe,`isCloneableObject`);function B(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}t(B,`copyOwnProperties`);function Ie(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r=n)&&(e[r]=t[r])}t(Le,`cloneStringObjectProperties`);function Re(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}t(Re,`copyPrototype`);function V(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}t(V,`isPlainObject`);function ze(e){if(h(e))return e;if(Array.isArray(e)||M(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}if(typeof File<`u`&&e instanceof File)return new n([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e==`object`){let n=Object.create(t);return Object.assign(n,e)}return e}t(ze,`clone`);function Be(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e`u`||!Buffer.isBuffer(e))&&!z(e)&&!I(e)?!1:e.length===0;if(typeof e==`object`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return Ne(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}t(He,`isEmpty`);var Ue={curveBasis:l,curveBasisClosed:oe,curveBasisOpen:ce,curveBumpX:ie,curveBumpY:le,curveBundle:u,curveCardinalClosed:d,curveCardinalOpen:se,curveCardinal:ae,curveCatmullRomClosed:te,curveCatmullRomOpen:ee,curveCatmullRom:c,curveLinear:ue,curveLinearClosed:i,curveMonotoneX:re,curveMonotoneY:n,curveNatural:ne,curveStep:r,curveStepAfter:o,curveStepBefore:de},We=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ge=t(function(e,t){let n=Ke(e,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){let e=n.map(e=>e.args);fe(e),r=me(r,[...e])}else r=n.args;if(!r)return;let i=pe(e,t),a=`config`;return r[a]!==void 0&&(i===`flowchart-v2`&&(i=`flowchart`),r[i]=r[a],delete r[a]),r},`detectInit`),Ke=t(function(e,t=null){try{let n=RegExp(`[%]{2}(?![{]${We.source})(?=[}][%]{2}).* +`,`ig`);e=e.trim().replace(n,``).replace(/'/gm,`"`),s.debug(`Detecting diagram directive${t===null?``:` type:`+t} based on the text:${e}`);let r,i=[];for(;(r=f.exec(e))!==null;)if(r.index===f.lastIndex&&f.lastIndex++,r&&!t||t&&r[1]?.match(t)||t&&r[2]?.match(t)){let e=r[1]?r[1]:r[2],t=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:e,args:t})}return i.length===0?{type:e,args:null}:i.length===1?i[0]:i}catch(n){return s.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),qe=t(function(e){return e.replace(f,``)},`removeDirectives`),Je=t(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function U(e,t){return e?Ue[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}t(U,`interpolateToCurve`);function Ye(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,ge.sanitizeUrl)(n)}t(Ye,`formatUrl`);var Xe=t((e,...t)=>{let n=e.split(`.`),r=n.length-1,i=n[r],a=window;for(let t=0;t{n+=W(e,t),t=e}),G(e,n/2)}t(Ze,`traverseEdge`);function Qe(e){return e.length===1?e[0]:Ze(e)}t(Qe,`calcLabelPosition`);var $e=t((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),G=t((e,t)=>{let n,r=t;for(let t of e){if(n){let e=W(t,n);if(e===0)return n;if(e=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:$e((1-i)*n.x+i*t.x,5),y:$e((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),et=t((e,t,n)=>{s.info(`our points ${JSON.stringify(t)}`),t[0]!==n&&(t=t.reverse());let r=G(t,25),i=e?10:5,a=Math.atan2(t[0].y-r.y,t[0].x-r.x),o={x:0,y:0};return o.x=Math.sin(a)*i+(t[0].x+r.x)/2,o.y=-Math.cos(a)*i+(t[0].y+r.y)/2,o},`calcCardinalityPosition`);function tt(e,t,n){let r=structuredClone(n);s.info(`our points`,r),t!==`start_left`&&t!==`start_right`&&r.reverse();let i=G(r,25+e),a=10+e*.5,o=Math.atan2(r[0].y-i.y,r[0].x-i.x),c={x:0,y:0};return t===`start_left`?(c.x=Math.sin(o+Math.PI)*a+(r[0].x+i.x)/2,c.y=-Math.cos(o+Math.PI)*a+(r[0].y+i.y)/2):t===`end_right`?(c.x=Math.sin(o-Math.PI)*a+(r[0].x+i.x)/2-5,c.y=-Math.cos(o-Math.PI)*a+(r[0].y+i.y)/2-5):t===`end_left`?(c.x=Math.sin(o)*a+(r[0].x+i.x)/2-5,c.y=-Math.cos(o)*a+(r[0].y+i.y)/2-5):(c.x=Math.sin(o)*a+(r[0].x+i.x)/2,c.y=-Math.cos(o)*a+(r[0].y+i.y)/2),c}t(tt,`calcTerminalLabelPosition`);function K(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}t(K,`getStylesFromArray`);var nt=0,rt=t(()=>(nt++,`id-`+Math.random().toString(36).substr(2,12)+`-`+nt),`generateId`);function it(e){let t=``;for(let n=0;nit(e.length),`random`),ot=t(function(){return{x:0,y:0,fill:void 0,anchor:`start`,style:`#666`,width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:``}},`getTextObj`),st=t(function(e,t){let n=t.text.replace(p.lineBreakRegex,` `),[,r]=Q(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),q=R((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`
    `},n),p.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=Y(`${e} `,n),c=Y(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=ct(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),ct=R((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(Y(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function J(e,t){return X(e,t).height}t(J,`calculateTextHeight`);function Y(e,t){return X(e,t).width}t(Y,`calculateTextWidth`);var X=R((e,t)=>{let{fontSize:n=12,fontFamily:r=`Arial`,fontWeight:i=400}=t;if(!e)return{width:0,height:0};let[,o]=Q(n),s=[`sans-serif`,r],c=e.split(p.lineBreakRegex),l=[],u=a(`body`);if(!u.remove)return{width:0,height:0,lineHeight:0};let d=u.append(`svg`);for(let e of s){let t=0,n={width:0,height:0,lineHeight:0};for(let r of c){let a=ot();a.text=r||`​`;let s=st(d,a).style(`font-size`,o).style(`font-weight`,i).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}l.push(n)}return d.remove(),l[isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),lt=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{t(this,`InitIDGenerator`)}},Z,ut=t(function(e){return Z||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),Z.innerHTML=e,unescape(Z.textContent)},`entityDecode`);function dt(e){return`str`in e}t(dt,`isDetailedError`);var ft=t((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),Q=t(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function $(e,t){return Ve({},e,t)}t($,`cleanAndMerge`);var pt={assignWithDepth:me,wrapLabel:q,calculateTextHeight:J,calculateTextWidth:Y,calculateTextDimensions:X,cleanAndMerge:$,detectInit:Ge,detectDirective:Ke,isSubstringInArray:Je,interpolateToCurve:U,calcLabelPosition:Qe,calcCardinalityPosition:et,calcTerminalLabelPosition:tt,formatUrl:Ye,getStylesFromArray:K,generateId:rt,random:at,runFunc:Xe,entityDecode:ut,insertTitle:ft,isLabelCoordinateInPath:vt,parseFontSize:Q,InitIDGenerator:lt},mt=t(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),ht=t(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),gt=t((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function _t(e){return e??null}t(_t,`handleUndefinedAttr`);function vt(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}t(vt,`isLabelCoordinateInPath`);export{qe as _,Pe as a,rt as c,_t as d,U as f,at as g,Q as h,$ as i,gt as l,He as m,J as n,ht as o,dt as p,Y as r,mt as s,X as t,K as u,pt as v,q as y}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-PLCLPJVV-BfMyJHbe.js b/lecture-01/assets/chunk-PLCLPJVV-BfMyJHbe.js new file mode 100644 index 0000000000000000000000000000000000000000..492e73d090ef05ede83a5e6726dbda23df00c300 --- /dev/null +++ b/lecture-01/assets/chunk-PLCLPJVV-BfMyJHbe.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";function t(e,t,n){if(e&&e.length){let[r,i]=t,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(let t of e){let[e,n]=t;t[0]=(e-r)*o-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*o+i}}}e(t,`t`);function n(e,t){return e[0]===t[0]&&e[1]===t[1]}e(n,`e`);function r(e,r,i,a=1){let o=i,s=Math.max(r,.1),c=e[0]&&e[0][0]&&typeof e[0][0]==`number`?[e]:e,l=[0,0];if(o)for(let e of c)t(e,l,o);let u=(function(e,t,r){let i=[];for(let t of e){let e=[...t];n(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&i.push(e)}let a=[];t=Math.max(t,.1);let o=[];for(let e of i)for(let t=0;te.ymint.ymin?1:e.xt.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax))),!o.length)return a;let s=[],c=o[0].ymin,l=0;for(;s.length||o.length;){if(o.length){let e=-1;for(let t=0;tc);t++)e=t;o.splice(0,e+1).forEach((e=>{s.push({s:c,edge:e})}))}if(s=s.filter((e=>!(e.edge.ymax<=c))),s.sort(((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x))),(r!==1||l%t==0)&&s.length>1)for(let e=0;e=s.length)break;let n=s[e].edge,r=s[t].edge;a.push([[Math.round(n.x),c],[Math.round(r.x),c]])}c+=r,s.forEach((e=>{e.edge.x=e.edge.x+r*e.edge.islope})),l++}return a})(c,s,a);if(o){for(let e of c)t(e,l,-o);(function(e,n,r){let i=[];e.forEach((e=>i.push(...e))),t(i,n,r)})(u,l,-o)}return u}e(r,`s`);function i(e,t){let n=t.hachureAngle+90,i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return t.roughness>=1&&(t.randomizer?.next()||Math.random())>.7&&(a=i),r(e,i,n,a||1)}e(i,`n`);var a=class{static{e(this,`o`)}constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let n=i(e,t);return{type:`fillSketch`,ops:this.renderLines(n,t)}}renderLines(e,t){let n=[];for(let r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}};function o(e){let t=e[0],n=e[1];return Math.sqrt((t[0]-n[0])**2+(t[1]-n[1])**2)}e(o,`a`);var s=class extends a{static{e(this,`h`)}fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);let r=i(e,Object.assign({},t,{hachureGap:n})),a=Math.PI/180*t.hachureAngle,s=[],c=.5*n*Math.cos(a),l=.5*n*Math.sin(a);for(let[e,t]of r)o([e,t])&&s.push([[e[0]-c,e[1]+l],[...t]],[[e[0]+c,e[1]-l],[...t]]);return{type:`fillSketch`,ops:this.renderLines(s,t)}}},c=class extends a{static{e(this,`r`)}fillPolygons(e,t){let n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}},l=class{static{e(this,`i`)}constructor(e){this.helper=e}fillPolygons(e,t){let n=i(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){let n=[],r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);let a=r/4;for(let s of e){let e=o(s),c=e/r,l=Math.ceil(c)-1,u=e-l*r,d=(s[0][0]+s[1][0])/2-r/4,f=Math.min(s[0][1],s[1][1]);for(let e=0;e{let a=o(e),s=Math.floor(a/(n+r)),c=(a+r-s*(n+r))/2,l=e[0],u=e[1];l[0]>u[0]&&(l=e[1],u=e[0]);let d=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let e=0;e{let i=o(e),a=Math.round(i/(2*t)),s=e[0],c=e[1];s[0]>c[0]&&(s=e[1],c=e[0]);let l=Math.atan((c[1]-s[1])/(c[0]-s[0]));for(let e=0;er%2?e+n:e+t));a.push({key:`C`,data:e}),t=e[4],n=e[5];break}case`Q`:a.push({key:`Q`,data:[...s]}),t=s[2],n=s[3];break;case`q`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`Q`,data:e}),t=e[2],n=e[3];break}case`A`:a.push({key:`A`,data:[...s]}),t=s[5],n=s[6];break;case`a`:t+=s[5],n+=s[6],a.push({key:`A`,data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case`H`:a.push({key:`H`,data:[...s]}),t=s[0];break;case`h`:t+=s[0],a.push({key:`H`,data:[t]});break;case`V`:a.push({key:`V`,data:[...s]}),n=s[0];break;case`v`:n+=s[0],a.push({key:`V`,data:[n]});break;case`S`:a.push({key:`S`,data:[...s]}),t=s[2],n=s[3];break;case`s`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`S`,data:e}),t=e[2],n=e[3];break}case`T`:a.push({key:`T`,data:[...s]}),t=s[0],n=s[1];break;case`t`:t+=s[0],n+=s[1],a.push({key:`T`,data:[t,n]});break;case`Z`:case`z`:a.push({key:`Z`,data:[]}),t=r,n=i}return a}e(b,`y`);function x(e){let t=[],n=``,r=0,i=0,a=0,o=0,s=0,c=0;for(let{key:l,data:u}of e){switch(l){case`M`:t.push({key:`M`,data:[...u]}),[r,i]=u,[a,o]=u;break;case`C`:t.push({key:`C`,data:[...u]}),r=u[4],i=u[5],s=u[2],c=u[3];break;case`L`:t.push({key:`L`,data:[...u]}),[r,i]=u;break;case`H`:r=u[0],t.push({key:`L`,data:[r,i]});break;case`V`:i=u[0],t.push({key:`L`,data:[r,i]});break;case`S`:{let e=0,a=0;n===`C`||n===`S`?(e=r+(r-s),a=i+(i-c)):(e=r,a=i),t.push({key:`C`,data:[e,a,...u]}),s=u[0],c=u[1],r=u[2],i=u[3];break}case`T`:{let[e,a]=u,o=0,l=0;n===`Q`||n===`T`?(o=r+(r-s),l=i+(i-c)):(o=r,l=i);let d=r+2*(o-r)/3,f=i+2*(l-i)/3,p=e+2*(o-e)/3,m=a+2*(l-a)/3;t.push({key:`C`,data:[d,f,p,m,e,a]}),s=o,c=l,r=e,i=a;break}case`Q`:{let[e,n,a,o]=u,l=r+2*(e-r)/3,d=i+2*(n-i)/3,f=a+2*(e-a)/3,p=o+2*(n-o)/3;t.push({key:`C`,data:[l,d,f,p,a,o]}),s=e,c=n,r=a,i=o;break}case`A`:{let e=Math.abs(u[0]),n=Math.abs(u[1]),a=u[2],o=u[3],s=u[4],c=u[5],l=u[6];e===0||n===0?(t.push({key:`C`,data:[r,i,c,l,c,l]}),r=c,i=l):(r!==c||i!==l)&&(C(r,i,c,l,e,n,a,o,s).forEach((function(e){t.push({key:`C`,data:e})})),r=c,i=l);break}case`Z`:t.push({key:`Z`,data:[]}),r=a,i=o}n=l}return t}e(x,`m`);function S(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}e(S,`w`);function C(e,t,n,r,i,a,o,s,c,l){let u=(d=o,Math.PI*d/180);var d;let f=[],p=0,m=0,h=0,g=0;if(l)[p,m,h,g]=l;else{[e,t]=S(e,t,-u),[n,r]=S(n,r,-u);let o=(e-n)/2,l=(t-r)/2,d=o*o/(i*i)+l*l/(a*a);d>1&&(d=Math.sqrt(d),i*=d,a*=d);let f=i*i,_=a*a,v=f*_-f*l*l-_*o*o,y=f*l*l+_*o*o,b=(s===c?-1:1)*Math.sqrt(Math.abs(v/y));h=b*i*l/a+(e+n)/2,g=b*-a*o/i+(t+r)/2,p=Math.asin(parseFloat(((t-g)/a).toFixed(9))),m=Math.asin(parseFloat(((r-g)/a).toFixed(9))),em&&(p-=2*Math.PI),!c&&m>p&&(m-=2*Math.PI)}let _=m-p;if(Math.abs(_)>120*Math.PI/180){let e=m,t=n,s=r;m=c&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=C(n=h+i*Math.cos(m),r=g+a*Math.sin(m),t,s,i,a,o,0,c,[m,e,h,g])}_=m-p;let v=Math.cos(p),y=Math.sin(p),b=Math.cos(m),x=Math.sin(m),w=Math.tan(_/4),T=4/3*i*w,E=4/3*a*w,D=[e,t],O=[e+T*y,t-E*v],k=[n+T*x,r-E*b],A=[n,r];if(O[0]=2*D[0]-O[0],O[1]=2*D[1]-O[1],l)return[O,k,A].concat(f);{f=[O,k,A].concat(f);let e=[];for(let t=0;t2){let i=[];for(let t=0;t2*Math.PI&&(p=0,m=2*Math.PI);let h=2*Math.PI/c.curveStepCount,g=Math.min(h/2,(m-p)/2),_=U(g,l,u,d,f,p,m,1,c);if(!c.disableMultiStroke){let e=U(g,l,u,d,f,p,m,1.5,c);_.push(...e)}return o&&(s?_.push(...R(l,u,l+d*Math.cos(p),u+f*Math.sin(p),c),...R(l,u,l+d*Math.cos(m),u+f*Math.sin(m),c)):_.push({op:`lineTo`,data:[l,u]},{op:`lineTo`,data:[l+d*Math.cos(p),u+f*Math.sin(p)]})),{type:`path`,ops:_}}e(j,`A`);function ee(e,t){let n=x(b(y(e))),r=[],i=[0,0],a=[0,0];for(let{key:e,data:o}of n)switch(e){case`M`:a=[o[0],o[1]],i=[o[0],o[1]];break;case`L`:r.push(...R(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case`C`:{let[e,n,i,s,c,l]=o;r.push(...te(e,n,i,s,c,l,a,t)),a=[c,l];break}case`Z`:r.push(...R(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:`path`,ops:r}}e(ee,`_`);function M(e,t){let n=[];for(let r of e)if(r.length){let e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:`move`,data:[r[0][0]+L(e,t),r[0][1]+L(e,t)]});for(let a=1;a500?.4:-.0016668*l+1.233334;let d=a.maxRandomnessOffset||0;d*d*100>c&&(d=l/10);let f=d/2,p=.2+.2*F(a),m=a.bowing*a.maxRandomnessOffset*(i-n)/200,h=a.bowing*a.maxRandomnessOffset*(t-r)/200;m=L(m,a,u),h=L(h,a,u);let g=[],_=e(()=>L(f,a,u),`M`),v=e(()=>L(d,a,u),`k`),y=a.preserveVertices;return o&&(s?g.push({op:`move`,data:[t+(y?0:_()),n+(y?0:_())]}):g.push({op:`move`,data:[t+(y?0:L(d,a,u)),n+(y?0:L(d,a,u))]})),s?g.push({op:`bcurveTo`,data:[m+t+(r-t)*p+_(),h+n+(i-n)*p+_(),m+t+2*(r-t)*p+_(),h+n+2*(i-n)*p+_(),r+(y?0:_()),i+(y?0:_())]}):g.push({op:`bcurveTo`,data:[m+t+(r-t)*p+v(),h+n+(i-n)*p+v(),m+t+2*(r-t)*p+v(),h+n+2*(i-n)*p+v(),r+(y?0:v()),i+(y?0:v())]}),g}e(z,`R`);function B(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+L(t,n),e[0][1]+L(t,n)]),r.push([e[0][0]+L(t,n),e[0][1]+L(t,n)]);for(let i=1;i3){let a=[],o=1-n.curveTightness;i.push({op:`move`,data:[e[1][0],e[1][1]]});for(let t=1;t+21&&i.push(n)):i.push(n),i.push(e[t+3])}else{let r=.5,a=e[t+0],o=e[t+1],s=e[t+2],c=e[t+3],l=q(a,o,r),u=q(o,s,r),d=q(s,c,r),f=q(l,u,r),p=q(u,d,r),m=q(f,p,r);J([a,l,f,m],0,n,i),J([m,p,d,c],0,n,i)}var a,o;return i}e(J,`K`);function re(e,t){return Y(e,0,e.length,t)}e(re,`U`);function Y(e,t,n,r,i){let a=i||[],o=e[t],s=e[n-1],c=0,l=1;for(let r=t+1;rc&&(c=t,l=r)}return Math.sqrt(c)>r?(Y(e,t,l+1,r,a),Y(e,l,n,r,a)):(a.length||a.push(o),a.push(s)),a}e(Y,`X`);function X(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let n=0;n0?Y(r,0,r.length,n):r}e(X,`Y`);var Z=`none`,Q=class{static{e(this,`et`)}constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:`#000`,strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){let a=this._o(i);return this._d(`line`,[T(e,t,n,r,a)],a)}rectangle(e,t,n,r,i){let a=this._o(i),o=[],s=D(e,t,n,r,a);if(a.fill){let i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];a.fillStyle===`solid`?o.push(M([i],a)):o.push(N([i],a))}return a.stroke!==Z&&o.push(s),this._d(`rectangle`,o,a)}ellipse(e,t,n,r,i){let a=this._o(i),o=[],s=k(n,r,a),c=A(e,t,a,s);if(a.fill){if(a.fillStyle===`solid`){let n=A(e,t,a,s).opset;n.type=`fillPath`,o.push(n)}else o.push(N([c.estimatedPoints],a))}return a.stroke!==Z&&o.push(c.opset),this._d(`ellipse`,o,a)}circle(e,t,n,r){let i=this.ellipse(e,t,n,n,r);return i.shape=`circle`,i}linearPath(e,t){let n=this._o(t);return this._d(`linearPath`,[E(e,!1,n)],n)}arc(e,t,n,r,i,a,o=!1,s){let c=this._o(s),l=[],u=j(e,t,n,r,i,a,o,!0,c);if(o&&c.fill){if(c.fillStyle===`solid`){let o=Object.assign({},c);o.disableMultiStroke=!0;let s=j(e,t,n,r,i,a,!0,!1,o);s.type=`fillPath`,l.push(s)}else l.push((function(e,t,n,r,i,a,o){let s=e,c=t,l=Math.abs(n/2),u=Math.abs(r/2);l+=L(.01*l,o),u+=L(.01*u,o);let d=i,f=a;for(;d<0;)d+=2*Math.PI,f+=2*Math.PI;f-d>2*Math.PI&&(d=0,f=2*Math.PI);let p=(f-d)/o.curveStepCount,m=[];for(let e=d;e<=f;e+=p)m.push([s+l*Math.cos(e),c+u*Math.sin(e)]);return m.push([s+l*Math.cos(f),c+u*Math.sin(f)]),m.push([s,c]),N([m],o)})(e,t,n,r,i,a,c))}return c.stroke!==Z&&l.push(u),this._d(`arc`,l,c)}curve(e,t){let n=this._o(t),r=[],i=O(e,n);if(n.fill&&n.fill!==Z){if(n.fillStyle===`solid`){let t=O(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else{let t=[],i=e;if(i.length){let e=typeof i[0][0]==`number`?[i]:i;for(let r of e)r.length<3?t.push(...r):r.length===3?t.push(...X(G([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...X(G(r),10,(1+n.roughness)/2))}t.length&&r.push(N([t],n))}}return n.stroke!==Z&&r.push(i),this._d(`curve`,r,n)}polygon(e,t){let n=this._o(t),r=[],i=E(e,!0,n);return n.fill&&(n.fillStyle===`solid`?r.push(M([e],n)):r.push(N([e],n))),n.stroke!==Z&&r.push(i),this._d(`polygon`,r,n)}path(t,n){let r=this._o(n),i=[];if(!t)return this._d(`path`,i,r);t=(t||``).replace(/\n/g,` `).replace(/(-\s)/g,`-`).replace(`/(ss)/g`,` `);let a=r.fill&&r.fill!==`transparent`&&r.fill!==Z,o=r.stroke!==Z,s=!!(r.simplification&&r.simplification<1),c=(function(t,n,r){let i=x(b(y(t))),a=[],o=[],s=[0,0],c=[],l=e(()=>{c.length>=4&&o.push(...X(c,n)),c=[]},`i`),u=e(()=>{l(),o.length&&(a.push(o),o=[])},`c`);for(let{key:e,data:t}of i)switch(e){case`M`:u(),s=[t[0],t[1]],o.push(s);break;case`L`:l(),o.push([t[0],t[1]]);break;case`C`:if(!c.length){let e=o.length?o[o.length-1]:s;c.push([e[0],e[1]])}c.push([t[0],t[1]]),c.push([t[2],t[3]]),c.push([t[4],t[5]]);break;case`Z`:l(),o.push([s[0],s[1]])}if(u(),!r)return a;let d=[];for(let e of a){let t=re(e,r);t.length&&d.push(t)}return d})(t,1,s?4-4*(r.simplification||1):(1+r.roughness)/2),l=ee(t,r);if(a){if(r.fillStyle===`solid`){if(c.length===1){let e=ee(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:`fillPath`,ops:this._mergedShape(e.ops)})}else i.push(M(c,r))}else i.push(N(c,r))}return o&&(s?c.forEach((e=>{i.push(E(e,!1,r))})):i.push(l)),this._d(`path`,i,r)}opsToPath(e,t){let n=``;for(let r of e.ops){let e=typeof t==`number`&&t>=0?r.data.map((e=>+e.toFixed(t))):r.data;switch(r.op){case`move`:n+=`M${e[0]} ${e[1]} `;break;case`bcurveTo`:n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case`lineTo`:n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){let t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(let e of t){let t=null;switch(e.type){case`path`:t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Z};break;case`fillPath`:t={d:this.opsToPath(e),stroke:Z,strokeWidth:0,fill:n.fill||Z};break;case`fillSketch`:t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||Z,strokeWidth:n,fill:Z}}_mergedShape(e){return e.filter(((e,t)=>t===0||e.op!==`move`))}},ie=class{static{e(this,`st`)}constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext(`2d`),this.gen=new Q(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(let a of t)switch(a.type){case`path`:r.save(),r.strokeStyle=n.stroke===`none`?`transparent`:n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,a,i),r.restore();break;case`fillPath`:{r.save(),r.fillStyle=n.fill||``;let t=e.shape===`curve`||e.shape===`polygon`||e.shape===`path`?`evenodd`:`nonzero`;this._drawToContext(r,a,i,t),r.restore();break}case`fillSketch`:this.fillSketch(r,a,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||``,e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n,r=`nonzero`){e.beginPath();for(let r of t.ops){let t=typeof n==`number`&&n>=0?r.data.map((e=>+e.toFixed(n))):r.data;switch(r.op){case`move`:e.moveTo(t[0],t[1]);break;case`bcurveTo`:e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case`lineTo`:e.lineTo(t[0],t[1])}}t.type===`fillPath`?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a),a}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a),a}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a),a}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i),i}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c),c}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){let n=this.gen.path(e,t);return this.draw(n),n}},$=`http://www.w3.org/2000/svg`,ae=class{static{e(this,`ot`)}constructor(e,t){this.svg=e,this.gen=new Q(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS($,`g`),a=e.options.fixedDecimalPlaceDigits;for(let o of t){let t=null;switch(o.type){case`path`:t=r.createElementNS($,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,n.stroke),t.setAttribute(`stroke-width`,n.strokeWidth+``),t.setAttribute(`fill`,`none`),n.strokeLineDash&&t.setAttribute(`stroke-dasharray`,n.strokeLineDash.join(` `).trim()),n.strokeLineDashOffset&&t.setAttribute(`stroke-dashoffset`,`${n.strokeLineDashOffset}`);break;case`fillPath`:t=r.createElementNS($,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,`none`),t.setAttribute(`stroke-width`,`0`),t.setAttribute(`fill`,n.fill||``),e.shape!==`curve`&&e.shape!==`polygon`||t.setAttribute(`fill-rule`,`evenodd`);break;case`fillSketch`:t=this.fillSketch(r,o,n)}t&&i.appendChild(t)}return i}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);let i=e.createElementNS($,`path`);return i.setAttribute(`d`,this.opsToPath(t,n.fixedDecimalPlaceDigits)),i.setAttribute(`stroke`,n.fill||``),i.setAttribute(`stroke-width`,r+``),i.setAttribute(`fill`,`none`),n.fillLineDash&&i.setAttribute(`stroke-dasharray`,n.fillLineDash.join(` `).trim()),n.fillLineDashOffset&&i.setAttribute(`stroke-dashoffset`,`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a)}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a)}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a)}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i)}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c)}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n)}path(e,t){let n=this.gen.path(e,t);return this.draw(n)}},oe={canvas:e((e,t)=>new ie(e,t),`canvas`),svg:e((e,t)=>new ae(e,t),`svg`),generator:e(e=>new Q(e),`generator`),newSeed:e(()=>Q.newSeed(),`newSeed`)};export{oe as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-PTVI3W5X-DVfdoxm6.js b/lecture-01/assets/chunk-PTVI3W5X-DVfdoxm6.js new file mode 100644 index 0000000000000000000000000000000000000000..685793296e6e2ca4c85b3741a702ea921abab6cd --- /dev/null +++ b/lecture-01/assets/chunk-PTVI3W5X-DVfdoxm6.js @@ -0,0 +1 @@ +var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,n)=>t(e,`name`,{value:n,configurable:!0}),s=(e,t)=>function(){return t||(0,e[r(e)[0]])((t={exports:{}}).exports,t),t.exports},c=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(let c of r(i))!a.call(e,c)&&c!==o&&t(e,c,{get:()=>i[c],enumerable:!(s=n(i,c))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));export{u as i,c as n,o as r,s as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-PWCFYZI5-Dz1excih.js b/lecture-01/assets/chunk-PWCFYZI5-Dz1excih.js new file mode 100644 index 0000000000000000000000000000000000000000..6c47a07db301818f3549e74eaec6c2fc8d64f9cd --- /dev/null +++ b/lecture-01/assets/chunk-PWCFYZI5-Dz1excih.js @@ -0,0 +1,32 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";function t(e){return e==null}e(t,`isNothing`);function n(e){return typeof e==`object`&&!!e}e(n,`isObject`);function r(e){return Array.isArray(e)?e:t(e)?[]:[e]}e(r,`toArray`);function i(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;ns&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}e(d,`getLine`);function f(e,t){return s.repeat(` `,t-e.length)+e}e(f,`padStart`);function p(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!=`number`&&(t.indent=1),typeof t.linesBefore!=`number`&&(t.linesBefore=3),typeof t.linesAfter!=`number`&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],a,o=-1;a=n.exec(e.buffer);)i.push(a.index),r.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var c=``,l,u,p=Math.min(e.line+t.linesAfter,i.length).toString().length,m=t.maxLength-(t.indent+p+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)u=d(e.buffer,r[o-l],i[o-l],e.position-(r[o]-r[o-l]),m),c=s.repeat(` `,t.indent)+f((e.line-l+1).toString(),p)+` | `+u.str+` +`+c;for(u=d(e.buffer,r[o],i[o],e.position,m),c+=s.repeat(` `,t.indent)+f((e.line+1).toString(),p)+` | `+u.str+` +`,c+=s.repeat(`-`,t.indent+p+3+u.pos)+`^ +`,l=1;l<=t.linesAfter&&!(o+l>=i.length);l++)u=d(e.buffer,r[o+l],i[o+l],e.position-(r[o]-r[o+l]),m),c+=s.repeat(` `,t.indent)+f((e.line+l+1).toString(),p)+` | `+u.str+` +`;return c.replace(/\n$/,``)}e(p,`makeSnippet`);var m=p,h=[`kind`,`multi`,`resolve`,`construct`,`instanceOf`,`predicate`,`represent`,`representName`,`defaultStyle`,`styleAliases`],g=[`scalar`,`sequence`,`mapping`];function _(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}e(_,`compileStyleAliases`);function v(e,t){if(t||={},Object.keys(t).forEach(function(t){if(h.indexOf(t)===-1)throw new u(`Unknown option "`+t+`" is met in definition of "`+e+`" YAML type.`)}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=_(t.styleAliases||null),g.indexOf(this.kind)===-1)throw new u(`Unknown kind "`+this.kind+`" is specified for "`+e+`" YAML type.`)}e(v,`Type$1`);var y=v;function b(e,t){var n=[];return e[t].forEach(function(e){var t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}e(b,`compileList`);function ee(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,r;function i(e){e.multi?(t.multi[e.kind].push(e),t.multi.fallback.push(e)):t[e.kind][e.tag]=t.fallback[e.tag]=e}for(e(i,`collectType`),n=0,r=arguments.length;n=0?`0b`+e.toString(2):`-0b`+e.toString(2).slice(1)},`binary`),octal:e(function(e){return e>=0?`0o`+e.toString(8):`-0o`+e.toString(8).slice(1)},`octal`),decimal:e(function(e){return e.toString(10)},`decimal`),hexadecimal:e(function(e){return e>=0?`0x`+e.toString(16).toUpperCase():`-0x`+e.toString(16).toUpperCase().slice(1)},`hexadecimal`)},defaultStyle:`decimal`,styleAliases:{binary:[2,`bin`],octal:[8,`oct`],decimal:[10,`dec`],hexadecimal:[16,`hex`]}}),_e=RegExp(`^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function ve(e){return!(e===null||!_e.test(e)||e[e.length-1]===`_`)}e(ve,`resolveYamlFloat`);function ye(e){var t=e.replace(/_/g,``).toLowerCase(),n=t[0]===`-`?-1:1;return`+-`.indexOf(t[0])>=0&&(t=t.slice(1)),t===`.inf`?n===1?1/0:-1/0:t===`.nan`?NaN:n*parseFloat(t,10)}e(ye,`constructYamlFloat`);var be=/^[-+]?[0-9]+e/;function xe(e,t){var n;if(isNaN(e))switch(t){case`lowercase`:return`.nan`;case`uppercase`:return`.NAN`;case`camelcase`:return`.NaN`}else if(e===1/0)switch(t){case`lowercase`:return`.inf`;case`uppercase`:return`.INF`;case`camelcase`:return`.Inf`}else if(e===-1/0)switch(t){case`lowercase`:return`-.inf`;case`uppercase`:return`-.INF`;case`camelcase`:return`-.Inf`}else if(s.isNegativeZero(e))return`-0.0`;return n=e.toString(10),be.test(n)?n.replace(`e`,`.e`):n}e(xe,`representYamlFloat`);function Se(e){return Object.prototype.toString.call(e)===`[object Number]`&&(e%1!=0||s.isNegativeZero(e))}e(Se,`isFloat`);var Ce=new y(`tag:yaml.org,2002:float`,{kind:`scalar`,resolve:ve,construct:ye,predicate:Se,represent:xe,defaultStyle:`lowercase`}),we=te.extend({implicit:[ae,le,ge,Ce]}),Te=we,Ee=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),De=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$`);function Oe(e){return e===null?!1:Ee.exec(e)!==null||De.exec(e)!==null}e(Oe,`resolveYamlTimestamp`);function ke(e){var t,n,r,i,a,o,s,c=0,l=null,u,d,f;if(t=Ee.exec(e),t===null&&(t=De.exec(e)),t===null)throw Error(`Date resolve error`);if(n=+t[1],r=t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+=`0`;c=+c}return t[9]&&(u=+t[10],d=+(t[11]||0),l=(u*60+d)*6e4,t[9]===`-`&&(l=-l)),f=new Date(Date.UTC(n,r,i,a,o,s,c)),l&&f.setTime(f.getTime()-l),f}e(ke,`constructYamlTimestamp`);function Ae(e){return e.toISOString()}e(Ae,`representYamlTimestamp`);var je=new y(`tag:yaml.org,2002:timestamp`,{kind:`scalar`,resolve:Oe,construct:ke,instanceOf:Date,represent:Ae});function Me(e){return e===`<<`||e===null}e(Me,`resolveYamlMerge`);var Ne=new y(`tag:yaml.org,2002:merge`,{kind:`scalar`,resolve:Me}),S=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function Pe(e){if(e===null)return!1;var t,n,r=0,i=e.length,a=S;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8==0}e(Pe,`resolveYamlBinary`);function Fe(e){var t,n,r=e.replace(/[\r\n=]/g,``),i=r.length,a=S,o=0,s=[];for(t=0;t>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(r.charAt(t));return n=i%4*6,n===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):n===18?(s.push(o>>10&255),s.push(o>>2&255)):n===12&&s.push(o>>4&255),new Uint8Array(s)}e(Fe,`constructYamlBinary`);function Ie(e){var t=``,n=0,r,i,a=e.length,o=S;for(r=0;r>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]),n=(n<<8)+e[r];return i=a%3,i===0?(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]):i===2?(t+=o[n>>10&63],t+=o[n>>4&63],t+=o[n<<2&63],t+=o[64]):i===1&&(t+=o[n>>2&63],t+=o[n<<4&63],t+=o[64],t+=o[64]),t}e(Ie,`representYamlBinary`);function Le(e){return Object.prototype.toString.call(e)===`[object Uint8Array]`}e(Le,`isBinary`);var Re=new y(`tag:yaml.org,2002:binary`,{kind:`scalar`,resolve:Pe,construct:Fe,predicate:Le,represent:Ie}),ze=Object.prototype.hasOwnProperty,Be=Object.prototype.toString;function Ve(e){if(e===null)return!0;var t=[],n,r,i,a,o,s=e;for(n=0,r=s.length;n>10)+55296,(e-65536&1023)+56320)}e(ft,`charFromCodepoint`);function pt(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}e(pt,`setProperty`);var mt=Array(256),ht=Array(256);for(M=0;M<256;M++)mt[M]=+!!dt(M),ht[M]=dt(M);var M;function gt(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Qe,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}e(gt,`State$1`);function _t(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=m(n),new u(t,n)}e(_t,`generateError`);function N(e,t){throw _t(e,t)}e(N,`throwError`);function P(e,t){e.onWarning&&e.onWarning.call(null,_t(e,t))}e(P,`throwWarning`);var vt={YAML:e(function(e,t,n){var r,i,a;e.version!==null&&N(e,`duplication of %YAML directive`),n.length!==1&&N(e,`YAML directive accepts exactly one argument`),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&N(e,`ill-formed argument of the YAML directive`),i=parseInt(r[1],10),a=parseInt(r[2],10),i!==1&&N(e,`unacceptable YAML version of the document`),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&P(e,`unsupported YAML version of the document`)},`handleYamlDirective`),TAG:e(function(e,t,n){var r,i;n.length!==2&&N(e,`TAG directive accepts exactly two arguments`),r=n[0],i=n[1],ot.test(r)||N(e,`ill-formed tag handle (first argument) of the TAG directive`),C.call(e.tagMap,r)&&N(e,`there is a previously declared suffix for "`+r+`" tag handle`),st.test(i)||N(e,`ill-formed tag prefix (second argument) of the TAG directive`);try{i=decodeURIComponent(i)}catch{N(e,`tag prefix is malformed: `+i)}e.tagMap[r]=i},`handleTagDirective`)};function F(e,t,n,r){var i,a,o,s;if(t1&&(e.result+=s.repeat(` +`,t-1))}e(B,`writeFoldedLines`);function bt(e,t,n){var r,i,a,o,s,c,l,u,d=e.kind,f=e.result,p=e.input.charCodeAt(e.position);if(A(p)||j(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),A(i)||n&&j(i)))return!1;for(e.kind=`scalar`,e.result=``,a=o=e.position,s=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),A(i)||n&&j(i))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),A(r))break}else if(e.position===e.lineStart&&z(e)||n&&j(p))break;else if(O(p)){if(c=e.line,l=e.lineStart,u=e.lineIndent,R(e,!1,-1),e.lineIndent>=t){s=!0,p=e.input.charCodeAt(e.position);continue}e.position=o,e.line=c,e.lineStart=l,e.lineIndent=u;break}s&&=(F(e,a,o,!1),B(e,e.line-c),a=o=e.position,!1),k(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return F(e,a,o,!1),e.result?!0:(e.kind=d,e.result=f,!1)}e(bt,`readPlainScalar`);function xt(e,t){var n=e.input.charCodeAt(e.position),r,i;if(n!==39)return!1;for(e.kind=`scalar`,e.result=``,e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39){if(F(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0}else O(n)?(F(e,r,i,!0),B(e,R(e,!1,t)),r=i=e.position):e.position===e.lineStart&&z(e)?N(e,`unexpected end of the document within a single quoted scalar`):(e.position++,i=e.position);N(e,`unexpected end of the stream within a single quoted scalar`)}e(xt,`readSingleQuotedScalar`);function St(e,t){var n,r,i,a,o,s=e.input.charCodeAt(e.position);if(s!==34)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(s=e.input.charCodeAt(e.position))!==0;)if(s===34)return F(e,n,e.position,!0),e.position++,!0;else if(s===92){if(F(e,n,e.position,!0),s=e.input.charCodeAt(++e.position),O(s))R(e,!1,t);else if(s<256&&mt[s])e.result+=ht[s],e.position++;else if((o=lt(s))>0){for(i=o,a=0;i>0;i--)s=e.input.charCodeAt(++e.position),(o=ct(s))>=0?a=(a<<4)+o:N(e,`expected hexadecimal character`);e.result+=ft(a),e.position++}else N(e,`unknown escape sequence`);n=r=e.position}else O(s)?(F(e,n,r,!0),B(e,R(e,!1,t)),n=r=e.position):e.position===e.lineStart&&z(e)?N(e,`unexpected end of the document within a double quoted scalar`):(e.position++,r=e.position);N(e,`unexpected end of the stream within a double quoted scalar`)}e(St,`readDoubleQuotedScalar`);function Ct(e,t){var n=!0,r,i,a,o=e.tag,s,c=e.anchor,l,u,d,f,p,m=Object.create(null),h,g,_,v=e.input.charCodeAt(e.position);if(v===91)u=93,p=!1,s=[];else if(v===123)u=125,p=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),v=e.input.charCodeAt(++e.position);v!==0;){if(R(e,!0,t),v=e.input.charCodeAt(e.position),v===u)return e.position++,e.tag=o,e.anchor=c,e.kind=p?`mapping`:`sequence`,e.result=s,!0;n?v===44&&N(e,`expected the node content, but found ','`):N(e,`missed comma between flow collection entries`),g=h=_=null,d=f=!1,v===63&&(l=e.input.charCodeAt(e.position+1),A(l)&&(d=f=!0,e.position++,R(e,!0,t))),r=e.line,i=e.lineStart,a=e.position,V(e,t,w,!1,!0),g=e.tag,h=e.result,R(e,!0,t),v=e.input.charCodeAt(e.position),(f||e.line===r)&&v===58&&(d=!0,v=e.input.charCodeAt(++e.position),R(e,!0,t),V(e,t,w,!1,!0),_=e.result),p?I(e,s,m,g,h,_,r,i,a):d?s.push(I(e,null,m,g,h,_,r,i,a)):s.push(h),R(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(n=!0,v=e.input.charCodeAt(++e.position)):n=!1}N(e,`unexpected end of the stream within a flow collection`)}e(Ct,`readFlowCollection`);function wt(e,t){var n,r,i=E,a=!1,o=!1,c=t,l=0,u=!1,d,f=e.input.charCodeAt(e.position);if(f===124)r=!1;else if(f===62)r=!0;else return!1;for(e.kind=`scalar`,e.result=``;f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)E===i?i=f===43?nt:tt:N(e,`repeat of a chomping mode identifier`);else if((d=ut(f))>=0)d===0?N(e,`bad explicit indentation width of a block scalar; it cannot be less than one`):o?N(e,`repeat of an indentation width identifier`):(c=t+d-1,o=!0);else break;if(k(f)){do f=e.input.charCodeAt(++e.position);while(k(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!O(f)&&f!==0)}for(;f!==0;){for(L(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!o||e.lineIndentc&&(c=e.lineIndent),O(f)){l++;continue}if(e.lineIndentt)&&c!==0)N(e,`bad indentation of a sequence entry`);else if(e.lineIndentt)&&(g&&(o=e.line,s=e.lineStart,c=e.position),V(e,t,T,!0,i)&&(g?m=e.result:h=e.result),g||(I(e,d,f,p,m,h,o,s,c),p=m=h=null),R(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&v!==0)N(e,`bad indentation of a mapping entry`);else if(e.lineIndentt?c=1:e.lineIndent===t?c=0:e.lineIndentt?c=1:e.lineIndent===t?c=0:e.lineIndent tag; it should be "scalar", not "`+e.kind+`"`),d=0,f=e.implicitTypes.length;d`),e.result!==null&&m.kind!==e.kind&&N(e,`unacceptable node kind for !<`+e.tag+`> tag; it should be "`+m.kind+`", not "`+e.kind+`"`),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):N(e,`cannot resolve a node with !<`+e.tag+`> explicit tag`)}return e.listener!==null&&e.listener(`close`,e),e.tag!==null||e.anchor!==null||u}e(V,`composeNode`);function At(e){var t=e.position,n,r,i,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(R(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!A(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&N(e,`directive name must not be less than one character in length`);o!==0;){for(;k(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!O(o));break}if(O(o))break;for(n=e.position;o!==0&&!A(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}o!==0&&L(e),C.call(vt,r)?vt[r](e,r,i):P(e,`unknown document directive "`+r+`"`)}if(R(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,R(e,!0,-1)):a&&N(e,`directives end mark is expected`),V(e,e.lineIndent-1,T,!1,!0),R(e,!0,-1),e.checkLineBreaks&&it.test(e.input.slice(t,e.position))&&P(e,`non-ASCII line breaks are interpreted as content`),e.documents.push(e.result),e.position===e.lineStart&&z(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,R(e,!0,-1));return}if(e.position=55296&&n<=56319&&t+1=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}e(Y,`codePointAt`);function yn(e){return/^\n* /.test(e)}e(yn,`needIndentIndicator`);var bn=1,xn=2,Sn=3,Cn=4,X=5;function wn(e,t,n,r,i,a,o,s){var c,l=0,u=null,d=!1,f=!1,p=r!==-1,m=-1,h=_n(Y(e,0))&&vn(Y(e,e.length-1));if(t||o)for(c=0;c=65536?c+=2:c++){if(l=Y(e,c),!J(l))return X;h&&=gn(l,u,s),u=l}else{for(c=0;c=65536?c+=2:c++){if(l=Y(e,c),l===H)d=!0,p&&(f||=c-m-1>r&&e[m+1]!==` `,m=c);else if(!J(l))return X;h&&=gn(l,u,s),u=l}f||=p&&c-m-1>r&&e[m+1]!==` `}return!d&&!f?h&&!o&&!i(e)?bn:a===G?X:xn:n>9&&yn(e)?X:o?a===G?X:xn:f?Cn:Sn}e(wn,`chooseScalarStyle`);function Tn(t,n,r,i,a){t.dump=(function(){if(n.length===0)return t.quotingType===G?`""`:`''`;if(!t.noCompatMode&&(sn.indexOf(n)!==-1||cn.test(n)))return t.quotingType===G?`"`+n+`"`:`'`+n+`'`;var o=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),c=i||t.flowLevel>-1&&r>=t.flowLevel;function l(e){return mn(t,e)}switch(e(l,`testAmbiguity`),wn(n,c,t.indent,s,l,t.quotingType,t.forceQuotes&&!i,a)){case bn:return n;case xn:return`'`+n.replace(/'/g,`''`)+`'`;case Sn:return`|`+En(n,t.indent)+Dn(pn(n,o));case Cn:return`>`+En(n,t.indent)+Dn(pn(On(n,s),o));case X:return`"`+An(n)+`"`;default:throw new u(`impossible error: invalid scalar style`)}})()}e(Tn,`writeScalar`);function En(e,t){var n=yn(e)?String(t):``,r=e[e.length-1]===` +`;return n+(r&&(e[e.length-2]===` +`||e===` +`)?`+`:r?``:`-`)+` +`}e(En,`blockHeader`);function Dn(e){return e[e.length-1]===` +`?e.slice(0,-1):e}e(Dn,`dropEndingNewline`);function On(e,t){for(var n=/(\n+)([^\n]*)/g,r=(function(){var r=e.indexOf(` +`);return r=r===-1?e.length:r,n.lastIndex=r,kn(e.slice(0,r),t)})(),i=e[0]===` +`||e[0]===` `,a,o;o=n.exec(e);){var s=o[1],c=o[2];a=c[0]===` `,r+=s+(!i&&!a&&c!==``?` +`:``)+kn(c,t),i=a}return r}e(On,`foldString`);function kn(e,t){if(e===``||e[0]===` `)return e;for(var n=/ [^ ]/g,r,i=0,a,o=0,s=0,c=``;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,c+=` +`+e.slice(i,a),i=a+1),o=s;return c+=` +`,e.length-i>t&&o>i?c+=e.slice(i,o)+` +`+e.slice(o+1):c+=e.slice(i),c.slice(1)}e(kn,`foldLine`);function An(e){for(var t=``,n=0,r,i=0;i=65536?i+=2:i++)n=Y(e,i),r=W[n],!r&&J(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||un(n);return t}e(An,`escapeString`);function jn(e,t,n){var r=``,i=e.tag,a,o,s;for(a=0,o=n.length;a1024&&(u+=`? `),u+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),Q(e,t,l,!1,!1)&&(u+=e.dump,r+=u));e.tag=i,e.dump=`{`+r+`}`}e(Nn,`writeFlowMapping`);function Pn(e,t,n,r){var i=``,a=e.tag,o=Object.keys(n),s,c,l,d,f,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys==`function`)o.sort(e.sortKeys);else if(e.sortKeys)throw new u(`sortKeys must be a boolean or a function`);for(s=0,c=o.length;s1024,f&&(e.dump&&H===e.dump.charCodeAt(0)?p+=`?`:p+=`? `),p+=e.dump,f&&(p+=K(e,t)),Q(e,t+1,d,!0,f)&&(e.dump&&H===e.dump.charCodeAt(0)?p+=`:`:p+=`: `,p+=e.dump,i+=p));e.tag=a,e.dump=i||`{}`}e(Pn,`writeBlockMapping`);function Z(e,t,n){var r,i=n?e.explicitTypes:e.implicitTypes,a,o,s,c;for(a=0,o=i.length;a tag resolver accepts not "`+c+`" style`);e.dump=r}return!0}return!1}e(Z,`detectType`);function Q(e,t,n,r,i,a,o){e.tag=null,e.dump=n,Z(e,n,!1)||Z(e,n,!0);var s=Ft.call(e.dump),c=r,l;r&&=e.flowLevel<0||e.flowLevel>t;var d=s===`[object Object]`||s===`[object Array]`,f,p;if(d&&(f=e.duplicates.indexOf(n),p=f!==-1),(e.tag!==null&&e.tag!==`?`||p||e.indent!==2&&t>0)&&(i=!1),p&&e.usedDuplicates[f])e.dump=`*ref_`+f;else{if(d&&p&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),s===`[object Object]`)r&&Object.keys(e.dump).length!==0?(Pn(e,t,e.dump,i),p&&(e.dump=`&ref_`+f+e.dump)):(Nn(e,t,e.dump),p&&(e.dump=`&ref_`+f+` `+e.dump));else if(s===`[object Array]`)r&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?Mn(e,t-1,e.dump,i):Mn(e,t,e.dump,i),p&&(e.dump=`&ref_`+f+e.dump)):(jn(e,t,e.dump),p&&(e.dump=`&ref_`+f+` `+e.dump));else if(s===`[object String]`)e.tag!==`?`&&Tn(e,e.dump,t,a,c);else if(s===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new u(`unacceptable kind of an object to dump `+s)}e.tag!==null&&e.tag!==`?`&&(l=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`),l=e.tag[0]===`!`?`!`+l:l.slice(0,18)===`tag:yaml.org,2002:`?`!!`+l.slice(18):`!<`+l+`>`,e.dump=l+` `+e.dump)}return!0}e(Q,`writeNode`);function Fn(e,t){var n=[],r=[],i,a;for($(e,n,r),i=0,a=r.length;ir(e,n()),`sanitizeText`),h=e(e=>{switch(e.type){case`terminal`:return{...e,value:m(e.value)};case`nonterminal`:return{...e,name:m(e.name)};case`sequence`:return{...e,elements:e.elements.map(h)};case`choice`:return{...e,alternatives:e.alternatives.map(h)};case`optional`:return{...e,element:h(e.element)};case`repetition`:return{...e,element:h(e.element),separator:e.separator?h(e.separator):void 0};case`special`:return{...e,text:m(e.text)}}},`sanitizeAstNode`),g=e(()=>{l=``,u=``,d=``,f.length=0,p.clear(),s(),t.debug(`[Railroad] Database cleared`)},`clear`),_=e(e=>{l=m(e),t.debug(`[Railroad] Title set:`,e)},`setTitle`),v=e(()=>l,`getTitle`),y={clear:g,setTitle:_,getTitle:v,addRule:e(e=>{let n={...e,name:m(e.name),definition:h(e.definition),comment:e.comment?m(e.comment):void 0};t.debug(`[Railroad] Adding rule:`,n.name),p.has(n.name)&&t.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`),f.push(n),p.set(n.name,n)},`addRule`),getRules:e(()=>f,`getRules`),getRule:e(e=>p.get(e),`getRule`),setAccTitle:e(e=>{u=m(e).replace(/^\s+/g,``),t.debug(`[Railroad] Accessibility title set:`,e)},`setAccTitle`),getAccTitle:e(()=>u,`getAccTitle`),setAccDescription:e(e=>{d=m(e).replace(/\n\s+/g,` +`),t.debug(`[Railroad] Accessibility description set:`,e)},`setAccDescription`),getAccDescription:e(()=>d,`getAccDescription`),setDiagramTitle:_,getDiagramTitle:v},b={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},x=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,S=/^[\w "',.-]+$/,C=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`]),w=e(e=>e?Object.keys(e).every(e=>e===`railroad`||C.has(e)):!1,`isRailroadStyleOptions`),T=e(e=>e?`railroad`in e&&e.railroad?e.railroad:w(e)?e:{}:{},`extractRailroadOverrides`),E=e(e=>{if(!e||w(e))return{};let{railroad:t,svgId:n,theme:r,look:i,...a}=e;return a},`extractThemeOverrides`),D=e((e,t)=>{if(typeof e!=`string`)return t;let n=e.trim();return x.test(n)?n:t},`sanitizeColorValue`),O=e((e,t)=>{if(typeof e!=`string`)return t;let n=e.trim();return S.test(n)?n:t},`sanitizeFontFamilyValue`),k=e((e,t)=>{let n=typeof e==`number`?e:typeof e==`string`?Number.parseFloat(e):NaN;return Number.isFinite(n)&&n>=0?n:t},`sanitizeNumberValue`),A=e(e=>{let t=typeof e==`number`?e:typeof e==`string`?Number.parseFloat(e):NaN;return Number.isFinite(t)&&t>0?t:void 0},`parseThemeFontSize`),j=e(e=>{let t=O(e.fontFamily,b.fontFamily),n=A(e.fontSize)??b.fontSize;return{...b,fontFamily:t,fontSize:n,terminalFill:D(e.secondBkg??e.secondaryColor,b.terminalFill),terminalStroke:D(e.secondaryBorderColor??e.lineColor,b.terminalStroke),terminalTextColor:D(e.secondaryTextColor??e.textColor,b.terminalTextColor),nonTerminalFill:D(e.mainBkg??e.background,b.nonTerminalFill),nonTerminalStroke:D(e.primaryBorderColor??e.lineColor,b.nonTerminalStroke),nonTerminalTextColor:D(e.primaryTextColor??e.textColor,b.nonTerminalTextColor),lineColor:D(e.lineColor,b.lineColor),markerFill:D(e.lineColor,b.markerFill),commentFill:D(e.labelBackground??e.tertiaryColor,b.commentFill),commentStroke:D(e.tertiaryBorderColor??e.lineColor,b.commentStroke),commentTextColor:D(e.tertiaryTextColor??e.textColor,b.commentTextColor),specialFill:D(e.tertiaryColor??e.secondaryColor,b.specialFill),specialStroke:D(e.tertiaryBorderColor??e.secondaryBorderColor,b.specialStroke),ruleNameColor:D(e.titleColor??e.textColor,b.ruleNameColor)}},`buildThemeDefaults`),M=e(e=>{let t=i(),n=j({...a(),...t.themeVariables??{},...E(e)}),r={...t.railroad??{},...T(e)};return{compactMode:r.compactMode??n.compactMode,padding:k(r.padding,n.padding),verticalSeparation:k(r.verticalSeparation,n.verticalSeparation),horizontalSeparation:k(r.horizontalSeparation,n.horizontalSeparation),arcRadius:k(r.arcRadius,n.arcRadius),fontSize:k(r.fontSize,n.fontSize),fontFamily:O(r.fontFamily,n.fontFamily),terminalFill:D(r.terminalFill,n.terminalFill),terminalStroke:D(r.terminalStroke,n.terminalStroke),terminalTextColor:D(r.terminalTextColor,n.terminalTextColor),nonTerminalFill:D(r.nonTerminalFill,n.nonTerminalFill),nonTerminalStroke:D(r.nonTerminalStroke,n.nonTerminalStroke),nonTerminalTextColor:D(r.nonTerminalTextColor,n.nonTerminalTextColor),lineColor:D(r.lineColor,n.lineColor),strokeWidth:k(r.strokeWidth,n.strokeWidth),markerFill:D(r.markerFill,n.markerFill),commentFill:D(r.commentFill,n.commentFill),commentStroke:D(r.commentStroke,n.commentStroke),commentTextColor:D(r.commentTextColor,n.commentTextColor),specialFill:D(r.specialFill,n.specialFill),specialStroke:D(r.specialStroke,n.specialStroke),ruleNameColor:D(r.ruleNameColor,n.ruleNameColor),showMarkers:r.showMarkers??n.showMarkers,markerRadius:k(r.markerRadius,n.markerRadius)}},`buildRailroadStyleOptions`),N=e(e=>{let{fontFamily:t,fontSize:n,terminalFill:r,terminalStroke:i,terminalTextColor:a,nonTerminalFill:o,nonTerminalStroke:s,nonTerminalTextColor:c,lineColor:l,strokeWidth:u,markerFill:d,commentFill:f,commentStroke:p,commentTextColor:m,specialFill:h,specialStroke:g,ruleNameColor:_}=M(e);return` + .railroad-diagram { + font-family: ${t}; + font-size: ${n}px; + } + + .railroad-terminal rect { + fill: ${r}; + stroke: ${i}; + stroke-width: ${u}px; + } + + .railroad-terminal text { + fill: ${a}; + font-family: ${t}; + font-size: ${n}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-nonterminal rect { + fill: ${o}; + stroke: ${s}; + stroke-width: ${u}px; + } + + .railroad-nonterminal text { + fill: ${c}; + font-family: ${t}; + font-size: ${n}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-line { + stroke: ${l}; + stroke-width: ${u}px; + fill: none; + } + + .railroad-start circle, + .railroad-end circle { + fill: ${d}; + } + + .railroad-comment ellipse { + fill: ${f}; + stroke: ${p}; + stroke-width: ${u}px; + } + + .railroad-comment text { + fill: ${m}; + font-style: italic; + font-family: ${t}; + font-size: ${n}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-special rect { + fill: ${h}; + stroke: ${g}; + stroke-width: ${u}px; + stroke-dasharray: 5,3; + } + + .railroad-special text { + fill: ${c}; + font-family: ${t}; + font-size: ${n}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-rule-name { + font-weight: bold; + fill: ${_}; + font-family: ${t}; + font-size: ${n}px; + } + + .railroad-group { + /* Grouping container, no specific styles */ + } +`},`getStyles`),P=class{constructor(){this.d=``}static{e(this,`PathBuilder`)}moveTo(e,t){return this.d+=`M ${e} ${t} `,this}lineTo(e,t){return this.d+=`L ${e} ${t} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,t,n,r,i,a,o){return this.d+=`A ${e} ${t} ${n} ${+!!r} ${+!!i} ${a} ${o} `,this}build(){return this.d.trim()}},F=class{constructor(e,t=M()){this.textCache=new Map,this.svg=e,this.config=t}static{e(this,`RailroadRenderer`)}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);let t=this.svg.append(`text`).attr(`font-family`,this.config.fontFamily).attr(`font-size`,this.config.fontSize).text(e),n=t.node().getBBox(),r={width:n.width,height:n.height};return t.remove(),this.textCache.set(e,r),r}renderTerminal(e,t){let n=this.measureText(t),r=n.width+this.config.padding*2,i=n.height+this.config.padding*2,a=e.append(`g`).attr(`class`,`railroad-terminal`);return a.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,r).attr(`height`,i).attr(`rx`,10).attr(`ry`,10),a.append(`text`).attr(`x`,r/2).attr(`y`,i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderNonTerminal(e,t){let n=this.measureText(t),r=n.width+this.config.padding*2,i=n.height+this.config.padding*2,a=e.append(`g`).attr(`class`,`railroad-nonterminal`);return a.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,r).attr(`height`,i),a.append(`text`).attr(`x`,r/2).attr(`y`,i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderSequence(e,t){let n=t.map(t=>this.renderExpression(e,t)),r=0,i=0,a=0;for(let e of n)r+=e.dimensions.width,i=Math.max(i,e.dimensions.up),a=Math.max(a,e.dimensions.down);r+=(n.length-1)*this.config.horizontalSeparation;let o=e.append(`g`).attr(`class`,`railroad-sequence`),s=0;for(let e=0;ethis.renderExpression(e,t)),r=0,i=0;for(let e of n)r=Math.max(r,e.dimensions.width),i+=e.dimensions.height;i+=(n.length-1)*this.config.verticalSeparation;let a=this.config.arcRadius,o=a*4,s=r+o,c=e.append(`g`).attr(`class`,`railroad-choice`),l=0,u=i/2;for(let e of n){let t=l,n=t+e.dimensions.up,i=a*2+(r-e.dimensions.width)/2;c.node().appendChild(e.element).setAttribute(`transform`,`translate(${i}, ${t})`);let o=new P,d=n>u;n===u?o.moveTo(0,u).lineTo(i,n):o.moveTo(0,u).arcTo(a,a,0,!1,d,a,u+(d?a:-a)).lineTo(a,n-(d?a:-a)).arcTo(a,a,0,!1,!d,a*2,n).lineTo(i,n),c.append(`path`).attr(`class`,`railroad-line`).attr(`d`,o.build());let f=new P,p=i+e.dimensions.width,m=s-a*2;n===u?f.moveTo(p,n).lineTo(s,u):f.moveTo(p,n).lineTo(m,n).arcTo(a,a,0,!1,!d,s-a,n+(d?-a:a)).lineTo(s-a,u+(d?a:-a)).arcTo(a,a,0,!1,d,s,u),c.append(`path`).attr(`class`,`railroad-line`).attr(`d`,f.build()),l+=e.dimensions.height+this.config.verticalSeparation}return{element:c.node(),dimensions:{width:s,height:i,up:u,down:i-u}}}renderOptional(e,t){let n=this.renderExpression(e,t),r=this.config.arcRadius,i=r*2,a=n.dimensions.width+r*4,o=n.dimensions.height+i,s=e.append(`g`).attr(`class`,`railroad-optional`),c=r*2,l=i;s.node().appendChild(n.element).setAttribute(`transform`,`translate(${c}, ${l})`);let u=l+n.dimensions.up,d=new P().moveTo(0,u).lineTo(r*2,u);s.append(`path`).attr(`class`,`railroad-line`).attr(`d`,d.build());let f=new P().moveTo(c+n.dimensions.width,u).lineTo(a,u);s.append(`path`).attr(`class`,`railroad-line`).attr(`d`,f.build());let p=new P().moveTo(0,u).arcTo(r,r,0,!1,!1,r,u-r).lineTo(r,r).arcTo(r,r,0,!1,!0,r*2,0).lineTo(a-r*2,0).arcTo(r,r,0,!1,!0,a-r,r).lineTo(a-r,u-r).arcTo(r,r,0,!1,!1,a,u);return s.append(`path`).attr(`class`,`railroad-line`).attr(`d`,p.build()),{element:s.node(),dimensions:{width:a,height:o,up:u,down:o-u}}}renderRepetition(e,t,n){let r=this.renderExpression(e,t),i=this.config.arcRadius,a=i*2,o=r.dimensions.width+i*4,s=n===0,c=r.dimensions.height+a+(s?a:0),l=e.append(`g`).attr(`class`,`railroad-repetition`),u=i*2,d=s?a:0;l.node().appendChild(r.element).setAttribute(`transform`,`translate(${u}, ${d})`);let f=d+r.dimensions.up;l.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new P().moveTo(0,f).lineTo(i*2,f).build()),l.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new P().moveTo(u+r.dimensions.width,f).lineTo(o,f).build());let p=d+r.dimensions.height+i,m=new P().moveTo(u+r.dimensions.width,f).arcTo(i,i,0,!1,!0,u+r.dimensions.width+i,f+i).lineTo(u+r.dimensions.width+i,p).arcTo(i,i,0,!1,!0,u+r.dimensions.width,p+i).lineTo(i*2,p+i).arcTo(i,i,0,!1,!0,i,p).lineTo(i,f+i).arcTo(i,i,0,!1,!0,i*2,f);if(l.append(`path`).attr(`class`,`railroad-line`).attr(`d`,m.build()),s){let e=new P().moveTo(0,f).arcTo(i,i,0,!1,!1,i,f-i).lineTo(i,i).arcTo(i,i,0,!1,!0,i*2,0).lineTo(o-i*2,0).arcTo(i,i,0,!1,!0,o-i,i).lineTo(o-i,f-i).arcTo(i,i,0,!1,!1,o,f);l.append(`path`).attr(`class`,`railroad-line`).attr(`d`,e.build())}return{element:l.node(),dimensions:{width:o,height:c,up:f,down:c-f}}}renderSpecial(e,t){let n=this.measureText(`? `+t+` ?`),r=n.width+this.config.padding*2,i=n.height+this.config.padding*2,a=e.append(`g`).attr(`class`,`railroad-special`);return a.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,r).attr(`height`,i),a.append(`text`).attr(`x`,r/2).attr(`y`,i/2).text(`? `+t+` ?`),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderExpression(e,t){switch(t.type){case`terminal`:return this.renderTerminal(e,t.value);case`nonterminal`:return this.renderNonTerminal(e,t.name);case`sequence`:return this.renderSequence(e,t.elements);case`choice`:return this.renderChoice(e,t.alternatives);case`optional`:return this.renderOptional(e,t.element);case`repetition`:return this.renderRepetition(e,t.element,t.min);case`special`:return this.renderSpecial(e,t.text);default:throw Error(`Unknown node type: ${t.type}`)}}renderRule(e,t){let n=this.svg.append(`g`).attr(`class`,`railroad-rule`).attr(`transform`,`translate(0, ${t})`),r=e.name+` =`,i=this.measureText(r).width+20,a=i+20,o=n.append(`g`),s=this.renderExpression(o,e.definition),c=Math.max(20,s.dimensions.up),l=c-s.dimensions.up;return o.attr(`transform`,`translate(${a}, ${l})`),n.append(`g`).attr(`class`,`railroad-rule-name-group`).append(`text`).attr(`class`,`railroad-rule-name`).attr(`x`,0).attr(`y`,c).text(r),n.append(`g`).attr(`class`,`railroad-start`).append(`circle`).attr(`cx`,i).attr(`cy`,c).attr(`r`,this.config.markerRadius),n.append(`g`).attr(`class`,`railroad-end`).append(`circle`).attr(`cx`,a+s.dimensions.width+10).attr(`cy`,c).attr(`r`,this.config.markerRadius),n.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new P().moveTo(i+this.config.markerRadius,c).lineTo(a,c).build()),n.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new P().moveTo(a+s.dimensions.width,c).lineTo(a+s.dimensions.width+10-this.config.markerRadius,c).build()),{height:Math.max(40,l+s.dimensions.height+this.config.padding*2),width:a+s.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let t=this.config.padding,n=0;for(let r of e){let e=this.renderRule(r,t);t+=e.height+this.config.verticalSeparation,n=Math.max(n,e.width)}return{width:n+this.config.padding*2,height:t+this.config.padding}}},I=e((e,t,n)=>{o(e,t.height,t.width,n),e.attr(`viewBox`,`0 0 ${t.width} ${t.height}`)},`configureRailroadSvgSize`),L={draw:e((e,n,r)=>{t.debug(`[Railroad] Rendering diagram +`+e);try{let e=c(n);e.attr(`class`,`railroad-diagram`);let r=i().railroad?.useMaxWidth??!0,a=y.getRules();if(t.debug(`[Railroad] Rendering ${a.length} rules`),a.length===0){t.warn(`[Railroad] No rules to render`),I(e,{height:100,width:200},r);return}I(e,new F(e,M()).renderDiagram(a),r),t.debug(`[Railroad] Render complete`)}catch(e){throw t.error(`[Railroad] Render error:`,e),e}},`draw`)};export{N as n,L as r,y as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-RRYK4PFG-DZMcopsb.js b/lecture-01/assets/chunk-RRYK4PFG-DZMcopsb.js new file mode 100644 index 0000000000000000000000000000000000000000..7ee81925dae413206a6775a10b92c96e0e93c78d --- /dev/null +++ b/lecture-01/assets/chunk-RRYK4PFG-DZMcopsb.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{C as t,S as n,m as r,n as i,o as a,t as o,u as s,w as c,x as l}from"./chunk-A7G5T7E5-C2HISlqa.js";var u=class extends o{static{e(this,`RailroadAbnfTokenBuilder`)}static{l(this,`RailroadAbnfTokenBuilder`)}constructor(){super([`railroad-abnf-beta`])}},d=class extends i{static{e(this,`RailroadAbnfValueConverter`)}static{l(this,`RailroadAbnfValueConverter`)}runConverter(e,t,n){let r=super.runConverter(e,t,n);if(e.name===`TITLE`&&typeof r==`string`){let e=r.trim();if(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))return e.slice(1,-1)}return r}runCustomConverter(e,t,n){if(e.name===`ABNF_STRING`)return t.slice(1,-1)}},f={parser:{TokenBuilder:l(()=>new u,`TokenBuilder`),ValueConverter:l(()=>new d,`ValueConverter`)}};function p(e=a){let i=c(t(e),s),o=c(n({shared:i}),r,f);return i.ServiceRegistry.register(o),{shared:i,RailroadAbnf:o}}e(p,`createRailroadAbnfServices`),l(p,`createRailroadAbnfServices`);export{p as n,f as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-RTBOCTTP-BZPyT8j-.js b/lecture-01/assets/chunk-RTBOCTTP-BZPyT8j-.js new file mode 100644 index 0000000000000000000000000000000000000000..25619c87703ee84acb649143e26792cda2a14c11 --- /dev/null +++ b/lecture-01/assets/chunk-RTBOCTTP-BZPyT8j-.js @@ -0,0 +1,15 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";var t=e(()=>` + /* Font Awesome icon styling - consolidated */ + .label-icon { + display: inline-block; + height: 1em; + overflow: visible; + vertical-align: -0.125em; + } + + .node .label-icon path { + fill: currentColor; + stroke: revert; + stroke-width: revert; + } +`,`getIconStyles`);export{t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-RTI7CJYH-CrTK6TD7.js b/lecture-01/assets/chunk-RTI7CJYH-CrTK6TD7.js new file mode 100644 index 0000000000000000000000000000000000000000..f8feeffc8f9d6264133bdfddc13f1709b7cd94ff --- /dev/null +++ b/lecture-01/assets/chunk-RTI7CJYH-CrTK6TD7.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";var t=e((e,t)=>{if(t)return`translate(`+-e.width/2+`, `+-e.height/2+`)`;let n=e.x??0,r=e.y??0;return`translate(`+-(n+e.width/2)+`, `+-(r+e.height/2)+`)`},`computeLabelTransform`),n={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},r={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function i(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=a(e),t=a(t);let[n,r]=[e.x,e.y],[i,o]=[t.x,t.y],s=i-n,c=o-r;return{angle:Math.atan(c/s),deltaX:s,deltaY:c}}e(i,`calculateDeltaAndAngle`);var a=e(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),o=e(t=>({x:e(function(e,r,o){let s=0,c=a(o[0]).x=0?1:-1)}else if(r===o.length-1&&Object.hasOwn(n,t.arrowTypeEnd)){let{angle:e,deltaX:r}=i(o[o.length-1],o[o.length-2]);s=n[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}let l=Math.abs(a(e).x-a(o[o.length-1]).x),u=Math.abs(a(e).y-a(o[o.length-1]).y),d=Math.abs(a(e).x-a(o[0]).x),f=Math.abs(a(e).y-a(o[0]).y),p=n[t.arrowTypeStart],m=n[t.arrowTypeEnd];if(l0&&u0&&f=0?1:-1)}else if(r===o.length-1&&Object.hasOwn(n,t.arrowTypeEnd)){let{angle:e,deltaY:r}=i(o[o.length-1],o[o.length-2]);s=n[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}let l=Math.abs(a(e).y-a(o[o.length-1]).y),u=Math.abs(a(e).x-a(o[o.length-1]).x),d=Math.abs(a(e).y-a(o[0]).y),f=Math.abs(a(e).x-a(o[0]).x),p=n[t.arrowTypeStart],m=n[t.arrowTypeEnd];if(l0&&u0&&fnew u,`TokenBuilder`),ValueConverter:l(()=>new d,`ValueConverter`)}};function p(e=i){let r=c(t(e),s),o=c(n({shared:r}),a,f);return r.ServiceRegistry.register(o),{shared:r,Architecture:o}}e(p,`createArchitectureServices`),l(p,`createArchitectureServices`);export{p as n,f as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-SLCUJWJ3-Bzf1BoPP.js b/lecture-01/assets/chunk-SLCUJWJ3-Bzf1BoPP.js new file mode 100644 index 0000000000000000000000000000000000000000..aad99a9804979f36621807946e7002b8ef1f3d07 --- /dev/null +++ b/lecture-01/assets/chunk-SLCUJWJ3-Bzf1BoPP.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{C as t,S as n,i as r,o as i,p as a,t as o,u as s,w as c,x as l}from"./chunk-A7G5T7E5-C2HISlqa.js";var u=class extends o{static{e(this,`RadarTokenBuilder`)}static{l(this,`RadarTokenBuilder`)}constructor(){super([`radar-beta`])}},d={parser:{TokenBuilder:l(()=>new u,`TokenBuilder`),ValueConverter:l(()=>new r,`ValueConverter`)}};function f(e=i){let r=c(t(e),s),o=c(n({shared:r}),a,d);return r.ServiceRegistry.register(o),{shared:r,Radar:o}}e(f,`createRadarServices`),l(f,`createRadarServices`);export{f as n,d as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-STSWKLMO-1NGmNrHs.js b/lecture-01/assets/chunk-STSWKLMO-1NGmNrHs.js new file mode 100644 index 0000000000000000000000000000000000000000..1513ded67ec9653df316246160d2481f005611e7 --- /dev/null +++ b/lecture-01/assets/chunk-STSWKLMO-1NGmNrHs.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-WRLBMN4V-DDCtIAjS.js","assets/chunk-PTVI3W5X-DVfdoxm6.js","assets/chunk-FO5PYUIK-CPzj2963.js","assets/chunk-NEZ6ONQZ-CuHA0Ldj.js","assets/preload-helper-DpA04vUI.js","assets/chunk-PLCLPJVV-BfMyJHbe.js","assets/chunk-XXV7AQMY-qeLKYxsH.js","assets/chunk-IPM4HZQ6-CQmHNgJe.js","assets/chunk-OX6ZKUVE-roiHi12N.js","assets/chunk-YV36FAQU-CkTVkoM6.js","assets/chunk-AQ2D6KKF-AxjphkEe.js","assets/chunk-2V3FENDJ-B1mkZICr.js","assets/chunk-DKH7L6O3-pKUB4f-O.js","assets/chunk-RTI7CJYH-CrTK6TD7.js","assets/chunk-MPM6TOF7-5cxd71sq.js","assets/chunk-XAKTCX7R-DiVetB2y.js","assets/chunk-T5XCKZAJ-1iVrcyuQ.js","assets/chunk-GUDDZZ3A-DadEmnfX.js","assets/swimlanes-TLWVG3JD-DxVaPJg8.js","assets/cose-bilkent-UCWTYXWA-BOsqo5kc.js","assets/chunk-EMKVYAI2-C4ZARs9V.js"])))=>i.map(i=>d[i]); +import{t as e}from"./preload-helper-DpA04vUI.js";import{r as t}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as n}from"./chunk-FO5PYUIK-CPzj2963.js";import{S as r,c as i}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{f as a}from"./chunk-OX6ZKUVE-roiHi12N.js";import{a as o,i as s,s as c}from"./chunk-DKH7L6O3-pKUB4f-O.js";import{a as l,i as u,o as d,r as f}from"./chunk-MPM6TOF7-5cxd71sq.js";var p={common:i,getConfig:r,insertCluster:s,insertEdge:f,insertEdgeLabel:u,insertMarkers:l,insertNode:o,interpolateToCurve:a,labelHelper:c,log:n,positionEdgeLabel:d},m={},h=t(e=>{for(let t of e)m[t.name]=t},`registerLayoutLoaders`);t(()=>{h([{name:`dagre`,loader:t(async()=>await e(()=>import(`./dagre-WRLBMN4V-DDCtIAjS.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])),`loader`)},{name:`swimlane`,loader:t(async()=>await e(()=>import(`./swimlanes-TLWVG3JD-DxVaPJg8.js`),__vite__mapDeps([18,4,1,2,3,5,6,7,8,9,10,11,12,13,14,15,17])),`loader`)},{name:`cose-bilkent`,loader:t(async()=>await e(()=>import(`./cose-bilkent-UCWTYXWA-BOsqo5kc.js`),__vite__mapDeps([19,1,2,20])),`loader`)}])},`registerDefaultLayoutLoaders`)();var g=t(async(e,t,n)=>{if(!(e.layoutAlgorithm in m))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let r=m[e.layoutAlgorithm],i=await r.loader(),{theme:a,themeVariables:o}=e.config,{useGradient:s,gradientStart:c,gradientStop:l}=o,u=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${u}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${a?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${u}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${a?.includes(`dark`)?`#FFFFFF`:`#000000`}`),s){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,c).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,l).attr(`stop-opacity`,1)}return i.render(e,t,p,{algorithm:r.algorithm},n)},`render`),_=t((e=``,{fallback:t=`dagre`}={})=>{if(e in m)return e;if(t in m)return n.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`);export{h as n,g as r,_ as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-T5XCKZAJ-1iVrcyuQ.js b/lecture-01/assets/chunk-T5XCKZAJ-1iVrcyuQ.js new file mode 100644 index 0000000000000000000000000000000000000000..397cb0c5d82f7479bc3fef303f84070d4c2263b3 --- /dev/null +++ b/lecture-01/assets/chunk-T5XCKZAJ-1iVrcyuQ.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{A as t,C as n,D as r,E as i,O as a,S as o,T as s,_ as c,a as l,b as u,c as d,d as f,f as p,g as m,h,i as g,k as _,l as v,m as y,n as ee,o as b,p as te,s as x,t as S,u as ne,v as C,w,x as T,y as E}from"./chunk-XAKTCX7R-DiVetB2y.js";function D(e,t,n,r){var i;do i=a(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}e(D,`addDummyNode`);function re(e){var t=new S().setGraph(e.graph());return v(e.nodes(),function(n){t.setNode(n,e.node(n))}),v(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}e(re,`simplify`);function O(e){var t=new S({multigraph:e.isMultigraph()}).setGraph(e.graph());return v(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),v(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}e(O,`asNonCompoundGraph`);function k(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}e(k,`intersectRect`);function A(e){var t=c(w(j(e)+1),function(){return[]});return v(e.nodes(),function(n){var r=e.node(n),i=r.rank;y(i)||(t[i][r.order]=n)}),t}e(A,`buildLayerMatrix`);function ie(e){var t=T(c(e.nodes(),function(t){return e.node(t).rank}));v(e.nodes(),function(n){var r=e.node(n);p(r,`rank`)&&(r.rank-=t)})}e(ie,`normalizeRanks`);function ae(e){var t=T(c(e.nodes(),function(t){return e.node(t).rank})),n=[];v(e.nodes(),function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)});var r=0,i=e.graph().nodeRankFactor;v(n,function(t,n){y(t)&&n%i!==0?--r:r&&v(t,function(t){e.node(t).rank+=r})})}e(ae,`removeEmptyRanks`);function oe(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),D(e,`border`,i,t)}e(oe,`addBorderNode`);function j(e){return C(c(e.nodes(),function(t){var n=e.node(t).rank;if(!y(n))return n}))}e(j,`maxRank`);function se(e,t){var n={lhs:[],rhs:[]};return v(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}e(se,`partition`);function ce(e,t){var n=o();try{return t()}finally{console.log(e+` time: `+(o()-n)+`ms`)}}e(ce,`time`);function le(e,t){return t()}e(le,`notime`);function ue(t){function n(e){var r=t.children(e),i=t.node(e);if(r.length&&v(r,n),Object.prototype.hasOwnProperty.call(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a0;--s)if(o=t[s].dequeue(),o){r=r.concat(R(e,t,n,o,!0));break}}}return r}e(ye,`doGreedyFAS`);function R(e,t,n,r,i){var a=i?[]:void 0;return v(e.inEdges(r.v),function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,z(t,n,s)}),v(e.outEdges(r.v),function(r){var i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,z(t,n,o)}),e.removeNode(r.v),a}e(R,`removeNode`);function be(e,t){var n=new S,r=0,i=0;v(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),v(e.edges(),function(e){var a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s),i=Math.max(i,n.node(e.v).out+=o),r=Math.max(r,n.node(e.w).in+=o)});var a=w(i+r+3).map(function(){return new he}),o=r+1;return v(n.nodes(),function(e){z(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}e(be,`buildState`);function z(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}e(z,`assignBucket`);function xe(t){var n=t.graph().acyclicer===`greedy`?ve(t,r(t)):Se(t);v(n,function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,a(`rev`))});function r(e){return function(t){return e.edge(t).weight}}e(r,`weightFn`)}e(xe,`run`);function Se(t){var n=[],r={},i={};function a(e){Object.prototype.hasOwnProperty.call(i,e)||(i[e]=!0,r[e]=!0,v(t.outEdges(e),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):a(e.w)}),delete r[e])}return e(a,`dfs`),v(t.nodes(),a),n}e(Se,`dfsFAS`);function Ce(e){v(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}e(Ce,`undo`);function we(e){e.graph().dummyChains=[],v(e.edges(),function(t){Te(e,t)})}e(we,`run`);function Te(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a!==r+1){e.removeEdge(t);var l=void 0,u,d;for(d=0,++r;ro.lim&&(s=o,c=!0);var l=b(t.edges(),function(t){return c===ze(e,e.node(t.v),s)&&c!==ze(e,e.node(t.w),s)});return u(l,function(e){return V(t,e)})}e(Fe,`enterEdge`);function Ie(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),Y(e),q(e,t),Le(e,t)}e(Ie,`exchangeEdges`);function Le(e,t){var n=Me(e,x(e.nodes(),function(e){return!t.node(e).parent}));n=n.slice(1),v(n,function(n){var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}e(Le,`updateRanks`);function Re(e,t,n){return e.hasEdge(t,n)}e(Re,`isTreeEdge`);function ze(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e(ze,`isDescendant`);function Be(e){switch(e.graph().ranker){case`network-simplex`:Z(e);break;case`tight-tree`:He(e);break;case`longest-path`:Ve(e);break;default:Z(e)}}e(Be,`rank`);var Ve=B;function He(e){B(e),H(e)}e(He,`tightTreeRanker`);function Z(e){K(e)}e(Z,`networkSimplexRanker`);function Ue(e){var t=D(e,`root`,{},`_root`),n=Ge(e),r=C(_(n))-1,i=2*r+1;e.graph().nestingRoot=t,v(e.edges(),function(t){e.edge(t).minlen*=i});var a=Ke(e)+1;v(e.children(),function(o){We(e,t,i,a,r,n,o)}),e.graph().nodeRankFactor=i}e(Ue,`run`);function We(e,t,n,r,i,a,o){var s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}var c=oe(e,`_bt`),l=oe(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,v(s,function(s){We(e,t,n,r,i,a,s);var u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-a[o]+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+a[o]})}e(We,`dfs`);function Ge(t){var n={};function r(e,i){var a=t.children(e);a&&a.length&&v(a,function(e){r(e,i+1)}),n[e]=i}return e(r,`dfs`),v(t.children(),function(e){r(e,1)}),n}e(Ge,`treeDepths`);function Ke(e){return s(e.edges(),function(t,n){return t+e.edge(n).weight},0)}e(Ke,`sumWeights`);function qe(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,v(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}e(qe,`cleanup`);function Je(e,t,n){var r={},i;v(n,function(n){for(var a=e.parent(n),o,s;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}e(Je,`addSubgraphConstraints`);function Ye(e,t,n){var r=Xe(e),i=new S({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(t){return e.node(t)});return v(e.nodes(),function(a){var o=e.node(a),s=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||r),v(e[n](a),function(t){var n=t.v===a?t.w:t.v,r=i.edge(n,a),o=y(r)?0:r.weight;i.setEdge(n,a,{weight:e.edge(t).weight+o})}),Object.prototype.hasOwnProperty.call(o,`minRank`)&&i.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}e(Ye,`buildLayerGraph`);function Xe(e){for(var t;e.hasNode(t=a(`_root`)););return t}e(Xe,`createRootNode`);function Ze(e,t){for(var n=0,r=1;r0;)t%2&&(n+=u[t+1]),t=t-1>>1,u[t]+=e.weight;f+=e.weight*n})),f}e(Qe,`twoLayerCrossCount`);function $e(t){var n={},i=b(t.nodes(),function(e){return!t.children(e).length}),a=C(c(i,function(e){return t.node(e).rank})),o=c(w(a+1),function(){return[]});function s(e){p(n,e)||(n[e]=!0,o[t.node(e).rank].push(e),v(t.successors(e),s))}e(s,`dfs`);var l=r(i,function(e){return t.node(e).rank});return v(l,s),o}e($e,`initOrder`);function et(e,t){return c(t,function(t){var n=e.inEdges(t);if(n.length){var r=s(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}return{v:t}})}e(et,`barycenter`);function tt(e,t){var n={};return v(e,function(e,t){var r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};y(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)}),v(t.edges(),function(e){var t=n[e.v],r=n[e.w];!y(t)&&!y(r)&&(r.indegree++,t.out.push(n[e.w]))}),nt(b(n,function(e){return!e.indegree}))}e(tt,`resolveConflicts`);function nt(t){var r=[];function i(e){return function(t){t.merged||(y(t.barycenter)||y(e.barycenter)||t.barycenter>=e.barycenter)&&rt(e,t)}}e(i,`handleIn`);function a(e){return function(n){n.in.push(e),--n.indegree===0&&t.push(n)}}for(e(a,`handleOut`);t.length;){var o=t.pop();r.push(o),v(o.in.reverse(),i(o)),v(o.out,a(o))}return c(b(r,function(e){return!e.merged}),function(e){return n(e,[`vs`,`i`,`barycenter`,`weight`])})}e(nt,`doResolveConflicts`);function rt(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}e(rt,`mergeEntries`);function it(e,t){var n=se(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),i=n.lhs,a=r(n.rhs,function(e){return-e.i}),o=[],s=0,c=0,l=0;i.sort(ot(!!t)),l=at(o,a,l),v(i,function(e){l+=e.vs.length,o.push(e.vs),s+=e.barycenter*e.weight,c+=e.weight,l=at(o,a,l)});var u={vs:d(o)};return c&&(u.barycenter=s/c,u.weight=c),u}e(it,`sort`);function at(e,t,n){for(var r;t.length&&(r=h(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}e(at,`consumeUnsortable`);function ot(e){return function(t,n){return t.barycentern.barycenter?1:e?n.i-t.i:t.i-n.i}}e(ot,`compareWithBias`);function st(e,t,n,r){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,c={};o&&(i=b(i,function(e){return e!==o&&e!==s}));var l=et(e,i);v(l,function(t){if(e.children(t.v).length){var i=st(e,t.v,n,r);c[t.v]=i,Object.prototype.hasOwnProperty.call(i,`barycenter`)&<(t,i)}});var u=tt(l,n);ct(u,c);var f=it(u,r);if(o&&(f.vs=d([o,f.vs,s]),e.predecessors(o).length)){var p=e.node(e.predecessors(o)[0]),m=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(f,`barycenter`)||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+m.order)/(f.weight+2),f.weight+=2}return f}e(st,`sortSubgraph`);function ct(e,t){v(e,function(e){e.vs=d(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}e(ct,`expandSubgraphs`);function lt(e,t){y(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}e(lt,`mergeBarycenters`);function ut(e){var t=j(e),n=dt(e,w(1,t+1),`inEdges`),r=dt(e,w(t-1,-1,-1),`outEdges`),i=$e(e);pt(e,i);for(var a=1/0,o,s=0,c=0;c<4;++s,++c){ft(s%2?n:r,s%4>=2),i=A(e);var l=Ze(e,i);lo||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}e(ht,`findPath`);function gt(t){var n={},r=0;function i(e){var a=r;v(t.children(e),i),n[e]={low:a,lim:r++}}return e(i,`dfs`),v(t.children(),i),n}e(gt,`postorder`);function _t(t,n){var r={};function i(e,n){var i=0,a=0,o=e.length,s=h(n);return v(n,function(e,c){var l=yt(t,e),u=l?t.node(l).order:o;(l||e===s)&&(v(n.slice(a,c+1),function(e){v(t.predecessors(e),function(n){var a=t.node(n),o=a.order;(oo)&&bt(r,e,s)})})}e(i,`scan`);function a(e,n){var r=-1,a,o=0;return v(n,function(s,c){if(t.node(s).dummy===`border`){var l=t.predecessors(s);l.length&&(a=t.node(l[0]).order,i(n,o,c,r,a),o=c,r=a)}i(n,o,n.length,a,e.length)}),n}return e(a,`visitLayer`),s(n,a),r}e(vt,`findType2Conflicts`);function yt(e,t){if(e.node(t).dummy)return x(e.predecessors(t),function(t){return e.node(t).dummy})}e(yt,`findOtherInnerSegmentNode`);function bt(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}e(bt,`addConflict`);function xt(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}e(xt,`hasConflict`);function St(e,t,n,i){var a={},o={},s={};return v(t,function(e){v(e,function(e,t){a[e]=e,o[e]=e,s[e]=t})}),v(t,function(e){var t=-1;v(e,function(e){var c=i(e);if(c.length){c=r(c,function(e){return s[e]});for(var l=(c.length-1)/2,u=Math.floor(l),d=Math.ceil(l);u<=d;++u){var f=c[u];o[e]===e&&t{var t=n(` buildLayoutGraph`,()=>Wt(e));n(` runLayout`,()=>Pt(t,n)),n(` updateInputGraph`,()=>Ft(e,t))})}e(Nt,`layout`);function Pt(e,t){t(` makeSpaceForEdgeLabels`,()=>Gt(e)),t(` removeSelfEdges`,()=>en(e)),t(` acyclic`,()=>xe(e)),t(` nestingGraph.run`,()=>Ue(e)),t(` rank`,()=>Be(O(e))),t(` injectEdgeLabelProxies`,()=>Kt(e)),t(` removeEmptyRanks`,()=>ae(e)),t(` nestingGraph.cleanup`,()=>qe(e)),t(` normalizeRanks`,()=>ie(e)),t(` assignRankMinMax`,()=>qt(e)),t(` removeEdgeLabelProxies`,()=>Jt(e)),t(` normalize.run`,()=>we(e)),t(` parentDummyChains`,()=>mt(e)),t(` addBorderSegments`,()=>ue(e)),t(` order`,()=>ut(e)),t(` insertSelfEdges`,()=>tn(e)),t(` adjustCoordinateSystem`,()=>de(e)),t(` position`,()=>jt(e)),t(` positionSelfEdges`,()=>nn(e)),t(` removeBorderNodes`,()=>$t(e)),t(` normalize.undo`,()=>Ee(e)),t(` fixupEdgeLabelCoords`,()=>Zt(e)),t(` undoCoordinateSystem`,()=>fe(e)),t(` translateGraph`,()=>Yt(e)),t(` assignNodeIntersects`,()=>Xt(e)),t(` reversePoints`,()=>Qt(e)),t(` acyclic.undo`,()=>Ce(e))}e(Pt,`runLayout`);function Ft(e,t){v(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),v(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}e(Ft,`updateInputGraph`);var It=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],Lt={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},Rt=[`acyclicer`,`ranker`,`rankdir`,`align`],zt=[`width`,`height`],Bt={width:0,height:0},Vt=[`minlen`,`weight`,`width`,`height`,`labeloffset`],Ht={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},Ut=[`labelpos`];function Wt(e){var t=new S({multigraph:!0,compound:!0}),r=$(e.graph());return t.setGraph(E({},Lt,Q(r,It),n(r,Rt))),v(e.nodes(),function(n){var r=$(e.node(n));t.setNode(n,l(Q(r,zt),Bt)),t.setParent(n,e.parent(n))}),v(e.edges(),function(r){var i=$(e.edge(r));t.setEdge(r,E({},Ht,Q(i,Vt),n(i,Ut)))}),t}e(Wt,`buildLayoutGraph`);function Gt(e){var t=e.graph();t.ranksep/=2,v(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}e(Gt,`makeSpaceForEdgeLabels`);function Kt(e){v(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);D(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}e(Kt,`injectEdgeLabelProxies`);function qt(e){var t=0;v(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=C(t,r.maxRank))}),e.graph().maxRank=t}e(qt,`assignRankMinMax`);function Jt(e){v(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}e(Jt,`removeEdgeLabelProxies`);function Yt(t){var n=1/0,r=0,i=1/0,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function l(e){var t=e.x,o=e.y,s=e.width,c=e.height;n=Math.min(n,t-s/2),r=Math.max(r,t+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}e(l,`getExtremes`),v(t.nodes(),function(e){l(t.node(e))}),v(t.edges(),function(e){var n=t.edge(e);Object.prototype.hasOwnProperty.call(n,`x`)&&l(n)}),n-=s,i-=c,v(t.nodes(),function(e){var r=t.node(e);r.x-=n,r.y-=i}),v(t.edges(),function(e){var r=t.edge(e);v(r.points,function(e){e.x-=n,e.y-=i}),Object.prototype.hasOwnProperty.call(r,`x`)&&(r.x-=n),Object.prototype.hasOwnProperty.call(r,`y`)&&(r.y-=i)}),o.width=r-n+s,o.height=a-i+c}e(Yt,`translateGraph`);function Xt(e){v(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(k(r,a)),n.points.push(k(i,o))})}e(Xt,`assignNodeIntersects`);function Zt(e){v(e.edges(),function(t){var n=e.edge(t);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}e(Zt,`fixupEdgeLabelCoords`);function Qt(e){v(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}e(Qt,`reversePointsForReversedEdges`);function $t(e){v(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(h(n.borderLeft)),o=e.node(h(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),v(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}e($t,`removeBorderNodes`);function en(e){v(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}e(en,`removeSelfEdges`);function tn(e){var t=A(e);v(t,function(t){var n=0;v(t,function(t,r){var i=e.node(t);i.order=r+n,v(i.selfEdges,function(t){D(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}e(tn,`insertSelfEdges`);function nn(e){v(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}e(nn,`positionSelfEdges`);function Q(e,t){return m(n(e,t),Number)}e(Q,`selectNumberAttrs`);function $(e){var t={};return v(e,function(e,n){t[n.toLowerCase()]=e}),t}e($,`canonicalize`);export{Nt as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-WBLI2NX4-B_kS-fCR.js b/lecture-01/assets/chunk-WBLI2NX4-B_kS-fCR.js new file mode 100644 index 0000000000000000000000000000000000000000..fbcf82a0710c9395fe6877d449dfafef34915570 --- /dev/null +++ b/lecture-01/assets/chunk-WBLI2NX4-B_kS-fCR.js @@ -0,0 +1,206 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as t,T as n}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as r,E as i,G as a,I as o,J as s,L as c,Q as l,Y as u,b as d,c as f,o as p,x as m}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{l as h,v as g}from"./chunk-OX6ZKUVE-roiHi12N.js";import{r as _,t as v}from"./chunk-STSWKLMO-1NGmNrHs.js";import{t as y}from"./chunk-RTBOCTTP-BZPyT8j-.js";import{t as b}from"./chunk-ZICDAICJ-CB44yeNY.js";import{t as x}from"./chunk-HPLX5OYV-zid2YVw5.js";import{t as S}from"./chunk-BYAF6FXG-DqiL_6qO.js";var C=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,26],s=[1,42],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],ee=[1,63],te=[1,64],P=[1,8,9,41],ne=[1,77],F=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],I=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],L=[13,60,86,100,102,103],R=[13,60,73,74,86,100,102,103],re=[13,60,68,69,70,71,72,86,100,102,103],z=[1,103],B=[1,121],V=[1,117],H=[1,113],U=[1,119],W=[1,114],G=[1,115],K=[1,116],q=[1,118],J=[1,120],ie=[22,50,60,61,82,86,87,88,89,90],ae=[1,128],Y=[12,39],X=[1,8,9,39,41,44,46],Z=[1,8,9,22],oe=[1,153],se=[1,8,9,61],Q=[1,8,9,22,50,60,61,82,86,87,88,89,90],ce={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:`error`,7:`CLASS_DIAGRAM`,8:`NEWLINE`,9:`EOF`,12:`SQS`,13:`STR`,14:`SQE`,18:`DOT`,20:`GENERICTYPE`,22:`LABEL`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,39:`STRUCT_START`,41:`STRUCT_STOP`,42:`NAMESPACE`,44:`STYLE_SEPARATOR`,46:`ANNOTATION_START`,47:`ANNOTATION_END`,48:`CLASS`,50:`SPACE`,51:`MEMBER`,52:`SEPARATOR`,54:`NOTE_FOR`,56:`NOTE`,57:`CLASSDEF`,60:`ALPHA`,61:`COMMA`,62:`direction_tb`,63:`direction_bt`,64:`direction_rl`,65:`direction_lr`,68:`AGGREGATION`,69:`EXTENSION`,70:`COMPOSITION`,71:`DEPENDENCY`,72:`LOLLIPOP`,73:`LINE`,74:`DOTTED_LINE`,75:`CALLBACK`,76:`LINK`,77:`LINK_TARGET`,78:`CLICK`,79:`CALLBACK_NAME`,80:`CALLBACK_ARGS`,81:`HREF`,82:`STYLE`,83:`CSSCLASS`,86:`NUM`,87:`COLON`,88:`UNIT`,89:`BRKT`,90:`PCT`,93:`graphCodeTokens`,95:`TAGSTART`,96:`TAGEND`,97:`==`,98:`--`,99:`DEFAULT`,100:`MINUS`,101:`keywords`,102:`UNICODE_TEXT`,103:`BQUOTE_STR`},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 36:this.$=r.addNamespace(a[s]);break;case 37:this.$=r.addNamespace(a[s-1],a[s]);break;case 38:this.$=[[a[s]],[]];break;case 39:this.$=[[a[s-1]],[]];break;case 40:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 41:this.$=[[],[a[s]]];break;case 42:this.$=[[],[a[s-1]]];break;case 43:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[s];break;case 48:r.setCssClass(a[s-2],a[s]);break;case 49:r.addMembers(a[s-3],a[s-1]);break;case 51:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 52:r.addAnnotation(a[s-3],a[s-1]);break;case 53:r.addAnnotation(a[s-6],a[s-4]),r.addMembers(a[s-6],a[s-1]);break;case 54:r.addAnnotation(a[s-5],a[s-3]);break;case 55:this.$=a[s],r.addClass(a[s]);break;case 56:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 60:r.addAnnotation(a[s],a[s-2]);break;case 61:case 74:this.$=[a[s]];break;case 62:a[s].push(a[s-1]),this.$=a[s];break;case 63:break;case 64:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 65:break;case 66:break;case 67:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 68:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 69:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 70:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 71:this.$=r.addNote(a[s],a[s-1]);break;case 72:this.$=r.addNote(a[s]);break;case 73:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 75:this.$=a[s-2].concat([a[s]]);break;case 76:r.setDirection(`TB`);break;case 77:r.setDirection(`BT`);break;case 78:r.setDirection(`RL`);break;case 79:r.setDirection(`LR`);break;case 80:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 81:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 82:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 83:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 84:this.$=r.relationType.AGGREGATION;break;case 85:this.$=r.relationType.EXTENSION;break;case 86:this.$=r.relationType.COMPOSITION;break;case 87:this.$=r.relationType.DEPENDENCY;break;case 88:this.$=r.relationType.LOLLIPOP;break;case 89:this.$=r.lineType.LINE;break;case 90:this.$=r.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 92:case 98:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 93:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 95:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 99:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 100:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 101:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 102:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 103:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 104:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 105:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 106:r.setCssClass(a[s-1],a[s]);break;case 107:this.$=[a[s]];break;case 108:a[s-2].push(a[s]),this.$=a[s-2];break;case 110:this.$=a[s-1]+a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(D,[2,5],{8:[1,48]}),{8:[1,49]},t(O,[2,19],{22:[1,50]}),t(O,[2,21]),t(O,[2,22]),t(O,[2,23]),t(O,[2,24]),t(O,[2,25]),t(O,[2,26]),t(O,[2,27]),t(O,[2,28]),t(O,[2,29]),t(O,[2,30]),{34:[1,51]},{36:[1,52]},t(O,[2,33]),t(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:ee,74:te}),{39:[1,65]},t(P,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(O,[2,65]),t(O,[2,66]),{16:69,60:p,86:C,100:w,102:T},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:72,60:p,86:C,100:w,102:T,103:E},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:C,100:w,102:T,103:E},{13:ne,55:76},{58:78,60:[1,79]},t(O,[2,76]),t(O,[2,77]),t(O,[2,78]),t(O,[2,79]),t(F,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:C,100:w,102:T,103:E}),t(F,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:87,60:p,86:C,100:w,102:T,103:E},t(I,[2,133]),t(I,[2,134]),t(I,[2,135]),t(I,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(D,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:n,35:r,37:i,42:a,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},t(O,[2,20]),t(O,[2,31]),t(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:C,100:w,102:T,103:E},{53:92,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:ee,74:te},t(O,[2,64]),{67:93,73:ee,74:te},t(L,[2,83],{66:94,68:k,69:A,70:j,71:M,72:N}),t(R,[2,84]),t(R,[2,85]),t(R,[2,86]),t(R,[2,87]),t(R,[2,88]),t(re,[2,89]),t(re,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:a,43:23,48:s,54:u,56:d},{16:100,60:p,86:C,100:w,102:T},{41:[1,102],45:101,51:z},{16:104,60:p,86:C,100:w,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:B,50:V,59:110,60:H,82:U,84:111,85:112,86:W,87:G,88:K,89:q,90:J},{60:[1,122]},{13:ne,55:123},t(P,[2,72]),t(P,[2,138]),{22:B,50:V,59:124,60:H,61:[1,125],82:U,84:111,85:112,86:W,87:G,88:K,89:q,90:J},t(ie,[2,74]),{16:39,17:40,19:126,60:p,86:C,100:w,102:T,103:E},t(F,[2,16]),t(F,[2,17]),t(F,[2,18]),{11:127,12:ae,39:[2,36]},t(Y,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:C,100:w,102:T,103:E}),t(Y,[2,10]),t(X,[2,55],{11:131,12:ae}),t(D,[2,7]),{9:[1,132]},t(Z,[2,67]),{16:39,17:40,19:133,60:p,86:C,100:w,102:T,103:E},{13:[1,135],16:39,17:40,19:134,60:p,86:C,100:w,102:T,103:E},t(L,[2,82],{66:136,68:k,69:A,70:j,71:M,72:N}),t(L,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:a,43:23,48:s,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(P,[2,48],{39:[1,142]}),{41:[1,143]},t(P,[2,50]),{41:[2,61],45:144,51:z},{47:[1,145]},{16:39,17:40,19:146,60:p,86:C,100:w,102:T,103:E},t(O,[2,91],{13:[1,147]}),t(O,[2,93],{13:[1,149],77:[1,148]}),t(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(O,[2,105],{61:oe}),t(se,[2,107],{85:154,22:B,50:V,60:H,82:U,86:W,87:G,88:K,89:q,90:J}),t(Q,[2,109]),t(Q,[2,111]),t(Q,[2,112]),t(Q,[2,113]),t(Q,[2,114]),t(Q,[2,115]),t(Q,[2,116]),t(Q,[2,117]),t(Q,[2,118]),t(Q,[2,119]),t(O,[2,106]),t(P,[2,71]),t(O,[2,73],{61:oe}),{60:[1,155]},t(F,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:C,100:w,102:T,103:E},t(Y,[2,12]),t(X,[2,56]),{1:[2,4]},t(Z,[2,69]),t(Z,[2,68]),{16:39,17:40,19:158,60:p,86:C,100:w,102:T,103:E},t(L,[2,80]),t(P,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:a,43:23,48:s,54:u,56:d},{45:163,51:z},t(P,[2,49]),{41:[2,62]},t(P,[2,52],{39:[1,164]}),t(O,[2,60]),t(O,[2,92]),t(O,[2,94]),t(O,[2,95],{77:[1,165]}),t(O,[2,98]),t(O,[2,99],{13:[1,166]}),t(O,[2,101],{13:[1,168],77:[1,167]}),{22:B,50:V,60:H,82:U,84:169,85:112,86:W,87:G,88:K,89:q,90:J},t(Q,[2,110]),t(ie,[2,75]),{14:[1,170]},t(Y,[2,11]),t(Z,[2,70]),t(P,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:z},t(O,[2,96]),t(O,[2,100]),t(O,[2,102]),t(O,[2,103],{77:[1,174]}),t(se,[2,108],{85:154,22:B,50:V,60:H,82:U,86:W,87:G,88:K,89:q,90:J}),t(X,[2,8]),t(P,[2,51]),{41:[1,175]},t(P,[2,54]),t(O,[2,104]),t(P,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};ce.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:e(function(e,t,n,r){switch(n){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin(`acc_title`),33;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),35;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return`EDGE_STATE`;case 18:this.begin(`callback_name`);break;case 19:this.popState();break;case 20:this.popState(),this.begin(`callback_args`);break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return`STR`;case 26:this.begin(`string`);break;case 27:return 82;case 28:return 57;case 29:return this.begin(`namespace`),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin(`namespace-body`),39;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;case 35:return`EOF_IN_STRUCT`;case 36:return 8;case 37:break;case 38:return`EDGE_STATE`;case 39:return this.begin(`class`),48;case 40:return this.popState(),8;case 41:break;case 42:return this.popState(),this.popState(),41;case 43:return this.begin(`class-body`),39;case 44:return this.popState(),41;case 45:return`EOF_IN_STRUCT`;case 46:return`EDGE_STATE`;case 47:return`OPEN_IN_STRUCT`;case 48:break;case 49:return`MEMBER`;case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return`GENERICTYPE`;case 61:this.begin(`generic`);break;case 62:this.popState();break;case 63:return`BQUOTE_STR`;case 64:this.begin(`bqstring`);break;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 77;case 69:return 69;case 70:return 69;case 71:return 71;case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return`PLUS`;case 83:return 87;case 84:return 61;case 85:return 89;case 86:return 89;case 87:return 90;case 88:return`EQUALS`;case 89:return`EQUALS`;case 90:return 60;case 91:return 12;case 92:return 14;case 93:return`PUNCTUATION`;case 94:return 86;case 95:return 102;case 96:return 50;case 97:return 50;case 98:return 9}},`anonymous`),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98],inclusive:!0}}}})();function $(){this.yy={}}return e($,`Parser`),$.prototype=ce,ce.Parser=$,new $})();C.parser=C;var w=C,T=[`#`,`+`,`~`,`-`,``],E=class{static{e(this,`ClassMember`)}constructor(e,t){this.memberType=t,this.visibility=``,this.classifier=``,this.text=``;let n=a(e,r());this.parseMember(n)}getDisplayDetails(){let e=this.visibility+o(this.id);this.memberType===`method`&&(e+=`(${o(this.parameters.trim())})`,this.returnType&&(e+=` : `+o(this.returnType))),e=e.trim();let t=this.parseClassifier();return{displayText:e,cssStyle:t}}parseMember(e){let t=``;if(this.memberType===`method`){let n=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(n){let e=n[1]?n[1].trim():``;if(T.includes(e)&&(this.visibility=e),this.id=n[2],this.parameters=n[3]?n[3].trim():``,t=n[4]?n[4].trim():``,this.returnType=n[5]?n[5].trim():``,t===``){let e=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(e)&&(t=e,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let n=e.length,r=e.substring(0,1),i=e.substring(n-1);T.includes(r)&&(this.visibility=r),/[$*]/.exec(i)&&(t=i),this.id=e.substring(this.visibility===``?0:1,t===``?n:n-1)}this.classifier=t,this.id=this.id.startsWith(` `)?` `+this.id.trim():this.id.trim();let n=`${this.visibility?`\\`+this.visibility:``}${o(this.id)}${this.memberType===`method`?`(${o(this.parameters)})${this.returnType?` : `+o(this.returnType):``}`:``}`;this.text=n.replaceAll(`<`,`<`).replaceAll(`>`,`>`),this.text.startsWith(`\\<`)&&(this.text=this.text.replace(`\\<`,`~`))}parseClassifier(){switch(this.classifier){case`*`:return`font-style:italic;`;case`$`:return`text-decoration:underline;`;default:return``}}},D=`classId-`,O=0,k=e(e=>f.sanitizeText(e,r()),`sanitizeText`),A=class a{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId=``,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=e(e=>{let n=b();t(e).select(`svg`).selectAll(`g`).filter(function(){return t(this).attr(`title`)!==null}).on(`mouseover`,e=>{let r=t(e.currentTarget),i=r.attr(`title`);if(!i)return;let a=e.currentTarget.getBoundingClientRect();n.transition().duration(200).style(`opacity`,`.9`),n.html(c.sanitize(i)).style(`left`,`${window.scrollX+a.left+a.width/2}px`).style(`top`,`${window.scrollY+a.bottom+4}px`),r.classed(`hover`,!0)}).on(`mouseout`,e=>{n.transition().duration(500).style(`opacity`,0),t(e.currentTarget).classed(`hover`,!1)})},`setupToolTips`),this.direction=`TB`,this.setAccTitle=u,this.getAccTitle=m,this.setAccDescription=s,this.getAccDescription=d,this.setDiagramTitle=l,this.getDiagramTitle=i,this.getConfig=e(()=>r().class,`getConfig`),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{e(this,`ClassDB`)}splitClassNameAndType(e){let t=f.sanitizeText(e,r()),n=``,i=t;if(t.indexOf(`~`)>0){let e=t.split(`~`);i=k(e[0]),n=k(e[1])}return{className:i,type:n}}setClassLabel(e,t){let n=f.sanitizeText(e,r());t&&=k(t);let{className:i}=this.splitClassNameAndType(n);this.classes.get(i).label=t,this.classes.get(i).text=`${t}${this.classes.get(i).type?`<${this.classes.get(i).type}>`:``}`}addClass(e){let t=f.sanitizeText(e,r()),{className:n,type:i}=this.splitClassNameAndType(t);if(this.classes.has(n))return;let a=f.sanitizeText(n,r());this.classes.set(a,{id:a,type:i,label:a,text:`${a}${i?`<${i}>`:``}`,shape:`classBox`,cssClasses:`default`,methods:[],members:[],annotations:[],styles:[],domId:D+a+`-`+O}),O++}addInterface(e,t){let n={id:`interface${this.interfaces.length}`,label:e,classId:t};this.interfaces.push(n)}setDiagramId(e){this.diagramId=e}lookUpDomId(e){let t=f.sanitizeText(e,r());if(this.classes.has(t)){let e=this.classes.get(t).domId;return this.diagramId?`${this.diagramId}-${e}`:e}throw Error(`Class not found: `+t)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId=``,this.direction=`TB`,p()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(e){let t=typeof e==`number`?`note${e}`:e;return this.notes.get(t)}getNotes(){return this.notes}addRelation(e){n.debug(`Adding relation: `+JSON.stringify(e));let t=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];e.relation.type1===this.relationType.LOLLIPOP&&!t.includes(e.relation.type2)?(this.addClass(e.id2),this.addInterface(e.id1,e.id2),e.id1=`interface${this.interfaces.length-1}`):e.relation.type2===this.relationType.LOLLIPOP&&!t.includes(e.relation.type1)?(this.addClass(e.id1),this.addInterface(e.id2,e.id1),e.id2=`interface${this.interfaces.length-1}`):(this.addClass(e.id1),this.addClass(e.id2)),e.id1=this.splitClassNameAndType(e.id1).className,e.id2=this.splitClassNameAndType(e.id2).className,e.relationTitle1=f.sanitizeText(e.relationTitle1.trim(),r()),e.relationTitle2=f.sanitizeText(e.relationTitle2.trim(),r()),this.relations.push(e)}addAnnotation(e,t){let n=this.splitClassNameAndType(e).className;this.classes.get(n).annotations.push(t)}addMember(e,t){this.addClass(e);let n=this.splitClassNameAndType(e).className,r=this.classes.get(n);if(typeof t==`string`){let e=t.trim();e.startsWith(`<<`)&&e.endsWith(`>>`)?r.annotations.push(k(e.substring(2,e.length-2))):e.indexOf(`)`)>0?r.methods.push(new E(e,`method`)):e&&r.members.push(new E(e,`attribute`))}}addMembers(e,t){Array.isArray(t)&&(t.reverse(),t.forEach(t=>this.addMember(e,t)))}addNote(e,t){let n=this.notes.size,r={id:`note${n}`,class:t,text:e,index:n};return this.notes.set(r.id,r),r.id}cleanupLabel(e){return e.startsWith(`:`)&&(e=e.substring(1)),k(e.trim())}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=e;/\d/.exec(e[0])&&(n=D+n),n=this.splitClassNameAndType(n).className;let r=this.classes.get(n);r&&(r.cssClasses+=` `+t)})}defineClass(e,t){for(let n of e){let e=this.styleClasses.get(n);e===void 0&&(e={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,e)),t&&t.forEach(t=>{if(/color/.exec(t)){let n=t.replace(`fill`,`bgFill`);e.textStyles.push(n)}e.styles.push(t)}),this.classes.forEach(e=>{e.cssClasses.includes(n)&&e.styles.push(...t.flatMap(e=>e.split(`,`)))})}}setTooltip(e,t){e.split(`,`).forEach(e=>{if(t!==void 0){let n=this.splitClassNameAndType(e).className,r=this.classes.get(n);r&&(r.tooltip=k(t))}})}getTooltip(e,t){return t&&this.namespaces.has(t)?this.namespaces.get(t).classes.get(e).tooltip:this.classes.get(e).tooltip}setLink(e,t,n){let i=r();e.split(`,`).forEach(e=>{let r=e;/\d/.exec(e[0])&&(r=D+r),r=this.splitClassNameAndType(r).className;let a=this.classes.get(r);a&&(a.link=g.formatUrl(t,i),a.linkTarget=i.securityLevel===`sandbox`?`_top`:typeof n==`string`?k(n):`_blank`)}),this.setCssClass(e,`clickable`)}setClickEvent(e,t,n){e.split(`,`).forEach(e=>{this.setClickFunc(e,t,n);let r=this.splitClassNameAndType(e).className,i=this.classes.get(r);i&&(i.haveCallback=!0)}),this.setCssClass(e,`clickable`)}setClickFunc(e,t,n){let i=f.sanitizeText(e,r());if(r().securityLevel!==`loose`||t===void 0)return;let a=this.splitClassNameAndType(i).className;if(this.classes.has(a)){let e=[];if(typeof n==`string`){e=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{let n=this.lookUpDomId(a),r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener(`click`,()=>{g.runFunc(t,...e)},!1)})}}bindFunctions(e){this.functions.forEach(t=>{t(e)})}escapeHtml(e){return e.replace(/&/g,`&`).replace(//g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}getDirection(){return this.direction}setDirection(e){this.direction=e}static resolveQualifiedId(e,t){let n=t.at(-1);return n?`${n}.${e}`:e}static getAncestorIds(e){let t=e.split(`.`),n=Array(t.length);n[0]=t[0];for(let e=1;e0?i[e-1]:void 0,o=e===i.length-1,s=o&&t?t:r[e];this.namespaces.has(n)?o&&(this.namespaces.get(n).explicit=!0):this.namespaces.set(n,this.createNamespaceNode(n,s,a,o)),a&&this.linkParentChild(a,n)}return n}popNamespace(){this.namespaceStack.pop()}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,t,n){if(this.namespaces.has(e)){for(let n of t){let{className:t}=this.splitClassNameAndType(n),r=this.getClass(t);r.parent=e,this.namespaces.get(e).classes.set(t,r)}for(let t of n){let n=this.getNote(t);n.parent=e,this.namespaces.get(e).notes.set(t,n)}}}setCssStyle(e,t){let n=this.classes.get(e);if(!(!t||!n))for(let e of t)e.includes(`,`)?n.styles.push(...e.split(`,`)):n.styles.push(e)}getArrowMarker(e){let t;switch(e){case 0:t=`aggregation`;break;case 1:t=`extension`;break;case 2:t=`composition`;break;case 3:t=`dependency`;break;case 4:t=`lollipop`;break;default:t=`none`}return t}resolveExplicitAncestor(e){let t=e;for(;t;){let e=this.namespaces.get(t);if(!e)return;if(e.explicit)return t;t=e.parent}}getData(){let e=[],t=[],n=r(),i=n.class?.hierarchicalNamespaces??!0;for(let t of this.namespaces.values()){if(!i&&!t.explicit)continue;let r={id:t.id,label:i?t.label:t.id,isGroup:!0,padding:n.class.padding??16,shape:`rect`,cssStyles:[],look:n.look,parentId:i?t.parent:void 0};e.push(r)}for(let t of this.classes.values()){let r=i?t.parent:this.resolveExplicitAncestor(t.parent),a={...t,type:void 0,isGroup:!1,parentId:r,look:n.look};e.push(a)}for(let r of this.notes.values()){let a=i?r.parent:this.resolveExplicitAncestor(r.parent),o={id:r.id,label:r.text,isGroup:!1,shape:`note`,padding:n.class.padding??6,cssStyles:[`text-align: left`,`white-space: nowrap`,`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look,parentId:a,labelType:`markdown`};e.push(o);let s=this.classes.get(r.class)?.id;if(s){let e={id:`edgeNote${r.index}`,start:r.id,end:s,type:`normal`,thickness:`normal`,classes:`relation`,arrowTypeStart:`none`,arrowTypeEnd:`none`,arrowheadStyle:``,labelStyle:[``],style:[`fill: none`],pattern:`dotted`,look:n.look};t.push(e)}}for(let t of this.interfaces){let r={id:t.id,label:t.label,isGroup:!1,shape:`rect`,cssStyles:[`opacity: 0;`],look:n.look};e.push(r)}let a=0;for(let e of this.relations){a++;let r={id:h(e.id1,e.id2,{prefix:`id`,counter:a}),start:e.id1,end:e.id2,type:`normal`,label:e.title,labelpos:`c`,thickness:`normal`,classes:`relation`,arrowTypeStart:this.getArrowMarker(e.relation.type1),arrowTypeEnd:this.getArrowMarker(e.relation.type2),startLabelRight:e.relationTitle1===`none`?``:e.relationTitle1,endLabelLeft:e.relationTitle2===`none`?``:e.relationTitle2,arrowheadStyle:``,labelStyle:[`display: inline-block`],style:e.style||``,pattern:e.relation.lineType==1?`dashed`:`solid`,look:n.look,labelType:`markdown`};t.push(r)}return{nodes:e,edges:t,other:{},config:n,direction:this.getDirection()}}},j=e(e=>`g.classGroup text { + fill: ${e.nodeBorder||e.classText}; + stroke: none; + font-family: ${e.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span { + color: ${e.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .cluster rect { + fill: ${e.clusterBkg}; + stroke: ${e.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span { + color: ${e.titleColor}; + } + +.nodeLabel, .edgeLabel { + color: ${e.classText}; +} + +.noteLabel .nodeLabel, .noteLabel .edgeLabel { + color: ${e.noteTextColor}; +} +.edgeLabel .label rect { + fill: ${e.mainBkg}; +} +.label text { + fill: ${e.classText}; +} + +.labelBkg { + background: ${e.mainBkg}; +} +.edgeLabel .label span { + background: ${e.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: ${e.strokeWidth}; + } + + +.divider { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; +} + +g.classGroup line { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${e.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${e.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${e.lineColor}; + stroke-width: ${e.strokeWidth}; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +[id$="-compositionStart"], .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-compositionEnd"], .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-dependencyStart"], .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-dependencyEnd"], .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-extensionStart"], .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-extensionEnd"], .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-aggregationStart"], .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-aggregationEnd"], .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-lollipopStart"], .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-lollipopEnd"], .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; + line-height: initial; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; +} + +.edgeLabel[data-look="neo"] { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; +} + ${y()} +`,`getStyles`),M={getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`),draw:e(async function(e,t,i,a){n.info(`REF0:`),n.info(`Drawing class diagram (v3)`,t);let{securityLevel:o,state:s,layout:c}=r();a.db.setDiagramId(t);let l=a.db.getData(),u=x(t,o);l.type=a.type,l.layoutAlgorithm=v(c),l.nodeSpacing=s?.nodeSpacing||50,l.rankSpacing=s?.rankSpacing||50,l.markers=[`aggregation`,`extension`,`composition`,`dependency`,`lollipop`],l.diagramId=t,await _(l,u),g.insertTitle(u,`classDiagramTitleText`,s?.titleTopMargin??25,a.db.getDiagramTitle()),S(u,8,`classDiagram`,s?.useMaxWidth??!0)},`draw`),getDir:e((e,t=`TB`)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`)};export{j as i,w as n,M as r,A as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-XAKTCX7R-DiVetB2y.js b/lecture-01/assets/chunk-XAKTCX7R-DiVetB2y.js new file mode 100644 index 0000000000000000000000000000000000000000..0e72c1a73b4a580d190b9fecee088d0e992fb4a3 --- /dev/null +++ b/lecture-01/assets/chunk-XAKTCX7R-DiVetB2y.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";var t=typeof global==`object`&&global&&global.Object===Object&&global,n=typeof self==`object`&&self&&self.Object===Object&&self,r=t||n||Function(`return this`)(),i=r.Symbol,a=Object.prototype,o=a.hasOwnProperty,s=a.toString,c=i?i.toStringTag:void 0;function l(e){var t=o.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch{}var i=s.call(e);return r&&(t?e[c]=n:delete e[c]),i}e(l,`getRawTag`);var u=l,d=Object.prototype.toString;function f(e){return d.call(e)}e(f,`objectToString`);var p=f,m=`[object Null]`,h=`[object Undefined]`,g=i?i.toStringTag:void 0;function ee(e){return e==null?e===void 0?h:m:g&&g in Object(e)?u(e):p(e)}e(ee,`baseGetTag`);var _=ee;function v(e){return typeof e==`object`&&!!e}e(v,`isObjectLike`);var y=v,te=`[object Symbol]`;function ne(e){return typeof e==`symbol`||y(e)&&_(e)==te}e(ne,`isSymbol`);var b=ne;function re(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n0){if(++t>=ct)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}e(dt,`shortOut`);var ft=dt;function pt(e){return function(){return e}}e(pt,`constant`);var O=pt,mt=(function(){try{var e=D(Object,`defineProperty`);return e({},``,{}),e}catch{}})(),ht=ft(mt?function(e,t){return mt(e,`toString`,{configurable:!0,enumerable:!1,value:O(t),writable:!0})}:w);function gt(e,t){for(var n=-1,r=e==null?0:e.length;++n-1}e(Et,`arrayIncludes`);var Dt=Et,Ot=9007199254740991,kt=/^(?:0|[1-9]\d*)$/;function At(e,t){var n=typeof e;return t??=Ot,!!t&&(n==`number`||n!=`symbol`&&kt.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Gt}e(Kt,`isLength`);var qt=Kt;function Jt(e){return e!=null&&qt(e.length)&&!T(e)}e(Jt,`isArrayLike`);var A=Jt;function Yt(e,t,n){if(!C(n))return!1;var r=typeof t;return(r==`number`?A(n)&&jt(t,n.length):r==`string`&&t in n)?k(n[t],e):!1}e(Yt,`isIterateeCall`);var Xt=Yt;function Zt(e){return Wt(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&Xt(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r-1}e(Rr,`listCacheHas`);var zr=Rr;function Br(e,t){var n=this.__data__,r=Mr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}e(Br,`listCacheSet`);var Vr=Br;function B(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(s)?t>1?ki(s,t-1,n,r,i):Ti(i,s):r||(i[i.length]=s)}return i}e(ki,`baseFlatten`);var Ai=ki;function ji(e){return e!=null&&e.length?Ai(e,1):[]}e(ji,`flatten`);var Mi=ji;function Ni(e){return ht(Ht(e,void 0,Mi),e+``)}e(Ni,`flatRest`);var Pi=Ni,Fi=Qn(Object.getPrototypeOf,Object),Ii=`[object Object]`,Li=Function.prototype,Ri=Object.prototype,zi=Li.toString,Bi=Ri.hasOwnProperty,Vi=zi.call(Object);function Hi(e){if(!y(e)||_(e)!=Ii)return!1;var t=Fi(e);if(t===null)return!0;var n=Bi.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&zi.call(n)==Vi}e(Hi,`isPlainObject`);var Ui=Hi,Wi=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function Gi(e){return Wi.test(e)}e(Gi,`hasUnicode`);var Ki=Gi;function qi(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++is))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Bs?new Ps:void 0;for(a.set(e,t),a.set(t,e);++d2?t[2]:void 0;for(i&&Xt(t[0],t[1],i)&&(r=1);++n-1?a[o?n[s]:s]:void 0}}e(jl,`createFind`);var Ml=jl,Nl=Math.max;function Pl(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Oe(n);return i<0&&(i=Nl(r+i,0)),yt(e,Y(t,3),i)}e(Pl,`findIndex`);var Fl=Ml(Pl);function Il(e,t){var n=-1,r=A(e)?Array(e.length):[];return rl(e,function(e,i,a){r[++n]=t(e,i,a)}),r}e(Il,`baseMap`);var Ll=Il;function Rl(e,t){return(S(e)?x:Ll)(e,Y(t,3))}e(Rl,`map`);var zl=Rl;function Bl(e,t){return e==null?e:$c(e,Tl(t),L)}e(Bl,`forIn`);var Vl=Bl;function Hl(e,t){return e&&tl(e,Tl(t))}e(Hl,`forOwn`);var Ul=Hl;function Wl(e,t){return e>t}e(Wl,`baseGt`);var Gl=Wl,Kl=Object.prototype.hasOwnProperty;function ql(e,t){return e!=null&&Kl.call(e,t)}e(ql,`baseHas`);var Jl=ql;function Yl(e,t){return e!=null&&Rc(e,t,Jl)}e(Yl,`has`);var Xl=Yl,Zl=`[object String]`;function Ql(e){return typeof e==`string`||!S(e)&&y(e)&&_(e)==Zl}e(Ql,`isString`);var $l=Ql;function eu(e,t){return x(t,function(t){return e[t]})}e(eu,`baseValues`);var tu=eu;function nu(e){return e==null?[]:tu(e,I(e))}e(nu,`values`);var ru=nu,iu=`[object Map]`,au=`[object Set]`,ou=Object.prototype.hasOwnProperty;function su(e){if(e==null)return!0;if(A(e)&&(S(e)||typeof e==`string`||typeof e.splice==`function`||M(e)||qn(e)||j(e)))return!e.length;var t=q(e);if(t==iu||t==au)return!e.size;if(tn(e))return!nr(e).length;for(var n in e)if(ou.call(e,n))return!1;return!0}e(su,`isEmpty`);var cu=su;function lu(e){return e===void 0}e(lu,`isUndefined`);var Z=lu;function uu(e,t){return et||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}e(ju,`compareMultiple`);var Mu=ju;function Nu(e,t,n){t=t.length?x(t,function(e){return S(e)?function(t){return xi(t,e.length===1?e[0]:e)}:e}):[w];var r=-1;return t=x(t,Un(Y)),Ou(Ll(e,function(e,n,i){return{criteria:x(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return Mu(e,t,n)})}e(Nu,`baseOrderBy`);var Pu=Nu,Fu=Kc(`length`),Iu=`\\ud800-\\udfff`,Lu=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,Ru=`\\ufe0e\\ufe0f`,zu=`[`+Iu+`]`,Bu=`[`+Lu+`]`,Vu=`\\ud83c[\\udffb-\\udfff]`,Hu=`(?:`+Bu+`|`+Vu+`)`,Uu=`[^`+Iu+`]`,Wu=`(?:\\ud83c[\\udde6-\\uddff]){2}`,Gu=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Ku=`\\u200d`,qu=Hu+`?`,Ju=`[`+Ru+`]?`,Yu=`(?:`+Ku+`(?:`+[Uu,Wu,Gu].join(`|`)+`)`+Ju+qu+`)*`,Xu=Ju+qu+Yu,Zu=`(?:`+[Uu+Bu+`?`,Bu,Wu,Gu,zu].join(`|`)+`)`,Qu=RegExp(Vu+`(?=`+Vu+`)|`+Zu+Xu,`g`);function $u(e){for(var t=Qu.lastIndex=0;Qu.test(e);)++t;return t}e($u,`unicodeSize`);var ed=$u;function td(e){return Ki(e)?ed(e):Fu(e)}e(td,`stringSize`);var nd=td;function rd(e,t){return Eu(e,t,function(t,n){return Bc(e,n)})}e(rd,`basePick`);var id=rd,ad=Pi(function(e,t){return e==null?{}:id(e,t)}),od=Math.ceil,sd=Math.max;function cd(e,t,n,r){for(var i=-1,a=sd(od((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}e(cd,`baseRange`);var ld=cd;function ud(e){return function(t,n,r){return r&&typeof r!=`number`&&Xt(t,n,r)&&(n=r=void 0),t=Ee(t),n===void 0?(n=t,t=0):n=Ee(n),r=r===void 0?t1&&Xt(e,t[0],t[1])?t=[]:n>2&&Xt(t[0],t[1],t[2])&&(t=[t[0]]),Pu(e,Ai(t,1),[])}),xd=G&&1/Ks(new G([,-0]))[1]==1/0?function(e){return new G(e)}:at,Sd=200;function Cd(e,t,n){var r=-1,i=Dt,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=xl;else if(a>=Sd){var l=t?null:xd(e);if(l)return Ks(l);o=!1,i=Rs,c=new Ps}else c=t?[]:s;outer:for(;++r1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Q,this._children[e]={},this._children[Q][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var n=e(e=>this.removeEdge(this._edgeObjs[e]),`removeEdge`);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],X(this.children(t),e=>{this.setParent(e)}),delete this._children[t]),X(I(this._in[t]),n),delete this._in[t],delete this._preds[t],X(I(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(Z(t))t=Q;else{t+=``;for(var n=t;!Z(n);n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==Q)return t}}children(e){if(Z(e)&&(e=Q),this._isCompound){var t=this._children[e];if(t)return I(t)}else if(e===Q)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return I(t)}successors(e){var t=this._sucs[e];if(t)return I(t)}neighbors(e){var t=this.predecessors(e);if(t)return Td(t,this.successors(e))}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(t){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var r=this;X(this._nodes,function(e,r){t(r)&&n.setNode(r,e)}),X(this._edgeObjs,function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,r.edge(e))});var i={};function a(e){var t=r.parent(e);return t===void 0||n.hasNode(t)?(i[e]=t,t):t in i?i[t]:a(t)}return e(a,`findParent`),this._isCompound&&X(n.nodes(),function(e){n.setParent(e,a(e))}),n}setDefaultEdgeLabel(e){return T(e)||(e=O(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return ru(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return hd(e,function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,Z(n)||(n=``+n);var o=$(this._isDirected,e,t,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!Z(n)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(e,t,n);var s=Rd(this._isDirected,e,t,n);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[o]=s,Id(this._preds[t],e),Id(this._sucs[e],t),this._in[t][o]=s,this._out[e][o]=s,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?zd(this._isDirected,arguments[0]):$(this._isDirected,e,t,n);return this._edgeLabels[r]}hasEdge(e,t,n){var r=arguments.length===1?zd(this._isDirected,arguments[0]):$(this._isDirected,e,t,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?zd(this._isDirected,arguments[0]):$(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],Ld(this._preds[t],e),Ld(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=ru(n);return t?Al(r,function(e){return e.v===t}):r}}outEdges(e,t){var n=this._out[e];if(n){var r=ru(n);return t?Al(r,function(e){return e.w===t}):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};Fd.prototype._nodeCount=0,Fd.prototype._edgeCount=0;function Id(e,t){e[t]?e[t]++:e[t]=1}e(Id,`incrementOrInitEntry`);function Ld(e,t){--e[t]||delete e[t]}e(Ld,`decrementOrRemoveEntry`);function $(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+Pd+a+Pd+(Z(r)?Nd:r)}e($,`edgeArgsToId`);function Rd(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}e(Rd,`edgeArgsToObj`);function zd(e,t){return $(e,t.v,t.w,t.name)}e(zd,`edgeObjToId`);export{Md as A,ad as C,bd as D,yd as E,Od as O,il as S,hd as T,zl as _,sl as a,Su as b,Mi as c,Ul as d,Xl as f,pu as g,Cl as h,O as i,ru as k,X as l,Z as m,Ds as n,Al as o,S as p,Cs as r,Fl as s,Fd as t,Vl as u,_u as v,dd as w,bu as x,vu as y}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-XXV7AQMY-qeLKYxsH.js b/lecture-01/assets/chunk-XXV7AQMY-qeLKYxsH.js new file mode 100644 index 0000000000000000000000000000000000000000..d52c9ebbd613313e8dfb4ca871a4b67fb75a694b --- /dev/null +++ b/lecture-01/assets/chunk-XXV7AQMY-qeLKYxsH.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{C as t}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";var n=e(e=>{let{handDrawnSeed:n}=t();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:n}},`solidStateFill`),r=e(e=>{let t=i([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),i=e(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),a=e(e=>e===`color`||e===`font-size`||e===`font-family`||e===`font-weight`||e===`font-style`||e===`text-decoration`||e===`text-align`||e===`text-transform`||e===`line-height`||e===`letter-spacing`||e===`word-spacing`||e===`text-shadow`||e===`text-overflow`||e===`white-space`||e===`word-wrap`||e===`word-break`||e===`overflow-wrap`||e===`hyphens`,`isLabelStyle`),o=e(e=>{let{stylesArray:t}=r(e),n=[],i=[],o=[],s=[];return t.forEach(e=>{let t=e[0];a(t)?n.push(e.join(`:`)+` !important`):(i.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&o.push(e.join(`:`)+` !important`),t===`fill`&&s.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:i.join(`;`),stylesArray:t,borderStyles:o,backgroundStyles:s}},`styles2String`),s=e((e,n)=>{let{themeVariables:i,handDrawnSeed:a}=t(),{nodeBorder:o,mainBkg:s}=i,{stylesMap:l}=r(e);return Object.assign({roughness:.7,fill:l.get(`fill`)||s,fillStyle:`hachure`,fillWeight:4,hachureGap:5.2,stroke:l.get(`stroke`)||o,seed:a,strokeWidth:l.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:c(l.get(`stroke-dasharray`))},n)},`userNodeOverrides`),c=e(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`);export{s as a,o as i,a as n,n as r,r as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-YV36FAQU-CkTVkoM6.js b/lecture-01/assets/chunk-YV36FAQU-CkTVkoM6.js new file mode 100644 index 0000000000000000000000000000000000000000..da30e32efaaa050e084b491514bf5c8972e61b73 --- /dev/null +++ b/lecture-01/assets/chunk-YV36FAQU-CkTVkoM6.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{C as t,m as n}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{h as r}from"./chunk-OX6ZKUVE-roiHi12N.js";var i=e(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`);async function a(i,a){let o=i.getElementsByTagName(`img`);if(!o||o.length===0)return;let s=a.replace(/]*>/g,``).trim()===``;await Promise.all([...o].map(i=>new Promise(a=>{function o(){if(i.style.display=`flex`,i.style.flexDirection=`column`,s){let e=t().fontSize?t().fontSize:window.getComputedStyle(document.body).fontSize,[a=n.fontSize]=r(e),o=a*5+`px`;i.style.minWidth=o,i.style.maxWidth=o}else i.style.width=`100%`;a(i)}e(o,`setupImage`),setTimeout(()=>{i.complete&&o()}),i.addEventListener(`error`,o),i.addEventListener(`load`,o)})))}e(a,`configureLabelImages`);export{i as n,a as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-Z6Q54H3S-B8XyqzVF.js b/lecture-01/assets/chunk-Z6Q54H3S-B8XyqzVF.js new file mode 100644 index 0000000000000000000000000000000000000000..b1e9ff6872c5e1e20a8667951142c636b0e11b26 --- /dev/null +++ b/lecture-01/assets/chunk-Z6Q54H3S-B8XyqzVF.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{C as t,S as n,f as r,n as i,o as a,t as o,u as s,w as c,x as l}from"./chunk-A7G5T7E5-C2HISlqa.js";var u=class extends o{static{e(this,`PieTokenBuilder`)}static{l(this,`PieTokenBuilder`)}constructor(){super([`pie`,`showData`])}},d=class extends i{static{e(this,`PieValueConverter`)}static{l(this,`PieValueConverter`)}runCustomConverter(e,t,n){if(e.name===`PIE_SECTION_LABEL`)return t.replace(/"/g,``).trim()}},f={parser:{TokenBuilder:l(()=>new u,`TokenBuilder`),ValueConverter:l(()=>new d,`ValueConverter`)}};function p(e=a){let i=c(t(e),s),o=c(n({shared:i}),r,f);return i.ServiceRegistry.register(o),{shared:i,Pie:o}}e(p,`createPieServices`),l(p,`createPieServices`);export{p as n,f as t}; \ No newline at end of file diff --git a/lecture-01/assets/chunk-ZICDAICJ-CB44yeNY.js b/lecture-01/assets/chunk-ZICDAICJ-CB44yeNY.js new file mode 100644 index 0000000000000000000000000000000000000000..e9751d0302f2f8f25fa377ed36b9a4e91327005d --- /dev/null +++ b/lecture-01/assets/chunk-ZICDAICJ-CB44yeNY.js @@ -0,0 +1 @@ +import{i as e,r as t}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as n}from"./chunk-FO5PYUIK-CPzj2963.js";import{F as r}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as i}from"./chunk-IPM4HZQ6-CQmHNgJe.js";var a=e(i(),1),o=t((e,t)=>{let n=e.append(`rect`);if(n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),t.name&&n.attr(`name`,t.name),t.rx&&n.attr(`rx`,t.rx),t.ry&&n.attr(`ry`,t.ry),t.attrs!==void 0)for(let e in t.attrs)n.attr(e,t.attrs[e]);return t.class&&n.attr(`class`,t.class),n},`drawRect`),s=t((e,t)=>{o(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:`rect`}).lower()},`drawBackgroundRect`),c=t((e,t)=>{let n=t.text.replace(r,` `),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.attr(`class`,`legend`),i.style(`text-anchor`,t.anchor),t.class&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.text(n),i},`drawText`),l=t((e,t,n,r)=>{let i=e.append(`image`);i.attr(`x`,t),i.attr(`y`,n);let o=(0,a.sanitizeUrl)(r);i.attr(`xlink:href`,o)},`drawImage`),u=t((e,t,n,r)=>{let i=e.append(`use`);i.attr(`x`,t),i.attr(`y`,n);let o=(0,a.sanitizeUrl)(r);i.attr(`xlink:href`,`#${o}`)},`drawEmbeddedImage`),d=t(()=>({x:0,y:0,width:100,height:100,fill:`#EDF2AE`,stroke:`#666`,anchor:`start`,rx:0,ry:0}),`getNoteRect`),f=t(()=>({x:0,y:0,width:100,height:100,"text-anchor":`start`,style:`#666`,textMargin:0,rx:0,ry:0,tspan:!0}),`getTextObj`),p=t(()=>{let e=n(`.mermaidTooltip`);return e.empty()&&(e=n(`body`).append(`div`).attr(`class`,`mermaidTooltip`).style(`opacity`,0).style(`position`,`absolute`).style(`text-align`,`center`).style(`max-width`,`200px`).style(`padding`,`2px`).style(`font-size`,`12px`).style(`background`,`#ffffde`).style(`border`,`1px solid #333`).style(`border-radius`,`2px`).style(`pointer-events`,`none`).style(`z-index`,`100`)),e},`createTooltip`);export{o as a,f as c,l as i,s as n,c as o,u as r,d as s,p as t}; \ No newline at end of file diff --git a/lecture-01/assets/classDiagram-UCXUAZDN-CzzXamfC.js b/lecture-01/assets/classDiagram-UCXUAZDN-CzzXamfC.js new file mode 100644 index 0000000000000000000000000000000000000000..7f1f0747d8ee1a02ba579001e31faf0b567afcf6 --- /dev/null +++ b/lecture-01/assets/classDiagram-UCXUAZDN-CzzXamfC.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import"./chunk-FO5PYUIK-CPzj2963.js";import"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-PLCLPJVV-BfMyJHbe.js";import"./chunk-XXV7AQMY-qeLKYxsH.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import"./chunk-OX6ZKUVE-roiHi12N.js";import"./chunk-YV36FAQU-CkTVkoM6.js";import"./chunk-AQ2D6KKF-AxjphkEe.js";import"./chunk-2V3FENDJ-B1mkZICr.js";import"./chunk-DKH7L6O3-pKUB4f-O.js";import"./chunk-RTI7CJYH-CrTK6TD7.js";import"./chunk-MPM6TOF7-5cxd71sq.js";import"./chunk-STSWKLMO-1NGmNrHs.js";import"./chunk-ZICDAICJ-CB44yeNY.js";import"./chunk-HPLX5OYV-zid2YVw5.js";import"./chunk-BYAF6FXG-DqiL_6qO.js";import{i as t,n,r,t as i}from"./chunk-WBLI2NX4-B_kS-fCR.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/classDiagram-v2-3IH6NYTM-CzzXamfC.js b/lecture-01/assets/classDiagram-v2-3IH6NYTM-CzzXamfC.js new file mode 100644 index 0000000000000000000000000000000000000000..7f1f0747d8ee1a02ba579001e31faf0b567afcf6 --- /dev/null +++ b/lecture-01/assets/classDiagram-v2-3IH6NYTM-CzzXamfC.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import"./chunk-FO5PYUIK-CPzj2963.js";import"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-PLCLPJVV-BfMyJHbe.js";import"./chunk-XXV7AQMY-qeLKYxsH.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import"./chunk-OX6ZKUVE-roiHi12N.js";import"./chunk-YV36FAQU-CkTVkoM6.js";import"./chunk-AQ2D6KKF-AxjphkEe.js";import"./chunk-2V3FENDJ-B1mkZICr.js";import"./chunk-DKH7L6O3-pKUB4f-O.js";import"./chunk-RTI7CJYH-CrTK6TD7.js";import"./chunk-MPM6TOF7-5cxd71sq.js";import"./chunk-STSWKLMO-1NGmNrHs.js";import"./chunk-ZICDAICJ-CB44yeNY.js";import"./chunk-HPLX5OYV-zid2YVw5.js";import"./chunk-BYAF6FXG-DqiL_6qO.js";import{i as t,n,r,t as i}from"./chunk-WBLI2NX4-B_kS-fCR.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/cose-bilkent-UCWTYXWA-BOsqo5kc.js b/lecture-01/assets/cose-bilkent-UCWTYXWA-BOsqo5kc.js new file mode 100644 index 0000000000000000000000000000000000000000..4d62fefb0d8a831919c9c26cf09bd410b82b6709 --- /dev/null +++ b/lecture-01/assets/cose-bilkent-UCWTYXWA-BOsqo5kc.js @@ -0,0 +1 @@ +import{i as e,r as t,t as n}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as r,T as i}from"./chunk-FO5PYUIK-CPzj2963.js";import{t as a}from"./chunk-EMKVYAI2-C4ZARs9V.js";var o=n({"../../node_modules/.pnpm/layout-base@1.0.2/node_modules/layout-base/layout-base.js"(e,n){t((function(t,r){typeof e==`object`&&typeof n==`object`?n.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():t.layoutBase=r()}),`webpackUniversalModuleDefinition`)(e,function(){return(function(e){var n={};function r(t){if(n[t])return n[t].exports;var i=n[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return t(r,`__webpack_require__`),r.m=e,r.c=n,r.i=function(e){return e},r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var n=e&&e.__esModule?t(function(){return e.default},`getDefault`):t(function(){return e},`getModuleExports`);return r.d(n,`a`,n),n},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=``,r(r.s=26)})([(function(e,n,r){function i(){}t(i,`LayoutConstants`),i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_SIZE=40,i.SIMPLE_NODE_HALF_SIZE=i.SIMPLE_NODE_SIZE/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.WORLD_BOUNDARY=1e6,i.INITIAL_WORLD_BOUNDARY=i.WORLD_BOUNDARY/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,e.exports=i}),(function(e,n,r){var i=r(2),a=r(8),o=r(9);function s(e,t,n){i.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var c in t(s,`LEdge`),s.prototype=Object.create(i.prototype),i)s[c]=i[c];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},s.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},s.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=s}),(function(e,n,r){function i(e){this.vGraphObject=e}t(i,`LGraphObject`),e.exports=i}),(function(e,n,r){var i=r(2),a=r(10),o=r(13),s=r(0),c=r(16),l=r(4);function u(e,t,n,r){n==null&&r==null&&(r=t),i.call(this,r),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=r,this.edges=[],this.graphManager=e,this.rect=n!=null&&t!=null?new o(t.x,t.y,n.width,n.height):new o}for(var d in t(u,`LNode`),u.prototype=Object.create(i.prototype),i)u[d]=i[d];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(e){this.rect.width=e},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(e){this.rect.height=e},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},u.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},u.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},u.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},u.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},u.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.source!=n&&r.target!=n)throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},u.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},u.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;it&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&(this.labelPos==`center`?this.rect.y-=(this.labelHeight-n)/2:this.labelPos==`top`&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},u.prototype.transform=function(e){var t=this.rect.x;t>s.WORLD_BOUNDARY?t=s.WORLD_BOUNDARY:t<-s.WORLD_BOUNDARY&&(t=-s.WORLD_BOUNDARY);var n=this.rect.y;n>s.WORLD_BOUNDARY?n=s.WORLD_BOUNDARY:n<-s.WORLD_BOUNDARY&&(n=-s.WORLD_BOUNDARY);var r=new l(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=u}),(function(e,n,r){function i(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}t(i,`PointD`),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(e){this.x=e},i.prototype.setY=function(e){this.y=e},i.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=i}),(function(e,n,r){var i=r(2),a=r(10),o=r(0),s=r(6),c=r(3),l=r(1),u=r(13),d=r(12),f=r(11);function p(e,t,n){i.call(this,n),this.estimatedSize=a.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof s?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var m in t(p,`LGraph`),p.prototype=Object.create(i.prototype),i)p[m]=i[m];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)throw`Graph has no graph mgr!`;if(this.getNodes().indexOf(r)>-1)throw`Node already in graph!`;return r.owner=this,this.getNodes().push(r),r}var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(t.owner!=n.owner||t.owner!=this)throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null},p.prototype.remove=function(e){var t=e;if(e instanceof c){if(t==null)throw`Node is null!`;if(t.owner==null||t.owner!=this)throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a-1&&u>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(s,1),r.target!=r.source&&r.target.edges.splice(u,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},p.prototype.updateLeftTop=function(){for(var e=a.MAX_VALUE,t=a.MAX_VALUE,n,r,i,o=this.getNodes(),s=o.length,c=0;cn&&(e=n),t>r&&(t=r)}return e==a.MAX_VALUE?null:(i=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-i,this.top=e-i,new d(this.left,this.top))},p.prototype.updateBounds=function(e){for(var t=a.MAX_VALUE,n=-a.MAX_VALUE,r=a.MAX_VALUE,i=-a.MAX_VALUE,o,s,c,l,d,f=this.nodes,p=f.length,m=0;mo&&(t=o),nc&&(r=c),io&&(t=o),nc&&(r=c),i=this.nodes.length){var c=0;n.forEach(function(t){t.owner==e&&c++}),c==this.nodes.length&&(this.isConnected=!0)}},e.exports=p}),(function(e,n,r){var i,a=r(1);function o(e){i=r(5),this.layout=e,this.graphs=[],this.edges=[]}t(o,`LGraphManager`),o.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},o.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==null)throw`Parent node is null!`;if(this.graphs.indexOf(e)>-1)throw`Graph already in this graph mgr!`;if(this.graphs.push(e),e.parent!=null)throw`Already has a parent!`;if(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(a==null||a.getGraphManager()!=this)throw`Source not in this graph mgr!`;if(o==null||o.getGraphManager()!=this)throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),n.source==null||n.target==null)throw`Edge source and/or target is null!`;if(n.source.edges.indexOf(n)!=-1||n.target.edges.indexOf(n)!=-1)throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n},o.prototype.remove=function(e){if(e instanceof i){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var r,o=n.length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]o)return n[0]=r,n[1]=c,n[2]=a,n[3]=y,!1;if(ia)return n[0]=s,n[1]=i,n[2]=_,n[3]=o,!1;if(ra?(n[0]=u,n[1]=d,C=!0):(n[0]=l,n[1]=c,C=!0):T===D&&(r>a?(n[0]=s,n[1]=c,C=!0):(n[0]=f,n[1]=d,C=!0)),-E===D?a>r?(n[2]=v,n[3]=y,w=!0):(n[2]=_,n[3]=g,w=!0):E===D&&(a>r?(n[2]=h,n[3]=g,w=!0):(n[2]=b,n[3]=y,w=!0)),C&&w)return!1;if(r>a?i>o?(O=this.getCardinalDirection(T,D,4),k=this.getCardinalDirection(E,D,2)):(O=this.getCardinalDirection(-T,D,3),k=this.getCardinalDirection(-E,D,1)):i>o?(O=this.getCardinalDirection(-T,D,1),k=this.getCardinalDirection(-E,D,3)):(O=this.getCardinalDirection(T,D,2),k=this.getCardinalDirection(E,D,4)),!C)switch(O){case 1:j=c,A=r+-m/D,n[0]=A,n[1]=j;break;case 2:A=f,j=i+p*D,n[0]=A,n[1]=j;break;case 3:j=d,A=r+m/D,n[0]=A,n[1]=j;break;case 4:A=u,j=i+-p*D,n[0]=A,n[1]=j}if(!w)switch(k){case 1:N=g,M=a+-S/D,n[2]=M,n[3]=N;break;case 2:M=b,N=o+x*D,n[2]=M,n[3]=N;break;case 3:N=y,M=a+S/D,n[2]=M,n[3]=N;break;case 4:M=v,N=o+-x*D,n[2]=M,n[3]=N}}return!1},a.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},a.getIntersection=function(e,t,n,r){if(r==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,c=t.y,l=n.x,u=n.y,d=r.x,f=r.y,p=void 0,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0;return h=c-o,_=a-s,y=s*o-a*c,g=f-u,v=l-d,b=d*u-l*f,x=h*v-g*_,x===0?null:(p=(_*b-v*y)/x,m=(g*y-h*b)/x,new i(p,m))},a.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r0?1:e<0?-1:0},i.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},i.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=i}),(function(e,n,r){function i(){}t(i,`Integer`),i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,e.exports=i}),(function(e,n,r){var i=(function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(l[0]);s.length>0&&t;){var u=s[0];s.splice(0,1),o.add(u);for(var d=u.getEdges(),a=0;a-1&&l.splice(h,1)}o=new Set,c=new Map}}return e},p.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var r=this.edgeToDummyNodes.get(n),a=0;a=0&&t.splice(d,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&l.push(e),r.set(e,t)}})}n=n.concat(l),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},p.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=p}),(function(e,n,r){function i(){}t(i,`RandomSeed`),i.seed=1,i.x=0,i.nextDouble=function(){return i.x=Math.sin(i.seed++)*1e4,i.x-Math.floor(i.x)},e.exports=i}),(function(e,n,r){var i=r(4);function a(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}t(a,`Transform`),a.prototype.getWorldOrgX=function(){return this.lworldOrgX},a.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},a.prototype.getWorldOrgY=function(){return this.lworldOrgY},a.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},a.prototype.getWorldExtX=function(){return this.lworldExtX},a.prototype.setWorldExtX=function(e){this.lworldExtX=e},a.prototype.getWorldExtY=function(){return this.lworldExtY},a.prototype.setWorldExtY=function(e){this.lworldExtY=e},a.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},a.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},a.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},a.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},a.prototype.getDeviceExtX=function(){return this.ldeviceExtX},a.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},a.prototype.getDeviceExtY=function(){return this.ldeviceExtY},a.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},a.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},a.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},a.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},a.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},a.prototype.inverseTransformPoint=function(e){return new i(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=a}),(function(e,n,r){function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);to.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL):(this.coolingFactor=e>o.ADAPTATION_LOWER_NODE_LIMIT?Math.max(o.COOLING_ADAPTATION_FACTOR,1-(e-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR)):1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n,r,i,a,s=this.getAllNodes(),c;if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),c=new Set,n=0;nc||s>c)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(c=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},u.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=c.length||u>=c[0].length)){for(var d=0;de},`_defaultCompareFunction`)}]),e})()}),(function(e,n,r){var i=(function(){function e(e,t){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;a(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},a.emit=function(e,t){for(var n=0;ne.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},o.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(l.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0}if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-this.coolingCycle**+(Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0){if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0}this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n1){var s;for(s=0;sr&&(r=Math.floor(o.y)),a=Math.floor(o.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(d.WORLD_CENTER_X-o.x/2,d.WORLD_CENTER_Y-o.y/2))},y.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),l.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(t,null,0,359,0,r);var i=_.calculateBounds(e),a=new v;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o1;){var _=h[0];h.splice(0,1);var v=u.indexOf(_);v>=0&&u.splice(v,1),p--,d--}m=t==null?0:(u.indexOf(h[0])+1)%p;for(var b=Math.abs(r-n)/d,x=m;f!=d;x=++x%p){var S=u[x].getOtherEnd(e);if(S!=t){var C=(n+f*b)%360,w=(C+b)%360;y.branchRadialLayout(S,e,C,w,i+a,a),f++}}},y.maxDiagonalInTree=function(e){for(var t=h.MIN_VALUE,n=0;nt&&(t=r)}return t},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new s(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var o=e.getGraphManager().add(e.newGraph(),a),c=i.getChild();c.add(a);for(var l=0;l=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},y.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)})},y.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},y.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;rc&&(c=u.rect.height)}n+=c+e.verticalPadding}},y.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height})},y.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:l.TILING_PADDING_VERTICAL,horizontalPadding:l.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:+(e.rect.width*e.rect.height0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},y.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},y.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a=0;e.rowHeight[r]0&&(a=n+e.verticalPadding-e.rowHeight[r]);var o=e.width-i>=t+e.horizontalPadding?(e.height+a)/(i+t+e.horizontalPadding):(e.height+a)/e.width;a=n+e.verticalPadding;var s=e.widtha&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;so&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]0)for(var l=i;l<=a;l++)c[0]+=this.grid[l][o-1].length+this.grid[l][o].length-1;if(a0)for(var l=o;l<=s;l++)c[3]+=this.grid[i-1][l].length+this.grid[i][l].length-1;for(var d=h.MAX_VALUE,f,p,m=0;m0){var h=n.getGraphManager().add(n.newGraph(),s);this.processChildrenList(h,o,n)}}},p.prototype.stop=function(){return this.stopped=!0,this};var h=t(function(e){e(`layout`,`cose-bilkent`,p)},`register`);typeof cytoscape<`u`&&h(cytoscape),e.exports=h})])})}}),l=e(c(),1);a.use(l.default);function u(e,t){e.forEach(e=>{let n={id:e.id,labelText:e.label,height:e.height,width:e.width,padding:e.padding??0};Object.keys(e).forEach(t=>{[`id`,`label`,`height`,`width`,`padding`,`x`,`y`].includes(t)||(n[t]=e[t])}),t.add({group:`nodes`,data:n,position:{x:e.x??0,y:e.y??0}})})}t(u,`addNodes`);function d(e,t){e.forEach(e=>{let n={id:e.id,source:e.start,target:e.end};Object.keys(e).forEach(t=>{[`id`,`start`,`end`].includes(t)||(n[t]=e[t])}),t.add({group:`edges`,data:n})})}t(d,`addEdges`);function f(e){return new Promise(t=>{let n=r(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),o=a({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`bezier`}}]});n.remove(),u(e.nodes,o),d(e.edges,o),o.nodes().forEach(function(e){e.layoutDimensions=()=>{let t=e.data();return{w:t.width,h:t.height}}}),o.layout({name:`cose-bilkent`,quality:`proof`,styleEnabled:!1,animate:!1}).run(),o.ready(e=>{i.info(`Cytoscape ready`,e),t(o)})})}t(f,`createCytoscapeInstance`);function p(e){return e.nodes().map(e=>{let t=e.data(),n=e.position(),r={id:t.id,x:n.x,y:n.y};return Object.keys(t).forEach(e=>{e!==`id`&&(r[e]=t[e])}),r})}t(p,`extractPositionedNodes`);function m(e){return e.edges().map(e=>{let t=e.data(),n=e._private.rscratch,r={id:t.id,source:t.source,target:t.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(t).forEach(e=>{[`id`,`source`,`target`].includes(e)||(r[e]=t[e])}),r})}t(m,`extractPositionedEdges`);async function h(e,t){i.debug(`Starting cose-bilkent layout algorithm`);try{g(e);let t=await f(e),n=p(t),r=m(t);return i.debug(`Layout completed: ${n.length} nodes, ${r.length} edges`),{nodes:n,edges:r}}catch(e){throw i.error(`Error in cose-bilkent layout algorithm:`,e),e}}t(h,`executeCoseBilkentLayout`);function g(e){if(!e)throw Error(`Layout data is required`);if(!e.config)throw Error(`Configuration is required in layout data`);if(!e.rootNode)throw Error(`Root node is required`);if(!e.nodes||!Array.isArray(e.nodes))throw Error(`No nodes found in layout data`);if(!Array.isArray(e.edges))throw Error(`Edges array is required in layout data`);return!0}t(g,`validateLayoutData`);var _=t(async(e,t,{insertCluster:n,insertEdge:r,insertEdgeLabel:i,insertMarkers:a,insertNode:o,log:s,positionEdgeLabel:c},{algorithm:l})=>{let u={},d={},f=t.select(`g`);a(f,e.markers,e.type,e.diagramId);let p=f.insert(`g`).attr(`class`,`subgraphs`),m=f.insert(`g`).attr(`class`,`edgePaths`),g=f.insert(`g`).attr(`class`,`edgeLabels`),_=f.insert(`g`).attr(`class`,`nodes`);s.debug(`Inserting nodes into DOM for dimension calculation`),await Promise.all(e.nodes.map(async t=>{if(t.isGroup){let e={...t};d[t.id]=e,u[t.id]=e,await n(p,t)}else{let n={...t};u[t.id]=n;let r=await o(_,t,{config:e.config,dir:e.direction||`TB`}),i=r.node().getBBox();n.width=i.width,n.height=i.height,n.domId=r,s.debug(`Node ${t.id} dimensions: ${i.width}x${i.height}`)}})),s.debug(`Running cose-bilkent layout algorithm`);let v=await h({...e,nodes:e.nodes.map(e=>{let t=u[e.id];return{...e,width:t.width,height:t.height}})},e.config);s.debug(`Positioning nodes based on layout results`),v.nodes.forEach(e=>{let t=u[e.id];t?.domId&&(t.domId.attr(`transform`,`translate(${e.x}, ${e.y})`),t.x=e.x,t.y=e.y,s.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`))}),v.edges.forEach(t=>{let n=e.edges.find(e=>e.id===t.id);n&&(n.points=[{x:t.startX,y:t.startY},{x:t.midX,y:t.midY},{x:t.endX,y:t.endY}])}),s.debug(`Inserting and positioning edges`),await Promise.all(e.edges.map(async t=>{await i(g,t);let n=u[t.start??``],a=u[t.end??``];if(n&&a){let i=v.edges.find(e=>e.id===t.id);if(i){s.debug(`APA01 positionedEdge`,i);let o={...t};c(o,r(m,o,d,e.type,n,a,e.diagramId))}else{let i={...t,points:[{x:n.x||0,y:n.y||0},{x:a.x||0,y:a.y||0}]};c(i,r(m,i,d,e.type,n,a,e.diagramId))}}})),s.debug(`Cose-bilkent rendering completed`)},`render`);export{_ as render}; \ No newline at end of file diff --git a/lecture-01/assets/cv-task-categories-DXkfK0Uy.jpeg b/lecture-01/assets/cv-task-categories-DXkfK0Uy.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..46d7ddc2db6727e46cc022962e01e7bd7f163047 Binary files /dev/null and b/lecture-01/assets/cv-task-categories-DXkfK0Uy.jpeg differ diff --git a/lecture-01/assets/cynefin-VYW2F7L2-VU6BHR45-DkJfH4OC.js b/lecture-01/assets/cynefin-VYW2F7L2-VU6BHR45-DkJfH4OC.js new file mode 100644 index 0000000000000000000000000000000000000000..c6873523b02450f5fd51e571edadc192780af50d --- /dev/null +++ b/lecture-01/assets/cynefin-VYW2F7L2-VU6BHR45-DkJfH4OC.js @@ -0,0 +1 @@ +import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as e}from"./chunk-NYCIP5HP-BZs_nZUU.js";export{e as createCynefinServices}; \ No newline at end of file diff --git a/lecture-01/assets/cynefinDiagram-3PKP3OFC-BN65f1Gk.js b/lecture-01/assets/cynefinDiagram-3PKP3OFC-BN65f1Gk.js new file mode 100644 index 0000000000000000000000000000000000000000..85ee79c6f47728a03a82a45fb0ebc282724c61e7 --- /dev/null +++ b/lecture-01/assets/cynefinDiagram-3PKP3OFC-BN65f1Gk.js @@ -0,0 +1,62 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as t}from"./chunk-FO5PYUIK-CPzj2963.js";import{E as n,J as r,Q as i,S as a,Y as o,b as s,k as c,l,m as u,o as d,x as f}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as p}from"./chunk-BPTLHSDI-QRS_xuYz.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{i as m}from"./chunk-OX6ZKUVE-roiHi12N.js";import{t as h}from"./chunk-6ZKBGPIT-B4RTUexp.js";import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as g}from"./chunk-BQKPLVCE-CH-bQZj9.js";import"./chunk-NYCIP5HP-BZs_nZUU.js";import"./chunk-6QIBY7DQ-xR0SR3RB.js";import"./chunk-SLCUJWJ3-Bzf1BoPP.js";import"./chunk-43ACQNTO-CVHKukau.js";import"./chunk-FXRKSSP6-BDxrggHz.js";import"./chunk-RRYK4PFG-DZMcopsb.js";import"./chunk-IT6C5QXO-BI6Sf-cR.js";import"./chunk-GMJQP6DO-gEw8rKqu.js";import"./chunk-ODPFZSHR-BUzFQ4Zq.js";import"./chunk-6OZ7KPF7-CpRlDBGl.js";import"./chunk-LJTN6OYE-BTsXVLFU.js";import"./chunk-Z6Q54H3S-B8XyqzVF.js";import"./chunk-4KMQCWFH-ClzK3uec.js";import"./chunk-S7Q6ZHN2-CSIi0_Nw.js";import"./chunk-IIWGMRJM-k15frrBU.js";var _=e(()=>({domains:new Map,transitions:[]}),`createDefaultData`),v=_(),y={getDomains:e(()=>v.domains,`getDomains`),getTransitions:e(()=>v.transitions,`getTransitions`),setDomains:e(e=>{if(e)for(let t of e){let e=t.domain,n=(t.items??[]).map(e=>({label:e.label}));v.domains.set(e,{name:e,items:n})}},`setDomains`),setTransitions:e(e=>{e&&(v.transitions=e.filter(e=>e.from!==e.to||(t.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1)).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},`setTransitions`),getConfig:e(()=>m({...u.cynefin,...a().cynefin}),`getConfig`),clear:e(()=>{d(),v=_()},`clear`),setAccTitle:o,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:n,getAccDescription:s,setAccDescription:r},b=e(e=>{h(e,y),y.setDomains(e.domains),y.setTransitions(e.transitions)},`populate`),x={parse:e(async e=>{let n=await g(`cynefin`,e);t.debug(n),b(n)},`parse`)};function S(e){let t=e+1831565813|0;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}e(S,`seededRandom`);function C(e){let t=0;for(let n=0;n{let n=e/2,r=t/2;return{complex:{cx:n/2,cy:r/2,x:0,y:0,w:n,h:r},complicated:{cx:n+n/2,cy:r/2,x:n,y:0,w:n,h:r},chaotic:{cx:n/2,cy:r+r/2,x:0,y:r,w:n,h:r},clear:{cx:n+n/2,cy:r+r/2,x:n,y:r,w:n,h:r},confusion:{cx:n,cy:r,x:n*.7,y:r*.7,w:n*.6,h:r*.6}}},`getDomainLayouts`),j=e(()=>{let e=c(),t=a();return m(e,t.themeVariables).cynefin},`getCynefinDomainColors`),M=3,N={draw:e((e,n,r,i)=>{let a=i.db,o=a.getDomains(),s=a.getTransitions(),c=a.getDiagramTitle(),u=a.getAccTitle(),d=a.getAccDescription(),f=a.getConfig(),m=j();t.debug(`Rendering Cynefin diagram`);let h=f.width,g=f.height,_=f.padding,v=f.showDomainDescriptions,y=f.boundaryAmplitude,b=h+_*2,x=g+_*2,S={complex:m.complexBg,complicated:m.complicatedBg,clear:m.clearBg,chaotic:m.chaoticBg,confusion:m.confusionBg},C=p(n);l(C,x,b,f.useMaxWidth??!0),C.attr(`viewBox`,`0 0 ${b} ${x}`),u&&C.append(`title`).text(u),d&&C.append(`desc`).text(d);let N=C.append(`g`).attr(`transform`,`translate(${_}, ${_})`),P=A(h,g),F=w(f.seed,n),I=N.append(`g`).attr(`class`,`cynefin-backgrounds`),L=[`complex`,`complicated`,`chaotic`,`clear`];for(let e of L){let t=P[e];I.append(`rect`).attr(`class`,`cynefinDomain`).attr(`x`,t.x).attr(`y`,t.y).attr(`width`,t.w).attr(`height`,t.h).attr(`fill`,S[e]).attr(`fill-opacity`,.4).attr(`stroke`,`none`)}let R=N.append(`g`).attr(`class`,`cynefin-boundaries`);R.append(`path`).attr(`class`,`cynefinBoundary`).attr(`d`,T(h,g,F,y)).attr(`fill`,`none`),R.append(`path`).attr(`class`,`cynefinBoundary`).attr(`d`,E(h,g,F+100,y)).attr(`fill`,`none`),R.append(`path`).attr(`class`,`cynefinCliff`).attr(`d`,D(h,g)).attr(`fill`,`none`);let z=h*.15,B=g*.15;N.append(`path`).attr(`class`,`cynefinConfusion`).attr(`d`,O(h/2,g/2,z,B)).attr(`fill`,S.confusion).attr(`fill-opacity`,.5);let V=N.append(`g`).attr(`class`,`cynefin-labels`);for(let e of L){let t=P[e];V.append(`text`).attr(`class`,`cynefinDomainLabel`).attr(`x`,t.cx).attr(`y`,v?t.cy-30:t.cy).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(e.charAt(0).toUpperCase()+e.slice(1))}if(V.append(`text`).attr(`class`,`cynefinDomainLabel`).attr(`x`,h/2).attr(`y`,v?g/2-10:g/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(`Confusion`),v){let e=N.append(`g`).attr(`class`,`cynefin-subtitles`);for(let t of L){let n=P[t],r=k[t];e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,n.cx).attr(`y`,n.cy-10).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(r.model),e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,n.cx).attr(`y`,n.cy+5).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(r.practice)}e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,h/2).attr(`y`,g/2+8).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(k.confusion.practice)}let H=N.append(`g`).attr(`class`,`cynefin-items`);for(let e of[`complex`,`complicated`,`chaotic`,`clear`,`confusion`]){let t=o.get(e);if(!t||t.items.length===0)continue;let n=P[e],r=e===`confusion`,i=t.items,a=0;r&&t.items.length>M&&(a=t.items.length-M,i=t.items.slice(0,M));let s;if(r){let e=v?22:14;s=n.cy+e}else s=n.cy+(v?25:15);if([...i].forEach((t,r)=>{let i=s+r*30,a=H.append(`g`),o=a.append(`text`).attr(`class`,`cynefinItemText`).attr(`x`,0).attr(`y`,13).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).text(t.label),c=t.label.length*7,l=o.node();if(l&&typeof l.getBBox==`function`){let e=l.getBBox();e.width>0&&(c=e.width)}let u=c+20,d=n.cx-u/2;a.attr(`transform`,`translate(${d}, ${i})`),a.insert(`rect`,`text`).attr(`class`,`cynefinItem`).attr(`x`,0).attr(`y`,0).attr(`width`,u).attr(`height`,26).attr(`rx`,4).attr(`ry`,4).attr(`fill`,S[e]).attr(`fill-opacity`,.95),o.attr(`x`,u/2).attr(`y`,13)}),a>0){let t=s+i.length*30,r=`+${a} more`,o=H.append(`g`),c=o.append(`text`).attr(`class`,`cynefinItemText`).attr(`x`,0).attr(`y`,13).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).text(r),l=r.length*7,u=c.node();if(u&&typeof u.getBBox==`function`){let e=u.getBBox();e.width>0&&(l=e.width)}let d=l+20,f=n.cx-d/2;o.attr(`transform`,`translate(${f}, ${t})`),o.insert(`rect`,`text`).attr(`class`,`cynefinItemOverflow`).attr(`x`,0).attr(`y`,0).attr(`width`,d).attr(`height`,26).attr(`rx`,4).attr(`ry`,4).attr(`fill`,S[e]).attr(`fill-opacity`,.6),c.attr(`x`,d/2).attr(`y`,13)}}if(s.length>0){let e=C.select(`defs`).empty()?C.append(`defs`):C.select(`defs`),r=`cynefin-arrow-${n}`;e.append(`marker`).attr(`id`,r).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`cynefinArrowHead`);let i=N.append(`g`).attr(`class`,`cynefin-arrows`);s.forEach(e=>{let n=P[e.from],a=P[e.to];if(!n||!a)return;if(e.from===e.to){t.warn(`Cynefin renderer: skipping self-loop on domain "${e.from}"`);return}let o=n.cx,s=n.cy,c=a.cx,l=a.cy,u=(o+c)/2,d=(s+l)/2,f=c-o,p=l-s,m=Math.sqrt(f*f+p*p),h=m*.15,g=-p/m,_=f/m,v=u+g*h,y=d+_*h;i.append(`path`).attr(`class`,`cynefinArrowLine`).attr(`d`,`M${o},${s} Q${v},${y} ${c},${l}`).attr(`fill`,`none`).attr(`marker-end`,`url(#${r})`),e.label&&i.append(`text`).attr(`class`,`cynefinArrowLabel`).attr(`x`,v).attr(`y`,y-6).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`auto`).text(e.label)})}c&&N.append(`text`).attr(`class`,`cynefinTitle`).attr(`x`,h/2).attr(`y`,-_/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(c)},`draw`)},P=e(()=>{let e=c(),t=a();return m(e,t.themeVariables).cynefin},`getCynefinTheme`),F={parser:x,db:y,renderer:N,styles:e(()=>{let e=P();return` + .cynefinDomain { + stroke: none; + } + .cynefinDomainLabel { + font-size: ${e.domainFontSize}px; + font-weight: bold; + fill: ${e.labelColor}; + } + .cynefinSubtitle { + font-size: ${e.itemFontSize-1}px; + fill: ${e.textColor}; + font-style: italic; + } + .cynefinItem { + fill-opacity: 0.95; + stroke: ${e.boundaryColor}; + stroke-width: 1; + } + .cynefinItemText { + font-size: ${e.itemFontSize}px; + fill: ${e.textColor}; + } + .cynefinItemOverflow { + fill-opacity: 0.6; + stroke: ${e.boundaryColor}; + stroke-width: 1; + stroke-dasharray: 3 2; + } + .cynefinBoundary { + stroke: ${e.boundaryColor}; + stroke-width: ${e.boundaryWidth}; + stroke-dasharray: 6 3; + } + .cynefinCliff { + stroke: ${e.cliffColor}; + stroke-width: ${e.cliffWidth}; + } + .cynefinConfusion { + stroke: ${e.boundaryColor}; + stroke-width: 1.5; + stroke-dasharray: 4 2; + } + .cynefinArrowLine { + stroke: ${e.arrowColor}; + stroke-width: ${e.arrowWidth}; + fill: none; + } + .cynefinArrowHead { + fill: ${e.arrowColor}; + stroke: none; + } + .cynefinArrowLabel { + font-size: ${e.itemFontSize-1}px; + fill: ${e.textColor}; + } + .cynefinTitle { + font-size: ${e.domainFontSize+2}px; + font-weight: bold; + fill: ${e.labelColor}; + } + `},`styles`)};export{F as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/dagre-WRLBMN4V-DDCtIAjS.js b/lecture-01/assets/dagre-WRLBMN4V-DDCtIAjS.js new file mode 100644 index 0000000000000000000000000000000000000000..987685734907ee43a87185cdb2c77d191fc445df --- /dev/null +++ b/lecture-01/assets/dagre-WRLBMN4V-DDCtIAjS.js @@ -0,0 +1,4 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as t}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as n}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-PLCLPJVV-BfMyJHbe.js";import"./chunk-XXV7AQMY-qeLKYxsH.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import"./chunk-OX6ZKUVE-roiHi12N.js";import{n as r}from"./chunk-YV36FAQU-CkTVkoM6.js";import"./chunk-AQ2D6KKF-AxjphkEe.js";import"./chunk-2V3FENDJ-B1mkZICr.js";import{a as i,c as a,i as o,l as s,n as c,t as l,u}from"./chunk-DKH7L6O3-pKUB4f-O.js";import"./chunk-RTI7CJYH-CrTK6TD7.js";import{a as d,i as f,o as p,r as m,t as h}from"./chunk-MPM6TOF7-5cxd71sq.js";import{t as g}from"./chunk-XAKTCX7R-DiVetB2y.js";import{t as _}from"./chunk-T5XCKZAJ-1iVrcyuQ.js";import{a as v,i as y,n as b,o as x,r as S,t as C}from"./chunk-GUDDZZ3A-DadEmnfX.js";var w=e((e,t,n)=>Math.max(t,Math.min(n,e)),`clamp`),T=e((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),E=e(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`,`shouldMergeSelfLoopSegments`),D=e((e,t,n,r,i)=>{let a=[],o=new Set;if(n.forEach(({start:e,end:t})=>{e!==r&&o.add(e),t!==r&&o.add(t)}),o.forEach(t=>{let n=e.node(t);typeof n?.x==`number`&&typeof n?.y==`number`&&a.push(n)}),a.length===0&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{typeof e?.x==`number`&&typeof e?.y==`number`&&a.push(e)})}),a.length===0)return T(i);let s=a.reduce((e,t)=>({x:e.x+t.x/a.length,y:e.y+t.y/a.length}),{x:0,y:0}),c=s.x-t.x,l=s.y-t.y;return Math.abs(c)>Math.abs(l)?c>0?`right`:`left`:Math.abs(l)>0?l>0?`bottom`:`top`:T(i)},`getSelfLoopSide`),O=e((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,c=Math.max(36,Math.min(100,e.width*.8)),l=w(Math.max(r,e.width*.35),36,c),u=w(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-l/2,y:e},{x:i-l/2,y:e+u},{x:i+l/2,y:e+u},{x:i+l/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-l/2},{x:e+u,y:a-l/2},{x:e+u,y:a+l/2},{x:e,y:a+l/2}]}case`left`:{let e=i-o;return[{x:e,y:a-l/2},{x:e-u,y:a-l/2},{x:e-u,y:a+l/2},{x:e,y:a+l/2}]}default:{let e=a-s;return[{x:i-l/2,y:e},{x:i-l/2,y:e-u},{x:i+l/2,y:e-u},{x:i+l/2,y:e}]}}},`getSelfLoopPoints`),k=e((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,c=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+c/2+4};case`right`:return{x:Math.max(...t.map(e=>e.x))+s/2+4,y:o};case`left`:return{x:Math.min(...t.map(e=>e.x))-s/2-4,y:o};default:return{x:a,y:Math.min(...t.map(e=>e.y))-c/2-4}}},`getSelfLoopLabelPosition`),A=e((e,t=0,{mergeSelfLoops:n=!0}={})=>{let r=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(t=>{let a=e.edge(t);if(n&&a.selfLoop){let e=a.selfLoop.id;r.has(e)||r.set(e,[]),r.get(e).push({edge:a,start:t.v,end:t.w})}else i.push({edge:a,start:t.v,end:t.w})}),r.forEach(n=>{if(n.length!==3){n.forEach(e=>i.push(e));return}n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[r,o,s]=n,c=r.edge.originalEdge??o.edge.originalEdge??s.edge.originalEdge??o.edge,l=e.node(c.start);if(!l){n.forEach(e=>i.push(e));return}let u={width:o.edge.width,height:o.edge.height},d=D(e,l,n,c.start,a),f=O(l,d,t,u.width??0),p=k(l,f,d,t,u),m={...o.edge,...c,id:c.id,points:f,start:c.start,end:c.end,x:p.x,y:p.y,width:u.width,height:u.height,labelStyle:o.edge.labelStyle,fromCluster:r.edge.fromCluster??o.edge.fromCluster??s.edge.fromCluster,toCluster:r.edge.toCluster??o.edge.toCluster??s.edge.toCluster};delete m.selfLoop,delete m.originalEdge,i.push({edge:m,start:m.start,end:m.end})}),i},`getEdgesToRender`),j=e(async(n,c,l,d,h,g)=>{t.warn(`Graph in recursive render:XAX`,x(c),h);let b=c.graph().rankdir;t.trace(`Dir in recursive render - dir:`,b);let C=n.insert(`g`).attr(`class`,`root`);c.nodes()?t.info(`Recursive render XXX`,c.nodes()):t.info(`No nodes found for`,c),c.edges().length>0&&t.info(`Recursive edges`,c.edge(c.edges()[0]));let w=C.insert(`g`).attr(`class`,`clusters`),T=C.insert(`g`).attr(`class`,`edgePaths`),D=C.insert(`g`).attr(`class`,`edgeLabels`),O=C.insert(`g`).attr(`class`,`nodes`),k=E(l);await Promise.all(c.nodes().map(async function(e){let n=c.node(e);if(h!==void 0){let n=JSON.parse(JSON.stringify(h.clusterData));t.trace(`Setting data for parent cluster XXX + Node.id = `,e,` + data=`,n.height,` +Parent cluster`,h.height),c.setNode(h.id,n),c.parent(e)||(t.trace(`Setting parent`,e,h.id),c.setParent(e,h.id,n))}if(t.info(`(Insert) Node XXX`+e+`: `+JSON.stringify(c.node(e))),n?.clusterNode){t.info(`Cluster identified XBX`,e,n.width,c.node(e));let{ranksep:r,nodesep:i}=c.graph();n.graph.setGraph({...n.graph.graph(),ranksep:r+25,nodesep:i});let a=await j(O,n.graph,l,d,c.node(e),g),o=a.elem;u(n,o),n.diff=a.diff||0,t.info(`New compound node after recursive render XAX`,e,`width`,n.width,`height`,n.height),s(o,n)}else c.children(e).length>0?(t.trace(`Cluster - the non recursive path XBX`,e,n.id,n,n.width,`Graph:`,c),t.trace(y(n.id,c)),S.set(n.id,{id:y(n.id,c),node:n})):(t.trace(`Node - the non recursive path XAX`,e,O,c.node(e),b),await i(O,c.node(e),{config:g,dir:b}))})),await e(async()=>{let e=c.edges().map(async function(e){let n=c.edge(e.v,e.w,e.name);if(t.info(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(e)),t.info(`Edge `+e.v+` -> `+e.w+`: `,e,` `,JSON.stringify(c.edge(e))),t.info(`Fix`,S,`ids:`,e.v,e.w,`Translating: `,S.get(e.v),S.get(e.w)),k&&n.selfLoop){if(n.selfLoop.order!==1)return;let e=n.id;n.id=n.selfLoop.id,await f(D,n),n.id=e;return}await f(D,n)});await Promise.all(e)},`processEdges`)(),t.info(`Graph before layout:`,JSON.stringify(x(c))),t.info(`############################################# XXX`),t.info(`### Layout ### XXX`),t.info(`############################################# XXX`),_(c),t.info(`Graph after layout:`,JSON.stringify(x(c)));let M=0,{subGraphTitleTotalMargin:N}=r(g);await Promise.all(v(c).map(async function(e){let n=c.node(e);if(t.info(`Position XBX => `+e+`: (`+n.x,`,`+n.y,`) width: `,n.width,` height: `,n.height),n?.clusterNode)n.y+=N,t.info(`A tainted cluster node XBX1`,e,n.id,n.width,n.height,n.x,n.y,c.parent(e)),S.get(n.id).node=n,a(n);else if(c.children(e).length>0){t.info(`A pure cluster node XBX1`,e,n.id,n.x,n.y,n.width,n.height,c.parent(e)),n.height+=N,c.node(n.parentId);let r=n?.padding/2||0,i=n?.labelBBox?.height||0,a=i-r||0;t.debug(`OffsetY`,a,`labelHeight`,i,`halfPadding`,r),await o(w,n),S.get(n.id).node=n}else{let e=c.node(n.parentId);n.y+=N/2,t.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),a(n)}}));let P=N/2;return A(c,P,{mergeSelfLoops:k}).forEach(function({edge:e,start:n,end:r}){t.info(`Edge `+n+` -> `+r+`: `+JSON.stringify(e),e),e.points.forEach(e=>e.y+=P);let i=c.node(n),a=c.node(r),o=m(T,e,S,l,i,a,d);p(e,o)}),c.nodes().forEach(function(e){let n=c.node(e);t.info(e,n.type,n.diff),n.isGroup&&(M=n.diff)}),t.warn(`Returning from recursive render XAX`,C,M),{elem:C,diff:M}},`recursiveRender`),M=e(async(e,r)=>{let i=new g({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=r.select(`g`);d(a,e.markers,e.type,e.diagramId),c(),h(),l(),b(),e.nodes.forEach(e=>{i.setNode(e.id,{...e}),e.parentId&&i.setParent(e.id,e.parentId)}),t.debug(`Edges:`,e.edges),e.edges.forEach(e=>{if(e.start===e.end){let t=e.start,n=t+`---`+t+`---1`,r=t+`---`+t+`---2`,a=i.node(t);i.setNode(n,{domId:n,id:n,parentId:a.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),i.setParent(n,a.parentId),i.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),i.setParent(r,a.parentId);let o=structuredClone(e),s=structuredClone(e),c=structuredClone(e),l=structuredClone(e);s.originalEdge=o,s.selfLoop={id:o.id,order:0},c.originalEdge=o,c.selfLoop={id:o.id,order:1},l.originalEdge=o,l.selfLoop={id:o.id,order:2},s.label=``,s.arrowTypeEnd=`none`,s.endLabelLeft=``,s.endLabelRight=``,s.startLabelLeft=``,s.id=t+`-cyclic-special-1`,c.startLabelRight=``,c.startLabelLeft=``,c.endLabelLeft=``,c.endLabelRight=``,c.arrowTypeStart=`none`,c.arrowTypeEnd=`none`,c.id=t+`-cyclic-special-mid`,l.label=``,l.startLabelRight=``,l.startLabelLeft=``,l.arrowTypeStart=`none`,a.isGroup&&(s.fromCluster=t,l.toCluster=t),l.id=t+`-cyclic-special-2`,l.arrowTypeStart=`none`,i.setEdge(t,n,s,t+`-cyclic-special-0`),i.setEdge(n,r,c,t+`-cyclic-special-1`),i.setEdge(r,t,l,t+`-cyclic-special-2`)}else i.setEdge(e.start,e.end,{...e},e.id)}),t.warn(`Graph at first:`,JSON.stringify(x(i))),C(i),t.warn(`Graph after XAX:`,JSON.stringify(x(i)));let o=n();await j(a,i,e.type,e.diagramId,void 0,o)},`render`);export{A as getEdgesToRender,M as render}; \ No newline at end of file diff --git a/lecture-01/assets/dalle-brain-rocket-CNkl6z2t.jpeg b/lecture-01/assets/dalle-brain-rocket-CNkl6z2t.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..263543085247643fd79e92a6216d79b278bb1818 --- /dev/null +++ b/lecture-01/assets/dalle-brain-rocket-CNkl6z2t.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62d21562f4a845a47e809bbc7069ea785d655c1ea28017b4c2ed437c88b86245 +size 121589 diff --git a/lecture-01/assets/dalle-dragonfruit-CGiA0H30.jpeg b/lecture-01/assets/dalle-dragonfruit-CGiA0H30.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..7acdbd015cce93672f741fc267a11709e4a74e24 --- /dev/null +++ b/lecture-01/assets/dalle-dragonfruit-CGiA0H30.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50f14e27ab054e046301d036b766a936f5dfa6a4a1a443ad4641426e6744e295 +size 154078 diff --git a/lecture-01/assets/default-cZapvzLK.js b/lecture-01/assets/default-cZapvzLK.js new file mode 100644 index 0000000000000000000000000000000000000000..9705482da4f34721c11b34bd55a977915401b7e7 --- /dev/null +++ b/lecture-01/assets/default-cZapvzLK.js @@ -0,0 +1 @@ +import{B as e,C as t,U as n,b as r}from"./modules/shiki-CJZsCeMT.js";import{t as i}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as a}from"./slidev/context-C6dxaFaS.js";import{t as o}from"./DeckFooter-BcBH6IgO.js";var s={class:`slidev-layout dl-default`},c=i({__name:`default`,setup(i){let{$slidev:c,$nav:l,$clicksContext:u,$clicks:d,$page:f,$renderContext:p,$frontmatter:m}=a();return(i,a)=>{let c=o;return e(),r(`div`,s,[n(i.$slots,`default`,{},void 0,!0),t(c)])}}},[[`__scopeId`,`data-v-3f3da7ce`]]);export{c as t}; \ No newline at end of file diff --git a/lecture-01/assets/diagram-25E3JIVG-CF75TqMB.js b/lecture-01/assets/diagram-25E3JIVG-CF75TqMB.js new file mode 100644 index 0000000000000000000000000000000000000000..0f53206dd88d52f19dbe5bd62479bad85016b127 --- /dev/null +++ b/lecture-01/assets/diagram-25E3JIVG-CF75TqMB.js @@ -0,0 +1,41 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as t}from"./chunk-FO5PYUIK-CPzj2963.js";import{E as n,J as r,Q as i,S as a,Y as o,b as s,k as c,l,m as u,o as d,x as f}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as p}from"./chunk-BPTLHSDI-QRS_xuYz.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{i as m}from"./chunk-OX6ZKUVE-roiHi12N.js";import{t as h}from"./chunk-6ZKBGPIT-B4RTUexp.js";import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as g}from"./chunk-BQKPLVCE-CH-bQZj9.js";import"./chunk-NYCIP5HP-BZs_nZUU.js";import"./chunk-6QIBY7DQ-xR0SR3RB.js";import"./chunk-SLCUJWJ3-Bzf1BoPP.js";import"./chunk-43ACQNTO-CVHKukau.js";import"./chunk-FXRKSSP6-BDxrggHz.js";import"./chunk-RRYK4PFG-DZMcopsb.js";import"./chunk-IT6C5QXO-BI6Sf-cR.js";import"./chunk-GMJQP6DO-gEw8rKqu.js";import"./chunk-ODPFZSHR-BUzFQ4Zq.js";import"./chunk-6OZ7KPF7-CpRlDBGl.js";import"./chunk-LJTN6OYE-BTsXVLFU.js";import"./chunk-Z6Q54H3S-B8XyqzVF.js";import"./chunk-4KMQCWFH-ClzK3uec.js";import"./chunk-S7Q6ZHN2-CSIi0_Nw.js";import"./chunk-IIWGMRJM-k15frrBU.js";var _={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},v=32,y={axes:[],curves:[],options:_},b=structuredClone(y),x=u.radar,S=e(()=>m({...x,...a().radar}),`getConfig`),C=e(()=>b.axes,`getAxes`),w=e(()=>b.curves,`getCurves`),T=e(()=>b.options,`getOptions`),E=e(e=>{b.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),D=e(e=>{b.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:O(e.entries)}))},`setCurves`),O=e(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=C();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),k={getAxes:C,getCurves:w,getOptions:T,setAxes:E,setCurves:D,setOptions:e(e=>{let n=e.reduce((e,t)=>(e[t.name]=t,e),{});b.options={showLegend:n.showLegend?.value??_.showLegend,ticks:n.ticks?.value??_.ticks,max:n.max?.value??_.max,min:n.min?.value??_.min,graticule:n.graticule?.value??_.graticule},b.options.ticks>v&&(t.warn(`Radar diagram ticks (${b.options.ticks}) exceeds maximum allowed (${v}). Using ${v} instead.`),b.options.ticks=v)},`setOptions`),getConfig:S,clear:e(()=>{d(),b=structuredClone(y)},`clear`),setAccTitle:o,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:n,getAccDescription:s,setAccDescription:r},A=e(e=>{h(e,k);let{axes:t,curves:n,options:r}=e;k.setAxes(t),k.setCurves(n),k.setOptions(r)},`populate`),j={parse:e(async e=>{let n=await g(`radar`,e);t.debug(n),A(n)},`parse`)},M=e((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=N(p(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,m=Math.min(c.width,c.height)/2;P(u,a,m,s.ticks,s.graticule),F(u,a,m,c),I(u,a,o,f,d,s.graticule,c),z(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),N=e((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return l(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`).attr(`overflow`,`visible`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),P=e((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),F=e((e,t,n,r)=>{let i=t.length;for(let a=0;a.01?`start`:c<-.01?`end`:`middle`,d=l>.01?`hanging`:l<-.01?`auto`:`central`;e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*c+4*c).attr(`y`,n*r.axisLabelFactor*l+4*l).attr(`text-anchor`,u).attr(`dominant-baseline`,d).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function I(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=L(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,R(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}e(I,`drawCurves`);function L(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}e(L,`relativeRadius`);function R(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}e(z,`drawLegend`);var B={draw:M},V=e((e,t)=>{let n=``;for(let r=0;r{let t=c(),n=a(),r=m(t,n.themeVariables);return{themeVariables:r,radarOptions:m(r.radar,e)}},`buildRadarStyleOptions`),U={parser:j,db:k,renderer:B,styles:e(({radar:e}={})=>{let{themeVariables:t,radarOptions:n}=H(e);return` + .radarTitle { + font-size: ${t.fontSize}; + color: ${t.titleColor}; + dominant-baseline: hanging; + text-anchor: middle; + } + .radarAxisLine { + stroke: ${n.axisColor}; + stroke-width: ${n.axisStrokeWidth}; + } + .radarAxisLabel { + font-size: ${n.axisLabelFontSize}px; + color: ${n.axisColor}; + } + .radarGraticule { + fill: ${n.graticuleColor}; + fill-opacity: ${n.graticuleOpacity}; + stroke: ${n.graticuleColor}; + stroke-width: ${n.graticuleStrokeWidth}; + } + .radarLegendText { + text-anchor: start; + font-size: ${n.legendFontSize}px; + dominant-baseline: hanging; + } + ${V(t,n)} + `},`styles`)};export{U as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/diagram-EDZXTW53-D3AUECSQ.js b/lecture-01/assets/diagram-EDZXTW53-D3AUECSQ.js new file mode 100644 index 0000000000000000000000000000000000000000..83526406e2755923f7d3d5f8e44f3bd6db69f988 --- /dev/null +++ b/lecture-01/assets/diagram-EDZXTW53-D3AUECSQ.js @@ -0,0 +1,30 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as t}from"./chunk-FO5PYUIK-CPzj2963.js";import{E as n,G as r,J as i,Q as a,S as o,Y as s,b as c,l,m as u,o as d,x as f}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as p}from"./chunk-BPTLHSDI-QRS_xuYz.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{i as m}from"./chunk-OX6ZKUVE-roiHi12N.js";import{r as h,t as g}from"./chunk-AQ2D6KKF-AxjphkEe.js";import{t as _}from"./chunk-6ZKBGPIT-B4RTUexp.js";import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as v}from"./chunk-BQKPLVCE-CH-bQZj9.js";import"./chunk-NYCIP5HP-BZs_nZUU.js";import"./chunk-6QIBY7DQ-xR0SR3RB.js";import"./chunk-SLCUJWJ3-Bzf1BoPP.js";import"./chunk-43ACQNTO-CVHKukau.js";import"./chunk-FXRKSSP6-BDxrggHz.js";import"./chunk-RRYK4PFG-DZMcopsb.js";import"./chunk-IT6C5QXO-BI6Sf-cR.js";import"./chunk-GMJQP6DO-gEw8rKqu.js";import"./chunk-ODPFZSHR-BUzFQ4Zq.js";import"./chunk-6OZ7KPF7-CpRlDBGl.js";import"./chunk-LJTN6OYE-BTsXVLFU.js";import"./chunk-Z6Q54H3S-B8XyqzVF.js";import"./chunk-4KMQCWFH-ClzK3uec.js";import"./chunk-S7Q6ZHN2-CSIi0_Nw.js";import"./chunk-IIWGMRJM-k15frrBU.js";import{t as y}from"./chunk-IALYP65X-Bv3ioVcB.js";var b=/[─━│┃└┗├┣]/,x=/[└┗├┣]/,S=/[─━]/,C=/^[\s│┃]+$/,w=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,T=/^\s*%%/,E=` `;function D(e){return e.some(e=>b.test(e))}e(D,`isBoxDrawingFormat`);function O(e){for(let t of e){let e=x.exec(t);if(e?.index&&e.index>0)return e.index}return 4}e(O,`inferSegmentWidth`);function k(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{let r=parseInt(n,10),i=t.get(r);return i?`line ${i}`:e})}e(k,`remapErrorLines`);function A(e){let t=e.split(` +`),n=new Map,r=-1;for(let[e,n]of t.entries())if(n.trim()===`treeView-beta`){r=e;break}if(r===-1)return{text:e,lineMap:n};let i=[];for(let e=r+1;e({cnt:1,stack:[{id:0,level:-1,name:`/`,nodeType:`directory`,children:[]}]})),M=e(()=>{j.reset(),d()},`clear`),N=e(()=>j.records.stack[0],`getRoot`),P=e(()=>j.records.cnt,`getCount`),F=u.treeView,I={clear:M,addNode:e((e,t,n,r,i,a)=>{for(;e<=j.records.stack[j.records.stack.length-1].level;)j.records.stack.pop();let o={id:j.records.cnt++,level:e,name:t,nodeType:n,icon:i,cssClass:r,description:a,children:[]};j.records.stack[j.records.stack.length-1].children.push(o),j.records.stack.push(o)},`addNode`),getRoot:N,getCount:P,getConfig:e(()=>m(F,o().treeView),`getConfig`),getAccTitle:f,getAccDescription:c,getDiagramTitle:n,setAccDescription:i,setAccTitle:s,setDiagramTitle:a},L=e(e=>{_(e,I);for(let t of e.nodes){let e=typeof t.indent==`number`?t.indent:0,n=t.name,i=n.endsWith(`/`);i&&(n=n.slice(0,-1));let a=i?`directory`:`file`,s=t.classAnnotation||void 0,c=t.iconAnnotation,l=c===void 0?void 0:c||`none`,u=t.descAnnotation||void 0,d=u?r(u,o()):void 0;I.addNode(e,n,a,s,l,d)}},`populate`),R={parse:e(async e=>{let{text:n,lineMap:r}=A(e);try{let e=await v(`treeView`,n);t.debug(e),L(e)}catch(e){throw r.size>0&&e instanceof Error&&(e.message=k(e.message,r)),e}},`parse`)},z={prefix:`mermaid-treeview`,height:24,width:24,icons:{folder:{body:``},file:{body:``}}};function B(e,t){let n=t?.filenameIcons?.[e];if(n)return n;let r=e.lastIndexOf(`.`);if(r>0){let n=e.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[n]??i?.[n.slice(1)]}}e(B,`detectIcon`);function V(e,t){return e.includes(`:`)?e:e in z.icons||!t?`${z.prefix}:${e}`:`${t}:${e}`}e(V,`qualifyIcon`);function H(e,t){if(e.icon!==`none`){if(e.icon)return V(e.icon,t.defaultIconPack);if(t.showIcons){if(e.nodeType===`file`){let n=B(e.name,t);if(n===`none`)return;if(n)return V(n,t.defaultIconPack)}return`${z.prefix}:${e.nodeType===`directory`?`folder`:`file`}`}}}e(H,`getNodeIcon`),h([{name:z.prefix,icons:z}]);var U=14,W=4,G=16,K=e((e,t)=>`tv-icon-${e}-${t.replace(/[^\w-]/g,`-`)}`,`iconSymbolId`),q=e(async(t,n,r,i)=>{let a=new Set,o=e(e=>{let t=H(e,r);t&&a.add(t),e.children.forEach(o)},`collect`);if(o(n),a.size===0)return;let s=await Promise.all([...a].map(async e=>({icon:e,svg:await g(e,{height:U,width:U})}))),c=t.append(`defs`);for(let{icon:e,svg:t}of s)c.append(`g`).attr(`id`,K(i,e)).html(t)},`injectIconDefs`),J=e((e,t,n,r,i,a)=>{let o=r.append(`g`),s=`treeView-node-label`;n.nodeType===`directory`&&(s+=` treeView-node-dir`),n.cssClass&&(s+=` ${n.cssClass}`);let c=U+W,l=H(n,i),u=l!==void 0;l&&o.append(`use`).attr(`xlink:href`,`#${K(a,l)}`).attr(`x`,e+i.paddingX).attr(`y`,t+i.paddingY).attr(`class`,`treeView-node-icon`);let d=o.append(`text`).text(n.name).attr(`dominant-baseline`,`middle`).attr(`class`,s),{height:f,width:p}=d.node().getBBox(),m=f+i.paddingY*2,h=e+i.paddingX+(u?c:0);d.attr(`x`,h),d.attr(`y`,t+m/2);let g=h+p;return n.BBox={x:e,y:t,width:p+i.paddingX*2+(u?c:0),height:m},n.cssClass?.split(/\s+/).includes(`highlight`)&&o.insert(`rect`,`:first-child`).attr(`x`,e).attr(`y`,t+1).attr(`width`,0).attr(`height`,m-2).attr(`rx`,3).attr(`class`,`treeView-highlight-bg`),{node:n,nodeGroup:o,labelRightEdge:g,centerY:t+m/2}},`positionLabel`),Y=e((e,t,n,r,i,a)=>e.append(`line`).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i).attr(`stroke-width`,a).attr(`class`,`treeView-node-line`),`positionLine`),X=e((t,n,r,i)=>{let a=0,o=0,s=[],c=e((e,t,n,r)=>{let c=r*(n.rowIndent+n.paddingX),l=J(c,a,t,e,n,i);s.push(l);let{height:u,width:d}=t.BBox;Y(e,c-n.rowIndent,a+u/2,c,a+u/2,n.lineThickness),o=Math.max(o,c+d),a+=u},`drawNode`),l=e((e,n=0)=>{c(t,e,r,n),e.children.forEach(e=>{l(e,n+1)});let{x:i,y:a,height:o}=e.BBox;if(e.children.length){let{y:n,height:s}=e.children[e.children.length-1].BBox;Y(t,i+r.paddingX,a+o,i+r.paddingX,n+s/2+r.lineThickness/2,r.lineThickness)}},`processNode`);l(n);let u=s.filter(e=>e.node.description);if(u.length>0){let e=Math.max(...s.map(e=>e.labelRightEdge))+G;for(let t of u){let n=t.nodeGroup.append(`text`).text(t.node.description).attr(`dominant-baseline`,`middle`).attr(`class`,`treeView-node-description`).attr(`x`,e).attr(`y`,t.centerY).node().getBBox();o=Math.max(o,e+n.width+r.paddingX)}}for(let e of s)if(e.node.cssClass?.split(/\s+/).includes(`highlight`)){let t=e.nodeGroup.select(`.treeView-highlight-bg`);if(!t.empty()){let n=o-e.node.BBox.x+8;t.attr(`width`,n),o=Math.max(o,e.node.BBox.x+n+2)}}return{totalHeight:a,totalWidth:o}},`drawTree`),Z={draw:e(async(e,n,r,i)=>{t.debug(`Rendering treeView diagram +`+e);let a=i.db,o=a.getRoot(),s=a.getConfig(),c=p(n);await q(c,o,s,n);let u=c.append(`g`);u.attr(`class`,`tree-view`);let{totalHeight:d,totalWidth:f}=X(u,o,s,n);c.attr(`viewBox`,`-${s.lineThickness/2} 0 ${f} ${d}`),l(c,d,f,s.useMaxWidth)},`draw`)},Q={labelFontSize:`16px`,labelColor:`black`,lineColor:`black`,iconColor:`#546e7a`,descriptionColor:`#6a9955`,highlightBg:`rgba(255, 193, 7, 0.15)`,highlightStroke:`#ffc107`},$={db:I,renderer:Z,parser:R,styles:e(({treeView:e})=>{let{labelFontSize:t,labelColor:n,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:o,highlightStroke:s}=m(Q,e);return` + .treeView-node-label { + font-size: ${t}; + fill: ${n}; + white-space: pre; + } + .treeView-node-dir { + font-weight: bold; + } + .treeView-node-line { + stroke: ${r}; + } + .treeView-node-icon { + color: ${i}; + } + .treeView-node-description { + font-size: ${t}; + fill: ${a}; + font-style: italic; + white-space: pre; + } + .treeView-highlight-bg { + fill: ${o}; + stroke: ${s}; + stroke-width: 1; + } + `},`styles`)};export{$ as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/diagram-J7GERFIL-BzTqG1hX.js b/lecture-01/assets/diagram-J7GERFIL-BzTqG1hX.js new file mode 100644 index 0000000000000000000000000000000000000000..326830589e47160363482e0ac29e7f9762990ac0 --- /dev/null +++ b/lecture-01/assets/diagram-J7GERFIL-BzTqG1hX.js @@ -0,0 +1,3 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as t,T as n}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as r,E as i,G as a,J as o,Q as s,S as c,Y as l,b as u,m as d,o as f,tt as p,x as m}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{i as h,t as ee,y as g}from"./chunk-OX6ZKUVE-roiHi12N.js";import{t as te}from"./chunk-6ZKBGPIT-B4RTUexp.js";import{T as ne}from"./chunk-A7G5T7E5-C2HISlqa.js";import{n as re}from"./chunk-BQKPLVCE-CH-bQZj9.js";import"./chunk-NYCIP5HP-BZs_nZUU.js";import"./chunk-6QIBY7DQ-xR0SR3RB.js";import"./chunk-SLCUJWJ3-Bzf1BoPP.js";import"./chunk-43ACQNTO-CVHKukau.js";import"./chunk-FXRKSSP6-BDxrggHz.js";import"./chunk-RRYK4PFG-DZMcopsb.js";import"./chunk-IT6C5QXO-BI6Sf-cR.js";import"./chunk-GMJQP6DO-gEw8rKqu.js";import"./chunk-ODPFZSHR-BUzFQ4Zq.js";import"./chunk-6OZ7KPF7-CpRlDBGl.js";import"./chunk-LJTN6OYE-BTsXVLFU.js";import"./chunk-Z6Q54H3S-B8XyqzVF.js";import"./chunk-4KMQCWFH-ClzK3uec.js";import"./chunk-S7Q6ZHN2-CSIi0_Nw.js";import"./chunk-IIWGMRJM-k15frrBU.js";var _=`position frame`,v=`frame positioned`,y=`position relation`,b=`relation positioned`,ie=e(function(e){n.debug(`options str`,e)},`setOptions`),ae=e(function(){return{}},`getOptions`),oe=e(function(){x(),f()},`clear`);function x(){S={}}e(x,`reset`);var se=d.eventmodeling,ce=e(()=>h({...se,...c().eventmodeling}),`getConfig`),S={};function C(){let e=le,{ast:t}=S,r=E();if(!t)throw Error(`No data for EventModel`);return t.frames.forEach((i,a)=>{let o=N(i,t.dataEntities,r);e=q(e,{$kind:_,index:a,frame:i,textProps:o});let s;B(i)?(n.debug(`source frame`,i.sourceFrames),s=t.frames.filter(e=>i.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(t=>{e=q(e,{$kind:y,index:a,frame:i,sourceFrame:t})})):e=q(e,{$kind:y,index:a,frame:i})}),e={...e,sortedSwimlanesArray:L(e.swimlanes)},e}e(C,`getState`);function w(e){S.ast=e}e(w,`setAst`);var T={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `};function E(){return T}e(E,`getDiagramProps`);var le={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function D(e){let t=e.split(`.`);if(t.length===2)return t[0]}e(D,`extractNamespace`);function O(e){let t=e.split(`.`);return t.length===2?t[1]:e}e(O,`extractName`);function k(e,t){if(!(!t||t.length===0))return Object.values(e).find(e=>e.namespace===t)}e(k,`findSwimlaneByNamespace`);function A(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&rNumber.parseInt(e)))+1}e(A,`findNextAvailableIndex`);function j(e,t){let n=D(e.entityIdentifier),r=k(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||T.labelUiAutomation}:n?{index:A(t,0,100),label:T.labelUiAutomationPrefix+n}:{index:0,label:T.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||T.labelCommandReadModel}:n?{index:A(t,100,200),label:T.labelCommandReadModelPrefix+n}:{index:100,label:T.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||T.labelEvents}:n?{index:A(t,200,300),label:T.labelEventsPrefix+n}:{index:200,label:T.labelEvents}}}e(j,`calculateSwimlaneProps`);function M(e){let{themeVariables:t}=c();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}e(M,`calculateEntityVisualProps`);function N(e,t,r){let i=c(),o=a(O(e.entityIdentifier)??``,i),s,l={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`
    `},u=`${g(o,r.textMaxWidth,l)}`;if(e.dataInlineValue&&(s=e.dataInlineValue,s=s.substring(s.indexOf(`{`)+1),s=s.substring(0,s.lastIndexOf(`}`)-1),s=a(s,i),s=g(s,r.textMaxWidth,l),s=s.replaceAll(` `,` `)),e.dataReference){let n=t.find(t=>t.name===e.dataReference?.$refText);n&&(s=n.dataBlockValue,s=s.substring(s.indexOf(`{ +`)+2),s=s.substring(0,s.lastIndexOf(`}`)-1),s=a(s,i),s=g(s,r.textMaxWidth,l),s=s.replaceAll(` `,` `),s+=`
    `)}let d=s!==void 0;d&&(u+=`

    ${s}`);let f={fontSize:l.fontSize,fontWeight:l.fontWeight,fontFamily:l.fontFamily},p=ee(u,f),m=d?p.width/3:p.width,h={content:u,width:m,height:p.height};return n.debug(`[${e.name}] ${e.entityIdentifier} text`,h),h}e(N,`calculateTextProps`);function P(e,t){let n=t,r=M(n.frame),i={width:n.textProps.width+2*T.boxTextPadding,height:n.textProps.height+2*T.boxTextPadding};return[{$kind:v,frame:n.frame,index:n.index,visual:r,dimension:i,textProps:n.textProps}]}e(P,`decidePositionFrame`);function F(e,t,n){return t===void 0?T.contentStartX:t.index===e.index&&e.r?e.r+T.boxPadding:n===void 0?T.contentStartX:n.r-T.boxOverlap+T.boxPadding}e(F,`calculateX`);function I(e,t){let n=[...e.map(e=>e.r),t];return Math.max(...n)}e(I,`calculateMaxRight`);function L(e){return Object.values(e).sort((e,t)=>e.index-t.index)}e(L,`sortedSwimlanesArray`);function R(e,t){let n=t,r=j(n.frame,e.swimlanes),i;i=r.index in e.swimlanes?e.swimlanes[r.index]:{index:r.index,label:r.label,r:0,y:r.index*T.swimlaneMinHeight+T.swimlaneGap,height:T.swimlaneMinHeight,maxHeight:T.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=e.previousSwimlaneNumber===void 0?void 0:e.swimlanes[e.previousSwimlaneNumber],s={width:Math.max(T.boxMinWidth,Math.min(T.boxMaxWidth,n.dimension.width))+2*T.boxPadding,height:Math.max(T.boxMinHeight,Math.min(T.boxMaxHeight,n.dimension.height))+2*T.boxPadding},c=F(i,o,a),l=c+s.width+T.boxPadding,u=I(Object.values(e.swimlanes),l);i.r=c+s.width,i.maxHeight=Math.max(i.maxHeight,s.height),i.height=Math.max(T.swimlaneMinHeight,i.maxHeight)+2*T.swimlanePadding;let d={x:c,y:T.swimlanePadding+i.y,r:l,dimension:s,leftSibling:!1,swimlane:i,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},f={...e,boxes:[...e.boxes,d],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:u},p=L(f.swimlanes);p.length>0&&(p[0].y=0);for(let e=1;e0}e(B,`hasSourceFrame`);function V(e,t){if(t!=null)return e.find(e=>e.frame.name===t.name)}e(V,`findBoxByFrame`);function H(e,t,n){if(!(n<0))for(let r=n;r>=0;r--){let n=e[r];if(n.swimlane.index!==t)return n}}e(H,`findBoxByLineIndex`);function U(e,t){let n=t;if(ne(n.frame)||z(n.index,n.frame))return[];let r=V(e.boxes,n.frame);if(r===void 0)throw Error(`Target box not found for frame ${n.frame.name}`);let i;return i=n.sourceFrame?V(e.boxes,n.sourceFrame):H(e.boxes,r.swimlane.index,n.index-1),i===void 0?[]:[{$kind:b,frame:n.frame,index:n.index,sourceBox:i,targetBox:r}]}e(U,`decidePositionRelation`);function W(e,t){let n=t,r={visual:{fill:`none`,stroke:`#000`},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}e(W,`evolveRelationPositioned`);var ue={[_]:P,[y]:U},de={[v]:R,[b]:W};function G(e,t){let r=ue[t.$kind];if(r==null)return[];let i=r(e,t);return n.debug(`decided events`,i),i}e(G,`decide`);function K(e,t){let r=t.reduce((e,t)=>{let n=de[t.$kind];return n==null?e:n(e,t)},e);return n.debug(`evolve events`,{state:e,newState:r,events:t}),r}e(K,`evolve`);function q(e,t){return K(e,G(e,t))}e(q,`dispatch`);var J={getConfig:ce,setOptions:ie,getOptions:ae,clear:oe,setAccTitle:l,getAccTitle:m,getAccDescription:u,setAccDescription:o,setDiagramTitle:s,getDiagramTitle:i,setAst:w,getDiagramProps:E,getState:C},fe={parse:e(async e=>{let t=await re(`eventmodeling`,e);n.debug(t),J.setAst(t),te(t,J)},`parse`)},Y=r()?.eventmodeling;function X(e,t){return n=>{let r=n.swimlane.y+t.swimlanePadding,i=e.append(`g`).attr(`class`,`em-box`);i.append(`rect`).attr(`x`,n.x).attr(`y`,r).attr(`rx`,`3`).attr(`width`,n.dimension.width).attr(`height`,n.dimension.height).attr(`stroke`,n.visual.stroke).attr(`fill`,n.visual.fill),i.append(`foreignObject`).attr(`x`,n.x+t.boxPadding).attr(`y`,r+10).attr(`width`,n.dimension.width-2*t.boxPadding).attr(`height`,n.dimension.height-2*t.boxPadding).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`).append(`span`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(n.text)}}e(X,`renderD3Box`);function Z(e,t){return e>t}e(Z,`dirUpwards`);function Q(e,t,r,i){return a=>{let o=a.sourceBox.swimlane.y+t.swimlanePadding,s=a.targetBox.swimlane.y+t.swimlanePadding,c=Z(o,s),l=a.sourceBox.x+a.sourceBox.dimension.width*2/3,u=a.targetBox.x+a.targetBox.dimension.width/3,d,f;n.debug(`rendering relation up=${c} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),c?(d=o,f=s+a.targetBox.dimension.height):(d=o+a.sourceBox.dimension.height,f=s);let p=i.emRelationStroke??a.visual.stroke;e.append(`path`).attr(`class`,`em-relation`).attr(`fill`,a.visual.fill).attr(`stroke`,p).attr(`stroke-width`,`1`).attr(`marker-end`,`url(#${r})`).attr(`d`,`M${l} ${d} L${u} ${f}`)}}e(Q,`renderD3Relation`);function $(e,t,n,r){return i=>{let a=e.append(`g`).attr(`class`,`em-swimlane`),o=r.emSwimlaneBackgroundOdd??`rgb(250,250,250)`,s=r.emSwimlaneBackgroundStroke??`rgb(240,240,240)`;a.append(`rect`).attr(`x`,0).attr(`y`,i.y).attr(`rx`,`3`).attr(`width`,t+n.swimlanePadding).attr(`height`,i.height).attr(`fill`,o).attr(`stroke`,s),a.append(`text`).attr(`font-weight`,n.swimlaneTextFontWeight).attr(`x`,30).attr(`y`,i.y+30).text(i.label)}}e($,`renderD3Swimlane`);var pe={parser:fe,db:J,renderer:{draw:e(function(e,i,a,o){if(n.debug(`in eventmodeling renderer`,e+` +`,`id:`,i,a),!Y)throw Error(`EventModeling config not found`);let s=o.db,{themeVariables:c,eventmodeling:l}=r(),u=t(`[id="${i}"]`),d=s.getDiagramProps(),f=s.getState(),m=`em-arrowhead-${i}`,h=c.emArrowhead??`#000000`;f.sortedSwimlanesArray.forEach($(u,f.maxR,d,c)),f.boxes.forEach(X(u,d)),f.relations.forEach(Q(u,d,m,c)),u.append(`defs`).append(`marker`).attr(`id`,m).attr(`markerWidth`,`10`).attr(`markerHeight`,`7`).attr(`refX`,`10`).attr(`refY`,`3.5`).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0 0, 10 3.5, 0 7`).attr(`fill`,h),p(void 0,u,l?.padding??30,l?.useMaxWidth)},`draw`)},styles:e(e=>``,`getStyles`)};export{pe as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/diagram-QYPETOCO-DO5zo3se.js b/lecture-01/assets/diagram-QYPETOCO-DO5zo3se.js new file mode 100644 index 0000000000000000000000000000000000000000..bfa912c405fbabcef730a638dbc0d292821dddb1 --- /dev/null +++ b/lecture-01/assets/diagram-QYPETOCO-DO5zo3se.js @@ -0,0 +1,24 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as t}from"./chunk-FO5PYUIK-CPzj2963.js";import{E as n,J as r,Q as i,S as a,Y as o,b as s,l as c,m as l,o as u,x as d}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as f}from"./chunk-BPTLHSDI-QRS_xuYz.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{i as p}from"./chunk-OX6ZKUVE-roiHi12N.js";import{t as m}from"./chunk-6ZKBGPIT-B4RTUexp.js";import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as h}from"./chunk-BQKPLVCE-CH-bQZj9.js";import"./chunk-NYCIP5HP-BZs_nZUU.js";import"./chunk-6QIBY7DQ-xR0SR3RB.js";import"./chunk-SLCUJWJ3-Bzf1BoPP.js";import"./chunk-43ACQNTO-CVHKukau.js";import"./chunk-FXRKSSP6-BDxrggHz.js";import"./chunk-RRYK4PFG-DZMcopsb.js";import"./chunk-IT6C5QXO-BI6Sf-cR.js";import"./chunk-GMJQP6DO-gEw8rKqu.js";import"./chunk-ODPFZSHR-BUzFQ4Zq.js";import"./chunk-6OZ7KPF7-CpRlDBGl.js";import"./chunk-LJTN6OYE-BTsXVLFU.js";import"./chunk-Z6Q54H3S-B8XyqzVF.js";import"./chunk-4KMQCWFH-ClzK3uec.js";import"./chunk-S7Q6ZHN2-CSIi0_Nw.js";import"./chunk-IIWGMRJM-k15frrBU.js";var g=l.packet,_=class{constructor(){this.packet=[],this.setAccTitle=o,this.getAccTitle=d,this.setDiagramTitle=i,this.getDiagramTitle=n,this.getAccDescription=s,this.setAccDescription=r}static{e(this,`PacketDB`)}getConfig(){let e=p({...g,...a().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){u(),this.packet=[]}},v=1e4,y=e((e,n)=>{m(e,n);let r=-1,i=[],a=1,{bitsPerRow:o}=n.getConfig();for(let{start:s,end:c,bits:l,label:u}of e.blocks){if(s!==void 0&&c!==void 0&&c{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),x={parser:{yy:void 0},parse:e(async e=>{let n=await h(`packet`,e),r=x.parser?.yy;if(!(r instanceof _))throw Error(`parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);t.debug(n),y(n,r)},`parse`)},S=e((e,t,n,r)=>{let i=r.db,a=i.getConfig(),{rowHeight:o,paddingY:s,bitWidth:l,bitsPerRow:u}=a,d=i.getPacket(),p=i.getDiagramTitle(),m=o+s,h=m*(d.length+1)-(p?0:o),g=l*u+2,_=f(t);_.attr(`viewBox`,`0 0 ${g} ${h}`),c(_,h,g,a.useMaxWidth);for(let[e,t]of d.entries())C(_,t,e,a);_.append(`text`).text(p).attr(`x`,g/2).attr(`y`,h-m/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),C=e((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(l.append(`rect`).attr(`x`,t).attr(`y`,u).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),l.append(`text`).attr(`x`,t+n/2).attr(`y`,u+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!c)continue;let a=e.end===e.start,d=u-2;l.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,d).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||l.append(`text`).attr(`x`,t+n).attr(`y`,d).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),w={draw:S},T={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},E={parser:x,get db(){return new _},renderer:w,styles:e(({packet:e}={})=>{let t=p(T,e);return` + .packetByte { + font-size: ${t.byteFontSize}; + } + .packetByte.start { + fill: ${t.startByteColor}; + } + .packetByte.end { + fill: ${t.endByteColor}; + } + .packetLabel { + fill: ${t.labelColor}; + font-size: ${t.labelFontSize}; + } + .packetTitle { + fill: ${t.titleColor}; + font-size: ${t.titleFontSize}; + } + .packetBlock { + stroke: ${t.blockStrokeColor}; + stroke-width: ${t.blockStrokeWidth}; + fill: ${t.blockFillColor}; + } + `},`styles`)};export{E as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/diagram-YFGL7EOQ-KnZ9mrnO.js b/lecture-01/assets/diagram-YFGL7EOQ-KnZ9mrnO.js new file mode 100644 index 0000000000000000000000000000000000000000..f6244c803e30786e623cdd0119e90cb3d6e36d9e --- /dev/null +++ b/lecture-01/assets/diagram-YFGL7EOQ-KnZ9mrnO.js @@ -0,0 +1,24 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as t,M as n,T as r,b as i,et as a,v as o}from"./chunk-FO5PYUIK-CPzj2963.js";import{E as s,J as c,Q as l,S as u,Y as d,b as f,k as p,l as m,m as h,o as g,x as _}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as v}from"./chunk-BPTLHSDI-QRS_xuYz.js";import{i as y,n as b}from"./chunk-XXV7AQMY-qeLKYxsH.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{i as x}from"./chunk-OX6ZKUVE-roiHi12N.js";import{t as S}from"./chunk-6ZKBGPIT-B4RTUexp.js";import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as C}from"./chunk-BQKPLVCE-CH-bQZj9.js";import"./chunk-NYCIP5HP-BZs_nZUU.js";import"./chunk-6QIBY7DQ-xR0SR3RB.js";import"./chunk-SLCUJWJ3-Bzf1BoPP.js";import"./chunk-43ACQNTO-CVHKukau.js";import"./chunk-FXRKSSP6-BDxrggHz.js";import"./chunk-RRYK4PFG-DZMcopsb.js";import"./chunk-IT6C5QXO-BI6Sf-cR.js";import"./chunk-GMJQP6DO-gEw8rKqu.js";import"./chunk-ODPFZSHR-BUzFQ4Zq.js";import"./chunk-6OZ7KPF7-CpRlDBGl.js";import"./chunk-LJTN6OYE-BTsXVLFU.js";import"./chunk-Z6Q54H3S-B8XyqzVF.js";import"./chunk-4KMQCWFH-ClzK3uec.js";import"./chunk-S7Q6ZHN2-CSIi0_Nw.js";import"./chunk-IIWGMRJM-k15frrBU.js";import{t as w}from"./chunk-BYAF6FXG-DqiL_6qO.js";var T=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=d,this.getAccTitle=_,this.setDiagramTitle=l,this.getDiagramTitle=s,this.getAccDescription=f,this.setAccDescription=c}static{e(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let e=h,t=u();return x({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{b(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){g(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function E(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}e(E,`buildHierarchy`);var D=e((t,n)=>{S(t,n);let r=[];for(let e of t.TreemapRows??[])e.$type===`ClassDefStatement`&&n.addClass(e.className??``,e.styleText??``);for(let e of t.TreemapRows??[]){let t=e.item;if(!t)continue;let i=e.indent?parseInt(e.indent):0,a=O(t),o=t.classSelector?n.getStylesForClass(t.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:t.$type,value:t.value,classSelector:t.classSelector,cssCompiledStyles:s};r.push(c)}let i=E(r),a=e((e,t)=>{for(let r of e)n.addNode(r,t),r.children&&r.children.length>0&&a(r.children,t+1)},`addNodesRecursively`);a(i,0)},`populate`),O=e(e=>e.name?String(e.name):``,`getItemName`),k={parser:{yy:void 0},parse:e(async e=>{try{let t=await C(`treemap`,e);r.debug(`Treemap AST:`,t);let n=k.parser?.yy;if(!(n instanceof T))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);D(t,n)}catch(e){throw r.error(`Error parsing treemap:`,e),e}},`parse`)},A=10,j=10,M=25,N={draw:e((s,c,l,d)=>{let f=d.db,p=f.getConfig(),h=p.padding??A,g=f.getDiagramTitle(),_=f.getRoot(),{themeVariables:b}=u();if(!_)return;let x=g?30:0,S=v(c),C=p.nodeWidth?p.nodeWidth*j:960,T=p.nodeHeight?p.nodeHeight*j:500,E=C,D=T+x;S.attr(`viewBox`,`0 0 ${E} ${D}`),m(S,D,E,p.useMaxWidth);let O;try{let t=p.valueFormat||`,`;if(t===`$0,0`)O=e(e=>`$`+o(`,`)(e),`valueFormat`);else if(t.startsWith(`$`)&&t.includes(`,`)){let n=/\.\d+/.exec(t),r=n?n[0]:``;O=e(e=>`$`+o(`,`+r)(e),`valueFormat`)}else if(t.startsWith(`$`)){let n=t.substring(1);O=e(e=>`$`+o(n||``)(e),`valueFormat`)}else O=o(t)}catch(e){r.error(`Error creating format function:`,e),O=o(`,`)}let k=n().range([`transparent`,b.cScale0,b.cScale1,b.cScale2,b.cScale3,b.cScale4,b.cScale5,b.cScale6,b.cScale7,b.cScale8,b.cScale9,b.cScale10,b.cScale11]),N=n().range([`transparent`,b.cScalePeer0,b.cScalePeer1,b.cScalePeer2,b.cScalePeer3,b.cScalePeer4,b.cScalePeer5,b.cScalePeer6,b.cScalePeer7,b.cScalePeer8,b.cScalePeer9,b.cScalePeer10,b.cScalePeer11]),P=n().range([b.cScaleLabel0,b.cScaleLabel1,b.cScaleLabel2,b.cScaleLabel3,b.cScaleLabel4,b.cScaleLabel5,b.cScaleLabel6,b.cScaleLabel7,b.cScaleLabel8,b.cScaleLabel9,b.cScaleLabel10,b.cScaleLabel11]);g&&S.append(`text`).attr(`x`,E/2).attr(`y`,x/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(g);let F=S.append(`g`).attr(`transform`,`translate(0, ${x})`).attr(`class`,`treemapContainer`),I=i(_).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),L=a().size([C,T]).paddingTop(e=>e.children&&e.children.length>0?M+j:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?j:0).paddingRight(e=>e.children&&e.children.length>0?j:0).paddingBottom(e=>e.children&&e.children.length>0?j:0).round(!0)(I),R=L.descendants().filter(e=>e.children&&e.children.length>0),z=F.selectAll(`.treemapSection`).data(R).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);z.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,M).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),z.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${c}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,M),z.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>k(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>N(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=y({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),z.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,M/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,t)=>`url(#clip-section-${c}-${t})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+P(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+y({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let n=t(this),r=e.data.name;n.text(r);let i=e.x1-e.x0,a;a=p.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=n.node();if(s.getComputedTextLength()>o){let e=r;for(;e.length>0;){if(e=r.substring(0,e.length-1),e.length===0){n.text(`...`),s.getComputedTextLength()>o&&n.text(``);break}if(n.text(e+`...`),s.getComputedTextLength()<=o)break}}}),p.showValues!==!1&&z.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,M/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?O(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+P(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+y({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let B=L.leaves(),V=B.length>20,H=V?16:38,U=V?14:28,W=V?4:8,G=V?4:6,K=V?2:4,q=V?8:10,J=V?1:2,Y=F.selectAll(`.treemapLeafGroup`).data(B).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);Y.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?k(e.parent.data.name):k(e.data.name)).attr(`style`,e=>y({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?k(e.parent.data.name):k(e.data.name)).attr(`stroke-width`,3),Y.append(`clipPath`).attr(`id`,(e,t)=>`clip-${c}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),Y.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${H}px;fill:`+P(e.data.name)+`;`+y({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${c}-${t})`).text(e=>e.data.name).each(function(e){let n=t(this),r=e.x1-e.x0,i=e.y1-e.y0,a=n.node(),o=r-2*K,s=i-2*K;if(oo&&c>W;)c--,n.style(`font-size`,`${c}px`);let u=Math.max(G,Math.min(U,Math.round(c*l))),d=c+J+u;for(;d>s&&c>W&&(c--,u=Math.max(G,Math.min(U,Math.round(c*l))),!(uo||c(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${U}px;fill:`+P(e.data.name)+`;`+y({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${c}-${t})`).text(e=>e.value?O(e.value):``).each(function(e){let n=t(this),r=this.parentNode;if(!r){n.style(`display`,`none`);return}let i=t(r).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){n.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(G,Math.min(U,Math.round(a*.6)));n.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+J;n.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-2*K;n.node().getComputedTextLength()>u||s+o>l||o{let t=p(),n=u(),r=x(t,n.themeVariables),i=x(P,e),a=i.titleColor??r.titleColor,o=i.labelColor??r.textColor,s=i.valueColor??r.textColor;return` + .treemapNode.section { + stroke: ${i.sectionStrokeColor}; + stroke-width: ${i.sectionStrokeWidth}; + fill: ${i.sectionFillColor}; + } + .treemapNode.leaf { + stroke: ${i.leafStrokeColor}; + stroke-width: ${i.leafStrokeWidth}; + fill: ${i.leafFillColor}; + } + .treemapLabel { + fill: ${o}; + font-size: ${i.labelFontSize}; + } + .treemapValue { + fill: ${s}; + font-size: ${i.valueFontSize}; + } + .treemapTitle { + fill: ${a}; + font-size: ${i.titleFontSize}; + } + `},`getStyles`)};export{F as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/ebnfDiagram-M7IZRLZS-kvDdF9Z_.js b/lecture-01/assets/ebnfDiagram-M7IZRLZS-kvDdF9Z_.js new file mode 100644 index 0000000000000000000000000000000000000000..3a90bc3ee50e5110da26ffe871f1dc853da928dd --- /dev/null +++ b/lecture-01/assets/ebnfDiagram-M7IZRLZS-kvDdF9Z_.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as t}from"./chunk-FO5PYUIK-CPzj2963.js";import"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-BPTLHSDI-QRS_xuYz.js";import{n,r,t as i}from"./chunk-QR6SRGRY-cBZQLGGn.js";import{t as a}from"./chunk-6ZKBGPIT-B4RTUexp.js";import"./chunk-A7G5T7E5-C2HISlqa.js";import{t as o}from"./chunk-BQKPLVCE-CH-bQZj9.js";import"./chunk-NYCIP5HP-BZs_nZUU.js";import"./chunk-6QIBY7DQ-xR0SR3RB.js";import"./chunk-SLCUJWJ3-Bzf1BoPP.js";import"./chunk-43ACQNTO-CVHKukau.js";import{n as s}from"./chunk-FXRKSSP6-BDxrggHz.js";import"./chunk-RRYK4PFG-DZMcopsb.js";import"./chunk-IT6C5QXO-BI6Sf-cR.js";import"./chunk-GMJQP6DO-gEw8rKqu.js";import"./chunk-ODPFZSHR-BUzFQ4Zq.js";import"./chunk-6OZ7KPF7-CpRlDBGl.js";import"./chunk-LJTN6OYE-BTsXVLFU.js";import"./chunk-Z6Q54H3S-B8XyqzVF.js";import"./chunk-4KMQCWFH-ClzK3uec.js";import"./chunk-S7Q6ZHN2-CSIi0_Nw.js";import"./chunk-IIWGMRJM-k15frrBU.js";var c=s().RailroadEbnf.parser.LangiumParser,l=e(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),u=e(e=>{let t=e.elements.map(p);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=e(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 l(e.element);case`EbnfOptional`:return{type:`optional`,element:l(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),f=e((e,t)=>{switch(t.$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:`-`},d(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),p=e(e=>e.postfixes.reduce((e,t)=>f(e,t),d(e.base)),`transformTerm`),m=e(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=e(e=>{a(e,i),e.title&&i.setTitle(e.title),e.rules.map(e=>i.addRule(m(e)))},`populateDb`),g={parser:{parse:e(e=>{i.clear(),t.debug(`[EBNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new o(n);let r=n.value;t.debug(`[EBNF Parser] Parsed rules:`,r.rules.length),h(r),t.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:i}},db:i,renderer:r,styles:n};export{g as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/erDiagram-FLLG3MV5-BvzVUDwG.js b/lecture-01/assets/erDiagram-FLLG3MV5-BvzVUDwG.js new file mode 100644 index 0000000000000000000000000000000000000000..e935eca1186231353c8381f538baff6ee1187570 --- /dev/null +++ b/lecture-01/assets/erDiagram-FLLG3MV5-BvzVUDwG.js @@ -0,0 +1,85 @@ +import{n as e,r as t}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as n,T as r}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as i,E as a,H as o,J as s,Q as c,Y as l,a as u,b as d,o as f,x as p}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-PLCLPJVV-BfMyJHbe.js";import"./chunk-XXV7AQMY-qeLKYxsH.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{l as m,v as h}from"./chunk-OX6ZKUVE-roiHi12N.js";import"./chunk-YV36FAQU-CkTVkoM6.js";import"./chunk-AQ2D6KKF-AxjphkEe.js";import"./chunk-2V3FENDJ-B1mkZICr.js";import"./chunk-DKH7L6O3-pKUB4f-O.js";import"./chunk-RTI7CJYH-CrTK6TD7.js";import"./chunk-MPM6TOF7-5cxd71sq.js";import{r as g,t as _}from"./chunk-STSWKLMO-1NGmNrHs.js";import{t as v}from"./chunk-HPLX5OYV-zid2YVw5.js";import{t as y}from"./chunk-BYAF6FXG-DqiL_6qO.js";var b=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,23],c=[1,24],l=[1,25],u=[1,26],d=[1,27],f=[1,19],p=[1,28],m=[1,29],h=[1,20],g=[1,18],_=[1,21],v=[1,22],y=[1,36],b=[1,37],x=[1,38],S=[1,39],C=[1,40],w=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],T=[1,45],E=[1,46],D=[1,55],O=[40,48,50,51,52,71,72],k=[1,66],A=[1,64],j=[1,61],M=[1,65],N=[1,67],P=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],F=[66,67,68,69,70],I=[1,85],L=[1,84],R=[1,82],z=[1,83],B=[6,10,42,47],V=[6,10,13,41,42,47,48,49],H=[1,93],U=[1,92],W=[1,91],G=[19,58],K=[1,102],q=[1,101],J=[19,58,61,63],Y={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,13:`COLON`,15:`STYLE_SEPARATOR`,17:`BLOCK_START`,19:`BLOCK_STOP`,20:`SQS`,21:`SQE`,22:`title`,23:`title_value`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`direction_tb`,34:`direction_bt`,35:`direction_rl`,36:`direction_lr`,37:`CLASSDEF`,40:`UNICODE_TEXT`,41:`STYLE_TEXT`,42:`COMMA`,43:`CLASS`,44:`STYLE`,47:`SEMI`,48:`NUM`,49:`BRKT`,50:`ENTITY_NAME`,51:`DECIMAL_NUM`,52:`ENTITY_ONE`,58:`ATTRIBUTE_WORD`,59:`?`,61:`,`,62:`ATTRIBUTE_KEY`,63:`COMMENT`,66:`ZERO_OR_ONE`,67:`ZERO_OR_MORE`,68:`ONE_OR_MORE`,69:`ONLY_ONE`,70:`MD_PARENT`,71:`NON_IDENTIFYING`,72:`IDENTIFYING`,73:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]);break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]);break;case 11:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]);break;case 12:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 13:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]);break;case 16:r.addEntity(a[s]);break;case 17:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]);break;case 18:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]);break;case 19:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]);break;case 20:r.addEntity(a[s-5],a[s-3]);break;case 21:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]);break;case 22:r.addEntity(a[s-3],a[s-1]);break;case 23:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection(`TB`);break;case 33:r.setDirection(`BT`);break;case 34:r.setDirection(`RL`);break;case 35:r.setDirection(`LR`);break;case 36:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 59:case 68:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 43:this.$=[a[s]];break;case 44:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 80:case 81:this.$=a[s].replace(/"/g,``);break;case 55:case 56:case 57:case 58:case 82:this.$=a[s];break;case 60:a[s].push(a[s-1]),this.$=a[s];break;case 61:this.$={type:a[s-1],name:a[s]};break;case 62:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 63:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 64:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 65:case 67:case 70:this.$=a[s];break;case 66:this.$=a[s-1]+a[s];break;case 69:a[s-2].push(a[s]),this.$=a[s-2];break;case 71:this.$=a[s].replace(/"/g,``);break;case 72:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:30,11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(n,[2,5]),e(n,[2,6]),e(n,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:y,67:b,68:x,69:S,70:C}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(n,[2,27]),e(n,[2,28]),e(n,[2,29]),e(n,[2,30]),e(n,[2,31]),e(w,[2,54]),e(w,[2,55]),e(w,[2,56]),e(w,[2,57]),e(w,[2,58]),e(n,[2,32]),e(n,[2,33]),e(n,[2,34]),e(n,[2,35]),{16:44,40:T,41:E},{16:47,40:T,41:E},{16:48,40:T,41:E},e(n,[2,4]),{11:49,40:f,48:h,50:g,51:_,52:v},{16:50,40:T,41:E},{18:51,19:[1,52],53:53,54:54,58:D},{11:56,40:f,48:h,50:g,51:_,52:v},{65:57,71:[1,58],72:[1,59]},e(O,[2,73]),e(O,[2,74]),e(O,[2,75]),e(O,[2,76]),e(O,[2,77]),e(n,[2,24]),e(n,[2,25]),e(n,[2,26]),{13:k,38:60,41:A,42:j,45:62,46:63,48:M,49:N},e(P,[2,37]),e(P,[2,38]),{16:68,40:T,41:E,42:j},{13:k,38:69,41:A,42:j,45:62,46:63,48:M,49:N},{13:[1,70],15:[1,71]},e(n,[2,17],{64:35,12:72,17:[1,73],42:j,66:y,67:b,68:x,69:S,70:C}),{19:[1,74]},e(n,[2,14]),{18:75,19:[2,59],53:53,54:54,58:D},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:y,67:b,68:x,69:S,70:C},e(F,[2,78]),e(F,[2,79]),{6:I,10:L,39:81,42:R,47:z},{40:[1,86],41:[1,87]},e(B,[2,43],{46:88,13:k,41:A,48:M,49:N}),e(V,[2,45]),e(V,[2,50]),e(V,[2,51]),e(V,[2,52]),e(V,[2,53]),e(n,[2,41],{42:j}),{6:I,10:L,39:89,42:R,47:z},{14:90,40:H,50:U,73:W},{16:94,40:T,41:E},{11:95,40:f,48:h,50:g,51:_,52:v},{18:96,19:[1,97],53:53,54:54,58:D},e(n,[2,12]),{19:[2,60]},e(G,[2,61],{56:98,57:99,60:100,62:K,63:q}),e([19,58,62,63],[2,67]),{58:[2,66]},e(n,[2,22],{15:[1,104],17:[1,103]}),e([40,48,50,51,52],[2,72]),e(n,[2,36]),{13:k,41:A,45:105,46:63,48:M,49:N},e(n,[2,47]),e(n,[2,48]),e(n,[2,49]),e(P,[2,39]),e(P,[2,40]),e(V,[2,46]),e(n,[2,42]),e(n,[2,8]),e(n,[2,80]),e(n,[2,81]),e(n,[2,82]),{13:[1,106],42:j},{13:[1,108],15:[1,107]},{19:[1,109]},e(n,[2,15]),e(G,[2,62],{57:110,61:[1,111],63:q}),e(G,[2,63]),e(J,[2,68]),e(G,[2,71]),e(J,[2,70]),{18:112,19:[1,113],53:53,54:54,58:D},{16:114,40:T,41:E},e(B,[2,44],{46:88,13:k,41:A,48:M,49:N}),{14:115,40:H,50:U,73:W},{16:116,40:T,41:E},{14:117,40:H,50:U,73:W},e(n,[2,13]),e(G,[2,64]),{60:118,62:K},{19:[1,119]},e(n,[2,20]),e(n,[2,23],{17:[1,120],42:j}),e(n,[2,11]),{13:[1,121],42:j},e(n,[2,10]),e(J,[2,69]),e(n,[2,18]),{18:122,19:[1,123],53:53,54:54,58:D},{14:124,40:H,50:U,73:W},{19:[1,125]},e(n,[2,21]),e(n,[2,9]),e(n,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};Y.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,t,n,r){switch(n){case 0:return this.begin(`acc_title`),24;case 1:return this.popState(),`acc_title_value`;case 2:return this.begin(`acc_descr`),26;case 3:return this.popState(),`acc_descr_value`;case 4:this.begin(`acc_descr_multiline`);break;case 5:this.popState();break;case 6:return`acc_descr_multiline_value`;case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 73;case 16:return 4;case 17:return this.begin(`block`),17;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 62;case 25:return 58;case 26:return 58;case 27:this.begin(`block_bq`);break;case 28:return 58;case 29:this.popState();break;case 30:return 63;case 31:break;case 32:return this.popState(),19;case 33:return t.yytext[0];case 34:return 20;case 35:return 21;case 36:return this.begin(`style`),44;case 37:return this.popState(),10;case 38:break;case 39:return 13;case 40:return 42;case 41:return 49;case 42:return this.begin(`style`),37;case 43:return 43;case 44:return 66;case 45:return 68;case 46:return 68;case 47:return 68;case 48:return 66;case 49:return 66;case 50:return 67;case 51:return 67;case 52:return 67;case 53:return 67;case 54:return 67;case 55:return 68;case 56:return 67;case 57:return 68;case 58:return 69;case 59:return 69;case 60:return 51;case 61:return 69;case 62:return 69;case 63:return 69;case 64:return 52;case 65:return 48;case 66:return 69;case 67:return 66;case 68:return 67;case 69:return 68;case 70:return 70;case 71:return 71;case 72:return 72;case 73:return 72;case 74:return 71;case 75:return 71;case 76:return 71;case 77:return 41;case 78:return 47;case 79:return 40;case 80:return t.yytext[0];case 81:return 6}},`anonymous`),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[37,38,39,40,41,77,78],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[28,29],inclusive:!1},block:{rules:[23,24,25,26,27,30,31,32,33],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,34,35,36,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,79,80,81],inclusive:!0}}}})();function X(){this.yy={}}return t(X,`Parser`),X.prototype=Y,Y.Parser=X,new X})();b.parser=b;var x=b,S=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction=`TB`,this.Cardinality={ZERO_OR_ONE:`ZERO_OR_ONE`,ZERO_OR_MORE:`ZERO_OR_MORE`,ONE_OR_MORE:`ONE_OR_MORE`,ONLY_ONE:`ONLY_ONE`,MD_PARENT:`MD_PARENT`},this.Identification={NON_IDENTIFYING:`NON_IDENTIFYING`,IDENTIFYING:`IDENTIFYING`},this.setAccTitle=l,this.getAccTitle=p,this.setAccDescription=s,this.getAccDescription=d,this.setDiagramTitle=c,this.getDiagramTitle=a,this.getConfig=t(()=>i().er,`getConfig`),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{t(this,`ErDB`)}addEntity(e,t=``){return this.entities.has(e)?!this.entities.get(e)?.alias&&t&&(this.entities.get(e).alias=t,r.info(`Add alias '${t}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-${this.entities.size}`,label:e,attributes:[],alias:t,shape:`erBox`,look:i().look??`default`,cssClasses:`default`,cssStyles:[],labelType:`markdown`}),r.info(`Added new entity :`,e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,t){let n=this.addEntity(e),i;for(i=t.length-1;i>=0;i--)t[i].keys||(t[i].keys=[]),t[i].comment||(t[i].comment=``),n.attributes.push(t[i]),r.debug(`Added attribute `,t[i].name)}addRelationship(e,t,n,i){let a=this.entities.get(e),o=this.entities.get(n);if(!a||!o)return;let s={entityA:a.id,roleA:t,entityB:o.id,relSpec:i};this.relationships.push(s),r.debug(`Added new relationship :`,s)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let t=[];for(let n of e){let e=this.classes.get(n);e?.styles&&(t=[...t,...e.styles??[]].map(e=>e.trim())),e?.textStyles&&(t=[...t,...e.textStyles??[]].map(e=>e.trim()))}return t}addCssStyles(e,t){for(let n of e){let e=this.entities.get(n);if(!t||!e)return;for(let n of t)e.cssStyles.push(n)}}addClass(e,t){e.forEach(e=>{let n=this.classes.get(e);n===void 0&&(n={id:e,styles:[],textStyles:[]},this.classes.set(e,n)),t&&t.forEach(function(e){if(/color/.exec(e)){let t=e.replace(`fill`,`bgFill`);n.textStyles.push(t)}n.styles.push(e)})})}setClass(e,t){for(let n of e){let e=this.entities.get(n);if(e)for(let n of t)e.cssClasses+=` `+n}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],f()}getData(){let e=[],t=[],n=i(),r=0;for(let t of this.entities.keys()){let n=this.entities.get(t);n&&(n.cssCompiledStyles=this.getCompiledStyles(n.cssClasses.split(` `)),n.colorIndex=r++,e.push(n))}let a=0;for(let e of this.relationships){let r={id:m(e.entityA,e.entityB,{prefix:`id`,counter:a++}),type:`normal`,curve:`basis`,start:e.entityA,end:e.entityB,label:e.roleA,labelpos:`c`,thickness:`normal`,classes:`relationshipLine`,arrowTypeStart:e.relSpec.cardB.toLowerCase(),arrowTypeEnd:e.relSpec.cardA.toLowerCase(),pattern:e.relSpec.relType==`IDENTIFYING`?`solid`:`dashed`,look:n.look,labelType:`markdown`};t.push(r)}return{nodes:e,edges:t,other:{},config:n,direction:`TB`}}},C={};e(C,{draw:()=>w});var w=t(async function(e,t,a,o){r.info(`REF0:`),r.info(`Drawing er diagram (unified)`,t);let{securityLevel:s,er:c,layout:l}=i(),u=o.db.getData(),d=v(t,s);u.type=o.type,u.layoutAlgorithm=_(l),u.config.flowchart.nodeSpacing=c?.nodeSpacing||140,u.config.flowchart.rankSpacing=c?.rankSpacing||80,u.direction=o.db.getDirection();let{config:f}=u,{look:p}=f;u.markers=p===`neo`?[`only_one_neo`,`zero_or_one_neo`,`one_or_more_neo`,`zero_or_more_neo`]:[`only_one`,`zero_or_one`,`one_or_more`,`zero_or_more`],u.diagramId=t,await g(u,d),u.layoutAlgorithm===`elk`&&d.select(`.edges`).lower();let m=d.selectAll(`[id*="-background"]`);Array.from(m).length>0&&m.each(function(){let e=n(this),t=e.attr(`id`).replace(`-background`,``),r=d.select(`#${CSS.escape(t)}`);if(!r.empty()){let t=r.attr(`transform`);e.attr(`transform`,t)}}),h.insertTitle(d,`erDiagramTitleText`,c?.titleTopMargin??25,o.db.getDiagramTitle()),y(d,8,`erDiagram`,c?.useMaxWidth??!0)},`draw`),T=t((e,t)=>{let n=u,r=n(e,`r`),i=n(e,`g`),a=n(e,`b`);return o(r,i,a,t)},`fade`),E=new Set([`redux-color`,`redux-dark-color`]),D=t(e=>{let{theme:t,look:n,bkgColorArray:r,borderColorArray:i}=e;if(!E.has(t))return``;let a=r?.length>0,o=``;for(let t=0;t{let{look:t,theme:n,erEdgeLabelBackground:r,strokeWidth:i}=e;return` + ${D(e)} + .entityBox { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${e.tertiaryColor}; + opacity: 0.7; + background-color: ${e.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .labelBkg { + background-color: ${E.has(n)&&r?r:T(e.tertiaryColor,.5)}; + } + + .edgeLabel { + background-color: ${E.has(n)&&r?r:e.edgeLabelBackground}; + } + .edgeLabel .label rect { + fill: ${E.has(n)&&r?r:e.edgeLabelBackground}; + } + .edgeLabel .label text { + fill: ${e.textColor}; + } + + .edgeLabel .label { + fill: ${e.nodeBorder}; + font-size: 14px; + } + + .label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + + .edge-pattern-dashed { + stroke-dasharray: 8,8; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon + { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: ${t===`neo`?i:`1px`}; + } + + .relationshipLine { + stroke: ${e.lineColor}; + stroke-width: ${t===`neo`?i:`1px`}; + fill: none; + } + + .marker { + fill: none !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; + } + [data-look=neo].labelBkg { + background-color: ${T(e.tertiaryColor,.5)}; + } +`},`getStyles`)};export{O as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/eventmodeling-45OFAUF4-3WKU7OSU-BRi7es1H.js b/lecture-01/assets/eventmodeling-45OFAUF4-3WKU7OSU-BRi7es1H.js new file mode 100644 index 0000000000000000000000000000000000000000..8c96932818e1d3c8311b517cf006901321655c1d --- /dev/null +++ b/lecture-01/assets/eventmodeling-45OFAUF4-3WKU7OSU-BRi7es1H.js @@ -0,0 +1 @@ +import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as e}from"./chunk-6QIBY7DQ-xR0SR3RB.js";export{e as createEventModelingServices}; \ No newline at end of file diff --git a/lecture-01/assets/figure--eqXHWiv.js b/lecture-01/assets/figure--eqXHWiv.js new file mode 100644 index 0000000000000000000000000000000000000000..81beae0b3b5df1128f4479d77802d68bcac5ac3f --- /dev/null +++ b/lecture-01/assets/figure--eqXHWiv.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,St as r,T as i,U as a,_ as o,b as s,y as c}from"./modules/shiki-CJZsCeMT.js";import{t as l}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as u}from"./slidev/context-C6dxaFaS.js";import{t as d}from"./DeckFooter-BcBH6IgO.js";var f={class:`slidev-layout dl-figure`},p={key:0,class:`dl-figure__title`},m={class:`dl-figure__footer`},h={class:`dl-figure__caption`},g={class:`dl-figure__citation`},_=l(i({__name:`figure`,props:{title:{},maxHeight:{}},setup(i){let{$slidev:l,$nav:_,$clicksContext:v,$clicks:y,$page:b,$renderContext:x,$frontmatter:S}=u(),C=i;return(i,l)=>{let u=d;return e(),s(`div`,f,[C.title?(e(),s(`h1`,p,n(C.title),1)):c(`v-if`,!0),o(`div`,{class:`dl-figure__canvas`,style:r({maxHeight:C.maxHeight})},[a(i.$slots,`default`,{},void 0,!0)],4),o(`div`,m,[o(`div`,h,[a(i.$slots,`caption`,{},void 0,!0)]),o(`div`,g,[a(i.$slots,`citation`,{},void 0,!0)])]),t(u)])}}}),[[`__scopeId`,`data-v-98201e7e`]]);export{_ as t}; \ No newline at end of file diff --git a/lecture-01/assets/figure-BX47ygGP.css b/lecture-01/assets/figure-BX47ygGP.css new file mode 100644 index 0000000000000000000000000000000000000000..f7b9d6844bbaaed28a9c0c1b5a64c27bd873e2f1 --- /dev/null +++ b/lecture-01/assets/figure-BX47ygGP.css @@ -0,0 +1 @@ +.dl-figure[data-v-98201e7e]{flex-direction:column;display:flex}.dl-figure__title[data-v-98201e7e]{margin-bottom:.8rem}.dl-figure__canvas[data-v-98201e7e]{flex:auto;justify-content:center;align-items:center;min-height:0;display:flex}.dl-figure__canvas[data-v-98201e7e] img,.dl-figure__canvas[data-v-98201e7e] svg{object-fit:contain;max-width:100%;max-height:100%}.dl-figure__footer[data-v-98201e7e]{justify-content:space-between;align-items:flex-end;gap:2rem;margin-top:.6rem;display:flex}.dl-figure__caption[data-v-98201e7e]{font-size:var(--dl-fs-secondary);color:var(--dl-body)}.dl-figure__citation[data-v-98201e7e]{font-size:var(--dl-fs-citation);color:var(--dl-muted);text-align:right;flex-shrink:0} diff --git a/lecture-01/assets/flowDiagram-JEP3DFND-BSFjwP7W.js b/lecture-01/assets/flowDiagram-JEP3DFND-BSFjwP7W.js new file mode 100644 index 0000000000000000000000000000000000000000..9c6148d2989385d1232ba2ea9c62aa9327a133d6 --- /dev/null +++ b/lecture-01/assets/flowDiagram-JEP3DFND-BSFjwP7W.js @@ -0,0 +1 @@ +import"./chunk-FO5PYUIK-CPzj2963.js";import"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-PWCFYZI5-Dz1excih.js";import"./chunk-PLCLPJVV-BfMyJHbe.js";import"./chunk-XXV7AQMY-qeLKYxsH.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import"./chunk-OX6ZKUVE-roiHi12N.js";import"./chunk-YV36FAQU-CkTVkoM6.js";import"./chunk-AQ2D6KKF-AxjphkEe.js";import"./chunk-2V3FENDJ-B1mkZICr.js";import"./chunk-DKH7L6O3-pKUB4f-O.js";import"./chunk-RTI7CJYH-CrTK6TD7.js";import"./chunk-MPM6TOF7-5cxd71sq.js";import"./chunk-STSWKLMO-1NGmNrHs.js";import"./chunk-ZICDAICJ-CB44yeNY.js";import"./chunk-HPLX5OYV-zid2YVw5.js";import"./chunk-BYAF6FXG-DqiL_6qO.js";import{n as e}from"./chunk-MX3EQCGM-dfbghwBz.js";export{e as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/gan-schematic-Blkri1md.jpeg b/lecture-01/assets/gan-schematic-Blkri1md.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..fe79a7abd8467d1014165a0f6b788c52ee6caf97 Binary files /dev/null and b/lecture-01/assets/gan-schematic-Blkri1md.jpeg differ diff --git a/lecture-01/assets/ganttDiagram-RXA2POXJ-D_LKD9p_.js b/lecture-01/assets/ganttDiagram-RXA2POXJ-D_LKD9p_.js new file mode 100644 index 0000000000000000000000000000000000000000..6fe07d642c2ce7c3fc35ef59a4e020cf5183c99d --- /dev/null +++ b/lecture-01/assets/ganttDiagram-RXA2POXJ-D_LKD9p_.js @@ -0,0 +1,292 @@ +import{i as e,r as t,t as n}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{$ as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,O as f,P as p,Q as m,S as h,T as g,U as _,V as v,W as y,X as b,Y as x,Z as S,i as C,q as w,r as T,y as E}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as D,E as O,J as k,Q as A,Y as j,b as M,c as ee,l as te,o as N,x as P}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as ne}from"./chunk-IPM4HZQ6-CQmHNgJe.js";import{v as re}from"./chunk-OX6ZKUVE-roiHi12N.js";var ie=n({"../../node_modules/.pnpm/dayjs@1.11.20/node_modules/dayjs/plugin/isoWeek.js"(e,n){(function(t,r){typeof e==`object`&&n!==void 0?n.exports=r():typeof define==`function`&&define.amd?define(r):(t=typeof globalThis<`u`?globalThis:t||self).dayjs_plugin_isoWeek=r()})(e,(function(){return function(e,n,r){var i=t(function(e){return e.add(4-e.isoWeekday(),`day`)},`a`),a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),`day`);var t,n,a,o,s=i(this),c=(t=this.isoWeekYear(),n=this.$u,a=(n?r.utc:r)().year(t).startOf(`year`),o=4-a.isoWeekday(),a.isoWeekday()>4&&(o+=7),a.add(o,`day`));return s.diff(c,`week`)+1},a.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=a.startOf;a.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):o.bind(this)(e,t)}}}))}}),ae=n({"../../node_modules/.pnpm/dayjs@1.11.20/node_modules/dayjs/plugin/customParseFormat.js"(e,n){(function(t,r){typeof e==`object`&&n!==void 0?n.exports=r():typeof define==`function`&&define.amd?define(r):(t=typeof globalThis<`u`?globalThis:t||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,i=/\d\d/,a=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,s={},c=t(function(e){return(e=+e)+(e>68?1900:2e3)},`a`),l=t(function(e){return function(t){this[e]=+t}},`f`),u=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=(function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n})(e)}],d=t(function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},`u`),f=t(function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},`d`),p={A:[o,function(e){this.afternoon=f(e,!1)}],a:[o,function(e){this.afternoon=f(e,!0)}],Q:[r,function(e){this.month=3*(e-1)+1}],S:[r,function(e){this.milliseconds=100*e}],SS:[i,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[a,l(`seconds`)],ss:[a,l(`seconds`)],m:[a,l(`minutes`)],mm:[a,l(`minutes`)],H:[a,l(`hours`)],h:[a,l(`hours`)],HH:[a,l(`hours`)],hh:[a,l(`hours`)],D:[a,l(`day`)],DD:[i,l(`day`)],Do:[o,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[a,l(`week`)],ww:[i,l(`week`)],M:[a,l(`month`)],MM:[i,l(`month`)],MMM:[o,function(e){var t=d(`months`),n=(d(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[o,function(e){var t=d(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,l(`year`)],YY:[i,function(e){this.year=c(e)}],YYYY:[/\d{4}/,l(`year`)],Z:u,ZZ:u};function m(t){for(var r=t,i=s&&s.formats,a=(t=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(n),o=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=m(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,p=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),p&&(y=r(y).week(p).toDate()),y)}catch{return new Date(``)}})(t,o,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(o)&&(this.$d=new Date(``)),s={}}else if(o instanceof Array)for(var f=o.length,p=1;p<=f;p+=1){a[1]=o[p-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}p===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))}}),F=n({"../../node_modules/.pnpm/dayjs@1.11.20/node_modules/dayjs/plugin/advancedFormat.js"(e,t){(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))}}),oe=n({"../../node_modules/.pnpm/dayjs@1.11.20/node_modules/dayjs/plugin/duration.js"(e,n){(function(t,r){typeof e==`object`&&n!==void 0?n.exports=r():typeof define==`function`&&define.amd?define(r):(t=typeof globalThis<`u`?globalThis:t||self).dayjs_plugin_duration=r()})(e,(function(){var e,n,r=1e3,i=6e4,a=36e5,o=864e5,s=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,c=31536e6,l=2628e6,u=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,d={years:c,months:l,days:o,hours:a,minutes:i,seconds:r,milliseconds:1,weeks:6048e5},f=t(function(e){return e instanceof y},`c`),p=t(function(e,t,n){return new y(e,n,t.$l)},`f`),m=t(function(e){return n.p(e)+`s`},`m`),h=t(function(e){return e<0},`l`),g=t(function(e){return h(e)?Math.ceil(e):Math.floor(e)},`$`),_=t(function(e){return Math.abs(e)},`y`),v=t(function(e,t){return e?h(e)?{negative:!0,format:``+_(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},`v`),y=(function(){function h(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return p(e*d[m(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[m(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(u);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}t(h,`l`);var _=h.prototype;return _.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*d[n]}),0)},_.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=g(e/c),e%=c,this.$d.months=g(e/l),e%=l,this.$d.days=g(e/o),e%=o,this.$d.hours=g(e/a),e%=a,this.$d.minutes=g(e/i),e%=i,this.$d.seconds=g(e/r),e%=r,this.$d.milliseconds=e},_.toISOString=function(){var e=v(this.$d.years,`Y`),t=v(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=v(n,`D`),i=v(this.$d.hours,`H`),a=v(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=v(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},_.toJSON=function(){return this.toISOString()},_.format=function(e){var t=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:n.s(this.$d.years,2,`0`),YYYY:n.s(this.$d.years,4,`0`),M:this.$d.months,MM:n.s(this.$d.months,2,`0`),D:this.$d.days,DD:n.s(this.$d.days,2,`0`),H:this.$d.hours,HH:n.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,`0`),SSS:n.s(this.$d.milliseconds,3,`0`)};return t.replace(s,(function(e,t){return t||String(r[e])}))},_.as=function(e){return this.$ms/d[m(e)]},_.get=function(e){var t=this.$ms,n=m(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?g(t/d[n]):this.$d[n],t||0},_.add=function(e,t,n){var r;return r=t?e*d[m(t)]:f(e)?e.$ms:p(e,this).$ms,p(this.$ms+r*(n?-1:1),this)},_.subtract=function(e,t){return this.add(e,t,!0)},_.locale=function(e){var t=this.clone();return t.$l=e,t},_.clone=function(){return p(this.$ms,this)},_.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},_.valueOf=function(){return this.asMilliseconds()},_.milliseconds=function(){return this.get(`milliseconds`)},_.asMilliseconds=function(){return this.as(`milliseconds`)},_.seconds=function(){return this.get(`seconds`)},_.asSeconds=function(){return this.as(`seconds`)},_.minutes=function(){return this.get(`minutes`)},_.asMinutes=function(){return this.as(`minutes`)},_.hours=function(){return this.get(`hours`)},_.asHours=function(){return this.as(`hours`)},_.days=function(){return this.get(`days`)},_.asDays=function(){return this.as(`days`)},_.weeks=function(){return this.get(`weeks`)},_.asWeeks=function(){return this.as(`weeks`)},_.months=function(){return this.get(`months`)},_.asMonths=function(){return this.as(`months`)},_.years=function(){return this.get(`years`)},_.asYears=function(){return this.as(`years`)},h})(),b=t(function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)},`p`);return function(t,r,i){e=i,n=i().$utils(),i.duration=function(e,t){return p(e,{$l:i.locale()},t)},i.isDuration=f;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return f(e)?b(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return f(e)?b(this,e,-1):o.bind(this)(e,t)}}}))}}),I=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],i=[1,27],a=[1,28],o=[1,29],s=[1,30],c=[1,31],l=[1,32],u=[1,33],d=[1,34],f=[1,9],p=[1,10],m=[1,11],h=[1,12],g=[1,13],_=[1,14],v=[1,15],y=[1,16],b=[1,19],x=[1,20],S=[1,21],C=[1,22],w=[1,23],T=[1,25],E=[1,35],D={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:`error`,4:`gantt`,6:`EOF`,8:`SPACE`,10:`NL`,12:`weekday_monday`,13:`weekday_tuesday`,14:`weekday_wednesday`,15:`weekday_thursday`,16:`weekday_friday`,17:`weekday_saturday`,18:`weekday_sunday`,20:`weekend_friday`,21:`weekend_saturday`,22:`dateFormat`,23:`inclusiveEndDates`,24:`topAxis`,25:`axisFormat`,26:`tickInterval`,27:`excludes`,28:`includes`,29:`todayMarker`,30:`title`,31:`acc_title`,32:`acc_title_value`,33:`acc_descr`,34:`acc_descr_value`,35:`acc_descr_multiline_value`,36:`section`,38:`taskTxt`,39:`taskData`,40:`click`,41:`callbackname`,42:`callbackargs`,43:`href`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setWeekday(`monday`);break;case 9:r.setWeekday(`tuesday`);break;case 10:r.setWeekday(`wednesday`);break;case 11:r.setWeekday(`thursday`);break;case 12:r.setWeekday(`friday`);break;case 13:r.setWeekday(`saturday`);break;case 14:r.setWeekday(`sunday`);break;case 15:r.setWeekend(`friday`);break;case 16:r.setWeekend(`saturday`);break;case 17:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 18:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 19:r.TopAxis(),this.$=a[s].substr(8);break;case 20:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 21:r.setTickInterval(a[s].substr(13)),this.$=a[s].substr(13);break;case 22:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 23:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 24:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 27:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 28:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 31:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 33:r.addTask(a[s-1],a[s]),this.$=`task`;break;case 34:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 35:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 36:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 37:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 38:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 39:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 40:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 41:case 47:this.$=a[s-1]+` `+a[s];break;case 42:case 43:case 45:this.$=a[s-2]+` `+a[s-1]+` `+a[s];break;case 44:case 46:this.$=a[s-3]+` `+a[s-2]+` `+a[s-1]+` `+a[s]}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:i,14:a,15:o,16:s,17:c,18:l,19:18,20:u,21:d,22:f,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:36,11:17,12:r,13:i,14:a,15:o,16:s,17:c,18:l,19:18,20:u,21:d,22:f,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(n,[2,5]),e(n,[2,6]),e(n,[2,17]),e(n,[2,18]),e(n,[2,19]),e(n,[2,20]),e(n,[2,21]),e(n,[2,22]),e(n,[2,23]),e(n,[2,24]),e(n,[2,25]),e(n,[2,26]),e(n,[2,27]),{32:[1,37]},{34:[1,38]},e(n,[2,30]),e(n,[2,31]),e(n,[2,32]),{39:[1,39]},e(n,[2,8]),e(n,[2,9]),e(n,[2,10]),e(n,[2,11]),e(n,[2,12]),e(n,[2,13]),e(n,[2,14]),e(n,[2,15]),e(n,[2,16]),{41:[1,40],43:[1,41]},e(n,[2,4]),e(n,[2,28]),e(n,[2,29]),e(n,[2,33]),e(n,[2,34],{42:[1,42],43:[1,43]}),e(n,[2,40],{41:[1,44]}),e(n,[2,35],{43:[1,45]}),e(n,[2,36]),e(n,[2,38],{42:[1,46]}),e(n,[2,37]),e(n,[2,39])],defaultActions:{},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};D.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,t,n,r){switch(n){case 0:return this.begin(`open_directive`),`open_directive`;case 1:return this.begin(`acc_title`),31;case 2:return this.popState(),`acc_title_value`;case 3:return this.begin(`acc_descr`),33;case 4:return this.popState(),`acc_descr_value`;case 5:this.begin(`acc_descr_multiline`);break;case 6:this.popState();break;case 7:return`acc_descr_multiline_value`;case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin(`href`);break;case 15:this.popState();break;case 16:return 43;case 17:this.begin(`callbackname`);break;case 18:this.popState();break;case 19:this.popState(),this.begin(`callbackargs`);break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin(`click`);break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return`date`;case 45:return 30;case 46:return`accDescription`;case 47:return 36;case 48:return 38;case 49:return 39;case 50:return`:`;case 51:return 6;case 52:return`INVALID`}},`anonymous`),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}})();function O(){this.yy={}}return t(O,`Parser`),O.prototype=D,D.Parser=O,new O})();I.parser=I;var L=I,se=e(ne(),1),R=e(p(),1),ce=e(ie(),1),le=e(ae(),1),ue=e(F(),1);R.default.extend(ce.default),R.default.extend(le.default),R.default.extend(ue.default);var de={friday:5,saturday:6},z=``,fe=``,pe=void 0,me=``,B=[],V=[],he=new Map,ge=[],H=[],U=``,_e=``,ve=[`active`,`done`,`crit`,`milestone`,`vert`],ye=[],W=``,G=!1,be=!1,xe=`sunday`,K=`saturday`,Se=0,Ce=t(function(){ge=[],H=[],U=``,ye=[],q=0,at=void 0,Y=void 0,X=[],z=``,fe=``,_e=``,pe=void 0,me=``,B=[],V=[],G=!1,be=!1,Se=0,he=new Map,W=``,N(),xe=`sunday`,K=`saturday`},`clear`),we=t(function(e){W=e},`setDiagramId`),Te=t(function(e){fe=e},`setAxisFormat`),Ee=t(function(){return fe},`getAxisFormat`),De=t(function(e){pe=e},`setTickInterval`),Oe=t(function(){return pe},`getTickInterval`),ke=t(function(e){me=e},`setTodayMarker`),Ae=t(function(){return me},`getTodayMarker`),je=t(function(e){z=e},`setDateFormat`),Me=t(function(){G=!0},`enableInclusiveEndDates`),Ne=t(function(){return G},`endDatesAreInclusive`),Pe=t(function(){be=!0},`enableTopAxis`),Fe=t(function(){return be},`topAxisEnabled`),Ie=t(function(e){_e=e},`setDisplayMode`),Le=t(function(){return _e},`getDisplayMode`),Re=t(function(){return z},`getDateFormat`),ze=t((e,t)=>{let n=t.toLowerCase().split(/[\s,]+/).filter(e=>e!==``);return[...new Set([...e,...n])]},`mergeTokens`),Be=t(function(e){B=ze(B,e)},`setIncludes`),Ve=t(function(){return B},`getIncludes`),He=t(function(e){V=ze(V,e)},`setExcludes`),Ue=t(function(){return V},`getExcludes`),We=t(function(){return he},`getLinks`),Ge=t(function(e){U=e,ge.push(e)},`addSection`),Ke=t(function(){return ge},`getSections`),qe=t(function(){let e=lt(),t=0;for(;!e&&t<10;)e=lt(),t++;return H=X,H},`getTasks`),Je=t(function(e,t,n,r){let i=e.format(t.trim()),a=e.format(`YYYY-MM-DD`);return r.includes(i)||r.includes(a)?!1:n.includes(`weekends`)&&(e.isoWeekday()===de[K]||e.isoWeekday()===de[K]+1)||n.includes(e.format(`dddd`).toLowerCase())?!0:n.includes(i)||n.includes(a)},`isInvalidDate`),Ye=t(function(e){xe=e},`setWeekday`),Xe=t(function(){return xe},`getWeekday`),Ze=t(function(e){K=e},`setWeekend`),Qe=t(function(e,t,n,r){if(!n.length||e.manualEndTime)return;let i;i=e.startTime instanceof Date?(0,R.default)(e.startTime):(0,R.default)(e.startTime,t,!0),i=i.add(1,`d`);let a;a=e.endTime instanceof Date?(0,R.default)(e.endTime):(0,R.default)(e.endTime,t,!0);let[o,s]=$e(i,a,t,n,r);e.endTime=o.toDate(),e.renderEndTime=s},`checkTaskDates`),$e=t(function(e,t,n,r,i){let a=!1,o=null,s=t.add(1e4,`d`);for(;e<=t;){if(a||(o=t.toDate()),a=Je(e,n,r,i),a&&(t=t.add(1,`d`),t>s))throw Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");e=e.add(1,`d`)}return[t,o]},`fixTaskDates`),et=t(function(e,n,r){if(r=r.trim(),t(e=>{let t=e.trim();return t===`x`||t===`X`},`isTimestampFormat`)(n)&&/^\d+$/.test(r))return new Date(Number(r));let i=/^after\s+(?[\d\w- ]+)/.exec(r);if(i!==null){let e=null;for(let t of i.groups.ids.split(` `)){let n=Z(t);n!==void 0&&(!e||n.endTime>e.endTime)&&(e=n)}if(e)return e.endTime;let t=new Date;return t.setHours(0,0,0,0),t}let a=(0,R.default)(r,n.trim(),!0);if(a.isValid())return a.toDate();{g.debug(`Invalid date:`+r),g.debug(`With date format:`+n.trim());let e=new Date(r);if(e===void 0||isNaN(e.getTime())||e.getFullYear()<-1e4||e.getFullYear()>1e4)throw Error(`Invalid date:`+r);return e}},`getStartDate`),tt=t(function(e){let t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t===null?[NaN,`ms`]:[Number.parseFloat(t[1]),t[2]]},`parseDuration`),nt=t(function(e,t,n,r=!1){n=n.trim();let i=/^until\s+(?[\d\w- ]+)/.exec(n);if(i!==null){let e=null;for(let t of i.groups.ids.split(` `)){let n=Z(t);n!==void 0&&(!e||n.startTime{window.open(n,`_self`)}),he.set(e,n))}),dt(e,`clickable`)},`setLink`),dt=t(function(e,t){e.split(`,`).forEach(function(e){let n=Z(e);n!==void 0&&n.classes.push(t)})},`setClass`),ft=t(function(e,t,n){if(D().securityLevel!==`loose`||t===void 0)return;let r=[];if(typeof n==`string`){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{re.runFunc(t,...r)})},`setClickFun`),pt=t(function(e,t){ye.push(function(){let n=W?`${W}-${e}`:e,r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener(`click`,function(){t()})},function(){let n=W?`${W}-${e}`:e,r=document.querySelector(`[id="${n}-text"]`);r!==null&&r.addEventListener(`click`,function(){t()})})},`pushFun`),mt={getConfig:t(()=>D().gantt,`getConfig`),clear:Ce,setDateFormat:je,getDateFormat:Re,enableInclusiveEndDates:Me,endDatesAreInclusive:Ne,enableTopAxis:Pe,topAxisEnabled:Fe,setAxisFormat:Te,getAxisFormat:Ee,setTickInterval:De,getTickInterval:Oe,setTodayMarker:ke,getTodayMarker:Ae,setAccTitle:j,getAccTitle:P,setDiagramTitle:A,getDiagramTitle:O,setDiagramId:we,setDisplayMode:Ie,getDisplayMode:Le,setAccDescription:k,getAccDescription:M,addSection:Ge,getSections:Ke,getTasks:qe,addTask:st,findTaskById:Z,addTaskOrg:ct,setIncludes:Be,getIncludes:Ve,setExcludes:He,getExcludes:Ue,setClickEvent:t(function(e,t,n){e.split(`,`).forEach(function(e){ft(e,t,n)}),dt(e,`clickable`)},`setClickEvent`),setLink:ut,getLinks:We,bindFunctions:t(function(e){ye.forEach(function(t){t(e)})},`bindFunctions`),parseDuration:tt,isInvalidDate:Je,setWeekday:Ye,getWeekday:Xe,setWeekend:Ze};function ht(e,t,n){let r=!0;for(;r;)r=!1,n.forEach(function(n){let i=`^\\s*`+n+`\\s*$`,a=new RegExp(i);e[0].match(a)&&(t[n]=!0,e.shift(1),r=!0)})}t(ht,`getTaskTags`);var Q=e(p(),1),gt=e(oe(),1);Q.default.extend(gt.default);var _t=t(function(){g.debug(`Something is calling, setConf, remove the call`)},`setConf`),vt={monday:w,tuesday:m,wednesday:r,thursday:S,friday:y,saturday:x,sunday:b},yt=t((e,t)=>{let n=[...e].map(()=>-1/0),r=[...e].sort((e,t)=>e.startTime-t.startTime||e.order-t.order),i=0;for(let e of r)for(let r=0;r=n[r]){n[r]=e.endTime,e.order=r+t,r>i&&(i=r);break}return i},`getMaxIntersections`),$,bt=1e4,xt={parser:L,db:mt,renderer:{setConf:_t,draw:t(function(e,n,r,p){let m=D().gantt;p.db.setDiagramId(n);let y=D().securityLevel,b;y===`sandbox`&&(b=l(`#i`+n));let x=l(y===`sandbox`?b.nodes()[0].contentDocument.body:`body`),S=y===`sandbox`?b.nodes()[0].contentDocument:document,w=S.getElementById(n);$=w.parentElement.offsetWidth,$===void 0&&($=1200),m.useWidth!==void 0&&($=m.useWidth);let O=p.db.getTasks(),k=O.filter(e=>!e.vert),A=[];for(let e of k)A.push(e.type);A=se(A);let j={},M=2*m.topPadding;if(p.db.getDisplayMode()===`compact`||m.displayMode===`compact`){let e={};for(let t of k)e[t.section]===void 0?e[t.section]=[t]:e[t.section].push(t);let t=0;for(let n of Object.keys(e)){let r=yt(e[n],t)+1;t+=r,M+=r*(m.barHeight+m.barGap),j[n]=r}}else{M+=k.length*(m.barHeight+m.barGap);for(let e of A)j[e]=k.filter(t=>t.type===e).length}w.setAttribute(`viewBox`,`0 0 `+$+` `+M);let N=x.select(`[id="${n}"]`),P=v().domain([f(O,function(e){return e.startTime}),a(O,function(e){return e.endTime})]).rangeRound([0,$-m.leftPadding-m.rightPadding]);function ne(e,t){let n=e.startTime,r=t.startTime,i=0;return n>r?i=1:ne.vert===t.vert?0:e.vert?1:-1);let c=e.filter(e=>!e.vert),u=[...new Set(c.map(e=>e.order))].map(e=>c.find(t=>t.order===e));N.append(`g`).selectAll(`rect`).data(u).enter().append(`rect`).attr(`x`,0).attr(`y`,function(e,n){return n=e.order,n*t+r-2}).attr(`width`,function(){return s-m.rightPadding/2}).attr(`height`,t).attr(`class`,function(e){for(let[t,n]of A.entries())if(e.type===n)return`section section`+t%m.numberSectionStyles;return`section section0`}).enter();let d=N.append(`g`).selectAll(`rect`).data(e).enter(),f=p.db.getLinks();if(d.append(`rect`).attr(`id`,function(e){return n+`-`+e.id}).attr(`rx`,3).attr(`ry`,3).attr(`x`,function(e){return e.milestone?P(e.startTime)+i+.5*(P(e.endTime)-P(e.startTime))-.5*a:P(e.startTime)+i}).attr(`y`,function(e,n){return n=e.order,e.vert?m.gridLineStartPadding:n*t+r}).attr(`width`,function(e){return e.milestone?a:e.vert?.08*a:P(e.renderEndTime||e.endTime)-P(e.startTime)}).attr(`height`,function(e){return e.vert?c.length*(m.barHeight+m.barGap)+m.barHeight*2:a}).attr(`transform-origin`,function(e,n){return n=e.order,(P(e.startTime)+i+.5*(P(e.endTime)-P(e.startTime))).toString()+`px `+(n*t+r+.5*a).toString()+`px`}).attr(`class`,function(e){let t=``;e.classes.length>0&&(t=e.classes.join(` `));let n=0;for(let[t,r]of A.entries())e.type===r&&(n=t%m.numberSectionStyles);let r=``;return e.active?e.crit?r+=` activeCrit`:r=` active`:e.done?r=e.crit?` doneCrit`:` done`:e.crit&&(r+=` crit`),r.length===0&&(r=` task`),e.milestone&&(r=` milestone `+r),e.vert&&(r=` vert `+r),r+=n,r+=` `+t,`task`+r}),d.append(`text`).attr(`id`,function(e){return n+`-`+e.id+`-text`}).text(function(e){return e.task}).attr(`font-size`,m.fontSize).attr(`x`,function(e){let t=P(e.startTime),n=P(e.renderEndTime||e.endTime);if(e.milestone&&(t+=.5*(P(e.endTime)-P(e.startTime))-.5*a,n=t+a),e.vert)return P(e.startTime)+i;let r=this.getBBox().width;return r>n-t?n+r+1.5*m.leftPadding>s?t+i-5:n+i+5:(n-t)/2+t+i}).attr(`y`,function(e,n){return e.vert?m.gridLineStartPadding+c.length*(m.barHeight+m.barGap)+60:(n=e.order,n*t+m.barHeight/2+(m.fontSize/2-2)+r)}).attr(`text-height`,a).attr(`class`,function(e){let t=P(e.startTime),n=P(e.endTime);e.milestone&&(n=t+a);let r=this.getBBox().width,i=``;e.classes.length>0&&(i=e.classes.join(` `));let o=0;for(let[t,n]of A.entries())e.type===n&&(o=t%m.numberSectionStyles);let c=``;return e.active&&(c=e.crit?`activeCritText`+o:`activeText`+o),e.done?c=e.crit?c+` doneCritText`+o:c+` doneText`+o:e.crit&&(c=c+` critText`+o),e.milestone&&(c+=` milestoneText`),e.vert&&(c+=` vertText`),r>n-t?n+r+1.5*m.leftPadding>s?i+` taskTextOutsideLeft taskTextOutside`+o+` `+c:i+` taskTextOutsideRight taskTextOutside`+o+` `+c+` width-`+r:i+` taskText taskText`+o+` `+c+` width-`+r}),D().securityLevel===`sandbox`){let e;e=l(`#i`+n);let t=e.nodes()[0].contentDocument;d.filter(function(e){return f.has(e.id)}).each(function(e){var r=t.querySelector(`#`+CSS.escape(n+`-`+e.id)),i=t.querySelector(`#`+CSS.escape(n+`-`+e.id+`-text`));let a=r.parentNode;var o=t.createElement(`a`);o.setAttribute(`xlink:href`,f.get(e.id)),o.setAttribute(`target`,`_top`),a.appendChild(o),o.appendChild(r),o.appendChild(i)})}}t(ie,`drawRects`);function ae(e,t,r,i,a,o,s,c){if(s.length===0&&c.length===0)return;let l,u;for(let{startTime:e,endTime:t}of o)(l===void 0||eu)&&(u=t);if(!l||!u)return;if((0,Q.default)(u).diff((0,Q.default)(l),`year`)>5){g.warn(`The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.`);return}let d=p.db.getDateFormat(),f=[],h=null,_=(0,Q.default)(l);for(;_.valueOf()<=u;)p.db.isInvalidDate(_,d,s,c)?h?h.end=_:h={start:_,end:_}:h&&=(f.push(h),null),_=_.add(1,`d`);N.append(`g`).selectAll(`rect`).data(f).enter().append(`rect`).attr(`id`,e=>n+`-exclude-`+e.start.format(`YYYY-MM-DD`)).attr(`x`,e=>P(e.start.startOf(`day`))+r).attr(`y`,m.gridLineStartPadding).attr(`width`,e=>P(e.end.endOf(`day`))-P(e.start.startOf(`day`))).attr(`height`,a-t-m.gridLineStartPadding).attr(`transform-origin`,function(t,n){return(P(t.start)+r+.5*(P(t.end)-P(t.start))).toString()+`px `+(n*e+.5*a).toString()+`px`}).attr(`class`,`exclude-range`)}t(ae,`drawExcludeDays`);function F(e,t,n,r){if(n<=0||e>t)return 1/0;let i=t-e,a=Q.default.duration({[r??`day`]:n}).asMilliseconds();return a<=0?1/0:Math.ceil(i/a)}t(F,`getEstimatedTickCount`);function oe(e,t,n,r){let a=p.db.getDateFormat(),l=p.db.getAxisFormat(),f;f=l||(a===`D`?`%d`:m.axisFormat??`%Y-%m-%d`);let h=T(P).tickSize(-r+t+m.gridLineStartPadding).tickFormat(_(f)),v=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(p.db.getTickInterval()||m.tickInterval);if(v!==null){let e=parseInt(v[1],10);if(isNaN(e)||e<=0)g.warn(`Invalid tick interval value: "${v[1]}". Skipping custom tick interval.`);else{let t=v[2],n=p.db.getWeekday()||m.weekday,r=P.domain(),a=r[0],l=r[1],f=F(a,l,e,t);if(f>bt)g.warn(`The tick interval "${e}${t}" would generate ${f} ticks, which exceeds the maximum allowed (${bt}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(t){case`millisecond`:h.ticks(i.every(e));break;case`second`:h.ticks(o.every(e));break;case`minute`:h.ticks(d.every(e));break;case`hour`:h.ticks(s.every(e));break;case`day`:h.ticks(c.every(e));break;case`week`:h.ticks(vt[n].every(e));break;case`month`:h.ticks(u.every(e))}}}if(N.append(`g`).attr(`class`,`grid`).attr(`transform`,`translate(`+e+`, `+(r-50)+`)`).call(h).selectAll(`text`).style(`text-anchor`,`middle`).attr(`fill`,`#000`).attr(`stroke`,`none`).attr(`font-size`,10).attr(`dy`,`1em`),p.db.topAxisEnabled()||m.topAxis){let n=C(P).tickSize(-r+t+m.gridLineStartPadding).tickFormat(_(f));if(v!==null){let e=parseInt(v[1],10);if(isNaN(e)||e<=0)g.warn(`Invalid tick interval value: "${v[1]}". Skipping custom tick interval.`);else{let t=v[2],r=p.db.getWeekday()||m.weekday,a=P.domain(),l=a[0],f=a[1];if(F(l,f,e,t)<=bt)switch(t){case`millisecond`:n.ticks(i.every(e));break;case`second`:n.ticks(o.every(e));break;case`minute`:n.ticks(d.every(e));break;case`hour`:n.ticks(s.every(e));break;case`day`:n.ticks(c.every(e));break;case`week`:n.ticks(vt[r].every(e));break;case`month`:n.ticks(u.every(e))}}}N.append(`g`).attr(`class`,`grid`).attr(`transform`,`translate(`+e+`, `+t+`)`).call(n).selectAll(`text`).style(`text-anchor`,`middle`).attr(`fill`,`#000`).attr(`stroke`,`none`).attr(`font-size`,10)}}t(oe,`makeGrid`);function I(e,t){let n=0,r=Object.keys(j).map(e=>[e,j[e]]);N.append(`g`).selectAll(`text`).data(r).enter().append(function(e){let t=e[0].split(ee.lineBreakRegex),n=-(t.length-1)/2,r=S.createElementNS(`http://www.w3.org/2000/svg`,`text`);r.setAttribute(`dy`,n+`em`);for(let[e,n]of t.entries()){let t=S.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);t.setAttribute(`alignment-baseline`,`central`),t.setAttribute(`x`,`10`),e>0&&t.setAttribute(`dy`,`1em`),t.textContent=n,r.appendChild(t)}return r}).attr(`x`,10).attr(`y`,function(i,a){if(a>0)for(let o=0;o` + .mermaid-main-font { + font-family: ${e.fontFamily}; + } + + .exclude-range { + fill: ${e.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${e.sectionBkgColor}; + } + + .section2 { + fill: ${e.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${e.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${e.titleColor}; + } + + .sectionTitle1 { + fill: ${e.titleColor}; + } + + .sectionTitle2 { + fill: ${e.titleColor}; + } + + .sectionTitle3 { + fill: ${e.titleColor}; + } + + .sectionTitle { + text-anchor: start; + font-family: ${e.fontFamily}; + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${e.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + } + + .grid .tick text { + font-family: ${e.fontFamily}; + fill: ${e.textColor}; + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${e.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: ${e.fontFamily}; + } + + .taskTextOutsideRight { + fill: ${e.taskTextDarkColor}; + text-anchor: start; + font-family: ${e.fontFamily}; + } + + .taskTextOutsideLeft { + fill: ${e.taskTextDarkColor}; + text-anchor: end; + } + + + /* Special case clickable */ + + .task.clickable { + cursor: pointer; + } + + .taskText.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${e.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${e.taskBkgColor}; + stroke: ${e.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${e.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${e.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${e.activeTaskBkgColor}; + stroke: ${e.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${e.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${e.doneTaskBorderColor}; + fill: ${e.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${e.taskTextDarkColor} !important; + } + + /* Done task text displayed outside the bar sits against the diagram background, + not against the done-task bar, so it must use the outside/contrast color. */ + .doneText0.taskTextOutsideLeft, + .doneText0.taskTextOutsideRight, + .doneText1.taskTextOutsideLeft, + .doneText1.taskTextOutsideRight, + .doneText2.taskTextOutsideLeft, + .doneText2.taskTextOutsideRight, + .doneText3.taskTextOutsideLeft, + .doneText3.taskTextOutsideRight { + fill: ${e.taskTextOutsideColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${e.critBorderColor}; + fill: ${e.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${e.critBorderColor}; + fill: ${e.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${e.critBorderColor}; + fill: ${e.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${e.taskTextDarkColor} !important; + } + + /* Done-crit task text outside the bar \u2014 same reasoning as doneText above. */ + .doneCritText0.taskTextOutsideLeft, + .doneCritText0.taskTextOutsideRight, + .doneCritText1.taskTextOutsideLeft, + .doneCritText1.taskTextOutsideRight, + .doneCritText2.taskTextOutsideLeft, + .doneCritText2.taskTextOutsideRight, + .doneCritText3.taskTextOutsideLeft, + .doneCritText3.taskTextOutsideRight { + fill: ${e.taskTextOutsideColor} !important; + } + + .vert { + stroke: ${e.vertLineColor}; + } + + .vertText { + font-size: 15px; + text-anchor: middle; + fill: ${e.vertLineColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${e.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.titleColor||e.textColor}; + font-family: ${e.fontFamily}; + } +`,`getStyles`)};export{xt as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/generated-faces-CY3T5qTs.jpeg b/lecture-01/assets/generated-faces-CY3T5qTs.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..bd13174987a7524a1f068c925fde6c5bd81e7727 Binary files /dev/null and b/lecture-01/assets/generated-faces-CY3T5qTs.jpeg differ diff --git a/lecture-01/assets/gitGraph-TEB2WS4Q-EIY3NVGF-B7z_rRcc.js b/lecture-01/assets/gitGraph-TEB2WS4Q-EIY3NVGF-B7z_rRcc.js new file mode 100644 index 0000000000000000000000000000000000000000..debb11d907952feee491c75f3aaa63e848f1c914 --- /dev/null +++ b/lecture-01/assets/gitGraph-TEB2WS4Q-EIY3NVGF-B7z_rRcc.js @@ -0,0 +1 @@ +import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as e}from"./chunk-IIWGMRJM-k15frrBU.js";export{e as createGitGraphServices}; \ No newline at end of file diff --git a/lecture-01/assets/gitGraphDiagram-RSE3GARS-ZBBB21eU.js b/lecture-01/assets/gitGraphDiagram-RSE3GARS-ZBBB21eU.js new file mode 100644 index 0000000000000000000000000000000000000000..0a31f9536234fa3bdb373f34bd7d1876add9f7ef --- /dev/null +++ b/lecture-01/assets/gitGraphDiagram-RSE3GARS-ZBBB21eU.js @@ -0,0 +1,106 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as t,T as n}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as r,E as i,J as a,Q as o,S as s,Y as c,b as l,c as u,m as d,o as f,tt as p,x as m}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{g as h,i as g,v as _}from"./chunk-OX6ZKUVE-roiHi12N.js";import{t as v}from"./chunk-6ZKBGPIT-B4RTUexp.js";import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as y}from"./chunk-BQKPLVCE-CH-bQZj9.js";import"./chunk-NYCIP5HP-BZs_nZUU.js";import"./chunk-6QIBY7DQ-xR0SR3RB.js";import"./chunk-SLCUJWJ3-Bzf1BoPP.js";import"./chunk-43ACQNTO-CVHKukau.js";import"./chunk-FXRKSSP6-BDxrggHz.js";import"./chunk-RRYK4PFG-DZMcopsb.js";import"./chunk-IT6C5QXO-BI6Sf-cR.js";import"./chunk-GMJQP6DO-gEw8rKqu.js";import"./chunk-ODPFZSHR-BUzFQ4Zq.js";import"./chunk-6OZ7KPF7-CpRlDBGl.js";import"./chunk-LJTN6OYE-BTsXVLFU.js";import"./chunk-Z6Q54H3S-B8XyqzVF.js";import"./chunk-4KMQCWFH-ClzK3uec.js";import"./chunk-S7Q6ZHN2-CSIi0_Nw.js";import"./chunk-IIWGMRJM-k15frrBU.js";import{t as b}from"./chunk-IALYP65X-Bv3ioVcB.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=d.gitGraph,S=e(()=>g({...ee,...s().gitGraph}),`getConfig`),C=new b(()=>{let e=S(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function w(){return h({length:7})}e(w,`getID`);function T(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}e(T,`uniqBy`);var te=e(function(e){C.records.direction=e},`setDirection`),ne=e(function(e){n.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{C.records.options=JSON.parse(e)}catch(e){n.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),re=e(function(){return C.records.options},`getOptions`),ie=e(function(e){let t=e.msg,r=e.id,i=e.type,a=e.tags;n.info(`commit`,t,r,i,a),n.debug(`Entering commit:`,t,r,i,a);let o=S();r=u.sanitizeText(r,o),t=u.sanitizeText(t,o),a=a?.map(e=>u.sanitizeText(e,o));let s={id:r||C.records.seq+`-`+w(),message:t,seq:C.records.seq++,type:i??x.NORMAL,tags:a??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};C.records.head=s,n.info(`main branch`,o.mainBranchName),C.records.commits.has(s.id)&&n.warn(`Commit ID ${s.id} already exists`),C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),n.debug(`in pushCommit `+s.id)},`commit`),ae=e(function(e){let t=e.name,r=e.order;if(t=u.sanitizeText(t,S()),C.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);C.records.branches.set(t,C.records.head==null?null:C.records.head.id),C.records.branchConfig.set(t,{name:t,order:r}),E(t),n.debug(`in createBranch`)},`branch`),oe=e(e=>{let t=e.branch,r=e.id,i=e.type,a=e.tags,o=S();t=u.sanitizeText(t,o),r&&=u.sanitizeText(r,o);let s=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(t),l=s?C.records.commits.get(s):void 0,d=c?C.records.commits.get(c):void 0;if(l&&d&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(C.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!C.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(d===void 0||!d){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===d){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(r&&C.records.commits.has(r)){let e=Error(`Incorrect usage of "merge". Commit with id:`+r+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${r} ${i} ${a?.join(` `)}`,token:`merge ${t} ${r} ${i} ${a?.join(` `)}`,expected:[`merge ${t} ${r}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:r||`${C.records.seq}-${w()}`,message:`merged branch ${t} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,f],branch:C.records.currBranch,type:x.MERGE,customType:i,customId:!!r,tags:a??[]};C.records.head=p,C.records.commits.set(p.id,p),C.records.branches.set(C.records.currBranch,p.id),n.debug(C.records.branches),n.debug(`in mergeBranch`)},`merge`),se=e(function(e){let t=e.id,r=e.targetId,i=e.tags,a=e.parent;n.debug(`Entering cherryPick:`,t,r,i);let o=S();if(t=u.sanitizeText(t,o),r=u.sanitizeText(r,o),i=i?.map(e=>u.sanitizeText(e,o)),a=u.sanitizeText(a,o),!t||!C.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let s=C.records.commits.get(t);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===x.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!r||!C.records.commits.has(r)){if(c===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let e=C.records.branches.get(C.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let o=C.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let l={id:C.records.seq+`-`+w(),message:`cherry-picked ${s?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,s.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===x.MERGE?`|parent:${a}`:``}`]};C.records.head=l,C.records.commits.set(l.id,l),C.records.branches.set(C.records.currBranch,l.id),n.debug(C.records.branches),n.debug(`in cherryPick`)}},`cherryPick`),E=e(function(e){if(e=u.sanitizeText(e,S()),C.records.branches.has(e)){C.records.currBranch=e;let t=C.records.branches.get(C.records.currBranch);t===void 0||!t?C.records.head=null:C.records.head=C.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function D(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}e(D,`upsert`);function O(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),r=``;e.forEach(function(e){r+=e===t?` *`:` |`});let i=[r,t.id,t.seq];for(let e in C.records.branches)C.records.branches.get(e)===t.id&&i.push(e);if(n.debug(i.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=C.records.commits.get(t.parents[0]);D(e,t,n),t.parents[1]&&e.push(C.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=C.records.commits.get(t.parents[0]);D(e,t,n)}e=T(e,e=>e.id),O(e)}e(O,`prettyPrintCommitHistory`);var ce=e(function(){n.debug(C.records.commits);let e=k()[0];O([e])},`prettyPrint`),le=e(function(){C.reset(),f()},`clear`),ue=e(function(){return[...C.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),de=e(function(){return C.records.branches},`getBranches`),fe=e(function(){return C.records.commits},`getCommits`),k=e(function(){let e=[...C.records.commits.values()];return e.forEach(function(e){n.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),A={commitType:x,getConfig:S,setDirection:te,setOptions:ne,getOptions:re,commit:ie,branch:ae,merge:oe,cherryPick:se,checkout:E,prettyPrint:ce,clear:le,getBranchesAsObjArray:ue,getBranches:de,getCommits:fe,getCommitsArray:k,getCurrentBranch:e(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:e(function(){return C.records.direction},`getDirection`),getHead:e(function(){return C.records.head},`getHead`),setAccTitle:c,getAccTitle:m,getAccDescription:l,setAccDescription:a,setDiagramTitle:o,getDiagramTitle:i},pe=e((e,t)=>{v(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=e((t,r)=>{let i={Commit:e(e=>r.commit(he(e)),`Commit`),Branch:e(e=>r.branch(ge(e)),`Branch`),Merge:e(e=>r.merge(_e(e)),`Merge`),Checkout:e(e=>r.checkout(ve(e)),`Checkout`),CherryPicking:e(e=>r.cherryPick(ye(e)),`CherryPicking`)}[t.$type];i?i(t):n.error(`Unknown statement type: ${t.$type}`)},`parseStatement`),he=e(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=e(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=e(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=e(e=>e.branch,`parseCheckout`),ye=e(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:e(async e=>{let t=await y(`gitGraph`,e);n.debug(t),pe(t,A)},`parse`)},j=10,M=40,N=4,P=2,F=8,I=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),L=12,R=new Set([`redux-color`,`redux-dark-color`]),xe=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),z=e((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),B=new Map,V=new Map,H=30,U=new Map,W=[],G=0,K=`LR`,q=e(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),J=e(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),Y=e(t=>{let n,r,i;return K===`BT`?(r=e((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=e((e,t)=>e>=t,`comparisonFunc`),i=0),t.forEach(e=>{let t=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;t!==void 0&&r(t,i)&&(n=e,i=t)}),n},`findClosestParent`),Se=e(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=V.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),Ce=e((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=Te(n),i=Math.max(r,i)):a.push(n),Ee(n,r)}),r=i,a.forEach(e=>{De(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Se(n.parents);r=V.get(e).y-M,r<=i&&(i=r);let t=B.get(n.branch).pos,a=r-j;V.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),we=e(e=>{let t=Y(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=V.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),Te=e(e=>we(e)+M,`calculateCommitPosition`),Ee=e((e,t)=>{let n=B.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+j;return V.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),De=e((e,t,n)=>{let r=B.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;V.set(e.id,{x:a,y:i})},`setRootPosition`),Oe=e((e,t,n,i,a,o)=>{let{theme:s}=r(),c=I.has(s??``),l=R.has(s??``),u=xe.has(s??``);if(o===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(c?3:0)).attr(`y`,n.y-10+(c?3:0)).attr(`width`,c?14:20).attr(`height`,c?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(a,F,l)} ${i}-outer`),e.append(`rect`).attr(`x`,n.x-6+(c?2:0)).attr(`y`,n.y-6+(c?2:0)).attr(`width`,c?8:12).attr(`height`,c?8:12).attr(`class`,`commit ${t.id} commit${z(a,F,l)} ${i}-inner`);else if(o===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,c?7:10).attr(`class`,`commit ${t.id} ${i}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,c?2.5:2.75).attr(`fill`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${i}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,c?2.5:2.75).attr(`fill`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${i}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${i}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${i}`);else{let r=e.append(`circle`);if(r.attr(`cx`,n.x),r.attr(`cy`,n.y),r.attr(`r`,c?7:10),r.attr(`class`,`commit ${t.id} commit${z(a,F,l)}`),o===x.MERGE){let r=e.append(`circle`);r.attr(`cx`,n.x),r.attr(`cy`,n.y),r.attr(`r`,c?5:6),r.attr(`class`,`commit ${i} ${t.id} commit${z(a,F,l)}`)}if(o===x.REVERSE){let r=e.append(`path`),o=c?4:5;r.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${i} ${t.id} commit${z(a,F,l)}`)}}},`drawCommitBullet`),ke=e((e,t,n,r,i)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-P).attr(`y`,n.y+13.5).attr(`width`,c.width+2*P).attr(`height`,c.height+2*P),K===`TB`||K===`BT`?(o.attr(`x`,n.x-(c.width+4*N+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*N)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel)){if(K===`TB`||K===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}}},`drawCommitLabel`),Ae=e((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,` + ${r-a/2-N/2},${l+P} + ${r-a/2-N/2},${l-P} + ${n.posWithOffset-a/2-N},${l-s-P} + ${n.posWithOffset+a/2+N},${l-s-P} + ${n.posWithOffset+a/2+N},${l+s+P} + ${n.posWithOffset-a/2-N},${l+s+P}`),t.attr(`cy`,l).attr(`cx`,r-a/2+N/2).attr(`r`,1.5).attr(`class`,`tag-hole`),K===`TB`||K===`BT`){let o=r+c;i.attr(`class`,`tag-label-bkg`).attr(`points`,` + ${n.x},${o+2} + ${n.x},${o-2} + ${n.x+j},${o-s-2} + ${n.x+j+a+4},${o-s-2} + ${n.x+j+a+4},${o+s+2} + ${n.x+j},${o+s+2}`).attr(`transform`,`translate(12,12) rotate(45, `+n.x+`,`+r+`)`),t.attr(`cx`,n.x+N/2).attr(`cy`,o).attr(`transform`,`translate(12,12) rotate(45, `+n.x+`,`+r+`)`),e.attr(`x`,n.x+5).attr(`y`,o+3).attr(`transform`,`translate(14,14) rotate(45, `+n.x+`,`+r+`)`)}}}},`drawCommitTags`),je=e(e=>{switch(e.customType??e.type){case x.NORMAL:return`commit-normal`;case x.REVERSE:return`commit-reverse`;case x.HIGHLIGHT:return`commit-highlight`;case x.MERGE:return`commit-merge`;case x.CHERRY_PICK:return`commit-cherry-pick`;default:return`commit-normal`}},`getCommitClassType`),Me=e((e,t,n,r)=>{let i={x:0,y:0};if(e.parents.length>0){let n=Y(e.parents);if(n){let a=r.get(n)??i;return t===`TB`?a.y+M:t===`BT`?(r.get(e.id)??i).y-M:a.x+M}}else if(t===`TB`)return H;else if(t===`BT`)return(r.get(e.id)??i).y-M;else return 0;return 0},`calculatePosition`),Ne=e((e,t,n)=>{let i=K===`BT`&&n?t:t+j,a=B.get(e.branch)?.pos,o=K===`TB`||K===`BT`?B.get(e.branch)?.pos:i;if(o===void 0||a===void 0)throw Error(`Position were undefined for commit ${e.id}`);let s=I.has(r().theme??``);return{x:o,y:K===`TB`||K===`BT`?i:a+(s?L/2+1:-2),posWithOffset:i}},`getCommitPosition`),X=e((t,n,r,i)=>{let a=t.append(`g`).attr(`class`,`commit-bullets`),o=t.append(`g`).attr(`class`,`commit-labels`),s=K===`TB`||K===`BT`?H:0,c=[...n.keys()],l=i.parallelCommits??!1,u=e((e,t)=>{let r=n.get(e)?.seq,i=n.get(t)?.seq;return r!==void 0&&i!==void 0?r-i:0},`sortKeys`),d=c.sort(u);K===`BT`&&(l&&Ce(d,n,s),d=d.reverse()),d.forEach(e=>{let t=n.get(e);if(!t)throw Error(`Commit not found for key ${e}`);l&&(s=Me(t,K,s,V));let c=Ne(t,s,l);if(r){let e=je(t),n=t.customType??t.type,r=B.get(t.branch)?.index??0;Oe(a,t,c,e,r,n),ke(o,t,c,s,i),Ae(o,t,c,s)}K===`TB`||K===`BT`?V.set(t.id,{x:c.x,y:c.posWithOffset}):V.set(t.id,{x:c.posWithOffset,y:c.y}),s=K===`BT`&&l?s+M:s+M+j,s>G&&(G=s)})},`drawCommits`),Pe=e((t,n,r,i,a)=>{let o=(K===`TB`||K===`BT`?r.xe.branch===o,`isOnBranchToGetCurve`),c=e(e=>e.seq>t.seq&&e.seqc(e)&&s(e))},`shouldRerouteArrow`),Z=e((e,t,n=0)=>{let r=e+Math.abs(e-t)/2;return n>5?r:W.every(e=>Math.abs(e-r)>=10)?(W.push(r),r):Z(e,t-Math.abs(e-t)/5,n+1)},`findLane`),Fe=e((e,t,n,i)=>{let{theme:a}=r(),o=R.has(a??``),s=V.get(t.id),c=V.get(n.id);if(s===void 0||c===void 0)throw Error(`Commit positions not found for commits ${t.id} and ${n.id}`);let l=Pe(t,n,s,c,i),u=``,d=``,f=0,p=0,m=B.get(n.branch)?.index;n.type===x.MERGE&&t.id!==n.parents[0]&&(m=B.get(t.branch)?.index);let h;if(l){u=`A 10 10, 0, 0, 0,`,d=`A 10 10, 0, 0, 1,`,f=10,p=10;let e=s.yc.x&&(u=`A 20 20, 0, 0, 0,`,d=`A 20 20, 0, 0, 1,`,f=20,p=20,h=n.type===x.MERGE&&t.id!==n.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${c.y-f} ${d} ${s.x-p} ${c.y} L ${c.x} ${c.y}`:`M ${s.x} ${s.y} L ${c.x+f} ${s.y} ${u} ${c.x} ${s.y+p} L ${c.x} ${c.y}`),s.x===c.x&&(h=`M ${s.x} ${s.y} L ${c.x} ${c.y}`)):K===`BT`?(s.xc.x&&(u=`A 20 20, 0, 0, 0,`,d=`A 20 20, 0, 0, 1,`,f=20,p=20,h=n.type===x.MERGE&&t.id!==n.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${c.y+f} ${u} ${s.x-p} ${c.y} L ${c.x} ${c.y}`:`M ${s.x} ${s.y} L ${c.x+f} ${s.y} ${d} ${c.x} ${s.y-p} L ${c.x} ${c.y}`),s.x===c.x&&(h=`M ${s.x} ${s.y} L ${c.x} ${c.y}`)):(s.yc.y&&(h=n.type===x.MERGE&&t.id!==n.parents[0]?`M ${s.x} ${s.y} L ${c.x-f} ${s.y} ${u} ${c.x} ${s.y-p} L ${c.x} ${c.y}`:`M ${s.x} ${s.y} L ${s.x} ${c.y+f} ${d} ${s.x+p} ${c.y} L ${c.x} ${c.y}`),s.y===c.y&&(h=`M ${s.x} ${s.y} L ${c.x} ${c.y}`));if(h===void 0)throw Error(`Line definition not found`);e.append(`path`).attr(`d`,h).attr(`class`,`arrow arrow`+z(m,F,o))},`drawArrow`),Ie=e((e,t)=>{let n=e.append(`g`).attr(`class`,`commit-arrows`);[...t.keys()].forEach(e=>{let r=t.get(e);r.parents&&r.parents.length>0&&r.parents.forEach(e=>{Fe(n,t.get(e),r,t)})})},`drawArrows`),Le=e((e,t,n,i)=>{let{look:a,theme:o,themeVariables:s}=r(),{dropShadow:c,THEME_COLOR_LIMIT:l}=s,u=I.has(o??``),d=R.has(o??``),f=e.append(`g`);t.forEach((e,t)=>{let r=z(t,u?l:F,d),o=B.get(e.name)?.pos;if(o===void 0)throw Error(`Position not found for branch ${e.name}`);let s=K===`TB`||K===`BT`?o:u?o+L/2+1:o-2,p=f.append(`line`);p.attr(`x1`,0),p.attr(`y1`,s),p.attr(`x2`,G),p.attr(`y2`,s),p.attr(`class`,`branch branch`+r),K===`TB`?(p.attr(`y1`,H),p.attr(`x1`,o),p.attr(`y2`,G),p.attr(`x2`,o)):K===`BT`&&(p.attr(`y1`,G),p.attr(`x1`,o),p.attr(`y2`,H),p.attr(`x2`,o)),W.push(s);let m=e.name,h=J(m),g=f.insert(`rect`),_=f.insert(`g`).attr(`class`,`branchLabel`).insert(`g`).attr(`class`,`label branch-label`+r);_.node().appendChild(h);let v=h.getBBox(),y=u?0:4,b=u?16:0,x=u?L:0;a===`neo`&&g.attr(`data-look`,`neo`),g.attr(`class`,`branchLabelBkg label`+r).attr(`style`,a===`neo`?`filter:${u?`url(#${i}-drop-shadow)`:c}`:``).attr(`rx`,y).attr(`ry`,y).attr(`x`,-v.width-4-(n.rotateCommitLabel===!0?30:0)).attr(`y`,-v.height/2+10).attr(`width`,v.width+18+b).attr(`height`,v.height+4+x),_.attr(`transform`,`translate(`+(-v.width-14-(n.rotateCommitLabel===!0?30:0)+b/2)+`, `+(s-v.height/2-2)+`)`),K===`TB`?(g.attr(`x`,o-v.width/2-10).attr(`y`,0),_.attr(`transform`,`translate(`+(o-v.width/2-5)+`, 0)`),u&&(g.attr(`transform`,`translate(${-b/2-3}, ${-x-10})`),_.attr(`transform`,`translate(`+(o-v.width/2-5)+`, `+(-x*2+7)+`)`))):K===`BT`?(g.attr(`x`,o-v.width/2-10).attr(`y`,G),_.attr(`transform`,`translate(`+(o-v.width/2-5)+`, `+G+`)`),u&&(g.attr(`transform`,`translate(${-b/2-3}, ${x+10})`),_.attr(`transform`,`translate(`+(o-v.width/2-5)+`, `+(G+x*2+4)+`)`))):g.attr(`transform`,`translate(-19, `+(s-12-x/2)+`)`)})},`drawBranches`),Re=e(function(e,t,n,r,i){return B.set(e,{pos:t,index:n}),t+=50+(i?40:0)+(K===`TB`||K===`BT`?r.width/2:0),t},`setBranchPosition`),ze={draw:e(function(e,i,a,o){q(),n.debug(`in gitgraph renderer`,e+` +`,`id:`,i,a);let s=o.db;if(!s.getConfig){n.error(`getConfig method is not available on db`);return}let c=s.getConfig(),l=c.rotateCommitLabel??!1;U=s.getCommits();let u=s.getBranchesAsObjArray();K=s.getDirection();let d=t(`[id="${i}"]`),{look:f,theme:m,themeVariables:h}=r(),{useGradient:g,gradientStart:v,gradientStop:y,filterColor:b}=h;if(g){let e=d.append(`defs`).append(`linearGradient`).attr(`id`,i+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,v).attr(`stop-opacity`,1),e.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,y).attr(`stop-opacity`,1)}f===`neo`&&I.has(m??``)&&d.append(`defs`).append(`filter`).attr(`id`,i+`-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,b);let x=0;u.forEach((e,t)=>{let n=J(e.name),r=d.append(`g`),i=r.insert(`g`).attr(`class`,`branchLabel`),a=i.insert(`g`).attr(`class`,`label branch-label`);a.node()?.appendChild(n);let o=n.getBBox();x=Re(e.name,x,t,o,l),a.remove(),i.remove(),r.remove()}),X(d,U,!1,c),c.showBranches&&Le(d,u,c,i),Ie(d,U),X(d,U,!0,c),_.insertTitle(d,`gitTitleText`,c.titleTopMargin??0,s.getDiagramTitle()),p(void 0,d,c.diagramPadding,c.useMaxWidth)},`draw`)},Q=8,$=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),Be=new Set([`redux-color`,`redux-dark-color`]),Ve=new Set([`neo`,`neo-dark`]),He=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),Ue=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`,`neo`,`neo-dark`]),We=e(e=>{let{svgId:t}=e,n=``;if(e.useGradient&&t)for(let r=0;r{let{theme:t,themeVariables:n}=s(),{borderColorArray:r}=n,i=$.has(t);if(Ve.has(t)){let t=``;for(let n=0;n`${Array.from({length:e.THEME_COLOR_LIMIT},(e,t)=>t).map(t=>{let n=t%Q;return` + .branch-label${t} { fill: ${e[`gitBranchLabel`+n]}; } + .commit${t} { stroke: ${e[`git`+n]}; fill: ${e[`git`+n]}; } + .commit-highlight${t} { stroke: ${e[`gitInv`+n]}; fill: ${e[`gitInv`+n]}; } + .label${t} { fill: ${e[`git`+n]}; } + .arrow${t} { stroke: ${e[`git`+n]}; } + `}).join(` +`)}`,`normalTheme`),qe={parser:be,db:A,renderer:ze,styles:e(e=>{let{theme:t}=s(),n=Ue.has(t);return` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + + ${n?Ge(e):Ke(e)} + + .branch { + stroke-width: ${e.strokeWidth}; + stroke: ${e.commitLineColor??e.lineColor}; + stroke-dasharray: ${n?`4 2`:`2`}; + } + .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${n?e.nodeBorder:e.commitLabelColor}; ${n?`font-weight:${e.noteFontWeight};`:``}} + .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${n?`transparent`:e.commitLabelBackground}; opacity: ${n?``:.5}; } + .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};} + .tag-label-bkg { fill: ${n?e.mainBkg:e.tagLabelBackground}; stroke: ${n?e.nodeBorder:e.tagLabelBorder}; ${n?`filter:${e.dropShadow}`:``} } + .tag-hole { fill: ${e.textColor}; } + + .commit-merge { + stroke: ${n?e.mainBkg:e.primaryColor}; + fill: ${n?e.mainBkg:e.primaryColor}; + } + .commit-reverse { + stroke: ${n?e.mainBkg:e.primaryColor}; + fill: ${n?e.mainBkg:e.primaryColor}; + stroke-width: ${n?e.strokeWidth:3}; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${n?e.mainBkg:e.primaryColor}; + fill: ${n?e.mainBkg:e.primaryColor}; + } + + .arrow { + /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */ + stroke-width: ${$.has(t)?e.strokeWidth:8}; + stroke-linecap: round; + fill: none + } + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } +`},`getStyles`)};export{qe as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/home-globe-Ca_kMWE9.jpeg b/lecture-01/assets/home-globe-Ca_kMWE9.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..7d98ef0e446e1e182105716f7b044406bc6ecd41 --- /dev/null +++ b/lecture-01/assets/home-globe-Ca_kMWE9.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e68da5c4cc194f2ad51eab9a61faff0f8e67dff6580ceaf991a5a127e183f0be +size 132680 diff --git a/lecture-01/assets/home-train-DMUMiSnz.jpeg b/lecture-01/assets/home-train-DMUMiSnz.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..548b832526adfadb4660192f65196871a7eb1137 --- /dev/null +++ b/lecture-01/assets/home-train-DMUMiSnz.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:902ea1a0e52ed10f050f046fb1d2599cc3e9ed3c3784cad53d7f395dc3e34353 +size 192767 diff --git a/lecture-01/assets/index-DCPWAYn_.css b/lecture-01/assets/index-DCPWAYn_.css new file mode 100644 index 0000000000000000000000000000000000000000..1c755b3af0ec261575ceafff9789a1ac12969946 --- /dev/null +++ b/lecture-01/assets/index-DCPWAYn_.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:before,:after{--un-content:""}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*,:before,:after,::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset: ;--un-shadow:0 0 #0000;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.prose,[prose=""]{color:var(--un-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-lead);margin-top:1.2em;margin-bottom:1.2em;font-size:1.25em;line-height:1.6}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:decimal}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:disc}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--un-prose-counters);font-weight:400}[prose=""] :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--un-prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--un-prose-bullets)}[prose=""] :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--un-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-headings);margin-top:1.25em;font-weight:600}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--un-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--un-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em;font-style:italic;font-weight:500}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before,[prose=""] :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after,[prose=""] :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-headings);margin-top:0;margin-bottom:.888889em;font-size:2.25em;font-weight:800;line-height:1.11111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:900}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-headings);margin-top:2em;margin-bottom:1em;font-size:1.5em;font-weight:700;line-height:1.33333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:800}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-headings);margin-top:1.6em;margin-bottom:.6em;font-size:1.25em;font-weight:600;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-headings);margin-top:1.5em;margin-bottom:.5em;font-weight:600;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em;display:block}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-kbd);box-shadow:0 0 0 1px rgb(var(--un-prose-kbd-shadows) / 10%), 0 3px 0 rgb(var(--un-prose-kbd-shadows) / 10%);padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;border-radius:.3125rem;padding-inline-start:.375em;font-family:inherit;font-size:.875em;font-weight:500}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-code);font-size:.875em;font-weight:600}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before,[prose=""] :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after,[prose=""] :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-pre-code);background-color:var(--un-prose-pre-bg);padding-top:.857143em;padding-inline-end:1.14286em;padding-bottom:.857143em;border-radius:.375rem;margin-top:1.71429em;margin-bottom:1.71429em;padding-inline-start:1.14286em;font-size:.875em;font-weight:400;line-height:1.71429;overflow-x:auto}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;background-color:#0000;border-width:0;border-radius:0;padding:0}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before,[prose=""] :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after,[prose=""] :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){table-layout:auto;width:100%;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.71429}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--un-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-headings);vertical-align:bottom;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em;font-weight:600}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--un-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--un-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-captions);margin-top:.857143em;font-size:.875em;line-height:1.42857}.prose,[prose=""]{font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where():not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where():not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.571429em;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where():not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where():not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose,[prose=""]{--un-prose-body:#374151;--un-prose-invert-body:#d1d5db;--un-prose-headings:#111827;--un-prose-invert-headings:white;--un-prose-lead:#4b5563;--un-prose-invert-lead:#9ca3af;--un-prose-links:#111827;--un-prose-invert-links:white;--un-prose-bold:#111827;--un-prose-invert-bold:white;--un-prose-counters:#6b7280;--un-prose-invert-counters:#9ca3af;--un-prose-bullets:#d1d5db;--un-prose-invert-bullets:#4b5563;--un-prose-hr:#e5e7eb;--un-prose-invert-hr:#374151;--un-prose-quotes:#111827;--un-prose-invert-quotes:#f3f4f6;--un-prose-quote-borders:#e5e7eb;--un-prose-invert-quote-borders:#374151;--un-prose-captions:#6b7280;--un-prose-invert-captions:#9ca3af;--un-prose-kbd:#111827;--un-prose-invert-kbd:white;--un-prose-kbd-shadows:#111827;--un-prose-invert-kbd-shadows:white;--un-prose-code:#111827;--un-prose-invert-code:white;--un-prose-pre-code:#e5e7eb;--un-prose-invert-pre-code:#d1d5db;--un-prose-pre-bg:#1f2937;--un-prose-invert-pre-bg:#00000080;--un-prose-th-borders:#d1d5db;--un-prose-invert-th-borders:#4b5563;--un-prose-td-borders:#e5e7eb;--un-prose-invert-td-borders:#374151}.dark .dark\:prose-invert{--un-prose-body:var(--un-prose-invert-body);--un-prose-headings:var(--un-prose-invert-headings);--un-prose-lead:var(--un-prose-invert-lead);--un-prose-links:var(--un-prose-invert-links);--un-prose-bold:var(--un-prose-invert-bold);--un-prose-counters:var(--un-prose-invert-counters);--un-prose-bullets:var(--un-prose-invert-bullets);--un-prose-hr:var(--un-prose-invert-hr);--un-prose-quotes:var(--un-prose-invert-quotes);--un-prose-quote-borders:var(--un-prose-invert-quote-borders);--un-prose-captions:var(--un-prose-invert-captions);--un-prose-kbd:var(--un-prose-invert-kbd);--un-prose-kbd-shadows:var(--un-prose-invert-kbd-shadows);--un-prose-code:var(--un-prose-invert-code);--un-prose-pre-code:var(--un-prose-invert-pre-code);--un-prose-pre-bg:var(--un-prose-invert-pre-bg);--un-prose-th-borders:var(--un-prose-invert-th-borders);--un-prose-td-borders:var(--un-prose-invert-td-borders)}.container{width:100%}.z-context-menu{z-index:60}.z-label{z-index:40}.z-menu{z-index:20}.z-modal{z-index:70}.z-nav{z-index:50}.slidev-glass-effect{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset) 0 20px 25px -5px var(--un-shadow-color,#0000001a),var(--un-shadow-inset) 0 8px 10px -6px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);--un-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);border-width:1px;border-color:#9ca3af33;--un-bg-opacity:.75!important}.border-main,.dark [border~=dark\:main],.dark [dark\:border~=main],[border-main=""],[border~=main]{border-color:#9ca3af33}.border-primary,.hover\:border-primary:hover{border-color:var(--slidev-theme-primary)}.bg-active{background-color:#9ca3af1a}.bg-main{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.dark .bg-main,.dark .slidev-glass-effect{--un-bg-opacity:1;background-color:rgb(18 18 18/var(--un-bg-opacity))}.bg-primary,[bg-primary=""]{background-color:var(--slidev-theme-primary)}.hover\:bg-active:hover,[hover\:bg-active=""]:hover{background-color:#9ca3af1a}.dark .text-main{--un-text-opacity:1;color:rgb(221 221 221/var(--un-text-opacity))}.text-main{--un-text-opacity:1;color:rgb(24 24 24/var(--un-text-opacity))}.text-primary,[text-primary=""]{color:var(--slidev-theme-primary)}@media (width>=640px){.container{max-width:640px}}@media (width>=768px){.container{max-width:768px}}@media (width>=1024px){.container{max-width:1024px}}@media (width>=1280px){.container{max-width:1280px}}@media (width>=1536px){.container{max-width:1536px}}:root{--color-note:#0969da;--color-tip:#1a7f37;--color-warning:#9a6700;--color-severe:#bc4c00;--color-caution:#d1242f;--color-important:#8250df}@media (prefers-color-scheme:dark){:root{--color-note:#2f81f7;--color-tip:#3fb950;--color-warning:#d29922;--color-severe:#db6d28;--color-caution:#f85149;--color-important:#a371f7}}.markdown-alert{color:inherit;border-left:.25em solid #888;margin-bottom:16px;padding:.5rem 1rem}.markdown-alert>:first-child{margin-top:0}.markdown-alert>:last-child{margin-bottom:0}.markdown-alert .markdown-alert-title{align-items:center;font-weight:500;line-height:1;display:flex}.markdown-alert .markdown-alert-title .octicon{vertical-align:text-bottom;fill:currentColor;margin-right:.5rem;display:inline-block;overflow:visible!important}.markdown-alert.markdown-alert-note{border-left-color:var(--color-note)}.markdown-alert.markdown-alert-note .markdown-alert-title{color:var(--color-note)}.markdown-alert.markdown-alert-important{border-left-color:var(--color-important)}.markdown-alert.markdown-alert-important .markdown-alert-title{color:var(--color-important)}.markdown-alert.markdown-alert-warning{border-left-color:var(--color-warning)}.markdown-alert.markdown-alert-warning .markdown-alert-title{color:var(--color-warning)}.markdown-alert.markdown-alert-tip{border-left-color:var(--color-tip)}.markdown-alert.markdown-alert-tip .markdown-alert-title{color:var(--color-tip)}.markdown-alert.markdown-alert-caution{border-left-color:var(--color-caution)}.markdown-alert.markdown-alert-caution .markdown-alert-title{color:var(--color-caution)}:root{--slidev-code-background:#f5f5f5;--slidev-code-foreground:#1b1b1b;--slidev-code-font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--slidev-code-padding:8px;--slidev-code-font-size:12px;--slidev-code-line-height:18px;--slidev-code-radius:4px;--slidev-code-margin:4px 0;--slidev-theme-primary:#3ab9d5;--slidev-transition-duration:.5s;--slidev-slide-container-background:black;--slidev-controls-foreground:white;--slidev-code-tab-divider:#e5e5e5;--slidev-code-tab-text-color:#67676c;--slidev-code-tab-font-size:12px;--slidev-code-tab-active-text-color:#3c3c43}html.dark{--slidev-code-background:#1b1b1b;--slidev-code-foreground:#eee;--slidev-code-tab-divider:#222;--slidev-code-tab-text-color:#98989f;--slidev-code-tab-active-text-color:#dfdfd6}html,body,#app,#page-root{width:100%;height:100vh;height:calc(var(--vh,1vh) * 100);-webkit-print-color-adjust:exact;print-color-adjust:exact;--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity));margin:0;padding:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;overflow:hidden}.dark html,.dark body,.dark #app,.dark #page-root{--un-bg-opacity:1;background-color:rgb(18 18 18/var(--un-bg-opacity))}html{background:0 0}.slidev-icon-btn{aspect-ratio:1;-webkit-user-select:none;user-select:none;cursor:pointer;vertical-align:middle;opacity:.75;border-radius:.25rem;outline:none;justify-content:center;align-items:center;padding:.25rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);display:inline-flex;position:relative}@media (width>=768px){.slidev-icon-btn{padding:.5rem}}.slidev-icon-btn:hover{--un-bg-opacity:.1;background-color:rgb(156 163 175/var(--un-bg-opacity))}.slidev-icon-btn:focus-visible{opacity:1;--un-outline-color-opacity:1;outline-width:2px;outline-color:rgb(0 0 0/var(--un-outline-color-opacity));outline-offset:2px;outline-style:solid}.dark .slidev-icon-btn:focus-visible{--un-outline-color-opacity:1;outline-color:rgb(255 255 255/var(--un-outline-color-opacity))}.slidev-icon-btn.shallow{opacity:.3}.slidev-icon-btn.active{opacity:1}.slidev-icon-btn.disabled{opacity:.25;pointer-events:none}.slidev-layout a.slidev-icon-btn{border-style:none}.slidev-layout a.slidev-icon-btn:hover{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity));border-style:none}.slidev-icon{vertical-align:sub;line-height:1em;display:inline-block}.slidev-page{width:100%;position:relative;top:0;left:0;right:0}.slidev-note-with-clicks .slidev-note-fade{color:#888c}.dark .slidev-note-with-clicks .slidev-note-fade{color:#a1a1a1cc}.slidev-note-click-mark{-webkit-user-select:none;user-select:none;--un-text-opacity:1;color:rgb(167 139 250/var(--un-text-opacity));background-color:#a78bfa1a;border-width:1px;border-color:#0000;border-radius:.25rem;align-items:center;padding-left:.25rem;padding-right:.25rem;font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.7em;display:inline-flex}.slidev-note-click-mark.slidev-note-click-mark-active{--un-border-opacity:1;border-width:1px;border-color:rgb(167 139 250/var(--un-border-opacity))}.slidev-note-click-mark.slidev-note-click-mark-past{filter:saturate(0);opacity:.5}.slidev-note-click-mark.slidev-note-click-mark-future{opacity:.5}.slidev-note-click-mark:before{content:"";--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M23 28a1 1 0 0 1-.71-.29l-6.13-6.14l-3.33 5a1 1 0 0 1-1 .44a1 1 0 0 1-.81-.7l-6-20A1 1 0 0 1 6.29 5l20 6a1 1 0 0 1 .7.81a1 1 0 0 1-.44 1l-5 3.33l6.14 6.13a1 1 0 0 1 0 1.42l-4 4A1 1 0 0 1 23 28m0-2.41L25.59 23l-7.16-7.15l5.25-3.5L7.49 7.49l4.86 16.19l3.5-5.25Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;opacity:.8;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.slidev-note-click-mark:after{content:attr(data-clicks);display:inline-block;transform:translateY(.1em)}.slidev-form-button{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity));--un-border-opacity:1;border-bottom-width:2px;border-color:rgb(55 65 81/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(107 114 128/var(--un-bg-opacity));border-radius:.25rem;padding:.25rem 1rem}.slidev-form-button:hover{--un-border-opacity:1;border-color:rgb(75 85 99/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(156 163 175/var(--un-bg-opacity))}.slidev-form-button.primary{--un-border-opacity:1;border-color:rgb(17 94 89/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(13 148 136/var(--un-bg-opacity))}.slidev-form-button.primary:hover{--un-border-opacity:1;border-color:rgb(15 118 110/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(20 184 166/var(--un-bg-opacity))}.rough-annotation{transform:scale(calc(1 / var(--slidev-slide-scale)))}#twoslash-container{position:fixed}#twoslash-container .v-popper__wrapper:not(.no-slide-scale>*){zoom:var(--slidev-slide-scale)}#twoslash-container .v-popper__popper:not(.no-slide-scale>*){translate:calc(10px * (1 - var(--slidev-slide-scale))) 0;width:max-content}.slidev-note ul{margin:0}html.dark:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}html.dark .shiki{color:var(--shiki-dark,inherit);--twoslash-popup-bg:var(--shiki-dark-bg,inherit)}html.dark .shiki span{color:var(--shiki-dark)}html:not(.dark) .shiki{color:var(--shiki-light,inherit);--twoslash-popup-bg:var(--shiki-light-bg,inherit)}html:not(.dark) .shiki span{color:var(--shiki-light)}.twoslash-meta-line.twoslash-popover-line{margin-top:-10px}.slidev-code-wrapper{scroll-padding:var(--slidev-code-padding);margin:var(--slidev-code-margin)!important}.slidev-code-wrapper:-webkit-scrollbar{width:0}.slidev-code{background:var(--slidev-code-background);overflow:auto;font-family:var(--slidev-code-font-family)!important;padding:var(--slidev-code-padding)!important;font-size:var(--slidev-code-font-size)!important;line-height:var(--slidev-code-line-height)!important;border-radius:var(--slidev-code-radius)!important}.slidev-code-block-title,.slidev-code-group-tabs{background:var(--slidev-code-background);color:var(--slidev-code-tab-text-color);padding-left:var(--slidev-code-padding);padding-right:var(--slidev-code-padding);font-size:var(--slidev-code-tab-font-size);border-radius:var(--slidev-code-radius) var(--slidev-code-radius) 0 0;box-shadow:inset 0 -1px var(--slidev-code-tab-divider);align-items:center;gap:8px;display:flex}.slidev-code-block-title{padding:var(--slidev-code-padding)}.slidev-code-tab{font-size:var(--slidev-code-tab-font-size);white-space:nowrap;cursor:pointer;padding:var(--slidev-code-padding);color:var(--slidev-code-tab-text-color);border-bottom:2px solid #0000;align-items:center;gap:8px;transition:color .25s;display:flex;position:relative}.slidev-code-tab:hover{color:var(--slidev-code-tab-active-text-color)!important}.slidev-code-group-blocks .slidev-code-wrapper{margin:0!important}.slidev-code-group-blocks .slidev-code{border-radius:0 0 var(--slidev-code-radius) var(--slidev-code-radius)!important}.slidev-code-group-blocks .slidev-code-wrapper.active{display:block}.slidev-code-group-blocks .slidev-code-wrapper{display:none}.slidev-code-block-title+.slidev-code,.slidev-code-group-tabs+.slidev-code{border-top-left-radius:0!important;border-top-right-radius:0!important}.slidev-code .slidev-code-dishonored{opacity:.3;pointer-events:none}.slidev-code-line-numbers .slidev-code code{counter-reset:step;counter-increment:step calc(var(--start,1) - 1)}.slidev-code-line-numbers .slidev-code code .line:before{content:counter(step);counter-increment:step;text-align:right;--un-text-opacity:1;width:1rem;color:rgb(156 163 175/var(--un-text-opacity));margin-right:1.5rem;display:inline-block}.dark .slidev-code-line-numbers .slidev-code code .line:before{--un-text-opacity:1;color:rgb(75 85 99/var(--un-text-opacity))}.slidev-note :not(pre)>code,.slidev-layout :not(pre)>code{background:var(--slidev-code-background);border-radius:var(--slidev-code-radius);padding:.125rem .375rem;font-size:.9em;font-weight:300}.slidev-note :not(pre)>code:after,.slidev-note :not(pre)>code:before{content:""}.slidev-layout :not(pre)>code:before{margin-right:-.08em}.katex,.katex :after,.katex :before{border-color:currentColor}.slidev-katex-wrapper .mord.dishonored{opacity:.3}.slide-left-enter-active,.slide-left-leave-active,.slide-right-enter-active,.slide-right-leave-active,.slide-up-enter-active,.slide-up-leave-active,.slide-down-enter-active,.slide-down-leave-active{transition:all var(--slidev-transition-duration) ease}.slide-left-enter-from,.slide-right-leave-to{translate:100%}.slide-left-leave-to,.slide-right-enter-from{translate:-100%}.slide-up-enter-from,.slide-down-leave-to{translate:0 100%}.slide-up-leave-to,.slide-down-enter-from{translate:0 -100%}.fade-enter-active,.fade-leave-active{transition:opacity var(--slidev-transition-duration) ease}.fade-enter-from,.fade-leave-to{opacity:0}.fade-out-leave-active{transition:opacity calc(var(--slidev-transition-duration) * .6) ease-out}.fade-out-enter-active{transition:opacity calc(var(--slidev-transition-duration) * .8) ease-in;transition-delay:calc(var(--slidev-transition-duration) * .6)}.fade-out-enter-from,.fade-out-leave-to{opacity:0}:root{--twoslash-popup-bg:var(--slidev-code-background);--twoslash-popup-color:var(--slidev-code-foreground);--twoslash-docs-color:inherit;--twoslash-docs-font:inherit;--twoslash-code-font:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--twoslash-underline-color:#8888;--twoslash-border-color:#8888;--twoslash-cursor-color:var(--slidev-theme-primary);--twoslash-matched-color:var(--slidev-theme-primary)}.twoslash-popup-container{font-size:13px}.twoslash-popup-container .twoslash-popup-code{font-size:.85em}.twoslash-floating .twoslash-popup-docs-tags .twoslash-popup-docs-tag-name{color:inherit;opacity:.5}.slidev-vclick-target{transition:all .1s}.slidev-vclick-target.slidev-vclick-anim-none{transition:none}.slidev-vclick-target.slidev-vclick-anim-fade-in{transition:all .3s}.slidev-vclick-hidden{opacity:0!important;pointer-events:none!important;-webkit-user-select:none!important;user-select:none!important}.slidev-vclick-hidden.slidev-vclick-anim-fade{opacity:.5!important}.slidev-vclick-hidden.slidev-vclick-anim-fade-in{opacity:0!important}.slidev-vclick-hidden.slidev-vclick-anim-up{translate:0 20px}.slidev-vclick-hidden.slidev-vclick-anim-down{translate:0 -20px}.slidev-vclick-hidden.slidev-vclick-anim-left{translate:20px}.slidev-vclick-hidden.slidev-vclick-anim-right{translate:-20px}.slidev-vclick-hidden.slidev-vclick-anim-scale{scale:.9}.slidev-vclick-display-none{display:none!important}.slidev-vclick-fade{opacity:.5}:root{--dl-bg:#fff;--dl-surface:#f7f9fa;--dl-border:#e3e8ea;--dl-heading:#111;--dl-body:#595959;--dl-muted:#8a8a8a;--dl-accent:#0097a7;--dl-accent-soft:#e0f4f6;--dl-accent-strong:#00707c;--dl-danger:#d32f2f;--dl-table-header:#eee;--dl-code-bg:#f6f8fa;--dl-fs-title:4.4rem;--dl-fs-section:3rem;--dl-fs-heading:2.1rem;--dl-fs-body:1.5rem;--dl-fs-secondary:1.17rem;--dl-fs-citation:.85rem}html.dark{--dl-bg:#0d1117;--dl-surface:#161b22;--dl-border:#2a323d;--dl-heading:#f2f5f7;--dl-body:#c2cad2;--dl-muted:#8b949e;--dl-accent:#2ec9d8;--dl-accent-soft:#123236;--dl-accent-strong:#7fe3ee;--dl-danger:#ff7b72;--dl-table-header:#1c2530;--dl-code-bg:#161b22}.slidev-layout{--slidev-code-background:var(--dl-code-bg);background:var(--dl-bg);height:100%;color:var(--dl-body);font-size:var(--dl-fs-body);padding:2.6rem 3rem 3.2rem;line-height:1.5;position:relative}.slidev-layout h1,.slidev-layout h2,.slidev-layout h3,.slidev-layout h4{color:var(--dl-heading);letter-spacing:-.01em;font-weight:600}.slidev-layout h1{font-size:var(--dl-fs-heading);margin-bottom:1.2rem}.slidev-layout h2{margin-bottom:.8rem;font-size:1.7rem}.slidev-layout h3{margin-bottom:.6rem;font-size:1.35rem}.slidev-layout p{margin:.5rem 0}.slidev-layout ul{margin:.4rem 0;padding-left:1.35rem;list-style:outside}.slidev-layout ol{margin:.4rem 0;padding-left:1.6rem;list-style:decimal}.slidev-layout ul ul{list-style:circle}.slidev-layout li{margin:.42rem 0}.slidev-layout li::marker{color:var(--dl-accent)}.slidev-layout a{color:var(--dl-accent);border-bottom:1px solid color-mix(in srgb, var(--dl-accent) 40%, transparent);text-decoration:none;transition:border-color .15s}.slidev-layout a:hover{border-bottom-color:var(--dl-accent)}.slidev-layout strong{color:var(--dl-heading);font-weight:600}.dl-wrong{color:var(--dl-danger);font-weight:600}.dl-secondary{font-size:var(--dl-fs-secondary);color:var(--dl-muted)}.slidev-layout table{border-collapse:collapse;font-size:var(--dl-fs-secondary);width:100%}.slidev-layout table th{background:var(--dl-table-header);color:var(--dl-heading);text-align:left;font-weight:600}.slidev-layout table th,.slidev-layout table td{border:1px solid var(--dl-border);padding:.4rem .7rem}.slidev-layout blockquote{border-left:3px solid var(--dl-accent);background:var(--dl-accent-soft);color:var(--dl-body);margin:.8rem 0;padding:.6rem 1rem}.dl-rule{background:var(--dl-accent);border-radius:2px;width:4.5rem;height:3px}.dl-callout{border-left:3px solid var(--dl-accent);background:var(--dl-accent-soft);border-radius:0 6px 6px 0;padding:.7rem 1rem;font-size:1.05rem}.dl-card{border:1px solid var(--dl-border);background:var(--dl-surface);border-radius:8px;overflow:hidden}.dl-card img{object-fit:cover;width:100%;height:6.2rem;display:block}.dl-card.is-contain img{object-fit:contain;background:var(--dl-bg);padding:.5rem}.dl-card__cap{color:var(--dl-body);padding:.35rem .55rem;font-size:.78rem}.dl-prompt{color:var(--dl-heading);border-left:3px solid var(--dl-accent);padding-left:.8rem;font-size:1.05rem;font-style:italic}.dl-reveal{color:var(--dl-accent);font-size:1.8rem;font-weight:700}.slidev-layout .katex{color:var(--dl-heading)}.slidev-code-wrapper{border:1px solid var(--dl-border);border-radius:6px;overflow:hidden}.dl-hw{border:1px solid var(--dl-border);background:var(--dl-surface);border-radius:8px;padding:.9rem 1rem}.dl-hw.is-primary{border-color:var(--dl-accent);background:var(--dl-accent-soft)}.dl-hw h3{margin:0 0 .35rem;font-size:1.3rem}.dl-hw p{margin:0 0 .6rem;font-size:.92rem}.dl-hw__vendors{color:var(--dl-muted);font-size:.74rem;line-height:1.5}.i-carbon-camera{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M29 26H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h6.46l1.71-2.55A1 1 0 0 1 12 4h8a1 1 0 0 1 .83.45L22.54 7H29a1 1 0 0 1 1 1v17a1 1 0 0 1-1 1M4 24h24V9h-6a1 1 0 0 1-.83-.45L19.46 6h-6.92l-1.71 2.55A1 1 0 0 1 10 9H4Z'/%3E%3Cpath fill='currentColor' d='M16 22a6 6 0 1 1 6-6a6 6 0 0 1-6 6m0-10a4 4 0 1 0 4 4a4 4 0 0 0-4-4'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon-magic-wand{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M29.414 24L12 6.586a2.05 2.05 0 0 0-2.828 0L6.586 9.172a2 2 0 0 0 0 2.828l17.413 17.414a2 2 0 0 0 2.828 0l2.587-2.586a2 2 0 0 0 0-2.828M8 10.586L10.586 8l5 5l-2.587 2.587zM25.413 28l-11-10.999L17 14.414l11 11ZM2 16l2-2l2 2l-2 2zM14 4l2-2l2 2l-2 2zM2 4l2-2l2 2l-2 2z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon-magic-wand-filled{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M29.414 24L12 6.586a2.05 2.05 0 0 0-2.828 0L6.586 9.172a2 2 0 0 0 0 2.828l17.413 17.414a2 2 0 0 0 2.828 0l2.587-2.586a2 2 0 0 0 0-2.828M8 10.586L10.586 8l5 5l-2.587 2.587zM2 16l2-2l2 2l-2 2zM14 4l2-2l2 2l-2 2zM2 4l2-2l2 2l-2 2z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon-moon{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M13.503 5.414a15.076 15.076 0 0 0 11.593 18.194a11.1 11.1 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1 1 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.07 13.07 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon-sun{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6M5.394 6.813L6.81 5.399l3.505 3.506L8.9 10.319zM2 15.005h5v2H2zm3.394 10.193L8.9 21.692l1.414 1.414l-3.505 3.506zM15 25.005h2v5h-2zm6.687-1.9l1.414-1.414l3.506 3.506l-1.414 1.414zm3.313-8.1h5v2h-5zm-3.313-6.101l3.506-3.506l1.414 1.414l-3.506 3.506zM15 2.005h2v5h-2z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:apps{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M8 4v4H4V4Zm2-2H2v8h8Zm8 2v4h-4V4Zm2-2h-8v8h8Zm8 2v4h-4V4Zm2-2h-8v8h8ZM8 14v4H4v-4Zm2-2H2v8h8Zm8 2v4h-4v-4Zm2-2h-8v8h8Zm8 2v4h-4v-4Zm2-2h-8v8h8ZM8 24v4H4v-4Zm2-2H2v8h8Zm8 2v4h-4v-4Zm2-2h-8v8h8Zm8 2v4h-4v-4Zm2-2h-8v8h8Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:arrow-down{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M24.59 16.59L17 24.17V4h-2v20.17l-7.59-7.58L6 18l10 10l10-10z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:arrow-left{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m14 26l1.41-1.41L7.83 17H28v-2H7.83l7.58-7.59L14 6L4 16z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:arrow-right{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m18 6l-1.43 1.393L24.15 15H4v2h20.15l-7.58 7.573L18 26l10-10z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:arrow-up{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 4L6 14l1.41 1.41L15 7.83V28h2V7.83l7.59 7.58L26 14z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:arrow-up-right{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M10 6v2h12.59L6 24.59L7.41 26L24 9.41V22h2V6z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:catalog{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M26 2H8a2 2 0 0 0-2 2v4H4v2h2v5H4v2h2v5H4v2h2v4a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2m0 26H8v-4h2v-2H8v-5h2v-2H8v-5h2V8H8V4h18Z'/%3E%3Cpath fill='currentColor' d='M14 8h8v2h-8zm0 7h8v2h-8zm0 7h8v2h-8z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:checkbox{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M26 4H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2M6 26V6h20v20Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:checkmark{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m13 24l-9-9l1.414-1.414L13 21.171L26.586 7.586L28 9z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M17.414 16L24 9.414L22.586 8L16 14.586L9.414 8L8 9.414L14.586 16L8 22.586L9.414 24L16 17.414L22.586 24L24 22.586z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:close-outline{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 2C8.2 2 2 8.2 2 16s6.2 14 14 14s14-6.2 14-14S23.8 2 16 2m0 26C9.4 28 4 22.6 4 16S9.4 4 16 4s12 5.4 12 12s-5.4 12-12 12'/%3E%3Cpath fill='currentColor' d='M21.4 23L16 17.6L10.6 23L9 21.4l5.4-5.4L9 10.6L10.6 9l5.4 5.4L21.4 9l1.6 1.6l-5.4 5.4l5.4 5.4z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:cursor-1,[i-carbon\:cursor-1=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M23 28a1 1 0 0 1-.71-.29l-6.13-6.14l-3.33 5a1 1 0 0 1-1 .44a1 1 0 0 1-.81-.7l-6-20A1 1 0 0 1 6.29 5l20 6a1 1 0 0 1 .7.81a1 1 0 0 1-.44 1l-5 3.33l6.14 6.13a1 1 0 0 1 0 1.42l-4 4A1 1 0 0 1 23 28m0-2.41L25.59 23l-7.16-7.15l5.25-3.5L7.49 7.49l4.86 16.19l3.5-5.25Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:document-pdf{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M30 18v-2h-6v10h2v-4h3v-2h-3v-2zm-11 8h-4V16h4a3.003 3.003 0 0 1 3 3v4a3.003 3.003 0 0 1-3 3m-2-2h2a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-2Zm-6-8H6v10h2v-3h3a2.003 2.003 0 0 0 2-2v-3a2 2 0 0 0-2-2m-3 5v-3h3l.001 3Z'/%3E%3Cpath fill='currentColor' d='M22 14v-4a.91.91 0 0 0-.3-.7l-7-7A.9.9 0 0 0 14 2H4a2.006 2.006 0 0 0-2 2v24a2 2 0 0 0 2 2h16v-2H4V4h8v6a2.006 2.006 0 0 0 2 2h6v2Zm-8-4V4.4l5.6 5.6Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:download{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M26 24v4H6v-4H4v4a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-4Zm0-10l-1.41-1.41L17 20.17V2h-2v18.17l-7.59-7.58L6 14l10 10z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:drop-photo{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19 26a4 4 0 1 1 4-4a4.005 4.005 0 0 1-4 4m0-6a2 2 0 1 0 2 2a2 2 0 0 0-2-2'/%3E%3Cpath fill='currentColor' d='M27 29H11a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2h3.28l.543-1.632A2 2 0 0 1 16.721 13h4.558a2 2 0 0 1 1.898 1.368L23.72 16H27a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2m-16-2h16v-9h-4.72l-1-3h-4.56l-1 3H11Zm16-16h2v2h-2zm0-4h2v2h-2zm0-4h2v2h-2zm-4 0h2v2h-2zm-4 0h2v2h-2zm-4 0h2v2h-2zm-4 0h2v2h-2zM7 3h2v2H7zM3 3h2v2H3zm0 4h2v2H3zm0 4h2v2H3zm0 4h2v2H3zm0 4h2v2H3zm0 4h2v2H3zm0 4h2v2H3z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:edit{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M2 26h28v2H2zM25.4 9c.8-.8.8-2 0-2.8l-3.6-3.6c-.8-.8-2-.8-2.8 0l-15 15V24h6.4zm-5-5L24 7.6l-3 3L17.4 7zM6 22v-3.6l10-10l3.6 3.6l-10 10z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:erase{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M7 27h23v2H7zm20.38-16.49l-7.93-7.92a2 2 0 0 0-2.83 0l-14 14a2 2 0 0 0 0 2.83L7.13 24h9.59l10.66-10.66a2 2 0 0 0 0-2.83M15.89 22H8l-4-4l6.31-6.31l7.93 7.92Zm3.76-3.76l-7.92-7.93L18 4l8 7.93Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:error{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M2 16A14 14 0 1 0 16 2A14 14 0 0 0 2 16m23.15 7.75L8.25 6.85a12 12 0 0 1 16.9 16.9M8.24 25.16a12 12 0 0 1-1.4-16.89l16.89 16.89a12 12 0 0 1-15.49 0'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:help{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2m0 26a12 12 0 1 1 12-12a12 12 0 0 1-12 12'/%3E%3Ccircle cx='16' cy='23.5' r='1.5' fill='currentColor'/%3E%3Cpath fill='currentColor' d='M17 8h-1.5a4.49 4.49 0 0 0-4.5 4.5v.5h2v-.5a2.5 2.5 0 0 1 2.5-2.5H17a2.5 2.5 0 0 1 0 5h-2v4.5h2V17a4.5 4.5 0 0 0 0-9'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:information{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M17 22v-8h-4v2h2v6h-3v2h8v-2zM16 8a1.5 1.5 0 1 0 1.5 1.5A1.5 1.5 0 0 0 16 8'/%3E%3Cpath fill='currentColor' d='M16 30a14 14 0 1 1 14-14a14 14 0 0 1-14 14m0-26a12 12 0 1 0 12 12A12 12 0 0 0 16 4'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:list-boxes{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 8h14v2H16zm0 14h14v2H16zm-6-8H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2M4 6v6h6.001L10 6Zm6 22H4a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2m-6-8v6h6.001L10 20Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:maximize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M20 2v2h6.586L18 12.582L19.414 14L28 5.414V12h2V2zm-6 17.416L12.592 18L4 26.586V20H2v10h10v-2H5.414z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:minimize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4 18v2h6.586L2 28.582L3.414 30L12 21.414V28h2V18zM30 3.416L28.592 2L20 10.586V4h-2v10h10v-2h-6.586z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:pause{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 8v16H8V8zm0-2H8a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2m12 2v16h-4V8zm0-2h-4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:pen{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M27.307 6.107L30 3.414L28.586 2l-2.693 2.693L24.8 3.6a1.933 1.933 0 0 0-2.8 0l-18 18V28h6.4l18-18a1.933 1.933 0 0 0 0-2.8ZM9.6 26H6v-3.6L23.4 5L27 8.6ZM9 11.586L16.586 4L18 5.414L10.414 13z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:pin{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M28.59 13.31L30 11.9L20 2l-1.31 1.42l1.18 1.18l-11.49 9.72l-1.72-1.71L5.25 14l5.66 5.68L2 28.58L3.41 30l8.91-8.91L18 26.75l1.39-1.42l-1.71-1.71l9.72-11.49ZM16.26 22.2L9.8 15.74L21.29 6L26 10.71Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:pin-filled{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M28.586 13.314L30 11.9L20 2l-1.314 1.415l1.186 1.186L8.38 14.322l-1.716-1.715L5.25 14l5.657 5.677L2 28.583L3.41 30l8.911-8.909L18 26.748l1.393-1.414l-1.716-1.716l9.724-11.49Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:play{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M7 28a1 1 0 0 1-1-1V5a1 1 0 0 1 1.482-.876l20 11a1 1 0 0 1 0 1.752l-20 11A1 1 0 0 1 7 28M8 6.69v18.62L24.925 16Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:presentation-file{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M15 10h2v8h-2zm5 4h2v4h-2zm-10-2h2v6h-2z'/%3E%3Cpath fill='currentColor' d='M25 4h-8V2h-2v2H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8v6h-4v2h10v-2h-4v-6h8a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 16H7V6h18Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:radio-button{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2m0 26a12 12 0 1 1 12-12a12 12 0 0 1-12 12'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:redo{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 10h12.185l-3.587-3.586L22 5l6 6l-6 6l-1.402-1.415L24.182 12H12a6 6 0 0 0 0 12h8v2h-8a8 8 0 0 1 0-16'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:renew{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 10H6.78A11 11 0 0 1 27 16h2A13 13 0 0 0 6 7.68V4H4v8h8Zm8 12h5.22A11 11 0 0 1 5 16H3a13 13 0 0 0 23 8.32V28h2v-8h-8Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:settings-adjust{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3s3 1.3 3 3s-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3s-3-1.3-3-3s1.3-3 3-3'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:template{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M26 6v4H6V6zm0-2H6a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2M10 16v10H6V16zm0-2H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V16a2 2 0 0 0-2-2m16 2v10H16V16zm0-2H16a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V16a2 2 0 0 0-2-2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:text-annotation-toggle{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath d='M29.537 13.76l-3.297-3.297a1.586 1.586 0 0 0-2.24 0L10 24.467V30h5.533l14.004-14a1.586 1.586 0 0 0 0-2.24zM14.704 28H12v-2.704l9.44-9.441l2.705 2.704zM25.56 17.145l-2.704-2.704l2.267-2.267l2.704 2.704z' fill='currentColor'/%3E%3Cpath d='M11 17h2v-7h3V8H8v2h3v7z' fill='currentColor'/%3E%3Cpath d='M8 20H4V4h16v4h2V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4z' fill='currentColor'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:time{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 30a14 14 0 1 1 14-14a14 14 0 0 1-14 14m0-26a12 12 0 1 0 12 12A12 12 0 0 0 16 4'/%3E%3Cpath fill='currentColor' d='M20.59 22L15 16.41V7h2v8.58l5 5.01z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:timer{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M15 11h2v9h-2zm-2-9h6v2h-6z'/%3E%3Cpath fill='currentColor' d='m28 9l-1.42-1.41l-2.25 2.25a10.94 10.94 0 1 0 1.18 1.65ZM16 26a9 9 0 1 1 9-9a9 9 0 0 1-9 9'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:trash-can{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 12h2v12h-2zm6 0h2v12h-2z'/%3E%3Cpath fill='currentColor' d='M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6Zm4 22V8h16v20Zm4-26h8v2h-8z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:undo{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M20 10H7.815l3.587-3.586L10 5l-6 6l6 6l1.402-1.415L7.818 12H20a6 6 0 0 1 0 12h-8v2h8a8 8 0 0 0 0-16'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:user-speaker{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M29.415 19L27.7 17.285A3 3 0 0 0 28 16a3 3 0 1 0-3 3a3 3 0 0 0 1.286-.3L28 20.414V28h-6v-3a7.01 7.01 0 0 0-7-7H9a7.01 7.01 0 0 0-7 7v5h28v-9.586A2 2 0 0 0 29.415 19M4 25a5.006 5.006 0 0 1 5-5h6a5.006 5.006 0 0 1 5 5v3H4Z'/%3E%3Cpath fill='currentColor' d='M12 4a5 5 0 1 1-5 5a5 5 0 0 1 5-5m0-2a7 7 0 1 0 7 7a7 7 0 0 0-7-7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:zoom-in{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M18 12h-4V8h-2v4H8v2h4v4h2v-4h4z'/%3E%3Cpath fill='currentColor' d='M21.448 20A10.86 10.86 0 0 0 24 13a11 11 0 1 0-11 11a10.86 10.86 0 0 0 7-2.552L27.586 29L29 27.586ZM13 22a9 9 0 1 1 9-9a9.01 9.01 0 0 1-9 9'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:zoom-out{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M8 12h10v2H8z'/%3E%3Cpath fill='currentColor' d='M21.448 20A10.86 10.86 0 0 0 24 13a11 11 0 1 0-11 11a10.86 10.86 0 0 0 7-2.552L27.586 29L29 27.586ZM13 22a9 9 0 1 1 9-9a9.01 9.01 0 0 1-9 9'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-ph-cursor-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M213.66 201L201 213.66a8 8 0 0 1-11.31 0l-51.31-51.31a8 8 0 0 0-13 2.46l-17.82 46.41a8 8 0 0 1-14.85-.71L40.41 50.44a8 8 0 0 1 10-10l160.1 52.24a8 8 0 0 1 .71 14.85l-46.41 17.82a8 8 0 0 0-2.46 13l51.31 51.31a8 8 0 0 1 0 11.34' opacity='.2'/%3E%3Cpath d='M168 132.69L214.08 115l.33-.13a16 16 0 0 0-1.41-29.8L52.92 32.8A15.95 15.95 0 0 0 32.8 52.92L85.07 213a15.82 15.82 0 0 0 14.41 11h.78a15.84 15.84 0 0 0 14.61-9.59l.13-.33L132.69 168L184 219.31a16 16 0 0 0 22.63 0l12.68-12.68a16 16 0 0 0 0-22.63ZM195.31 208L144 156.69a16 16 0 0 0-26 4.93c0 .11-.09.22-.13.32l-17.65 46L48 48l159.85 52.2l-45.95 17.64l-.32.13a16 16 0 0 0-4.93 26L208 195.31Z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-ph-cursor-fill{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m220.49 207.8l-12.69 12.69a12 12 0 0 1-17 0l-56.57-56.57L115 214.08l-.13.33a15.84 15.84 0 0 1-14.61 9.59h-.78a15.82 15.82 0 0 1-14.41-11L32.8 52.92A15.95 15.95 0 0 1 52.92 32.8L213 85.07a16 16 0 0 1 1.41 29.8l-.33.13l-50.16 19.27l56.57 56.56a12 12 0 0 1 0 16.97'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-ph\:arrow-down-bold{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m208.49 152.49l-72 72a12 12 0 0 1-17 0l-72-72a12 12 0 0 1 17-17L116 187V40a12 12 0 0 1 24 0v147l51.51-51.52a12 12 0 0 1 17 17Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-ph\:arrow-up-bold{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M208.49 120.49a12 12 0 0 1-17 0L140 69v147a12 12 0 0 1-24 0V69l-51.51 51.49a12 12 0 0 1-17-17l72-72a12 12 0 0 1 17 0l72 72a12 12 0 0 1 0 17'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-svg-spinners-90-ring-with-bg{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z' opacity='.25'/%3E%3Cpath fill='currentColor' d='M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z'%3E%3CanimateTransform attributeName='transform' dur='0.75s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/path%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.pointer-events-none,[pointer-events-none=""]{pointer-events:none}.visible,[visible=""]{visibility:visible}.absolute,[absolute=""]{position:absolute}.fixed,[fixed=""]{position:fixed}.relative,[relative=""]{position:relative}.inset-0,[inset-0=""]{inset:0}.inset-y-0,[inset-y-0=""]{top:0;bottom:0}.-top-15px{top:-15px}.-top-20{top:-5rem}.bottom-\[-6px\]{bottom:-6px}.bottom-0,[bottom-0=""]{bottom:0}.bottom-1,[bottom-1=""]{bottom:.25rem}.bottom-10{bottom:2.5rem}.bottom-12{bottom:3rem}.bottom-5{bottom:1.25rem}.left-0,[left-0=""]{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-110\%{left:110%}.left-12{left:3rem}.right--2,[right--2=""]{right:-.5rem}.right-\[-6px\]{right:-6px}.right-0,[right-0=""]{right:0}.right-0\.5,[right-0\.5=""]{right:.125rem}.right-1,[right-1=""]{right:.25rem}.right-4{right:1rem}.right-5,[right-5=""]{right:1.25rem}.top-\[-6px\]{top:-6px}.top-0,[top-0=""]{top:0}.top-0\.5,[top-0\.5=""]{top:.125rem}.top-1\/2,.top-50\%{top:50%}.top-4{top:1rem}.top-5{top:1.25rem}.-z-1{z-index:-1}.z-1,[z-1=""]{z-index:1}.z-10,[z-10=""]{z-index:10}.z-2{z-index:2}.grid,[grid=""]{display:grid}.grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.grid-cols-\[1fr_max-content\]{grid-template-columns:1fr max-content}.grid-cols-\[35px_1fr\]{grid-template-columns:35px 1fr}.grid-rows-\[1fr_max-content\]{grid-template-rows:1fr max-content}.grid-rows-\[1fr_min-content\]{grid-template-rows:1fr min-content}.grid-rows-\[auto_max-content\]{grid-template-rows:auto max-content}.grid-rows-\[max-content_1fr\]{grid-template-rows:max-content 1fr}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.m--1,[m--1=""]{margin:-.25rem}.m-1{margin:.25rem}.m-auto,.ma{margin:auto}.m0,[m0=""]{margin:0}.children\:my-auto>*,.my-auto,.mya{margin-top:auto;margin-bottom:auto}.mx--1\.2{margin-left:-.3rem;margin-right:-.3rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1,.my1{margin-top:.25rem;margin-bottom:.25rem}.my2{margin-top:.5rem;margin-bottom:.5rem}.my5{margin-top:1.25rem;margin-bottom:1.25rem}.-mt-0\.5{margin-top:-.125rem}.-mt-2{margin-top:-.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb2{margin-bottom:.5rem}.ml{margin-left:1rem}.ml-1{margin-left:.25rem}.ml-auto{margin-left:auto}.mr--14px{margin-right:-14px}.mr--4{margin-right:-1rem}.mr-2{margin-right:.5rem}.mr0{margin-right:0}.mr1{margin-right:.25rem}.ms{margin-inline-start:1rem}.mt-1,.mt1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-px{margin-top:1px}.block{display:block}.inline-block,[inline-block=""]{display:inline-block}.hidden,.group:hover .group-hover\:hidden,.group:not(:hover) .group-not-hover\:hidden{display:none}.aspect-ratio-initial{aspect-ratio:initial}.h-\[22px\],.h-22px,[h-22px=""]{height:22px}.h-\[40px\]{height:40px}.h-\[calc\(var\(--vh\,1vh\)\*100\)\]{height:calc(var(--vh,1vh) * 100)}.h-0\.7{height:.175rem}.h-1\.5,[h-1\.5=""]{height:.375rem}.h-1px{height:1px}.h-2,[h-2=""]{height:.5rem}.h-40{height:10rem}.h-4px{height:4px}.h-5,.h5,[h-5=""]{height:1.25rem}.h-52{height:13rem}.h-6{height:1.5rem}.h-8,[h-8=""]{height:2rem}.h-full,[h-full=""]{height:100%}.h-max{height:max-content}.h-screen{height:100vh}.h1,[h1=""]{height:.25rem}.h3{height:.75rem}.max-h-60{max-height:15rem}.max-h-full{max-height:100%}.max-h-full\!{max-height:100%!important}.max-w-\[calc\(100\%-3rem\)\]{max-width:calc(100% - 3rem)}.max-w-150{max-width:37.5rem}.max-w-250{max-width:62.5rem}.max-w-90,[max-w-90=""]{max-width:22.5rem}.max-w-full{max-width:100%}.max-w-full\!{max-width:100%!important}.max-w-xs{max-width:20rem}.min-h-14{min-height:3.5rem}.min-h-50{min-height:12.5rem}.min-h-full\!{min-height:100%!important}.min-w-\[70\%\]{min-width:70%}.min-w-0{min-width:0}.min-w-16{min-width:4rem}.min-w-30,[min-w-30=""]{min-width:7.5rem}.min-w-40{min-width:10rem}.min-w-90,[min-w-90=""]{min-width:22.5rem}.min-w-full\!{min-width:100%!important}.w-\[40px\]{width:40px}.w-\[calc\(100\%-0\.25rem\)\]{width:calc(100% - .25rem)}.w-0{width:0}.w-0\.5,[w-0\.5=""]{width:.125rem}.w-1\.5,[w-1\.5=""]{width:.375rem}.w-13{width:3.25rem}.w-1px,[w-1px=""]{width:1px}.w-2,[w-2=""]{width:.5rem}.w-20,[w-20=""]{width:5rem}.w-200{width:50rem}.w-22px{width:22px}.w-250{width:62.5rem}.w-30,[w-30=""]{width:7.5rem}.w-5,[w-5=""]{width:1.25rem}.w-6{width:1.5rem}.w-60,[w-60=""]{width:15rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-88{width:22rem}.w-9{width:2.25rem}.w-90,[w-90=""]{width:22.5rem}.w-auto{width:auto}.w-full,[w-full=""]{width:100%}.w-full\!{width:100%!important}.w-screen{width:100vw}.w1,[w1=""]{width:.25rem}.flex,[flex=""],[flex~=\~]{display:flex}.inline-flex{display:inline-flex}.flex-1{flex:1}.flex-auto,[flex-auto=""]{flex:auto}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-grow{flex-grow:1}[flex~=row]{flex-direction:row}.flex-col,[flex~=col]{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.table,[table=""]{display:table}.table-cell,[table-cell=""]{display:table-cell}.table-row,[table-row=""]{display:table-row}.border-collapse,[border-collapse=""]{border-collapse:collapse}.translate-y--50\%{--un-translate-y:-50%;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.-rotate-45{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:-45deg;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.scale-102{--un-scale-x:1.02;--un-scale-y:1.02;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.scale-85{--un-scale-x:.85;--un-scale-y:.85;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.scale-x-80{--un-scale-x:.8;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.transform{transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:1s linear fade-in}.animate-duration-100{animation-duration:.1s}.cursor-default{cursor:default}.cursor-pointer,[cursor-pointer=""]{cursor:pointer}.touch-none,[touch-none=""]{touch-action:none}.important\:\[\&_\*\]\:select-none *{-webkit-user-select:none!important;user-select:none!important}.select-none,[select-none=""]{-webkit-user-select:none;user-select:none}.resize{resize:both}.resize-none{resize:none}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center,[flex~=items-center],[items-center=""]{align-items:center}.self-start{align-self:flex-start}.self-center{align-self:center}.justify-center,[flex~=justify-center],[justify-center=""]{justify-content:center}.justify-between{justify-content:space-between}.justify-items-start{justify-items:start}.gap-0{gap:0}.gap-0\.2{gap:.05rem}.gap-0\.5{gap:.125rem}.gap-1,[flex~=gap-1],[gap-1=""]{gap:.25rem}.gap-2,[flex~=gap-2]{gap:.5rem}.gap-3{gap:.75rem}.gap-4,[flex~=gap-4]{gap:1rem}.gap-5{gap:1.25rem}.gap-8{gap:2rem}.gap-px{gap:1px}.gap-x-10{column-gap:2.5rem}.gap-x-8{column-gap:2rem}.gap-y-4{row-gap:1rem}.of-auto,.overflow-auto{overflow:auto}.of-hidden,.overflow-hidden,[of-hidden=""]{overflow:hidden}.of-x-visible{overflow-x:visible}.of-y-auto,.overflow-y-auto{overflow-y:auto}.whitespace-nowrap,.ws-nowrap,[ws-nowrap=""]{white-space:nowrap}.b,.border,.dark .dark\:border,.dark [dark\:border~=\~],[b=""],[border=""],[border~=\~],[border~="1"]{border-width:1px}.border-2,[b~="2"]{border-width:2px}[b~="100%"]{border-width:100%}[b~="16"]{border-width:16px}[b~="50%"]{border-width:50%}[b~="64"]{border-width:64px}[border~="0"]{border-width:0}.border-x,[b~=x]{border-left-width:1px;border-right-width:1px}[b~=y],[border~=y]{border-top-width:1px;border-bottom-width:1px}.border-b,[b~=b],[border~=b]{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-l{border-left-width:1px}.border-r,[border~=r]{border-right-width:1px}.border-r-2{border-right-width:2px}.border-t,[border-t=""],[border~=t]{border-top-width:1px}.b-dark{--un-border-opacity:1;border-color:rgb(34 34 34/var(--un-border-opacity))}.border-gray,.dark .dark\:b-gray-400,[border-gray=""]{--un-border-opacity:1;border-color:rgb(156 163 175/var(--un-border-opacity))}.border-gray-300\/50{border-color:#d1d5db80}.border-transparent,[border~=transparent]{border-color:#0000}.border-white{--un-border-opacity:1;border-color:rgb(255 255 255/var(--un-border-opacity))}.dark .dark\:border-gray-500,.dark [dark\:border-gray-500=""]{--un-border-opacity:1;border-color:rgb(107 114 128/var(--un-border-opacity))}[b-dark~="1"]{--un-border-opacity:1;border-color:rgb(60 60 60/var(--un-border-opacity))}[border~=red]{--un-border-opacity:1;border-color:rgb(248 113 113/var(--un-border-opacity))}.dark [b~=dark\:b-gray-400]{--un-border-opacity:1;--un-border-bottom-opacity:var(--un-border-opacity);border-bottom-color:rgb(156 163 175/var(--un-border-bottom-opacity))}[b~=b-dark]{--un-border-opacity:1;--un-border-bottom-opacity:var(--un-border-opacity);border-bottom-color:rgb(34 34 34/var(--un-border-bottom-opacity))}.rounded,[border~=rounded],[rounded=""]{border-radius:.25rem}.rounded-1\/2{border-radius:50%}.rounded-full,[rounded-full=""]{border-radius:9999px}.rounded-md,[border~=rounded-md]{border-radius:.375rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-lb{border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-tr-0{border-top-right-radius:0}.\!border-none{border-style:none!important}.b-dashed{border-style:dashed}[b~=b-dashed]{border-bottom-style:dashed}.bg-blue{--un-bg-opacity:1;background-color:rgb(96 165 250/var(--un-bg-opacity))}.bg-current{background-color:currentColor}.bg-cyan\:10,[bg-cyan\:10=""]{background-color:#22d3ee1a}.bg-gray,[bg-gray=""]{--un-bg-opacity:1;background-color:rgb(156 163 175/var(--un-bg-opacity))}.bg-gray\:10,.bg-gray\/10{background-color:#9ca3af1a}.bg-gray\:4,[bg-gray\:4=""]{background-color:#9ca3af0a}.bg-gray\:5,.bg-gray\/5,[bg-gray\:5=""]{background-color:#9ca3af0d}.bg-gray\/20{background-color:#9ca3af33}.bg-green{--un-bg-opacity:1;background-color:rgb(74 222 128/var(--un-bg-opacity))}.bg-red{--un-bg-opacity:1;background-color:rgb(248 113 113/var(--un-bg-opacity))}.bg-transparent{background-color:#0000}.bg-yellow{--un-bg-opacity:1;background-color:rgb(250 204 21/var(--un-bg-opacity))}.dark .dark\:bg-gray-800,.dark [dark\:bg-gray-800=""]{--un-bg-opacity:1;background-color:rgb(31 41 55/var(--un-bg-opacity))}[bg~=black]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.hover\:bg-gray-400:hover{--un-bg-opacity:1;background-color:rgb(156 163 175/var(--un-bg-opacity))}.hover\:bg-gray\/20:hover{background-color:#9ca3af33}[bg-transparent~=placeholder\:]::placeholder{background-color:#0000}.\!bg-opacity-75{--un-bg-opacity:.75!important}.bg-opacity-30,[bg-opacity-30=""]{--un-bg-opacity:.3}[bg~=opacity-80]{--un-bg-opacity:.8}.hover\:bg-opacity-10:hover{--un-bg-opacity:.1}[stroke-width~="1"]{stroke-width:1px}[stroke-width~="2"]{stroke-width:2px}[stroke-width~="3"]{stroke-width:3px}.dark .dark\:stroke-black{--un-stroke-opacity:1;stroke:rgb(0 0 0/var(--un-stroke-opacity))}.stroke-white{--un-stroke-opacity:1;stroke:rgb(255 255 255/var(--un-stroke-opacity))}.object-cover{object-fit:cover}.object-contain{object-fit:contain}.\!p-4{padding:1rem!important}.p-1,.p1,[p1=""]{padding:.25rem}.p-16{padding:4rem}.p-2,.p2,[p2=""]{padding:.5rem}.p-6px{padding:6px}.p0\.5,[p0\.5=""]{padding:.125rem}.p3,.pa-3{padding:.75rem}.p4{padding:1rem}.p5{padding:1.25rem}.px,.px-4,.px4,[p~=x-4],[px=""],[px4=""]{padding-left:1rem;padding-right:1rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2,.px2,[px2=""]{padding-left:.5rem;padding-right:.5rem}.px-3,.px3,[px3=""]{padding-left:.75rem;padding-right:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px1{padding-left:.25rem;padding-right:.25rem}.py,.py-4{padding-top:1rem;padding-bottom:1rem}.py-1,.py1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2,.py2,[p~=y-2],[py-2=""],[py2=""]{padding-top:.5rem;padding-bottom:.5rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py0\.5{padding-top:.125rem;padding-bottom:.125rem}.py1\.5{padding-top:.375rem;padding-bottom:.375rem}.pb2{padding-bottom:.5rem}.pl-0{padding-left:0}.pl-1,.pl1{padding-left:.25rem}.pl-4,[pl-4=""]{padding-left:1rem}.pl2,[pl2=""]{padding-left:.5rem}.pr-3,[pr-3=""]{padding-right:.75rem}.pr-4,[pr-4=""]{padding-right:1rem}.pt-\.5{padding-top:.125rem}.pt-15\%{padding-top:15%}.pt2{padding-top:.5rem}.pie{padding-inline-end:1rem}.text-center{text-align:center}.text-right,[text-right=""]{text-align:right}.text-wrap{text-wrap:wrap}.text-nowrap{text-wrap:nowrap}.align-top,[align-top=""]{vertical-align:top}.vertical-middle,[vertical-middle=""]{vertical-align:middle}.text-1\.2em{font-size:1.2em}.text-11px{font-size:11px}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3em{font-size:3em}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-9xl,[text-9xl=""]{font-size:8rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm,[text-sm=""]{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs,[text-xs=""]{font-size:.75rem;line-height:1rem}.\!text-current{color:currentColor!important}.dark .dark\:text-blue3{--un-text-opacity:1;color:rgb(147 197 253/var(--un-text-opacity))}.dark .dark\:text-green,.text-green{--un-text-opacity:1;color:rgb(74 222 128/var(--un-text-opacity))}.dark .dark\:text-green3{--un-text-opacity:1;color:rgb(134 239 172/var(--un-text-opacity))}.dark .dark\:text-red-500{--un-text-opacity:1;color:rgb(239 68 68/var(--un-text-opacity))}.dark .dark\:text-red3{--un-text-opacity:1;color:rgb(252 165 165/var(--un-text-opacity))}.dark .dark\:text-yellow3{--un-text-opacity:1;color:rgb(253 224 71/var(--un-text-opacity))}.text-\$slidev-controls-foreground{color:var(--slidev-controls-foreground)}.text-black{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.text-blue{--un-text-opacity:1;color:rgb(96 165 250/var(--un-text-opacity))}.text-blue6{--un-text-opacity:1;color:rgb(37 99 235/var(--un-text-opacity))}.text-cyan{--un-text-opacity:1;color:rgb(34 211 238/var(--un-text-opacity))}.text-cyan\:75,[text-cyan\:75=""]{color:#22d3eebf}.text-gray,.text-gray-400{--un-text-opacity:1;color:rgb(156 163 175/var(--un-text-opacity))}.text-gray-500{--un-text-opacity:1;color:rgb(107 114 128/var(--un-text-opacity))}.text-green-500{--un-text-opacity:1;color:rgb(34 197 94/var(--un-text-opacity))}.text-green6{--un-text-opacity:1;color:rgb(22 163 74/var(--un-text-opacity))}.text-indigo{--un-text-opacity:1;color:rgb(129 140 248/var(--un-text-opacity))}.text-lime{--un-text-opacity:1;color:rgb(163 230 53/var(--un-text-opacity))}.text-orange{--un-text-opacity:1;color:rgb(251 146 60/var(--un-text-opacity))}.text-pink{--un-text-opacity:1;color:rgb(244 114 182/var(--un-text-opacity))}.text-purple{--un-text-opacity:1;color:rgb(192 132 252/var(--un-text-opacity))}.dark .dark\:color-red-400,.text-red,.text-red-400{--un-text-opacity:1;color:rgb(248 113 113/var(--un-text-opacity))}.text-red-700{--un-text-opacity:1;color:rgb(185 28 28/var(--un-text-opacity))}.color-red-600,.text-red6{--un-text-opacity:1;color:rgb(220 38 38/var(--un-text-opacity))}.text-teal{--un-text-opacity:1;color:rgb(45 212 191/var(--un-text-opacity))}.text-white{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}.text-yellow{--un-text-opacity:1;color:rgb(250 204 21/var(--un-text-opacity))}.text-yellow6{--un-text-opacity:1;color:rgb(202 138 4/var(--un-text-opacity))}.important-text-op-50,.text-opacity-50\!{--un-text-opacity:.5!important}.font-bold,[font-bold=""]{font-weight:700}.font-light{font-weight:300}.leading-1\.6em{line-height:1.6em}.leading-tight{line-height:1.25}.font-mono,[font-mono=""]{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.line-through{text-decoration-line:line-through}.underline,.hover\:underline:hover{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.tab{tab-size:4}.\!opacity-0{opacity:0!important}.\!opacity-100{opacity:1!important}.op-60,.op60{opacity:.6}.op-80,.op80,.opacity-80{opacity:.8}.op0,.opacity-0{opacity:0}.op100,.group:hover .group-hover\:op100{opacity:1}.op15{opacity:.15}.op20{opacity:.2}.op25,.opacity-25,[op25=""]{opacity:.25}.op30{opacity:.3}.op35{opacity:.35}.op40,.opacity-40,[op40=""]{opacity:.4}.op50,.opacity-50,[op50=""]{opacity:.5}.op75,[op75=""]{opacity:.75}.opacity-10,[opacity-10=""]{opacity:.1}.opacity-5{opacity:.05}[opacity~="0.9"]{opacity:.009}.focus-within\:opacity-100:focus-within,.hover\:op-100:hover,.hover\:op100:hover{opacity:1}.hover\:op90:hover{opacity:.9}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-90:hover{opacity:.9}[hover~=op100]:hover,.focus-visible\:opacity-100:focus-visible{opacity:1}.placeholder\:op25::placeholder{opacity:.25}.shadow,[shadow=""],[shadow~=\~]{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color,#0000001a),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)}.shadow-lg{--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)}.shadow-xl{--un-shadow:var(--un-shadow-inset) 0 20px 25px -5px var(--un-shadow-color,#0000001a),var(--un-shadow-inset) 0 8px 10px -6px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)}[shadow~=\$event]{--un-shadow:var(--event);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)}.outline{outline-style:solid}.outline-none,[outline-none=""]{outline-offset:2px;outline:2px solid #0000}.ring{--un-ring-width:3px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)}.\!backdrop-blur-0px{--un-backdrop-blur:blur(0px)!important;-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)!important;backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)!important}.backdrop-blur{--un-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.backdrop-blur-5px{--un-backdrop-blur:blur(5px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.filter{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition-all~="0"]{transition-property:all;transition-duration:0s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition-all~="4"]{transition-property:all;transition-duration:4ms;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-400{transition-duration:.4s}.ease{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.view-transition-name{view-transition-name:name}@media (width<=767.9px){.lt-md\:hidden{display:none}.lt-md\:flex-col{flex-direction:column}}@media (width>=768px){.md\:p-10px{padding:10px}}@media (width>=1024px){.lg\:m-2{margin:.5rem}.lg\:p-2{padding:.5rem}.lg\:p-4{padding:1rem}} diff --git a/lecture-01/assets/index-DOePylYH.js b/lecture-01/assets/index-DOePylYH.js new file mode 100644 index 0000000000000000000000000000000000000000..da8393b1585b8f1c9787de17cf6e15f2ec89dd12 --- /dev/null +++ b/lecture-01/assets/index-DOePylYH.js @@ -0,0 +1,46 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/modules/file-saver-BpWusTEB.js","assets/rolldown-runtime-hePW80VL.js","assets/slidev/entry-C7SFAt6v.js","assets/modules/shiki-CJZsCeMT.js","assets/modules/shiki-BrmBd2_v.css","assets/_plugin-vue_export-helper-BDNMzG2s.js","assets/entry-Dba4BKje.css","assets/slidev/overview-GwLNj2Wj.js","assets/useNav-CGjBnVA8.js","assets/preload-helper-DpA04vUI.js","assets/modules/vue-ClnAKIA7.js","assets/slidev/context-C6dxaFaS.js","assets/slidev/IconButton-BwA4p7Ax.js","assets/slidev/NoteDisplay-CBOFmNF_.js","assets/NoteDisplay-DCBzjb4F.css","assets/modules/unplugin-icons-Dfv7de-_.js","assets/SlideWrapper-CMn-GoeN.js","assets/syncState-3Tc2ZArb.js","assets/useDrawings-aZNIHmMQ.js","assets/SlideWrapper-O3NT4xUm.css","assets/slidev/NoteEditable-Ca89u0zd.js","assets/overview-BIQ10iVu.css","assets/slidev/notes-FMbByPOo.js","assets/slidev/Modal-cvUjgiyd.js","assets/slidev/TimerBar-C_NwmFId.js","assets/slidev/notes-edit-BEK9xtMD.js","assets/slidev/presenter-BvM1iukx.js","assets/slidev/DrawingControls-B1ZvAJ65.js","assets/slidev/VerticalDivider-Bvc1MZzH.js","assets/DrawingControls-Dhbx0szf.css","assets/slidev/shortcuts-Cv21o_fH.js","assets/shortcuts-nRB69a7e.css","assets/presenter-J5ibmAMh.css","assets/slidev/play-imIlfZCb.js","assets/play-D_7yfuao.css","assets/slidev/404-DBEk8rxH.js","assets/404-bkedjYjP.css"])))=>i.map(i=>d[i]); +import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,B as n,C as r,E as i,F as a,I as o,L as s,Q as c,T as l,W as u,Z as d,b as f,dt as p,g as m,it as h,k as g,lt as _,m as v,mt as y,ot as b,s as x,t as S,vt as C,y as w,yt as T}from"./modules/shiki-CJZsCeMT.js";import{$ as E,A as ee,B as te,Q as ne,R as re,W as D,X as ie,Y as ae,Z as oe,c as O,h as se,j as k,l as ce,n as le,p as A,t as ue,w as de,z as fe}from"./useNav-CGjBnVA8.js";import{t as j}from"./preload-helper-DpA04vUI.js";import{A as pe,B as me,I as he,L as ge,R as _e,b as ve,d as ye,h as be,i as xe,k as Se,o as Ce,w as we,x as Te}from"./modules/vue-ClnAKIA7.js";import{a as Ee,c as De,d as Oe,f as ke,g as Ae,i as je,m as Me,o as Ne,p as Pe,r as Fe,s as Ie,u as Le,y as Re}from"./slidev/context-C6dxaFaS.js";import{n as M,r as ze,t as Be}from"./syncState-3Tc2ZArb.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),p(!1),p(!1);var Ve=new Set([`link`,`style`,`script`,`noscript`]),He=new Set([`title`,`titleTemplate`,`script`,`style`,`noscript`]),Ue=new Set([`base`,`meta`,`link`,`style`,`script`,`noscript`]),We=new Set([`title`,`base`,`htmlAttrs`,`bodyAttrs`,`meta`,`link`,`style`,`script`,`noscript`]),Ge=new Set([`base`,`title`,`titleTemplate`,`bodyAttrs`,`htmlAttrs`,`templateParams`]),Ke=new Set([`key`,`tagPosition`,`tagPriority`,`tagDuplicateStrategy`,`innerHTML`,`textContent`,`processTemplateParams`]),qe=new Set([`templateParams`,`htmlAttrs`,`bodyAttrs`]),Je=new Set([`theme-color`,`google-site-verification`,`author`,`og:locale:alternate`,`og:image`,`og:video`,`og:audio`,`article:author`,`article:tag`,`book:author`,`book:tag`,`twitter:image`]),Ye={critical:-8,high:-1,low:2},Xe=e=>typeof e==`number`?Number.isFinite(e):e;function Ze(e){return e===`__proto__`||e===`constructor`||e===`prototype`}function Qe(e,t,n,r){for(let i=n;ie[i](...t)):e[i](...t);if(n&&typeof n.then==`function`)return Promise.resolve(n).then(()=>Qe(e,t,i+1,r))}catch(e){return Promise.reject(e)}}var $e=class{_hooks;constructor(){this._hooks={}}hook(e,t){return!e||typeof t!=`function`?()=>{}:(this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(t),()=>{t&&=(this.removeHook(e,t),void 0)})}removeHook(e,t){let n=this._hooks[e];if(n){let r=n.indexOf(t);r!==-1&&n.splice(r,1),n.length===0&&(this._hooks[e]=void 0)}}callHook(e,...t){let n=this._hooks[e];if(!(!n||n.length===0))return Qe(n,t,0)}};function et(e){let t=new $e;for(let n in e||{})t.hook(n,e[n]);return t}function N(e,t,n){if(e.hooks?._hooks?.[t]?.length)return e.hooks?.callHook(t,n)}var tt=/^(?:viewport|description|keywords|robots)$/,nt=[`name`,`property`,`http-equiv`];function rt(e){let t=e.indexOf(`:`);if(t===-1)return!1;let n=e.slice(t+1);return Je.has(n)||n.startsWith(`og:image:`)||n.startsWith(`og:video:`)||n.startsWith(`og:audio:`)||n.startsWith(`twitter:image:`)}function it(e){let{props:t,tag:n,key:r}=e;if(Ge.has(n))return n;if(n===`link`){if(t.rel===`canonical`)return`canonical`;if(t.rel===`alternate`&&t.hreflang)return`alternate:${t.hreflang}`}if(t.charset)return`charset`;if(n===`meta`)for(let e of nt){let n=t[e];if(n!==void 0)return`meta:${n}${(typeof n!=`string`||!n.includes(`:`))&&!tt.test(n)&&r?`:key:${r}`:``}`}return r?`${n}:key:${r}`:t.id?`${n}:id:${t.id}`:n===`link`&&t.rel&&t.href?`link:${t.rel}:${t.href}`:He.has(n)&&(e.textContent||e.innerHTML)?`${n}:content:${e.textContent||e.innerHTML}`:void 0}function at(e){let t=e._h||e._d||e.textContent||e.innerHTML;if(t)return t;let n=Object.keys(e.props).sort(),r=`${e.tag}:`,i=``;for(let t of n)r+=`${i}${t}:${String(e.props[t])}`,i=`,`;return r}function ot(e,t,n){if(n===`_resolver`)return e;typeof e==`function`&&(!n||n!==`titleTemplate`&&!n.startsWith(`on`))&&(e=e());let r=t?t(n,e):e;if(Array.isArray(r)){let e;for(let n=0;n/=\x00-\x1F\x7F]/;function ct(e,t){let n=e===`style`,r=n?new Map:new Set,i=e=>{if(e){if(n){let t=e.indexOf(`:`);t>0&&r.set(e.slice(0,t).trim(),e.slice(t+1).trim())}else e.split(` `).forEach(e=>e&&r.add(e))}};if(typeof t==`string`)(n?t.split(`;`):[t]).forEach(i);else if(Array.isArray(t))t.forEach(i);else if(t&&typeof t==`object`)for(let e in t){let a=t[e];a&&a!==`false`&&(n?r.set(e.trim(),String(a)):i(e))}return r}function lt(e,t){if(e.props=e.props||{},!t)return e;if(e.tag===`templateParams`)return e.props=t,e;let n=Ue.has(e.tag)||e.tag===`htmlAttrs`||e.tag===`bodyAttrs`;for(let r in t){if(Ze(r))continue;let i=r.startsWith(`data-`),a=n&&!Ke.has(r),o=a&&!i?r.toLowerCase():r;if(a&&(!o||st.test(o)))continue;let s=t[r];if(s===null)e.props[o]=null;else if(r===`class`||r===`style`)e.props[r]=ct(r,s);else if(Ke.has(r)){if((r===`textContent`||r===`innerHTML`)&&typeof s==`object`){let n=t.type||`application/json`;(n.endsWith(`json`)||n===`speculationrules`||n===`importmap`)&&(e.props.type=t.type=n,e[r]=JSON.stringify(s))}else e[r]=s}else if(s!==void 0){let t=String(s),n=e.tag===`meta`&&o===`content`;e.props[o]=t===`true`||t===``?i||n?t:!0:!s&&i&&t===`false`?`false`:s}}return e}function ut(e,t){let n;return t.length&&(n=(e,n)=>{for(let r=0;re._w===t._w?e._p-t._p:e._w-t._w,_t=()=>100;function vt(e){for(let t in e)return!1;return!0}var yt=/^tags:|:render/;function bt(e,t){let n=(t[`entries:resolve`]?.length||0)+(t[`entries:normalize`]?.length||0);if(e._h!==n){e._h=n;for(let t of e.entries.values())delete t._tags}}function xt(e){for(let t=0;t>10==i._p>>10&&n.tag===`meta`&&rt(r)?(e.tagMap.set(r,Object.assign([...Array.isArray(i)?i:[i],n],n)),t=!0):(n._w===i._w?n._p>i._p:n._wt?(typeof e==`string`?e:JSON.stringify(e)).replace(mt,`\\u003C`):typeof e==`string`?e.replace(ht,`<\\/script`):e;n={...n},r&&(n.innerHTML=i(r)),n.textContent&&(n.textContent=i(n.textContent)),n._d=it(n)}e[t++]=n}}return e.length=t,e}function Et(e,t){let n=t?.tagWeight??e.resolvedOptions._tagWeight??_t,r={tagMap:new Map,tags:[]},i=e.hooks?._hooks||{};bt(e,i);for(let t of e.entries.values())t._pending!==void 0&&(t.input=t._pending,delete t._pending,delete t._tags,delete t._precomputedTags);let a;(i[`entries:resolve`]?.length||i[`entries:normalize`]?.length)&&(a=[...e.entries.values()],i[`entries:resolve`]?.length&&N(e,`entries:resolve`,{entries:a,...r})),bt(e,i);for(let t of a||e.entries.values()){let a=t._tags;if(!a){if(t._precomputedTags&&n===e.resolvedOptions._tagWeight&&!i[`entries:normalize`]?.length&&!i[`entries:resolve`]?.length&&(!t.options||vt(t.options)))a=t._precomputedTags;else{if(a=pt(t.input,e.resolvedOptions.propResolvers||[]),t.options&&!vt(t.options))for(let e of a)Object.assign(e,t.options);if(i[`entries:normalize`]?.length){let n={tags:a,entry:t};N(e,`entries:normalize`,n),a=n.tags}for(let e=0;eb(t)?C(t):t,{_static:!0});function jt(e,t={}){let n=t.head||Ot();return n.ssr?n.push(e||{},t):Mt(n,e,t)}function Mt(e,t,n={}){let r=h();if(r&&!r.active)return{patch(){},dispose(){},_i:-1};let l=p(!1);if(n.onRendered&&r){let e=n.onRendered;n={...n,onRendered:t=>r.run(()=>e(t))}}let u;return c(()=>{let r=l.value?{}:ot(t,At);u?u.patch(r):u=e.push(r,n)}),i()&&(o(()=>{u.dispose()}),s(()=>{l.value=!0}),a(()=>{l.value=!1})),u}function Nt(e,t){if(typeof t==`function`&&t.key&&e.plugins.has(t.key))return;let n=typeof t==`function`?t(e):t,r=n.key||String(e.plugins.size+1);if(!e.plugins.get(r)){e.plugins.set(r,n);for(let t in n.hooks||{})e.hooks?.hook(t,n.hooks[t])}}function Pt(e,t={}){let n=!t.document,r=new Map,i={_entryCount:1,_h:0,plugins:new Map,resolvedOptions:t,ssr:n,entries:r,hooks:void 0,render:()=>e(i),use:e=>Nt(i,e),push(e,t){let a=t?._index??i._entryCount++,o=t?{...t}:{};delete o.head,delete o.onRendered,delete o._index;let s={_i:a,input:e,options:o};return r.set(a,s),{_i:a,dispose(){r.delete(a)},patch(e){n?(s.input=e,delete s._tags):s._pending=e,r.has(a)||r.set(a,s)}}}};return t.init?.forEach(e=>e&&i.push(e)),i}var Ft=Object.assign({}),It=Object.assign({}),Lt=Object.assign({}),Rt=[Object.values(Ft)[0],Object.values(It)[0],Object.values(Lt)[0]].filter(Boolean),zt=ve(),Bt=be(`slidev-color-schema`,`auto`),Vt=m(()=>E.colorSchema!==`auto`),Ht=m({get(){return Vt.value?E.colorSchema===`dark`:Bt.value===`auto`?zt.value:Bt.value===`dark`},set(e){Vt.value||(Bt.value=e===zt.value?`auto`:e?`dark`:`light`)}}),Ut=he(Ht);pe&&d(Ht,e=>{let t=window.document.createElement(`style`);t.appendChild(document.createTextNode(`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`)),window.document.head.appendChild(t);let n=document.querySelector(`html`);n.classList.toggle(`dark`,e),n.classList.toggle(`light`,!e),window.getComputedStyle(t).opacity,document.head.removeChild(t)},{immediate:!0});function Wt(){let{isPrintMode:e}=ue();Te(m(()=>e.value?` +@page { + size: ${ie.value}px ${ae.value}px; + margin: 0px; +} + +* { + transition: none !important; + transition-duration: 0s !important; +}`:``))}var Gt=Symbol.for(`yaml.alias`),Kt=Symbol.for(`yaml.document`),P=Symbol.for(`yaml.map`),qt=Symbol.for(`yaml.pair`),Jt=Symbol.for(`yaml.scalar`),Yt=Symbol.for(`yaml.seq`),F=Symbol.for(`yaml.node.type`),Xt=e=>!!e&&typeof e==`object`&&e[F]===Gt,Zt=e=>!!e&&typeof e==`object`&&e[F]===Kt,Qt=e=>!!e&&typeof e==`object`&&e[F]===P,I=e=>!!e&&typeof e==`object`&&e[F]===qt,L=e=>!!e&&typeof e==`object`&&e[F]===Jt,$t=e=>!!e&&typeof e==`object`&&e[F]===Yt;function R(e){if(e&&typeof e==`object`)switch(e[F]){case P:case Yt:return!0}return!1}function z(e){if(e&&typeof e==`object`)switch(e[F]){case Gt:case P:case Jt:case Yt:return!0}return!1}var en=e=>(L(e)||R(e))&&!!e.anchor,B=Symbol(`break visit`),tn=Symbol(`skip children`),nn=Symbol(`remove node`);function rn(e,t){let n=on(t);Zt(e)?an(null,e.contents,n,Object.freeze([e]))===nn&&(e.contents=null):an(null,e,n,Object.freeze([]))}rn.BREAK=B,rn.SKIP=tn,rn.REMOVE=nn;function an(e,t,n,r){let i=sn(e,t,n,r);if(z(i)||I(i))return cn(e,r,i),an(e,i,n,r);if(typeof i!=`symbol`){if(R(t)){r=Object.freeze(r.concat(t));for(let e=0;eV(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!en(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var dn=class{constructor(e){Object.defineProperty(this,F,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!Zt(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=V(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?un(i,{"":o},``,o):o}},fn=class extends dn{constructor(e){super(Gt),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],rn(e,{Node:(e,t)=>{(Xt(t)||en(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(V(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=pn(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(ln(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function pn(e,t,n){if(Xt(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(R(t)){let r=0;for(let i of t.items){let t=pn(e,i,n);t>r&&(r=t)}return r}if(I(t)){let r=pn(e,t.key,n),i=pn(e,t.value,n);return Math.max(r,i)}return 1}var mn=e=>!e||typeof e!=`function`&&typeof e!=`object`,H=class extends dn{constructor(e){super(Jt),this.value=e}toJSON(e,t){return t?.keep?this.value:V(this.value,e,t)}toString(){return String(this.value)}};H.BLOCK_FOLDED=`BLOCK_FOLDED`,H.BLOCK_LITERAL=`BLOCK_LITERAL`,H.PLAIN=`PLAIN`,H.QUOTE_DOUBLE=`QUOTE_DOUBLE`,H.QUOTE_SINGLE=`QUOTE_SINGLE`;var hn=`tag:yaml.org,2002:`;function gn(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function _n(e,t,n){if(Zt(e)&&(e=e.contents),z(e))return e;if(I(e)){let t=n.schema[P].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new fn(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=hn+t.slice(2));let l=gn(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new H(e);return c&&(c.node=t),t}l=e instanceof Map?o[P]:Symbol.iterator in Object(e)?o[Yt]:o[P]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new H(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function vn(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return _n(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var yn=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,bn=class extends dn{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>z(t)||I(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(yn(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(R(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,vn(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(R(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&L(i)?i.value:i:R(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!I(t))return!1;let n=t.value;return n==null||e&&L(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return R(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(R(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,vn(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},xn=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function Sn(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Cn=(e,t,n)=>e.endsWith(` +`)?Sn(n,t):n.includes(` +`)?` +`+Sn(n,t):(e.endsWith(` `)?``:` `)+n,wn=`flow`,Tn=`block`,En=`quoted`;function Dn(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;ii-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=On(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===` +`)n===`block`&&(h=On(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==` +`&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==` +`&&t!==` `&&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),An=e=>/^(%|---|\.\.\.)/m.test(e);function jn(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;tr)return!0;if(n=t+1,i-n<=r)return!1}return!0}function Mn(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(An(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length +`;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==` +`&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(` +`);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===` +`&&(p=p.slice(0,-1)),p.replace(Fn,`$&${l}`));let h=!1,g,_=-1;for(g=0;g{i=!0});let s=Dn(`${v}${e}${p}`,l,Tn,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function Ln(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(` +`)||u&&/[[\]{},]/.test(a))return Pn(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(` +`)?Pn(a,t):In(e,t,n,r);if(!s&&!u&&i!==H.PLAIN&&a.includes(` +`))return In(e,t,n,r);if(An(a)){if(c===``)return t.forceBlockIndent=!0,In(e,t,n,r);if(s&&c===l)return Pn(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return Pn(a,t)}return s?d:Dn(d,c,wn,kn(t,!1))}function Rn(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==H.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=H.QUOTE_DOUBLE);let c=e=>{switch(e){case H.BLOCK_FOLDED:case H.BLOCK_LITERAL:return i||a?Pn(o.value,t):In(o,t,n,r);case H.QUOTE_DOUBLE:return Mn(o.value,t);case H.QUOTE_SINGLE:return Nn(o.value,t);case H.PLAIN:return Ln(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function zn(e,t){let n=Object.assign({blockQuote:!0,commentString:xn,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function Bn(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(L(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function Vn(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(L(e)||R(e))&&e.anchor;a&&ln(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function Hn(e,t,n,r){if(I(e))return e.toString(t,n,r);if(Xt(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=z(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=Bn(t.doc.schema.tags,a);let o=Vn(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):L(a)?Rn(a,t,n,r):a.toString(t,n,r);return o?L(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function Un({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=z(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(R(e)||!z(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||R(e)||(L(e)?e.type===H.BLOCK_FOLDED||e.type===H.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=Hn(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=Cn(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=Cn(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=Cn(g,n.indent,l(f))));let _,v,y;z(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&L(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&$t(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=Hn(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?` +`:``,v){let e=l(v);S+=`\n${Sn(e,n.indent)}`}x===``&&!n.inFlow?S===` +`&&y&&(S=` + +`):S+=`\n${n.indent}`}else if(!p&&R(t)){let e=x[0],r=x.indexOf(` +`),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&ne===Gn||typeof e==`symbol`&&e.description===Gn,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new H(Symbol(Gn)),{addToJSMap:Jn}),stringify:()=>Gn},qn=(e,t)=>(Kn.identify(t)||L(t)&&(!t.type||t.type===H.PLAIN)&&Kn.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===Kn.tag&&e.default);function Jn(e,t,n){let r=Xn(e,n);if($t(r))for(let n of r.items)Yn(e,t,n);else if(Array.isArray(r))for(let n of r)Yn(e,t,n);else Yn(e,t,r)}function Yn(e,t,n){let r=Xn(e,n);if(!Qt(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function Xn(e,t){return e&&Xt(t)?t.resolve(e.doc,e):t}function Zn(e,t,{key:n,value:r}){if(z(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(qn(e,n))Jn(e,t,r);else{let i=V(n,``,e);if(t instanceof Map)t.set(i,V(r,i,e));else if(t instanceof Set)t.add(i);else{let a=Qn(n,i,e),o=V(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function Qn(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(z(e)&&n?.doc){let t=zn(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),Wn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function $n(e,t,n){return new U(_n(e,void 0,n),_n(t,void 0,n))}var U=class e{constructor(e,t=null){Object.defineProperty(this,F,{value:qt}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return z(n)&&(n=n.clone(t)),z(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return Zn(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?Un(this,e,t,n):JSON.stringify(this)}};function er(e,t,n){return(t.inFlow??e.flow?nr:tr)(e,t,n)}function tr({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;eo=null,()=>d=!0);o&&(s+=Cn(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;ea=null);l||=d.length>u||o.includes(` +`),n0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=Cn(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:` +`;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function rr({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=Sn(t(r),e);n.push(i.trimStart())}}function W(e,t){let n=L(t)?t.value:t;for(let r of e)if(I(r)&&(r.key===t||r.key===n||L(r.key)&&r.key.value===n))return r}var G=class extends bn{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(P,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push($n(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=I(e)?e:!e||typeof e!=`object`||!(`key`in e)?new U(e,e?.value):new U(e.key,e.value);let r=W(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);L(r.value)&&mn(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=W(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=W(this.items,e)?.value;return(!t&&L(n)?n.value:n)??void 0}has(e){return!!W(this.items,e)}set(e,t){this.add(new U(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)Zn(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!I(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),er(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},ir={collection:`map`,default:!0,nodeClass:G,tag:`tag:yaml.org,2002:map`,resolve(e,t){return Qt(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>G.from(e,t,n)},ar=class extends bn{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(Yt,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=or(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=or(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&L(r)?r.value:r}has(e){let t=or(e);return typeof t==`number`&&t=0?t:null}var sr={collection:`seq`,default:!0,nodeClass:ar,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return $t(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>ar.from(e,t,n)};function cr(e){return typeof e==`bigint`||Number.isInteger(e)}var lr=({value:e})=>JSON.stringify(e),ur=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:lr},{identify:e=>e==null,createNode:()=>new H(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:lr},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:lr},{identify:cr,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>cr(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:lr}];[ir,sr].concat(ur,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}});function dr(e,t,n){let{replacer:r}=n,i=new ar(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push($n(o,s,n))}return i}var fr=class e extends ar{constructor(){super(),this.add=G.prototype.add.bind(this),this.delete=G.prototype.delete.bind(this),this.get=G.prototype.get.bind(this),this.has=G.prototype.has.bind(this),this.set=G.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(I(e)?(r=V(e.key,``,t),i=V(e.value,r,t)):r=V(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=dr(e,t,n),i=new this;return i.items=r.items,i}};fr.tag=`tag:yaml.org,2002:omap`;var pr=class e extends G{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=I(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new U(e.key,null):new U(e,null),W(this.items,t.key)||this.items.push(t)}get(e,t){let n=W(this.items,e);return!t&&I(n)?L(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=W(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new U(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push($n(e,null,n));return i}};pr.tag=`tag:yaml.org,2002:set`;var mr=Symbol(`break visit`),hr=Symbol(`skip children`),gr=Symbol(`remove item`);function _r(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),vr(Object.freeze([]),e,t)}_r.BREAK=mr,_r.SKIP=hr,_r.REMOVE=gr,_r.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},_r.parentCollection=(e,t)=>{let n=_r.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function vr(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;tbr.push(e)),M(K,`$onPatch`,e=>xr.push(e)),ze(),M(K,`$patch`,async()=>!1);var{init:Sr,onPatch:Cr,onUpdate:wr,patch:Tr,state:Er}=Be(K,K,!1),Dr=_({page:0,clicks:0,timer:{status:`stopped`,slides:{},startedAt:0,pausedAt:0}}),Or=[],kr=[];M(Dr,`$syncUp`,!0),M(Dr,`$syncDown`,!0),M(Dr,`$paused`,!1),M(Dr,`$onSet`,e=>Or.push(e)),M(Dr,`$onPatch`,e=>kr.push(e)),ze(),M(Dr,`$patch`,async()=>!1);var{init:Ar,onPatch:jr,onUpdate:Mr,patch:Nr,state:Pr}=Be(Dr,{page:1,clicks:0,clicksTotal:0,timer:{status:`stopped`,slides:{},startedAt:0,pausedAt:0}});function Fr(){let e=i().appContext.app,t=_({nav:ue(),configs:E,themeConfigs:m(()=>E.themeConfig)});e.provide(Me,p(`none`)),e.provide(Re,t),e.provide(ke,m(()=>t.nav.currentSlideNo)),e.provide(Oe,y(D()));for(let e of Rt)e();let{clicksContext:n,currentSlideNo:r,hasPrimarySlide:a,isNotesViewer:o,isPresenter:s,isPrintMode:c}=ue();jt({title:oe,htmlAttrs:E.htmlAttrs}),Wt(),Ar(`${oe} - shared`),Sr(`${oe} - drawings`);let l=`${location.origin}_${yr()}`,u=m(()=>s.value?`presenter`:`viewer`);function f(){(s.value?k.value.presenterSend:k.value.viewerSend)&&(o.value||c.value||!s.value&&!Le.includes(location.host.split(`:`)[0])||(Nr(`page`,+r.value),Nr(`clicks`,n.value.current),Nr(`clicksTotal`,n.value.total),Nr(`lastUpdate`,{id:l,type:u.value,time:Date.now()})))}let h=me();h.afterEach(f),d(n,f),jr(e=>{(s.value?k.value.presenterReceive:k.value.viewerReceive)&&(!a.value||c.value||e.lastUpdate?.type!==u.value&&(+e.page!=+r.value||+n.value.current!=+e.clicks)&&(A.value=!1,h.replace({path:te(e.page,s.value),query:{...h.currentRoute.value.query,clicks:e.clicks||0}})))})}var Ir=l({__name:`App`,setup(e){return Fr(),c(()=>{for(let[e,t]of Object.entries(ne.value))document.body.style.setProperty(e,t.toString())}),(e,t)=>{let i=u(`RouterView`);return n(),f(v,null,[r(i),w(`v-if`,!0)],64)}}});function Lr(e,t,n){let r=e.push,i=e;return i.ssr=!1,i.hooks=t,i.dirty=!!i.dirty,i.use=e=>Nt(i,e),i.render=()=>n(i),i.invalidate=()=>{for(let e of i.entries.values())delete e._tags;i.dirty=!0,t.callHook(`entries:updated`,i)},i.push=(n,a)=>{let o=a?.onRendered?t.hook(`dom:rendered`,a.onRendered):void 0,s=r(n,a),c=e.entries.get(s._i);return c&&(c._o=n),i.dirty=!0,t.callHook(`entries:updated`,i),{_i:s._i,patch(e){s.patch(e),i.dirty=!0,t.callHook(`entries:updated`,i)},dispose(){o?.(),e.entries.has(s._i)&&(s.dispose(),i.invalidate())}}},t.hook(`entries:updated`,()=>{i.render()}),i}var Rr=/\s+/;function zr(e={}){return t=>Hr(t,e)}function Br(e){for(let t of e.entries.values())if(t._pending!==void 0)return!0;return!1}function Vr(e,t){let n={_d:t,_t:t.title,_e:new Map([[`htmlAttrs`,t.documentElement],[`bodyAttrs`,t.body]]),_p:{},_s:{},_l:new Map};for(let e of[...t.body.children,...t.head.children]){let t=e.tagName.toLowerCase();if(!Ue.has(t))continue;let r={innerHTML:e.innerHTML};for(let t of e.getAttributeNames())r[t]=e.getAttribute(t);let i=lt({tag:t,props:{}},r);i.key=e.getAttribute(`data-hid`)||void 0;let a=it(i)||at(i),o=a,s=1;for(;n._e.has(o);)o=`${a}:${s++}`;n._e.set(o,e)}for(let t of e.entries.values())if(t._o!==void 0){let e=t._o;for(let t of[`bodyAttrs`,`htmlAttrs`]){let r=e[t]?.class;if(typeof r==`string`){let e=n._e.get(t);for(let i of r.split(Rr))i&&(n._p[`${t}:attr:class:${i}`]=()=>e.classList.remove(i))}}}return n}function Hr(e,t={}){let n=t.document||e.resolvedOptions.document,r=e._dom,i=!!r&&r._d!==n;if(!n||r&&!i&&!e.dirty&&!Br(e)||e._du)return!1;let a=n.defaultView;e._du=!0;let o=!1;try{let i=function(e,t,n){d._s[e]=!n&&f[e]||t,delete f[e]},s=function(e,t,n,r,a,o){let s=`${e}:event:${t}`,c=d._l.get(s);if(c&&c[0]===o&&c[1]===n&&c[2]===r){i(s,c[4]);return}c?.[4]();let l=`data-${t}`,u=(e=>r.call(a,e)),f=()=>{o.removeEventListener(n,u),a.getAttribute(l)===``&&a.removeAttribute(l),d._l.get(s)?.[3]===u&&d._l.delete(s)};o.addEventListener(n,u),d._l.set(s,[o,n,r,u,f]),a.setAttribute(l,``),i(s,f,!0)},c=function({id:e,$el:t,tag:n}){let r=n.tag.endsWith(`Attrs`);if(d._e.set(e,t),!r){let r=n.textContent;r!=null&&r!==``&&(r!==t.textContent&&(t.textContent=r),i(`${e}:text`,()=>{t.textContent===r&&(t.textContent=``)},!0));let a=n.innerHTML;a!=null&&a!==``&&(a!==t.innerHTML&&(t.innerHTML=a),i(`${e}:html`,()=>{t.innerHTML===a&&(t.innerHTML=``)},!0));let o=`${e}:el`;i(o,f[o]||(()=>{t?.remove(),d._e.delete(e)}))}for(let r in n.props){let o=n.props[r];if(r[0]===`o`&&r[1]===`n`&&typeof o==`function`){let i=r.slice(2);t?.dataset?.[`${r}fired`]&&o.call(t,new((a?.Event)||Event)(i)),s(e,r,i,o,t,n.tag===`bodyAttrs`&&a?a:t);continue}let c=`${e}:attr:${r}`;if(r===`class`&&o)for(let e of o){let n=`${c}:${e}`;i(n,f[n]||(()=>t.classList.remove(e))),t.classList.contains(e)||t.classList.add(e)}else if(r===`style`&&o)for(let[e,n]of o){let r=`${c}:${e}`;i(r,f[r]||(()=>t.style.removeProperty(e))),t.style.setProperty(e,n)}else o!==!1&&o!==null&&(t.getAttribute(r)!==o&&t.setAttribute(r,o===!0?``:String(o)),i(c,f[c]||(()=>t.removeAttribute(r))))}},l={shouldRender:!0,tags:[]};if(N(e,`dom:beforeRender`,l),!l.shouldRender)return!1;let u=r;if(u?._d!==n){if(u){for(let e in u._s)u._s[e]();for(let e in u._p)u._p[e]();u._s=u._p={},u._e.clear(),u._l.clear()}u=void 0}u?u._p=u._s:u=Vr(e,n),u._s={};let d=u,f=d._p,p=[],m={};e.dirty=!1;let h=Et(e,t.tagWeight?{tagWeight:t.tagWeight}:void 0),g=[],_={};for(let e of h){let t=_[e._d]||0,r=(t?`${e._d}:${t}`:e._d)||e._h,a={tag:e,id:r,shouldRender:!0};if(e.tag===`meta`&&e._d&&rt(e._d)&&(_[e._d]=t+1),g.push(a),e.tag===`title`){n.title=e.textContent,i(`title:`,()=>n.title=d._t);continue}a.$el=d._e.get(r),a.$el?c(a):Ue.has(e.tag)&&p.push(a)}for(let e of p)e.$el=n.createElement(e.tag.tag),c(e),(m[e.tag.tagPosition||`head`]??=n.createDocumentFragment()).appendChild(e.$el);m.head&&n.head.appendChild(m.head),m.bodyOpen&&n.body.insertBefore(m.bodyOpen,n.body.firstChild),m.bodyClose&&n.body.appendChild(m.bodyClose);for(let e in f)f[e]();e._dom=d,o=!0,N(e,`dom:rendered`,{renders:g})}catch(t){throw e.dirty=!0,t}finally{e._du=!1}return o&&(e.dirty||Br(e))&&Hr(e,t),o}var Ur=e=>typeof e.tagPriority==`number`?e.tagPriority:100+(Ye[e.tagPriority]||0);function Wr(e={}){e.document=e.document||(typeof window<`u`?document:void 0);let t=e.render||zr({document:e.document}),n=Lr(Pt(t,{document:e.document,propResolvers:e.propResolvers,_tagWeight:Ur,init:[]}),et(e.hooks),t);return e.plugins?.forEach(e=>n.use(e)),e.init?.forEach(e=>e&&n.push(e)),n}function Gr(e={}){let t=zr(),n,r=0;return n=Wr({render:()=>{let e=++r;setTimeout(()=>{e===r&&t(n)},0)},...e}),n.install=kt(n),n}var Kr=Object.assign({}),qr=Object.assign({}),Jr=Object.assign({}),Yr=[Object.values(Kr)[0],Object.values(qr)[0],Object.values(Jr)[0]].filter(Boolean);function Xr(e,t=``){let n=[`slidev-page`,t],r=e?.meta?.slide?.no;return r!=null&&n.push(`slidev-page-${r}`),n.filter(Boolean).join(` `)}async function Zr(){let{saveAs:t}=await j(async()=>{let{saveAs:t}=await import(`./modules/file-saver-BpWusTEB.js`).then(t=>e(t.t(),1));return{saveAs:t}},__vite__mapDeps([0,1]));t(typeof E.download==`string`?E.download:E.exportFilename?`${E.exportFilename}.pdf`:`/lecture-01/slidev-exported.pdf`,`${E.title}.pdf`)}function Qr(e,t,n){return(e.instance?.$).provides[t]??n}var $r=/[\s,]+/;function ei(e,t){let n=t.map(e=>`${Fe}${e}`);e.classList.forEach(t=>{t.startsWith(`slidev-vclick-anim-`)&&!n.includes(t)&&e.classList.remove(t)}),n.forEach(t=>e.classList.add(t))}function ti(){return{install(e){e.directive(`click`,{name:`v-click`,mounted(e,t){let n=ri(e,t,t.value);n!=null&&(e.classList.toggle(De,!0),e.dataset.slidevClicksStart=String(n.start),Number.isFinite(n.end)&&(e.dataset.slidevClicksEnd=String(n.end)),e.watchStopHandle=c(()=>{let t=n.isActive.value,r=n.isCurrent.value,i=t&&!r;n.flagHide?(e.classList.toggle(Ee,t),e.classList.toggle(Ne,t)):e.classList.toggle(Ee,!t),ei(e,n.flagAnimations.value),e.classList.toggle(je,r),e.classList.toggle(Ie,i)}))},unmounted:ii}),e.directive(`after`,{name:`v-after`,mounted(e,t){let n=ri(e,t,`+0`);n!=null&&(e.classList.toggle(De,!0),e.watchStopHandle=c(()=>{let t=n.isActive.value,r=n.isCurrent.value,i=t&&!r;n.flagHide?(e.classList.toggle(Ee,t),e.classList.toggle(Ne,t)):e.classList.toggle(Ee,!t),ei(e,n.flagAnimations.value),e.classList.toggle(je,r),e.classList.toggle(Ie,i)}))},unmounted:ii}),e.directive(`click-hide`,{name:`v-click-hide`,mounted(e,t){let n=ri(e,t,t.value,!0);n!=null&&(e.classList.toggle(De,!0),e.watchStopHandle=c(()=>{let t=n.isActive.value,r=n.isCurrent.value,i=t&&!r;e.classList.toggle(Ee,t),e.classList.toggle(Ne,t),ei(e,n.flagAnimations.value),e.classList.toggle(je,r),e.classList.toggle(Ie,i)}))},unmounted:ii})}}}var ni=new Map;function ri(e,t,n,r=!1){let i=Qr(t,Oe)?.value,a=Qr(t,Pe);if(!e||!i)return null;let o=r||t.modifiers.hide!==!1&&t.modifiers.hide!=null,s=Object.keys({...t.modifiers}).filter(e=>e!==`hide`),c=m(()=>{if(s.length>0)return s;let e=a?.clickAnimation||E.clickAnimation;return e?e.split($r).filter(Boolean):[]}),l=i.calculate(n);if(!l)return null;i.register(e,l);let u=m(()=>o?!l.isActive.value:l.isActive.value),d=m(()=>u.value?`shown`:Number.isFinite(l.end)?i.current{setTimeout(n.update,300)},{flush:`post`,immediate:!0});return{...n,stop:r}}function oi(e){return{info:p(fe(e)?.meta.slide??null),update:async()=>{}}}var si={};function ci(e){function t(e){return si[e]??=oi(e)}return{info:m({get(){return t(T(e)).info.value},set(n){t(T(e)).info.value=n}}),update:async(n,r)=>{let i=t(r??T(e)),a=await i.update(n);return a&&(i.info.value=a),a}}}function li(e){return()=>{}}function ui(e,t,n,r=!1){function i(t){return e?Qr(e,t):Se(t)}let a=i(Me),o=i(`$$slidev-fontmatter`)??{},s=i(ke),c=m(()=>li(s.value)),l=i(`$$slidev-slide-scale`)??p(1),u=i(`$$slidev-slide-zoom`)??p(1),{left:f,top:h,stop:g}=ai(i(`$$slidev-slide-element`)??p()),{isPrintMode:_}=ue(),v=[`slide`,`presenter`].includes(a.value)&&!_.value,y=e?`directive`:`prop`,b=yr(),x;if(Array.isArray(t)?x=t:typeof t==`string`&&t.includes(`,`)?x=t.split(`,`).map(Number):t!=null&&(y=`frontmatter`,b=`${t}`,t=o?.dragPos?.[b],x=t?.split(`,`).map(Number)),y!==`frontmatter`&&!n)throw Error("[Slidev] Can not identify the source position of the v-drag element, please provide an explicit `id` prop.");let S=[g],C=!r&&t!=null&&!Number.isFinite(x?.[3]);x??=[NaN,NaN,0];let w=p(x[2]),T=p(x[0]+x[2]/2),E=p(r?0:x[4]??0),ee=m(()=>E.value*Math.PI/180),te=m(()=>Math.sin(ee.value)),ne=m(()=>Math.cos(ee.value)),re=p(),D=p({left:0,top:0,width:0,height:0}),ie=p(0);function ae(){if(!re.value)return;let e=re.value.getBoundingClientRect();D.value={left:e.left/u.value,top:e.top/u.value,width:e.width/u.value,height:e.height/u.value},ie.value=(D.value.width+D.value.height)/l.value/(Math.abs(te.value)+Math.abs(ne.value))-w.value}S.push(d(w,ae,{flush:`post`}));let oe=p(x[3]??0),O=C?m({get:()=>(C?ie.value:oe.value)||0,set:e=>!C&&(oe.value=e)}):oe,se=p(C?x[1]:x[1]+x[3]/2),k=C?m({get:()=>se.value+O.value/2,set:e=>se.value=e-O.value/2}):se,ce=m(()=>Number.isFinite(T.value)?{position:`absolute`,zIndex:100,left:`${T.value-w.value/2}px`,top:`${k.value-O.value/2}px`,width:`${w.value}px`,height:C?void 0:`${O.value}px`,transformOrigin:`center center`,transform:`rotate(${E.value}deg)`}:{position:`absolute`,zIndex:100});S.push(d([T,k,w,O,E],([e,t,r,i,a])=>{let o=[e-r/2,t-i/2,r].map(Math.round).join();o+=C?y===`directive`?`,NaN`:`,_`:`,${Math.round(i)}`,Math.round(a)!==0&&(o+=`,${Math.round(a)}`),y===`directive`&&(o=`[${o}]`),c.value(b,o,y,n)}));let A={dragId:b,dataSource:y,markdownSource:n,isArrow:r,zoom:u,autoHeight:C,x0:T,y0:k,width:w,height:O,rotate:E,container:re,containerStyle:ce,watchStopHandles:S,dragging:m(()=>le.value===A),mounted(){v&&(ae(),t||setTimeout(()=>{ae(),T.value=(D.value.left+D.value.width/2-f.value)/l.value,k.value=(D.value.top-h.value)/l.value,w.value=D.value.width/l.value,O.value=D.value.height/l.value},100))},unmounted(){v&&A.stopDragging()},startDragging(){v&&(ae(),le.value=A)},stopDragging(){v&&le.value===A&&(le.value=null)}};return S.push(Ce(re,e=>{let t=document.querySelector(`#drag-control-container`);t&&e.target&&t.contains(e.target)||A.stopDragging()}),d(we(),e=>{e||A.stopDragging()})),A}function di(){return{install(e){e.directive(`drag`,{name:`v-drag`,created(e,t,n){let r=ui(t,t.value,n.props?.markdownSource);n.props&&(n.props={...n.props},delete n.props.markdownSource),r.container.value=e,e.draggingState=r,e.dataset.dragId=r.dragId,r.watchStopHandles.push(d(r.containerStyle,t=>{for(let[n,r]of Object.entries(t))r&&(e.style[n]=r)},{immediate:!0})),e.addEventListener(`dblclick`,r.startDragging)},mounted(e){e.draggingState.mounted()},unmounted(e){let t=e.draggingState;t.unmounted(),e.removeEventListener(`dblclick`,t.startDragging),t.watchStopHandles.forEach(e=>e())}})}}}function fi(){return Math.floor(Math.random()*2**31)}var pi=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};function mi(e,t,n){if(e&&e.length){let[r,i]=t,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(let t of e){let[e,n]=t;t[0]=(e-r)*o-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*o+i}}}function hi(e,t,n){let r=[];e.forEach(e=>r.push(...e)),mi(r,t,n)}function gi(e,t){return e[0]===t[0]&&e[1]===t[1]}function _i(e,t,n,r=1){let i=n,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]==`number`?[e]:e,s=[0,0];if(i)for(let e of o)mi(e,s,i);let c=vi(o,a,r);if(i){for(let e of o)mi(e,s,-i);hi(c,s,-i)}return c}function vi(e,t,n){let r=[];for(let t of e){let e=[...t];gi(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&r.push(e)}let i=[];t=Math.max(t,.1);let a=[];for(let e of r)for(let t=0;te.ymint.ymin?1:e.xt.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax)),!a.length)return i;let o=[],s=a[0].ymin,c=0;for(;o.length||a.length;){if(a.length){let e=-1;for(let t=0;ts);t++)e=t;a.splice(0,e+1).forEach(e=>{o.push({s,edge:e})})}if(o=o.filter(e=>!(e.edge.ymax<=s)),o.sort((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x)),(n!==1||c%t===0)&&o.length>1)for(let e=0;e=o.length)break;let n=o[e].edge,r=o[t].edge;i.push([[Math.round(n.x),s],[Math.round(r.x),s]])}s+=n,o.forEach(e=>{e.edge.x=e.edge.x+n*e.edge.islope}),c++}return i}function yi(e,t){let n=t.hachureAngle+90,r=t.hachureGap;r<0&&(r=t.strokeWidth*4),r=Math.round(Math.max(r,.1));let i=1;return t.roughness>=1&&(t.randomizer?.next()||Math.random())>.7&&(i=r),_i(e,r,n,i||1)}var bi=class{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let n=yi(e,t);return{type:`fillSketch`,ops:this.renderLines(n,t)}}renderLines(e,t){let n=[];for(let r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}};function xi(e){let t=e[0],n=e[1];return Math.sqrt((t[0]-n[0])**2+(t[1]-n[1])**2)}var Si=class extends bi{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=t.strokeWidth*4),n=Math.max(n,.1);let r=yi(e,Object.assign({},t,{hachureGap:n})),i=Math.PI/180*t.hachureAngle,a=[],o=n*.5*Math.cos(i),s=n*.5*Math.sin(i);for(let[e,t]of r)xi([e,t])&&a.push([[e[0]-o,e[1]+s],[...t]],[[e[0]+o,e[1]-s],[...t]]);return{type:`fillSketch`,ops:this.renderLines(a,t)}}},Ci=class extends bi{fillPolygons(e,t){let n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}},wi=class{constructor(e){this.helper=e}fillPolygons(e,t){t=Object.assign({},t,{hachureAngle:0});let n=yi(e,t);return this.dotsOnLines(n,t)}dotsOnLines(e,t){let n=[],r=t.hachureGap;r<0&&(r=t.strokeWidth*4),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);let a=r/4;for(let o of e){let e=xi(o),s=e/r,c=Math.ceil(s)-1,l=e-c*r,u=(o[0][0]+o[1][0])/2-r/4,d=Math.min(o[0][1],o[1][1]);for(let e=0;e{let a=xi(e),o=Math.floor(a/(n+r)),s=(a+r-o*(n+r))/2,c=e[0],l=e[1];c[0]>l[0]&&(c=e[1],l=e[0]);let u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let e=0;e{let i=xi(e),a=Math.round(i/(2*t)),o=e[0],s=e[1];o[0]>s[0]&&(o=e[1],s=e[0]);let c=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let e=0;er%2?e+n:e+t);a.push({key:`C`,data:e}),t=e[4],n=e[5];break}case`Q`:a.push({key:`Q`,data:[...s]}),t=s[2],n=s[3];break;case`q`:{let e=s.map((e,r)=>r%2?e+n:e+t);a.push({key:`Q`,data:e}),t=e[2],n=e[3];break}case`A`:a.push({key:`A`,data:[...s]}),t=s[5],n=s[6];break;case`a`:t+=s[5],n+=s[6],a.push({key:`A`,data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case`H`:a.push({key:`H`,data:[...s]}),t=s[0];break;case`h`:t+=s[0],a.push({key:`H`,data:[t]});break;case`V`:a.push({key:`V`,data:[...s]}),n=s[0];break;case`v`:n+=s[0],a.push({key:`V`,data:[n]});break;case`S`:a.push({key:`S`,data:[...s]}),t=s[2],n=s[3];break;case`s`:{let e=s.map((e,r)=>r%2?e+n:e+t);a.push({key:`S`,data:e}),t=e[2],n=e[3];break}case`T`:a.push({key:`T`,data:[...s]}),t=s[0],n=s[1];break;case`t`:t+=s[0],n+=s[1],a.push({key:`T`,data:[t,n]});break;case`Z`:case`z`:a.push({key:`Z`,data:[]}),t=r,n=i}return a}function Ii(e){let t=[],n=``,r=0,i=0,a=0,o=0,s=0,c=0;for(let{key:l,data:u}of e){switch(l){case`M`:t.push({key:`M`,data:[...u]}),[r,i]=u,[a,o]=u;break;case`C`:t.push({key:`C`,data:[...u]}),r=u[4],i=u[5],s=u[2],c=u[3];break;case`L`:t.push({key:`L`,data:[...u]}),[r,i]=u;break;case`H`:r=u[0],t.push({key:`L`,data:[r,i]});break;case`V`:i=u[0],t.push({key:`L`,data:[r,i]});break;case`S`:{let e=0,a=0;n===`C`||n===`S`?(e=r+(r-s),a=i+(i-c)):(e=r,a=i),t.push({key:`C`,data:[e,a,...u]}),s=u[0],c=u[1],r=u[2],i=u[3];break}case`T`:{let[e,a]=u,o=0,l=0;n===`Q`||n===`T`?(o=r+(r-s),l=i+(i-c)):(o=r,l=i);let d=r+2*(o-r)/3,f=i+2*(l-i)/3,p=e+2*(o-e)/3,m=a+2*(l-a)/3;t.push({key:`C`,data:[d,f,p,m,e,a]}),s=o,c=l,r=e,i=a;break}case`Q`:{let[e,n,a,o]=u,l=r+2*(e-r)/3,d=i+2*(n-i)/3,f=a+2*(e-a)/3,p=o+2*(n-o)/3;t.push({key:`C`,data:[l,d,f,p,a,o]}),s=e,c=n,r=a,i=o;break}case`A`:{let e=Math.abs(u[0]),n=Math.abs(u[1]),a=u[2],o=u[3],s=u[4],c=u[5],l=u[6];e===0||n===0?(t.push({key:`C`,data:[r,i,c,l,c,l]}),r=c,i=l):(r!==c||i!==l)&&(zi(r,i,c,l,e,n,a,o,s).forEach(function(e){t.push({key:`C`,data:e})}),r=c,i=l);break}case`Z`:t.push({key:`Z`,data:[]}),r=a,i=o}n=l}return t}function Li(e){return Math.PI*e/180}function Ri(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function zi(e,t,n,r,i,a,o,s,c,l){let u=Li(o),d=[],f=0,p=0,m=0,h=0;if(l)[f,p,m,h]=l;else{[e,t]=Ri(e,t,-u),[n,r]=Ri(n,r,-u);let o=(e-n)/2,l=(t-r)/2,d=o*o/(i*i)+l*l/(a*a);d>1&&(d=Math.sqrt(d),i=d*i,a=d*a);let g=s===c?-1:1,_=i*i,v=a*a,y=_*v-_*l*l-v*o*o,b=_*l*l+v*o*o,x=g*Math.sqrt(Math.abs(y/b));m=x*i*l/a+(e+n)/2,h=x*-a*o/i+(t+r)/2,f=Math.asin(parseFloat(((t-h)/a).toFixed(9))),p=Math.asin(parseFloat(((r-h)/a).toFixed(9))),ep&&(f-=Math.PI*2),!c&&p>f&&(p-=Math.PI*2)}let g=p-f;if(Math.abs(g)>Math.PI*120/180){let e=p,t=n,s=r;p=c&&p>f?f+Math.PI*120/180*1:f+Math.PI*120/180*-1,n=m+i*Math.cos(p),r=h+a*Math.sin(p),d=zi(n,r,t,s,i,a,o,0,c,[p,e,m,h])}g=p-f;let _=Math.cos(f),v=Math.sin(f),y=Math.cos(p),b=Math.sin(p),x=Math.tan(g/4),S=4/3*i*x,C=4/3*a*x,w=[e,t],T=[e+S*v,t-C*_],E=[n+S*b,r-C*y],ee=[n,r];if(T[0]=2*w[0]-T[0],T[1]=2*w[1]-T[1],l)return[T,E,ee].concat(d);{d=[T,E,ee].concat(d);let e=[];for(let t=0;t2){let i=[];for(let t=0;tMath.PI*2&&(p=0,m=Math.PI*2);let h=Math.PI*2/c.curveStepCount,g=Math.min(h/2,(m-p)/2),_=la(g,l,u,d,f,p,m,1,c);if(!c.disableMultiStroke){let e=la(g,l,u,d,f,p,m,1.5,c);_.push(...e)}return o&&(s?_.push(...X(l,u,l+d*Math.cos(p),u+f*Math.sin(p),c),...X(l,u,l+d*Math.cos(m),u+f*Math.sin(m),c)):_.push({op:`lineTo`,data:[l,u]},{op:`lineTo`,data:[l+d*Math.cos(p),u+f*Math.sin(p)]})),{type:`path`,ops:_}}function Yi(e,t){let n=Ii(Fi(Pi(e))),r=[],i=[0,0],a=[0,0];for(let{key:e,data:o}of n)switch(e){case`M`:a=[o[0],o[1]],i=[o[0],o[1]];break;case`L`:r.push(...X(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case`C`:{let[e,n,i,s,c,l]=o;r.push(...ua(e,n,i,s,c,l,a,t)),a=[c,l];break}case`Z`:r.push(...X(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:`path`,ops:r}}function Xi(e,t){let n=[];for(let r of e)if(r.length){let e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:`move`,data:[r[0][0]+Y(e,t),r[0][1]+Y(e,t)]});for(let a=1;aMath.PI*2&&(d=0,f=Math.PI*2);let p=(f-d)/o.curveStepCount,m=[];for(let e=d;e<=f;e+=p)m.push([s+l*Math.cos(e),c+u*Math.sin(e)]);return m.push([s+l*Math.cos(f),c+u*Math.sin(f)]),m.push([s,c]),Zi([m],o)}function $i(e,t){return Y(e,t)}function ea(e,t,n){return ia(e,t,n)}function ta(e,t,n,r,i){return X(e,t,n,r,i,!0)}function na(e){let t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function ra(e){return e.randomizer||=new pi(e.seed||0),e.randomizer.next()}function ia(e,t,n,r=1){return n.roughness*r*(ra(n)*(t-e)+e)}function Y(e,t,n=1){return ia(-e,e,t,n)}function X(e,t,n,r,i,a=!1){let o=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=aa(e,t,n,r,i,!0,!1);if(o)return s;let c=aa(e,t,n,r,i,!0,!0);return s.concat(c)}function aa(e,t,n,r,i,a,o){let s=(e-n)**2+(t-r)**2,c=Math.sqrt(s),l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>s&&(u=c/10);let d=u/2,f=.2+ra(i)*.2,p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=Y(p,i,l),m=Y(m,i,l);let h=[],g=()=>Y(d,i,l),_=()=>Y(u,i,l),v=i.preserveVertices;return a&&(o?h.push({op:`move`,data:[e+(v?0:g()),t+(v?0:g())]}):h.push({op:`move`,data:[e+(v?0:Y(u,i,l)),t+(v?0:Y(u,i,l))]})),o?h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+g(),m+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),m+t+2*(r-t)*f+g(),n+(v?0:g()),r+(v?0:g())]}):h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+_(),m+t+(r-t)*f+_(),p+e+2*(n-e)*f+_(),m+t+2*(r-t)*f+_(),n+(v?0:_()),r+(v?0:_())]}),h}function oa(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+Y(t,n),e[0][1]+Y(t,n)]),r.push([e[0][0]+Y(t,n),e[0][1]+Y(t,n)]);for(let i=1;i3){let a=[],o=1-n.curveTightness;i.push({op:`move`,data:[e[1][0],e[1][1]]});for(let t=1;t+21&&i.push(n):i.push(n),i.push(e[t+3])}else{let r=.5,a=e[t+0],o=e[t+1],s=e[t+2],c=e[t+3],l=ga(a,o,r),u=ga(o,s,r),d=ga(s,c,r),f=ga(l,u,r),p=ga(u,d,r),m=ga(f,p,r);va([a,l,f,m],0,n,i),va([m,p,d,c],0,n,i)}return i}function ya(e,t){return ba(e,0,e.length,t)}function ba(e,t,n,r,i){let a=i||[],o=e[t],s=e[n-1],c=0,l=1;for(let r=t+1;rc&&(c=t,l=r)}return Math.sqrt(c)>r?(ba(e,t,l+1,r,a),ba(e,l,n,r,a)):(a.length||a.push(o),a.push(s)),a}function xa(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let n=0;n0?ba(r,0,r.length,n):r}function Sa(e,t,n){let r=Ii(Fi(Pi(e))),i=[],a=[],o=[0,0],s=[],c=()=>{s.length>=4&&a.push(...xa(s,t)),s=[]},l=()=>{c(),a.length&&(i.push(a),a=[])};for(let{key:e,data:t}of r)switch(e){case`M`:l(),o=[t[0],t[1]],a.push(o);break;case`L`:c(),a.push([t[0],t[1]]);break;case`C`:if(!s.length){let e=a.length?a[a.length-1]:o;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case`Z`:c(),a.push([o[0],o[1]])}if(l(),!n)return i;let u=[];for(let e of i){let t=ya(e,n);t.length&&u.push(t)}return u}var Z=`none`,Ca=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:`#000`,strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return fi()}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){let a=this._o(i);return this._d(`line`,[J(e,t,n,r,a)],a)}rectangle(e,t,n,r,i){let a=this._o(i),o=[],s=Ui(e,t,n,r,a);if(a.fill){let i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];a.fillStyle===`solid`?o.push(Xi([i],a)):o.push(Zi([i],a))}return a.stroke!==Z&&o.push(s),this._d(`rectangle`,o,a)}ellipse(e,t,n,r,i){let a=this._o(i),o=[],s=Ki(n,r,a),c=qi(e,t,a,s);if(a.fill){if(a.fillStyle===`solid`){let n=qi(e,t,a,s).opset;n.type=`fillPath`,o.push(n)}else o.push(Zi([c.estimatedPoints],a))}return a.stroke!==Z&&o.push(c.opset),this._d(`ellipse`,o,a)}circle(e,t,n,r){let i=this.ellipse(e,t,n,n,r);return i.shape=`circle`,i}linearPath(e,t){let n=this._o(t);return this._d(`linearPath`,[Vi(e,!1,n)],n)}arc(e,t,n,r,i,a,o=!1,s){let c=this._o(s),l=[],u=Ji(e,t,n,r,i,a,o,!0,c);if(o&&c.fill){if(c.fillStyle===`solid`){let o=Object.assign({},c);o.disableMultiStroke=!0;let s=Ji(e,t,n,r,i,a,!0,!1,o);s.type=`fillPath`,l.push(s)}else l.push(Qi(e,t,n,r,i,a,c))}return c.stroke!==Z&&l.push(u),this._d(`arc`,l,c)}curve(e,t){let n=this._o(t),r=[],i=Wi(e,n);if(n.fill&&n.fill!==Z){if(n.fillStyle===`solid`){let t=Wi(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else{let t=[],i=e;if(i.length){let e=typeof i[0][0]==`number`?[i]:i;for(let r of e)r.length<3?t.push(...r):r.length===3?t.push(...xa(fa([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...xa(fa(r),10,(1+n.roughness)/2))}t.length&&r.push(Zi([t],n))}}return n.stroke!==Z&&r.push(i),this._d(`curve`,r,n)}polygon(e,t){let n=this._o(t),r=[],i=Vi(e,!0,n);return n.fill&&(n.fillStyle===`solid`?r.push(Xi([e],n)):r.push(Zi([e],n))),n.stroke!==Z&&r.push(i),this._d(`polygon`,r,n)}path(e,t){let n=this._o(t),r=[];if(!e)return this._d(`path`,r,n);e=(e||``).replace(/\n/g,` `).replace(/(-\s)/g,`-`).replace(`/(ss)/g`,` `);let i=n.fill&&n.fill!==`transparent`&&n.fill!==Z,a=n.stroke!==Z,o=!!(n.simplification&&n.simplification<1),s=o?4-4*(n.simplification||1):(1+n.roughness)/2,c=Sa(e,1,s),l=Yi(e,n);if(i){if(n.fillStyle===`solid`){if(c.length===1){let t=Yi(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else r.push(Xi(c,n))}else r.push(Zi(c,n))}return a&&(o?c.forEach(e=>{r.push(Vi(e,!1,n))}):r.push(l)),this._d(`path`,r,n)}opsToPath(e,t){let n=``;for(let r of e.ops){let e=typeof t==`number`&&t>=0?r.data.map(e=>+e.toFixed(t)):r.data;switch(r.op){case`move`:n+=`M${e[0]} ${e[1]} `;break;case`bcurveTo`:n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case`lineTo`:n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){let t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(let e of t){let t=null;switch(e.type){case`path`:t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Z};break;case`fillPath`:t={d:this.opsToPath(e),stroke:Z,strokeWidth:0,fill:n.fill||Z};break;case`fillSketch`:t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||Z,strokeWidth:n,fill:Z}}_mergedShape(e){return e.filter((e,t)=>t===0||e.op!==`move`)}},wa=`http://www.w3.org/2000/svg`,Ta=800,Ea=null;function Da(){return Ea||=new Ca().defaultOptions,Ea}function Oa(e,t,n){return{...Da(),maxRandomnessOffset:2,roughness:e===`highlight`?3:1.5,bowing:1,stroke:`#000`,strokeWidth:1.5,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,disableMultiStroke:e!==`double`,disableMultiStrokeFill:!1,seed:t,...n}}function ka(e){let t=e.padding;if(t||t===0){if(typeof t==`number`)return[t,t,t,t];if(Array.isArray(t)){let e=t;if(e.length)switch(e.length){case 4:return[...e];case 1:return[e[0],e[0],e[0],e[0]];case 2:return[...e,...e];case 3:return[...e,e[1]];default:return[e[0],e[1],e[2],e[3]]}}}return[5,5,5,5]}function Aa(e,t,n,r,i,a){let o=[],s=n.strokeWidth||2,c=ka(n),l=n.animate===void 0||!!n.animate,u=n.iterations||2,d=+!!n.rtl,f=Oa(`single`,a,n);switch(n.type){case`underline`:{let e=t.y+t.h+c[2];for(let n=d;ne.setAttribute(t,n);for(let r of t){let t=document.createElementNS(wa,`path`);if(d(t,`d`,r),d(t,`fill`,`none`),d(t,`stroke`,n.color||`currentColor`),d(t,`stroke-width`,`${s}`),n.opacity!==void 0&&d(t,`style`,`opacity:${n.opacity}`),l){let e=t.getTotalLength();a.push(e),u+=e}e.appendChild(t),c.push(t)}if(l){let e=0;for(let t=0;tsetTimeout(t,e))}function Ma(e){let t=[];for(let n of e){let e=``;for(let r of n.ops){let n=r.data;switch(r.op){case`move`:e.trim()&&t.push(e.trim()),e=`M${n[0]} ${n[1]} `;break;case`bcurveTo`:e+=`C${n[0]} ${n[1]}, ${n[2]} ${n[3]}, ${n[4]} ${n[5]} `;break;case`lineTo`:e+=`L${n[0]} ${n[1]} `}}e.trim()&&t.push(e.trim())}return t}function Na(){if(!window.__rno_kf_s){let e=window.__rno_kf_s=document.createElement(`style`);e.textContent=`@keyframes rough-notation-dash { to { stroke-dashoffset: 0; } }`,document.head.appendChild(e)}}var Pa=Object.defineProperty,Fa=(e,t,n)=>t in e?Pa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q=(e,t,n)=>(Fa(e,typeof t==`symbol`?t:t+``,n),n),Ia=class{constructor(e,t){Q(this,`_state`,`unattached`),Q(this,`_config`),Q(this,`_resizing`,!1),Q(this,`_ro`),Q(this,`_seed`,fi()),Q(this,`_e`),Q(this,`_svg`),Q(this,`_lastSizes`,[]),Q(this,`_animationDelay`,0),Q(this,`_resizeListener`,()=>{this._resizing||(this._resizing=!0,setTimeout(()=>{this._resizing=!1,this._state===`showing`&&this.haveRectsChanged()&&this.show()},400))}),Q(this,`pendingRefresh`),this._e=e,this._config=JSON.parse(JSON.stringify(t)),this.attach()}getConfig(e){return this._config[e]}setConfig(e,t){this._config[e]!==t&&(this._config[e]=t,this.refresh())}get animate(){return this._config.animate}set animate(e){this._config.animate=e}get animationDuration(){return this._config.animationDuration}set animationDuration(e){this._config.animationDuration=e}get iterations(){return this._config.iterations}set iterations(e){this._config.iterations=e}get color(){return this._config.color}set color(e){this._config.color!==e&&(this._config.color=e,this.refresh())}get class(){return this._config.class}set class(e){this._config.class!==e&&(this._config.class=e,this._svg&&this._svg.setAttribute(`class`,[`rough-annotation`,this._config.class||``].filter(Boolean).join(` `)))}get strokeWidth(){return this._config.strokeWidth}set strokeWidth(e){this._config.strokeWidth!==e&&(this._config.strokeWidth=e,this.refresh())}get padding(){return this._config.padding}set padding(e){this._config.padding!==e&&(this._config.padding=e,this.refresh())}attach(){if(this._state===`unattached`&&this._e.parentElement){Na();let e=this._svg=document.createElementNS(wa,`svg`);e.setAttribute(`class`,[`rough-annotation`,this._config.class||``].filter(Boolean).join(` `));let t=e.style;t.position=`absolute`,t.top=`0`,t.left=`0`,t.overflow=`visible`,t.pointerEvents=`none`,t.width=`100px`,t.height=`100px`;let n=this._config.type===`highlight`;if(this._e.insertAdjacentElement(n?`beforebegin`:`afterend`,e),this._state=`not-showing`,n){let e=window.getComputedStyle(this._e).position;(!e||e===`static`)&&(this._e.style.position=`relative`)}this.attachListeners()}}detachListeners(){window.removeEventListener(`resize`,this._resizeListener),this._ro&&this._ro.unobserve(this._e)}attachListeners(){this.detachListeners(),window.addEventListener(`resize`,this._resizeListener,{passive:!0}),!this._ro&&`ResizeObserver`in window&&(this._ro=new window.ResizeObserver(e=>{for(let t of e)t.contentRect&&this._resizeListener()})),this._ro&&this._ro.observe(this._e)}haveRectsChanged(){if(this._lastSizes.length){let e=this.rects();if(e.length===this._lastSizes.length){for(let t=0;tMath.round(e)===Math.round(t);return n(e.x,t.x)&&n(e.y,t.y)&&n(e.w,t.w)&&n(e.h,t.h)}isShowing(){return this._state!==`not-showing`}refresh(){this.isShowing()&&!this.pendingRefresh&&(this.pendingRefresh=Promise.resolve().then(()=>{this.isShowing()&&this.show(),delete this.pendingRefresh}))}async show(){switch(this._state){case`unattached`:break;case`showing`:this.hide(),this._svg&&await this.render(this._svg,!0);break;case`not-showing`:this.attach(),this._svg&&await this.render(this._svg,!1)}}hide(){if(this._svg)for(;this._svg.lastChild;)this._svg.removeChild(this._svg.lastChild);this._state=`not-showing`}remove(){this._svg&&this._svg.parentElement&&this._svg.parentElement.removeChild(this._svg),this._svg=void 0,this._state=`unattached`,this.detachListeners()}async render(e,t){let n=this._config;t&&(n=JSON.parse(JSON.stringify(this._config)),n.animate=!1);let r=this.rects(),i=0;r.forEach(e=>i+=e.w);let a=n.animationDuration||Ta,o=0,s=[];for(let t=0;tObject.assign(e,{type:`box`}),circle:e=>Object.assign(e,{type:`circle`}),underline:e=>Object.assign(e,{type:`underline`}),highlight:e=>Object.assign(e,{type:`highlight`}),"strike-through":e=>Object.assign(e,{type:`strike-through`}),"crossed-off":e=>Object.assign(e,{type:`crossed-off`}),bracket:e=>Object.assign(e,{type:`bracket`}),strike:e=>Object.assign(e,{type:`strike-through`}),cross:e=>Object.assign(e,{type:`crossed-off`}),crossed:e=>Object.assign(e,{type:`crossed-off`}),linethrough:e=>Object.assign(e,{type:`strike-through`}),"line-through":e=>Object.assign(e,{type:`strike-through`}),black:e=>$(e,`text-black`),blue:e=>$(e,`text-blue`),cyan:e=>$(e,`text-cyan`),gray:e=>$(e,`text-gray`),green:e=>$(e,`text-green`),indigo:e=>$(e,`text-indigo`),lime:e=>$(e,`text-lime`),orange:e=>$(e,`text-orange`),pink:e=>$(e,`text-pink`),purple:e=>$(e,`text-purple`),red:e=>$(e,`text-red`),teal:e=>$(e,`text-teal`),white:e=>$(e,`text-white`),yellow:e=>$(e,`text-yellow`)},za=[[/^delay-?(\d+)?$/,(e,t,n)=>(t.delay=(e[1]?Number.parseInt(e[1]):n)||300,t)],[/^(?:op|opacity)-?(\d+)?$/,(e,t,n)=>(t.opacity=((e[1]?Number.parseInt(e[1]):n)||100)/100,t)]];function Ba(){return{install(e){e.directive(`mark`,{name:`v-mark`,mounted:(e,t)=>{let{isPrintMode:n}=ue(),r=m(()=>{let e=typeof t.value==`object`&&!Array.isArray(t.value)?{...t.value}:{at:t.value},r={at:e.at},i=Object.entries(t.modifiers).filter(([e,t])=>{if(Ra[e])return r=Ra[e](r,t),!1;for(let[n,i]of za){let a=e.match(n);if(a)return r=i(a,r,t),!1}return!0});i.length&&console.warn(`[Slidev] Invalid modifiers for v-mark:`,i);let a={...r,...e};return a.type||=`underline`,n.value&&(a.animationDuration=1),a}),i=La(e,r.value),a=ri(e,t,r.value.at);if(!a){i.show();return}e.watchStopHandle=c(()=>{let e;r.value.class&&(i.class=r.value.class),r.value.color&&(i.color=r.value.color);let t=r.value.at;e=t===!0||t!==!1&&a.isActive.value,e!=null&&(e?i.show():i.hide())})},unmounted:e=>{e.watchStopHandle?.()}})}}}function Va(){return{install(e){let t=xe();e.directive(`motion`,{name:`v-motion`,mounted(e,n,r,i){let a=Qr(n,Oe),o=Qr(n,ke),s=Qr(n,Me),{currentPage:c,clicks:l,isPrintMode:u}=ue(),f=r.props={...r.props},p={...f.initial,...f.variants?.[`slidev-initial`]},m={...f.enter,...f.variants?.[`slidev-enter`]},h={...f.leave,...f.variants?.[`slidev-leave`]};delete f.initial,delete f.enter,delete f.leave;let g=`${yr()}-`,_=[];for(let e of Object.keys(f))if(e.startsWith(`click-`)){let t=e.slice(6),n=t.includes(`-`)?t.split(`-`).map(Number):+t,r=g+t;_.push({id:r,at:n,variant:{...f[e]},info:a?.value.calculate(n)}),delete f[e]}_.sort((e,t)=>(Array.isArray(e.at)?e.at[0]:e.at)-(Array.isArray(t.at)?t.at[0]:t.at)),t.created(e,n,r,i),t.mounted(e,n,r,i);let v=e.motionInstance;v.clickIds=_.map(e=>e.id),v.set(p),v.watchStopHandle=d([o,c,l].filter(Boolean),()=>{let t=ni.get(e)?.visibilityState.value??`shown`;if(!a?.value||![`slide`,`presenter`].includes(s?.value??``)){let e={...p,...m};for(let{variant:t}of _)Object.assign(e,t);v.set(e)}else if(u.value||o?.value===c.value){if(t===`shown`){let e={...p,...m};for(let{variant:t,info:n}of _)(!n||n.isActive.value)&&Object.assign(e,t);u.value?v.set(e):v.apply(e)}else v.apply(t===`before`?p:h)}else v.apply((o?.value??-1)>c.value?p:h)},{immediate:!0})},unmounted(e){e.motionInstance.watchStopHandle()}})}}}var Ha=Object.assign({}),Ua=Object.assign({}),Wa=Object.assign({}),Ga=[Object.values(Ha)[0],Object.values(Ua)[0],Object.values(Wa)[0]].filter(Boolean);function Ka(){let e=[];function t(e){if(!E.remote||E.remote===e.query.password)return!0;if(E.remote&&e.query.password===void 0){let e=prompt(`Enter password`);if(E.remote===e)return!0}return e.params.no?{path:`/${e.params.no}`}:{path:``}}return e.push({name:`entry`,path:`/entry`,component:()=>j(()=>import(`./slidev/entry-C7SFAt6v.js`),__vite__mapDeps([2,3,1,4,5,6])),beforeEnter:t},{name:`overview`,path:`/overview`,component:()=>j(()=>import(`./slidev/overview-GwLNj2Wj.js`),__vite__mapDeps([7,3,1,4,8,9,5,10,11,12,13,14,15,16,17,18,19,20,21])),beforeEnter:t},{name:`notes`,path:`/notes`,component:()=>j(()=>import(`./slidev/notes-FMbByPOo.js`),__vite__mapDeps([22,3,1,4,8,9,5,10,11,12,23,13,14,24])),beforeEnter:t},{name:`notes-edit`,path:`/notes-edit`,component:()=>j(()=>import(`./slidev/notes-edit-BEK9xtMD.js`),__vite__mapDeps([25,3,1,4,8,9,5,10,11,12,23])),beforeEnter:t},{name:`presenter`,path:`/presenter/:no`,component:()=>j(()=>import(`./slidev/presenter-BvM1iukx.js`),__vite__mapDeps([26,3,1,4,8,9,5,10,11,18,27,12,28,29,13,14,24,16,17,19,20,30,31,32])),beforeEnter:t},{path:`/presenter`,redirect:{path:`/presenter/1`}}),e.push({name:`play`,path:`/:no`,component:()=>j(()=>import(`./slidev/play-imIlfZCb.js`),__vite__mapDeps([33,3,1,4,8,9,5,10,11,18,23,15,16,17,19,30,12,28,31,34]))},{path:``,redirect:{path:`/1`}},{path:`/:pathMatch(.*)*`,name:`NotFound`,component:()=>j(()=>import(`./slidev/404-DBEk8rxH.js`),__vite__mapDeps([35,3,1,4,8,9,5,10,11,36]))}),Ga.reduce((e,t)=>t(e),e)}async function qa(e){function t(){document.documentElement.style.setProperty(`--vh`,`${window.innerHeight*.01}px`)}t(),window.addEventListener(`resize`,t);let n=ge({history:_e(`/lecture-01/`),routes:Ka()});e.use(n),e.use(Gr()),e.use(ti()),e.use(Ba()),e.use(di()),e.use(Va()),e.use(S,{container:`#twoslash-container`});let r={app:e,router:n};for(let e of Yr)await e(r)}async function Ja(){let e=x(Ir);await qa(e),e.mount(`#app`)}Ja();export{Xr as a,Cr as c,Vt as d,Ht as f,Zr as i,Tr as l,jt as m,oi as n,Pr as o,Ut as p,ai as r,Er as s,ci as t,yr as u}; \ No newline at end of file diff --git a/lecture-01/assets/info-DKCQHKI2-33YBBPSM-Bpamt84E.js b/lecture-01/assets/info-DKCQHKI2-33YBBPSM-Bpamt84E.js new file mode 100644 index 0000000000000000000000000000000000000000..8fca355793ef9dbf14494aa54755f20562edb904 --- /dev/null +++ b/lecture-01/assets/info-DKCQHKI2-33YBBPSM-Bpamt84E.js @@ -0,0 +1 @@ +import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as e}from"./chunk-6OZ7KPF7-CpRlDBGl.js";export{e as createInfoServices}; \ No newline at end of file diff --git a/lecture-01/assets/infoDiagram-5L6ZSEJH-BCBEYMTq.js b/lecture-01/assets/infoDiagram-5L6ZSEJH-BCBEYMTq.js new file mode 100644 index 0000000000000000000000000000000000000000..35af9b69eba1b7b636f37f100b7cd02eb9f36243 --- /dev/null +++ b/lecture-01/assets/infoDiagram-5L6ZSEJH-BCBEYMTq.js @@ -0,0 +1,2 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as t}from"./chunk-FO5PYUIK-CPzj2963.js";import{l as n}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as r}from"./chunk-BPTLHSDI-QRS_xuYz.js";import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as i}from"./chunk-BQKPLVCE-CH-bQZj9.js";import"./chunk-NYCIP5HP-BZs_nZUU.js";import"./chunk-6QIBY7DQ-xR0SR3RB.js";import"./chunk-SLCUJWJ3-Bzf1BoPP.js";import"./chunk-43ACQNTO-CVHKukau.js";import"./chunk-FXRKSSP6-BDxrggHz.js";import"./chunk-RRYK4PFG-DZMcopsb.js";import"./chunk-IT6C5QXO-BI6Sf-cR.js";import"./chunk-GMJQP6DO-gEw8rKqu.js";import"./chunk-ODPFZSHR-BUzFQ4Zq.js";import"./chunk-6OZ7KPF7-CpRlDBGl.js";import"./chunk-LJTN6OYE-BTsXVLFU.js";import"./chunk-Z6Q54H3S-B8XyqzVF.js";import"./chunk-4KMQCWFH-ClzK3uec.js";import"./chunk-S7Q6ZHN2-CSIi0_Nw.js";import"./chunk-IIWGMRJM-k15frrBU.js";var a={parse:e(async e=>{let n=await i(`info`,e);t.debug(n)},`parse`)},o={version:`11.16.1`},s={parser:a,db:{getVersion:e(()=>o.version,`getVersion`)},renderer:{draw:e((e,i,a)=>{t.debug(`rendering info diagram +`+e);let o=r(i);n(o,100,400,!0),o.append(`g`).append(`text`).attr(`x`,100).attr(`y`,40).attr(`class`,`version`).attr(`font-size`,32).style(`text-anchor`,`middle`).text(`v${a}`)},`draw`)}};export{s as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/interactive-BvK9MKgy.css b/lecture-01/assets/interactive-BvK9MKgy.css new file mode 100644 index 0000000000000000000000000000000000000000..1834abfdb590113fd8cac3a0eea4b98dd03777f6 --- /dev/null +++ b/lecture-01/assets/interactive-BvK9MKgy.css @@ -0,0 +1 @@ +.dl-interactive[data-v-cefd36d3]{flex-direction:column;display:flex}.dl-interactive__title[data-v-cefd36d3]{margin-bottom:.7rem}.dl-interactive__grid[data-v-cefd36d3]{flex:auto;align-items:stretch;gap:1.6rem;min-height:0;display:flex}.dl-interactive__grid.is-aside-left[data-v-cefd36d3]{flex-direction:row-reverse}.dl-interactive__stage[data-v-cefd36d3]{flex:auto;justify-content:center;align-items:center;min-width:0;display:flex}.dl-interactive__aside[data-v-cefd36d3]{font-size:var(--dl-fs-secondary);flex-grow:0;flex-shrink:0;overflow-y:auto}.dl-interactive__aside[data-v-cefd36d3]:empty{display:none} diff --git a/lecture-01/assets/interactive-CJ_TWtJM.js b/lecture-01/assets/interactive-CJ_TWtJM.js new file mode 100644 index 0000000000000000000000000000000000000000..a45b70cfa420f3501c762e1fa5cfd48a74838ffb --- /dev/null +++ b/lecture-01/assets/interactive-CJ_TWtJM.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,St as r,T as i,U as a,_ as o,b as s,bt as c,y as l}from"./modules/shiki-CJZsCeMT.js";import{t as u}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as d}from"./slidev/context-C6dxaFaS.js";import{t as f}from"./DeckFooter-BcBH6IgO.js";var p={class:`slidev-layout dl-interactive`},m={key:0,class:`dl-interactive__title`},h={class:`dl-interactive__stage`},g=u(i({__name:`interactive`,props:{title:{},asideWidth:{},asideLeft:{type:Boolean}},setup(i){let{$slidev:u,$nav:g,$clicksContext:_,$clicks:v,$page:y,$renderContext:b,$frontmatter:x}=d(),S=i;return(i,u)=>{let d=f;return e(),s(`div`,p,[S.title?(e(),s(`h1`,m,n(S.title),1)):l(`v-if`,!0),o(`div`,{class:c([`dl-interactive__grid`,{"is-aside-left":S.asideLeft}])},[o(`div`,h,[a(i.$slots,`default`,{},void 0,!0)]),o(`div`,{class:`dl-interactive__aside`,style:r({flexBasis:S.asideWidth??`17rem`})},[a(i.$slots,`aside`,{},void 0,!0)],4)],2),t(d)])}}}),[[`__scopeId`,`data-v-cefd36d3`]]);export{g as t}; \ No newline at end of file diff --git a/lecture-01/assets/ishikawaDiagram-4HUKQSDW-CwlIZKDp.js b/lecture-01/assets/ishikawaDiagram-4HUKQSDW-CwlIZKDp.js new file mode 100644 index 0000000000000000000000000000000000000000..23fcd12eb7b06a0aa3e550c50b37f8f7c7d91349 --- /dev/null +++ b/lecture-01/assets/ishikawaDiagram-4HUKQSDW-CwlIZKDp.js @@ -0,0 +1,70 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import"./chunk-FO5PYUIK-CPzj2963.js";import{C as t,E as n,J as r,Q as i,Y as a,b as o,c as s,l as c,o as l,x as u}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as d}from"./chunk-BPTLHSDI-QRS_xuYz.js";import{t as f}from"./chunk-PLCLPJVV-BfMyJHbe.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{h as p}from"./chunk-OX6ZKUVE-roiHi12N.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim())}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};h.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},`anonymous`),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}})();function g(){this.yy={}}return e(g,`Parser`),g.prototype=h,h.Parser=g,new g})();m.parser=m;var h=m,g=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{e(this,`IshikawaDB`)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,l()}getRoot(){return this.root}addNode(e,n){let r=s.sanitizeText(n,t());if(!this.root){this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],i(r);return}this.baseLevel??=e;let a=e-this.baseLevel+1;for(a<=0&&(a=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=a;)this.stack.pop();let o=this.stack[this.stack.length-1].node,c={text:r,children:[]};o.children.push(c),this.stack.push({level:a,node:c})}getAccTitle(){return u()}setAccTitle(e){a(e)}getAccDescription(){return o()}setAccDescription(e){r(e)}getDiagramTitle(){return n()}setDiagramTitle(e){i(e)}},_=14,v=250,y=30,b=60,x=5,S=82*Math.PI/180,C=Math.cos(S),w=Math.sin(S),T=e((e,t,n)=>{let r=e.node().getBBox(),i=r.width+t*2,a=r.height+t*2;c(e,a,i,n),e.attr(`viewBox`,`${r.x-t} ${r.y-t} ${i} ${a}`)},`applyPaddedViewBox`),E=e((e,n,r,i)=>{let a=i.db.getRoot();if(!a)return;let o=t(),{look:s,handDrawnSeed:c,themeVariables:l}=o,u=p(o.fontSize)[0]??_,m=s===`handDrawn`,h=a.children??[],g=o.ishikawa?.diagramPadding??20,y=o.ishikawa?.useMaxWidth??!1,b=d(n),x=b.append(`g`).attr(`class`,`ishikawa`),S=m?f.svg(b.node()):void 0,C=S?{roughSvg:S,seed:c??0,lineColor:l?.lineColor??`#333`,fillColor:l?.mainBkg??`#fff`}:void 0,w=`ishikawa-arrow-${n}`;m||x.append(`defs`).append(`marker`).attr(`id`,w).attr(`viewBox`,`0 0 10 10`).attr(`refX`,0).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 Z`).attr(`class`,`ishikawa-arrow`);let E=0,k=v,A=m?void 0:L(x,E,k,E,k,`ishikawa-spine`);if(O(x,E,k,a.text,u,C),!h.length){m&&L(x,E,k,E,k,`ishikawa-spine`,C),T(b,g,y);return}E-=20;let j=h.filter((e,t)=>t%2==0),N=h.filter((e,t)=>t%2==1),P=D(j),F=D(N),I=P.total+F.total,R=v,z=v;if(I>0){let e=v*2,t=v*.3;R=Math.max(t,e*(P.total/I)),z=Math.max(t,e*(F.total/I))}let B=u*2;R=Math.max(R,P.max*B),z=Math.max(z,F.max*B),k=Math.max(R,v),A&&A.attr(`y1`,k).attr(`y2`,k),x.select(`.ishikawa-head-group`).attr(`transform`,`translate(0,${k})`);let V=Math.ceil(h.length/2);for(let e=0;eMath.min(e,t.getBBox().x),1/0)}if(m)L(x,E,k,0,k,`ishikawa-spine`,C);else{A.attr(`x1`,E);let e=`url(#${w})`;x.selectAll(`line.ishikawa-branch, line.ishikawa-sub-branch`).attr(`marker-start`,e)}T(b,g,y)},`draw`),D=e(t=>{let n=e(e=>e.children.reduce((e,t)=>e+1+n(t),0),`countDescendants`);return t.reduce((e,t)=>{let r=n(t);return e.total+=r,e.max=Math.max(e.max,r),e},{total:0,max:0})},`sideStats`),O=e((e,t,n,r,i,a)=>{let o=Math.max(6,Math.floor(110/(i*.6))),s=e.append(`g`).attr(`class`,`ishikawa-head-group`).attr(`transform`,`translate(${t},${n})`),c=F(s,P(r,o),0,0,`ishikawa-head-label`,`start`,i),l=c.node().getBBox(),u=Math.max(60,l.width+6),d=Math.max(40,l.height*2+40),f=`M 0 ${-d/2} L 0 ${d/2} Q ${u*2.4} 0 0 ${-d/2} Z`;if(a){let e=a.roughSvg.path(f,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-head`)}else s.insert(`path`,`:first-child`).attr(`class`,`ishikawa-head`).attr(`d`,f);c.attr(`transform`,`translate(${(u-l.width)/2-l.x+3},${-l.y-l.height/2})`)},`drawHead`),k=e((t,n)=>{let r=[],i=[],a=e((e,t,o)=>{let s=n===-1?[...e].reverse():e;for(let e of s){let n=r.length,s=e.children??[];r.push({depth:o,text:P(e.text,15),parentIndex:t,childCount:s.length}),o%2==0?(i.push(n),s.length&&a(s,n,o+1)):(s.length&&a(s,n,o+1),i.push(n))}},`walk`);return a(t,-1,2),{entries:r,yOrder:i}},`flattenTree`),A=e((e,t,n,r,i,a,o)=>{let s=e.append(`g`).attr(`class`,`ishikawa-label-group`),c=F(s,t,n,r+11*i,`ishikawa-label cause`,`middle`,a).node().getBBox();if(o){let e=o.roughSvg.rectangle(c.x-20,c.y-2,c.width+40,c.height+4,{roughness:1.5,seed:o.seed,fill:o.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:o.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-label-box`)}else s.insert(`rect`,`:first-child`).attr(`class`,`ishikawa-label-box`).attr(`x`,c.x-20).attr(`y`,c.y-2).attr(`width`,c.width+40).attr(`height`,c.height+4)},`drawCauseLabel`),j=e((e,t,n,r,i,a)=>{let o=Math.sqrt(r*r+i*i);if(o===0)return;let s=r/o,c=i/o,l=-c*6,u=s*6,d=t,f=n,p=`M ${d} ${f} L ${d-s*6*2+l} ${f-c*6*2+u} L ${d-s*6*2-l} ${f-c*6*2-u} Z`,m=a.roughSvg.path(p,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:`solid`,stroke:a.lineColor,strokeWidth:1});e.append(()=>m)},`drawArrowMarker`),M=e((e,t,n,r,i,a,o,s)=>{let c=t.children??[],l=a*(c.length?1:.2),u=-C*l,d=w*l*i,f=n+u,p=r+d;if(L(e,n,r,f,p,`ishikawa-branch`,s),s&&j(e,n,r,n-f,r-p,s),A(e,t.text,f,p,i,o,s),!c.length)return;let{entries:m,yOrder:h}=k(c,i),g=m.length,_=Array(g);for(let[e,t]of h.entries())_[t]=r+d*((e+1)/(g+1));let v=new Map;v.set(-1,{x0:n,y0:r,x1:f,y1:p,childCount:c.length,childrenDrawn:0});let S=-C,T=w*i,E=i<0?`ishikawa-label up`:`ishikawa-label down`;for(let[t,n]of m.entries()){let r=_[t],i=v.get(n.parentIndex),a=e.append(`g`).attr(`class`,`ishikawa-sub-group`),c=0,l=0,u=0;if(n.depth%2==0){let e=i.y1-i.y0;c=I(i.x0,i.x1,e?(r-i.y0)/e:.5),l=r,u=c-(n.childCount>0?b+n.childCount*x:y),L(a,c,r,u,r,`ishikawa-sub-branch`,s),s&&j(a,c,r,1,0,s),F(a,n.text,u,r,`ishikawa-label align`,`end`,o)}else{let e=i.childrenDrawn++;c=I(i.x0,i.x1,(i.childCount-e)/(i.childCount+1)),l=i.y0,u=c+S*((r-l)/T),L(a,c,l,u,r,`ishikawa-sub-branch`,s),s&&j(a,c,l,c-u,l-r,s),F(a,n.text,u,r,E,`end`,o)}n.childCount>0&&v.set(t,{x0:c,y0:l,x1:u,y1:r,childCount:n.childCount,childrenDrawn:0})}},`drawBranch`),N=e(e=>e.split(/|\n/),`splitLines`),P=e((e,t)=>{if(e.length<=t)return e;let n=[];for(let r of e.split(/\s+/)){let e=n.length-1;e>=0&&n[e].length+1+r.length<=t?n[e]+=` `+r:n.push(r)}return n.join(` +`)},`wrapText`),F=e((e,t,n,r,i,a,o)=>{let s=N(t),c=o*1.05,l=e.append(`text`).attr(`class`,i).attr(`text-anchor`,a).attr(`x`,n).attr(`y`,r-(s.length-1)*c/2);for(let[e,t]of s.entries())l.append(`tspan`).attr(`x`,n).attr(`dy`,e===0?0:c).text(t);return l},`drawMultilineText`),I=e((e,t,n)=>e+(t-e)*n,`lerp`),L=e((e,t,n,r,i,a,o)=>{if(o){let s=o.roughSvg.line(t,n,r,i,{roughness:1.5,seed:o.seed,stroke:o.lineColor,strokeWidth:2});e.append(()=>s).attr(`class`,a);return}return e.append(`line`).attr(`class`,a).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i)},`drawLine`),R={parser:h,get db(){return new g},renderer:{draw:E},styles:e(e=>` +.ishikawa .ishikawa-spine, +.ishikawa .ishikawa-branch, +.ishikawa .ishikawa-sub-branch { + stroke: ${e.lineColor}; + stroke-width: 2; + fill: none; +} + +.ishikawa .ishikawa-sub-branch { + stroke-width: 1; +} + +.ishikawa .ishikawa-arrow { + fill: ${e.lineColor}; +} + +.ishikawa .ishikawa-head { + fill: ${e.mainBkg}; + stroke: ${e.lineColor}; + stroke-width: 2; +} + +.ishikawa .ishikawa-label-box { + fill: ${e.mainBkg}; + stroke: ${e.lineColor}; + stroke-width: 2; +} + +.ishikawa text { + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; + fill: ${e.textColor}; +} + +.ishikawa .ishikawa-head-label { + font-weight: 600; + text-anchor: middle; + dominant-baseline: middle; + font-size: 14px; +} + +.ishikawa .ishikawa-label { + text-anchor: end; +} + +.ishikawa .ishikawa-label.cause { + text-anchor: middle; + dominant-baseline: middle; +} + +.ishikawa .ishikawa-label.align { + text-anchor: end; + dominant-baseline: middle; +} + +.ishikawa .ishikawa-label.up { + dominant-baseline: baseline; +} + +.ishikawa .ishikawa-label.down { + dominant-baseline: hanging; +} +`,`getStyles`)};export{R as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/journeyDiagram-IW7LBXVP-CENhJOQU.js b/lecture-01/assets/journeyDiagram-IW7LBXVP-CENhJOQU.js new file mode 100644 index 0000000000000000000000000000000000000000..0cf0f3c31e32804fb26c11a43ca42248bbd37915 --- /dev/null +++ b/lecture-01/assets/journeyDiagram-IW7LBXVP-CENhJOQU.js @@ -0,0 +1,139 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as t,n}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as r,E as i,J as a,Q as o,Y as s,b as c,l,o as u,x as d}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{t as f}from"./chunk-RTBOCTTP-BZPyT8j-.js";import{a as p,n as m,o as h,s as g}from"./chunk-ZICDAICJ-CB44yeNY.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,16]},{15:[1,17]},t(n,[2,11]),t(n,[2,12]),{19:[1,18]},t(n,[2,4]),t(n,[2,9]),t(n,[2,10]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};l.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin(`acc_title`),12;case 8:return this.popState(),`acc_title_value`;case 9:return this.begin(`acc_descr`),14;case 10:return this.popState(),`acc_descr_value`;case 11:this.begin(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 17;case 15:return 18;case 16:return 19;case 17:return`:`;case 18:return 6;case 19:return`INVALID`}},`anonymous`),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}})();function u(){this.yy={}}return e(u,`Parser`),u.prototype=l,l.Parser=u,new u})();_.parser=_;var v=_,y=``,b=[],x=[],S=[],C=e(function(){b.length=0,x.length=0,y=``,S.length=0,u()},`clear`),w=e(function(e){y=e,b.push(e)},`addSection`),T=e(function(){return b},`getSections`),E=e(function(){let e=A(),t=0;for(;!e&&t<100;)e=A(),t++;return x.push(...S),x},`getTasks`),D=e(function(){let e=[];return x.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},`updateActors`),O=e(function(e,t){let n=t.substr(1).split(`:`),r=0,i=[];n.length===1?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(`,`));let a=i.map(e=>e.trim()),o={section:y,type:y,people:a,task:e,score:r};S.push(o)},`addTask`),k=e(function(e){let t={section:y,type:y,description:e,task:e,classes:[]};x.push(t)},`addTaskOrg`),A=e(function(){let t=e(function(e){return S[e].processed},`compileTask`),n=!0;for(let[e,r]of S.entries())t(e),n&&=r.processed;return n},`compileTasks`),j={getConfig:e(()=>r().journey,`getConfig`),clear:C,setDiagramTitle:o,getDiagramTitle:i,setAccTitle:s,getAccTitle:d,setAccDescription:a,getAccDescription:c,addSection:w,getSections:T,getTasks:E,addTask:O,addTaskOrg:k,getActors:e(function(){return D()},`getActors`)},M=e(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${e.textColor} + } + + .legend { + fill: ${e.textColor}; + font-family: ${e.fontFamily}; + } + + .label text { + fill: #333; + } + .label { + color: ${e.textColor} + } + + .face { + ${e.faceColor?`fill: ${e.faceColor}`:`fill: #FFF8DC`}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${e.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${e.fillType0?`fill: ${e.fillType0}`:``}; + } + .task-type-1, .section-type-1 { + ${e.fillType0?`fill: ${e.fillType1}`:``}; + } + .task-type-2, .section-type-2 { + ${e.fillType0?`fill: ${e.fillType2}`:``}; + } + .task-type-3, .section-type-3 { + ${e.fillType0?`fill: ${e.fillType3}`:``}; + } + .task-type-4, .section-type-4 { + ${e.fillType0?`fill: ${e.fillType4}`:``}; + } + .task-type-5, .section-type-5 { + ${e.fillType0?`fill: ${e.fillType5}`:``}; + } + .task-type-6, .section-type-6 { + ${e.fillType0?`fill: ${e.fillType6}`:``}; + } + .task-type-7, .section-type-7 { + ${e.fillType0?`fill: ${e.fillType7}`:``}; + } + + .actor-0 { + ${e.actor0?`fill: ${e.actor0}`:``}; + } + .actor-1 { + ${e.actor1?`fill: ${e.actor1}`:``}; + } + .actor-2 { + ${e.actor2?`fill: ${e.actor2}`:``}; + } + .actor-3 { + ${e.actor3?`fill: ${e.actor3}`:``}; + } + .actor-4 { + ${e.actor4?`fill: ${e.actor4}`:``}; + } + .actor-5 { + ${e.actor5?`fill: ${e.actor5}`:``}; + } + ${f()} +`,`getStyles`),N=e(function(e,t){return p(e,t)},`drawRect`),P=e(function(t,r){let i=t.append(`circle`).attr(`cx`,r.cx).attr(`cy`,r.cy).attr(`class`,`face`).attr(`r`,15).attr(`stroke-width`,2).attr(`overflow`,`visible`),a=t.append(`g`);a.append(`circle`).attr(`cx`,r.cx-5).attr(`cy`,r.cy-5).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`),a.append(`circle`).attr(`cx`,r.cx+5).attr(`cy`,r.cy-5).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`);function o(e){let t=n().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+r.cx+`,`+(r.cy+2)+`)`)}e(o,`smile`);function s(e){let t=n().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+r.cx+`,`+(r.cy+7)+`)`)}e(s,`sad`);function c(e){e.append(`line`).attr(`class`,`mouth`).attr(`stroke`,2).attr(`x1`,r.cx-5).attr(`y1`,r.cy+7).attr(`x2`,r.cx+5).attr(`y2`,r.cy+7).attr(`class`,`mouth`).attr(`stroke-width`,`1px`).attr(`stroke`,`#666`)}return e(c,`ambivalent`),r.score>3?o(a):r.score<3?s(a):c(a),i},`drawFace`),F=e(function(e,t){let n=e.append(`circle`);return n.attr(`cx`,t.cx),n.attr(`cy`,t.cy),n.attr(`class`,`actor-`+t.pos),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`r`,t.r),n.class!==void 0&&n.attr(`class`,n.class),t.title!==void 0&&n.append(`title`).text(t.title),n},`drawCircle`),I=e(function(e,t){return h(e,t)},`drawText`),L=e(function(t,n){function r(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}e(r,`genPoints`);let i=t.append(`polygon`);i.attr(`points`,r(n.x,n.y,50,20,7)),i.attr(`class`,`labelBox`),n.y+=n.labelMargin,n.x+=.5*n.labelMargin,I(t,n)},`drawLabel`),R=e(function(e,t,n){let r=e.append(`g`),i=g();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width*t.taskCount+n.diagramMarginX*(t.taskCount-1),i.height=n.height,i.class=`journey-section section-type-`+t.num,i.rx=3,i.ry=3,N(r,i),H(n)(t.text,r,i.x,i.y,i.width,i.height,{class:`journey-section section-type-`+t.num},n,t.colour)},`drawSection`),z=-1,B=e(function(e,t,n,r){let i=t.x+n.width/2,a=e.append(`g`);z++,a.append(`line`).attr(`id`,r+`-task`+z).attr(`x1`,i).attr(`y1`,t.y).attr(`x2`,i).attr(`y2`,450).attr(`class`,`task-line`).attr(`stroke-width`,`1px`).attr(`stroke-dasharray`,`4 2`).attr(`stroke`,`#666`),P(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let o=g();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=n.width,o.height=n.height,o.class=`task task-type-`+t.num,o.rx=3,o.ry=3,N(a,o);let s=t.x+14;t.people.forEach(e=>{let n=t.actors[e].color,r={cx:s,cy:t.y,r:7,fill:n,stroke:`#000`,title:e,pos:t.actors[e].position};F(a,r),s+=10}),H(n)(t.task,a,o.x,o.y,o.width,o.height,{class:`task`},n,t.colour)},`drawTask`),V=e(function(e,t){m(e,t)},`drawBackgroundRect`),H=(function(){function t(e,t,n,r,a,o,s,c){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`font-color`,c).style(`text-anchor`,`middle`).text(e),s)}e(t,`byText`);function n(e,t,n,r,a,o,s,c,l){let{taskFontSize:u,taskFontFamily:d}=c,f=e.split(//gi);for(let e=0;e{let a=G[r].color,o={cx:20,cy:i,r:7,fill:a,stroke:`#000`,pos:G[r].position};U.drawCircle(e,o);let s=e.append(`text`).attr(`visibility`,`hidden`).text(r),c=s.node().getBoundingClientRect().width;s.remove();let l=[];if(c<=n)l=[r];else{let t=r.split(` `),i=``;s=e.append(`text`).attr(`visibility`,`hidden`),t.forEach(e=>{let t=i?`${i} ${e}`:e;if(s.text(t),s.node().getBoundingClientRect().width>n){if(i&&l.push(i),i=e,s.text(e),s.node().getBoundingClientRect().width>n){let t=``;for(let r of e)t+=r,s.text(t+`-`),s.node().getBoundingClientRect().width>n&&(l.push(t.slice(0,-1)+`-`),t=r);i=t}}else i=t}),i&&l.push(i),s.remove()}l.forEach((n,r)=>{let a={x:40,y:i+7+r*20,fill:`#666`,text:n,textMargin:t.boxTextMargin??5},o=U.drawText(e,a).node().getBoundingClientRect().width;o>K&&o>t.leftMargin-o&&(K=o)}),i+=Math.max(20,l.length*20)})}e(q,`drawActorLegend`);var J=r().journey,Y=0,ee=e(function(e,n,i,a){let o=r(),s=o.journey.titleColor,c=o.journey.titleFontSize,u=o.journey.titleFontFamily,d=o.securityLevel,f;d===`sandbox`&&(f=t(`#i`+n));let p=t(d===`sandbox`?f.nodes()[0].contentDocument.body:`body`);X.init();let m=p.select(`#`+n);U.initGraphics(m,n);let h=a.db.getTasks(),g=a.db.getDiagramTitle(),_=a.db.getActors();for(let e in G)delete G[e];let v=0;_.forEach(e=>{G[e]={color:J.actorColours[v%J.actorColours.length],position:v},v++}),q(m),Y=J.leftMargin+K,X.insert(0,0,Y,Object.keys(G).length*50),te(m,h,0,n);let y=X.getBounds();g&&m.append(`text`).text(g).attr(`x`,Y).attr(`font-size`,c).attr(`font-weight`,`bold`).attr(`y`,25).attr(`fill`,s).attr(`font-family`,u);let b=y.stopy-y.starty+2*J.diagramMarginY,x=Y+y.stopx+2*J.diagramMarginX;l(m,b,x,J.useMaxWidth),m.append(`line`).attr(`x1`,Y).attr(`y1`,J.height*4).attr(`x2`,x-Y-4).attr(`y2`,J.height*4).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#`+n+`-arrowhead)`);let S=g?70:0;m.attr(`viewBox`,`${y.startx} -25 ${x} ${b+S}`),m.attr(`preserveAspectRatio`,`xMinYMin meet`),m.attr(`height`,b+S+25)},`draw`),X={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:e(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},`init`),updateVal:e(function(e,t,n,r){e[t]=e[t]===void 0?n:r(n,e[t])},`updateVal`),updateBounds:e(function(t,n,i,a){let o=r().journey,s=this,c=0;function l(r){return e(function(e){c++;let l=s.sequenceItems.length-c+1;s.updateVal(e,`starty`,n-l*o.boxMargin,Math.min),s.updateVal(e,`stopy`,a+l*o.boxMargin,Math.max),s.updateVal(X.data,`startx`,t-l*o.boxMargin,Math.min),s.updateVal(X.data,`stopx`,i+l*o.boxMargin,Math.max),r!==`activation`&&(s.updateVal(e,`startx`,t-l*o.boxMargin,Math.min),s.updateVal(e,`stopx`,i+l*o.boxMargin,Math.max),s.updateVal(X.data,`starty`,n-l*o.boxMargin,Math.min),s.updateVal(X.data,`stopy`,a+l*o.boxMargin,Math.max))},`updateItemBounds`)}e(l,`updateFn`),this.sequenceItems.forEach(l())},`updateBounds`),insert:e(function(e,t,n,r){let i=Math.min(e,n),a=Math.max(e,n),o=Math.min(t,r),s=Math.max(t,r);this.updateVal(X.data,`startx`,i,Math.min),this.updateVal(X.data,`starty`,o,Math.min),this.updateVal(X.data,`stopx`,a,Math.max),this.updateVal(X.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),bumpVerticalPos:e(function(e){this.verticalPos+=e,this.data.stopy=this.verticalPos},`bumpVerticalPos`),getVerticalPos:e(function(){return this.verticalPos},`getVerticalPos`),getBounds:e(function(){return this.data},`getBounds`)},Z=J.sectionFills,Q=J.sectionColours,te=e(function(e,t,n,i){let a=r().journey,o=``,s=n+(a.height*2+a.diagramMarginY),c=0,l=`#CCC`,u=`black`,d=0;for(let[n,r]of t.entries()){if(o!==r.section){l=Z[c%Z.length],d=c%Z.length,u=Q[c%Q.length];let i=0,s=r.section;for(let e=n;e(G[t]&&(e[t]=G[t]),e),{});r.x=n*a.taskMargin+n*a.width+Y,r.y=s,r.width=a.diagramMarginX,r.height=a.diagramMarginY,r.colour=u,r.fill=l,r.num=d,r.actors=f,U.drawTask(e,r,a,i),X.insert(r.x,r.y,r.x+r.width+a.taskMargin,450)}},`drawTasks`),$={setConf:W,draw:ee},ne={parser:v,db:j,renderer:$,styles:M,init:e(e=>{$.setConf(e.journey),j.clear()},`init`)};export{ne as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/kanban-definition-PIMVIEU3-Dm_C0YEC.js b/lecture-01/assets/kanban-definition-PIMVIEU3-Dm_C0YEC.js new file mode 100644 index 0000000000000000000000000000000000000000..2dd5c681218c8019b2182b9b2598d27843c24f6b --- /dev/null +++ b/lecture-01/assets/kanban-definition-PIMVIEU3-Dm_C0YEC.js @@ -0,0 +1,89 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as t}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as n,G as r,N as i,P as a,d as o,et as s,m as c}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as l}from"./chunk-BPTLHSDI-QRS_xuYz.js";import{n as u,t as d}from"./chunk-PWCFYZI5-Dz1excih.js";import"./chunk-PLCLPJVV-BfMyJHbe.js";import"./chunk-XXV7AQMY-qeLKYxsH.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import"./chunk-OX6ZKUVE-roiHi12N.js";import"./chunk-YV36FAQU-CkTVkoM6.js";import"./chunk-AQ2D6KKF-AxjphkEe.js";import"./chunk-2V3FENDJ-B1mkZICr.js";import{a as f,c as p,i as m}from"./chunk-DKH7L6O3-pKUB4f-O.js";import{t as h}from"./chunk-RTBOCTTP-BZPyT8j-.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),t(p,[2,19]),t(p,[2,21],{15:30,24:m}),t(p,[2,22]),t(p,[2,23]),t(h,[2,25]),t(h,[2,26]),t(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(g,[2,14],{7:_,11:v}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,16],{15:37,24:m}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(h,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:_,11:v}),t(y,[2,11]),t(y,[2,12]),t(p,[2,15],{24:b}),t(h,[2,30]),{22:[1,41]},t(h,[2,27]),t(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};x.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return this.pushState(`shapeData`),t.yytext=``,24;case 1:return this.pushState(`shapeDataStr`),24;case 2:return this.popState(),24;case 3:return t.yytext=t.yytext.replace(/\n\s*/g,`
    `),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace(`Found comment`,t.yytext),6;case 7:return 8;case 8:this.begin(`CLASS`);break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace(`Begin icon`),this.begin(`ICON`);break;case 12:return e.getLogger().trace(`SPACELINE`),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace(`end icon`),this.popState();break;case 16:return e.getLogger().trace(`Exploding node`),this.begin(`NODE`),20;case 17:return e.getLogger().trace(`Cloud`),this.begin(`NODE`),20;case 18:return e.getLogger().trace(`Explosion Bang`),this.begin(`NODE`),20;case 19:return e.getLogger().trace(`Cloud Bang`),this.begin(`NODE`),20;case 20:return this.begin(`NODE`),20;case 21:return this.begin(`NODE`),20;case 22:return this.begin(`NODE`),20;case 23:return this.begin(`NODE`),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin(`NSTR2`);break;case 28:return`NODE_DESCR`;case 29:this.popState();break;case 30:e.getLogger().trace(`Starting NSTR`),this.begin(`NSTR`);break;case 31:return e.getLogger().trace(`description:`,t.yytext),`NODE_DESCR`;case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace(`node end ))`),`NODE_DEND`;case 34:return this.popState(),e.getLogger().trace(`node end )`),`NODE_DEND`;case 35:return this.popState(),e.getLogger().trace(`node end ...`,t.yytext),`NODE_DEND`;case 36:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 37:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 41:return e.getLogger().trace(`Long description:`,t.yytext),21;case 42:return e.getLogger().trace(`Long description:`,t.yytext),21}},`anonymous`),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}})();function S(){this.yy={}}return e(S,`Parser`),S.prototype=x,x.Parser=S,new S})();g.parser=g;var _=g,v=[],y=[],b=0,x={},S=e(()=>{v=[],y=[],b=0,x={}},`clear`),C=e(e=>{if(v.length===0)return null;let t=v[0].level,n=null;for(let e=v.length-1;e>=0;e--)if(v[e].level===t&&!n&&(n=v[e]),v[e].levelt.parentId===e.id);for(let n of i){let i={id:n.id,parentId:e.id,label:r(n.label??``,a),labelType:`markdown`,isGroup:!1,ticket:n?.ticket,priority:n?.priority,assigned:n?.assigned,icon:n?.icon,shape:`kanbanItem`,level:n.level,rx:5,ry:5,cssStyles:[`text-align: left`]};t.push(i)}}return{nodes:t,edges:e,other:{},config:n()}},`getData`),E=e((e,t,i,a,o)=>{let s=n(),l=s.mindmap?.padding??c.mindmap.padding;switch(a){case D.ROUNDED_RECT:case D.RECT:case D.HEXAGON:l*=2}let f={id:r(t,s)||`kbn`+b++,level:e,label:r(i,s),width:s.mindmap?.maxNodeWidth??c.mindmap.maxNodeWidth,padding:l,isGroup:!1};if(o!==void 0){let e;e=o.includes(` +`)?o+` +`:`{ +`+o+` +}`;let t=u(e,{schema:d});if(t.shape&&(t.shape!==t.shape.toLowerCase()||t.shape.includes(`_`)))throw Error(`No such shape: ${t.shape}. Shape names should be lowercase.`);t?.shape&&t.shape===`kanbanItem`&&(f.shape=t?.shape),t?.label&&(f.label=t?.label),t?.icon&&(f.icon=t?.icon.toString()),t?.assigned&&(f.assigned=t?.assigned.toString()),t?.ticket&&(f.ticket=t?.ticket.toString()),t?.priority&&(f.priority=t?.priority)}let p=C(e);p?f.parentId=p.id||`kbn`+b++:y.push(f),v.push(f)},`addNode`),D={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},O={clear:S,addNode:E,getSections:w,getData:T,nodeType:D,getType:e((e,n)=>{switch(t.debug(`In get type`,e,n),e){case`[`:return D.RECT;case`(`:return n===`)`?D.ROUNDED_RECT:D.CLOUD;case`((`:return D.CIRCLE;case`)`:return D.CLOUD;case`))`:return D.BANG;case`{{`:return D.HEXAGON;default:return D.DEFAULT}},`getType`),setElementForId:e((e,t)=>{x[e]=t},`setElementForId`),decorateNode:e(e=>{if(!e)return;let t=n(),i=v[v.length-1];e.icon&&(i.icon=r(e.icon,t)),e.class&&(i.cssClasses=r(e.class,t))},`decorateNode`),type2Str:e(e=>{switch(e){case D.DEFAULT:return`no-border`;case D.RECT:return`rect`;case D.ROUNDED_RECT:return`rounded-rect`;case D.CIRCLE:return`circle`;case D.CLOUD:return`cloud`;case D.BANG:return`bang`;case D.HEXAGON:return`hexgon`;default:return`no-border`}},`type2Str`),getLogger:e(()=>t,`getLogger`),getElementById:e(e=>x[e],`getElementById`)},k={draw:e(async(e,r,i,a)=>{t.debug(`Rendering kanban diagram +`+e);let o=a.db.getData(),u=n();u.htmlLabels=!1;let d=l(r);for(let e of o.nodes)e.domId=`${r}-${e.id}`;let h=d.append(`g`);h.attr(`class`,`sections`);let g=d.append(`g`);g.attr(`class`,`items`);let _=o.nodes.filter(e=>e.isGroup),v=0,y=[],b=25;for(let e of _){let t=u?.kanban?.sectionWidth||200;v+=1,e.x=t*v+(v-1)*10/2,e.width=t,e.y=0,e.height=t*3,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+` section-`+v;let n=await m(h,e);b=Math.max(b,n?.labelBBox?.height),y.push(n)}let x=0;for(let e of _){let t=y[x];x+=1;let n=u?.kanban?.sectionWidth||200,r=-n*3/2+b,i=r,a=o.nodes.filter(t=>t.parentId===e.id);for(let t of a){if(t.isGroup)throw Error(`Groups within groups are not allowed in Kanban diagrams`);t.x=e.x,t.width=n-15;let r=(await f(g,t,{config:u})).node().getBBox();t.y=i+r.height/2,await p(t),i=t.y+r.height/2+5}let s=t.cluster.select(`rect`),c=Math.max(i-r+30,50)+(b-25);s.attr(`height`,c)}s(void 0,d,u.mindmap?.padding??c.kanban.padding,u.mindmap?.useMaxWidth??c.kanban.useMaxWidth)},`draw`)},A=e(t=>{let n=``;for(let e=0;et.darkMode?o(e,n):a(e,n),`adjuster`);for(let e=0;e` + .edge { + stroke-width: 3; + } + ${A(e)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${e.git0}; + } + .section-root text { + fill: ${e.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .cluster-label, .label { + color: ${e.textColor}; + fill: ${e.textColor}; + } + .kanban-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } + ${h()} +`,`getStyles`)};export{j as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/katex-FWVWKTT3-_q1X5PuC.js b/lecture-01/assets/katex-FWVWKTT3-_q1X5PuC.js new file mode 100644 index 0000000000000000000000000000000000000000..3b1817f84479dd3b6ae5d221f34c9d34d52a1e02 --- /dev/null +++ b/lecture-01/assets/katex-FWVWKTT3-_q1X5PuC.js @@ -0,0 +1,257 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";var t=class t extends Error{static{e(this,`ParseError`)}constructor(e,n){var r=`KaTeX parse error: `+e,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15e.replace(n,`-$1`).toLowerCase(),`hyphenate`),i={"&":`&`,">":`>`,"<":`<`,'"':`"`,"'":`'`},a=/[&><"']/g,o=e(e=>String(e).replace(a,e=>i[e]),`escape`),s=e(e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?s(e.body[0]):e:e.type===`font`?s(e.body):e,`getBaseElem`),c=new Set([`mathord`,`textord`,`atom`]),l=e(e=>c.has(s(e).type),`isCharacterBox`),u=e(e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},`protocolFromUrl`),d={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format `},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color `,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e(e=>`#`+e,`cliProcessor`)},macros:{type:`object`,cli:`-m, --macro `,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:e((e,t)=>(t.push(e),t),`cliProcessor`)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e(e=>Math.max(0,e),`processor`),cli:`--min-rule-thickness `,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e(e=>Math.max(0,e),`processor`),cli:`-s, --max-size `,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e(e=>Math.max(0,e),`processor`),cli:`-e, --max-expand `,cliProcessor:e(e=>e===`Infinity`?1/0:parseInt(e),`cliProcessor`)},globalGroup:{type:`boolean`,cli:!1}};function f(e){if(`default`in e)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if(typeof n!=`string`)return n.enum[0];switch(n){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{}}}e(f,`getDefaultValue`);var p=class{static{e(this,`Settings`)}constructor(e){e===void 0&&(e={}),e||={};for(var t of Object.keys(d)){var n=d[t],r=e[t];this[t]=r===void 0?f(n):n.processor?n.processor(r):r}}reportNonstrict(e,n,r){var i=this.strict;if(typeof i==`function`&&(i=i(e,n,r)),!(!i||i===`ignore`)){if(i===!0||i===`error`)throw new t(`LaTeX-incompatible input and strict mode is set to 'error': `+(n+` [`+e+`]`),r);i===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(n+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+i+`': `+n+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=u(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},m=class{static{e(this,`Style`)}constructor(e,t,n){this.id=e,this.size=t,this.cramped=n}sup(){return C[w[this.id]]}sub(){return C[ee[this.id]]}fracNum(){return C[te[this.id]]}fracDen(){return C[ne[this.id]]}cramp(){return C[re[this.id]]}text(){return C[ie[this.id]]}isTight(){return this.size>=2}},h=0,g=1,_=2,v=3,y=4,b=5,x=6,S=7,C=[new m(h,0,!1),new m(g,0,!0),new m(_,1,!1),new m(v,1,!0),new m(y,2,!1),new m(b,2,!0),new m(x,3,!1),new m(S,3,!0)],w=[y,b,y,b,x,S,x,S],ee=[b,b,b,b,S,S,S,S],te=[_,v,y,b,x,S,x,S],ne=[v,v,b,b,S,S,S,S],re=[g,g,v,v,b,b,S,S],ie=[h,g,_,v,_,v,_,v],T={DISPLAY:C[h],TEXT:C[_],SCRIPT:C[y],SCRIPTSCRIPT:C[x]},ae=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function oe(e){for(var t=0;t=i[0]&&e<=i[1])return n.name}return null}e(oe,`scriptFromCodepoint`);var se=[];ae.forEach(e=>e.blocks.forEach(e=>se.push(...e)));function ce(e){for(var t=0;t=se[t]&&e<=se[t+1])return!0;return!1}e(ce,`supportedCodepoint`);var E=e(e=>e+` `+e,`doubleBrushStroke`),le=80,ue=e(function(e,t){return`M95,`+(622+e+t)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+e/2.075+` -`+e+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+e)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},`sqrtMain`),de=e(function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+e/2.084+` -`+e+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+e)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},`sqrtSize1`),fe=e(function(e,t){return`M983 `+(10+e+t)+` +l`+e/3.13+` -`+e+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},`sqrtSize2`),pe=e(function(e,t){return`M424,`+(2398+e+t)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+e)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+` +h400000v`+(40+e)+`h-400000z`},`sqrtSize3`),me=e(function(e,t){return`M473,`+(2713+e+t)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},`sqrtSize4`),he=e(function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},`phasePath`),ge=e(function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+` +H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},`sqrtTall`),_e=e(function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=ue(t,le);break;case`sqrtSize1`:r=de(t,le);break;case`sqrtSize2`:r=fe(t,le);break;case`sqrtSize3`:r=pe(t,le);break;case`sqrtSize4`:r=me(t,le);break;case`sqrtTall`:r=ge(t,le,n)}return r},`sqrtPath`),ve=e(function(e,t){switch(e){case`⎜`:return E(`M291 0 H417 V`+t+` H291z`);case`∣`:return E(`M145 0 H188 V`+t+` H145z`);case`∥`:return E(`M145 0 H188 V`+t+` H145z`)+E(`M367 0 H410 V`+t+` H367z`);case`⎟`:return E(`M457 0 H583 V`+t+` H457z`);case`⎢`:return E(`M319 0 H403 V`+t+` H319z`);case`⎥`:return E(`M263 0 H347 V`+t+` H263z`);case`⎪`:return E(`M384 0 H504 V`+t+` H384z`);case`⏐`:return E(`M312 0 H355 V`+t+` H312z`);case`‖`:return E(`M257 0 H300 V`+t+` H257z`)+E(`M478 0 H521 V`+t+` H478z`);default:return``}},`innerPath`),ye={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:E(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:E(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:E(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:E(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:E(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:E(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:E(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:E(`M399995 440 h-120 V150 H0 v-120 H399995z`),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},be=e(function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+t+` v1759 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z +M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z +M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z +M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}},`tallDelim`),xe=class{static{e(this,`DocumentFragment`)}constructor(e){this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;te.toText(),`toText`);return this.children.map(t).join(``)}},Se={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Ce={ex:!0,em:!0,mu:!0},we=e(function(e){return typeof e!=`string`&&(e=e.unit),e in Se||e in Ce||e===`ex`},`validUnit`),D=e(function(e,n){var r;if(e.unit in Se)r=Se[e.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(e.unit===`mu`)r=n.fontMetrics().cssEmPerMu;else{var i=n.style.isTight()?n.havingStyle(n.style.text()):n;if(e.unit===`ex`)r=i.fontMetrics().xHeight;else if(e.unit===`em`)r=i.fontMetrics().quad;else throw new t(`Invalid unit: '`+e.unit+`'`);i!==n&&(r*=i.sizeMultiplier/n.sizeMultiplier)}return Math.min(e.number*r,n.maxSize)},`calculateSize`),O=e(function(e){return+e.toFixed(4)+`em`},`makeEm`),Te=e(function(e){return e.filter(e=>e).join(` `)},`createClass`),Ee=e(function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},`initNode`),De=e(function(e){var t=document.createElement(e);t.className=Te(this.classes);for(var n of Object.keys(this.style))t.style[n]=this.style[n];for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);for(var i=0;i/=\x00-\x1f]/,ke=e(function(e){var n=`<`+e;this.classes.length&&(n+=` class="`+o(Te(this.classes))+`"`);var i=``;for(var a of Object.keys(this.style))i+=r(a)+`:`+this.style[a]+`;`;i&&(n+=` style="`+o(i)+`"`);for(var s of Object.keys(this.attributes)){if(Oe.test(s))throw new t(`Invalid attribute name '`+s+`'`);n+=` `+s+`="`+o(this.attributes[s])+`"`}n+=`>`;for(var c=0;c`,n},`toMarkup`),Ae=class{static{e(this,`Span`)}constructor(e,t,n,r){Ee.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return De.call(this,`span`)}toMarkup(){return ke.call(this,`span`)}},je=class{static{e(this,`Anchor`)}constructor(e,t,n,r){Ee.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return De.call(this,`a`)}toMarkup(){return ke.call(this,`a`)}},Me=class{static{e(this,`Img`)}constructor(e,t,n){this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);e.src=this.src,e.alt=this.alt,e.className=`mord`;for(var t of Object.keys(this.style))e.style[t]=this.style[t];return e}toMarkup(){var e=``+o(this.alt)+``,e}},Ne={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},Pe=class{static{e(this,`SymbolNode`)}constructor(e,t,n,r,i,a,o,s){this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=oe(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=Ne[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=O(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=Te(this.classes));for(var n of Object.keys(this.style))t||=document.createElement(`span`),t.style[n]=this.style[n];return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`0&&(n+=`margin-right:`+O(this.italic)+`;`);for(var i of Object.keys(this.style))n+=r(i)+`:`+this.style[i]+`;`;n&&(e=!0,t+=` style="`+o(n)+`"`);var a=o(this.text);return e?(t+=`>`,t+=a,t+=``,t):a}},Fe=class{static{e(this,`SvgNode`)}constructor(e,t){this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n`;for(var n=0;n`,e}},Ie=class{static{e(this,`PathNode`)}constructor(e,t){this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,ye[this.pathName]),e}toMarkup(){return this.alternate?``:``}},Le=class{static{e(this,`LineNode`)}constructor(e){this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=``,e}};function Re(e){if(e instanceof Pe)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}e(Re,`assertSymbolDomNode`);function ze(e){if(e instanceof Ae)return e;throw Error(`Expected span but got `+String(e)+`.`)}e(ze,`assertSpan`);var Be=e(e=>e instanceof Ae||e instanceof je||e instanceof xe,`hasHtmlDomChildren`),Ve={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},He={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Ue={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function We(e,t){Ve[e]=t}e(We,`setFontMetrics`);function Ge(e,t,n){if(!Ve[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=Ve[t][r];if(!i&&e[0]in Ue&&(r=Ue[e[0]].charCodeAt(0),i=Ve[t][r]),!i&&n===`text`&&ce(r)&&(i=Ve[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}e(Ge,`getCharacterMetrics`);var Ke={};function qe(e){var t=e>=5?0:e>=3?1:2;if(!Ke[t]){var n=Ke[t]={cssEmPerMu:He.quad[t]/18};for(var r in He)He.hasOwnProperty(r)&&(n[r]=He[r][t])}return Ke[t]}e(qe,`getGlobalMetrics`);var Je={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Ye={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},k={math:{},text:{}};function A(e,t,n,r,i,a){k[e][i]={font:t,group:n,replace:r},a&&r&&(k[e][r]=k[e][i])}e(A,`defineSymbol`);var j=`math`,M=`text`,N=`main`,P=`ams`,F=`accent-token`,I=`bin`,Xe=`close`,Ze=`inner`,L=`mathord`,R=`op-token`,Qe=`open`,$e=`punct`,z=`rel`,et=`spacing`,B=`textord`;A(j,N,z,`≡`,`\\equiv`,!0),A(j,N,z,`≺`,`\\prec`,!0),A(j,N,z,`≻`,`\\succ`,!0),A(j,N,z,`∼`,`\\sim`,!0),A(j,N,z,`⊥`,`\\perp`),A(j,N,z,`⪯`,`\\preceq`,!0),A(j,N,z,`⪰`,`\\succeq`,!0),A(j,N,z,`≃`,`\\simeq`,!0),A(j,N,z,`∣`,`\\mid`,!0),A(j,N,z,`≪`,`\\ll`,!0),A(j,N,z,`≫`,`\\gg`,!0),A(j,N,z,`≍`,`\\asymp`,!0),A(j,N,z,`∥`,`\\parallel`),A(j,N,z,`⋈`,`\\bowtie`,!0),A(j,N,z,`⌣`,`\\smile`,!0),A(j,N,z,`⊑`,`\\sqsubseteq`,!0),A(j,N,z,`⊒`,`\\sqsupseteq`,!0),A(j,N,z,`≐`,`\\doteq`,!0),A(j,N,z,`⌢`,`\\frown`,!0),A(j,N,z,`∋`,`\\ni`,!0),A(j,N,z,`∝`,`\\propto`,!0),A(j,N,z,`⊢`,`\\vdash`,!0),A(j,N,z,`⊣`,`\\dashv`,!0),A(j,N,z,`∋`,`\\owns`),A(j,N,$e,`.`,`\\ldotp`),A(j,N,$e,`⋅`,`\\cdotp`),A(j,N,$e,`⋅`,`·`),A(M,N,B,`⋅`,`·`),A(j,N,B,`#`,`\\#`),A(M,N,B,`#`,`\\#`),A(j,N,B,`&`,`\\&`),A(M,N,B,`&`,`\\&`),A(j,N,B,`ℵ`,`\\aleph`,!0),A(j,N,B,`∀`,`\\forall`,!0),A(j,N,B,`ℏ`,`\\hbar`,!0),A(j,N,B,`∃`,`\\exists`,!0),A(j,N,B,`∇`,`\\nabla`,!0),A(j,N,B,`♭`,`\\flat`,!0),A(j,N,B,`ℓ`,`\\ell`,!0),A(j,N,B,`♮`,`\\natural`,!0),A(j,N,B,`♣`,`\\clubsuit`,!0),A(j,N,B,`℘`,`\\wp`,!0),A(j,N,B,`♯`,`\\sharp`,!0),A(j,N,B,`♢`,`\\diamondsuit`,!0),A(j,N,B,`ℜ`,`\\Re`,!0),A(j,N,B,`♡`,`\\heartsuit`,!0),A(j,N,B,`ℑ`,`\\Im`,!0),A(j,N,B,`♠`,`\\spadesuit`,!0),A(j,N,B,`§`,`\\S`,!0),A(M,N,B,`§`,`\\S`),A(j,N,B,`¶`,`\\P`,!0),A(M,N,B,`¶`,`\\P`),A(j,N,B,`†`,`\\dag`),A(M,N,B,`†`,`\\dag`),A(M,N,B,`†`,`\\textdagger`),A(j,N,B,`‡`,`\\ddag`),A(M,N,B,`‡`,`\\ddag`),A(M,N,B,`‡`,`\\textdaggerdbl`),A(j,N,Xe,`⎱`,`\\rmoustache`,!0),A(j,N,Qe,`⎰`,`\\lmoustache`,!0),A(j,N,Xe,`⟯`,`\\rgroup`,!0),A(j,N,Qe,`⟮`,`\\lgroup`,!0),A(j,N,I,`∓`,`\\mp`,!0),A(j,N,I,`⊖`,`\\ominus`,!0),A(j,N,I,`⊎`,`\\uplus`,!0),A(j,N,I,`⊓`,`\\sqcap`,!0),A(j,N,I,`∗`,`\\ast`),A(j,N,I,`⊔`,`\\sqcup`,!0),A(j,N,I,`◯`,`\\bigcirc`,!0),A(j,N,I,`∙`,`\\bullet`,!0),A(j,N,I,`‡`,`\\ddagger`),A(j,N,I,`≀`,`\\wr`,!0),A(j,N,I,`⨿`,`\\amalg`),A(j,N,I,`&`,`\\And`),A(j,N,z,`⟵`,`\\longleftarrow`,!0),A(j,N,z,`⇐`,`\\Leftarrow`,!0),A(j,N,z,`⟸`,`\\Longleftarrow`,!0),A(j,N,z,`⟶`,`\\longrightarrow`,!0),A(j,N,z,`⇒`,`\\Rightarrow`,!0),A(j,N,z,`⟹`,`\\Longrightarrow`,!0),A(j,N,z,`↔`,`\\leftrightarrow`,!0),A(j,N,z,`⟷`,`\\longleftrightarrow`,!0),A(j,N,z,`⇔`,`\\Leftrightarrow`,!0),A(j,N,z,`⟺`,`\\Longleftrightarrow`,!0),A(j,N,z,`↦`,`\\mapsto`,!0),A(j,N,z,`⟼`,`\\longmapsto`,!0),A(j,N,z,`↗`,`\\nearrow`,!0),A(j,N,z,`↩`,`\\hookleftarrow`,!0),A(j,N,z,`↪`,`\\hookrightarrow`,!0),A(j,N,z,`↘`,`\\searrow`,!0),A(j,N,z,`↼`,`\\leftharpoonup`,!0),A(j,N,z,`⇀`,`\\rightharpoonup`,!0),A(j,N,z,`↙`,`\\swarrow`,!0),A(j,N,z,`↽`,`\\leftharpoondown`,!0),A(j,N,z,`⇁`,`\\rightharpoondown`,!0),A(j,N,z,`↖`,`\\nwarrow`,!0),A(j,N,z,`⇌`,`\\rightleftharpoons`,!0),A(j,P,z,`≮`,`\\nless`,!0),A(j,P,z,``,`\\@nleqslant`),A(j,P,z,``,`\\@nleqq`),A(j,P,z,`⪇`,`\\lneq`,!0),A(j,P,z,`≨`,`\\lneqq`,!0),A(j,P,z,``,`\\@lvertneqq`),A(j,P,z,`⋦`,`\\lnsim`,!0),A(j,P,z,`⪉`,`\\lnapprox`,!0),A(j,P,z,`⊀`,`\\nprec`,!0),A(j,P,z,`⋠`,`\\npreceq`,!0),A(j,P,z,`⋨`,`\\precnsim`,!0),A(j,P,z,`⪹`,`\\precnapprox`,!0),A(j,P,z,`≁`,`\\nsim`,!0),A(j,P,z,``,`\\@nshortmid`),A(j,P,z,`∤`,`\\nmid`,!0),A(j,P,z,`⊬`,`\\nvdash`,!0),A(j,P,z,`⊭`,`\\nvDash`,!0),A(j,P,z,`⋪`,`\\ntriangleleft`),A(j,P,z,`⋬`,`\\ntrianglelefteq`,!0),A(j,P,z,`⊊`,`\\subsetneq`,!0),A(j,P,z,``,`\\@varsubsetneq`),A(j,P,z,`⫋`,`\\subsetneqq`,!0),A(j,P,z,``,`\\@varsubsetneqq`),A(j,P,z,`≯`,`\\ngtr`,!0),A(j,P,z,``,`\\@ngeqslant`),A(j,P,z,``,`\\@ngeqq`),A(j,P,z,`⪈`,`\\gneq`,!0),A(j,P,z,`≩`,`\\gneqq`,!0),A(j,P,z,``,`\\@gvertneqq`),A(j,P,z,`⋧`,`\\gnsim`,!0),A(j,P,z,`⪊`,`\\gnapprox`,!0),A(j,P,z,`⊁`,`\\nsucc`,!0),A(j,P,z,`⋡`,`\\nsucceq`,!0),A(j,P,z,`⋩`,`\\succnsim`,!0),A(j,P,z,`⪺`,`\\succnapprox`,!0),A(j,P,z,`≆`,`\\ncong`,!0),A(j,P,z,``,`\\@nshortparallel`),A(j,P,z,`∦`,`\\nparallel`,!0),A(j,P,z,`⊯`,`\\nVDash`,!0),A(j,P,z,`⋫`,`\\ntriangleright`),A(j,P,z,`⋭`,`\\ntrianglerighteq`,!0),A(j,P,z,``,`\\@nsupseteqq`),A(j,P,z,`⊋`,`\\supsetneq`,!0),A(j,P,z,``,`\\@varsupsetneq`),A(j,P,z,`⫌`,`\\supsetneqq`,!0),A(j,P,z,``,`\\@varsupsetneqq`),A(j,P,z,`⊮`,`\\nVdash`,!0),A(j,P,z,`⪵`,`\\precneqq`,!0),A(j,P,z,`⪶`,`\\succneqq`,!0),A(j,P,z,``,`\\@nsubseteqq`),A(j,P,I,`⊴`,`\\unlhd`),A(j,P,I,`⊵`,`\\unrhd`),A(j,P,z,`↚`,`\\nleftarrow`,!0),A(j,P,z,`↛`,`\\nrightarrow`,!0),A(j,P,z,`⇍`,`\\nLeftarrow`,!0),A(j,P,z,`⇏`,`\\nRightarrow`,!0),A(j,P,z,`↮`,`\\nleftrightarrow`,!0),A(j,P,z,`⇎`,`\\nLeftrightarrow`,!0),A(j,P,z,`△`,`\\vartriangle`),A(j,P,B,`ℏ`,`\\hslash`),A(j,P,B,`▽`,`\\triangledown`),A(j,P,B,`◊`,`\\lozenge`),A(j,P,B,`Ⓢ`,`\\circledS`),A(j,P,B,`®`,`\\circledR`),A(M,P,B,`®`,`\\circledR`),A(j,P,B,`∡`,`\\measuredangle`,!0),A(j,P,B,`∄`,`\\nexists`),A(j,P,B,`℧`,`\\mho`),A(j,P,B,`Ⅎ`,`\\Finv`,!0),A(j,P,B,`⅁`,`\\Game`,!0),A(j,P,B,`‵`,`\\backprime`),A(j,P,B,`▲`,`\\blacktriangle`),A(j,P,B,`▼`,`\\blacktriangledown`),A(j,P,B,`■`,`\\blacksquare`),A(j,P,B,`⧫`,`\\blacklozenge`),A(j,P,B,`★`,`\\bigstar`),A(j,P,B,`∢`,`\\sphericalangle`,!0),A(j,P,B,`∁`,`\\complement`,!0),A(j,P,B,`ð`,`\\eth`,!0),A(M,N,B,`ð`,`ð`),A(j,P,B,`╱`,`\\diagup`),A(j,P,B,`╲`,`\\diagdown`),A(j,P,B,`□`,`\\square`),A(j,P,B,`□`,`\\Box`),A(j,P,B,`◊`,`\\Diamond`),A(j,P,B,`¥`,`\\yen`,!0),A(M,P,B,`¥`,`\\yen`,!0),A(j,P,B,`✓`,`\\checkmark`,!0),A(M,P,B,`✓`,`\\checkmark`),A(j,P,B,`ℶ`,`\\beth`,!0),A(j,P,B,`ℸ`,`\\daleth`,!0),A(j,P,B,`ℷ`,`\\gimel`,!0),A(j,P,B,`ϝ`,`\\digamma`,!0),A(j,P,B,`ϰ`,`\\varkappa`),A(j,P,Qe,`┌`,`\\@ulcorner`,!0),A(j,P,Xe,`┐`,`\\@urcorner`,!0),A(j,P,Qe,`└`,`\\@llcorner`,!0),A(j,P,Xe,`┘`,`\\@lrcorner`,!0),A(j,P,z,`≦`,`\\leqq`,!0),A(j,P,z,`⩽`,`\\leqslant`,!0),A(j,P,z,`⪕`,`\\eqslantless`,!0),A(j,P,z,`≲`,`\\lesssim`,!0),A(j,P,z,`⪅`,`\\lessapprox`,!0),A(j,P,z,`≊`,`\\approxeq`,!0),A(j,P,I,`⋖`,`\\lessdot`),A(j,P,z,`⋘`,`\\lll`,!0),A(j,P,z,`≶`,`\\lessgtr`,!0),A(j,P,z,`⋚`,`\\lesseqgtr`,!0),A(j,P,z,`⪋`,`\\lesseqqgtr`,!0),A(j,P,z,`≑`,`\\doteqdot`),A(j,P,z,`≓`,`\\risingdotseq`,!0),A(j,P,z,`≒`,`\\fallingdotseq`,!0),A(j,P,z,`∽`,`\\backsim`,!0),A(j,P,z,`⋍`,`\\backsimeq`,!0),A(j,P,z,`⫅`,`\\subseteqq`,!0),A(j,P,z,`⋐`,`\\Subset`,!0),A(j,P,z,`⊏`,`\\sqsubset`,!0),A(j,P,z,`≼`,`\\preccurlyeq`,!0),A(j,P,z,`⋞`,`\\curlyeqprec`,!0),A(j,P,z,`≾`,`\\precsim`,!0),A(j,P,z,`⪷`,`\\precapprox`,!0),A(j,P,z,`⊲`,`\\vartriangleleft`),A(j,P,z,`⊴`,`\\trianglelefteq`),A(j,P,z,`⊨`,`\\vDash`,!0),A(j,P,z,`⊪`,`\\Vvdash`,!0),A(j,P,z,`⌣`,`\\smallsmile`),A(j,P,z,`⌢`,`\\smallfrown`),A(j,P,z,`≏`,`\\bumpeq`,!0),A(j,P,z,`≎`,`\\Bumpeq`,!0),A(j,P,z,`≧`,`\\geqq`,!0),A(j,P,z,`⩾`,`\\geqslant`,!0),A(j,P,z,`⪖`,`\\eqslantgtr`,!0),A(j,P,z,`≳`,`\\gtrsim`,!0),A(j,P,z,`⪆`,`\\gtrapprox`,!0),A(j,P,I,`⋗`,`\\gtrdot`),A(j,P,z,`⋙`,`\\ggg`,!0),A(j,P,z,`≷`,`\\gtrless`,!0),A(j,P,z,`⋛`,`\\gtreqless`,!0),A(j,P,z,`⪌`,`\\gtreqqless`,!0),A(j,P,z,`≖`,`\\eqcirc`,!0),A(j,P,z,`≗`,`\\circeq`,!0),A(j,P,z,`≜`,`\\triangleq`,!0),A(j,P,z,`∼`,`\\thicksim`),A(j,P,z,`≈`,`\\thickapprox`),A(j,P,z,`⫆`,`\\supseteqq`,!0),A(j,P,z,`⋑`,`\\Supset`,!0),A(j,P,z,`⊐`,`\\sqsupset`,!0),A(j,P,z,`≽`,`\\succcurlyeq`,!0),A(j,P,z,`⋟`,`\\curlyeqsucc`,!0),A(j,P,z,`≿`,`\\succsim`,!0),A(j,P,z,`⪸`,`\\succapprox`,!0),A(j,P,z,`⊳`,`\\vartriangleright`),A(j,P,z,`⊵`,`\\trianglerighteq`),A(j,P,z,`⊩`,`\\Vdash`,!0),A(j,P,z,`∣`,`\\shortmid`),A(j,P,z,`∥`,`\\shortparallel`),A(j,P,z,`≬`,`\\between`,!0),A(j,P,z,`⋔`,`\\pitchfork`,!0),A(j,P,z,`∝`,`\\varpropto`),A(j,P,z,`◀`,`\\blacktriangleleft`),A(j,P,z,`∴`,`\\therefore`,!0),A(j,P,z,`∍`,`\\backepsilon`),A(j,P,z,`▶`,`\\blacktriangleright`),A(j,P,z,`∵`,`\\because`,!0),A(j,P,z,`⋘`,`\\llless`),A(j,P,z,`⋙`,`\\gggtr`),A(j,P,I,`⊲`,`\\lhd`),A(j,P,I,`⊳`,`\\rhd`),A(j,P,z,`≂`,`\\eqsim`,!0),A(j,N,z,`⋈`,`\\Join`),A(j,P,z,`≑`,`\\Doteq`,!0),A(j,P,I,`∔`,`\\dotplus`,!0),A(j,P,I,`∖`,`\\smallsetminus`),A(j,P,I,`⋒`,`\\Cap`,!0),A(j,P,I,`⋓`,`\\Cup`,!0),A(j,P,I,`⩞`,`\\doublebarwedge`,!0),A(j,P,I,`⊟`,`\\boxminus`,!0),A(j,P,I,`⊞`,`\\boxplus`,!0),A(j,P,I,`⋇`,`\\divideontimes`,!0),A(j,P,I,`⋉`,`\\ltimes`,!0),A(j,P,I,`⋊`,`\\rtimes`,!0),A(j,P,I,`⋋`,`\\leftthreetimes`,!0),A(j,P,I,`⋌`,`\\rightthreetimes`,!0),A(j,P,I,`⋏`,`\\curlywedge`,!0),A(j,P,I,`⋎`,`\\curlyvee`,!0),A(j,P,I,`⊝`,`\\circleddash`,!0),A(j,P,I,`⊛`,`\\circledast`,!0),A(j,P,I,`⋅`,`\\centerdot`),A(j,P,I,`⊺`,`\\intercal`,!0),A(j,P,I,`⋒`,`\\doublecap`),A(j,P,I,`⋓`,`\\doublecup`),A(j,P,I,`⊠`,`\\boxtimes`,!0),A(j,P,z,`⇢`,`\\dashrightarrow`,!0),A(j,P,z,`⇠`,`\\dashleftarrow`,!0),A(j,P,z,`⇇`,`\\leftleftarrows`,!0),A(j,P,z,`⇆`,`\\leftrightarrows`,!0),A(j,P,z,`⇚`,`\\Lleftarrow`,!0),A(j,P,z,`↞`,`\\twoheadleftarrow`,!0),A(j,P,z,`↢`,`\\leftarrowtail`,!0),A(j,P,z,`↫`,`\\looparrowleft`,!0),A(j,P,z,`⇋`,`\\leftrightharpoons`,!0),A(j,P,z,`↶`,`\\curvearrowleft`,!0),A(j,P,z,`↺`,`\\circlearrowleft`,!0),A(j,P,z,`↰`,`\\Lsh`,!0),A(j,P,z,`⇈`,`\\upuparrows`,!0),A(j,P,z,`↿`,`\\upharpoonleft`,!0),A(j,P,z,`⇃`,`\\downharpoonleft`,!0),A(j,N,z,`⊶`,`\\origof`,!0),A(j,N,z,`⊷`,`\\imageof`,!0),A(j,P,z,`⊸`,`\\multimap`,!0),A(j,P,z,`↭`,`\\leftrightsquigarrow`,!0),A(j,P,z,`⇉`,`\\rightrightarrows`,!0),A(j,P,z,`⇄`,`\\rightleftarrows`,!0),A(j,P,z,`↠`,`\\twoheadrightarrow`,!0),A(j,P,z,`↣`,`\\rightarrowtail`,!0),A(j,P,z,`↬`,`\\looparrowright`,!0),A(j,P,z,`↷`,`\\curvearrowright`,!0),A(j,P,z,`↻`,`\\circlearrowright`,!0),A(j,P,z,`↱`,`\\Rsh`,!0),A(j,P,z,`⇊`,`\\downdownarrows`,!0),A(j,P,z,`↾`,`\\upharpoonright`,!0),A(j,P,z,`⇂`,`\\downharpoonright`,!0),A(j,P,z,`⇝`,`\\rightsquigarrow`,!0),A(j,P,z,`⇝`,`\\leadsto`),A(j,P,z,`⇛`,`\\Rrightarrow`,!0),A(j,P,z,`↾`,`\\restriction`),A(j,N,B,`‘`,"`"),A(j,N,B,`$`,`\\$`),A(M,N,B,`$`,`\\$`),A(M,N,B,`$`,`\\textdollar`),A(j,N,B,`%`,`\\%`),A(M,N,B,`%`,`\\%`),A(j,N,B,`_`,`\\_`),A(M,N,B,`_`,`\\_`),A(M,N,B,`_`,`\\textunderscore`),A(j,N,B,`∠`,`\\angle`,!0),A(j,N,B,`∞`,`\\infty`,!0),A(j,N,B,`′`,`\\prime`),A(j,N,B,`△`,`\\triangle`),A(j,N,B,`Γ`,`\\Gamma`,!0),A(j,N,B,`Δ`,`\\Delta`,!0),A(j,N,B,`Θ`,`\\Theta`,!0),A(j,N,B,`Λ`,`\\Lambda`,!0),A(j,N,B,`Ξ`,`\\Xi`,!0),A(j,N,B,`Π`,`\\Pi`,!0),A(j,N,B,`Σ`,`\\Sigma`,!0),A(j,N,B,`Υ`,`\\Upsilon`,!0),A(j,N,B,`Φ`,`\\Phi`,!0),A(j,N,B,`Ψ`,`\\Psi`,!0),A(j,N,B,`Ω`,`\\Omega`,!0),A(j,N,B,`A`,`Α`),A(j,N,B,`B`,`Β`),A(j,N,B,`E`,`Ε`),A(j,N,B,`Z`,`Ζ`),A(j,N,B,`H`,`Η`),A(j,N,B,`I`,`Ι`),A(j,N,B,`K`,`Κ`),A(j,N,B,`M`,`Μ`),A(j,N,B,`N`,`Ν`),A(j,N,B,`O`,`Ο`),A(j,N,B,`P`,`Ρ`),A(j,N,B,`T`,`Τ`),A(j,N,B,`X`,`Χ`),A(j,N,B,`¬`,`\\neg`,!0),A(j,N,B,`¬`,`\\lnot`),A(j,N,B,`⊤`,`\\top`),A(j,N,B,`⊥`,`\\bot`),A(j,N,B,`∅`,`\\emptyset`),A(j,P,B,`∅`,`\\varnothing`),A(j,N,L,`α`,`\\alpha`,!0),A(j,N,L,`β`,`\\beta`,!0),A(j,N,L,`γ`,`\\gamma`,!0),A(j,N,L,`δ`,`\\delta`,!0),A(j,N,L,`ϵ`,`\\epsilon`,!0),A(j,N,L,`ζ`,`\\zeta`,!0),A(j,N,L,`η`,`\\eta`,!0),A(j,N,L,`θ`,`\\theta`,!0),A(j,N,L,`ι`,`\\iota`,!0),A(j,N,L,`κ`,`\\kappa`,!0),A(j,N,L,`λ`,`\\lambda`,!0),A(j,N,L,`μ`,`\\mu`,!0),A(j,N,L,`ν`,`\\nu`,!0),A(j,N,L,`ξ`,`\\xi`,!0),A(j,N,L,`ο`,`\\omicron`,!0),A(j,N,L,`π`,`\\pi`,!0),A(j,N,L,`ρ`,`\\rho`,!0),A(j,N,L,`σ`,`\\sigma`,!0),A(j,N,L,`τ`,`\\tau`,!0),A(j,N,L,`υ`,`\\upsilon`,!0),A(j,N,L,`ϕ`,`\\phi`,!0),A(j,N,L,`χ`,`\\chi`,!0),A(j,N,L,`ψ`,`\\psi`,!0),A(j,N,L,`ω`,`\\omega`,!0),A(j,N,L,`ε`,`\\varepsilon`,!0),A(j,N,L,`ϑ`,`\\vartheta`,!0),A(j,N,L,`ϖ`,`\\varpi`,!0),A(j,N,L,`ϱ`,`\\varrho`,!0),A(j,N,L,`ς`,`\\varsigma`,!0),A(j,N,L,`φ`,`\\varphi`,!0),A(j,N,I,`∗`,`*`,!0),A(j,N,I,`+`,`+`),A(j,N,I,`−`,`-`,!0),A(j,N,I,`⋅`,`\\cdot`,!0),A(j,N,I,`∘`,`\\circ`,!0),A(j,N,I,`÷`,`\\div`,!0),A(j,N,I,`±`,`\\pm`,!0),A(j,N,I,`×`,`\\times`,!0),A(j,N,I,`∩`,`\\cap`,!0),A(j,N,I,`∪`,`\\cup`,!0),A(j,N,I,`∖`,`\\setminus`,!0),A(j,N,I,`∧`,`\\land`),A(j,N,I,`∨`,`\\lor`),A(j,N,I,`∧`,`\\wedge`,!0),A(j,N,I,`∨`,`\\vee`,!0),A(j,N,B,`√`,`\\surd`),A(j,N,Qe,`⟨`,`\\langle`,!0),A(j,N,Qe,`∣`,`\\lvert`),A(j,N,Qe,`∥`,`\\lVert`),A(j,N,Xe,`?`,`?`),A(j,N,Xe,`!`,`!`),A(j,N,Xe,`⟩`,`\\rangle`,!0),A(j,N,Xe,`∣`,`\\rvert`),A(j,N,Xe,`∥`,`\\rVert`),A(j,N,z,`=`,`=`),A(j,N,z,`:`,`:`),A(j,N,z,`≈`,`\\approx`,!0),A(j,N,z,`≅`,`\\cong`,!0),A(j,N,z,`≥`,`\\ge`),A(j,N,z,`≥`,`\\geq`,!0),A(j,N,z,`←`,`\\gets`),A(j,N,z,`>`,`\\gt`,!0),A(j,N,z,`∈`,`\\in`,!0),A(j,N,z,``,`\\@not`),A(j,N,z,`⊂`,`\\subset`,!0),A(j,N,z,`⊃`,`\\supset`,!0),A(j,N,z,`⊆`,`\\subseteq`,!0),A(j,N,z,`⊇`,`\\supseteq`,!0),A(j,P,z,`⊈`,`\\nsubseteq`,!0),A(j,P,z,`⊉`,`\\nsupseteq`,!0),A(j,N,z,`⊨`,`\\models`),A(j,N,z,`←`,`\\leftarrow`,!0),A(j,N,z,`≤`,`\\le`),A(j,N,z,`≤`,`\\leq`,!0),A(j,N,z,`<`,`\\lt`,!0),A(j,N,z,`→`,`\\rightarrow`,!0),A(j,N,z,`→`,`\\to`),A(j,P,z,`≱`,`\\ngeq`,!0),A(j,P,z,`≰`,`\\nleq`,!0),A(j,N,et,`\xA0`,`\\ `),A(j,N,et,`\xA0`,`\\space`),A(j,N,et,`\xA0`,`\\nobreakspace`),A(M,N,et,`\xA0`,`\\ `),A(M,N,et,`\xA0`,` `),A(M,N,et,`\xA0`,`\\space`),A(M,N,et,`\xA0`,`\\nobreakspace`),A(j,N,et,null,`\\nobreak`),A(j,N,et,null,`\\allowbreak`),A(j,N,$e,`,`,`,`),A(j,N,$e,`;`,`;`),A(j,P,I,`⊼`,`\\barwedge`,!0),A(j,P,I,`⊻`,`\\veebar`,!0),A(j,N,I,`⊙`,`\\odot`,!0),A(j,N,I,`⊕`,`\\oplus`,!0),A(j,N,I,`⊗`,`\\otimes`,!0),A(j,N,B,`∂`,`\\partial`,!0),A(j,N,I,`⊘`,`\\oslash`,!0),A(j,P,I,`⊚`,`\\circledcirc`,!0),A(j,P,I,`⊡`,`\\boxdot`,!0),A(j,N,I,`△`,`\\bigtriangleup`),A(j,N,I,`▽`,`\\bigtriangledown`),A(j,N,I,`†`,`\\dagger`),A(j,N,I,`⋄`,`\\diamond`),A(j,N,I,`⋆`,`\\star`),A(j,N,I,`◃`,`\\triangleleft`),A(j,N,I,`▹`,`\\triangleright`),A(j,N,Qe,`{`,`\\{`),A(M,N,B,`{`,`\\{`),A(M,N,B,`{`,`\\textbraceleft`),A(j,N,Xe,`}`,`\\}`),A(M,N,B,`}`,`\\}`),A(M,N,B,`}`,`\\textbraceright`),A(j,N,Qe,`{`,`\\lbrace`),A(j,N,Xe,`}`,`\\rbrace`),A(j,N,Qe,`[`,`\\lbrack`,!0),A(M,N,B,`[`,`\\lbrack`,!0),A(j,N,Xe,`]`,`\\rbrack`,!0),A(M,N,B,`]`,`\\rbrack`,!0),A(j,N,Qe,`(`,`\\lparen`,!0),A(j,N,Xe,`)`,`\\rparen`,!0),A(M,N,B,`<`,`\\textless`,!0),A(M,N,B,`>`,`\\textgreater`,!0),A(j,N,Qe,`⌊`,`\\lfloor`,!0),A(j,N,Xe,`⌋`,`\\rfloor`,!0),A(j,N,Qe,`⌈`,`\\lceil`,!0),A(j,N,Xe,`⌉`,`\\rceil`,!0),A(j,N,B,`\\`,`\\backslash`),A(j,N,B,`∣`,`|`),A(j,N,B,`∣`,`\\vert`),A(M,N,B,`|`,`\\textbar`,!0),A(j,N,B,`∥`,`\\|`),A(j,N,B,`∥`,`\\Vert`),A(M,N,B,`∥`,`\\textbardbl`),A(M,N,B,`~`,`\\textasciitilde`),A(M,N,B,`\\`,`\\textbackslash`),A(M,N,B,`^`,`\\textasciicircum`),A(j,N,z,`↑`,`\\uparrow`,!0),A(j,N,z,`⇑`,`\\Uparrow`,!0),A(j,N,z,`↓`,`\\downarrow`,!0),A(j,N,z,`⇓`,`\\Downarrow`,!0),A(j,N,z,`↕`,`\\updownarrow`,!0),A(j,N,z,`⇕`,`\\Updownarrow`,!0),A(j,N,R,`∐`,`\\coprod`),A(j,N,R,`⋁`,`\\bigvee`),A(j,N,R,`⋀`,`\\bigwedge`),A(j,N,R,`⨄`,`\\biguplus`),A(j,N,R,`⋂`,`\\bigcap`),A(j,N,R,`⋃`,`\\bigcup`),A(j,N,R,`∫`,`\\int`),A(j,N,R,`∫`,`\\intop`),A(j,N,R,`∬`,`\\iint`),A(j,N,R,`∭`,`\\iiint`),A(j,N,R,`∏`,`\\prod`),A(j,N,R,`∑`,`\\sum`),A(j,N,R,`⨂`,`\\bigotimes`),A(j,N,R,`⨁`,`\\bigoplus`),A(j,N,R,`⨀`,`\\bigodot`),A(j,N,R,`∮`,`\\oint`),A(j,N,R,`∯`,`\\oiint`),A(j,N,R,`∰`,`\\oiiint`),A(j,N,R,`⨆`,`\\bigsqcup`),A(j,N,R,`∫`,`\\smallint`),A(M,N,Ze,`…`,`\\textellipsis`),A(j,N,Ze,`…`,`\\mathellipsis`),A(M,N,Ze,`…`,`\\ldots`,!0),A(j,N,Ze,`…`,`\\ldots`,!0),A(j,N,Ze,`⋯`,`\\@cdots`,!0),A(j,N,Ze,`⋱`,`\\ddots`,!0),A(j,N,B,`⋮`,`\\varvdots`),A(M,N,B,`⋮`,`\\varvdots`),A(j,N,F,`ˊ`,`\\acute`),A(j,N,F,`ˋ`,`\\grave`),A(j,N,F,`¨`,`\\ddot`),A(j,N,F,`~`,`\\tilde`),A(j,N,F,`ˉ`,`\\bar`),A(j,N,F,`˘`,`\\breve`),A(j,N,F,`ˇ`,`\\check`),A(j,N,F,`^`,`\\hat`),A(j,N,F,`⃗`,`\\vec`),A(j,N,F,`˙`,`\\dot`),A(j,N,F,`˚`,`\\mathring`),A(j,N,L,``,`\\@imath`),A(j,N,L,``,`\\@jmath`),A(j,N,B,`ı`,`ı`),A(j,N,B,`ȷ`,`ȷ`),A(M,N,B,`ı`,`\\i`,!0),A(M,N,B,`ȷ`,`\\j`,!0),A(M,N,B,`ß`,`\\ss`,!0),A(M,N,B,`æ`,`\\ae`,!0),A(M,N,B,`œ`,`\\oe`,!0),A(M,N,B,`ø`,`\\o`,!0),A(M,N,B,`Æ`,`\\AE`,!0),A(M,N,B,`Œ`,`\\OE`,!0),A(M,N,B,`Ø`,`\\O`,!0),A(M,N,F,`ˊ`,`\\'`),A(M,N,F,`ˋ`,"\\`"),A(M,N,F,`ˆ`,`\\^`),A(M,N,F,`˜`,`\\~`),A(M,N,F,`ˉ`,`\\=`),A(M,N,F,`˘`,`\\u`),A(M,N,F,`˙`,`\\.`),A(M,N,F,`¸`,`\\c`),A(M,N,F,`˚`,`\\r`),A(M,N,F,`ˇ`,`\\v`),A(M,N,F,`¨`,`\\"`),A(M,N,F,`˝`,`\\H`),A(M,N,F,`◯`,`\\textcircled`);var tt={"--":!0,"---":!0,"``":!0,"''":!0};A(M,N,B,`–`,`--`,!0),A(M,N,B,`–`,`\\textendash`),A(M,N,B,`—`,`---`,!0),A(M,N,B,`—`,`\\textemdash`),A(M,N,B,`‘`,"`",!0),A(M,N,B,`‘`,`\\textquoteleft`),A(M,N,B,`’`,`'`,!0),A(M,N,B,`’`,`\\textquoteright`),A(M,N,B,`“`,"``",!0),A(M,N,B,`“`,`\\textquotedblleft`),A(M,N,B,`”`,`''`,!0),A(M,N,B,`”`,`\\textquotedblright`),A(j,N,B,`°`,`\\degree`,!0),A(M,N,B,`°`,`\\degree`),A(M,N,B,`°`,`\\textdegree`,!0),A(j,N,B,`£`,`\\pounds`),A(j,N,B,`£`,`\\mathsterling`,!0),A(M,N,B,`£`,`\\pounds`),A(M,N,B,`£`,`\\textsterling`,!0),A(j,P,B,`✠`,`\\maltese`),A(M,P,B,`✠`,`\\maltese`);var nt=`0123456789/@."`;for(it=0;it{var r=e.charCodeAt(0),i=e.charCodeAt(1),a=(r-55296)*1024+(i-56320)+65536,o=n===`math`?0:1;if(119808<=a&&a<120484){var s=Math.floor((a-119808)/26);return[_t[s][2],_t[s][o]]}if(120782<=a&&a<=120831){var c=Math.floor((a-120782)/10);return[vt[c][2],vt[c][o]]}if(a===120485||a===120486)return[_t[0][2],_t[0][o]];if(1204860)return xt(i,c,r,t,a.concat(l));if(s){var u,d;if(s===`boldsymbol`){var f=Ct(i,r,t,a,n);u=f.fontName,d=[f.fontClass]}else o?(u=It[s].fontName,d=[s]):(u=Ft(s,t.fontWeight,t.fontShape),d=[s,t.fontWeight,t.fontShape]);if(bt(i,u,r).metrics)return xt(i,u,r,t,a.concat(d));if(tt.hasOwnProperty(i)&&u.slice(0,10)===`Typewriter`){for(var p=[],m=0;m{if(Te(e.classes)!==Te(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},`canCombine`),Et=e(e=>{for(var t=0;tt&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},`sizeElementFromChildren`),U=e(function(e,t,n,r){var i=new Ae(e,t,n,r);return Dt(i),i},`makeSpan`),Ot=e((e,t,n,r)=>new Ae(e,t,n,r),`makeSvgSpan`),kt=e(function(e,t,n){var r=U([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=O(r.height),r.maxFontSize=1,r},`makeLineSpan`),At=e(function(e,t,n,r){var i=new je(e,t,n,r);return Dt(i),i},`makeAnchor`),jt=e(function(e){var t=new xe(e);return Dt(t),t},`makeFragment`),Mt=e(function(e,t){return e instanceof xe?U([],[e],t):e},`wrapFragment`),Nt=e(function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a{var n=U([`mspace`],[],t),r=D(e,t);return n.style.marginRight=O(r),n},`makeGlue`),Ft=e(function(e,t,n){var r=``;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}var i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:t===`textit`?`Italic`:`Regular`;return r+`-`+i},`retrieveTextFontName`),It={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},Lt={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},Rt=e(function(e,t){var[n,r,i]=Lt[e],a=Ot([`overlay`],[new Fe([new Ie(n)],{width:O(r),height:O(i),style:`width:`+O(r),viewBox:`0 0 `+1e3*r+` `+1e3*i,preserveAspectRatio:`xMinYMin`})],t);return a.height=i,a.style.height=O(i),a.style.width=O(r),a},`staticSvg`),G={number:3,unit:`mu`},zt={number:4,unit:`mu`},Bt={number:5,unit:`mu`},Vt={mord:{mop:G,mbin:zt,mrel:Bt,minner:G},mop:{mord:G,mop:G,mrel:Bt,minner:G},mbin:{mord:zt,mop:zt,mopen:zt,minner:zt},mrel:{mord:Bt,mop:Bt,mopen:Bt,minner:Bt},mopen:{},mclose:{mop:G,mbin:zt,mrel:Bt,minner:G},mpunct:{mord:G,mop:G,mrel:Bt,mopen:G,mclose:G,mpunct:G,minner:G},minner:{mord:G,mop:G,mbin:zt,mrel:Bt,mopen:G,mpunct:G,minner:G}},Ht={mord:{mop:G},mop:{mord:G,mop:G},mbin:{},mrel:{},mopen:{},mclose:{mop:G},mpunct:{},minner:{mop:G}},Ut={},Wt={},Gt={};function K(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},c=0;c{var n=t.classes[0],r=e.classes[0];n===`mbin`&&Yt.has(r)?t.classes[0]=`mord`:r===`mbin`&&Jt.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),$t(i,(e,t)=>{var n=nn(t),r=nn(e),i=n&&r?e.hasClass(`mtight`)?Ht[n]?.[r]:Vt[n]?.[r]:null;if(i)return Pt(i,c)},{node:u},d,f),i},`buildExpression`),$t=e(function(e,t,n,r,i){r&&e.push(r);for(var a=0;an=>{e.splice(t+1,0,n),a++})(a)}r&&e.pop()},`traverseNonSpaceNodes`),en=e(function(e){return e instanceof xe||e instanceof je||e instanceof Ae&&e.hasClass(`enclosing`)?e:null},`checkPartialGroup`),tn=e(function(e,t){var n=en(e);if(n){var r=n.children;if(r.length){if(t===`right`)return tn(r[r.length-1],`right`);if(t===`left`)return tn(r[0],`left`)}}return e},`getOutermostNode`),nn=e(function(e,t){return e?(t&&(e=tn(e,t)),Zt[e.classes[0]]||null):null},`getTypeOfDomTree`),rn=e(function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return U(t.concat(n))},`makeNullDelimiter`),J=e(function(e,n,r){if(!e)return U();if(Wt[e.type]){var i=Wt[e.type](e,n);if(r&&n.size!==r.size){i=U(n.sizingClasses(r),[i],n);var a=n.sizeMultiplier/r.sizeMultiplier;i.height*=a,i.depth*=a}return i}throw new t(`Got group of unknown type: '`+e.type+`'`)},`buildGroup`);function an(e,t){var n=U([`base`],e,t),r=U([`strut`]);return r.style.height=O(n.height+n.depth),n.depth&&(r.style.verticalAlign=O(-n.depth)),n.children.unshift(r),n}e(an,`buildHTMLUnbreakable`);function on(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=Qt(e,t,`root`),i;r.length===2&&r[1].hasClass(`tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s0&&(a.push(an(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(an(o,t));var l;n?(l=an(Qt(n,t,!0),t),l.classes=[`tag`],a.push(l)):i&&a.push(i);var u=U([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=O(u.height+u.depth),u.depth&&(d.style.verticalAlign=O(-u.depth))}return u}e(on,`buildHTML`);function sn(e){return new xe(e)}e(sn,`newDocumentFragment`);var Y=class{static{e(this,`MathNode`)}constructor(e,t,n){this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Te(this.classes));for(var n=0;n0&&(e+=` class ="`+o(Te(this.classes))+`"`),e+=`>`;for(var n=0;n`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},X=class{static{e(this,`TextNode`)}constructor(e){this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return o(this.toText())}toText(){return this.text}},cn=class{static{e(this,`SpaceNode`)}constructor(e){this.width=e,this.character=e>=.05555&&e<=.05556?` `:e>=.1666&&e<=.1667?` `:e>=.2222&&e<=.2223?` `:e>=.2777&&e<=.2778?`  `:e>=-.05556&&e<=-.05555?` ⁣`:e>=-.1667&&e<=-.1666?` ⁣`:e>=-.2223&&e<=-.2222?` ⁣`:e>=-.2778&&e<=-.2777?` ⁣`:null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,O(this.width)),e}toMarkup(){return this.character?``+this.character+``:``}toText(){return this.character?this.character:` `}},ln=new Set([`\\imath`,`\\jmath`]),un=new Set([`mrow`,`mtable`]),dn=e(function(e,t,n){return k[t][e]&&k[t][e].replace&&e.charCodeAt(0)!==55349&&!(tt.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)===`tt`||n.font&&n.font.slice(4,6)===`tt`))&&(e=k[t][e].replace),new X(e)},`makeText`),fn=e(function(e){return e.length===1?e[0]:new Y(`mrow`,e)},`makeRow`),pn=e(function(e,t){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`;var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode;if(n===`mathit`)return`italic`;if(n===`boldsymbol`)return e.type===`textord`?`bold`:`bold-italic`;if(n===`mathbf`)return`bold`;if(n===`mathbb`)return`double-struck`;if(n===`mathsfit`)return`sans-serif-italic`;if(n===`mathfrak`)return`fraktur`;if(n===`mathscr`||n===`mathcal`)return`script`;if(n===`mathsf`)return`sans-serif`;if(n===`mathtt`)return`monospace`;var i=e.text;if(ln.has(i))return null;if(k[r][i]){var a=k[r][i].replace;a&&(i=a)}var o=It[n].fontName;return Ge(i,o,r)?It[n].variant:null},`getVariant`);function mn(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof X&&t.text===`.`}if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof X&&n.text===`,`}return!1}e(mn,`isNumberPunctuation`);var hn=e(function(e,t,n){if(e.length===1){var r=Z(e[0],t);return n&&r instanceof Y&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o=1&&(a.type===`mn`||mn(a))){var c=s.children[0];c instanceof Y&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof X&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof X&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},`buildExpression`),gn=e(function(e,t,n){return fn(hn(e,t,n))},`buildExpressionRow`),Z=e(function(e,n){if(!e)return new Y(`mrow`);if(Gt[e.type])return Gt[e.type](e,n);throw new t(`Got group of unknown type: '`+e.type+`'`)},`buildGroup`);function _n(e,t,n,r,i){var a=hn(e,n),o=a.length===1&&a[0]instanceof Y&&un.has(a[0].type)?a[0]:new Y(`mrow`,a),s=new Y(`annotation`,[new X(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new Y(`math`,[new Y(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),U([i?`katex`:`katex-mathml`],[c])}e(_n,`buildMathML`);var vn=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],yn=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],bn=e(function(e,t){return t.size<2?e:vn[e-1][t.size-1]},`sizeAtStyle`),xn=class t{static{e(this,`Options`)}constructor(e){this.style=e.style,this.color=e.color,this.size=e.size||t.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||``,this.fontFamily=e.fontFamily||``,this.fontWeight=e.fontWeight||``,this.fontShape=e.fontShape||``,this.sizeMultiplier=yn[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,e),new t(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:bn(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:yn[e-1]})}havingBaseStyle(e){e||=this.style.text();var n=bn(t.BASESIZE,e);return this.size===n&&this.textSize===t.BASESIZE&&this.style===e?this:this.extend({style:e,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===t.BASESIZE?[]:[`sizing`,`reset-size`+this.size,`size`+t.BASESIZE]}fontMetrics(){return this._fontMetrics||=qe(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};xn.BASESIZE=6;var Sn=e(function(e){return new xn({style:e.displayMode?T.DISPLAY:T.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},`optionsFromSettings`),Cn=e(function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=U(n,[e])}return e},`displayWrap`),wn=e(function(e,t,n){var r=Sn(n),i;return n.output===`mathml`?_n(e,t,r,n.displayMode,!0):(i=n.output===`html`?U([`katex`],[on(e,r)]):U([`katex`],[_n(e,t,r,n.displayMode,!1),on(e,r)]),Cn(i,n))},`buildTree`),Tn=e(function(e,t,n){return Cn(U([`katex`],[on(e,Sn(n))]),n)},`buildHTMLTree`),En={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},Dn=e(function(e){var t=new Y(`mo`,[new X(En[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},`stretchyMathML`),On={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},kn=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),An=e(function(t,n){function r(){var e=4e5,r=t.label.slice(1);if(kn.has(r)){var i=t,a=i.base.type===`ordgroup`?i.base.body.length:1,o,s,c;if(a>5)r===`widehat`||r===`widecheck`?(o=420,e=2364,c=.42,s=r+`4`):(o=312,e=2340,c=.34,s=`tilde4`);else{var l=[1,1,2,2,3,3][a];r===`widehat`||r===`widecheck`?(e=[0,1062,2364,2364,2364][l],o=[0,239,300,360,420][l],c=[0,.24,.3,.3,.36,.42][l],s=r+l):(e=[0,600,1033,2339,2340][l],o=[0,260,286,306,312][l],c=[0,.26,.286,.3,.306,.34][l],s=`tilde`+l)}return{span:Ot([],[new Fe([new Ie(s)],{width:`100%`,height:O(c),viewBox:`0 0 `+e+` `+o,preserveAspectRatio:`none`})],n),minWidth:0,height:c}}var u=[],d=On[r],[f,p,m]=d,h=m/1e3,g=f.length,_,v;if(g===1){var y=d[3];_=[`hide-tail`],v=[y]}else if(g===2)_=[`halfarrow-left`,`halfarrow-right`],v=[`xMinYMin`,`xMaxYMin`];else if(g===3)_=[`brace-left`,`brace-center`,`brace-right`],v=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support + `+g+` children.`);for(var b=0;b0&&(i.style.minWidth=O(a)),i},`stretchySvg`),jn=e(function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=U([`stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new Le({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new Le({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=Ot([],[new Fe(c,{width:`100%`,height:O(o)})],i)}return a.height=o,a.style.height=O(o),a},`stretchyEnclose`);function Q(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}e(Q,`assertNodeType`);function Mn(e){var t=Nn(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}e(Mn,`assertSymbolNodeType`);function Nn(e){return e&&(e.type===`atom`||Ye.hasOwnProperty(e.type))?e:null}e(Nn,`checkSymbolNodeType`);var Pn=e(e=>{if(e instanceof Pe)return e;if(Be(e)&&e.children.length===1)return Pn(e.children[0])},`getBaseSymbol`),Fn=e((e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=Q(e.base,`accent`),n=r.base,e.base=n,i=ze(J(e,t)),e.base=r):(r=Q(e,`accent`),n=r.base);var a=J(n,t.havingCrampedStyle()),o=r.isShifty&&l(n),s=0;o&&(s=Pn(a)?.skew??0);var c=r.label===`\\c`,u=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),d;if(r.isStretchy)d=An(r,t),d=W({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:d,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+O(2*s)+`)`,marginLeft:O(2*s)}:void 0}]});else{var f,p;r.label===`\\vec`?(f=Rt(`vec`,t),p=Lt.vec[1]):(f=wt({type:`textord`,mode:r.mode,text:r.label},t,`textord`),f=Re(f),f.italic=0,p=f.width,c&&(u+=f.depth)),d=U([`accent-body`],[f]);var m=r.label===`\\textcircled`;m&&(d.classes.push(`accent-full`),u=a.height);var h=s;m||(h-=p/2),d.style.left=O(h),r.label===`\\textcircled`&&(d.style.top=`.2em`),d=W({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-u},{type:`elem`,elem:d}]})}var g=U([`mord`,`accent`],[d],t);return i?(i.children[0]=g,i.height=Math.max(g.height,i.height),i.classes[0]=`mord`,i):g},`htmlBuilder$a`),In=e((e,t)=>{var n=e.isStretchy?Dn(e.label):new Y(`mo`,[dn(e.label,e.mode)]),r=new Y(`mover`,[Z(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},`mathmlBuilder$9`),Ln=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));K({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],props:{numArgs:1},handler:e((e,t)=>{var n=qt(t[0]),r=!Ln.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},`handler`),htmlBuilder:Fn,mathmlBuilder:In}),K({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`]},handler:e((e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},`handler`),htmlBuilder:Fn,mathmlBuilder:In}),K({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],props:{numArgs:1},handler:e((e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},`handler`),htmlBuilder:e((e,t)=>{var n=J(e.base,t),r=An(e,t),i=e.label===`\\utilde`?.12:0;return U([`mord`,`accentunder`],[W({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},`htmlBuilder`),mathmlBuilder:e((e,t)=>{var n=Dn(e.label),r=new Y(`munder`,[Z(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r},`mathmlBuilder`)});var Rn=e(e=>{var t=new Y(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t},`paddedNode`);K({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=Mt(J(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=Mt(J(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=An(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=W({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c},{type:`elem`,elem:o,shift:d}]})}else u=W({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c}]});return u.children[0].children[0].children[1].classes.push(`svg-align`),U([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=Dn(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=Rn(Z(e.body,t));r=e.below?new Y(`munderover`,[n,Rn(Z(e.below,t)),i]):new Y(`mover`,[n,i])}else e.below?r=new Y(`munder`,[n,Rn(Z(e.below,t))]):(r=Rn(),r=new Y(`mover`,[n,r]));return r}});function zn(e,t){var n=Qt(e.body,t,!0);return U([e.mclass],n,t)}e(zn,`htmlBuilder$9`);function Bn(e,t){var n,r=hn(e.body,t);return e.mclass===`minner`?n=new Y(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new Y(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new Y(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):e.mclass===`mopen`||e.mclass===`mclose`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`):e.mclass===`minner`&&(n.attributes.lspace=`0.0556em`,n.attributes.width=`+0.1111em`)),n}e(Bn,`mathmlBuilder$8`),K({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:q(i),isCharacterBox:l(i)}},htmlBuilder:zn,mathmlBuilder:Bn});var Vn=e(e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`},`binrelClass`);K({type:`mclass`,names:[`\\@binrel`],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:`mclass`,mode:n.mode,mclass:Vn(t[0]),body:q(t[1]),isCharacterBox:l(t[1])}}}),K({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:Vn(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:q(i)},c={type:`supsub`,mode:a.mode,base:s,sup:r===`\\underset`?null:a,sub:r===`\\underset`?a:null};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:l(c)}},htmlBuilder:zn,mathmlBuilder:Bn}),K({type:`pmb`,names:[`\\pmb`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`pmb`,mode:n.mode,mclass:Vn(t[0]),body:q(t[0])}},htmlBuilder(e,t){var n=Qt(e.body,t,!0),r=U([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new Y(`mstyle`,hn(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var Hn={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},Un=e(()=>({type:`styling`,body:[],mode:`math`,style:`display`}),`newCell`),Wn=e(e=>e.type===`textord`&&e.text===`@`,`isStartOfArrow`),Gn=e((e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t,`isLabelEnd`);function Kn(e,t,n){var r=Hn[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}e(Kn,`cdArrow`);function qn(e){var n=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){n.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if(r===`&`||r===`\\\\`)e.consume();else if(r===`\\end`){n[n.length-1].length===0&&n.pop();break}else throw new t(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var i=[],a=[i],o=0;oAV`.includes(u))for(var f=0;f<2;f++){for(var p=!0,m=l+1;mAV=|." after @`,s[l])}var h={type:`styling`,body:[Kn(u,d,e)],mode:`math`,style:`display`};i.push(h),c=Un()}o%2==0?i.push(c):i.shift(),i=[],a.push(i)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(a[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(a.length+1).fill([])}}e(qn,`parseCD`),K({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Mt(J(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=O(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Y(`mrow`,[Z(e.label,t)]);return n=new Y(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new Y(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),K({type:`cdlabelparent`,names:[`\\\\cdparent`],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:`cdlabelparent`,mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Mt(J(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new Y(`mrow`,[Z(e.fragment,t)])}}),K({type:`textord`,names:[`\\@char`],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:r}=e,i=Q(n[0],`ordgroup`).body,a=``,o=0;o=1114111)throw new t(`\\@char with invalid code point `+a);return c<=65535?l=String.fromCharCode(c):(c-=65536,l=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:`textord`,mode:r.mode,text:l}}});var Jn=e((e,t)=>jt(Qt(e.body,t.withColor(e.color),!1)),`htmlBuilder$8`),Yn=e((e,t)=>{var n=new Y(`mstyle`,hn(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n},`mathmlBuilder$7`);K({type:`color`,names:[`\\textcolor`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`original`]},handler(e,t){var{parser:n}=e,r=Q(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:q(i)}},htmlBuilder:Jn,mathmlBuilder:Yn}),K({type:`color`,names:[`\\color`],props:{numArgs:1,allowedInText:!0,argTypes:[`color`]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=Q(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}},htmlBuilder:Jn,mathmlBuilder:Yn}),K({type:`cr`,names:[`\\\\`],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&Q(i,`size`).value}},htmlBuilder(e,t){var n=U([`mspace`],[],t);return e.newLine&&(n.classes.push(`newline`),e.size&&(n.style.marginTop=O(D(e.size,t)))),n},mathmlBuilder(e,t){var n=new Y(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,O(D(e.size,t)))),n}});var Xn={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},Zn=e(e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new t(`Expected a control sequence`,e);return n},`checkControlSequence`),Qn=e(e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},`getRHS`),$n=e((e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)},`letCommand`);K({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:n,funcName:r}=e;n.consumeSpaces();var i=n.fetch();if(Xn[i.text])return(r===`\\global`||r===`\\\\globallong`)&&(i.text=Xn[i.text]),Q(n.parseFunction(),`internal`);throw new t(`Invalid token after macro prefix`,i)}}),K({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:r}=e,i=n.gullet.popToken(),a=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new t(`Expected a control sequence`,i);for(var o=0,s,c=[[]];n.gullet.future().text!==`{`;)if(i=n.gullet.popToken(),i.text===`#`){if(n.gullet.future().text===`{`){s=n.gullet.future(),c[o].push(`{`);break}if(i=n.gullet.popToken(),!/^[1-9]$/.test(i.text))throw new t(`Invalid argument number "`+i.text+`"`);if(parseInt(i.text)!==o+1)throw new t(`Argument number "`+i.text+`" out of order`);o++,c.push([])}else if(i.text===`EOF`)throw new t(`Expected a macro definition`);else c[o].push(i.text);var{tokens:l}=n.gullet.consumeArg();return s&&l.unshift(s),(r===`\\edef`||r===`\\xdef`)&&(l=n.gullet.expandTokens(l),l.reverse()),n.gullet.macros.set(a,{tokens:l,numArgs:o,delimiters:c},r===Xn[r]),{type:`internal`,mode:n.mode}}}),K({type:`internal`,names:[`\\let`,`\\\\globallet`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Zn(t.gullet.popToken());return t.gullet.consumeSpaces(),$n(t,r,Qn(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),K({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Zn(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return $n(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var er=e(function(e,t,n){var r=Ge(k.math[e]&&k.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},`getMetrics`),tr=e(function(e,t,n,r){var i=n.havingBaseStyle(t),a=U(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},`styleWrap`),nr=e(function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=O(i),e.height-=i,e.depth+=i},`centerSpan`),rr=e(function(e,t,n,r,i,a){var o=tr(xt(e,`Main-Regular`,i,r),t,r,a);return n&&nr(o,r,t),o},`makeSmallDelim`),ir=e(function(e,t,n,r){return xt(e,`Size`+t+`-Regular`,n,r)},`mathrmSize`),ar=e(function(e,t,n,r,i,a){var o=ir(e,t,i,r),s=tr(U([`delimsizing`,`size`+t],[o],r),T.TEXT,r,a);return n&&nr(s,r,T.TEXT),s},`makeLargeDelim`),or=e(function(e,t,n){return{type:`elem`,elem:U([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[U([],[xt(e,t,n)])])}},`makeGlyphSpan`),sr=e(function(e,t,n){var r=Ve[`Size4-Regular`][e.charCodeAt(0)]?Ve[`Size4-Regular`][e.charCodeAt(0)][4]:Ve[`Size1-Regular`][e.charCodeAt(0)][4],i=Ot([],[new Fe([new Ie(`inner`,ve(e,Math.round(1e3*t)))],{width:O(r),height:O(t),style:`width:`+O(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=O(t),i.style.width=O(r),{type:`elem`,elem:i}},`makeInner`),cr=.008,lr={type:`kern`,size:-1*cr},ur=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),dr=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),fr=e(function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):ur.has(e)?(c=`∣`,u=`vert`,d=333):dr.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=er(o,f,i),m=p.height+p.depth,h=er(c,f,i),g=h.height+h.depth,_=er(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=er(s,f,i);y=x.height+x.depth,b=2}var S=m+v+y,C=S+Math.max(0,Math.ceil((t-S)/(b*g)))*b*g,w=r.fontMetrics().axisHeight;n&&(w*=r.sizeMultiplier);var ee=C/2-w,te=[];if(u.length>0){var ne=C-m-v,re=Math.round(C*1e3),ie=be(u,Math.round(ne*1e3)),ae=new Ie(u,ie),oe=O(d/1e3),se=O(re/1e3),ce=Ot([],[new Fe([ae],{width:oe,height:se,viewBox:`0 0 `+d+` `+re})],r);ce.height=re/1e3,ce.style.width=oe,ce.style.height=se,te.push({type:`elem`,elem:ce})}else{if(te.push(or(l,f,i)),te.push(lr),s===null){var E=C-m-v+2*cr;te.push(sr(c,E,r))}else{var le=(C-m-v-y)/2+2*cr;te.push(sr(c,le,r)),te.push(lr),te.push(or(s,f,i)),te.push(lr),te.push(sr(c,le,r))}te.push(lr),te.push(or(o,f,i))}var ue=r.havingBaseStyle(T.TEXT);return tr(U([`delimsizing`,`mult`],[W({positionType:`bottom`,positionData:ee,children:te})],ue),T.TEXT,r,a)},`makeStackedDelim`),pr=80,mr=.08,hr=e(function(e,t,n,r,i){return Ot([`hide-tail`],[new Fe([new Ie(e,_e(e,r,n))],{width:`400em`,height:O(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},`sqrtSvg`),gr=e(function(e,t){var n=t.havingBaseSizing(),r=Er(`\\surd`,e*n.sizeMultiplier,wr,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s=0,c=0,l=0,u;return r.type===`small`?(l=1e3+1e3*a+pr,e<1?i=1:e<1.4&&(i=.7),s=(1+a+mr)/i,c=(1+a)/i,o=hr(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+pr)*br[r.size],c=(br[r.size]+a)/i,s=(br[r.size]+a+mr)/i,o=hr(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+mr,c=e+a,l=Math.floor(1e3*e+a)+pr,o=hr(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=O(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},`makeSqrtImage`),_r=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),vr=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),yr=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),br=[0,1.2,1.8,2.4,3],xr=e(function(e,n,r,i,a){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),_r.has(e)||yr.has(e))return ar(e,n,!1,r,i,a);if(vr.has(e))return fr(e,br[n],!1,r,i,a);throw new t(`Illegal delimiter: '`+e+`'`)},`makeSizedDelim`),Sr=[{type:`small`,style:T.SCRIPTSCRIPT},{type:`small`,style:T.SCRIPT},{type:`small`,style:T.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],Cr=[{type:`small`,style:T.SCRIPTSCRIPT},{type:`small`,style:T.SCRIPT},{type:`small`,style:T.TEXT},{type:`stack`}],wr=[{type:`small`,style:T.SCRIPTSCRIPT},{type:`small`,style:T.SCRIPT},{type:`small`,style:T.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],Tr=e(function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},`delimTypeToFont`),Er=e(function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);it)return a}return n[n.length-1]},`traverseSequence`),Dr=e(function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=yr.has(e)?Sr:_r.has(e)?wr:Cr,s=Er(e,t,o,r);return s.type===`small`?rr(e,s.style,n,r,i,a):s.type===`large`?ar(e,s.size,n,r,i,a):fr(e,t,n,r,i,a)},`makeCustomSizedDelim`),Or=e(function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return Dr(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},`makeLeftRightDelim`),kr={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},Ar=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`));function jr(e,n){var r=Nn(e);if(r&&Ar.has(r.text))return r;throw r?new t(`Invalid delimiter '`+r.text+`' after '`+n.funcName+`'`,e):new t(`Invalid delimiter type '`+e.type+`'`,e)}e(jr,`checkDelimiter`),K({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],props:{numArgs:1,argTypes:[`primitive`]},handler:e((e,t)=>{var n=jr(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:kr[e.funcName].size,mclass:kr[e.funcName].mclass,delim:n.text}},`handler`),htmlBuilder:e((e,t)=>e.delim===`.`?U([e.mclass]):xr(e.delim,e.size,t,e.mode,[e.mclass]),`htmlBuilder`),mathmlBuilder:e(e=>{var t=[];e.delim!==`.`&&t.push(dn(e.delim,e.mode));var n=new Y(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=O(br[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n},`mathmlBuilder`)});function Mr(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}e(Mr,`assertParsed`),K({type:`leftright-right`,names:[`\\right`],props:{numArgs:1,primitive:!0},handler:e((e,n)=>{var r=e.parser.gullet.macros.get(`\\current@color`);if(r&&typeof r!=`string`)throw new t(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:jr(n[0],e).text,color:r}},`handler`)}),K({type:`leftright`,names:[`\\left`],props:{numArgs:1,primitive:!0},handler:e((e,t)=>{var n=jr(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=Q(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},`handler`),htmlBuilder:e((e,t)=>{Mr(e);for(var n=Qt(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o{Mr(e);var n=hn(e.body,t);if(e.left!==`.`){var r=new Y(`mo`,[dn(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new Y(`mo`,[dn(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return fn(n)},`mathmlBuilder`)}),K({type:`middle`,names:[`\\middle`],props:{numArgs:1,primitive:!0},handler:e((e,n)=>{var r=jr(n[0],e);if(!e.parser.leftrightDepth)throw new t(`\\middle without preceding \\left`,r);return{type:`middle`,mode:e.parser.mode,delim:r.text}},`handler`),htmlBuilder:e((e,t)=>{var n;if(e.delim===`.`)n=rn(t,[]);else{n=xr(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},`htmlBuilder`),mathmlBuilder:e((e,t)=>{var n=new Y(`mo`,[e.delim===`\\vert`||e.delim===`|`?dn(`|`,`text`):dn(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n},`mathmlBuilder`)});var Nr=e((e,t)=>{var n=Mt(J(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o=0,s=l(e.body);if(r===`sout`)a=U([`stretchy`,`sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=D({number:.6,unit:`pt`},t),u=D({number:.35,unit:`ex`},t),d=t.havingBaseSizing();i/=d.sizeMultiplier;var f=n.height+n.depth+c+u;n.style.paddingLeft=O(f/2+c);var p=Math.floor(1e3*f*i);a=Ot([`hide-tail`],[new Fe([new Ie(`phase`,he(p))],{width:`400em`,height:O(p/1e3),viewBox:`0 0 400000 `+p,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=O(f),o=n.depth+c+u}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var m=0,h=0,g=0;/box/.test(r)?(g=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),m=t.fontMetrics().fboxsep+(r===`colorbox`?0:g),h=m):r===`angl`?(g=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),m=4*g,h=Math.max(0,.25-n.depth)):(m=s?.2:0,h=m),a=jn(n,r,m,h,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=O(g)):r===`angl`&&g!==.049&&(a.style.borderTopWidth=O(g),a.style.borderRightWidth=O(g)),o=n.depth+h,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var _;if(e.backgroundColor)_=W({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var v=/cancel|phase/.test(r)?[`svg-align`]:[];_=W({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:v}]})}return/cancel/.test(r)&&(_.height=n.height,_.depth=n.depth),/cancel/.test(r)&&!s?U([`mord`,`cancel-lap`],[_],t):U([`mord`],[_],t)},`htmlBuilder$7`),Pr=e((e,t)=>{var n=0,r=new Y(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[Z(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+O(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`)}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r},`mathmlBuilder$6`);K({type:`enclose`,names:[`\\colorbox`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`text`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=Q(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:Nr,mathmlBuilder:Pr}),K({type:`enclose`,names:[`\\fcolorbox`],props:{numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`text`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=Q(t[0],`color-token`).color,o=Q(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:Nr,mathmlBuilder:Pr}),K({type:`enclose`,names:[`\\fbox`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\fbox`,body:t[0]}}}),K({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:Nr,mathmlBuilder:Pr}),K({type:`enclose`,names:[`\\sout`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:Nr,mathmlBuilder:Pr}),K({type:`enclose`,names:[`\\angl`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\angl`,body:t[0]}}});var Fr={};function Ir(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c{if(!e.parser.settings.displayMode)throw new t(`{`+e.envName+`} can be used only in display mode.`)},`validateAmsEnvironmentContext`),Hr=new Set([`gather`,`gather*`]);function Ur(e){if(!e.includes(`ed`))return!e.includes(`*`)}e(Ur,`getAutoTag`);function Wr(n,r,i){var{hskipBeforeAndAfter:a,addJot:o,cols:s,arraystretch:c,colSeparationType:l,autoTag:u,singleRow:d,emptySingleRow:f,maxNumCols:p,leqno:m}=r;if(n.gullet.beginGroup(),d||n.gullet.macros.set(`\\cr`,`\\\\\\relax`),!c){var h=n.gullet.expandMacroAsText(`\\arraystretch`);if(h==null)c=1;else if(c=parseFloat(h),!c||c<0)throw new t(`Invalid \\arraystretch: `+h)}n.gullet.beginGroup();var g=[],_=[g],v=[],y=[],b=u==null?void 0:[];function x(){u&&n.gullet.macros.set(`\\@eqnsw`,`1`,!0)}e(x,`beginRow`);function S(){b&&(n.gullet.macros.get(`\\df@tag`)?(b.push(n.subparse([new zr(`\\df@tag`)])),n.gullet.macros.set(`\\df@tag`,void 0,!0)):b.push(!!u&&n.gullet.macros.get(`\\@eqnsw`)===`1`))}for(e(S,`endRow`),x(),y.push(Br(n));;){var C=n.parseExpression(!1,d?`\\end`:`\\\\`);n.gullet.endGroup(),n.gullet.beginGroup();var w={type:`ordgroup`,mode:n.mode,body:C};i&&(w={type:`styling`,mode:n.mode,style:i,body:[w]}),g.push(w);var ee=n.fetch().text;if(ee===`&`){if(p&&g.length===p){if(d||l)throw new t(`Too many tab characters: &`,n.nextToken);n.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}n.consume()}else if(ee===`\\end`){S(),g.length===1&&w.type===`styling`&&w.body.length===1&&w.body[0].type===`ordgroup`&&w.body[0].body.length===0&&(_.length>1||!f)&&_.pop(),y.length<_.length+1&&y.push([]);break}else if(ee===`\\\\`){n.consume();var te=void 0;n.gullet.future().text!==` `&&(te=n.parseSizeGroup(!0)),v.push(te?te.value:null),S(),y.push(Br(n)),g=[],_.push(g),x()}else throw new t(`Expected & or \\\\ or \\cr or \\end`,n.nextToken)}return n.gullet.endGroup(),n.gullet.endGroup(),{type:`array`,mode:n.mode,addJot:o,arraystretch:c,body:_,cols:s,rowGaps:v,hskipBeforeAndAfter:a,hLinesBeforeRow:y,colSeparationType:l,tags:b,leqno:m}}e(Wr,`parseArray`);function Gr(e){return e.slice(0,1)===`d`?`display`:`text`}e(Gr,`dCellStyle`);var Kr=e(function(n,r){var i,a,o=n.body.length,s=n.hLinesBeforeRow,c=0,l=Array(o),u=[],d=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),f=1/r.fontMetrics().ptPerEm,p=5*f;n.colSeparationType&&n.colSeparationType===`small`&&(p=.2778*(r.havingStyle(T.SCRIPT).sizeMultiplier/r.sizeMultiplier));var m=n.colSeparationType===`CD`?D({number:3,unit:`ex`},r):12*f,h=3*f,g=n.arraystretch*m,_=.7*g,v=.3*g,y=0;function b(e){for(var t=0;t0&&(y+=.25),u.push({pos:y,isDashed:e[t]})}for(e(b,`setHLinePos`),b(s[0]),i=0;i0&&(ne+=v,Ce))for(i=0;i=c)){var ve=void 0;(a>0||n.hskipBeforeAndAfter)&&(ve=fe?.pregap??p,ve!==0&&(oe=U([`arraycolsep`],[]),oe.style.width=O(ve),ae.push(oe)));var ye=[];for(i=0;i0){for(var Ee=kt(`hline`,r,d),De=kt(`hdashline`,r,d),Oe=[{type:`elem`,elem:Te,shift:0}];u.length>0;){var ke=u.pop(),Ae=ke.pos-re;ke.isDashed?Oe.push({type:`elem`,elem:De,shift:Ae}):Oe.push({type:`elem`,elem:Ee,shift:Ae})}Te=W({positionType:`individualShift`,children:Oe})}if(ce.length===0)return U([`mord`],[Te],r);var je=U([`tag`],[W({positionType:`individualShift`,children:ce})],r);return jt([Te,je])},`htmlBuilder`),qr={c:`center `,l:`left `,r:`right `},Jr=e(function(e,t){for(var n=[],r=new Y(`mtd`,[],[`mtr-glue`]),i=new Y(`mtd`,[],[`mml-eqn-num`]),a=0;a0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=qr[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,S=1;S0?`left `:``,d+=w[w.length-1].length>0?`right `:``;for(var ee=1;ee0&&p&&(g=1),r[m]={type:`align`,align:h,pregap:g,postgap:0}}return o.colSeparationType=p?`align`:`alignat`,o},`alignedHandler`);Ir({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,n){var r=(Nn(n[0])?[n[0]]:Q(n[0],`ordgroup`).body).map(function(e){var n=Mn(e).text;if(`lcr`.includes(n))return{type:`align`,align:n};if(n===`|`)return{type:`separator`,separator:`|`};if(n===`:`)return{type:`separator`,separator:`:`};throw new t(`Unknown column alignment: `+n,e)}),i={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return Wr(e.parser,i,Gr(e.envName))},htmlBuilder:Kr,mathmlBuilder:Jr}),Ir({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var n={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],r=`c`,i={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:r}]};if(e.envName.charAt(e.envName.length-1)===`*`){var a=e.parser;if(a.consumeSpaces(),a.fetch().text===`[`){if(a.consume(),a.consumeSpaces(),r=a.fetch().text,!`lcr`.includes(r))throw new t(`Expected l or c or r`,a.nextToken);a.consume(),a.consumeSpaces(),a.expect(`]`),a.consume(),i.cols=[{type:`align`,align:r}]}}var o=Wr(e.parser,i,Gr(e.envName)),s=Math.max(0,...o.body.map(e=>e.length));return o.cols=Array(s).fill({type:`align`,align:r}),n?{type:`leftright`,mode:e.mode,body:[o],left:n[0],right:n[1],rightColor:void 0}:o},htmlBuilder:Kr,mathmlBuilder:Jr}),Ir({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=Wr(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:Kr,mathmlBuilder:Jr}),Ir({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,n){var r=(Nn(n[0])?[n[0]]:Q(n[0],`ordgroup`).body).map(function(e){var n=Mn(e).text;if(`lc`.includes(n))return{type:`align`,align:n};throw new t(`Unknown column alignment: `+n,e)});if(r.length>1)throw new t(`{subarray} can contain only one column`);var i={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5},a=Wr(e.parser,i,`script`);if(a.body.length>0&&a.body[0].length>1)throw new t(`{subarray} can contain only one column`);return a},htmlBuilder:Kr,mathmlBuilder:Jr}),Ir({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=Wr(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},Gr(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:Kr,mathmlBuilder:Jr}),Ir({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:Yr,htmlBuilder:Kr,mathmlBuilder:Jr}),Ir({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){Hr.has(e.envName)&&Vr(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:Ur(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Wr(e.parser,t,`display`)},htmlBuilder:Kr,mathmlBuilder:Jr}),Ir({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:Yr,htmlBuilder:Kr,mathmlBuilder:Jr}),Ir({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){Vr(e);var t={autoTag:Ur(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Wr(e.parser,t,`display`)},htmlBuilder:Kr,mathmlBuilder:Jr}),Ir({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return Vr(e),qn(e.parser)},htmlBuilder:Kr,mathmlBuilder:Jr}),$(`\\nonumber`,`\\gdef\\@eqnsw{0}`),$(`\\notag`,`\\nonumber`),K({type:`text`,names:[`\\hline`,`\\hdashline`],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new t(e.funcName+` valid only within array environment`)}});var Xr=Fr;K({type:`environment`,names:[`\\begin`,`\\end`],props:{numArgs:1,argTypes:[`text`]},handler(e,n){var{parser:r,funcName:i}=e,a=n[0];if(a.type!==`ordgroup`)throw new t(`Invalid environment name`,a);for(var o=``,s=0;s{var n=e.font,r=t.withFont(n);return J(e.body,r)},`htmlBuilder$5`),Qr=e((e,t)=>{var n=e.font,r=t.withFont(n);return Z(e.body,r)},`mathmlBuilder$4`),$r={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`,"\\bm":`\\boldsymbol`};K({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],props:{numArgs:1,allowedInArgument:!0},handler:e((e,t)=>{var{parser:n,funcName:r}=e,i=qt(t[0]),a=r;return a in $r&&(a=$r[a]),{type:`font`,mode:n.mode,font:a.slice(1),body:i}},`handler`),htmlBuilder:Zr,mathmlBuilder:Qr}),K({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],props:{numArgs:1},handler:e((e,t)=>{var{parser:n}=e,r=t[0];return{type:`mclass`,mode:n.mode,mclass:Vn(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:l(r)}},`handler`)}),K({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],props:{numArgs:0,allowedInText:!0},handler:e((e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}},`handler`),htmlBuilder:Zr,mathmlBuilder:Qr});var ei=e((e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=J(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d){var n=new Y(`mfrac`,[Z(e.numer,t),Z(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=D(e.barSize,t);n.setAttribute(`linethickness`,O(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new Y(`mo`,[new X(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new Y(`mo`,[new X(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return fn(i)}return n},`mathmlBuilder$3`),ni=e((e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e,`wrapWithStyle`);K({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],props:{numArgs:2,allowedInArgument:!0},handler:e((e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),ni({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},`handler`),htmlBuilder:ei,mathmlBuilder:ti}),K({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var ri=[`display`,`text`,`script`,`scriptscript`],ii=e(function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t},`delimFromValue`);K({type:`genfrac`,names:[`\\genfrac`],props:{numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=qt(t[0]),o=a.type===`atom`&&a.family===`open`?ii(a.text):null,s=qt(t[1]),c=s.type===`atom`&&s.family===`close`?ii(s.text):null,l=Q(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=Q(p.body[0],`textord`);f=ri[Number(m.text)]}}else p=Q(p,`textord`),f=ri[Number(p.text)];return ni({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),K({type:`infix`,names:[`\\above`],props:{numArgs:1,argTypes:[`size`],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:Q(t[0],`size`).value,token:i}}}),K({type:`genfrac`,names:[`\\\\abovefrac`],props:{numArgs:3,argTypes:[`math`,`size`,`math`]},handler:e((e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=Q(t[1],`infix`).size;if(!a)throw Error(`\\\\abovefrac expected size, but got `+String(a));var o=t[2],s=a.number>0;return{type:`genfrac`,mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null}},`handler`)});var ai=e((e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?J(e.sup,t.havingStyle(n.sup()),t):J(e.sub,t.havingStyle(n.sub()),t),i=Q(e.base,`horizBrace`)):i=Q(e,`horizBrace`);var a=J(i.base,t.havingBaseStyle(T.DISPLAY)),o=An(i,t),s;if(i.isOver?(s=W({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o}]}),s.children[0].children[0].children[1].classes.push(`svg-align`)):(s=W({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o},{type:`kern`,size:.1},{type:`elem`,elem:a}]}),s.children[0].children[0].children[0].classes.push(`svg-align`)),r){var c=U([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?W({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):W({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return U([`minner`,i.isOver?`mover`:`munder`],[s],t)},`htmlBuilder$3`);K({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:ai,mathmlBuilder:e((e,t)=>{var n=Dn(e.label);return new Y(e.isOver?`mover`:`munder`,[Z(e.base,t),n])},`mathmlBuilder$2`)}),K({type:`href`,names:[`\\href`],props:{numArgs:2,argTypes:[`url`,`original`],allowedInText:!0},handler:e((e,t)=>{var{parser:n}=e,r=t[1],i=Q(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:q(r)}:n.formatUnsupportedCmd(`\\href`)},`handler`),htmlBuilder:e((e,t)=>{var n=Qt(e.body,t,!1);return At(e.href,[],n,t)},`htmlBuilder`),mathmlBuilder:e((e,t)=>{var n=gn(e.body,t);return n instanceof Y||(n=new Y(`mrow`,[n])),n.setAttribute(`href`,e.href),n},`mathmlBuilder`)}),K({type:`href`,names:[`\\url`],props:{numArgs:1,argTypes:[`url`],allowedInText:!0},handler:e((e,t)=>{var{parser:n}=e,r=Q(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a{var{parser:r,funcName:i,token:a}=e,o=Q(n[0],`raw`).string,s=n[1];r.settings.strict&&r.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var c,l={};switch(i){case`\\htmlClass`:l.class=o,c={command:`\\htmlClass`,class:o};break;case`\\htmlId`:l.id=o,c={command:`\\htmlId`,id:o};break;case`\\htmlStyle`:l.style=o,c={command:`\\htmlStyle`,style:o};break;case`\\htmlData`:for(var u=o.split(`,`),d=0;d{var n=Qt(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=U(r,n,t);for(var a in e.attributes)a!==`class`&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},`htmlBuilder`),mathmlBuilder:e((e,t)=>gn(e.body,t),`mathmlBuilder`)}),K({type:`htmlmathml`,names:[`\\html@mathml`],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:e((e,t)=>{var{parser:n}=e;return{type:`htmlmathml`,mode:n.mode,html:q(t[0]),mathml:q(t[1])}},`handler`),htmlBuilder:e((e,t)=>jt(Qt(e.html,t,!1)),`htmlBuilder`),mathmlBuilder:e((e,t)=>gn(e.mathml,t),`mathmlBuilder`)});var oi=e(function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!n)throw new t(`Invalid size: '`+e+`' in \\includegraphics`);var r={number:+(n[1]+n[2]),unit:n[3]};if(!we(r))throw new t(`Invalid unit: '`+r.unit+`' in \\includegraphics.`);return r},`sizeData`);K({type:`includegraphics`,names:[`\\includegraphics`],props:{numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1},handler:e((e,n,r)=>{var{parser:i}=e,a={number:0,unit:`em`},o={number:.9,unit:`em`},s={number:0,unit:`em`},c=``;if(r[0])for(var l=Q(r[0],`raw`).string.split(`,`),u=0;u{var n=D(e.height,t),r=0;e.totalheight.number>0&&(r=D(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=D(e.width,t));var a={height:O(n+r)};i>0&&(a.width=O(i)),r>0&&(a.verticalAlign=O(-r));var o=new Me(e.src,e.alt,a);return o.height=n,o.depth=r,o},`htmlBuilder`),mathmlBuilder:e((e,t)=>{var n=new Y(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=D(e.height,t),i=0;if(e.totalheight.number>0&&(i=D(e.totalheight,t)-r,n.setAttribute(`valign`,O(-i))),n.setAttribute(`height`,O(r+i)),e.width.number>0){var a=D(e.width,t);n.setAttribute(`width`,O(a))}return n.setAttribute(`src`,e.src),n},`mathmlBuilder`)}),K({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],props:{numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=Q(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return Pt(e.dimension,t)},mathmlBuilder(e,t){return new cn(D(e.dimension,t))}}),K({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],props:{numArgs:1,allowedInText:!0},handler:e((e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},`handler`),htmlBuilder:e((e,t)=>{var n;e.alignment===`clap`?(n=U([],[J(e.body,t)]),n=U([`inner`],[n],t)):n=U([`inner`],[J(e.body,t)]);var r=U([`fix`],[]),i=U([e.alignment],[n,r],t),a=U([`strut`]);return a.style.height=O(i.height+i.depth),i.depth&&(a.style.verticalAlign=O(-i.depth)),i.children.unshift(a),i=U([`thinbox`],[i],t),U([`mord`,`vbox`],[i],t)},`htmlBuilder`),mathmlBuilder:e((e,t)=>{var n=new Y(`mpadded`,[Z(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n},`mathmlBuilder`)}),K({type:`styling`,names:[`\\(`,`$`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,body:o}}}),K({type:`text`,names:[`\\)`,`\\]`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new t(`Mismatched `+e.funcName)}});var si=e((e,t)=>{switch(t.style.size){case T.DISPLAY.size:return e.display;case T.TEXT.size:return e.text;case T.SCRIPT.size:return e.script;case T.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}},`chooseMathStyle`);K({type:`mathchoice`,names:[`\\mathchoice`],props:{numArgs:4,primitive:!0},handler:e((e,t)=>{var{parser:n}=e;return{type:`mathchoice`,mode:n.mode,display:q(t[0]),text:q(t[1]),script:q(t[2]),scriptscript:q(t[3])}},`handler`),htmlBuilder:e((e,t)=>jt(Qt(si(e,t),t,!1)),`htmlBuilder`),mathmlBuilder:e((e,t)=>gn(si(e,t),t),`mathmlBuilder`)});var ci=e((e,t,n,r,i,a,o)=>{e=U([],[e]);var s=n&&l(n),c,u;if(t){var d=J(t,r.havingStyle(i.sup()),r);u={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var f=J(n,r.havingStyle(i.sub()),r);c={elem:f,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-f.height)}}var p;if(u&&c)p=W({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:O(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:u.kern},{type:`elem`,elem:u.elem,marginLeft:O(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)p=W({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:O(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(u)p=W({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:u.kern},{type:`elem`,elem:u.elem,marginLeft:O(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var m=[p];if(c&&a!==0&&!s){var h=U([`mspace`],[],r);h.style.marginRight=O(a),m.unshift(h)}return U([`mop`,`op-limits`],m,r)},`assembleSupSub`),li=new Set([`\\smallint`]),ui=e((e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=Q(e.base,`op`),i=!0):a=Q(e,`op`);var o=t.style,s=!1;o.size===T.DISPLAY.size&&a.symbol&&!li.has(a.name)&&(s=!0);var c;if(a.symbol){var l=s?`Size2-Regular`:`Size1-Regular`,u=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(u=a.name.slice(1),a.name=u===`oiint`?`\\iint`:`\\iiint`),c=xt(a.name,l,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),u.length>0){var d=c.italic,f=Rt(u+`Size`+(s?`2`:`1`),t);c=W({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+u,c.classes.unshift(`mop`),c.italic=d}}else if(a.body){var p=Qt(a.body,t,!0);p.length===1&&p[0]instanceof Pe?(c=p[0],c.classes[0]=`mop`):c=U([`mop`],p,t)}else{for(var m=[],h=1;h{var n;if(e.symbol)n=new Y(`mo`,[dn(e.name,e.mode)]),li.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new Y(`mo`,hn(e.body,t));else{n=new Y(`mi`,[new X(e.name.slice(1))]);var r=new Y(`mo`,[dn(`⁡`,`text`)]);n=e.parentIsSupSub?new Y(`mrow`,[n,r]):sn([n,r])}return n},`mathmlBuilder$1`),fi={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};K({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),props:{numArgs:0},handler:e((e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=fi[i]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},`handler`),htmlBuilder:ui,mathmlBuilder:di}),K({type:`op`,names:[`\\mathop`],props:{numArgs:1,primitive:!0},handler:e((e,t)=>{var{parser:n}=e,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:q(r)}},`handler`),htmlBuilder:ui,mathmlBuilder:di});var pi={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};K({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:ui,mathmlBuilder:di}),K({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:ui,mathmlBuilder:di}),K({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=pi[r]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:ui,mathmlBuilder:di});var mi=e((e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=Q(e.base,`operatorname`),i=!0):a=Q(e,`operatorname`);var o;if(a.body.length>0){for(var s=Qt(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c{var{parser:n,funcName:r}=e,i=t[0];return{type:`operatorname`,mode:n.mode,body:q(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},`handler`),htmlBuilder:mi,mathmlBuilder:e((e,t)=>{for(var n=hn(e.body,t.withFont(`mathrm`)),r=!0,i=0;ie.toText()).join(``))]);var s=new Y(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new Y(`mo`,[dn(`⁡`,`text`)]);return e.parentIsSupSub?new Y(`mrow`,[s,c]):sn([s,c])},`mathmlBuilder`)}),$(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),Kt({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?jt(Qt(e.body,t,!1)):U([`mord`],Qt(e.body,t,!0),t)},mathmlBuilder(e,t){return gn(e.body,t,!0)}}),K({type:`overline`,names:[`\\overline`],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=J(e.body,t.havingCrampedStyle()),r=kt(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return U([`mord`,`overline`],[W({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new Y(`mo`,[new X(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Y(`mover`,[Z(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),K({type:`phantom`,names:[`\\phantom`],props:{numArgs:1,allowedInText:!0},handler:e((e,t)=>{var{parser:n}=e,r=t[0];return{type:`phantom`,mode:n.mode,body:q(r)}},`handler`),htmlBuilder:e((e,t)=>jt(Qt(e.body,t.withPhantom(),!1)),`htmlBuilder`),mathmlBuilder:e((e,t)=>new Y(`mphantom`,hn(e.body,t)),`mathmlBuilder`)}),$(`\\hphantom`,`\\smash{\\phantom{#1}}`),K({type:`vphantom`,names:[`\\vphantom`],props:{numArgs:1,allowedInText:!0},handler:e((e,t)=>{var{parser:n}=e,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},`handler`),htmlBuilder:e((e,t)=>U([`mord`,`rlap`],[U([`inner`],[J(e.body,t.withPhantom())]),U([`fix`],[])],t),`htmlBuilder`),mathmlBuilder:e((e,t)=>{var n=new Y(`mpadded`,[new Y(`mphantom`,hn(q(e.body),t))]);return n.setAttribute(`width`,`0px`),n},`mathmlBuilder`)}),K({type:`raisebox`,names:[`\\raisebox`],props:{numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e,r=Q(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=J(e.body,t);return W({positionType:`shift`,positionData:-D(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new Y(`mpadded`,[Z(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),K({type:`internal`,names:[`\\relax`],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:`internal`,mode:t.mode}}}),K({type:`rule`,names:[`\\rule`],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`]},handler(e,t,n){var{parser:r}=e,i=n[0],a=Q(t[0],`size`),o=Q(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&Q(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=U([`mord`,`rule`],[],t),r=D(e.width,t),i=D(e.height,t),a=e.shift?D(e.shift,t):0;return n.style.borderRightWidth=O(r),n.style.borderTopWidth=O(i),n.style.bottom=O(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=D(e.width,t),r=D(e.height,t),i=e.shift?D(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new Y(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,O(n)),o.setAttribute(`height`,O(r));var s=new Y(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,O(i)):(s.setAttribute(`height`,O(i)),s.setAttribute(`depth`,O(-i))),s.setAttribute(`voffset`,O(i)),s}});function hi(e,t,n){for(var r=Qt(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:gi.indexOf(r)+1,body:a}},`handler`),htmlBuilder:e((e,t)=>{var n=t.havingSize(e.size);return hi(e.body,n,t)},`htmlBuilder`),mathmlBuilder:e((e,t)=>{var n=t.havingSize(e.size),r=new Y(`mstyle`,hn(e.body,n));return r.setAttribute(`mathsize`,O(n.sizeMultiplier)),r},`mathmlBuilder`)}),K({type:`smash`,names:[`\\smash`],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:e((e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&Q(n[0],`ordgroup`);if(o)for(var s=``,c=0;c{var n=U([],[J(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return U([`mord`,`smash`],[n],t);if(n.children)for(var r=0;r{var n=new Y(`mpadded`,[Z(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n},`mathmlBuilder`)}),K({type:`sqrt`,names:[`\\sqrt`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=J(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=Mt(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.idn.height+n.depth+a&&(a=(a+l-n.height-n.depth)/2);var u=o.height-n.height-a-s;n.style.paddingLeft=O(c);var d=W({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+u)},{type:`elem`,elem:o},{type:`kern`,size:s}]});if(e.index){var f=t.havingStyle(T.SCRIPTSCRIPT),p=J(e.index,f,t);return U([`mord`,`sqrt`],[U([`root`],[W({positionType:`shift`,positionData:-(.6*(d.height-d.depth)),children:[{type:`elem`,elem:p}]})]),d],t)}return U([`mord`,`sqrt`],[d],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new Y(`mroot`,[Z(n,t),Z(r,t)]):new Y(`msqrt`,[Z(n,t)])}});var _i={display:T.DISPLAY,text:T.TEXT,script:T.SCRIPT,scriptscript:T.SCRIPTSCRIPT};K({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=_i[e.style],r=t.havingStyle(n).withFont(``);return hi(e.body,r,t)},mathmlBuilder(e,t){var n=_i[e.style],r=t.havingStyle(n),i=new Y(`mstyle`,hn(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var vi=e(function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===T.DISPLAY.size||n.alwaysHandleSupSub)?ui:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===T.DISPLAY.size||n.limits)?mi:null:n.type===`accent`?l(n.base)?Fn:null:n.type===`horizBrace`&&!e.sub===n.isOver?ai:null:null},`htmlBuilderDelegate`);Kt({type:`supsub`,htmlBuilder(e,t){var n=vi(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,o=J(r,t),s,c,u=t.fontMetrics(),d=0,f=0,p=r&&l(r);if(i){var m=t.havingStyle(t.style.sup());s=J(i,m,t),p||(d=o.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)}if(a){var h=t.havingStyle(t.style.sub());c=J(a,h,t),p||(f=o.depth+h.fontMetrics().subDrop*h.sizeMultiplier/t.sizeMultiplier)}var g=t.style===T.DISPLAY?u.sup1:t.style.cramped?u.sup3:u.sup2,_=t.sizeMultiplier,v=O(.5/u.ptPerEm/_),y=null;if(c){var b=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof Pe||b)&&(y=O(-o.italic))}var x;if(s&&c){d=Math.max(d,g,s.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var S=4*u.defaultRuleThickness;if(d-s.depth-(c.height-f)0&&(d+=C,f-=C)}x=W({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:f,marginRight:v,marginLeft:y},{type:`elem`,elem:s,shift:-d,marginRight:v}]})}else if(c)f=Math.max(f,u.sub1,c.height-.8*u.xHeight),x=W({positionType:`shift`,positionData:f,children:[{type:`elem`,elem:c,marginLeft:y,marginRight:v}]});else if(s)d=Math.max(d,g,s.depth+.25*u.xHeight),x=W({positionType:`shift`,positionData:-d,children:[{type:`elem`,elem:s,marginRight:v}]});else throw Error(`supsub must have either sup or sub.`);return U([nn(o,`right`)||`mord`],[o,U([`msupsub`],[x])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[Z(e.base,t)];e.sub&&a.push(Z(e.sub,t)),e.sup&&a.push(Z(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===T.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===T.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===T.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===T.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===T.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===T.DISPLAY)?`munder`:`msub`}return new Y(o,a)}}),Kt({type:`atom`,htmlBuilder(e,t){return St(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new Y(`mo`,[dn(e.text,e.mode)]);if(e.family===`bin`){var r=pn(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var yi={mi:`italic`,mn:`normal`,mtext:`normal`};Kt({type:`mathord`,htmlBuilder(e,t){return wt(e,t,`mathord`)},mathmlBuilder(e,t){var n=new Y(`mi`,[dn(e.text,e.mode,t)]),r=pn(e,t)||`italic`;return r!==yi[n.type]&&n.setAttribute(`mathvariant`,r),n}}),Kt({type:`textord`,htmlBuilder(e,t){return wt(e,t,`textord`)},mathmlBuilder(e,t){var n=dn(e.text,e.mode,t),r=pn(e,t)||`normal`,i=e.mode===`text`?new Y(`mtext`,[n]):/[0-9]/.test(e.text)?new Y(`mn`,[n]):e.text===`\\prime`?new Y(`mo`,[n]):new Y(`mi`,[n]);return r!==yi[i.type]&&i.setAttribute(`mathvariant`,r),i}});var bi={"\\nobreak":`nobreak`,"\\allowbreak":`allowbreak`},xi={" ":{},"\\ ":{},"~":{className:`nobreak`},"\\space":{},"\\nobreakspace":{className:`nobreak`}};Kt({type:`spacing`,htmlBuilder(e,n){if(xi.hasOwnProperty(e.text)){var r=xi[e.text].className||``;if(e.mode===`text`){var i=wt(e,n,`textord`);return i.classes.push(r),i}return U([`mspace`,r],[St(e.text,e.mode,n)],n)}if(bi.hasOwnProperty(e.text))return U([`mspace`,bi[e.text]],[],n);throw new t(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,n){var r;if(xi.hasOwnProperty(e.text))r=new Y(`mtext`,[new X(`\xA0`)]);else if(bi.hasOwnProperty(e.text))return new Y(`mspace`);else throw new t(`Unknown type of space "`+e.text+`"`);return r}});var Si=e(()=>{var e=new Y(`mtd`,[]);return e.setAttribute(`width`,`50%`),e},`pad`);Kt({type:`tag`,mathmlBuilder(e,t){var n=new Y(`mtable`,[new Y(`mtr`,[Si(),new Y(`mtd`,[gn(e.body,t)]),Si(),new Y(`mtd`,[gn(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var Ci={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},wi={"\\textbf":`textbf`,"\\textmd":`textmd`},Ti={"\\textit":`textit`,"\\textup":`textup`},Ei=e((e,t)=>{var n=e.font;return n?Ci[n]?t.withTextFontFamily(Ci[n]):wi[n]?t.withTextFontWeight(wi[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(Ti[n]):t},`optionsWithFont`);K({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],props:{numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`text`,mode:n.mode,body:q(i),font:r}},htmlBuilder(e,t){var n=Ei(e,t);return U([`mord`,`text`],Qt(e.body,n,!0),n)},mathmlBuilder(e,t){var n=Ei(e,t);return gn(e.body,n)}}),K({type:`underline`,names:[`\\underline`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`underline`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=J(e.body,t),r=kt(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return U([`mord`,`underline`],[W({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new Y(`mo`,[new X(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Y(`munder`,[Z(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),K({type:`vcenter`,names:[`\\vcenter`],props:{numArgs:1,argTypes:[`original`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`vcenter`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=J(e.body,t),r=t.fontMetrics().axisHeight;return W({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new Y(`mrow`,[new Y(`mpadded`,[Z(e.body,t)],[`vcenter`])])}}),K({type:`verb`,names:[`\\verb`],props:{numArgs:0,allowedInText:!0},handler(e,n,r){throw new t(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=Di(e),r=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?`␣`:`\xA0`),`makeVerb`),Oi=Ut,ki=`[ \r + ]`,Ai=`\\\\[a-zA-Z@]+`,ji=`\\\\[^\ud800-\udfff]`,Mi=`(`+Ai+`)`+ki+`*`,Ni=`\\\\( +|[ \r ]+ +?)[ \r ]*`,Pi=`[̀-ͯ]`,Fi=RegExp(Pi+`+$`),Ii=`(`+ki+`+)|`+(Ni+`|`)+`([!-\\[\\]-‧‪-퟿豈-￿]`+(Pi+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(Pi+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+Mi)+(`|`+ji+`)`),Li=class{static{e(this,`Lexer`)}constructor(e,t){this.input=e,this.settings=t,this.tokenRegex=new RegExp(Ii,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,n=this.tokenRegex.lastIndex;if(n===e.length)return new zr(`EOF`,new Rr(this,n,n));var r=this.tokenRegex.exec(e);if(r===null||r.index!==n)throw new t(`Unexpected character: '`+e[n]+`'`,new zr(e[n],new Rr(this,n,n+1)));var i=r[6]||r[3]||(r[2]?`\\ `:` `);if(this.catcodes[i]===14){var a=e.indexOf(` +`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict(`commentAtEnd`,`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`)):this.tokenRegex.lastIndex=a+1,this.lex()}return new zr(i,new Rr(this,n,this.tokenRegex.lastIndex))}},Ri=class{static{e(this,`Namespace`)}constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new t(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var n in e)e.hasOwnProperty(n)&&(e[n]==null?delete this.current[n]:this.current[n]=e[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},zi=Lr;$(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),$(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),$(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),$(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),$(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),$(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),$(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Bi={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};$(`\\char`,function(e){var n=e.popToken(),r,i=0;if(n.text===`'`)r=8,n=e.popToken();else if(n.text===`"`)r=16,n=e.popToken();else if(n.text==="`"){if(n=e.popToken(),n.text[0]===`\\`)i=n.text.charCodeAt(1);else if(n.text===`EOF`)throw new t("\\char` missing argument");else i=n.text.charCodeAt(0)}else r=10;if(r){if(i=Bi[n.text],i==null||i>=r)throw new t(`Invalid base-`+r+` digit `+n.text);for(var a;(a=Bi[e.future().text])!=null&&a{var a=e.consumeArg().tokens;if(a.length!==1)throw new t(`\\newcommand's first argument must be a macro name`);var o=a[0].text,s=e.isDefined(o);if(s&&!n)throw new t(`\\newcommand{`+o+`} attempting to redefine `+(o+`; use \\renewcommand`));if(!s&&!r)throw new t(`\\renewcommand{`+o+`} when command `+o+` does not yet exist; use \\newcommand`);var c=0;if(a=e.consumeArg().tokens,a.length===1&&a[0].text===`[`){for(var l=``,u=e.expandNextToken();u.text!==`]`&&u.text!==`EOF`;)l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new t(`Invalid number of arguments: `+l);c=parseInt(l),a=e.consumeArg().tokens}return s&&i||e.macros.set(o,{tokens:a,numArgs:c}),``},`newcommand`);$(`\\newcommand`,e=>Vi(e,!1,!0,!1)),$(`\\renewcommand`,e=>Vi(e,!0,!1,!1)),$(`\\providecommand`,e=>Vi(e,!0,!0,!0)),$(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),$(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),$(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Oi[n],k.math[n],k.text[n]),``}),$(`\\bgroup`,`{`),$(`\\egroup`,`}`),$(`~`,`\\nobreakspace`),$(`\\lq`,"`"),$(`\\rq`,`'`),$(`\\aa`,`\\r a`),$(`\\AA`,`\\r A`),$(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),$(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),$(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),$(`ℬ`,`\\mathscr{B}`),$(`ℰ`,`\\mathscr{E}`),$(`ℱ`,`\\mathscr{F}`),$(`ℋ`,`\\mathscr{H}`),$(`ℐ`,`\\mathscr{I}`),$(`ℒ`,`\\mathscr{L}`),$(`ℳ`,`\\mathscr{M}`),$(`ℛ`,`\\mathscr{R}`),$(`ℭ`,`\\mathfrak{C}`),$(`ℌ`,`\\mathfrak{H}`),$(`ℨ`,`\\mathfrak{Z}`),$(`\\Bbbk`,`\\Bbb{k}`),$(`\\llap`,`\\mathllap{\\textrm{#1}}`),$(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),$(`\\clap`,`\\mathclap{\\textrm{#1}}`),$(`\\mathstrut`,`\\vphantom{(}`),$(`\\underbar`,`\\underline{\\text{#1}}`),$(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),$(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),$(`\\ne`,`\\neq`),$(`≠`,`\\neq`),$(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),$(`∉`,`\\notin`),$(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),$(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),$(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),$(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),$(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),$(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),$(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),$(`⟂`,`\\perp`),$(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),$(`∌`,`\\notni`),$(`⌜`,`\\ulcorner`),$(`⌝`,`\\urcorner`),$(`⌞`,`\\llcorner`),$(`⌟`,`\\lrcorner`),$(`©`,`\\copyright`),$(`®`,`\\textregistered`),$(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),$(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),$(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),$(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),$(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),$(`⋮`,`\\vdots`),$(`\\varGamma`,`\\mathit{\\Gamma}`),$(`\\varDelta`,`\\mathit{\\Delta}`),$(`\\varTheta`,`\\mathit{\\Theta}`),$(`\\varLambda`,`\\mathit{\\Lambda}`),$(`\\varXi`,`\\mathit{\\Xi}`),$(`\\varPi`,`\\mathit{\\Pi}`),$(`\\varSigma`,`\\mathit{\\Sigma}`),$(`\\varUpsilon`,`\\mathit{\\Upsilon}`),$(`\\varPhi`,`\\mathit{\\Phi}`),$(`\\varPsi`,`\\mathit{\\Psi}`),$(`\\varOmega`,`\\mathit{\\Omega}`),$(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),$(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),$(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),$(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),$(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),$(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),$(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),$(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var Hi={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},Ui=new Set([`bin`,`rel`]);$(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in Hi?t=Hi[n]:(n.slice(0,4)===`\\not`||n in k.math&&Ui.has(k.math[n].group))&&(t=`\\dotsb`),t});var Wi={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};$(`\\dotso`,function(e){return e.future().text in Wi?`\\ldots\\,`:`\\ldots`}),$(`\\dotsc`,function(e){var t=e.future().text;return t in Wi&&t!==`,`?`\\ldots\\,`:`\\ldots`}),$(`\\cdots`,function(e){return e.future().text in Wi?`\\@cdots\\,`:`\\@cdots`}),$(`\\dotsb`,`\\cdots`),$(`\\dotsm`,`\\cdots`),$(`\\dotsi`,`\\!\\cdots`),$(`\\dotsx`,`\\ldots\\,`),$(`\\DOTSI`,`\\relax`),$(`\\DOTSB`,`\\relax`),$(`\\DOTSX`,`\\relax`),$(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),$(`\\,`,`\\tmspace+{3mu}{.1667em}`),$(`\\thinspace`,`\\,`),$(`\\>`,`\\mskip{4mu}`),$(`\\:`,`\\tmspace+{4mu}{.2222em}`),$(`\\medspace`,`\\:`),$(`\\;`,`\\tmspace+{5mu}{.2777em}`),$(`\\thickspace`,`\\;`),$(`\\!`,`\\tmspace-{3mu}{.1667em}`),$(`\\negthinspace`,`\\!`),$(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),$(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),$(`\\enspace`,`\\kern.5em `),$(`\\enskip`,`\\hskip.5em\\relax`),$(`\\quad`,`\\hskip1em\\relax`),$(`\\qquad`,`\\hskip2em\\relax`),$(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),$(`\\tag@paren`,`\\tag@literal{({#1})}`),$(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new t(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),$(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),$(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),$(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),$(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),$(`\\newline`,`\\\\\\relax`),$(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var Gi=O(Ve[`Main-Regular`][84][1]-.7*Ve[`Main-Regular`][65][1]);$(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+Gi+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),$(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+Gi+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),$(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),$(`\\@hspace`,`\\hskip #1\\relax`),$(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),$(`\\ordinarycolon`,`:`),$(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),$(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),$(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),$(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),$(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),$(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),$(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),$(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),$(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),$(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),$(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),$(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),$(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),$(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),$(`∷`,`\\dblcolon`),$(`∹`,`\\eqcolon`),$(`≔`,`\\coloneqq`),$(`≕`,`\\eqqcolon`),$(`⩴`,`\\Coloneqq`),$(`\\ratio`,`\\vcentcolon`),$(`\\coloncolon`,`\\dblcolon`),$(`\\colonequals`,`\\coloneqq`),$(`\\coloncolonequals`,`\\Coloneqq`),$(`\\equalscolon`,`\\eqqcolon`),$(`\\equalscoloncolon`,`\\Eqqcolon`),$(`\\colonminus`,`\\coloneq`),$(`\\coloncolonminus`,`\\Coloneq`),$(`\\minuscolon`,`\\eqcolon`),$(`\\minuscoloncolon`,`\\Eqcolon`),$(`\\coloncolonapprox`,`\\Colonapprox`),$(`\\coloncolonsim`,`\\Colonsim`),$(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),$(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),$(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),$(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),$(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),$(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),$(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),$(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),$(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),$(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),$(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),$(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),$(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),$(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),$(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),$(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),$(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),$(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),$(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),$(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),$(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),$(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),$(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),$(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),$(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),$(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),$(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),$(`\\imath`,`\\html@mathml{\\@imath}{ı}`),$(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),$(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),$(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),$(`⟦`,`\\llbracket`),$(`⟧`,`\\rrbracket`),$(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),$(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),$(`⦃`,`\\lBrace`),$(`⦄`,`\\rBrace`),$(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),$(`⦵`,`\\minuso`),$(`\\darr`,`\\downarrow`),$(`\\dArr`,`\\Downarrow`),$(`\\Darr`,`\\Downarrow`),$(`\\lang`,`\\langle`),$(`\\rang`,`\\rangle`),$(`\\uarr`,`\\uparrow`),$(`\\uArr`,`\\Uparrow`),$(`\\Uarr`,`\\Uparrow`),$(`\\N`,`\\mathbb{N}`),$(`\\R`,`\\mathbb{R}`),$(`\\Z`,`\\mathbb{Z}`),$(`\\alef`,`\\aleph`),$(`\\alefsym`,`\\aleph`),$(`\\Alpha`,`\\mathrm{A}`),$(`\\Beta`,`\\mathrm{B}`),$(`\\bull`,`\\bullet`),$(`\\Chi`,`\\mathrm{X}`),$(`\\clubs`,`\\clubsuit`),$(`\\cnums`,`\\mathbb{C}`),$(`\\Complex`,`\\mathbb{C}`),$(`\\Dagger`,`\\ddagger`),$(`\\diamonds`,`\\diamondsuit`),$(`\\empty`,`\\emptyset`),$(`\\Epsilon`,`\\mathrm{E}`),$(`\\Eta`,`\\mathrm{H}`),$(`\\exist`,`\\exists`),$(`\\harr`,`\\leftrightarrow`),$(`\\hArr`,`\\Leftrightarrow`),$(`\\Harr`,`\\Leftrightarrow`),$(`\\hearts`,`\\heartsuit`),$(`\\image`,`\\Im`),$(`\\infin`,`\\infty`),$(`\\Iota`,`\\mathrm{I}`),$(`\\isin`,`\\in`),$(`\\Kappa`,`\\mathrm{K}`),$(`\\larr`,`\\leftarrow`),$(`\\lArr`,`\\Leftarrow`),$(`\\Larr`,`\\Leftarrow`),$(`\\lrarr`,`\\leftrightarrow`),$(`\\lrArr`,`\\Leftrightarrow`),$(`\\Lrarr`,`\\Leftrightarrow`),$(`\\Mu`,`\\mathrm{M}`),$(`\\natnums`,`\\mathbb{N}`),$(`\\Nu`,`\\mathrm{N}`),$(`\\Omicron`,`\\mathrm{O}`),$(`\\plusmn`,`\\pm`),$(`\\rarr`,`\\rightarrow`),$(`\\rArr`,`\\Rightarrow`),$(`\\Rarr`,`\\Rightarrow`),$(`\\real`,`\\Re`),$(`\\reals`,`\\mathbb{R}`),$(`\\Reals`,`\\mathbb{R}`),$(`\\Rho`,`\\mathrm{P}`),$(`\\sdot`,`\\cdot`),$(`\\sect`,`\\S`),$(`\\spades`,`\\spadesuit`),$(`\\sub`,`\\subset`),$(`\\sube`,`\\subseteq`),$(`\\supe`,`\\supseteq`),$(`\\Tau`,`\\mathrm{T}`),$(`\\thetasym`,`\\vartheta`),$(`\\weierp`,`\\wp`),$(`\\Zeta`,`\\mathrm{Z}`),$(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),$(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),$(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),$(`\\bra`,`\\mathinner{\\langle{#1}|}`),$(`\\ket`,`\\mathinner{|{#1}\\rangle}`),$(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),$(`\\Bra`,`\\left\\langle#1\\right|`),$(`\\Ket`,`\\left|#1\\right\\rangle`);var Ki=e(t=>n=>{var r=n.consumeArg().tokens,i=n.consumeArg().tokens,a=n.consumeArg().tokens,o=n.consumeArg().tokens,s=n.macros.get(`|`),c=n.macros.get(`\\|`);n.macros.beginGroup();var l=e(e=>n=>{t&&(n.macros.set(`|`,s),a.length&&n.macros.set(`\\|`,c));var r=e;return!e&&a.length&&n.future().text===`|`&&(n.popToken(),r=!0),{tokens:r?a:i,numArgs:0}},`midMacro`);n.macros.set(`|`,l(!1)),a.length&&n.macros.set(`\\|`,l(!0));var u=n.consumeArg().tokens,d=n.expandTokens([...o,...u,...r]);return n.macros.endGroup(),{tokens:d.reverse(),numArgs:0}},`braketHelper`);$(`\\bra@ket`,Ki(!1)),$(`\\bra@set`,Ki(!0)),$(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),$(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),$(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),$(`\\angln`,`{\\angl n}`),$(`\\blue`,`\\textcolor{##6495ed}{#1}`),$(`\\orange`,`\\textcolor{##ffa500}{#1}`),$(`\\pink`,`\\textcolor{##ff00af}{#1}`),$(`\\red`,`\\textcolor{##df0030}{#1}`),$(`\\green`,`\\textcolor{##28ae7b}{#1}`),$(`\\gray`,`\\textcolor{gray}{#1}`),$(`\\purple`,`\\textcolor{##9d38bd}{#1}`),$(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),$(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),$(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),$(`\\blueD`,`\\textcolor{##11accd}{#1}`),$(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),$(`\\tealA`,`\\textcolor{##94fff5}{#1}`),$(`\\tealB`,`\\textcolor{##26edd5}{#1}`),$(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),$(`\\tealD`,`\\textcolor{##01a995}{#1}`),$(`\\tealE`,`\\textcolor{##208170}{#1}`),$(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),$(`\\greenB`,`\\textcolor{##8af281}{#1}`),$(`\\greenC`,`\\textcolor{##74cf70}{#1}`),$(`\\greenD`,`\\textcolor{##1fab54}{#1}`),$(`\\greenE`,`\\textcolor{##0d923f}{#1}`),$(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),$(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),$(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),$(`\\goldD`,`\\textcolor{##e07d10}{#1}`),$(`\\goldE`,`\\textcolor{##a75a05}{#1}`),$(`\\redA`,`\\textcolor{##fca9a9}{#1}`),$(`\\redB`,`\\textcolor{##ff8482}{#1}`),$(`\\redC`,`\\textcolor{##f9685d}{#1}`),$(`\\redD`,`\\textcolor{##e84d39}{#1}`),$(`\\redE`,`\\textcolor{##bc2612}{#1}`),$(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),$(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),$(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),$(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),$(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),$(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),$(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),$(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),$(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),$(`\\purpleE`,`\\textcolor{##543b78}{#1}`),$(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),$(`\\mintB`,`\\textcolor{##edf2df}{#1}`),$(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),$(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),$(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),$(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),$(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),$(`\\grayE`,`\\textcolor{##babec2}{#1}`),$(`\\grayF`,`\\textcolor{##888d93}{#1}`),$(`\\grayG`,`\\textcolor{##626569}{#1}`),$(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),$(`\\grayI`,`\\textcolor{##21242c}{#1}`),$(`\\kaBlue`,`\\textcolor{##314453}{#1}`),$(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var qi={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Ji=class{static{e(this,`MacroExpander`)}constructor(e,t,n){this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Ri(zi,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Li(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken(),{tokens:r,end:n}=this.consumeArg([`]`])}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new zr(`EOF`,n.loc)),this.pushTokens(r),new zr(``,Rr.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var n=[],r=e&&e.length>0;r||this.consumeSpaces();var i=this.future(),a,o=0,s=0;do{if(a=this.popToken(),n.push(a),a.text===`{`)++o;else if(a.text===`}`){if(--o,o===-1)throw new t(`Extra }`,a)}else if(a.text===`EOF`)throw new t(`Unexpected end of input in a macro argument, expected '`+(e&&r?e[s]:`}`)+`'`,a);if(e&&r){if((o===0||o===1&&e[s]===`{`)&&a.text===e[s]){if(++s,s===e.length){n.splice(-s,s);break}}else s=0}}while(o!==0||r);return i.text===`{`&&n[n.length-1].text===`}`&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:i,end:a}}consumeArgs(e,n){if(n){if(n.length!==e+1)throw new t(`The length of delimiters doesn't match the number of args!`);for(var r=n[0],i=0;ithis.settings.maxExpand)throw new t(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var n=this.popToken(),r=n.text,i=n.noexpand?null:this._getExpansion(r);if(i==null||e&&i.unexpandable){if(e&&i==null&&r[0]===`\\`&&!this.isDefined(r))throw new t(`Undefined control sequence: `+r);return this.pushToken(n),!1}this.countExpansion(1);var a=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var s=a.length-1;s>=0;--s){var c=a[s];if(c.text===`#`){if(s===0)throw new t(`Incomplete placeholder at end of macro body`,c);if(c=a[--s],c.text===`#`)a.splice(s+1,1);else if(/^[1-9]$/.test(c.text))a.splice(s,2,...o[c.text-1]);else throw new t(`Not a valid argument number`,c)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new zr(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new Li(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||Oi.hasOwnProperty(e)||k.math.hasOwnProperty(e)||k.text.hasOwnProperty(e)||qi.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t==null?Oi.hasOwnProperty(e)&&!Oi[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},Yi=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Xi=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),Zi={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},Qi={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},$i=class n{static{e(this,`Parser`)}constructor(e,t){this.mode=`math`,this.gullet=new Ji(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,n){if(n===void 0&&(n=!0),this.fetch().text!==e)throw new t(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new zr(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(e,t){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(n.endOfExpression.has(i.text)||t&&i.text===t||e&&Oi[i.text]&&Oi[i.text].infix)break;var a=this.parseAtom(t);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var n=-1,r,i=0;i=128)this.settings.strict&&(ce(n.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+n[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+n[0]+`"`+(` (`+n.charCodeAt(0)+`)`),e)),o={type:`textord`,mode:`text`,loc:Rr.range(e),text:n};else return null;if(this.consume(),a)for(var d=0;d(e(),a(u,o(t(s(l)(s(v),22))),{caption:i(e=>[...d[0]||=[r(`p`,null,[n(`Generating endoscopy images `),r(`strong`,null,`and`),n(` their segmentation masks, to train detection models where real annotated data is scarce.`)],-1)]]),default:i(()=>[d[1]||=r(`img`,{src:`/lecture-01/assets/synthetic-polyp-CIkbWMkW.jpeg`,alt:`Generated endoscopy images of polyps alongside their segmentation masks`},null,-1)]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-9H7zUQWd.js b/lecture-01/assets/md-9H7zUQWd.js new file mode 100644 index 0000000000000000000000000000000000000000..b8b28a86f60a5926016ddd25793134a7dc220044 --- /dev/null +++ b/lecture-01/assets/md-9H7zUQWd.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,S as r,_ as i,et as a,v as o,xt as s,yt as c}from"./modules/shiki-CJZsCeMT.js";import{n as l,t as u}from"./slidev/context-C6dxaFaS.js";import{t as d}from"./default-cZapvzLK.js";import{t as f}from"./slidev/VClicks-XVjwUv_k.js";var p={class:`grid grid-cols-2 gap-8 mt-2`},m={__name:`slides.md__slidev_8`,setup(m){let{$slidev:h,$nav:g,$clicksContext:_,$clicks:v,$page:y,$renderContext:b,$frontmatter:x}=l();return _.setup(),(l,m)=>{let h=f;return e(),o(d,s(n(c(u)(c(x),7))),{default:a(()=>[m[4]||=i(`h1`,null,`Workload`,-1),i(`div`,p,[i(`div`,null,[m[1]||=i(`h3`,null,`Where the 200 hours go`,-1),t(h,null,{default:a(()=>[...m[0]||=[i(`ul`,null,[i(`li`,null,[i(`strong`,null,`48 h`),r(` — lectures and exercises (12 weeks × 4 h)`)]),i(`li`,null,[i(`strong`,null,`72 h`),r(` — self-study`)]),i(`li`,null,[i(`strong`,null,`80 h`),r(` — exam preparation and execution`)])],-1)]]),_:1})]),i(`div`,null,[m[3]||=i(`h3`,null,`Evaluation`,-1),t(h,null,{default:a(()=>[...m[2]||=[i(`ul`,null,[i(`li`,null,[i(`strong`,null,`Individual project`),r(` — mandatory`),i(`br`),i(`span`,{class:`dl-secondary`},`paper + code (notebooks)`)]),i(`li`,null,[i(`strong`,null,`Final group project`),r(`, 2–3 people — mandatory`),i(`br`),i(`span`,{class:`dl-secondary`},`draft paper (report) + code (notebooks)`)]),i(`li`,null,[r(`Grades `),i(`strong`,null,`A–F`)])],-1)]]),_:1})])])]),_:1},16)}}};export{m as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-BP2UdqZk.js b/lecture-01/assets/md-BP2UdqZk.js new file mode 100644 index 0000000000000000000000000000000000000000..10b1fdb9ce68c8d6bd06affe47184bb83c4f4d23 --- /dev/null +++ b/lecture-01/assets/md-BP2UdqZk.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,et as o,tt as s,v as c,xt as l,yt as u}from"./modules/shiki-CJZsCeMT.js";import{n as d,t as f}from"./slidev/context-C6dxaFaS.js";import{t as p}from"./default-cZapvzLK.js";import{t as m}from"./slidev/VClicks-XVjwUv_k.js";var h=`/lecture-01/assets/application-1-CxfaDnto.jpeg`,g=`/lecture-01/assets/application-2-Do39NhPN.jpeg`,_=`/lecture-01/assets/application-3-Dw04GQSX.jpeg`,v=`/lecture-01/assets/application-4-DR7htHPb.jpeg`,y={class:`grid grid-cols-[1fr_auto] gap-8`},b={class:`grid grid-cols-2 gap-2 w-72 self-start`},x={src:h,alt:`Deep learning application`,class:`rounded w-full`},S={src:g,alt:`Deep learning application`,class:`rounded w-full`},C={src:_,alt:`Deep learning application`,class:`rounded w-full`},w={src:v,alt:`Deep learning application`,class:`rounded w-full`},T={__name:`slides.md__slidev_20`,setup(h){let{$slidev:g,$nav:_,$clicksContext:v,$clicks:T,$page:E,$renderContext:D,$frontmatter:O}=d();return v.setup(),(d,h)=>{let g=m,_=r(`click`);return e(),c(p,l(n(u(f)(u(O),19))),{default:o(()=>[h[1]||=a(`h1`,null,`Some applications of DL`,-1),a(`div`,y,[a(`div`,null,[t(g,null,{default:o(()=>[...h[0]||=[a(`ul`,null,[a(`li`,null,`Computer vision`),a(`li`,null,`Natural language processing`),a(`li`,null,[i(`Self-driving cars `),a(`span`,{class:`dl-secondary`},`(more than computer vision)`)]),a(`li`,null,`Healthcare`),a(`li`,null,`Entertainment`),a(`li`,null,`Composing music`),a(`li`,null,`Robotics`),a(`li`,null,`Fraud detection`),a(`li`,null,`E-commerce`)],-1)]]),_:1})]),a(`div`,b,[s(a(`img`,x,null,512),[[_]]),s(a(`img`,S,null,512),[[_]]),s(a(`img`,C,null,512),[[_]]),s(a(`img`,w,null,512),[[_]])])])]),_:1},16)}}};export{T as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-BTbgIS6C.css b/lecture-01/assets/md-BTbgIS6C.css new file mode 100644 index 0000000000000000000000000000000000000000..ae6be7cfb00d2dc6de09a949c819c8070fda31cc --- /dev/null +++ b/lecture-01/assets/md-BTbgIS6C.css @@ -0,0 +1 @@ +.dl-cycle[data-v-aa342f99]{align-items:center;gap:2rem;width:100%;height:100%;min-height:0;display:flex}.dl-cycle__svg[data-v-aa342f99]{flex:none;max-width:50%;height:100%;max-height:100%}.dl-cycle__arc[data-v-aa342f99]{fill:none;stroke:var(--dl-border);stroke-width:1.5px}.dl-cycle__hub[data-v-aa342f99]{fill:var(--dl-accent-soft);stroke:var(--dl-accent);stroke-width:1.5px}.dl-cycle__hublabel[data-v-aa342f99]{fill:var(--dl-body);text-anchor:middle;font-size:11px}.dl-cycle__node circle[data-v-aa342f99]{fill:var(--dl-surface);stroke:var(--dl-muted);stroke-width:1.5px;cursor:pointer;transition:fill .15s,stroke .15s}.dl-cycle__node text[data-v-aa342f99]{fill:var(--dl-body);text-anchor:middle;pointer-events:none;font-size:12px;font-weight:700}.dl-cycle__node.is-selected circle[data-v-aa342f99]{fill:var(--dl-accent);stroke:var(--dl-accent-strong)}.dl-cycle__node.is-selected text[data-v-aa342f99]{fill:#fff}.dl-cycle__legend[data-v-aa342f99]{flex:auto;min-width:0}.dl-cycle__legend ol[data-v-aa342f99]{margin:0;padding-left:1.5rem;list-style:decimal}.dl-cycle__legend li[data-v-aa342f99]{color:var(--dl-muted);cursor:pointer;margin:.3rem 0;font-size:1.02rem;transition:color .15s}.dl-cycle__legend li.is-selected[data-v-aa342f99]{color:var(--dl-heading);font-weight:600} diff --git a/lecture-01/assets/md-Ba1Ho0R6.js b/lecture-01/assets/md-Ba1Ho0R6.js new file mode 100644 index 0000000000000000000000000000000000000000..5bc560e1a45508cad0415c1dc0dddf2f5b59e1ca --- /dev/null +++ b/lecture-01/assets/md-Ba1Ho0R6.js @@ -0,0 +1 @@ +import{B as e,D as t,G as n,S as r,_ as i,b as a,et as o,tt as s,v as c,xt as l,yt as u}from"./modules/shiki-CJZsCeMT.js";import{n as d,t as f}from"./slidev/context-C6dxaFaS.js";import{t as p}from"./default-cZapvzLK.js";var m={class:`grid grid-cols-3 gap-4 mt-4`},h={class:`dl-hw`},g={class:`dl-hw is-primary`},_={class:`dl-hw`},v={class:`mt-6 dl-callout`},y={__name:`slides.md__slidev_29`,setup(y){let{$slidev:b,$nav:x,$clicksContext:S,$clicks:C,$page:w,$renderContext:T,$frontmatter:E}=d();return S.setup(),(d,y)=>{let b=n(`click`);return e(),c(p,l(t(u(f)(u(E),28))),{default:o(()=>[y[4]||=i(`h1`,null,`Hardware`,-1),i(`div`,m,[s((e(),a(`div`,h,[...y[0]||=[i(`h3`,null,`CPU`,-1),i(`p`,{class:`dl-secondary`},`Fine for small models and all the data work. Not for training.`,-1),i(`div`,{class:`dl-hw__vendors`},`Intel · AMD · Apple · Qualcomm · Samsung · IBM`,-1)]])),[[b]]),s((e(),a(`div`,g,[...y[1]||=[i(`h3`,null,`GPU`,-1),i(`p`,{class:`dl-secondary`},`What we actually train on. Thousands of cores doing the same matrix multiply.`,-1),i(`div`,{class:`dl-hw__vendors`},`NVIDIA · AMD · Broadcom · Imagination`,-1)]])),[[b]]),s((e(),a(`div`,_,[...y[2]||=[i(`h3`,null,`TPU`,-1),i(`p`,{class:`dl-secondary`},`Built only for tensor maths. Free ones on Colab, and in edge devices.`,-1),i(`div`,{class:`dl-hw__vendors`},`Google · Coral · Hailo · Graphcore`,-1)]])),[[b]])]),s((e(),a(`div`,v,[...y[3]||=[r(` You do `,-1),i(`strong`,null,`not`,-1),r(` need to own a GPU for this course. Colab and Kaggle both give you one for free. `,-1)]])),[[b]])]),_:1},16)}}};export{y as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-BjXl9HiE.js b/lecture-01/assets/md-BjXl9HiE.js new file mode 100644 index 0000000000000000000000000000000000000000..c61fab7f64c38ed64134626c3062abfe618d9144 --- /dev/null +++ b/lecture-01/assets/md-BjXl9HiE.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,et as o,tt as s,v as c,xt as l,yt as u}from"./modules/shiki-CJZsCeMT.js";import{n as d,t as f}from"./slidev/context-C6dxaFaS.js";import{t as p}from"./default-cZapvzLK.js";import{t as m}from"./slidev/VClicks-XVjwUv_k.js";var h=`/lecture-01/assets/book-raschka-mNdDqW1A.jpeg`,g={class:`grid grid-cols-[1fr_auto] gap-8 items-start`},_={src:h,alt:`Cover of Machine Learning with PyTorch and Scikit-Learn`,class:`h-52 rounded shadow-lg`},v={__name:`slides.md__slidev_9`,setup(h){let{$slidev:v,$nav:y,$clicksContext:b,$clicks:x,$page:S,$renderContext:C,$frontmatter:w}=d();return b.setup(),(d,h)=>{let v=m,y=r(`click`);return e(),c(p,l(n(u(f)(u(w),8))),{default:o(()=>[h[1]||=a(`h1`,null,`References`,-1),a(`div`,g,[a(`div`,null,[t(v,null,{default:o(()=>[...h[0]||=[a(`ul`,null,[a(`li`,null,[i(`Raschka, Liu & Mirjalili — `),a(`em`,null,[a(`strong`,null,`Machine Learning with PyTorch and Scikit-Learn`)]),a(`br`),a(`span`,{class:`dl-secondary`},`The main reference. We use it from Chapter 11 onwards.`)]),a(`li`,null,[i(`Ashish Ranjan Jha — `),a(`em`,null,[a(`strong`,null,`Mastering PyTorch`)])]),a(`li`,null,[a(`a`,{href:`https://pytorch.org/`,target:`_blank`},`pytorch.org`),i(` — the framework, and its documentation`)])],-1)]]),_:1})]),s(a(`img`,_,null,512),[[y]])])]),_:1},16)}}};export{v as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-Bvp7L6DM2.js b/lecture-01/assets/md-Bvp7L6DM2.js new file mode 100644 index 0000000000000000000000000000000000000000..cdba33dc749ee564156deac2a380317e1008a448 --- /dev/null +++ b/lecture-01/assets/md-Bvp7L6DM2.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-C6dxaFaS.js";import{t as u}from"./default-cZapvzLK.js";import{t as d}from"./slidev/VClicks-XVjwUv_k.js";var f={class:`grid grid-cols-2 gap-x-10 mt-4`},p={__name:`slides.md__slidev_6`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c();return g.setup(),(c,p)=>{let m=d;return e(),a(u,o(n(s(l)(s(b),5))),{default:i(()=>[p[2]||=r(`h1`,null,`Outline`,-1),r(`div`,f,[r(`div`,null,[t(m,null,{default:i(()=>[...p[0]||=[r(`ul`,null,[r(`li`,null,`Introduction to course content`),r(`li`,null,`Course evaluation method, and exams`),r(`li`,null,`What is deep learning?`),r(`li`,null,`Application of deep learning`)],-1)]]),_:1})]),r(`div`,null,[t(m,null,{default:i(()=>[...p[1]||=[r(`ul`,null,[r(`li`,null,`Deep learning frameworks`),r(`li`,null,`Installing a deep learning framework`),r(`li`,null,`Google Colab and Kaggle`),r(`li`,null,`Jupyter notebooks`)],-1)]]),_:1})])])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-Bz-5PEV42.js b/lecture-01/assets/md-Bz-5PEV42.js new file mode 100644 index 0000000000000000000000000000000000000000..51b77adfe167a5ef0ecb0019023f9cd9dfdd9592 --- /dev/null +++ b/lecture-01/assets/md-Bz-5PEV42.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-C6dxaFaS.js";import{t as m}from"./default-cZapvzLK.js";import{t as h}from"./LinkCard-DOp_LlnV.js";var g={class:`grid grid-cols-3 gap-3 mt-4`},_={class:`mt-6 dl-secondary`},v={__name:`slides.md__slidev_28`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=h,b=r(`click`);return e(),l(m,u(n(d(p)(d(T),27))),{default:s(()=>[v[1]||=a(`h1`,null,`Frameworks`,-1),a(`div`,g,[c(t(y,{href:`https://pytorch.org/`,title:`PyTorch`,blurb:`What we use all semester.`,icon:`🔥`},null,512),[[b]]),c(t(y,{href:`https://www.tensorflow.org/`,title:`TensorFlow`,blurb:`Google's framework, with Keras on top.`,icon:`🧱`},null,512),[[b]]),c(t(y,{href:`https://www.dgl.ai/`,title:`DGL`,blurb:`Graph neural networks — week 10.`,icon:`🕸`},null,512),[[b]]),c(t(y,{href:`https://www.paddlepaddle.org.cn/en`,title:`PaddlePaddle`,blurb:`Baidu's framework.`,icon:`🌊`},null,512),[[b]]),c(t(y,{href:`https://mxnet.apache.org/`,title:`MXNet`,blurb:`Apache, now retired but still in papers.`,icon:`📦`},null,512),[[b]]),c(t(y,{href:`https://www.mathworks.com/products/deep-learning.html`,title:`MATLAB`,blurb:`Common in engineering departments.`,icon:`📐`},null,512),[[b]])]),c((e(),o(`div`,_,[...v[0]||=[i(` They all express the same maths. We pick one so the exercises are comparable. `,-1)]])),[[b]])]),_:1},16)}}};export{v as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-C8WrJmkC.js b/lecture-01/assets/md-C8WrJmkC.js new file mode 100644 index 0000000000000000000000000000000000000000..77fa76ed91a05cfc2490af3958e93b727572ea1e --- /dev/null +++ b/lecture-01/assets/md-C8WrJmkC.js @@ -0,0 +1 @@ +import{B as e,D as t,_ as n,et as r,v as i,xt as a,yt as o}from"./modules/shiki-CJZsCeMT.js";import{n as s,t as c}from"./slidev/context-C6dxaFaS.js";import{t as l}from"./figure--eqXHWiv.js";var u={__name:`slides.md__slidev_24`,setup(u){let{$slidev:d,$nav:f,$clicksContext:p,$clicks:m,$page:h,$renderContext:g,$frontmatter:_}=s();return p.setup(),(s,u)=>(e(),i(l,a(t(o(c)(o(_),23))),{caption:r(e=>[...u[0]||=[n(`p`,null,`The same idea applied to physiological signals: synthetic twelve-lead ECGs that keep the clinical structure of the real thing.`,-1)]]),default:r(()=>[u[1]||=n(`img`,{src:`/lecture-01/assets/synthetic-ecg-BNIVEI6m.jpeg`,alt:`Generated twelve-lead electrocardiogram signals`},null,-1)]),_:1},16))}};export{u as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-CAs7vte4.css b/lecture-01/assets/md-CAs7vte4.css new file mode 100644 index 0000000000000000000000000000000000000000..245d0a7d577b86218b727ee589add15e153acae3 --- /dev/null +++ b/lecture-01/assets/md-CAs7vte4.css @@ -0,0 +1 @@ +.dl-plot[data-v-515e2759]{width:100%;height:100%;font-family:inherit;overflow:visible}.dl-plot__grid line[data-v-515e2759]{stroke:var(--dl-border);stroke-width:1px}.dl-plot__axes line[data-v-515e2759]{stroke:var(--dl-muted);stroke-width:1.5px}.dl-plot__ticks line[data-v-515e2759]{stroke:var(--dl-muted);stroke-width:1px}.dl-plot__ticks text[data-v-515e2759]{fill:var(--dl-muted);font-variant-numeric:tabular-nums;font-size:11px}.dl-plot__label[data-v-515e2759]{fill:var(--dl-body);font-size:12px}.dl-points .is-highlight[data-v-c681d555]{stroke:var(--dl-heading);stroke-width:2.5px;paint-order:stroke}.dl-points text[data-v-c681d555]{fill:var(--dl-body);font-size:11px}.dl-mltypes[data-v-0bb0ed43]{flex-direction:column;gap:.7rem;width:100%;height:100%;min-height:0;display:flex}.dl-mltypes__tabs[data-v-0bb0ed43]{gap:.4rem;display:flex}.dl-mltypes__tabs button[data-v-0bb0ed43]{border:1px solid var(--dl-border);font:inherit;color:var(--dl-body);cursor:pointer;background:0 0;border-radius:6px;padding:.3rem .9rem;font-size:.88rem}.dl-mltypes__tabs button.is-active[data-v-0bb0ed43]{background:var(--dl-accent);border-color:var(--dl-accent);color:#fff;font-weight:600}.dl-mltypes__stage[data-v-0bb0ed43]{flex:auto;justify-content:center;align-items:center;min-height:0;display:flex}.dl-mltypes__svg[data-v-0bb0ed43]{width:100%;height:100%;max-height:100%}.box rect[data-v-0bb0ed43]{fill:var(--dl-surface);stroke:var(--dl-border);stroke-width:1.2px}.box.is-strong rect[data-v-0bb0ed43]{fill:var(--dl-accent-soft);stroke:var(--dl-accent)}.box text[data-v-0bb0ed43]{fill:var(--dl-heading);text-anchor:middle;font-size:13px}.arrows line[data-v-0bb0ed43],.arrows path[data-v-0bb0ed43]{stroke:var(--dl-muted);stroke-width:1.6px;fill:none}.edgelabel text[data-v-0bb0ed43]{fill:var(--dl-body);font-size:13px;font-weight:600}.dl-mltypes__blurb[data-v-0bb0ed43]{color:var(--dl-body);max-width:70ch;margin:0;font-size:1.05rem} diff --git a/lecture-01/assets/md-CHMR2MgZ2.js b/lecture-01/assets/md-CHMR2MgZ2.js new file mode 100644 index 0000000000000000000000000000000000000000..86e7b40d7f5a998006d21ed97f394bb3f75a5099 --- /dev/null +++ b/lecture-01/assets/md-CHMR2MgZ2.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-C6dxaFaS.js";import{t as m}from"./default-cZapvzLK.js";import{t as h}from"./slidev/VClicks-XVjwUv_k.js";var g={class:`mt-8 dl-secondary`},_={__name:`slides.md__slidev_5`,setup(_){let{$slidev:v,$nav:y,$clicksContext:b,$clicks:x,$page:S,$renderContext:C,$frontmatter:w}=f();return b.setup(),(f,_)=>{let v=h,y=r(`click`);return e(),l(m,u(n(d(p)(d(w),4))),{default:s(()=>[_[2]||=a(`h1`,null,`Class representatives`,-1),t(v,null,{default:s(()=>[..._[0]||=[a(`ul`,null,[a(`li`,null,`One or two?`),a(`li`,null,`One female and one male?`),a(`li`,null,`Names?`),a(`li`,null,`Email addresses?`)],-1)]]),_:1}),c((e(),o(`div`,g,[..._[1]||=[i(` Representatives are the channel for anything that affects the whole group — deadlines, pace, room changes. `,-1)]])),[[y]])]),_:1},16)}}};export{_ as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-CSfW34LT.js b/lecture-01/assets/md-CSfW34LT.js new file mode 100644 index 0000000000000000000000000000000000000000..218e2f7b0248a7c50937c0463792c0b3d68be06f --- /dev/null +++ b/lecture-01/assets/md-CSfW34LT.js @@ -0,0 +1 @@ +import{B as e,D as t,_ as n,et as r,v as i,xt as a,yt as o}from"./modules/shiki-CJZsCeMT.js";import{n as s,t as c}from"./slidev/context-C6dxaFaS.js";import{t as l}from"./section-B0St524Y.js";var u={__name:`slides.md__slidev_19`,setup(u){let{$slidev:d,$nav:f,$clicksContext:p,$clicks:m,$page:h,$renderContext:g,$frontmatter:_}=s();return p.setup(),(s,u)=>(e(),i(l,a(t(o(c)(o(_),18))),{default:r(()=>[...u[0]||=[n(`h1`,null,`Application of deep learning`,-1)]]),_:1},16))}};export{u as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-ClhQEZCo.js b/lecture-01/assets/md-ClhQEZCo.js new file mode 100644 index 0000000000000000000000000000000000000000..80d0c595b33016be7ec668506913b0089328717c --- /dev/null +++ b/lecture-01/assets/md-ClhQEZCo.js @@ -0,0 +1,10 @@ +import{A as e,B as t,C as n,Ct as r,D as i,H as a,S as o,St as s,T as c,U as l,V as u,_ as d,b as f,bt as p,dt as m,et as h,g,gt as _,m as v,q as y,v as b,x,xt as S,y as C,yt as w}from"./modules/shiki-CJZsCeMT.js";import{t as T}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as E,t as D}from"./slidev/context-C6dxaFaS.js";import{t as O}from"./Citation-BrOphNXC.js";import{t as k}from"./interactive-CJ_TWtJM.js";var A=Symbol(`dl-plot`);function j(){let t=e(A,null);if(!t)throw Error(`This component must be used inside a `);return t}function M(e,t,n=6){if(!Number.isFinite(e)||!Number.isFinite(t)||e===t)return[e];let r=(t-e)/Math.max(n,1),i=10**Math.floor(Math.log10(r)),a=r/i,o=(a>=5?10:a>=2?5:a>=1?2:1)*i,s=[],c=Math.ceil(e/o)*o;for(let e=c;e<=t+o*1e-9;e+=o)s.push(Math.abs(e)=1e5||t<1e-4?e.toExponential(0):String(Number(e.toFixed(6)))}var P=[`viewBox`],F={key:0,class:`dl-plot__grid`},I=[`x1`,`x2`,`y1`,`y2`],ee=[`x1`,`x2`,`y1`,`y2`],te={class:`dl-plot__axes`},ne=[`x1`,`x2`,`y1`,`y2`],re=[`x1`,`x2`,`y1`,`y2`],L={class:`dl-plot__ticks`},R=[`x1`,`x2`,`y1`,`y2`],z=[`x`,`y`],B=[`x1`,`x2`,`y1`,`y2`],V=[`x`,`y`],H=[`x`,`y`,`width`,`height`],U=[`clip-path`],W=[`x`,`y`],G=[`x`],K=T(c({__name:`Plot2D`,props:{xDomain:{default:()=>[0,1]},yDomain:{default:()=>[0,1]},width:{default:520},height:{default:320},xLabel:{},yLabel:{},xTicks:{default:6},yTicks:{default:5},grid:{type:Boolean,default:!0},originAxes:{type:Boolean,default:!1},padding:{}},setup(e,{expose:n}){let{$slidev:i,$nav:o,$clicksContext:s,$clicks:c,$page:p,$renderContext:h,$frontmatter:b}=E(),x=e,S=g(()=>({top:x.padding?.top??14,right:x.padding?.right??16,bottom:x.padding?.bottom??(x.xLabel?42:28),left:x.padding?.left??(x.yLabel?52:40)})),T=g(()=>({x:S.value.left,y:S.value.top,width:Math.max(x.width-S.value.left-S.value.right,1),height:Math.max(x.height-S.value.top-S.value.bottom,1)})),D=e=>{let[t,n]=x.xDomain;return T.value.x+(e-t)/(n-t||1)*T.value.width},O=e=>{let[t,n]=x.yDomain;return T.value.y+(1-(e-t)/(n-t||1))*T.value.height},k=e=>{let[t,n]=x.xDomain;return t+(e-T.value.x)/T.value.width*(n-t)},j=e=>{let[t,n]=x.yDomain;return t+(1-(e-T.value.y)/T.value.height)*(n-t)};u(A,{sx:D,sy:O,ix:k,iy:j,xDomain:_(x,`xDomain`),yDomain:_(x,`yDomain`),inner:T});let K=g(()=>Array.isArray(x.xTicks)?x.xTicks:M(x.xDomain[0],x.xDomain[1],x.xTicks)),q=g(()=>Array.isArray(x.yTicks)?x.yTicks:M(x.yDomain[0],x.yDomain[1],x.yTicks)),J=g(()=>x.originAxes?O(Math.min(Math.max(0,x.yDomain[0]),x.yDomain[1])):T.value.y+T.value.height),Y=g(()=>x.originAxes?D(Math.min(Math.max(0,x.xDomain[0]),x.xDomain[1])):T.value.x),X=m(null),Z=`dl-plot-clip-${y()}`;function Q(e){let t=X.value;if(!t)return null;let n=t.getBoundingClientRect(),r=(e.clientX-n.left)/n.width*x.width,i=(e.clientY-n.top)/n.height*x.height;return{x:k(r),y:j(i)}}return n({dataAt:Q,sx:D,sy:O,ix:k,iy:j}),(e,n)=>(t(),f(`svg`,{ref_key:`svg`,ref:X,class:`dl-plot`,viewBox:`0 0 ${x.width} ${x.height}`,preserveAspectRatio:`xMidYMid meet`,role:`img`},[x.grid?(t(),f(`g`,F,[(t(!0),f(v,null,a(K.value,e=>(t(),f(`line`,{key:`gx${e}`,x1:D(e),x2:D(e),y1:T.value.y,y2:T.value.y+T.value.height},null,8,I))),128)),(t(!0),f(v,null,a(q.value,e=>(t(),f(`line`,{key:`gy${e}`,x1:T.value.x,x2:T.value.x+T.value.width,y1:O(e),y2:O(e)},null,8,ee))),128))])):C(`v-if`,!0),d(`g`,te,[d(`line`,{x1:T.value.x,x2:T.value.x+T.value.width,y1:J.value,y2:J.value},null,8,ne),d(`line`,{x1:Y.value,x2:Y.value,y1:T.value.y,y2:T.value.y+T.value.height},null,8,re)]),C(` + Tick *marks* sit on the axis, which may run through the origin; tick + *labels* always sit on the frame edge. Letting labels follow a + through-origin axis buries them in the middle of the data and collides the + two zeros on top of each other. + `),d(`g`,L,[(t(!0),f(v,null,a(K.value,e=>(t(),f(v,{key:`tx${e}`},[d(`line`,{x1:D(e),x2:D(e),y1:J.value,y2:J.value+5},null,8,R),d(`text`,{x:D(e),y:T.value.y+T.value.height+17,"text-anchor":`middle`},r(w(N)(e)),9,z)],64))),128)),(t(!0),f(v,null,a(q.value,e=>(t(),f(v,{key:`ty${e}`},[d(`line`,{x1:Y.value-5,x2:Y.value,y1:O(e),y2:O(e)},null,8,B),d(`text`,{x:T.value.x-9,y:O(e)+4,"text-anchor":`end`},r(w(N)(e)),9,V)],64))),128))]),C(` + Marks are clipped to the plot area. A decision boundary or a diverging + trajectory legitimately runs off the domain, and without this it paints + straight across the rest of the slide. + `),d(`defs`,null,[d(`clipPath`,{id:Z},[d(`rect`,{x:T.value.x,y:T.value.y,width:T.value.width,height:T.value.height},null,8,H)])]),d(`g`,{"clip-path":`url(#${Z})`},[l(e.$slots,`default`,{},void 0,!0)],8,U),C(` Annotations that are allowed to sit outside the axes. `),l(e.$slots,`overlay`,{},void 0,!0),x.xLabel?(t(),f(`text`,{key:1,class:`dl-plot__label`,x:T.value.x+T.value.width/2,y:x.height-6,"text-anchor":`middle`},r(x.xLabel),9,W)):C(`v-if`,!0),x.yLabel?(t(),f(`text`,{key:2,class:`dl-plot__label`,x:-(T.value.y+T.value.height/2),y:13,"text-anchor":`middle`,transform:`rotate(-90)`},r(x.yLabel),9,G)):C(`v-if`,!0)],8,P))}}),[[`__scopeId`,`data-v-515e2759`]]),q={class:`dl-points`},J=[`cx`,`cy`,`r`,`fill`],Y=[`d`,`fill`],X=[`x`,`y`],Z=T(c({__name:`PlotPoints`,props:{points:{},radius:{default:5},color:{},colors:{},shapes:{},opacity:{default:1}},setup(e){let{$slidev:n,$nav:i,$clicksContext:o,$clicks:c,$page:l,$renderContext:u,$frontmatter:m}=E(),h=e,_=j(),y=g(()=>h.points.map((e,t)=>{let n=String(e.cls??``);return{i:t,cx:_.sx(e.x),cy:_.sy(e.y),shape:h.shapes?.[n]??`circle`,fill:h.colors?.[n]??h.color??`var(--dl-accent)`,highlight:!!e.highlight,label:e.label}}));function b(e,t,n){let r=n*.9;return`M${e-r},${t-r} h${r*2} v${r*2} h${-r*2} Z`}function x(e,t,n){let r=n*1.2;return`M${e},${t-r} L${e+r},${t+r*.8} L${e-r},${t+r*.8} Z`}return(e,n)=>(t(),f(v,null,[C('\n Opacity goes through `style`, never the SVG `opacity` attribute. UnoCSS\n attributify scans source text, so a literal `opacity="0.85"` anywhere in the\n project emits `[opacity~="0.85"]{opacity:0.0085}` — and that CSS rule beats\n the presentation attribute, silently rendering marks all but invisible.\n '),d(`g`,q,[(t(!0),f(v,null,a(y.value,e=>(t(),f(`g`,{key:e.i,style:s({opacity:h.opacity})},[e.shape===`circle`?(t(),f(`circle`,{key:0,cx:e.cx,cy:e.cy,r:h.radius,fill:e.fill,class:p({"is-highlight":e.highlight})},null,10,J)):(t(),f(`path`,{key:1,d:e.shape===`square`?b(e.cx,e.cy,h.radius):x(e.cx,e.cy,h.radius),fill:e.fill,class:p({"is-highlight":e.highlight})},null,10,Y)),e.label?(t(),f(`text`,{key:2,x:e.cx+h.radius+4,y:e.cy+4},r(e.label),9,X)):C(`v-if`,!0)],4))),128))])],2112))}}),[[`__scopeId`,`data-v-c681d555`]]);function Q(e){let t=e>>>0||1;return()=>(t=Math.imul(t,1664525)+1013904223>>>0,t/2**32)}function ie(e){let t=Q(e),n=null;return()=>{if(n!==null){let e=n;return n=null,e}let e=0,r=0,i=0;do e=t()*2-1,r=t()*2-1,i=e*e+r*r;while(i===0||i>=1);let a=Math.sqrt(-2*Math.log(i)/i);return n=r*a,e*a}}var ae={class:`dl-mltypes`},oe={class:`dl-mltypes__tabs`,role:`tablist`},se=[`aria-selected`,`onClick`],ce={class:`dl-mltypes__stage`},le={key:0,viewBox:`0 0 460 200`,class:`dl-mltypes__svg`},$={class:`dl-mltypes__blurb`},ue=T(c({__name:`MLTypes`,setup(e){let{$slidev:i,$nav:o,$clicksContext:s,$clicks:c,$page:l,$renderContext:u,$frontmatter:_}=E(),y=[{key:`supervised`,name:`Supervised`,blurb:`Labelled examples in, a predictive model out. The label is the teaching signal.`},{key:`unsupervised`,name:`Unsupervised`,blurb:`No labels at all — structure has to come from the data itself, e.g. clustering.`},{key:`reinforcement`,name:`Reinforcement`,blurb:`An agent acts on an environment and learns from the reward that comes back.`}],b=m(`supervised`),S=g(()=>y.find(e=>e.key===b.value)),w=g(()=>{let e=ie(4242);return[[2.2,6.4],[2.6,2.4],[6.6,3.6]].flatMap(([t,n],r)=>Array.from({length:16},()=>({x:t+e()*.62,y:n+e()*.62,cls:String(r)})))}),T={0:`var(--dl-accent)`,1:`var(--dl-heading)`,2:`var(--dl-muted)`};return(e,i)=>{let o=Z,s=K;return t(),f(`div`,ae,[d(`div`,oe,[(t(),f(v,null,a(y,e=>d(`button`,{key:e.key,type:`button`,role:`tab`,"aria-selected":e.key===b.value,class:p({"is-active":e.key===b.value}),onClick:t=>b.value=e.key},r(e.name),11,se)),64))]),d(`div`,ce,[C(` Supervised: labelled data trains an algorithm that then predicts. `),b.value===`supervised`?(t(),f(`svg`,le,[...i[0]||=[x(`Training dataLabelsML algorithmPredictive modelNew dataPredicted labels`,8)]])):b.value===`unsupervised`?(t(),f(v,{key:1},[C(` Unsupervised: the same points, no labels, structure found anyway. `),n(s,{"x-domain":[0,9],"y-domain":[0,9],width:360,height:210,"x-label":`x₁`,"y-label":`x₂`,"x-ticks":4,"y-ticks":4},{default:h(()=>[n(o,{points:w.value,colors:T,radius:4.5,opacity:.9},null,8,[`points`])]),_:1})],2112)):(t(),f(v,{key:2},[C(` Reinforcement: the agent/environment loop. `),i[1]||=x(`EnvironmentAgentRewardStateAction`,1)],2112))]),d(`p`,$,r(S.value.blurb),1)])}}}),[[`__scopeId`,`data-v-0bb0ed43`]]),de={__name:`slides.md__slidev_18`,setup(e){let{$slidev:r,$nav:a,$clicksContext:s,$clicks:c,$page:l,$renderContext:u,$frontmatter:f}=E();return s.setup(),(e,r)=>{let a=ue,s=O;return t(),b(k,S(i(w(D)(w(f),17))),{aside:h(e=>[r[0]||=d(`p`,null,[o(`This course is mostly `),d(`strong`,null,`supervised`),o(`, with generative models in weeks 8–9 and reinforcement learning in weeks 11–12.`)],-1),n(s,{source:`After Raschka, Liu & Mirjalili, ch. 1`})]),default:h(()=>[n(a)]),_:1},16)}}};export{de as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-CwuBcLyR.css b/lecture-01/assets/md-CwuBcLyR.css new file mode 100644 index 0000000000000000000000000000000000000000..609d0e492d54eac0608dc4e2badbabc9d44187a3 --- /dev/null +++ b/lecture-01/assets/md-CwuBcLyR.css @@ -0,0 +1 @@ +.dl-widget[data-v-0f64089e]{flex-direction:column;gap:.6rem;width:100%;height:100%;min-height:0;display:flex}.dl-widget.is-controls-first[data-v-0f64089e]{flex-direction:column-reverse;justify-content:flex-end}.dl-widget__stage[data-v-0f64089e]{flex:auto;justify-content:center;align-items:center;min-height:0;display:flex}.dl-widget__controls[data-v-0f64089e]{flex-wrap:wrap;flex:none;align-items:center;gap:.5rem 1.2rem;display:flex}.dl-widget__controls[data-v-0f64089e]:empty,.dl-widget__readout[data-v-0f64089e]:empty{display:none}.dl-widget__readout[data-v-0f64089e]{color:var(--dl-muted);font-variant-numeric:tabular-nums;flex:none;font-size:.82rem}.dl-btn[data-v-f82500e8]{font:inherit;cursor:pointer;border:1px solid #0000;border-radius:6px;align-items:center;gap:.35rem;padding:.32rem .75rem;font-size:.82rem;font-weight:600;transition:background .12s,border-color .12s;display:inline-flex}.dl-btn[data-v-f82500e8]:disabled{opacity:.4;cursor:not-allowed}.dl-btn[data-v-f82500e8]:focus-visible{outline:2px solid var(--dl-accent);outline-offset:2px}.is-primary[data-v-f82500e8]{background:var(--dl-accent);color:#fff}.is-primary[data-v-f82500e8]:not(:disabled):hover{background:var(--dl-accent-strong)}.is-ghost[data-v-f82500e8]{border-color:var(--dl-border);color:var(--dl-body);background:0 0}.is-ghost[data-v-f82500e8]:not(:disabled):hover{border-color:var(--dl-accent);color:var(--dl-accent)}.dl-btn__glyph[data-v-f82500e8]{font-family:Apple Color Emoji,Segoe UI Emoji,Noto Color Emoji,sans-serif;font-size:.9em}.dl-spot[data-v-a417f716]{justify-content:center;align-items:center;width:100%;height:100%;min-height:0;display:flex}.dl-spot__frame[data-v-a417f716]{max-width:100%;max-height:100%;display:inline-block;position:relative}.dl-spot__frame[data-v-a417f716] img{object-fit:contain;max-width:100%;max-height:100%;display:block}.dl-spot__region[data-v-a417f716]{cursor:pointer;border:2px solid #0000;border-radius:4px;transition:background .25s,border-color .25s,box-shadow .25s;position:absolute}.dl-spot__region.is-active[data-v-a417f716]{border-color:var(--dl-accent);box-shadow:0 0 0 2px color-mix(in srgb, var(--dl-accent) 35%, transparent)}.dl-spot__region.is-dimmed[data-v-a417f716]{background:color-mix(in srgb, var(--dl-bg) 72%, transparent)}.dl-spot__tag[data-v-a417f716]{color:var(--dl-accent);white-space:nowrap;opacity:0;font-size:.72rem;font-weight:600;transition:opacity .2s;position:absolute;bottom:-1.45rem;left:0}.dl-spot__region.is-active .dl-spot__tag[data-v-a417f716]{opacity:1} diff --git a/lecture-01/assets/md-DAoD5lJx.js b/lecture-01/assets/md-DAoD5lJx.js new file mode 100644 index 0000000000000000000000000000000000000000..1064d4513554a2ff585d2ad79f0dc8703b844f64 --- /dev/null +++ b/lecture-01/assets/md-DAoD5lJx.js @@ -0,0 +1 @@ +import{B as e,D as t,_ as n,et as r,v as i,xt as a,yt as o}from"./modules/shiki-CJZsCeMT.js";import{n as s,t as c}from"./slidev/context-C6dxaFaS.js";import{t as l}from"./section-B0St524Y.js";var u={__name:`slides.md__slidev_2`,setup(u){let{$slidev:d,$nav:f,$clicksContext:p,$clicks:m,$page:h,$renderContext:g,$frontmatter:_}=s();return p.setup(),(s,u)=>(e(),i(l,a(t(o(c)(o(_),1))),{default:r(()=>[...u[0]||=[n(`h1`,null,`Introduction to Deep Learning`,-1)]]),_:1},16))}};export{u as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-DDa8FB96.js b/lecture-01/assets/md-DDa8FB96.js new file mode 100644 index 0000000000000000000000000000000000000000..28bade59630835214bcb4f83b0f2a7d052f47782 --- /dev/null +++ b/lecture-01/assets/md-DDa8FB96.js @@ -0,0 +1 @@ +import{B as e,D as t,G as n,S as r,_ as i,b as a,et as o,tt as s,v as c,xt as l,yt as u}from"./modules/shiki-CJZsCeMT.js";import{n as d,t as f}from"./slidev/context-C6dxaFaS.js";import{t as p}from"./default-cZapvzLK.js";var m={class:`mt-6 text-center`},h={class:`mt-2 text-center dl-secondary`},g={__name:`slides.md__slidev_12`,setup(g){let{$slidev:_,$nav:v,$clicksContext:y,$clicks:b,$page:x,$renderContext:S,$frontmatter:C}=d();return y.setup(),(d,g)=>{let _=n(`click`);return e(),c(p,l(t(u(f)(u(C),11))),{default:o(()=>[g[2]||=i(`h1`,null,`What do you think about these photos?`,-1),g[3]||=i(`img`,{src:`/lecture-01/assets/generated-faces-CY3T5qTs.jpeg`,alt:`Four photorealistic portraits`,class:`w-full rounded mt-4`},null,-1),s((e(),a(`div`,m,[...g[0]||=[i(`span`,{class:`dl-reveal`},`Not one of these people exists.`,-1)]])),[[_]]),s((e(),a(`div`,h,[...g[1]||=[r(` Every face was generated by a network trained on photographs — the same family of models we build in weeks 8 and 9. `,-1)]])),[[_]])]),_:1},16)}}};export{g as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-DGLCzXy3.js b/lecture-01/assets/md-DGLCzXy3.js new file mode 100644 index 0000000000000000000000000000000000000000..eb1b4145f3f6ef7532bc0f679b978a7026f1a0b3 --- /dev/null +++ b/lecture-01/assets/md-DGLCzXy3.js @@ -0,0 +1 @@ +import{B as e,D as t,_ as n,et as r,v as i,xt as a,yt as o}from"./modules/shiki-CJZsCeMT.js";import{n as s,t as c}from"./slidev/context-C6dxaFaS.js";import{t as l}from"./section-B0St524Y.js";var u={__name:`slides.md__slidev_7`,setup(u){let{$slidev:d,$nav:f,$clicksContext:p,$clicks:m,$page:h,$renderContext:g,$frontmatter:_}=s();return p.setup(),(s,u)=>(e(),i(l,a(t(o(c)(o(_),6))),{default:r(()=>[...u[0]||=[n(`h1`,null,`Introduction to course content`,-1)]]),_:1},16))}};export{u as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-DMeVCRE5.css b/lecture-01/assets/md-DMeVCRE5.css new file mode 100644 index 0000000000000000000000000000000000000000..3da5e64e415f125bd52ecd62c6f762ff7f08c74d --- /dev/null +++ b/lecture-01/assets/md-DMeVCRE5.css @@ -0,0 +1 @@ +.dl-venn[data-v-34c96df7]{--dl-ai:#7fd3dd;--dl-ml:#b9aede;--dl-dl:#c2dd52;align-items:center;gap:2rem;width:100%;display:flex}html.dark .dl-venn[data-v-34c96df7]{--dl-ai:#2d7f89;--dl-ml:#5f558b;--dl-dl:#7f9634}.dl-venn__svg[data-v-34c96df7]{flex:0 0 15rem;max-height:100%}.dl-venn__ring[data-v-34c96df7]{stroke:var(--dl-heading);stroke-width:1.2px;cursor:pointer;opacity:.55;transition:opacity .2s}.dl-venn__ring.is-ai[data-v-34c96df7]{fill:var(--dl-ai)}.dl-venn__ring.is-ml[data-v-34c96df7]{fill:var(--dl-ml)}.dl-venn__ring.is-dl[data-v-34c96df7]{fill:var(--dl-dl)}.dl-venn__ring.is-active[data-v-34c96df7]{opacity:1;stroke-width:2.5px}.dl-venn__label[data-v-34c96df7]{fill:var(--dl-heading);text-anchor:middle;pointer-events:none;font-size:15px;font-weight:700}.dl-venn__label.is-inner[data-v-34c96df7]{font-size:17px}.dl-venn__detail[data-v-34c96df7]{flex:auto;min-width:0}.dl-venn__chips[data-v-34c96df7]{flex-wrap:wrap;gap:.4rem;margin-bottom:.8rem;display:flex}.dl-venn__chips button[data-v-34c96df7]{border:1px solid var(--dl-border);font:inherit;color:var(--dl-body);cursor:pointer;background:0 0;border-radius:999px;padding:.28rem .7rem;font-size:.82rem}.dl-venn__chips button.is-selected[data-v-34c96df7]{border-color:var(--dl-accent);background:var(--dl-accent-soft);color:var(--dl-heading);font-weight:600}.dl-venn__detail p[data-v-34c96df7]{max-width:44ch;margin:0;font-size:1.15rem;line-height:1.5} diff --git a/lecture-01/assets/md-DMz-2E6M.js b/lecture-01/assets/md-DMz-2E6M.js new file mode 100644 index 0000000000000000000000000000000000000000..d9dd5530e766a546e8d225e8d68ff94fcd34be71 --- /dev/null +++ b/lecture-01/assets/md-DMz-2E6M.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,_ as i,et as a,tt as o,v as s,xt as c,yt as l}from"./modules/shiki-CJZsCeMT.js";import{n as u,t as d}from"./slidev/context-C6dxaFaS.js";import{t as f}from"./default-cZapvzLK.js";import{t as p}from"./Citation-BrOphNXC.js";var m=`/lecture-01/assets/dalle-brain-rocket-CNkl6z2t.jpeg`,h=`/lecture-01/assets/dalle-dragonfruit-CGiA0H30.jpeg`,g={class:`grid grid-cols-2 gap-8 mt-2`},_={src:m,alt:`Generated image of a brain riding a rocket`,class:`mt-3 rounded max-h-60 w-auto mx-auto`},v={src:h,alt:`Generated image of a dragon fruit wearing a karate belt`,class:`mt-3 rounded max-h-60 w-auto mx-auto`},y={class:`absolute bottom-12 left-12`},b={__name:`slides.md__slidev_13`,setup(m){let{$slidev:h,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=u();return x.setup(),(u,m)=>{let h=p,b=r(`click`);return e(),s(f,c(n(l(d)(l(T),12))),{default:a(()=>[m[2]||=i(`h1`,null,`From a sentence to an image`,-1),i(`div`,g,[i(`div`,null,[m[0]||=i(`div`,{class:`dl-prompt min-h-14`},`"A brain riding a rocket ship heading towards the moon."`,-1),o(i(`img`,_,null,512),[[b]])]),i(`div`,null,[m[1]||=i(`div`,{class:`dl-prompt min-h-14`},`"A dragon fruit wearing a karate belt in the snow."`,-1),o(i(`img`,v,null,512),[[b]])])]),i(`div`,y,[t(h,{source:`Prompts and images: Google Imagen`,url:`https://imagen.research.google/`})])]),_:1},16)}}};export{b as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-DUx--DCW.js b/lecture-01/assets/md-DUx--DCW.js new file mode 100644 index 0000000000000000000000000000000000000000..e8891867b61ada0fc987598fb93530f99e5f479f --- /dev/null +++ b/lecture-01/assets/md-DUx--DCW.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,H as i,S as a,St as o,T as s,U as c,_ as l,b as u,bt as d,dt as f,et as p,g as m,m as h,v as g,xt as _,y as v,yt as y}from"./modules/shiki-CJZsCeMT.js";import{t as b}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as x,t as S}from"./slidev/context-C6dxaFaS.js";import{t as C}from"./Citation-BrOphNXC.js";import{t as w}from"./interactive-CJ_TWtJM.js";var T={class:`dl-widget__stage`},E={class:`dl-widget__controls`},D={class:`dl-widget__readout`},O=b(s({__name:`WidgetFrame`,props:{maxWidth:{default:`100%`},controlsFirst:{type:Boolean}},setup(t){let{$slidev:n,$nav:r,$clicksContext:i,$clicks:a,$page:s,$renderContext:f,$frontmatter:p}=x(),m=t;return(t,n)=>(e(),u(`div`,{class:d([`dl-widget`,{"is-controls-first":m.controlsFirst}]),style:o({maxWidth:m.maxWidth})},[l(`div`,T,[c(t.$slots,`default`,{},void 0,!0)]),l(`div`,E,[c(t.$slots,`controls`,{},void 0,!0)]),l(`div`,D,[c(t.$slots,`readout`,{},void 0,!0)])],6))}}),[[`__scopeId`,`data-v-0f64089e`]]),k=[`disabled`],A={key:0,class:`dl-btn__glyph`,"aria-hidden":`true`},j=b(s({__name:`StepButton`,props:{label:{},variant:{default:`primary`},disabled:{type:Boolean,default:!1},glyph:{}},emits:[`click`],setup(t,{emit:r}){let{$slidev:i,$nav:o,$clicksContext:s,$clicks:c,$page:l,$renderContext:f,$frontmatter:p}=x(),m=t,h=r;return(t,r)=>(e(),u(`button`,{type:`button`,class:d([`dl-btn`,`is-${m.variant}`]),disabled:m.disabled,onClick:r[0]||=e=>h(`click`)},[m.glyph?(e(),u(`span`,A,n(m.glyph),1)):v(`v-if`,!0),a(` `+n(m.label),1)],10,k))}}),[[`__scopeId`,`data-v-f82500e8`]]),M={class:`dl-spot`},N={class:`dl-spot__frame`},P=[`onClick`],F={class:`dl-spot__tag`},I={key:0},L={key:1},R=b(s({__name:`FigureSpotlight`,props:{regions:{},startWide:{type:Boolean,default:!0}},setup(r){let{$slidev:s,$nav:_,$clicksContext:y,$clicks:b,$page:S,$renderContext:C,$frontmatter:w}=x(),T=r,E=f(T.startWide?-1:0),D=m(()=>E.value>=0?T.regions[E.value]:null);function k(e){let t=E.value+e;E.value=t<-1?T.regions.length-1:t>=T.regions.length?-1:t}return(r,s)=>{let f=j,m=O;return e(),g(m,null,{controls:p(()=>[t(f,{label:`Previous`,variant:`ghost`,glyph:`◀`,onClick:s[0]||=e=>k(-1)}),t(f,{label:`Next`,glyph:`▶`,onClick:s[1]||=e=>k(1)}),E.value>=0?(e(),g(f,{key:0,label:`Show all`,variant:`ghost`,onClick:s[2]||=e=>E.value=-1})):v(`v-if`,!0)]),readout:p(()=>[D.value?(e(),u(`span`,I,[l(`strong`,null,n(D.value.label),1),D.value.note?(e(),u(h,{key:0},[a(` — `+n(D.value.note),1)],64)):v(`v-if`,!0)])):(e(),u(`span`,L,n(T.regions.length)+` categories. Step through them, or click one directly.`,1))]),default:p(()=>[l(`div`,M,[l(`div`,N,[c(r.$slots,`default`,{},void 0,!0),(e(!0),u(h,null,i(T.regions,(t,r)=>(e(),u(`div`,{key:r,class:d([`dl-spot__region`,{"is-active":r===E.value,"is-dimmed":E.value>=0&&r!==E.value}]),style:o({left:`${t.x}%`,top:`${t.y}%`,width:`${t.w}%`,height:`${t.h}%`}),onClick:e=>E.value=r},[l(`span`,F,n(t.label),1)],14,P))),128))])])]),_:3})}}}),[[`__scopeId`,`data-v-a417f716`]]),z={__name:`slides.md__slidev_21`,setup(n){let{$slidev:i,$nav:a,$clicksContext:o,$clicks:s,$page:c,$renderContext:u,$frontmatter:d}=x();return o.setup(),(n,i)=>{let a=R,o=C;return e(),g(w,_(r(y(S)(y(d),20))),{aside:p(e=>[i[1]||=l(`p`,null,`Telling these four apart is the week 4–5 objective.`,-1),t(o,{source:`Figure: CS231n (CC0)`})]),default:p(()=>[t(a,{regions:[{x:0,y:0,w:19,h:100,label:`Classification`,note:`One label for the whole image. Single object.`},{x:19.5,y:0,w:19,h:100,label:`Semantic segmentation`,note:`A class for every pixel. No object instances at all.`},{x:39.5,y:0,w:19.5,h:100,label:`Classification + localisation`,note:`One label plus one box. Still a single object.`},{x:59.5,y:0,w:19.5,h:100,label:`Object detection`,note:`A label and a box per object. Multiple objects.`},{x:80,y:0,w:20,h:100,label:`Instance segmentation`,note:`Per-pixel classes, separated per object.`}]},{default:p(()=>[...i[0]||=[l(`img`,{src:`/lecture-01/assets/cv-task-categories-DXkfK0Uy.jpeg`,alt:`Five computer vision tasks compared: classification, semantic segmentation, classification with localisation, object detection, instance segmentation`},null,-1)]]),_:1})]),_:1},16)}}};export{z as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-DZVackxx.js b/lecture-01/assets/md-DZVackxx.js new file mode 100644 index 0000000000000000000000000000000000000000..453e7c59dff70dd0cd71cfe00f7d5a639a3299cb --- /dev/null +++ b/lecture-01/assets/md-DZVackxx.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,H as i,St as a,T as o,_ as s,b as c,bt as l,dt as u,et as d,g as f,m as p,v as m,xt as h,y as g,yt as _}from"./modules/shiki-CJZsCeMT.js";import{t as v}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as y,t as b}from"./slidev/context-C6dxaFaS.js";import{t as x}from"./default-cZapvzLK.js";var S={class:`dl-syllabus`},C=[`title`,`onClick`],w={class:`dl-syllabus__num`},T={class:`dl-syllabus__detail`},E={class:`dl-syllabus__heading`},D={class:`dl-syllabus__weeklabel`},O=v(o({__name:`SyllabusTimeline`,props:{entries:{default:()=>[{section:`Introduction to DL`,description:`Course content, evaluation and exams. What is deep learning, where it is applied, the frameworks, and getting a environment running in Colab or Jupyter.`,weeks:[1]},{section:`Basics of Neural Networks`,description:`Artificial neurons and neural networks; implementing and training a multilayer network from scratch.`,weeks:[2]},{section:`PyTorch for DL`,description:`What PyTorch is and why. Tensors for data representation, the PyTorch training pipeline, and an ANN built with it.`,weeks:[3]},{section:`Deep Convolutional Neural Networks`,description:`What a CNN is and where it applies. Telling classification, detection and segmentation apart. Implementing CNN models in PyTorch.`,weeks:[4,5]},{section:`Recurrent Neural Networks and Transformers`,description:`What an RNN is and where it applies; the mechanism, and an implementation in PyTorch. What a transformer is, and the original architecture.`,weeks:[6,7]},{section:`Generative Adversarial Networks`,description:`Generative models and autoencoders. Implementing a GAN in Colab, improving synthetic data quality, and the main GAN variants and applications.`,weeks:[8,9]},{section:`Graph Neural Networks / LLMs`,description:`Introduction to graph data, graph neural networks and large language models.`,weeks:[10]},{section:`Deep Reinforcement Learning`,description:`What reinforcement learning is and why. RL algorithm basics, implementations, and deep Q-learning in PyTorch.`,weeks:[11,12]}]},totalWeeks:{default:12},currentWeek:{default:null}},setup(t){let{$slidev:r,$nav:o,$clicksContext:d,$clicks:m,$page:h,$renderContext:_,$frontmatter:v}=y(),b=t,x=u(0),O=f(()=>b.entries[x.value]);function k(e){return e.weeks.length===1?`Week ${e.weeks[0]}`:`Weeks ${e.weeks[0]}–${e.weeks[e.weeks.length-1]}`}return(t,r)=>(e(),c(`div`,S,[s(`div`,{class:`dl-syllabus__track`,style:a({gridTemplateColumns:`repeat(${b.totalWeeks}, 1fr)`})},[(e(!0),c(p,null,i(b.entries,(t,r)=>(e(),c(`button`,{key:t.section,type:`button`,class:l([`dl-syllabus__block`,{"is-selected":r===x.value}]),style:a({gridColumn:`${t.weeks[0]} / span ${t.weeks.length}`}),title:t.section,onClick:e=>x.value=r},[s(`span`,w,n(r+1),1)],14,C))),128)),b.currentWeek?(e(),c(`div`,{key:0,class:`dl-syllabus__now`,style:a({gridColumn:`${b.currentWeek} / span 1`})},null,4)):g(`v-if`,!0)],4),s(`div`,{class:`dl-syllabus__weeks`,style:a({gridTemplateColumns:`repeat(${b.totalWeeks}, 1fr)`})},[(e(!0),c(p,null,i(b.totalWeeks,t=>(e(),c(`span`,{key:t},n(t),1))),128))],4),s(`div`,T,[s(`div`,E,[s(`span`,D,n(k(O.value)),1),s(`h3`,null,n(O.value.section),1)]),s(`p`,null,n(O.value.description),1)])]))}}),[[`__scopeId`,`data-v-9a40f535`]]),k={__name:`slides.md__slidev_10`,setup(n){let{$slidev:i,$nav:a,$clicksContext:o,$clicks:c,$page:l,$renderContext:u,$frontmatter:f}=y();return o.setup(),(n,i)=>{let a=O;return e(),m(x,h(r(_(b)(_(f),9))),{default:d(()=>[i[0]||=s(`h1`,null,`What we will learn`,-1),t(a,{class:`mt-2`})]),_:1},16)}}};export{k as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-Dduj8eLb2.js b/lecture-01/assets/md-Dduj8eLb2.js new file mode 100644 index 0000000000000000000000000000000000000000..2f1afb2afb5f51e6c2fc6744019c444d69065bd0 --- /dev/null +++ b/lecture-01/assets/md-Dduj8eLb2.js @@ -0,0 +1 @@ +import{B as e,D as t,_ as n,et as r,v as i,xt as a,yt as o}from"./modules/shiki-CJZsCeMT.js";import{n as s,t as c}from"./slidev/context-C6dxaFaS.js";import{t as l}from"./section-B0St524Y.js";var u={__name:`slides.md__slidev_27`,setup(u){let{$slidev:d,$nav:f,$clicksContext:p,$clicks:m,$page:h,$renderContext:g,$frontmatter:_}=s();return p.setup(),(s,u)=>(e(),i(l,a(t(o(c)(o(_),26))),{default:r(()=>[...u[0]||=[n(`h1`,null,`Deep learning frameworks`,-1)]]),_:1},16))}};export{u as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-De-g-ePC2.js b/lecture-01/assets/md-De-g-ePC2.js new file mode 100644 index 0000000000000000000000000000000000000000..0342399e4658c6a728bccb539a0d807c9664459f --- /dev/null +++ b/lecture-01/assets/md-De-g-ePC2.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,H as i,T as a,_ as o,b as s,bt as c,dt as l,et as u,g as d,m as f,v as p,xt as m,yt as h}from"./modules/shiki-CJZsCeMT.js";import{t as g}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as _,t as v}from"./slidev/context-C6dxaFaS.js";import{t as y}from"./interactive-CJ_TWtJM.js";var b={class:`dl-cycle`},x=[`viewBox`],S=[`d`],C=[`cx`,`cy`,`r`],w=[`x`,`y`],T=[`x`,`y`],E=[`onClick`,`onMouseenter`],D=[`cx`,`cy`],O=[`x`,`y`],k={class:`dl-cycle__legend`},A=[`onClick`,`onMouseenter`],j=g(a({__name:`CycleDiagram`,props:{steps:{default:()=>[`Ethical approval`,`Data access`,`Querying data`,`Data de-identification`,`Data transfer`,`Quality control`,`Structure data`,`Label data`]},hub:{default:`Unprocessed data`},size:{default:340}},setup(t){let{$slidev:r,$nav:a,$clicksContext:u,$clicks:p,$page:m,$renderContext:h,$frontmatter:g}=_(),v=t,y=l(0),j=d(()=>{let e=v.size/2,t=v.size*.36;return v.steps.map((n,r)=>{let i=-Math.PI/2+r*2*Math.PI/v.steps.length;return{i:r,label:n,x:e+t*Math.cos(i),y:e+t*Math.sin(i),angle:i}})}),M=d(()=>v.size/2);function N(e){let t=j.value[e],n=j.value[(e+1)%v.steps.length],r=v.size*.36;return`M${t.x.toFixed(1)},${t.y.toFixed(1)} A${r},${r} 0 0 1 ${n.x.toFixed(1)},${n.y.toFixed(1)}`}return(t,r)=>(e(),s(`div`,b,[(e(),s(`svg`,{viewBox:`0 0 ${v.size} ${v.size}`,class:`dl-cycle__svg`,role:`img`,"aria-label":`Data curation cycle`},[r[0]||=o(`defs`,null,[o(`marker`,{id:`dl-cycle-arrow`,markerWidth:`6`,markerHeight:`6`,refX:`5`,refY:`3`,orient:`auto`},[o(`path`,{d:`M0,0 L6,3 L0,6 Z`,fill:`var(--dl-border)`})])],-1),(e(!0),s(f,null,i(v.steps,(t,n)=>(e(),s(`path`,{key:`arc${n}`,d:N(n),class:`dl-cycle__arc`,"marker-end":`url(#dl-cycle-arrow)`},null,8,S))),128)),o(`circle`,{cx:M.value,cy:M.value,r:v.size*.15,class:`dl-cycle__hub`},null,8,C),o(`text`,{x:M.value,y:M.value-4,class:`dl-cycle__hublabel`},n(v.hub.split(` `)[0]),9,w),o(`text`,{x:M.value,y:M.value+12,class:`dl-cycle__hublabel`},n(v.hub.split(` `).slice(1).join(` `)),9,T),(e(!0),s(f,null,i(j.value,t=>(e(),s(`g`,{key:t.i,class:c([`dl-cycle__node`,{"is-selected":t.i===y.value}]),onClick:e=>y.value=t.i,onMouseenter:e=>y.value=t.i},[o(`circle`,{cx:t.x,cy:t.y,r:`17`},null,8,D),o(`text`,{x:t.x,y:t.y+5},n(t.i+1),9,O)],42,E))),128))],8,x)),o(`div`,k,[o(`ol`,null,[(e(!0),s(f,null,i(j.value,t=>(e(),s(`li`,{key:t.i,class:c({"is-selected":t.i===y.value}),onClick:e=>y.value=t.i,onMouseenter:e=>y.value=t.i},n(t.label),43,A))),128))])])]))}}),[[`__scopeId`,`data-v-aa342f99`]]),M={__name:`slides.md__slidev_26`,setup(n){let{$slidev:i,$nav:a,$clicksContext:o,$clicks:s,$page:c,$renderContext:l,$frontmatter:d}=_();return o.setup(),(n,i)=>{let a=j;return e(),p(y,m(r(h(v)(h(d),25))),{default:u(()=>[t(a)]),_:1},16)}}};export{M as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-DmIhJbjq.js b/lecture-01/assets/md-DmIhJbjq.js new file mode 100644 index 0000000000000000000000000000000000000000..d83cf0c0785affc62bb1496463bdd5b37b0f6fd0 --- /dev/null +++ b/lecture-01/assets/md-DmIhJbjq.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,H as i,T as a,_ as o,b as s,bt as c,dt as l,et as u,g as d,m as f,v as p,xt as m,y as h,yt as g}from"./modules/shiki-CJZsCeMT.js";import{t as _}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as v,t as y}from"./slidev/context-C6dxaFaS.js";import{t as b}from"./Citation-BrOphNXC.js";import{t as x}from"./interactive-CJ_TWtJM.js";var S={class:`dl-venn`},C={viewBox:`0 0 280 280`,class:`dl-venn__svg`,role:`img`,"aria-label":`AI contains machine learning contains deep learning`},w=[`cx`,`cy`,`r`,`onClick`,`onMouseenter`],T=[`x`,`y`],E=[`x`,`y`],D=[`x`,`y`],O={class:`dl-venn__detail`},k={class:`dl-venn__chips`},A=[`onClick`],j=_(a({__name:`AIMLDLVenn`,setup(t){let{$slidev:r,$nav:a,$clicksContext:u,$clicks:p,$page:m,$renderContext:g,$frontmatter:_}=v(),y=[{key:`ai`,name:`Artificial Intelligence`,blurb:`Mimicking the intelligence or behavioural pattern of humans, or of any other living entity.`,r:118,cx:130,cy:130,fill:`var(--dl-ai)`},{key:`ml`,name:`Machine Learning`,blurb:`A technique by which a computer learns from data, without being given a complex set of rules — mainly by training a model on a dataset.`,r:78,cx:150,cy:152,fill:`var(--dl-ml)`},{key:`dl`,name:`Deep Learning`,blurb:`A technique for performing machine learning inspired by our brain’s own network of neurons.`,r:42,cx:168,cy:178,fill:`var(--dl-dl)`}],b=l(`dl`),x=d(()=>y.find(e=>e.key===b.value));return(t,r)=>(e(),s(`div`,S,[(e(),s(`svg`,C,[h(` Drawn largest first so the inner rings stay clickable on top. `),(e(),s(f,null,i(y,e=>o(`g`,{key:e.key},[o(`circle`,{cx:e.cx,cy:e.cy,r:e.r,class:c([`dl-venn__ring`,`is-${e.key}`,{"is-active":e.key===b.value}]),onClick:t=>b.value=e.key,onMouseenter:t=>b.value=e.key},null,42,w)])),64)),o(`text`,{x:y[0].cx,y:y[0].cy-y[0].r+22,class:`dl-venn__label`},`AI`,8,T),o(`text`,{x:y[1].cx,y:y[1].cy-y[1].r+20,class:`dl-venn__label`},`ML`,8,E),o(`text`,{x:y[2].cx,y:y[2].cy+5,class:`dl-venn__label is-inner`},`DL`,8,D)])),o(`div`,O,[o(`div`,k,[(e(),s(f,null,i(y,e=>o(`button`,{key:e.key,type:`button`,class:c({"is-selected":e.key===b.value}),onClick:t=>b.value=e.key},n(e.name),11,A)),64))]),o(`p`,null,n(x.value.blurb),1)])]))}}),[[`__scopeId`,`data-v-34c96df7`]]),M={__name:`slides.md__slidev_17`,setup(n){let{$slidev:i,$nav:a,$clicksContext:s,$clicks:c,$page:l,$renderContext:d,$frontmatter:f}=v();return s.setup(),(n,i)=>{let a=j,s=b;return e(),p(x,m(r(g(y)(g(f),16))),{aside:u(e=>[i[0]||=o(`blockquote`,null,[o(`p`,null,`Deep learning is a subset of machine learning, which is essentially a neural network with three or more layers. These neural networks attempt to simulate the behavior of the human brain — allowing it to "learn" from large amounts of data.`)],-1),t(s,{source:`IBM Cloud Learn Hub`,url:`https://www.ibm.com/topics/deep-learning`})]),default:u(()=>[t(a)]),_:1},16)}}};export{M as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-FdUKh9Do.js b/lecture-01/assets/md-FdUKh9Do.js new file mode 100644 index 0000000000000000000000000000000000000000..039abe212b6917a7d7d0e63930170115905764c0 --- /dev/null +++ b/lecture-01/assets/md-FdUKh9Do.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-C6dxaFaS.js";import{t as u}from"./LinkCard-DOp_LlnV.js";import{t as d}from"./interactive-CJ_TWtJM.js";var f={class:`grid grid-cols-2 gap-4 w-full`},p={__name:`slides.md__slidev_15`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c();return g.setup(),(c,p)=>{let m=u;return e(),a(d,o(n(s(l)(s(b),14))),{aside:i(e=>[...p[0]||=[r(`p`,null,`Live demos beat screenshots. If the network is cooperating, generate something the room suggests.`,-1)]]),default:i(()=>[r(`div`,f,[t(m,{href:`https://openai.com/index/dall-e-3/`,title:`DALL·E 3`,blurb:`Text to image.`,icon:`🎨`}),t(m,{href:`https://pytorch.org/`,title:`PyTorch`,blurb:`The framework we use all semester.`,icon:`🔥`})])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-G7taWeXP2.js b/lecture-01/assets/md-G7taWeXP2.js new file mode 100644 index 0000000000000000000000000000000000000000..57241bce1400dabd100c12ae355feb202a5da50e --- /dev/null +++ b/lecture-01/assets/md-G7taWeXP2.js @@ -0,0 +1 @@ +import{B as e,D as t,G as n,_ as r,b as i,et as a,tt as o,v as s,xt as c,yt as l}from"./modules/shiki-CJZsCeMT.js";import{n as u,t as d}from"./slidev/context-C6dxaFaS.js";import{t as f}from"./default-cZapvzLK.js";var p={class:`grid grid-cols-3 gap-3 mt-2`},m={class:`dl-card`},h={class:`dl-card`},g={class:`dl-card is-contain`},_={class:`dl-card is-contain`},v={class:`dl-card`},y={class:`dl-card`},b={__name:`slides.md__slidev_3`,setup(b){let{$slidev:x,$nav:S,$clicksContext:C,$clicks:w,$page:T,$renderContext:E,$frontmatter:D}=u();return C.setup(),(u,b)=>{let x=n(`click`);return e(),s(f,c(t(l(d)(l(D),2))),{default:a(()=>[b[6]||=r(`h1`,null,`Who am I?`,-1),r(`div`,p,[o((e(),i(`div`,m,[...b[0]||=[r(`img`,{src:`/lecture-01/assets/home-globe-Ca_kMWE9.jpeg`,alt:`Globe with Sri Lanka marked`},null,-1),r(`div`,{class:`dl-card__cap`},`From Sri Lanka`,-1)]])),[[x]]),o((e(),i(`div`,h,[...b[1]||=[r(`img`,{src:`/lecture-01/assets/home-train-DMUMiSnz.jpeg`,alt:`Train crossing a viaduct through forested hills in Sri Lanka`},null,-1),r(`div`,{class:`dl-card__cap`},`…which looks like this`,-1)]])),[[x]]),o((e(),i(`div`,g,[...b[2]||=[r(`img`,{src:`/lecture-01/assets/simulamet-BhBKFkpT.jpeg`,alt:`SimulaMet logo`},null,-1),r(`div`,{class:`dl-card__cap`},`Now a researcher at SimulaMet, Oslo`,-1)]])),[[x]]),o((e(),i(`div`,_,[...b[3]||=[r(`img`,{src:`/lecture-01/assets/gan-schematic-Blkri1md.jpeg`,alt:`GAN generator and discriminator schematic`},null,-1),r(`div`,{class:`dl-card__cap`},`I work on generative models…`,-1)]])),[[x]]),o((e(),i(`div`,v,[...b[4]||=[r(`img`,{src:`/lecture-01/assets/research-polyps-BnJ5zZJF.jpeg`,alt:`Endoscopy images of polyps with segmentation masks`},null,-1),r(`div`,{class:`dl-card__cap`},`…for endoscopy`,-1)]])),[[x]]),o((e(),i(`div`,y,[...b[5]||=[r(`img`,{src:`/lecture-01/assets/research-ecg-ljyEVJf6.jpeg`,alt:`Twelve-lead electrocardiogram`},null,-1),r(`div`,{class:`dl-card__cap`},`…and for physiological signals`,-1)]])),[[x]])])]),_:1},16)}}};export{b as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-Nkx2rUY6.js b/lecture-01/assets/md-Nkx2rUY6.js new file mode 100644 index 0000000000000000000000000000000000000000..1cf0957b89d2b71d78a8bda9da256323d3a0260d --- /dev/null +++ b/lecture-01/assets/md-Nkx2rUY6.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,S as r,_ as i,et as a,v as o,xt as s,yt as c}from"./modules/shiki-CJZsCeMT.js";import{n as l,t as u}from"./slidev/context-C6dxaFaS.js";import{t as d}from"./Citation-BrOphNXC.js";import{t as f}from"./figure--eqXHWiv.js";var p={__name:`slides.md__slidev_14`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=l();return g.setup(),(l,p)=>{let m=d;return e(),o(f,s(n(c(u)(c(b),13))),{caption:a(e=>[...p[0]||=[i(`p`,null,[r(`Five years of large language models. Almost everything here is a `),i(`strong`,null,`transformer`),r(` — which we cover in week 7.`)],-1)]]),citation:a(e=>[t(m,{source:`Yang et al., Harnessing the Power of LLMs in Practice`,url:`https://arxiv.org/abs/2304.13712`})]),default:a(()=>[p[1]||=i(`img`,{src:`/lecture-01/assets/llm-evolutionary-tree-CduF83L_.jpeg`,alt:`Evolutionary tree of large language models from 2019 to 2023`},null,-1)]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-OYY3MJ1x.css b/lecture-01/assets/md-OYY3MJ1x.css new file mode 100644 index 0000000000000000000000000000000000000000..d257ecd7253c29f7cf056261850c2fe5a67ba3a0 --- /dev/null +++ b/lecture-01/assets/md-OYY3MJ1x.css @@ -0,0 +1 @@ +.dl-syllabus[data-v-9a40f535]{width:100%}.dl-syllabus__track[data-v-9a40f535]{align-items:stretch;gap:4px;display:grid;position:relative}.dl-syllabus__block[data-v-9a40f535]{border:1px solid var(--dl-border);background:var(--dl-surface);cursor:pointer;border-radius:5px;height:2.6rem;padding:0;transition:background .15s,border-color .15s,transform .15s;position:relative}.dl-syllabus__block[data-v-9a40f535]:hover{border-color:var(--dl-accent);transform:translateY(-2px)}.dl-syllabus__block.is-selected[data-v-9a40f535]{background:var(--dl-accent);border-color:var(--dl-accent-strong)}.dl-syllabus__num[data-v-9a40f535]{color:var(--dl-muted);font-size:.8rem;font-weight:700}.dl-syllabus__block.is-selected .dl-syllabus__num[data-v-9a40f535]{color:#fff}.dl-syllabus__now[data-v-9a40f535]{border:2px solid var(--dl-danger);pointer-events:none;border-radius:5px;grid-row:1}.dl-syllabus__weeks[data-v-9a40f535]{color:var(--dl-muted);text-align:center;font-variant-numeric:tabular-nums;gap:4px;margin-top:.3rem;font-size:.7rem;display:grid}.dl-syllabus__detail[data-v-9a40f535]{min-height:6.5rem;margin-top:1.2rem}.dl-syllabus__heading[data-v-9a40f535]{align-items:baseline;gap:.8rem;display:flex}.dl-syllabus__weeklabel[data-v-9a40f535]{letter-spacing:.08em;text-transform:uppercase;color:var(--dl-accent);flex-shrink:0;font-size:.78rem;font-weight:700}.dl-syllabus__detail h3[data-v-9a40f535]{margin:0;font-size:1.45rem}.dl-syllabus__detail p[data-v-9a40f535]{max-width:68ch;margin:.45rem 0 0;font-size:1.05rem;line-height:1.5} diff --git a/lecture-01/assets/md-bAEnFVLa.js b/lecture-01/assets/md-bAEnFVLa.js new file mode 100644 index 0000000000000000000000000000000000000000..615765316a45fe3453afb5a93c0c5f49fe702c65 --- /dev/null +++ b/lecture-01/assets/md-bAEnFVLa.js @@ -0,0 +1 @@ +import{B as e,Ct as t,D as n,T as r,U as i,_ as a,b as o,et as s,v as c,xt as l,y as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{t as f}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as p,t as m}from"./slidev/context-C6dxaFaS.js";var h={class:`slidev-layout dl-title`},g={class:`dl-title__eyebrow`},_={key:0,class:`dl-title__code`},v={key:1,class:`dl-title__lecture`},y={class:`dl-title__body`},b={class:`dl-title__meta`},x={key:0,class:`dl-title__author`},S=[`href`],C={key:2,class:`dl-title__date`},w=f(r({__name:`title`,props:{courseCode:{},lecture:{},author:{},email:{},date:{}},setup(n){let{$slidev:r,$nav:s,$clicksContext:c,$clicks:l,$page:d,$renderContext:f,$frontmatter:m}=p(),w=n;return(n,r)=>(e(),o(`div`,h,[a(`div`,g,[w.courseCode?(e(),o(`span`,_,t(w.courseCode),1)):u(`v-if`,!0),w.lecture?(e(),o(`span`,v,`Lecture `+t(w.lecture),1)):u(`v-if`,!0)]),a(`div`,y,[i(n.$slots,`default`,{},void 0,!0)]),r[0]||=a(`div`,{class:`dl-rule dl-title__rule`},null,-1),a(`div`,b,[w.author?(e(),o(`div`,x,t(w.author),1)):u(`v-if`,!0),w.email?(e(),o(`a`,{key:1,href:`mailto:${w.email}`,class:`dl-title__email`},t(w.email),9,S)):u(`v-if`,!0),w.date?(e(),o(`div`,C,t(w.date),1)):u(`v-if`,!0)])]))}}),[[`__scopeId`,`data-v-dc59a472`]]),T={__name:`slides.md__slidev_1`,setup(t){let{$slidev:r,$nav:i,$clicksContext:o,$clicks:u,$page:f,$renderContext:h,$frontmatter:g}=p();return o.setup(),(t,r)=>(e(),c(w,l(n(d(m)(d(g),0))),{default:s(()=>[...r[0]||=[a(`h1`,null,`Deep Learning`,-1),a(`p`,null,`Twelve weeks, from a single artificial neuron to deep reinforcement learning.`,-1)]]),_:1},16))}};export{T as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-btiQZx8e2.js b/lecture-01/assets/md-btiQZx8e2.js new file mode 100644 index 0000000000000000000000000000000000000000..1dd6c09c80dcb61e65ef8991c15c53dd7dd15491 --- /dev/null +++ b/lecture-01/assets/md-btiQZx8e2.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,H as i,T as a,_ as o,b as s,et as c,m as l,v as u,xt as d,yt as f}from"./modules/shiki-CJZsCeMT.js";import{t as p}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as m,t as h}from"./slidev/context-C6dxaFaS.js";import{t as g}from"./default-cZapvzLK.js";import{t as _}from"./slidev/VClicks-XVjwUv_k.js";var v={class:`dl-poll`},y={class:`dl-poll__question`},b=p(a({__name:`PollSlide`,props:{question:{},items:{}},setup(r){let{$slidev:a,$nav:u,$clicksContext:d,$clicks:f,$page:p,$renderContext:h,$frontmatter:g}=m(),b=r;return(r,a)=>{let u=_;return e(),s(`div`,v,[o(`div`,y,n(b.question),1),t(u,null,{default:c(()=>[(e(!0),s(l,null,i(b.items,t=>(e(),s(`div`,{key:t,class:`dl-poll__item`},[a[0]||=o(`span`,{class:`dl-poll__bullet`},`?`,-1),o(`span`,null,n(t),1)]))),128))]),_:1})])}}}),[[`__scopeId`,`data-v-743a908f`]]),x={__name:`slides.md__slidev_4`,setup(n){let{$slidev:i,$nav:a,$clicksContext:o,$clicks:s,$page:l,$renderContext:p,$frontmatter:_}=m();return o.setup(),(n,i)=>{let a=b;return e(),u(g,d(r(f(h)(f(_),3))),{default:c(()=>[t(a,{question:`Who are you?`,items:[`What level are you studying at?`,`What do you already know about machine learning?`,`How much time can you give this course?`,`What hardware and resources do you have?`,`How should we communicate?`]})]),_:1},16)}}};export{x as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-n9dEvYLT.js b/lecture-01/assets/md-n9dEvYLT.js new file mode 100644 index 0000000000000000000000000000000000000000..dede4cc8506ef05dbb08e74b07faae29433b95b5 --- /dev/null +++ b/lecture-01/assets/md-n9dEvYLT.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,_ as i,et as a,tt as o,v as s,xt as c,yt as l}from"./modules/shiki-CJZsCeMT.js";import{n as u,t as d}from"./slidev/context-C6dxaFaS.js";import{t as f}from"./default-cZapvzLK.js";import{t as p}from"./LinkCard-DOp_LlnV.js";var m={class:`grid grid-cols-2 gap-4`},h={__name:`slides.md__slidev_16`,setup(h){let{$slidev:g,$nav:_,$clicksContext:v,$clicks:y,$page:b,$renderContext:x,$frontmatter:S}=u();return v.setup(),(u,h)=>{let g=p,_=r(`click`);return e(),s(f,c(n(l(d)(l(S),15))),{default:a(()=>[h[0]||=i(`h1`,null,`Can we use DL knowledge to earn money?`,-1),h[1]||=i(`div`,{class:`dl-secondary -mt-2 mb-6`},`(in addition to doing a job in this path)`,-1),i(`div`,m,[o(t(g,{href:`https://www.kaggle.com/`,title:`Kaggle`,blurb:`Competitions, datasets, and free GPU notebooks.`,icon:`🏆`},null,512),[[_]]),o(t(g,{href:`https://grand-challenge.org/challenges/`,title:`Grand Challenge`,blurb:`Medical imaging challenges.`,icon:`🩺`},null,512),[[_]]),o(t(g,{href:`https://www.aicrowd.com/`,title:`AIcrowd`,blurb:`Open research challenges.`,icon:`🧩`},null,512),[[_]]),o(t(g,{href:`https://www.topcoder.com/`,title:`Topcoder`,blurb:`Freelance and competitive work.`,icon:`💼`},null,512),[[_]])])]),_:1},16)}}};export{h as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-qdiBjKc9.js b/lecture-01/assets/md-qdiBjKc9.js new file mode 100644 index 0000000000000000000000000000000000000000..bf140b1429903bbf6cde26eedd122b0d4dd7a982 --- /dev/null +++ b/lecture-01/assets/md-qdiBjKc9.js @@ -0,0 +1 @@ +import{B as e,D as t,_ as n,et as r,v as i,xt as a,yt as o}from"./modules/shiki-CJZsCeMT.js";import{n as s,t as c}from"./slidev/context-C6dxaFaS.js";import{t as l}from"./section-B0St524Y.js";var u={__name:`slides.md__slidev_11`,setup(u){let{$slidev:d,$nav:f,$clicksContext:p,$clicks:m,$page:h,$renderContext:g,$frontmatter:_}=s();return p.setup(),(s,u)=>(e(),i(l,a(t(o(c)(o(_),10))),{default:r(()=>[...u[0]||=[n(`h1`,null,`What is deep learning?`,-1)]]),_:1},16))}};export{u as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-tewnPWLf.js b/lecture-01/assets/md-tewnPWLf.js new file mode 100644 index 0000000000000000000000000000000000000000..f87be0d88e2833b8a95ab4660959523a685428bc --- /dev/null +++ b/lecture-01/assets/md-tewnPWLf.js @@ -0,0 +1 @@ +import{B as e,D as t,_ as n,et as r,v as i,xt as a,yt as o}from"./modules/shiki-CJZsCeMT.js";import{n as s,t as c}from"./slidev/context-C6dxaFaS.js";import{t as l}from"./section-B0St524Y.js";var u={__name:`slides.md__slidev_22`,setup(u){let{$slidev:d,$nav:f,$clicksContext:p,$clicks:m,$page:h,$renderContext:g,$frontmatter:_}=s();return p.setup(),(s,u)=>(e(),i(l,a(t(o(c)(o(_),21))),{default:r(()=>[...u[0]||=[n(`h1`,null,`Our projects`,-1)]]),_:1},16))}};export{u as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-wnEqLP9Q2.js b/lecture-01/assets/md-wnEqLP9Q2.js new file mode 100644 index 0000000000000000000000000000000000000000..852dc8779a60276e067d21a3e94791e9bd2d3f58 --- /dev/null +++ b/lecture-01/assets/md-wnEqLP9Q2.js @@ -0,0 +1 @@ +import{B as e,Ct as t,D as n,T as r,U as i,_ as a,b as o,et as s,v as c,xt as l,y as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{t as f}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as p,t as m}from"./slidev/context-C6dxaFaS.js";var h={class:`slidev-layout dl-end`},g={class:`dl-end__body`},_={class:`dl-end__meta`},v={key:0,class:`dl-end__next`},y=[`href`],b=f(r({__name:`end`,props:{email:{},next:{}},setup(n){let{$slidev:r,$nav:s,$clicksContext:c,$clicks:l,$page:d,$renderContext:f,$frontmatter:m}=p(),b=n;return(n,r)=>(e(),o(`div`,h,[a(`div`,g,[i(n.$slots,`default`,{},void 0,!0)]),r[0]||=a(`div`,{class:`dl-rule`},null,-1),a(`div`,_,[b.next?(e(),o(`span`,v,`Next: `+t(b.next),1)):u(`v-if`,!0),b.email?(e(),o(`a`,{key:1,href:`mailto:${b.email}`},t(b.email),9,y)):u(`v-if`,!0)])]))}}),[[`__scopeId`,`data-v-f8d31aa3`]]),x={__name:`slides.md__slidev_30`,setup(t){let{$slidev:r,$nav:i,$clicksContext:o,$clicks:u,$page:f,$renderContext:h,$frontmatter:g}=p();return o.setup(),(t,r)=>(e(),c(b,l(n(d(m)(d(g),29))),{default:s(()=>[...r[0]||=[a(`h1`,null,`Practical session — Week 1`,-1)]]),_:1},16))}};export{x as default}; \ No newline at end of file diff --git a/lecture-01/assets/md-z49Gc1Nu2.js b/lecture-01/assets/md-z49Gc1Nu2.js new file mode 100644 index 0000000000000000000000000000000000000000..0846dd2110840d093163f78f31b7298435bc5bb3 --- /dev/null +++ b/lecture-01/assets/md-z49Gc1Nu2.js @@ -0,0 +1,11 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/c4Diagram-FVXVMJYG-DArFwjF3.js","assets/chunk-PTVI3W5X-DVfdoxm6.js","assets/chunk-FO5PYUIK-CPzj2963.js","assets/chunk-NEZ6ONQZ-CuHA0Ldj.js","assets/preload-helper-DpA04vUI.js","assets/chunk-IPM4HZQ6-CQmHNgJe.js","assets/chunk-OX6ZKUVE-roiHi12N.js","assets/chunk-ZICDAICJ-CB44yeNY.js","assets/flowDiagram-JEP3DFND-BSFjwP7W.js","assets/chunk-PWCFYZI5-Dz1excih.js","assets/chunk-PLCLPJVV-BfMyJHbe.js","assets/chunk-XXV7AQMY-qeLKYxsH.js","assets/chunk-YV36FAQU-CkTVkoM6.js","assets/chunk-AQ2D6KKF-AxjphkEe.js","assets/chunk-2V3FENDJ-B1mkZICr.js","assets/chunk-DKH7L6O3-pKUB4f-O.js","assets/chunk-RTI7CJYH-CrTK6TD7.js","assets/chunk-MPM6TOF7-5cxd71sq.js","assets/chunk-STSWKLMO-1NGmNrHs.js","assets/chunk-HPLX5OYV-zid2YVw5.js","assets/chunk-BYAF6FXG-DqiL_6qO.js","assets/chunk-MX3EQCGM-dfbghwBz.js","assets/chunk-RTBOCTTP-BZPyT8j-.js","assets/swimlanesDiagram-GLBMEWQJ-B7w8hc2n.js","assets/erDiagram-FLLG3MV5-BvzVUDwG.js","assets/gitGraphDiagram-RSE3GARS-ZBBB21eU.js","assets/chunk-6ZKBGPIT-B4RTUexp.js","assets/chunk-A7G5T7E5-C2HISlqa.js","assets/chunk-BQKPLVCE-CH-bQZj9.js","assets/chunk-NYCIP5HP-BZs_nZUU.js","assets/chunk-6QIBY7DQ-xR0SR3RB.js","assets/chunk-SLCUJWJ3-Bzf1BoPP.js","assets/chunk-43ACQNTO-CVHKukau.js","assets/chunk-FXRKSSP6-BDxrggHz.js","assets/chunk-RRYK4PFG-DZMcopsb.js","assets/chunk-IT6C5QXO-BI6Sf-cR.js","assets/chunk-GMJQP6DO-gEw8rKqu.js","assets/chunk-ODPFZSHR-BUzFQ4Zq.js","assets/chunk-6OZ7KPF7-CpRlDBGl.js","assets/chunk-LJTN6OYE-BTsXVLFU.js","assets/chunk-Z6Q54H3S-B8XyqzVF.js","assets/chunk-4KMQCWFH-ClzK3uec.js","assets/chunk-S7Q6ZHN2-CSIi0_Nw.js","assets/chunk-IIWGMRJM-k15frrBU.js","assets/chunk-IALYP65X-Bv3ioVcB.js","assets/ganttDiagram-RXA2POXJ-D_LKD9p_.js","assets/infoDiagram-5L6ZSEJH-BCBEYMTq.js","assets/chunk-BPTLHSDI-QRS_xuYz.js","assets/pieDiagram-KV7KQJTS-Ds0asnUL.js","assets/quadrantDiagram-MXEHXERY-BqDgIJYL.js","assets/xychartDiagram-ZHPTVI7R-CnI219k3.js","assets/requirementDiagram-ZEWAG7YM-gqIjNuUm.js","assets/sequenceDiagram-DLAT6Y6V-CQQd0Avg.js","assets/classDiagram-UCXUAZDN-CzzXamfC.js","assets/chunk-WBLI2NX4-B_kS-fCR.js","assets/classDiagram-v2-3IH6NYTM-CzzXamfC.js","assets/stateDiagram-EYHZ2SRL-Bet3Zm5V.js","assets/chunk-XAKTCX7R-DiVetB2y.js","assets/chunk-T5XCKZAJ-1iVrcyuQ.js","assets/chunk-OVFB7FZ2-DfSjEz3X.js","assets/stateDiagram-v2-5MG54T2I-UdwpDpjp.js","assets/journeyDiagram-IW7LBXVP-CENhJOQU.js","assets/timeline-definition-XWTBQSRE-eRYZnOTU.js","assets/mindmap-definition-TMFK3LR3-Drt5x30g.js","assets/kanban-definition-PIMVIEU3-Dm_C0YEC.js","assets/sankeyDiagram-ZEB2SQIR-BYbqBT66.js","assets/diagram-QYPETOCO-DO5zo3se.js","assets/diagram-25E3JIVG-CF75TqMB.js","assets/blockDiagram-XQ3M7VRV-BZEbDaJX.js","assets/diagram-EDZXTW53-D3AUECSQ.js","assets/architectureDiagram-M2JJTB3Y-BOf15hQi.js","assets/chunk-EMKVYAI2-C4ZARs9V.js","assets/diagram-J7GERFIL-BzTqG1hX.js","assets/ishikawaDiagram-4HUKQSDW-CwlIZKDp.js","assets/vennDiagram-GBZDLF5N-B1SVEUjn.js","assets/diagram-YFGL7EOQ-KnZ9mrnO.js","assets/wardleyDiagram-OEKRJB5D-BvVI10W5.js","assets/cynefinDiagram-3PKP3OFC-BN65f1Gk.js","assets/railroadDiagram-MV55M447-C4p67Sjt.js","assets/chunk-QR6SRGRY-cBZQLGGn.js","assets/ebnfDiagram-M7IZRLZS-kvDdF9Z_.js","assets/abnfDiagram-UN2JCKJG-Bspp4CZN.js","assets/pegDiagram-CCMLLSNW-CZgz04bV.js"])))=>i.map(i=>d[i]); +import{r as e,t}from"./rolldown-runtime-hePW80VL.js";import{B as n,C as r,Ct as i,D as a,E as o,G as s,N as c,Q as l,S as u,T as d,Z as f,_ as p,b as m,dt as h,et as g,g as _,tt as v,v as y,xt as b,yt as x}from"./modules/shiki-CJZsCeMT.js";import{nt as S,tt as C}from"./useNav-CGjBnVA8.js";import{t as w}from"./preload-helper-DpA04vUI.js";import{n as ee,t as te}from"./slidev/context-C6dxaFaS.js";import{f as T,u as ne}from"./index-DOePylYH.js";import{t as re}from"./default-cZapvzLK.js";import{r as E}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as D,L as ie,T as O}from"./chunk-FO5PYUIK-CPzj2963.js";import{$ as ae,D as oe,L as se,O as ce,R as le,S as k,T as ue,U as de,V as A,X as fe,at as pe,f as me,g as he,h as ge,l as _e,n as ve,nt as ye,q as be,r as xe,rt as Se,t as Ce,u as we,v as Te,w as Ee,y as De,z as Oe}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as ke}from"./chunk-BPTLHSDI-QRS_xuYz.js";import{n as Ae,t as je}from"./chunk-PWCFYZI5-Dz1excih.js";import"./chunk-PLCLPJVV-BfMyJHbe.js";import"./chunk-XXV7AQMY-qeLKYxsH.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{_ as Me,i as Ne,m as Pe,o as Fe,p as Ie,s as Le,v as j}from"./chunk-OX6ZKUVE-roiHi12N.js";import"./chunk-YV36FAQU-CkTVkoM6.js";import{r as Re}from"./chunk-AQ2D6KKF-AxjphkEe.js";import{r as ze}from"./chunk-2V3FENDJ-B1mkZICr.js";import"./chunk-DKH7L6O3-pKUB4f-O.js";import"./chunk-RTI7CJYH-CrTK6TD7.js";import"./chunk-MPM6TOF7-5cxd71sq.js";import{n as Be}from"./chunk-STSWKLMO-1NGmNrHs.js";var Ve=d({__name:`ShadowRoot`,props:{innerHtml:{}},emits:[`shadow`],setup(e,{emit:t}){let r=e,i=t,a=h(),o=_(()=>a.value?a.value.shadowRoot||a.value.attachShadow({mode:`open`}):null);return l(()=>{o.value&&r.innerHtml&&(i(`shadow`,o.value),o.value.innerHTML=r.innerHtml)}),(e,t)=>(n(),m(`div`,{ref_key:`el`,ref:a},null,512))}}),He=e(t(((e,t)=>{var n=(function(){var e=String.fromCharCode,t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`,n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$`,r={};function i(e,t){if(!r[e]){r[e]={};for(var n=0;n>>8,n[r*2+1]=o%256}return n},decompressFromUint8Array:function(t){if(t==null)return a.decompress(t);for(var n=Array(t.length/2),r=0,i=n.length;r>=1}else{for(i=1,r=0;r>=1}u--,u==0&&(u=2**f,f++),delete o[l]}else for(i=a[l],r=0;r>=1;u--,u==0&&(u=2**f,f++),a[c]=d++,l=String(s)}if(l!==``){if(Object.prototype.hasOwnProperty.call(o,l)){if(l.charCodeAt(0)<256){for(r=0;r>=1}else{for(i=1,r=0;r>=1}u--,u==0&&(u=2**f,f++),delete o[l]}else for(i=a[l],r=0;r>=1;u--,u==0&&(u=2**f,f++)}for(i=2,r=0;r>=1;for(;;){if(m<<=1,h==t-1){p.push(n(m));break}h++}return p.join(``)},decompress:function(e){return e==null?``:e==``?null:a._decompress(e.length,32768,function(t){return e.charCodeAt(t)})},_decompress:function(t,n,r){var i=[],a=4,o=4,s=3,c=``,l=[],u,d,f,p,m,h,g,_={val:r(0),position:n,index:1};for(u=0;u<3;u+=1)i[u]=u;for(f=0,m=4,h=1;h!=m;)p=_.val&_.position,_.position>>=1,_.position==0&&(_.position=n,_.val=r(_.index++)),f|=+(p>0)*h,h<<=1;switch(f){case 0:for(f=0,m=256,h=1;h!=m;)p=_.val&_.position,_.position>>=1,_.position==0&&(_.position=n,_.val=r(_.index++)),f|=+(p>0)*h,h<<=1;g=e(f);break;case 1:for(f=0,m=2**16,h=1;h!=m;)p=_.val&_.position,_.position>>=1,_.position==0&&(_.position=n,_.val=r(_.index++)),f|=+(p>0)*h,h<<=1;g=e(f);break;case 2:return``}for(i[3]=g,d=g,l.push(g);;){if(_.index>t)return``;for(f=0,m=2**s,h=1;h!=m;)p=_.val&_.position,_.position>>=1,_.position==0&&(_.position=n,_.val=r(_.index++)),f|=+(p>0)*h,h<<=1;switch(g=f){case 0:for(f=0,m=256,h=1;h!=m;)p=_.val&_.position,_.position>>=1,_.position==0&&(_.position=n,_.val=r(_.index++)),f|=+(p>0)*h,h<<=1;i[o++]=e(f),g=o-1,a--;break;case 1:for(f=0,m=2**16,h=1;h!=m;)p=_.val&_.position,_.position>>=1,_.position==0&&(_.position=n,_.val=r(_.index++)),f|=+(p>0)*h,h<<=1;i[o++]=e(f),g=o-1,a--;break;case 2:return l.join(``)}if(a==0&&(a=2**s,s++),i[g])c=i[g];else if(g===o)c=d+d.charAt(0);else return null;l.push(c),i[o++]=d+c.charAt(0),a--,d=c,a==0&&(a=2**s,s++)}}};return a})();typeof define==`function`&&define.amd?define(function(){return n}):t!==void 0&&t!=null?t.exports=n:typeof angular<`u`&&angular!=null&&angular.module(`LZString`,[]).factory(`LZString`,function(){return n})}))(),1),Ue=`c4`,We={id:Ue,detector:E(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./c4Diagram-FVXVMJYG-DArFwjF3.js`);return{diagram:e}},__vite__mapDeps([0,1,2,3,4,5,6,7]));return{id:Ue,diagram:e}},`loader`)},Ge=`flowchart`,Ke={id:Ge,detector:E((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./flowDiagram-JEP3DFND-BSFjwP7W.js`);return{diagram:e}},__vite__mapDeps([8,2,1,3,4,9,10,11,5,6,12,13,14,15,16,17,18,7,19,20,21,22]));return{id:Ge,diagram:e}},`loader`)},qe=`flowchart-v2`,Je={id:qe,detector:E((e,t)=>t?.flowchart?.defaultRenderer!==`dagre-d3`&&(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./flowDiagram-JEP3DFND-BSFjwP7W.js`);return{diagram:e}},__vite__mapDeps([8,2,1,3,4,9,10,11,5,6,12,13,14,15,16,17,18,7,19,20,21,22]));return{id:qe,diagram:e}},`loader`)},Ye=`swimlane`,Xe={id:Ye,detector:E(e=>/^\s*swimlane-beta\b/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./swimlanesDiagram-GLBMEWQJ-B7w8hc2n.js`);return{diagram:e}},__vite__mapDeps([23,1,2,3,4,9,10,11,5,6,12,13,14,15,16,17,18,7,19,20,21,22]));return{id:Ye,diagram:e}},`loader`)},Ze=`er`,Qe={id:Ze,detector:E(e=>/^\s*erDiagram/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./erDiagram-FLLG3MV5-BvzVUDwG.js`);return{diagram:e}},__vite__mapDeps([24,1,2,3,4,10,11,5,6,12,13,14,15,16,17,18,19,20]));return{id:Ze,diagram:e}},`loader`)},$e=`gitGraph`,et={id:$e,detector:E(e=>/^\s*gitGraph/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./gitGraphDiagram-RSE3GARS-ZBBB21eU.js`);return{diagram:e}},__vite__mapDeps([25,1,2,3,4,5,6,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]));return{id:$e,diagram:e}},`loader`)},tt=`gantt`,nt={id:tt,detector:E(e=>/^\s*gantt/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./ganttDiagram-RXA2POXJ-D_LKD9p_.js`);return{diagram:e}},__vite__mapDeps([45,1,2,3,4,5,6]));return{id:tt,diagram:e}},`loader`)},rt=`info`,it={id:rt,detector:E(e=>/^\s*info/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./infoDiagram-5L6ZSEJH-BCBEYMTq.js`);return{diagram:e}},__vite__mapDeps([46,1,2,3,4,47,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43]));return{id:rt,diagram:e}},`loader`)},at=`pie`,ot={id:at,detector:E(e=>/^\s*pie/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./pieDiagram-KV7KQJTS-Ds0asnUL.js`);return{diagram:e}},__vite__mapDeps([48,1,2,3,4,47,5,6,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43]));return{id:at,diagram:e}},`loader`)},st=`quadrantChart`,ct={id:st,detector:E(e=>/^\s*quadrantChart/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./quadrantDiagram-MXEHXERY-BqDgIJYL.js`);return{diagram:e}},__vite__mapDeps([49,1,2,3,4]));return{id:st,diagram:e}},`loader`)},lt=`xychart`,ut={id:lt,detector:E(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./xychartDiagram-ZHPTVI7R-CnI219k3.js`);return{diagram:e}},__vite__mapDeps([50,1,2,3,4,47,5,6,13,14]));return{id:lt,diagram:e}},`loader`)},dt=`requirement`,ft={id:dt,detector:E(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./requirementDiagram-ZEWAG7YM-gqIjNuUm.js`);return{diagram:e}},__vite__mapDeps([51,1,2,3,4,10,11,5,6,12,13,14,15,16,17,18,19,20]));return{id:dt,diagram:e}},`loader`)},pt=`sequence`,mt={id:pt,detector:E(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./sequenceDiagram-DLAT6Y6V-CQQd0Avg.js`);return{diagram:e}},__vite__mapDeps([52,1,2,3,4,9,5,6,7,44]));return{id:pt,diagram:e}},`loader`)},ht=`class`,gt={id:ht,detector:E((e,t)=>t?.class?.defaultRenderer!==`dagre-wrapper`&&/^\s*classDiagram/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./classDiagram-UCXUAZDN-CzzXamfC.js`);return{diagram:e}},__vite__mapDeps([53,1,2,3,4,10,11,5,6,12,13,14,15,16,17,18,7,19,20,54,22]));return{id:ht,diagram:e}},`loader`)},_t=`classDiagram`,vt={id:_t,detector:E((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./classDiagram-v2-3IH6NYTM-CzzXamfC.js`);return{diagram:e}},__vite__mapDeps([55,1,2,3,4,10,11,5,6,12,13,14,15,16,17,18,7,19,20,54,22]));return{id:_t,diagram:e}},`loader`)},yt=`state`,bt={id:yt,detector:E((e,t)=>t?.state?.defaultRenderer!==`dagre-wrapper`&&/^\s*stateDiagram/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./stateDiagram-EYHZ2SRL-Bet3Zm5V.js`);return{diagram:e}},__vite__mapDeps([56,1,2,3,4,10,11,5,6,12,13,14,15,16,17,18,57,7,19,20,58,59]));return{id:yt,diagram:e}},`loader`)},xt=`stateDiagram`,St={id:xt,detector:E((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./stateDiagram-v2-5MG54T2I-UdwpDpjp.js`);return{diagram:e}},__vite__mapDeps([60,1,2,3,4,10,11,5,6,12,13,14,15,16,17,18,7,19,20,59]));return{id:xt,diagram:e}},`loader`)},Ct=`journey`,wt={id:Ct,detector:E(e=>/^\s*journey/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./journeyDiagram-IW7LBXVP-CENhJOQU.js`);return{diagram:e}},__vite__mapDeps([61,1,2,3,4,5,22,7]));return{id:Ct,diagram:e}},`loader`)},Tt={draw:E((e,t,n)=>{O.debug(`rendering svg for syntax error +`);let r=ke(t),i=r.append(`g`);r.attr(`viewBox`,`0 0 2412 512`),_e(r,100,512,!0),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},Et=Tt,Dt={db:{},renderer:Tt,parser:{parse:E(()=>{},`parse`)}},Ot=`flowchart-elk`,kt={id:Ot,detector:E((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./flowDiagram-JEP3DFND-BSFjwP7W.js`);return{diagram:e}},__vite__mapDeps([8,2,1,3,4,9,10,11,5,6,12,13,14,15,16,17,18,7,19,20,21,22]));return{id:Ot,diagram:e}},`loader`)},At=`timeline`,jt={id:At,detector:E(e=>/^\s*timeline/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./timeline-definition-XWTBQSRE-eRYZnOTU.js`);return{diagram:e}},__vite__mapDeps([62,1,2,3,4,47,5,6]));return{id:At,diagram:e}},`loader`)},Mt=`mindmap`,Nt={id:Mt,detector:E(e=>/^\s*mindmap/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./mindmap-definition-TMFK3LR3-Drt5x30g.js`);return{diagram:e}},__vite__mapDeps([63,1,2,3,4,10,11,5,6,12,13,14,15,16,17,18,19,20]));return{id:Mt,diagram:e}},`loader`)},Pt=`kanban`,Ft={id:Pt,detector:E(e=>/^\s*kanban/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./kanban-definition-PIMVIEU3-Dm_C0YEC.js`);return{diagram:e}},__vite__mapDeps([64,1,2,3,4,47,9,10,11,5,6,12,13,14,15,22]));return{id:Pt,diagram:e}},`loader`)},It=`sankey`,Lt={id:It,detector:E(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./sankeyDiagram-ZEB2SQIR-BYbqBT66.js`);return{diagram:e}},__vite__mapDeps([65,1,2,3,4]));return{id:It,diagram:e}},`loader`)},Rt=`packet`,zt={id:Rt,detector:E(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./diagram-QYPETOCO-DO5zo3se.js`);return{diagram:e}},__vite__mapDeps([66,1,2,3,4,47,5,6,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43]));return{id:Rt,diagram:e}},`loader`)},Bt=`radar`,Vt={id:Bt,detector:E(e=>/^\s*radar-beta/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./diagram-25E3JIVG-CF75TqMB.js`);return{diagram:e}},__vite__mapDeps([67,1,2,3,4,47,5,6,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43]));return{id:Bt,diagram:e}},`loader`)},Ht=`block`,Ut={id:Ht,detector:E(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./blockDiagram-XQ3M7VRV-BZEbDaJX.js`);return{diagram:e}},__vite__mapDeps([68,1,2,3,4,5,6,12,13,14,16,57,22]));return{id:Ht,diagram:e}},`loader`)},Wt=`treeView`,Gt={id:Wt,detector:E(e=>/^\s*treeView-beta/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./diagram-EDZXTW53-D3AUECSQ.js`);return{diagram:e}},__vite__mapDeps([69,1,2,3,4,47,5,6,13,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]));return{id:Wt,diagram:e}},`loader`)},Kt=`architecture`,qt={id:Kt,detector:E(e=>/^\s*architecture/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./architectureDiagram-M2JJTB3Y-BOf15hQi.js`);return{diagram:e}},__vite__mapDeps([70,1,2,3,4,47,5,6,13,14,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,71]));return{id:Kt,diagram:e}},`loader`)},Jt=`eventmodeling`,Yt={id:Jt,detector:E(e=>/^\s*eventmodeling/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./diagram-J7GERFIL-BzTqG1hX.js`);return{diagram:e}},__vite__mapDeps([72,1,2,3,4,5,6,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43]));return{id:Jt,diagram:e}},`loader`)},Xt=`ishikawa`,Zt={id:Xt,detector:E(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./ishikawaDiagram-4HUKQSDW-CwlIZKDp.js`);return{diagram:e}},__vite__mapDeps([73,1,2,3,4,47,10,5,6]));return{id:Xt,diagram:e}},`loader`)},Qt=`venn`,$t={id:Qt,detector:E(e=>/^\s*venn-beta/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./vennDiagram-GBZDLF5N-B1SVEUjn.js`);return{diagram:e}},__vite__mapDeps([74,1,2,3,4,47,10,5,6]));return{id:Qt,diagram:e}},`loader`)},en=`treemap`,tn={id:en,detector:E(e=>/^\s*treemap/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./diagram-YFGL7EOQ-KnZ9mrnO.js`);return{diagram:e}},__vite__mapDeps([75,1,2,3,4,47,11,5,6,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,20]));return{id:en,diagram:e}},`loader`)},nn=`wardley`,rn={id:nn,detector:E(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./wardleyDiagram-OEKRJB5D-BvVI10W5.js`);return{diagram:e}},__vite__mapDeps([76,1,2,3,4,47,5,6,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43]));return{id:nn,diagram:e}},`loader`)},an=`cynefin`,on={id:an,detector:E(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./cynefinDiagram-3PKP3OFC-BN65f1Gk.js`);return{diagram:e}},__vite__mapDeps([77,1,2,3,4,47,5,6,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43]));return{id:an,diagram:e}},`loader`)},sn=`railroad`,cn={id:sn,detector:E(e=>/^\s*railroad-beta/i.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./railroadDiagram-MV55M447-C4p67Sjt.js`);return{diagram:e}},__vite__mapDeps([78,1,2,3,4,47,79,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43]));return{id:sn,diagram:e}},`loader`)},ln=`railroadEbnf`,un={id:ln,detector:E(e=>/^\s*railroad-ebnf-beta/i.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./ebnfDiagram-M7IZRLZS-kvDdF9Z_.js`);return{diagram:e}},__vite__mapDeps([80,1,2,3,4,47,79,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43]));return{id:ln,diagram:e}},`loader`)},dn=`railroadAbnf`,fn={id:dn,detector:E(e=>/^\s*railroad-abnf-beta/i.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./abnfDiagram-UN2JCKJG-Bspp4CZN.js`);return{diagram:e}},__vite__mapDeps([81,1,2,3,4,47,79,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43]));return{id:dn,diagram:e}},`loader`)},pn=`railroadPeg`,mn={id:pn,detector:E(e=>/^\s*railroad-peg-beta/i.test(e),`detector`),loader:E(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./pegDiagram-CCMLLSNW-CZgz04bV.js`);return{diagram:e}},__vite__mapDeps([82,1,2,3,4,47,79,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43]));return{id:pn,diagram:e}},`loader`)},hn=!1,M=E(()=>{hn||(hn=!0,le(`error`,Dt,e=>e.toLowerCase().trim()===`error`),le(`---`,{db:{clear:E(()=>{},`clear`)},styles:{},renderer:{draw:E(()=>{},`draw`)},parser:{parse:E(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:E(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),Oe(kt,Nt,qt),Oe(We,Ft,vt,gt,Qe,nt,it,ot,ft,mt,Xe,Je,Ke,jt,et,St,bt,wt,ct,Lt,zt,ut,Ut,Yt,Gt,Vt,Zt,tn,cn,un,fn,mn,$t,rn,on))},`addDiagrams`),gn=E(async()=>{O.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(he).map(async([e,{detector:t,loader:n}])=>{if(n)try{Ee(e)}catch{try{let{diagram:e,id:r}=await n();le(r,e,t)}catch(t){throw O.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete he[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){O.error(`Failed to load ${e.length} external diagrams`);for(let t of e)O.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),_n=`comm`,vn=`rule`,yn=`decl`,bn=`@media`,xn=`@import`,Sn=`@supports`,Cn=`@namespace`,wn=`@keyframes`,Tn=`@layer`,En=`@scope`,Dn=Math.abs,On=String.fromCharCode;function kn(e){return e.trim()}E(kn,`trim`);function N(e,t,n){return e.replace(t,n)}E(N,`replace`);function An(e,t,n){return e.indexOf(t,n)}E(An,`indexof`);function P(e,t){return e.charCodeAt(t)|0}E(P,`charat`);function F(e,t,n){return e.slice(t,n)}E(F,`substr`);function I(e){return e.length}E(I,`strlen`);function jn(e){return e.length}E(jn,`sizeof`);function L(e,t){return t.push(e),e}E(L,`append`);var Mn=1,R=1,Nn=0,z=0,B=0,V=``;function H(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Mn,column:R,length:o,return:``,siblings:s}}E(H,`node`);function Pn(){return B}E(Pn,`char`);function Fn(){return B=z>0?P(V,--z):0,R--,B===10&&(R=1,Mn--),B}E(Fn,`prev`);function U(){return B=z2||q(B)>3?``:` `}E(Rn,`whitespace`);function zn(e,t){for(;--t&&U()&&!(B<48||B>102||B>57&&B<65||B>70&&B<97););return K(e,G()+(t<6&&W()==32&&U()==32))}E(zn,`escaping`);function Y(e){for(;U();)switch(B){case e:return z;case 34:case 39:e!==34&&e!==39&&Y(B);break;case 40:e===41&&Y(e);break;case 92:U();break}return z}E(Y,`delimiter`);function Bn(e,t){for(;U()&&e+B!==57&&(e+B!==84||W()!==47););return`/*`+K(t,z-1)+`*`+On(e===47?e:U())}E(Bn,`commenter`);function Vn(e){for(;!q(W());)U();return K(e,z)}E(Vn,`identifier`);function Hn(e){return Ln(X(``,null,null,null,[``],e=In(e),0,[0],e))}E(Hn,`compile`);function X(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=U()){case 40:if(m!=108&&P(C,d-1)==58){An(C+=N(J(v),`&`,`&\f`),`&\f`,Dn(l?s[l-1]:0))!=-1&&(_=-1);break}case 34:case 39:case 91:C+=J(v);break;case 9:case 10:case 13:case 32:C+=Rn(m);break;case 92:C+=zn(G()-1,7);continue;case 47:switch(W()){case 42:case 47:L(Wn(Bn(U(),G()),t,n,c),c),(q(m||1)==5||q(W()||1)==5)&&I(C)&&F(C,-1,void 0)!==` `&&(C+=` `);break;default:C+=`/`}break;case 123*h:s[l++]=I(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=N(C,/\f/g,``)),p>0&&(I(C)-d||h===0&&m===47)&&L(p>32?Gn(C+`;`,r,n,d-1,c):Gn(N(C,` `,``)+`;`,r,n,d-2,c),c);break;case 59:C+=`;`;default:if(L(S=Un(C,t,n,l,u,i,s,y,b=[],x=[],d,a),a),v===123){if(u===0)X(C,t,S,S,b,a,d,s,x);else{switch(f){case 99:if(P(C,3)===110)break;case 108:if(P(C,2)===97)break;default:u=0;case 100:case 109:case 115:}u?X(e,S,S,r&&L(Un(e,S,S,0,0,i,s,y,i,b=[],d,x),x),i,x,d,s,r?b:x):X(C,S,S,S,[``],x,0,s,x)}}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+I(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&Fn()==125)continue}switch(C+=On(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(I(C)-1)*_,_=1;break;case 64:W()===45&&(C+=J(U())),f=W(),u=d=I(y=C+=Vn(G())),v++;break;case 45:m===45&&I(C)==2&&(h=0)}}return a}E(X,`parse`);function Un(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=jn(p),h=0,g=0,_=0;h0?p[v]+` `+y:N(y,/&\f/g,p[v])))&&(c[_++]=b);return H(e,t,n,i===0?vn:s,c,l,u,d)}E(Un,`ruleset`);function Wn(e,t,n,r){return H(e,t,n,_n,On(Pn()),F(e,2,-2),0,r)}E(Wn,`comment`);function Gn(e,t,n,r,i){return H(e,t,n,yn,F(e,0,r),F(e,r+1,-1),r,i)}E(Gn,`declaration`);function Z(e,t){for(var n=``,r=0;r{Qn.forEach(e=>{e()}),Qn=[]},`attachFunctions`),er=E(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,``).trimStart(),`cleanupComments`);function tr(e){let t=e.match(De);if(!t)return{text:e,metadata:{}};let n=t[1],r=n?t[2].split(` +`).map(e=>e.startsWith(n)?e.slice(n.length):e).join(` +`):t[2],i=Ae(r,{schema:je})??{};i=typeof i==`object`&&!Array.isArray(i)?i:{};let a={};return i.displayMode&&(a.displayMode=i.displayMode.toString()),i.title&&(a.title=i.title.toString()),i.config&&(a.config=i.config),{text:e.slice(t[0].length),metadata:a}}E(tr,`extractFrontMatter`);var nr=E(e=>e.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(e,t,n)=>`<`+t+n.replace(/="([^"]*)"/g,`='$1'`)+`>`),`cleanupText`),rr=E(e=>{let{text:t,metadata:n}=tr(e),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||={},a.gantt.displayMode=r),{title:i,config:a,text:t}},`processFrontmatter`),ir=E(e=>{let t=j.detectInit(e)??{},n=j.detectDirective(e,`wrap`);return Array.isArray(n)?t.wrap=n.some(({type:e})=>e===`wrap`):n?.type===`wrap`&&(t.wrap=!0),{text:Me(e),directive:t}},`processDirectives`);function ar(e){let t=rr(nr(e)),n=ir(t.text),r=Ne(t.config,n.directive);return e=er(n.text),{code:e,title:t.title,config:r}}E(ar,`preprocessDiagram`);function or(e){let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCodePoint(e)).join(``);return btoa(n)}E(or,`toBase64`);var sr=5e4,cr=`graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa`,lr=`sandbox`,ur=`loose`,dr=`http://www.w3.org/2000/svg`,fr=`http://www.w3.org/1999/xlink`,pr=`http://www.w3.org/1999/xhtml`,mr=`100%`,hr=`100%`,gr=`border:0;margin:0;`,_r=`margin:0`,vr=`allow-top-navigation-by-user-activation allow-popups`,yr=`The "iframe" tag is not supported by your browser.`,br=[`foreignobject`],xr=[`dominant-baseline`];function Sr(e){let t=ar(e);return A(),ve(t.config??{}),t}E(Sr,`processAndSetConfigs`);async function Cr(e,t){M();try{let{code:t,config:n}=Sr(e);return{diagramType:(await Fr(t)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}}E(Cr,`parse`);var wr=E((e,t,n=[])=>`.${e} ${t} ${de(`{ ${n.join(` !important; `)} !important; }`)}`,`cssImportantStyles`),Tr=E((e,t=new Map)=>{let n=new CSSStyleSheet;if(e.fontFamily!==void 0&&n.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,n.cssRules.length),e.altFontFamily!==void 0&&n.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,n.cssRules.length),t instanceof Map){let r=oe(e)?[`> *`,`span`]:[`rect`,`polygon`,`ellipse`,`circle`,`path`];t.forEach(e=>{Pe(e.styles)||r.forEach(t=>{n.insertRule(wr(e.id,t,e.styles),n.cssRules.length)}),Pe(e.textStyles)||n.insertRule(wr(e.id,`tspan`,(e?.textStyles||[]).map(e=>e.replace(`color`,`fill`))),n.cssRules.length)})}let r=``;if(e.themeCSS!==void 0){if(typeof n.replaceSync==`function`){let t=new CSSStyleSheet;t.replaceSync(e.themeCSS),r=we(t)+` +`}else r+=`${e.themeCSS} +`}return r+we(n)},`createCssStyles`),Er=E((e,t)=>Z(Hn(`${e}{${t}}`),qn([E(function(t,n,r,i){if(t.type===`rule`&&Array.isArray(t.props)){if(t.parent&&t.parent.type===wn)return;t.props=t.props.map(n=>n===e&&Array.isArray(t.children)&&t.children.every(e=>e.type===`decl`&&new Set([`font-family`,`font-size`,`fill`]).has(e.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else t.type.startsWith(`@`)&&([bn,Sn,Tn,En,`@container`,`@starting-style`,wn].includes(t.type)||(O.warn(`Removing unsupported at-rule ${t.type} from CSS`),t.type=_n))},`addNamespace`),Kn])),`compileCSS`),Dr=E((e,t,n,r)=>{let i=Tr(e,n);return Er(r,ye(t,i,{...e.themeVariables,theme:e.theme,look:e.look},r))},`createUserStyles`),Or=E((e=``,t,n)=>{let r=e;return!n&&!t&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,`marker-end="url(#`)),r=Fe(r),r=r.replace(/
    /g,`
    `),r},`cleanUpSvgCode`),kr=E((e=``,t)=>``,`putIntoIFrame`),Ar=E((e,t,n,r,i)=>{let a=e.append(`div`);a.attr(`id`,n),r&&a.attr(`style`,r);let o=a.append(`svg`).attr(`id`,t).attr(`width`,`100%`).attr(`xmlns`,dr);return i&&o.attr(`xmlns:xlink`,i),o.append(`g`),e},`appendDivSvgG`);function jr(e,t){return e.append(`iframe`).attr(`id`,t).attr(`style`,`width: 100%; height: 100%;`).attr(`sandbox`,``)}E(jr,`sandboxedIframe`);var Mr=E((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},`removeExistingElements`),Nr=E(async function(e,t,n){M();let r=Sr(t);t=r.code;let i=k();O.debug(i),t.length>(i?.maxTextSize??sr)&&(t=cr);let a=`#${e}`,o=`i`+e,s=`#`+o,c=`d`+e,l=`#`+c,u=E(()=>{let e=D(f?s:l).node();e&&`remove`in e&&e.remove()},`removeTempElements`),d=D(document.body),f=i.securityLevel===lr,p=i.securityLevel===ur,m=i.fontFamily;if(n!==void 0){if(n&&(n.innerHTML=``),f){let e=jr(D(n),o);d=D(e.nodes()[0].contentDocument.body),d.node().style.margin=`0`}else d=D(n);Ar(d,e,c,`font-family: ${m}`,fr)}else{if(Mr(document,e,c,o),f){let e=jr(D(document.body),o);d=D(e.nodes()[0].contentDocument.body),d.node().style.margin=`0`}else d=D(`body`);Ar(d,e,c)}let h,g;try{h=await Zn.fromText(t,{title:r.title})}catch(e){if(i.suppressErrorRendering)throw u(),e;h=await Zn.fromText(`error`),g=e}let _=d.select(l).node(),v=h.type,y=_.firstChild,b=y.firstChild,x=h.renderer.getClasses?.(t,h),S=Dr(i,v,x,a),C=document.createElement(`style`);C.innerHTML=S,y.insertBefore(C,b);try{await h.renderer.draw(t,e,`11.16.1`,h)}catch(n){throw i.suppressErrorRendering?u():Et.draw(t,e,`11.16.1`),n}let w=d.select(`${l} svg`),ee=h.db.getAccTitle?.(),te=h.db.getAccDescription?.();Ir(v,w,ee,te),d.select(`[id="${e}"]`).selectAll(`foreignobject > *`).attr(`xmlns`,pr);let T=d.select(l).node().innerHTML;if(O.debug(`config.arrowMarkerAbsolute`,i.arrowMarkerAbsolute),T=Or(T,f,Te(i.arrowMarkerAbsolute)),f){let e=d.select(l+` svg`).node();T=kr(T,e)}else p||(T=se.sanitize(T,{ADD_TAGS:br,ADD_ATTR:xr,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if($n(),g)throw g;return u(),{diagramType:v,svg:T,bindFunctions:h.db.bindFunctions}},`render`);function Pr(e={}){let t=xe({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||={},t.themeVariables.fontFamily=t.fontFamily),be(t),t?.theme&&t.theme in Se?t.themeVariables=Se[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Se.default.getThemeVariables(t.themeVariables));let n=typeof t==`object`?ae(t):ce();ie(n.logLevel),M()}E(Pr,`initialize`);var Fr=E((e,t={})=>{let{code:n}=ar(e);return Zn.fromText(n,t)},`getDiagramFromText`);function Ir(e,t,n,r){Yn(t,e),Xn(t,n,r,t.attr(`id`))}E(Ir,`addA11yInfo`);var Q=Object.freeze({render:Nr,parse:Cr,getDiagramFromText:Fr,initialize:Pr,getConfig:k,setConfig:fe,getSiteConfig:ce,updateSiteConfig:pe,reset:E(()=>{A()},`reset`),globalReset:E(()=>{A(me)},`globalReset`),defaultConfig:me});ie(k().logLevel),A(k());var Lr=E((e,t,n)=>{O.warn(e),Ie(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},`handleError`),Rr=E(async function(e={querySelector:`.mermaid`}){try{await zr(e)}catch(t){if(Ie(t)&&O.error(t.str),$.parseError&&$.parseError(t),!e.suppressErrors)throw O.error(`Use the suppressErrors option to suppress these errors`),t}},`run`),zr=E(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:`.mermaid`}){let r=Q.getConfig();O.debug(`${e?``:`No `}Callback function found`);let i;if(n)i=n;else if(t)i=document.querySelectorAll(t);else throw Error(`Nodes and querySelector are both undefined`);O.debug(`Found ${i.length} diagrams`),r?.startOnLoad!==void 0&&(O.debug(`Start On Load: `+r?.startOnLoad),Q.updateSiteConfig({startOnLoad:r?.startOnLoad}));let a=new j.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed),o,s=[];for(let t of Array.from(i)){if(O.info(`Rendering diagram: `+t.id),t.getAttribute(`data-processed`))continue;t.setAttribute(`data-processed`,`true`);let n=`mermaid-${a.next()}`;o=t.innerHTML,o=ze(j.entityDecode(o)).trim().replace(//gi,`
    `);let r=j.detectInit(o);r&&O.debug(`Detected early reinit: `,r);try{let{svg:r,bindFunctions:i}=await Yr(n,o,t);t.innerHTML=r,e&&await e(n),i&&i(t)}catch(e){Lr(e,s,$.parseError)}}if(s.length>0)throw s[0]},`runThrowsErrors`),Br=E(function(e){Q.initialize(e)},`initialize`),Vr=E(async function(e,t,n){O.warn(`mermaid.init is deprecated. Please use run instead.`),e&&Br(e);let r={postRenderCallback:n,querySelector:`.mermaid`};typeof t==`string`?r.querySelector=t:t&&(r.nodes=t instanceof HTMLElement?[t]:t),await Rr(r)},`init`),Hr=E(async(e,{lazyLoad:t=!0}={})=>{M(),Oe(...e),t===!1&&await gn()},`registerExternalDiagrams`),Ur=E(function(){if($.startOnLoad){let{startOnLoad:e}=Q.getConfig();e&&$.run().catch(e=>O.error(`Mermaid failed to initialize`,e))}},`contentLoaded`);typeof document<`u`&&window.addEventListener(`load`,Ur,!1);var Wr=E(function(e){$.parseError=e},`setParseErrorHandler`),Gr=[],Kr=!1,qr=E(async()=>{if(!Kr){for(Kr=!0;Gr.length>0;){let e=Gr.shift();if(e)try{await e()}catch(e){O.error(`Error executing queue`,e)}}Kr=!1}},`executeQueue`),Jr=E(async(e,t)=>new Promise((n,r)=>{let i=E(()=>new Promise((i,a)=>{Q.parse(e,t).then(e=>{i(e),n(e)},e=>{O.error(`Error parsing`,e),$.parseError?.(e),a(e),r(e)})}),`performCall`);Gr.push(i),qr().catch(r)}),`parse`),Yr=E((e,t,n)=>new Promise((r,i)=>{let a=E(()=>new Promise((a,o)=>{Q.render(e,t,n).then(e=>{a(e),r(e)},e=>{O.error(`Error parsing`,e),$.parseError?.(e),o(e),i(e)})}),`performCall`);Gr.push(a),qr().catch(i)}),`render`),$={startOnLoad:!0,mermaidAPI:Q,parse:Jr,render:Yr,init:Vr,run:Rr,registerExternalDiagrams:Hr,registerLayoutLoaders:Be,initialize:Br,parseError:void 0,contentLoaded:Ur,setParseErrorHandler:Wr,detectType:ge,registerIconPacks:Re,getRegisteredDiagramsMetadata:E(()=>Object.keys(he).map(e=>({id:e})),`getRegisteredDiagramsMetadata`)},Xr=$,Zr=Object.assign({}),Qr=Object.assign({}),$r=Object.assign({}),ei=[Object.values(Zr)[0],Object.values(Qr)[0],Object.values($r)[0]].filter(Boolean),ti=Object.assign({}),ni=Object.assign({}),ri=Object.assign({}),ii=[Object.values(ti)[0],Object.values(ni)[0],Object.values(ri)[0]].filter(Boolean),ai=S(async()=>{let e={theme:`default`};for(let t of ii)Object.assign(e,await t());return e});Xr.startOnLoad=!1,Xr.initialize({startOnLoad:!1});var oi=new Map,si;async function ci(e,t){si??=document.getElementById(`mermaid-rendering-container`);let n=e+JSON.stringify(t),r=oi.get(n);if(r)return r;let i=He.default.decompressFromBase64(e);for(let e of ei){let r=await e();if(r){let e=await r(i,t);return oi.set(n,e),e}}Xr.initialize({startOnLoad:!1,...C(await ai()||{}),...C(t)});let a=ne(),{svg:o}=await Xr.render(a,i,si);return oi.set(n,o),o}var li={key:0,border:`1 red rounded`,class:`pa-3 text-wrap`},ui=d({__name:`Mermaid`,props:{codeLz:{},scale:{},theme:{}},setup(e){let t=e,r=o(),a=h(),s=h(null),c=h(``);l(async e=>{let n=!1;e(()=>{n=!0}),s.value=null;try{let e=await ci(t.codeLz||``,{theme:t.theme||(T.value?`dark`:void 0),...r.attrs});n||(c.value=e)}catch(e){s.value=`${e}`,console.warn(e)}});let u=h();return f(c,()=>{u.value=void 0}),l(()=>{let e=a.value?.children?.[0];if(e&&e.hasAttribute(`viewBox`)&&u.value==null){let t=Number.parseFloat(e.getAttribute(`viewBox`)?.split(` `)[3]||``);u.value=Number.isNaN(t)?void 0:t}},{flush:`post`}),l(()=>{let e=a.value?.children?.[0];e!=null&&t.scale!=null&&u.value!=null&&(e.setAttribute(`height`,`${u.value*t.scale}`),e.removeAttribute(`width`),e.removeAttribute(`style`))},{flush:`post`}),(e,t)=>s.value?(n(),m(`pre`,li,i(s.value),1)):(n(),y(Ve,{key:1,class:`mermaid`,"inner-html":c.value,onShadow:t[0]||=e=>a.value=e},null,8,[`inner-html`]))}}),di={class:`mt-6 dl-callout`},fi={__name:`slides.md__slidev_25`,setup(e){let{$slidev:t,$nav:i,$clicksContext:o,$clicks:l,$page:d,$renderContext:f,$frontmatter:h}=ee();return o.setup(),(e,t)=>{let i=ui,o=s(`click`);return n(),y(re,b(a(x(te)(x(h),24))),{default:g(()=>[t[1]||=p(`h1`,null,`The main pipeline`,-1),r(i,c({scale:.82},{"code-lz":`GYGw9g7gxgFghgJwC4AIAyAlAUClBBAbQGEwQQBTKJASwDsBzFAEziTgF0UBaLgPhQBCBPLVpg2NBs1ZwAPACMEAel4BXAM51G5AB4AHcsnXscg7nxRFhevSACeWlAFs4sOuQXLeFRLUdPyJBgwJmNTInN+ABECADE6OBAUPQQQ1SpPFThaJhQADTwASRNcdSQ7CksUYGoyAC4AYgAGJoBOAHY4doAaMtSAa3JGlvam9qhuqFIwBEbgeaA==`}),null,16),v((n(),m(`div`,di,[...t[0]||=[p(`strong`,null,`We learn this step.`,-1),u(` The other three are where most of the real effort goes — and the reason a good dataset is worth more than a clever model. `,-1)]])),[[o]])]),_:1},16)}}};export{fi as default}; \ No newline at end of file diff --git a/lecture-01/assets/mindmap-definition-TMFK3LR3-Drt5x30g.js b/lecture-01/assets/mindmap-definition-TMFK3LR3-Drt5x30g.js new file mode 100644 index 0000000000000000000000000000000000000000..ceb74517df26ef5b873595ab218a0771a08342ee --- /dev/null +++ b/lecture-01/assets/mindmap-definition-TMFK3LR3-Drt5x30g.js @@ -0,0 +1,96 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as t}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as n,G as r,N as i,P as a,S as o,d as s,j as c,m as l}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-PLCLPJVV-BfMyJHbe.js";import"./chunk-XXV7AQMY-qeLKYxsH.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import"./chunk-OX6ZKUVE-roiHi12N.js";import"./chunk-YV36FAQU-CkTVkoM6.js";import"./chunk-AQ2D6KKF-AxjphkEe.js";import"./chunk-2V3FENDJ-B1mkZICr.js";import"./chunk-DKH7L6O3-pKUB4f-O.js";import"./chunk-RTI7CJYH-CrTK6TD7.js";import"./chunk-MPM6TOF7-5cxd71sq.js";import{r as u,t as d}from"./chunk-STSWKLMO-1NGmNrHs.js";import{t as f}from"./chunk-HPLX5OYV-zid2YVw5.js";import{t as p}from"./chunk-BYAF6FXG-DqiL_6qO.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,6,13,15,16,19,22],h=[1,33],g=[1,34],_=[1,6,7,11,13,15,16,19,22],v={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`MINDMAP`,11:`EOF`,13:`SPACELIST`,15:`ICON`,16:`CLASS`,19:`NODE_DSTART`,20:`NODE_DESCR`,21:`NODE_DEND`,22:`NODE_ID`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 16:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 17:case 21:r.decorateNode({class:a[s]});break;case 18:r.getLogger().trace(`SPACELIST`);break;case 19:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 20:r.decorateNode({icon:a[s]});break;case 25:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 26:this.$={id:a[s],descr:a[s],type:r.nodeType.DEFAULT};break;case 27:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])}}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:r,9:22,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:u,7:d,10:23,11:f},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:c}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:d,10:32,11:f},{1:[2,7],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},t(m,[2,14],{7:h,11:g}),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(m,[2,13],{7:h,11:g}),t(_,[2,11]),t(_,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};v.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return e.getLogger().trace(`Found comment`,t.yytext),6;case 1:return 8;case 2:this.begin(`CLASS`);break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:e.getLogger().trace(`Begin icon`),this.begin(`ICON`);break;case 6:return e.getLogger().trace(`SPACELINE`),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace(`end icon`),this.popState();break;case 10:return e.getLogger().trace(`Exploding node`),this.begin(`NODE`),19;case 11:return e.getLogger().trace(`Cloud`),this.begin(`NODE`),19;case 12:return e.getLogger().trace(`Explosion Bang`),this.begin(`NODE`),19;case 13:return e.getLogger().trace(`Cloud Bang`),this.begin(`NODE`),19;case 14:return this.begin(`NODE`),19;case 15:return this.begin(`NODE`),19;case 16:return this.begin(`NODE`),19;case 17:return this.begin(`NODE`),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin(`NSTR2`);break;case 22:return`NODE_DESCR`;case 23:this.popState();break;case 24:e.getLogger().trace(`Starting NSTR`),this.begin(`NSTR`);break;case 25:return e.getLogger().trace(`description:`,t.yytext),`NODE_DESCR`;case 26:this.popState();break;case 27:return this.popState(),e.getLogger().trace(`node end ))`),`NODE_DEND`;case 28:return this.popState(),e.getLogger().trace(`node end )`),`NODE_DEND`;case 29:return this.popState(),e.getLogger().trace(`node end ...`,t.yytext),`NODE_DEND`;case 30:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 31:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 32:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 33:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 34:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 35:return e.getLogger().trace(`Long description:`,t.yytext),20;case 36:return e.getLogger().trace(`Long description:`,t.yytext),20}},`anonymous`),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}})();function y(){this.yy={}}return e(y,`Parser`),y.prototype=v,v.Parser=y,new y})();m.parser=m;var h=m,g=[];for(let e=0;e<256;++e)g.push((e+256).toString(16).slice(1));function _(e,t=0){return(g[e[t+0]]+g[e[t+1]]+g[e[t+2]]+g[e[t+3]]+`-`+g[e[t+4]]+g[e[t+5]]+`-`+g[e[t+6]]+g[e[t+7]]+`-`+g[e[t+8]]+g[e[t+9]]+`-`+g[e[t+10]]+g[e[t+11]]+g[e[t+12]]+g[e[t+13]]+g[e[t+14]]+g[e[t+15]]).toLowerCase()}e(_,`unsafeStringify`);var v=new Uint8Array(16);function y(){return crypto.getRandomValues(v)}e(y,`rng`);function b(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():x(e,t,n)}e(b,`v4`);function x(e,t,n){e||={};let r=e.random??e.rng?.()??y();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return _(r)}e(x,`_v4`);var S=b,C=12,w={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},T=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=w,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{e(this,`MindmapDB`)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let t=this.nodes.length-1;t>=0;t--)if(this.nodes[t].level0?this.nodes[0]:null}addNode(e,i,a,o){t.info(`addNode`,e,i,a,o);let s=!1;this.nodes.length===0?(this.baseLevel=e,e=0,s=!0):this.baseLevel!==void 0&&(e-=this.baseLevel,s=!1);let c=n(),u=c.mindmap?.padding??l.mindmap.padding;switch(o){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:u*=2}let d={id:this.count++,nodeId:r(i,c),level:e,descr:r(a,c),type:o,children:[],width:c.mindmap?.maxNodeWidth??l.mindmap.maxNodeWidth,padding:u,isRoot:s},f=this.getParent(e);if(f)f.children.push(d),this.nodes.push(d);else if(s)this.nodes.push(d);else throw Error(`There can be only one root. No parent could be found for ("${d.descr}")`)}getType(e,n){switch(t.debug(`In get type`,e,n),e){case`[`:return this.nodeType.RECT;case`(`:return n===`)`?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case`((`:return this.nodeType.CIRCLE;case`)`:return this.nodeType.CLOUD;case`))`:return this.nodeType.BANG;case`{{`:return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let t=n(),i=this.nodes[this.nodes.length-1];e.icon&&(i.icon=r(e.icon,t)),e.class&&(i.class=r(e.class,t))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return`no-border`;case this.nodeType.RECT:return`rect`;case this.nodeType.ROUNDED_RECT:return`rounded-rect`;case this.nodeType.CIRCLE:return`circle`;case this.nodeType.CLOUD:return`cloud`;case this.nodeType.BANG:return`bang`;case this.nodeType.HEXAGON:return`hexgon`;default:return`no-border`}}assignSections(e,t){if(e.section=e.level===0?void 0:t,e.children)for(let[n,r]of e.children.entries()){let i=e.level===0?n%(C-1):t;this.assignSections(r,i)}}flattenNodes(t,r){let i=n(),a=[`mindmap-node`];t.isRoot===!0?a.push(`section-root`,`section--1`):t.section!==void 0&&a.push(`section-${t.section}`),t.class&&a.push(t.class);let o=a.join(` `),s=e(e=>{let t=(i.theme?.toLowerCase()??``).includes(`redux`);switch(e){case w.CIRCLE:return`mindmapCircle`;case w.RECT:return`rect`;case w.ROUNDED_RECT:return`rounded`;case w.CLOUD:return`cloud`;case w.BANG:return`bang`;case w.HEXAGON:return`hexagon`;case w.DEFAULT:return t?`rounded`:`defaultMindmapNode`;case w.NO_BORDER:default:return`rect`}},`getShapeFromType`),c={id:t.id.toString(),domId:`node_`+t.id.toString(),label:t.descr,labelType:`markdown`,isGroup:!1,shape:s(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:o,cssStyles:[],look:i.look,icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(r.push(c),t.children)for(let e of t.children)this.flattenNodes(e,r)}generateEdges(e,t){if(!e.children)return;let r=n();for(let n of e.children){let i=`edge`;n.section!==void 0&&(i+=` section-edge-${n.section}`);let a=e.level+1;i+=` edge-depth-${a}`;let o={id:`edge_${e.id}_${n.id}`,start:e.id.toString(),end:n.id.toString(),type:`normal`,curve:`basis`,thickness:`normal`,look:r.look,classes:i,depth:e.level,section:n.section};t.push(o),this.generateEdges(n,t)}}getData(){let e=this.getMindmap(),r=n(),i=c().layout!==void 0,a=r;if(i||(a.layout=`cose-bilkent`),!e)return{nodes:[],edges:[],config:a};t.debug(`getData: mindmapRoot`,e,r),this.assignSections(e);let o=[],s=[];this.flattenNodes(e,o),this.generateEdges(e,s),t.debug(`getData: processed ${o.length} nodes and ${s.length} edges`);let l=new Map;for(let e of o)l.set(e.id,{shape:e.shape,width:e.width,height:e.height,padding:e.padding});return{nodes:o,edges:s,config:a,rootNode:e,markers:[`point`],direction:`TB`,nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(l),type:`mindmap`,diagramId:`mindmap-`+S()}}getLogger(){return t}},E={draw:e(async(e,n,r,i)=>{t.debug(`Rendering mindmap diagram +`+e);let a=i.db,s=a.getData(),c=f(n,s.config.securityLevel);if(s.type=i.type,s.layoutAlgorithm=d(s.config.layout,{fallback:`cose-bilkent`}),s.diagramId=n,!a.getMindmap())return;s.nodes.forEach(e=>{e.shape===`rounded`?(e.radius=15,e.taper=15,e.stroke=`none`,e.width=0,e.padding=15):e.shape===`circle`?e.padding=10:e.shape===`rect`?(e.width=0,e.padding=10):e.shape===`hexagon`&&(e.width=0,e.height=0)}),await u(s,c);let{themeVariables:m}=o(),{useGradient:h,gradientStart:g,gradientStop:_}=m;if(h&&g&&_){let e=c.attr(`id`),t=c.append(`defs`).append(`linearGradient`).attr(`id`,`${e}-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);t.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,g).attr(`stop-opacity`,1),t.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,_).attr(`stop-opacity`,1)}p(c,s.config.mindmap?.padding??l.mindmap.padding,`mindmapDiagram`,s.config.mindmap?.useMaxWidth??l.mindmap.useMaxWidth)},`draw`)},D=e(e=>{let{theme:t,look:n}=e,r=``;for(let t=0;t{let r=``;for(let i=0;i{let{theme:t}=e,n=e.svgId,r=e.dropShadow?e.dropShadow.replace(`url(#drop-shadow)`,`url(${n}-drop-shadow)`):`none`;return` + .edge { + stroke-width: 3; + } + ${D(e)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${e.git0}; + } + .section-root text { + fill: ${e.gitBranchLabel0}; + } + .section-root span { + color: ${t?.includes(`redux`)?e.nodeBorder:e.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .mindmap-node-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } + [data-look="neo"].mindmap-node { + filter: ${r}; + } + [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon { + fill: ${t?.includes(`redux`)?e.mainBkg:e.git0}; + } + [data-look="neo"].mindmap-node.section-root .text-inner-tspan { + fill: ${t?.includes(`redux`)?e.nodeBorder:e[`cScaleLabel`+ +(t===`neutral`)]}; + } + ${e.useGradient&&n&&e.mainBkg?O(e.THEME_COLOR_LIMIT,n,e.mainBkg):``} +`},`getStyles`)};export{k as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/modules/shiki-CJZsCeMT.js b/lecture-01/assets/modules/shiki-CJZsCeMT.js new file mode 100644 index 0000000000000000000000000000000000000000..d8f6c66b34bb5820bf9f30abd42969dd072cc11e --- /dev/null +++ b/lecture-01/assets/modules/shiki-CJZsCeMT.js @@ -0,0 +1,10 @@ +import{n as e}from"../rolldown-runtime-hePW80VL.js";function t(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var n={},r=[],i=()=>{},a=()=>!1,o=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),s=e=>e.startsWith(`onUpdate:`),c=Object.assign,l=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,d=(e,t)=>u.call(e,t),f=Array.isArray,p=e=>C(e)===`[object Map]`,m=e=>C(e)===`[object Set]`,h=e=>C(e)===`[object Date]`,g=e=>C(e)===`[object RegExp]`,_=e=>typeof e==`function`,v=e=>typeof e==`string`,y=e=>typeof e==`symbol`,b=e=>typeof e==`object`&&!!e,x=e=>(b(e)||_(e))&&_(e.then)&&_(e.catch),S=Object.prototype.toString,C=e=>S.call(e),w=e=>C(e).slice(8,-1),T=e=>C(e)===`[object Object]`,E=e=>v(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,D=t(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),ee=t(`bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo`),te=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},O=/-\w/g,k=te(e=>e.replace(O,e=>e.slice(1).toUpperCase())),ne=/\B([A-Z])/g,A=te(e=>e.replace(ne,`-$1`).toLowerCase()),re=te(e=>e.charAt(0).toUpperCase()+e.slice(1)),j=te(e=>e?`on${re(e)}`:``),M=(e,t)=>!Object.is(e,t),ie=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},oe=e=>{let t=parseFloat(e);return isNaN(t)?e:t},se=e=>{let t=v(e)?Number(e):NaN;return isNaN(t)?e:t},ce,le=()=>ce||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ue(e,t){return e+JSON.stringify(t,(e,t)=>typeof t==`function`?t.toString():t)}var de=t(`Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol`);function fe(e){if(f(e)){let t={};for(let n=0;n{if(e){let n=e.split(me);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function _e(e){let t=``;if(v(e))t=e;else if(f(e))for(let n=0;nje(e,t))}var Ne=e=>!!(e&&e.__v_isRef===!0),Pe=e=>v(e)?e:e==null?``:f(e)||b(e)&&(e.toString===S||!_(e.toString))?Ne(e)?Pe(e.value):JSON.stringify(e,Fe,2):String(e),Fe=(e,t)=>Ne(t)?Fe(e,t.value):p(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Ie(t,r)+` =>`]=n,e),{})}:m(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Ie(e))}:y(t)?Ie(t):b(t)&&!f(t)&&!T(t)?String(t):t,Ie=(e,t=``)=>y(e)?`Symbol(${e.description??t})`:e;function Le(e){return e==null?`initial`:typeof e==`string`?e===``?` `:e:String(e)}var N,Re=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&N&&(N.active?(this.parent=N,this.index=(N.scopes||(N.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e0&&--this._on===0){if(N===this)N=this.prevScope;else{let e=N;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Ke){let e=Ke;for(Ke=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Ge;){let t=Ge;for(Ge=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Xe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ze(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),et(r),tt(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Qe(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&($e(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function $e(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===lt)||(e.globalVersion=lt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Qe(e))))return;e.flags|=2;let t=e.dep,n=P,r=it;P=e,it=!0;try{Xe(e);let n=e.fn(e._value);(t.version===0||M(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{P=n,it=r,Ze(e),e.flags&=-3}}function et(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)et(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function tt(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function nt(e,t){e.effect instanceof Ue&&(e=e.effect.fn);let n=new Ue(e);t&&c(n,t);try{n.run()}catch(e){throw n.stop(),e}let r=n.run.bind(n);return r.effect=n,r}function rt(e){e.effect.stop()}var it=!0,at=[];function ot(){at.push(it),it=!1}function st(){let e=at.pop();it=e===void 0||e}function ct(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=P;P=void 0;try{t()}finally{P=e}}}var lt=0,ut=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},dt=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!P||!it||P===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==P)t=this.activeLink=new ut(P,this),P.deps?(t.prevDep=P.depsTail,P.depsTail.nextDep=t,P.depsTail=t):P.deps=P.depsTail=t,ft(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=P.depsTail,t.nextDep=void 0,P.depsTail.nextDep=t,P.depsTail=t,P.deps===t&&(P.deps=e)}return t}trigger(e){this.version++,lt++,this.notify(e)}notify(e){Je();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ye()}}};function ft(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)ft(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var pt=new WeakMap,mt=Symbol(``),ht=Symbol(``),gt=Symbol(``);function _t(e,t,n){if(it&&P){let t=pt.get(e);t||pt.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new dt),r.map=t,r.key=n),r.track()}}function vt(e,t,n,r,i,a){let o=pt.get(e);if(!o){lt++;return}let s=e=>{e&&e.trigger()};if(Je(),t===`clear`)o.forEach(s);else{let i=f(e),a=i&&E(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===gt||!y(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(gt)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(mt)),p(e)&&s(o.get(ht)));break;case`delete`:i||(s(o.get(mt)),p(e)&&s(o.get(ht)));break;case`set`:p(e)&&s(o.get(mt))}}Ye()}function yt(e,t){let n=pt.get(e);return n&&n.get(t)}function bt(e){let t=F(e);return t===e?t:(_t(t,`iterate`,gt),ln(e)?t:t.map(fn))}function xt(e){return _t(e=F(e),`iterate`,gt),e}function St(e,t){return cn(e)?pn(sn(e)?fn(t):t):fn(t)}var Ct={__proto__:null,[Symbol.iterator](){return wt(this,Symbol.iterator,e=>St(this,e))},concat(...e){return bt(this).concat(...e.map(e=>f(e)?bt(e):e))},entries(){return wt(this,`entries`,e=>(e[1]=St(this,e[1]),e))},every(e,t){return Et(this,`every`,e,t,void 0,arguments)},filter(e,t){return Et(this,`filter`,e,t,e=>e.map(e=>St(this,e)),arguments)},find(e,t){return Et(this,`find`,e,t,e=>St(this,e),arguments)},findIndex(e,t){return Et(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return Et(this,`findLast`,e,t,e=>St(this,e),arguments)},findLastIndex(e,t){return Et(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return Et(this,`forEach`,e,t,void 0,arguments)},includes(...e){return Ot(this,`includes`,e)},indexOf(...e){return Ot(this,`indexOf`,e)},join(e){return bt(this).join(e)},lastIndexOf(...e){return Ot(this,`lastIndexOf`,e)},map(e,t){return Et(this,`map`,e,t,void 0,arguments)},pop(){return kt(this,`pop`)},push(...e){return kt(this,`push`,e)},reduce(e,...t){return Dt(this,`reduce`,e,t)},reduceRight(e,...t){return Dt(this,`reduceRight`,e,t)},shift(){return kt(this,`shift`)},some(e,t){return Et(this,`some`,e,t,void 0,arguments)},splice(...e){return kt(this,`splice`,e)},toReversed(){return bt(this).toReversed()},toSorted(e){return bt(this).toSorted(e)},toSpliced(...e){return bt(this).toSpliced(...e)},unshift(...e){return kt(this,`unshift`,e)},values(){return wt(this,`values`,e=>St(this,e))}};function wt(e,t,n){let r=xt(e),i=r[t]();return r!==e&&!ln(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var Tt=Array.prototype;function Et(e,t,n,r,i,a){let o=xt(e),s=o!==e&&!ln(e),c=o[t];if(c!==Tt[t]){let t=c.apply(e,a);return s?fn(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,St(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function Dt(e,t,n,r){let i=xt(e),a=i!==e&&!ln(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=St(e,t)),n.call(this,t,St(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?St(e,c):c}function Ot(e,t,n){let r=F(e);_t(r,`iterate`,gt);let i=r[t](...n);return(i===-1||i===!1)&&un(n[0])?(n[0]=F(n[0]),r[t](...n)):i}function kt(e,t,n=[]){ot(),Je();let r=F(e)[t].apply(e,n);return Ye(),st(),r}var At=t(`__proto__,__v_isRef,__isVue`),jt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(y));function Mt(e){y(e)||(e=String(e));let t=F(this);return _t(t,`has`,e),t.hasOwnProperty(e)}var Nt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?$t:Qt:i?Zt:Xt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=f(e);if(!r){let e;if(a&&(e=Ct[t]))return e;if(t===`hasOwnProperty`)return Mt}let o=Reflect.get(e,t,I(e)?e:n);if((y(t)?jt.has(t):At(t))||(r||_t(e,`get`,t),i))return o;if(I(o)){let e=a&&E(t)?o:o.value;return r&&b(e)?rn(e):e}return b(o)?r?rn(o):tn(o):o}},Pt=class extends Nt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=f(e)&&E(t);if(!this._isShallow){let e=cn(i);if(!ln(n)&&!cn(n)&&(i=F(i),n=F(n)),!a&&I(i)&&!I(n))return e||(i.value=n),!0}let o=a?Number(t)e,Vt=e=>Reflect.getPrototypeOf(e);function Ht(e,t,n){return function(...r){let i=this.__v_raw,a=F(i),o=p(a),s=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?Bt:t?pn:fn;return!t&&_t(a,`iterate`,l?ht:mt),c(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:s?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function Ut(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Wt(e,t){let n={get(n){let r=this.__v_raw,i=F(r),a=F(n);e||(M(n,a)&&_t(i,`get`,n),_t(i,`get`,a));let{has:o}=Vt(i),s=t?Bt:e?pn:fn;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&_t(F(t),`iterate`,mt),t.size},has(t){let n=this.__v_raw,r=F(n),i=F(t);return e||(M(t,i)&&_t(r,`has`,t),_t(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=F(a),s=t?Bt:e?pn:fn;return!e&&_t(o,`iterate`,mt),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return c(n,e?{add:Ut(`add`),set:Ut(`set`),delete:Ut(`delete`),clear:Ut(`clear`)}:{add(e){let n=F(this),r=Vt(n),i=F(e),a=!t&&!ln(e)&&!cn(e)?i:e;return r.has.call(n,a)||M(e,a)&&r.has.call(n,e)||M(i,a)&&r.has.call(n,i)||(n.add(a),vt(n,`add`,a,a)),this},set(e,n){!t&&!ln(n)&&!cn(n)&&(n=F(n));let r=F(this),{has:i,get:a}=Vt(r),o=i.call(r,e);o||=(e=F(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?M(n,s)&&vt(r,`set`,e,n,s):vt(r,`add`,e,n),this},delete(e){let t=F(this),{has:n,get:r}=Vt(t),i=n.call(t,e);i||=(e=F(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&vt(t,`delete`,e,void 0,a),o},clear(){let e=F(this),t=e.size!==0,n=e.clear();return t&&vt(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Ht(r,e,t)}),n}function Gt(e,t){let n=Wt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(d(n,r)&&r in t?n:t,r,i)}var Kt={get:Gt(!1,!1)},qt={get:Gt(!1,!0)},Jt={get:Gt(!0,!1)},Yt={get:Gt(!0,!0)},Xt=new WeakMap,Zt=new WeakMap,Qt=new WeakMap,$t=new WeakMap;function en(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function tn(e){return cn(e)?e:on(e,!1,It,Kt,Xt)}function nn(e){return on(e,!1,Rt,qt,Zt)}function rn(e){return on(e,!0,Lt,Jt,Qt)}function an(e){return on(e,!0,zt,Yt,$t)}function on(e,t,n,r,i){if(!b(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=en(w(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function sn(e){return cn(e)?sn(e.__v_raw):!!(e&&e.__v_isReactive)}function cn(e){return!!(e&&e.__v_isReadonly)}function ln(e){return!!(e&&e.__v_isShallow)}function un(e){return e?!!e.__v_raw:!1}function F(e){let t=e&&e.__v_raw;return t?F(t):e}function dn(e){return!d(e,`__v_skip`)&&Object.isExtensible(e)&&ae(e,`__v_skip`,!0),e}var fn=e=>b(e)?tn(e):e,pn=e=>b(e)?rn(e):e;function I(e){return e?e.__v_isRef===!0:!1}function mn(e){return gn(e,!1)}function hn(e){return gn(e,!0)}function gn(e,t){return I(e)?e:new _n(e,t)}var _n=class{constructor(e,t){this.dep=new dt,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:F(e),this._value=t?e:fn(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||ln(e)||cn(e);e=n?e:F(e),M(e,t)&&(this._rawValue=e,this._value=n?e:fn(e),this.dep.trigger())}};function vn(e){e.dep&&e.dep.trigger()}function yn(e){return I(e)?e.value:e}function bn(e){return _(e)?e():yn(e)}var xn={get:(e,t,n)=>t===`__v_raw`?e:yn(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return I(i)&&!I(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Sn(e){return sn(e)?e:new Proxy(e,xn)}var Cn=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new dt,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}};function wn(e){return new Cn(e)}function Tn(e){let t=f(e)?Array(e.length):{};for(let n in e)t[n]=kn(e,n);return t}var En=class{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=y(t)?t:String(t),this._raw=F(e);let r=!0,i=e;if(!f(e)||y(this._key)||!E(this._key))do r=!un(i)||ln(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=yn(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&I(this._raw[this._key])){let t=this._object[this._key];if(I(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return yt(this._raw,this._key)}},Dn=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function On(e,t,n){return I(e)?e:_(e)?new Dn(e):b(e)&&arguments.length>1?kn(e,t,n):mn(e)}function kn(e,t,n){return new En(e,t,n)}var An=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new dt(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=lt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&P!==this)return qe(this,!0),!0}get value(){let e=this.dep.track();return $e(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function jn(e,t,n=!1){let r,i;return _(e)?r=e:(r=e.get,i=e.set),new An(r,i,n)}var Mn={GET:`get`,HAS:`has`,ITERATE:`iterate`},Nn={SET:`set`,ADD:`add`,DELETE:`delete`,CLEAR:`clear`},Pn={},Fn=new WeakMap,In=void 0;function Ln(){return In}function Rn(e,t=!1,n=In){if(n){let t=Fn.get(n);t||Fn.set(n,t=[]),t.push(e)}}function zn(e,t,r=n){let{immediate:a,deep:o,once:s,scheduler:c,augmentJob:u,call:d}=r,p=e=>o?e:ln(e)||o===!1||o===0?Bn(e,1):Bn(e),m,h,g,v,y=!1,b=!1;if(I(e)?(h=()=>e.value,y=ln(e)):sn(e)?(h=()=>p(e),y=!0):f(e)?(b=!0,y=e.some(e=>sn(e)||ln(e)),h=()=>e.map(e=>{if(I(e))return e.value;if(sn(e))return p(e);if(_(e))return d?d(e,2):e()})):h=_(e)?t?d?()=>d(e,2):e:()=>{if(g){ot();try{g()}finally{st()}}let t=In;In=m;try{return d?d(e,3,[v]):e(v)}finally{In=t}}:i,t&&o){let e=h,t=o===!0?1/0:o;h=()=>Bn(e(),t)}let x=Be(),S=()=>{m.stop(),x&&x.active&&l(x.effects,m)};if(s&&t){let e=t;t=(...t)=>{let n=e(...t);return S(),n}}let C=b?Array(e.length).fill(Pn):Pn,w=e=>{if(!(!(m.flags&1)||!m.dirty&&!e)){if(t){let n=m.run();if(e||o||y||(b?n.some((e,t)=>M(e,C[t])):M(n,C))){g&&g();let e=In;In=m;try{let e=[n,C===Pn?void 0:b&&C[0]===Pn?[]:C,v];C=n,d?d(t,3,e):t(...e)}finally{In=e}}}else m.run()}};return u&&u(w),m=new Ue(h),m.scheduler=c?()=>c(w,!1):w,v=e=>Rn(e,!1,m),g=m.onStop=()=>{let e=Fn.get(m);if(e){if(d)d(e,4);else for(let t of e)t();Fn.delete(m)}},t?a?w(!0):C=m.run():c?c(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function Bn(e,t=1/0,n){if(t<=0||!b(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,I(e))Bn(e.value,t,n);else if(f(e))for(let r=0;r{Bn(e,t,n)});else if(T(e)){for(let r in e)Bn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Bn(e[r],t,n)}return e}var Vn=[];function Hn(e){Vn.push(e)}function Un(){Vn.pop()}function Wn(e,t){}var Gn={SETUP_FUNCTION:0,0:`SETUP_FUNCTION`,RENDER_FUNCTION:1,1:`RENDER_FUNCTION`,NATIVE_EVENT_HANDLER:5,5:`NATIVE_EVENT_HANDLER`,COMPONENT_EVENT_HANDLER:6,6:`COMPONENT_EVENT_HANDLER`,VNODE_HOOK:7,7:`VNODE_HOOK`,DIRECTIVE_HOOK:8,8:`DIRECTIVE_HOOK`,TRANSITION_HOOK:9,9:`TRANSITION_HOOK`,APP_ERROR_HANDLER:10,10:`APP_ERROR_HANDLER`,APP_WARN_HANDLER:11,11:`APP_WARN_HANDLER`,FUNCTION_REF:12,12:`FUNCTION_REF`,ASYNC_COMPONENT_LOADER:13,13:`ASYNC_COMPONENT_LOADER`,SCHEDULER:14,14:`SCHEDULER`,COMPONENT_UPDATE:15,15:`COMPONENT_UPDATE`,APP_UNMOUNT_CLEANUP:16,16:`APP_UNMOUNT_CLEANUP`},Kn={sp:`serverPrefetch hook`,bc:`beforeCreate hook`,c:`created hook`,bm:`beforeMount hook`,m:`mounted hook`,bu:`beforeUpdate hook`,u:`updated`,bum:`beforeUnmount hook`,um:`unmounted hook`,a:`activated hook`,da:`deactivated hook`,ec:`errorCaptured hook`,rtc:`renderTracked hook`,rtg:`renderTriggered hook`,0:`setup function`,1:`render function`,2:`watcher getter`,3:`watcher callback`,4:`watcher cleanup function`,5:`native event handler`,6:`component event handler`,7:`vnode hook`,8:`directive hook`,9:`transition hook`,10:`app errorHandler`,11:`app warnHandler`,12:`ref function`,13:`async component loader`,14:`scheduler flush`,15:`component update`,16:`app unmount cleanup function`};function qn(e,t,n,r){try{return r?e(...r):e()}catch(e){Yn(e,t,n)}}function Jn(e,t,n,r){if(_(e)){let i=qn(e,t,n,r);return i&&x(i)&&i.catch(e=>{Yn(e,t,n)}),i}if(f(e)){let i=[];for(let a=0;a>>1,i=Zn[r],a=dr(i);a=dr(n)?Zn.push(e):Zn.splice(ar(t),0,e),e.flags|=1,sr()}}function sr(){rr||=nr.then(fr)}function cr(e){if(!f(e))er&&e.id===-1?er.splice(tr+1,0,e):e.flags&1||($n.push(e),e.flags|=1);else for(let t=0;tdr(e)-dr(t));if($n.length=0,er){for(let t=0;te.id==null?e.flags&2?-1:1/0:e.id;function fr(e){try{for(Qn=0;Qnpr.emit(e,...t)),mr=[]):typeof window<`u`&&window.HTMLElement&&!(window.navigator?.userAgent)?.includes(`jsdom`)?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(e=>{hr(e,t)}),setTimeout(()=>{pr||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,mr=[])},3e3)):mr=[]}var L=null,gr=null;function _r(e){let t=L;return L=e,gr=e&&e.type.__scopeId||null,t}function vr(e){gr=e}function yr(){gr=null}var br=e=>xr;function xr(e,t=L,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&xs(-1);let i=_r(t),a=gs.length,o;try{o=e(...n)}finally{for(let e=gs.length;e>a;e--)ys();_r(i),r._d&&xs(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Sr(e,t){if(L===null)return e;let r=cc(L),i=e.dirs||=[];for(let e=0;e1)return n&&_(t)?t.call(r&&r.proxy):t}}function Er(){return!!(Gs()||uo)}var Dr=Symbol.for(`v-scx`),Or=()=>Tr(Dr);function kr(e,t){return Nr(e,null,t)}function Ar(e,t){return Nr(e,null,{flush:`post`})}function jr(e,t){return Nr(e,null,{flush:`sync`})}function Mr(e,t,n){return Nr(e,t,n)}function Nr(e,t,r=n){let{immediate:a,deep:o,flush:s,once:l}=r,u=c({},r),d=t&&a||!t&&s!==`post`,f;if(Zs){if(s===`sync`){let e=Or();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=i,e.resume=i,e.pause=i,e}}let p=H;u.call=(e,t,n)=>Jn(e,p,t,n);let m=!1;s===`post`?u.scheduler=e=>{R(e,p&&p.suspense)}:s!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():or(e)}),u.augmentJob=e=>{t&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=zn(e,t,u);return Zs&&(f?f.push(h):d&&h()),h}function Pr(e,t,n){let r=this.proxy,i=v(e)?e.includes(`.`)?Fr(r,e):()=>r[e]:e.bind(r,r),a;_(t)?a=t:(a=t.handler,n=t);let o=Js(this),s=Nr(i,a.bind(r),n);return o(),s}function Fr(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;ee.__isTeleport,zr=e=>e&&(e.disabled||e.disabled===``),Br=e=>e&&(e.defer||e.defer===``),Vr=e=>typeof SVGElement<`u`&&e instanceof SVGElement,Hr=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,Ur=(e,t)=>{let n=e&&e.to;return v(n)?t?t(n):null:n},Wr={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=zr(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=zr(e.props),r=e.target=Ur(e.props,m),a=Yr(r,e,h,p);r&&(o!==`svg`&&Vr(r)?o=`svg`:o!==`mathml`&&Hr(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),Jr(e,!1)))},S=e=>{let t=()=>{if(Ir.get(e)===t){if(Ir.delete(e),zr(e.props)){let t=_(e.el)||n;b(e,t,e.anchor),Jr(e,!0)}x(e)}};Ir.set(e,t),R(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),Br(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),Jr(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=Ir.get(e);if(u){u.flags|=8,Ir.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=zr(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||Vr(p)?o=`svg`:(o===`mathml`||Hr(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),Xo(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Gr(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=Ur(t.props,m);e&&(t.target=e,Gr(t,e,null,l,0))}else g&&Gr(t,p,h,l,1);Jr(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=zr(f),m=a||!p,h=Ir.get(e);if(h&&(h.flags|=8,Ir.delete(e)),d&&(i(l),i(u)),a&&i(c),!h&&(p||d)&&o&16)for(let e=0;e{e.isMounted=!0}),sa(()=>{e.isUnmounting=!0}),e}var $r=[Function,Array],ei={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:$r,onEnter:$r,onAfterEnter:$r,onEnterCancelled:$r,onBeforeLeave:$r,onLeave:$r,onAfterLeave:$r,onLeaveCancelled:$r,onBeforeAppear:$r,onAppear:$r,onAfterAppear:$r,onAppearCancelled:$r},ti=e=>{let t=e.subTree;return t.component?ti(t.component):t},ni={name:`BaseTransition`,props:ei,setup(e,{slots:t}){let n=Gs(),r=Qr();return()=>{let i=t.default&&ui(t.default(),!0),a=i&&i.length?ri(i):n.subTree?Is():void 0;if(!a)return;let o=F(e),{mode:s}=o;if(r.isLeaving)return si(a);let c=ci(a);if(!c)return si(a);let l=oi(c,o,r,n,e=>l=e);c.type!==B&&li(c,l);let u=n.subTree&&ci(n.subTree);if(u&&u.type!==B&&!Es(u,c)&&ti(n).type!==B){let e=oi(u,o,r,n);if(li(u,e),s===`out-in`&&c.type!==B)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},si(a);s===`in-out`&&c.type!==B?e.delayLeave=(e,t,n)=>{let i=ai(r,u);i[String(u.key)]=u,e[Xr]=()=>{t(),e[Xr]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}};function ri(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==B){t=n;break}}return t}var ii=ni;function ai(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function oi(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:m,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:_,onAppear:v,onAfterAppear:y,onAppearCancelled:b}=t,x=String(e.key),S=ai(n,e),C=(e,t)=>{e&&Jn(e,r,9,t)},w=(e,t)=>{let n=t[1];C(e,t),f(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},T={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted){if(a)r=_||c;else return}t[Xr]&&t[Xr](!0);let i=S[x];i&&Es(e,i)&&i.el[Xr]&&i.el[Xr](),C(r,[t])},enter(t){if(S[x]===e)return;let r=l,i=u,o=d;if(!n.isMounted){if(a)r=v||l,i=y||u,o=b||d;else return}let s=!1;t[Zr]=e=>{s||(s=!0,C(e?o:i,[t]),T.delayedLeave&&T.delayedLeave(),t[Zr]=void 0)};let c=t[Zr].bind(null,!1);r?w(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[Zr]&&t[Zr](!0),n.isUnmounting)return r();C(p,[t]);let a=!1;t[Xr]=n=>{a||(a=!0,r(),C(n?g:h,[t]),t[Xr]=void 0,S[i]===e&&delete S[i])};let o=t[Xr].bind(null,!1);S[i]=e,m?w(m,[t,o]):o()},clone(e){let a=oi(e,t,n,r,i);return i&&i(a),a}};return T}function si(e){if(Ki(e))return e=Ns(e),e.children=null,e}function ci(e){if(!Ki(e))return Rr(e.type)&&e.children?ri(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&_(n.default))return n.default()}}function li(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;li(Rr(n.type)&&ci(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ui(e,t=!1,n){let r=[],i=0;for(let a=0;a1)for(let e=0;er.value,set:e=>r.value=e})}return r}function hi(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var gi=new WeakMap;function _i(e,t,r,i,o=!1){if(f(e)){e.forEach((e,n)=>_i(e,t&&(f(t)?t[n]:t),r,i,o));return}if(Ui(i)&&!o){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&_i(e,t,r,i.component.subTree);return}let s=i.shapeFlag&4?cc(i.component):i.el,c=o?null:s,{i:u,r:p}=e,m=t&&t.r,h=u.refs===n?u.refs={}:u.refs,g=u.setupState,y=F(g),b=g===n?a:e=>!hi(h,e)&&d(y,e),x=(e,t)=>!(t&&hi(h,t));if(m!=null&&m!==p){if(vi(t),v(m))h[m]=null,b(m)&&(g[m]=null);else if(I(m)){let e=t;x(m,e.k)&&(m.value=null),e.k&&(h[e.k]=null)}}if(_(p))qn(p,u,12,[c,h]);else{let t=v(p),n=I(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?g[p]:h[p]:x(p)||!e.k?p.value:h[e.k];if(o)f(n)&&l(n,s);else if(f(n))n.includes(s)||n.push(s);else if(t)h[p]=[s],b(p)&&(g[p]=h[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(h[e.k]=t)}}else t?(h[p]=c,b(p)&&(g[p]=c)):n&&(x(p,e.k)&&(p.value=c),e.k&&(h[e.k]=c))};if(c){let t=()=>{i(),gi.delete(e)};t.id=-1,gi.set(e,t),R(t,r)}else vi(e),i()}}}function vi(e){let t=gi.get(e);t&&(t.flags|=8,gi.delete(e))}var yi=!1,bi=()=>{yi||=(console.error(`Hydration completed but contains mismatches.`),!0)},xi=e=>e.namespaceURI.includes(`svg`)&&e.tagName!==`foreignObject`,Si=e=>e.namespaceURI.includes(`MathML`),Ci=e=>{if(e.nodeType===1){if(xi(e))return`svg`;if(Si(e))return`mathml`}},wi=e=>e.nodeType===8;function Ti(e){let{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:a,parentNode:s,remove:c,insert:l,createComment:u}}=e,d=(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),ur(),t._vnode=e;return}f(t.firstChild,e,null,null,null),ur(),t._vnode=e},f=(n,r,o,c,u,d=!1)=>{d||=!!r.dynamicChildren;let b=wi(n)&&n.data===`[`,x=()=>g(n,r,o,c,u,b),{type:S,ref:C,shapeFlag:w,patchFlag:T}=r,E=n.nodeType;r.el=n,T===-2&&(d=!1,r.dynamicChildren=null);let D=null;switch(S){case ms:E===3?(n.data!==r.children&&(bi(),n.data=r.children),D=a(n)):r.children===``?(l(r.el=i(``),s(n),n),D=n):D=x();break;case B:y(n)?(D=a(n),v(r.el=n.content.firstChild,n,o)):D=E!==8||b?x():a(n);break;case hs:if(b&&(n=a(n),E=n.nodeType),E===1||E===3){D=n;let e=!r.children.length;for(let t=0;t{s||=!!t.dynamicChildren;let{type:l,dynamicProps:u,props:d,patchFlag:f,shapeFlag:p,dirs:h,transition:g}=t,_=l===`input`||l===`option`,b=!!u;if(_||b||f!==-1){h&&Cr(t,null,n,`created`);let l=!1;if(y(e)){l=Yo(null,g)&&n&&n.vnode.props&&n.vnode.props.appear;let r=e.content.firstChild;if(l){let e=r.getAttribute(`class`);e&&(r.$cls=e),g.beforeEnter(r)}v(r,e,n),t.el=e=r}if(p&16&&!(d&&(d.innerHTML||d.textContent))){let r=m(e.firstChild,t,e,n,i,a,s);for(r&&!Ai(e,1)&&bi();r;){let e=r;r=r.nextSibling,c(e)}}else if(p&8){let n=t.children;n[0]===` +`&&(e.tagName===`PRE`||e.tagName===`TEXTAREA`)&&(n=n.slice(1));let{textContent:r}=e;r!==n&&r!==n.replace(/\r\n|\r/g,` +`)&&(Ai(e,0)||bi(),e.textContent=t.children)}if(d){if(_||b||!s||f&48){let t=e.tagName.includes(`-`),i=e.namespaceURI.includes(`svg`)?`svg`:e.namespaceURI.includes(`MathML`)?`mathml`:void 0;for(let a in d)if(_&&(a.endsWith(`value`)||a===`indeterminate`)||o(a)&&!D(a)||a[0]===`.`||t&&!D(a)||u&&u.includes(a)){if(Di(e,a,d[a]))continue;r(e,a,null,d[a],i,n)}}else if(d.onClick)r(e,`onClick`,null,d.onClick,void 0,n);else if(f&4&&sn(d.style))for(let e in d.style)d.style[e]}let x;(x=d&&d.onVnodeBeforeMount)&&Vs(x,n,t),h&&Cr(t,null,n,`beforeMount`),((x=d&&d.onVnodeMounted)||h||l)&&ds(()=>{x&&Vs(x,n,t),l&&g.enter(e),h&&Cr(t,null,n,`mounted`)},i)}return e.nextSibling},m=(e,t,r,o,s,c,u)=>{u||=!!t.dynamicChildren;let d=t.children,p=d.length,m=!1;for(let t=0;t{let{slotScopeIds:c}=t;c&&(i=i?i.concat(c):c);let d=s(e),f=m(a(e),t,d,n,r,i,o);return f&&wi(f)&&f.data===`]`?a(t.anchor=f):(bi(),l(t.anchor=u(`]`),d,f),f)},g=(e,t,r,i,o,l)=>{if(Mi(e,t)||bi(),t.el=null,l){let t=_(e);for(;;){let n=a(e);if(n&&n!==t)c(n);else break}}let u=a(e),d=s(e);return c(e),n(null,t,d,u,r,i,Ci(d),o),r&&(r.vnode.el=t.el,To(r,t.el)),u},_=(e,t=`[`,n=`]`)=>{let r=0;for(;e;)if(e=a(e),e&&wi(e)&&(e.data===t&&r++,e.data===n)){if(r===0)return a(e);r--}return e},v=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>e.nodeType===1&&e.tagName===`TEMPLATE`;return[d,f]}var Ei=new Set([`src`,`srcset`,`href`,`poster`]);function Di(e,t,n){return Ei.has(t)?e.getAttribute(t)===(n==null?null:`${n}`):!1}var Oi=`data-allow-mismatch`,ki={0:`text`,1:`children`,2:`class`,3:`style`,4:`attribute`};function Ai(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Oi);)e=e.parentElement;return ji(e&&e.getAttribute(Oi),t)}function ji(e,t){if(e==null)return!1;if(e===``)return!0;{let n=e.split(`,`);return t===0&&n.includes(`children`)?!0:n.includes(ki[t])}}function Mi(e,t){return Ai(e.parentElement,1)||Ni(e)||Pi(t)}function Ni(e){return e.nodeType===1&&ji(e.getAttribute(Oi),1)}function Pi({props:e}){let t=e&&e[Oi];return typeof t==`string`&&ji(t,1)}var Fi=le().requestIdleCallback||(e=>setTimeout(e,1)),Ii=le().cancelIdleCallback||(e=>clearTimeout(e)),Li=(e=1e4)=>t=>{let n=Fi(t,{timeout:e});return()=>Ii(n)};function Ri(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=window;return(t>0&&t0&&r0&&n0&&i(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(Ri(e))return t(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},Bi=e=>t=>{if(e){let n=matchMedia(e);if(n.matches)t();else return n.addEventListener(`change`,t,{once:!0}),()=>n.removeEventListener(`change`,t)}},Vi=(e=[])=>(t,n)=>{v(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,a(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},a=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),a};function Hi(e,t){if(wi(e)&&e.data===`[`){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(wi(r)){if(r.data===`]`){if(--n===0)break}else r.data===`[`&&n++}r=r.nextSibling}}else t(e)}var Ui=e=>!!e.type.__asyncLoader;function Wi(e){_(e)&&(e={loader:e});let{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:a,timeout:o,suspensible:s=!0,onError:c}=e,l=null,u,d=0,f=()=>(d++,l=null,p()),p=()=>{let e;return l||(e=l=t().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(f()),()=>n(e),d+1)});throw e}).then(t=>e!==l&&l?l:(t&&(t.__esModule||t[Symbol.toStringTag]===`Module`)&&(t=t.default),u=t,t)))};return di({name:`AsyncComponentWrapper`,__asyncLoader:p,__asyncHydrate(e,t,n){let r=e.isConnected,i=!1;(t.bu||=[]).push(()=>i=!0);let o=()=>{i||!e.parentNode||r&&!e.isConnected||n()},s=a?()=>{let n=a(o,t=>Hi(e,t));n&&(t.bum||=[]).push(n)}:o;u?s():p().then(()=>!t.isUnmounted&&s())},get __asyncResolved(){return u},setup(){let e=H;if(pi(e),u)return()=>Gi(u,e);let t=t=>{l=null,Yn(t,e,13,!r)};if(s&&e.suspense||Zs)return p().then(t=>()=>Gi(t,e)).catch(e=>(t(e),()=>r?V(r,{error:e}):null));let a=mn(!1),c=mn(),d=mn(!!i),f,m;return ca(()=>{f!=null&&clearTimeout(f),m!=null&&clearTimeout(m)}),i&&(m=setTimeout(()=>{e.isUnmounted||(d.value=!1)},i)),o!=null&&(f=setTimeout(()=>{if(!e.isUnmounted&&!a.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);t(e),c.value=e}},o)),p().then(()=>{e.isUnmounted||(a.value=!0,e.parent&&Ki(e.parent.vnode)&&e.parent.update())}).catch(n=>{if(e.isUnmounted){l=null;return}t(n),c.value=n}),()=>{if(a.value&&u)return Gi(u,e);if(c.value&&r)return V(r,{error:c.value});if(n&&!d.value)return Gi(n,e)}}})}function Gi(e,t){let{ref:n,props:r,children:i,ce:a}=t.vnode,o=V(e,r,i);return o.ref=n,o.ce=a,delete t.vnode.ce,o}var Ki=e=>e.type.__isKeepAlive,qi={name:`KeepAlive`,__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=Gs(),r=n.ctx;if(!r.renderer)return()=>{let e=t.default&&t.default();return e&&e.length===1?e[0]:e};let i=new Map,a=new Set,o=null,s=n.suspense,{renderer:{p:c,m:l,um:u,o:{createElement:d}}}=r,f=d(`div`);r.activate=(e,t,n,r,i)=>{let a=e.component;l(e,t,n,0,s),c(a.vnode,e,t,n,a,s,r,e.slotScopeIds,i),R(()=>{a.isDeactivated=!1,a.a&&ie(a.a);let t=e.props&&e.props.onVnodeMounted;t&&Vs(t,a.parent,e)},s)},r.deactivate=e=>{let t=e.component;$o(t.m),$o(t.a),l(e,f,null,1,s),R(()=>{t.da&&ie(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&Vs(n,t.parent,e),t.isDeactivated=!0},s)};function p(e){$i(e),u(e,n,s,!0)}function m(e){i.forEach((t,n)=>{let r=lc(Ui(t)?t.type.__asyncResolved||{}:t.type);r&&!e(r)&&h(n)})}function h(e){let t=i.get(e);t&&(!o||!Es(t,o))?p(t):o&&$i(o),i.delete(e),a.delete(e)}Mr(()=>[e.include,e.exclude],([e,t])=>{e&&m(t=>Ji(e,t)),t&&m(e=>!Ji(t,e))},{flush:`post`,deep:!0});let g=null,_=()=>{g!=null&&(ts(n.subTree.type)?R(()=>{i.set(g,ea(n.subTree))},n.subTree.suspense):i.set(g,ea(n.subTree)))};return ia(_),oa(_),sa(()=>{i.forEach(e=>{let{subTree:t,suspense:r}=n,i=ea(t);if(e.type===i.type&&e.key===i.key){$i(i);let e=i.component.da;e&&R(e,r);return}p(e)})}),()=>{if(g=null,!t.default)return o=null;let n=t.default(),r=n[0];if(n.length>1)return o=null,n;if(!Ts(r)||!(r.shapeFlag&4)&&!(r.shapeFlag&128))return o=null,r;let s=ea(r);if(s.type===B)return o=null,s;let c=s.type,l=lc(Ui(s)?s.type.__asyncResolved||{}:c),{include:u,exclude:d,max:f}=e;if(u&&(!l||!Ji(u,l))||d&&l&&Ji(d,l))return s.shapeFlag&=-257,o=s,r;let p=s.key==null?c:s.key,m=i.get(p);return s.el&&(s=Ns(s),r.shapeFlag&128&&(r.ssContent=s)),g=p,m?(s.el=m.el,s.component=m.component,s.transition&&li(s,s.transition),s.shapeFlag|=512,a.delete(p),a.add(p)):(a.add(p),f&&a.size>parseInt(f,10)&&h(a.values().next().value)),s.shapeFlag|=256,o=s,ts(r.type)?r:s}}};function Ji(e,t){return f(e)?e.some(e=>Ji(e,t)):v(e)?e.split(`,`).includes(t):g(e)?(e.lastIndex=0,e.test(t)):!1}function Yi(e,t){Zi(e,`a`,t)}function Xi(e,t){Zi(e,`da`,t)}function Zi(e,t,n=H){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(ta(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Ki(e.parent.vnode)&&Qi(r,t,n,e),e=e.parent}}function Qi(e,t,n,r){let i=ta(t,e,r,!0);ca(()=>{l(r[t],i)},n)}function $i(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function ea(e){return e.shapeFlag&128?e.ssContent:e}function ta(e,t,n=H,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{ot();let i=Js(n),a=Jn(t,n,e,r);return i(),st(),a};return r?i.unshift(a):i.push(a),a}}var na=e=>(t,n=H)=>{(!Zs||e===`sp`)&&ta(e,(...e)=>t(...e),n)},ra=na(`bm`),ia=na(`m`),aa=na(`bu`),oa=na(`u`),sa=na(`bum`),ca=na(`um`),la=na(`sp`),ua=na(`rtg`),da=na(`rtc`);function fa(e,t=H){ta(`ec`,e,t)}var pa=`components`,ma=`directives`;function ha(e,t){return ya(pa,e,!0,t)||e}var ga=Symbol.for(`v-ndc`);function _a(e){return v(e)?ya(pa,e,!1)||e:e||ga}function va(e){return ya(ma,e)}function ya(e,t,n=!0,r=!1){let i=L||H;if(i){let n=i.type;if(e===pa){let e=lc(n,!1);if(e&&(e===t||e===k(t)||e===re(k(t))))return n}let a=ba(i[e]||n[e],t)||ba(i.appContext[e],t);return!a&&r?n:a}}function ba(e,t){return e&&(e[t]||e[k(t)]||e[re(k(t))])}function xa(e,t,n,r){let i,a=n&&n[r],o=f(e);if(o||v(e)){let n=o&&sn(e),r=!1,s=!1;n&&(r=!ln(e),s=cn(e),e=xt(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r{let t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function Ca(e,t,n,r,i,a){if(n??={},L.ce||L.parent&&Ui(L.parent)&&L.parent.ce){let e=a!=null&&n.key==null?c({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),vs(),ws(z,null,[V(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let s=gs.length;vs();let l;try{let i=o&&wa(o(n)),s=n.key||a||i&&i.key;l=ws(z,{key:(s&&!y(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=gs.length;e>s;e--)ys();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+`-s`]),l}function wa(e){return e.some(e=>!Ts(e)||!(e.type===B||e.type===z&&!wa(e.children)))?e:null}function Ta(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:j(r)]=e[r];return n}var Ea=e=>e?Xs(e)?cc(e):Ea(e.parent):null,Da=c(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ea(e.parent),$root:e=>Ea(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Za(e),$forceUpdate:e=>e.f||=()=>{or(e.update)},$nextTick:e=>e.n||=ir.bind(e.proxy),$watch:e=>Pr.bind(e)}),Oa=(e,t)=>e!==n&&!e.__isScriptSetup&&d(e,t),ka={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(t[0]!==`$`){let e=s[t];if(e!==void 0)switch(e){case 1:return i[t];case 2:return a[t];case 4:return r[t];case 3:return o[t]}else if(Oa(i,t))return s[t]=1,i[t];else if(a!==n&&d(a,t))return s[t]=2,a[t];else if(d(o,t))return s[t]=3,o[t];else if(r!==n&&d(r,t))return s[t]=4,r[t];else Ka&&(s[t]=0)}let u=Da[t],f,p;if(u)return t===`$attrs`&&_t(e.attrs,`get`,``),u(e);if((f=c.__cssModules)&&(f=f[t]))return f;if(r!==n&&d(r,t))return s[t]=4,r[t];if(p=l.config.globalProperties,d(p,t))return p[t]},set({_:e},t,r){let{data:i,setupState:a,ctx:o}=e;return Oa(a,t)?(a[t]=r,!0):i!==n&&d(i,t)?(i[t]=r,!0):d(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(o[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==n&&c[0]!==`$`&&d(e,c)||Oa(t,c)||d(o,c)||d(i,c)||d(Da,c)||d(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?d(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}},Aa=c({},ka,{get(e,t){if(t!==Symbol.unscopables)return ka.get(e,t,e)},has(e,t){return t[0]!==`_`&&!de(t)}});function ja(){return null}function Ma(){return null}function Na(e){}function Pa(e){}function Fa(){return null}function Ia(){}function La(e,t){return null}function Ra(){return Ba(`useSlots`).slots}function za(){return Ba(`useAttrs`).attrs}function Ba(e){let t=Gs();return t.setupContext||=sc(t)}function Va(e){return f(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function Ha(e,t){let n=Va(e);for(let e in t){if(e.startsWith(`__skip`))continue;let r=n[e];r?f(r)||_(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:r===null&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function Ua(e,t){return!e||!t?e||t:f(e)&&f(t)?e.concat(t):c({},Va(e),Va(t))}function Wa(e,t){let n={};for(let r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function Ga(e){let t=Gs(),n=Zs,r=e();Ys(),n&&qs(!1);let i=()=>{Js(t),n&&qs(!0)},a=()=>{Gs()!==t&&t.scope.off(),Ys(),n&&qs(!1)};return x(r)&&(r=r.catch(e=>{throw i(),Promise.resolve().then(()=>Promise.resolve().then(a)),e})),[r,()=>{i(),Promise.resolve().then(a)}]}var Ka=!0;function qa(e){let t=Za(e),n=e.proxy,r=e.ctx;Ka=!1,t.beforeCreate&&Ya(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:d,beforeMount:p,mounted:m,beforeUpdate:h,updated:g,activated:v,deactivated:y,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:w,render:T,renderTracked:E,renderTriggered:D,errorCaptured:ee,serverPrefetch:te,expose:O,inheritAttrs:k,components:ne,directives:A,filters:re}=t;if(u&&Ja(u,r,null),s)for(let e in s){let t=s[e];_(t)&&(r[e]=t.bind(n))}if(a){let t=a.call(n,n);b(t)&&(e.data=tn(t))}if(Ka=!0,o)for(let e in o){let t=o[e],a=dc({get:_(t)?t.bind(n,n):_(t.get)?t.get.bind(n,n):i,set:!_(t)&&_(t.set)?t.set.bind(n):i});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)Xa(c[e],r,n,e);if(l){let e=_(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{wr(t,e[t])})}d&&Ya(d,e,`c`);function j(e,t){f(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(j(ra,p),j(ia,m),j(aa,h),j(oa,g),j(Yi,v),j(Xi,y),j(fa,ee),j(da,E),j(ua,D),j(sa,S),j(ca,w),j(la,te),f(O)){if(O.length){let t=e.exposed||={};O.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}T&&e.render===i&&(e.render=T),k!=null&&(e.inheritAttrs=k),ne&&(e.components=ne),A&&(e.directives=A),te&&pi(e)}function Ja(e,t,n=i){f(e)&&(e=no(e));for(let n in e){let r=e[n],i;i=b(r)?`default`in r?Tr(r.from||n,r.default,!0):Tr(r.from||n):Tr(r),I(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Ya(e,t,n){Jn(f(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Xa(e,t,n,r){let i=r.includes(`.`)?Fr(n,r):()=>n[r];if(v(e)){let n=t[e];_(n)&&Mr(i,n)}else if(_(e))Mr(i,e.bind(n));else if(b(e)){if(f(e))e.forEach(e=>Xa(e,t,n,r));else{let r=_(e.handler)?e.handler.bind(n):t[e.handler];_(r)&&Mr(i,r,e)}}}function Za(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Qa(c,e,o,!0)),Qa(c,t,o)),b(t)&&a.set(t,c),c}function Qa(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&Qa(e,a,n,!0),i&&i.forEach(t=>Qa(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=$a[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var $a={data:eo,props:ao,emits:ao,methods:io,computed:io,beforeCreate:ro,created:ro,beforeMount:ro,mounted:ro,beforeUpdate:ro,updated:ro,beforeDestroy:ro,beforeUnmount:ro,destroyed:ro,unmounted:ro,activated:ro,deactivated:ro,errorCaptured:ro,serverPrefetch:ro,components:io,directives:io,watch:oo,provide:eo,inject:to};function eo(e,t){return t?e?function(){return c(_(e)?e.call(this,this):e,_(t)?t.call(this,this):t)}:t:e}function to(e,t){return io(no(e),no(t))}function no(e){if(f(e)){let t={};for(let n=0;n{let l,u=n,d;return jr(()=>{let t=e[a];M(l,t)&&(l=t,c())}),{get(){return s(),r.get?r.get(l):l},set(e){let s=r.set?r.set(e):e;if(!M(s,l)&&!(u!==n&&M(e,u)))return;let f=i.vnode.props,p=!!(f&&(t in f||a in f||o in f)&&(`onUpdate:${t}`in f||`onUpdate:${a}`in f||`onUpdate:${o}`in f));p||(l=e,c()),i.emit(`update:${t}`,s),M(e,u)&&(M(e,s)&&!M(s,d)||p&&u!==n&&!M(s,l))&&c(),u=e,d=s}}});return c[Symbol.iterator]=()=>{let e=0;return{next(){return e<2?{value:e++?s||n:c,done:!1}:{done:!0}}}},c}var po=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${k(t)}Modifiers`]||e[`${A(t)}Modifiers`];function mo(e,t,...r){if(e.isUnmounted)return;let i=e.vnode.props||n,a=r,o=t.startsWith(`update:`),s=o&&po(i,t.slice(7));s&&(s.trim&&(a=r.map(e=>v(e)?e.trim():e)),s.number&&(a=r.map(oe)));let c,l=i[c=j(t)]||i[c=j(k(t))];!l&&o&&(l=i[c=j(A(t))]),l&&Jn(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,Jn(u,e,6,a)}}var ho=new WeakMap;function go(e,t,n=!1){let r=n?ho:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!_(e)){let r=e=>{let n=go(e,t,!0);n&&(s=!0,c(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(b(e)&&r.set(e,null),null):(f(a)?a.forEach(e=>o[e]=null):c(o,a),b(e)&&r.set(e,o),o)}function _o(e,t){return!e||!o(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),d(e,t[0].toLowerCase()+t.slice(1))||d(e,A(t))||d(e,t))}function vo(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=_r(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Ls(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=Ls(e.length>1?e(f,{attrs:c,slots:o,emit:l}):e(f,null)),y=t.props?c:bo(c)}}catch(t){gs.length=0,Yn(t,e,1),v=V(B)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(s)&&(y=xo(y,a)),b=Ns(b,y,!1,!0))}return n.dirs&&(b=Ns(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&li(Rr(b.type)&&ci(b)||b,n.transition),v=b,_r(_),v}function yo(e,t=!0){let n;for(let t=0;t{let t;for(let n in e)(n===`class`||n===`style`||o(n))&&((t||={})[n]=e[n]);return t},xo=(e,t)=>{let n={};for(let r in e)(!s(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function So(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Co(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(Eo),Oo=e=>Object.getPrototypeOf(e)===Eo;function ko(e,t,n,r=!1){let i={},a=Do();e.propsDefaults=Object.create(null),jo(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:nn(i):e.type.props?i:a,e.attrs=a}function Ao(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=F(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{p=!0;let[n,r]=Po(e,t,!0);c(l,n),r&&u.push(...r)};!i&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}if(!s&&!p)return b(e)&&a.set(e,r),r;if(f(s))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,Lo=e=>f(e)?e.map(Ls):[Ls(e)],Ro=(e,t,n)=>{if(t._n)return t;let r=xr((...e)=>Lo(t(...e)),n);return r._c=!1,r},zo=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Io(n))continue;let i=e[n];if(_(i))t[n]=Ro(n,i,r);else if(i!=null){let e=Lo(i);t[n]=()=>e}}},Bo=(e,t)=>{let n=Lo(t);e.slots.default=()=>n},Vo=(e,t,n)=>{for(let r in t)(n||!Io(r))&&(e[r]=t[r])},Ho=(e,t,n)=>{let r=e.slots=Do();if(e.vnode.shapeFlag&32){let e=t._;e?(Vo(r,t,n),n&&ae(r,`_`,e,!0)):zo(t,r)}else t&&Bo(e,t)},Uo=(e,t,r)=>{let{vnode:i,slots:a}=e,o=!0,s=n;if(i.shapeFlag&32){let e=t._;e?r&&e===1?o=!1:Vo(a,t,r):(o=!t.$stable,zo(t,a)),s=t}else t&&(Bo(e,t),s={default:1});if(o)for(let e in a)!Io(e)&&s[e]==null&&delete a[e]},R=ds;function Wo(e){return Ko(e)}function Go(e){return Ko(e,Ti)}function Ko(e,t){let a=le();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=i,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Es(e,t)&&(r=ge(e),de(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case ms:y(e,t,n,r);break;case B:b(e,t,n,r);break;case hs:e??x(t,n,r,o);break;case z:ne(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?A(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,ye)}u!=null&&i?_i(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&_i(e.ref,null,a,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)T(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),te(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},T=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&ee(e.children,d,null,r,i,qo(e,a),s,u),_&&Cr(e,null,r,`created`),E(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!D(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&Vs(f,r,e)}_&&Cr(e,null,r,`beforeMount`);let v=Yo(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&R(()=>{try{f&&Vs(f,r,e),v&&g.enter(d),_&&Cr(e,null,r,`mounted`)}finally{}},i)},E=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let l=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=e.patchFlag&16;let m=e.props||n,h=t.props||n,g;if(r&&Jo(r,!1),(g=h.onVnodeBeforeUpdate)&&Vs(g,r,t,e),f&&Cr(t,e,r,`beforeUpdate`),r&&Jo(r,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(u=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?O(e.dynamicChildren,d,l,r,i,qo(t,a),o):s||oe(e,t,l,null,r,i,qo(t,a),o,!1),u>0){if(u&16)k(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=t.dynamicProps;for(let t=0;t{g&&Vs(g,r,t,e),f&&Cr(t,e,r,`updated`)},i)},O=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(t!==r){if(t!==n)for(let n in t)!D(n)&&!(n in r)&&c(e,n,t[n],null,a,i);for(let n in r){if(D(n))continue;let o=r[n],s=t[n];o!==s&&n!==`value`&&c(e,n,s,o,a,i)}`value`in r&&c(e,`value`,t.value,r.value,a)}},ne=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),ee(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(O(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&Xo(e,t,!0)):oe(e,t,n,f,i,a,s,c,l)},A=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):re(t,n,r,i,a,o,c):j(e,t,c)},re=(e,t,n,r,i,a,o)=>{let s=e.component=Ws(e,r,i);if(Ki(e)&&(s.ctx.renderer=ye),Qs(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,M,o),!e.el){let r=s.subTree=V(B);b(null,r,t,n),e.placeholder=r.el}}else M(s,e,t,n,i,a,o)},j=(e,t,n)=>{let r=t.component=e.component;if(So(e,t,n)){if(r.asyncDep&&!r.asyncResolved){ae(r,t,n);return}r.next=t,r.update()}else t.el=e.el,r.vnode=t},M=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Qo(e);if(n){t&&(t.el=c.el,ae(e,t,o)),n.asyncDep.then(()=>{R(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;Jo(e,!1),t?(t.el=c.el,ae(e,t,o)):t=c,n&&ie(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&Vs(d,s,t,c),Jo(e,!0);let f=vo(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),ge(p),e,i,a),t.el=f.el,u===null&&To(e,f.el),r&&R(r,i),(d=t.props&&t.props.onVnodeUpdated)&&R(()=>Vs(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Ui(t);if(Jo(e,!1),l&&ie(l),!m&&(o=c&&c.onVnodeBeforeMount)&&Vs(o,d,t),Jo(e,!0),s&&xe){let t=()=>{e.subTree=vo(e),xe(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=vo(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&R(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;R(()=>Vs(o,d,e),i)}(t.shapeFlag&256||d&&Ui(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&R(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Ue(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>or(u),Jo(e,!0),l()},ae=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,Ao(e,t.props,r,n),Uo(e,t.children,n),ot(),lr(e),st()},oe=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){ce(l,d,n,r,i,a,o,s,c);return}if(f&256){se(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&he(l,i,a),d!==l&&p(n,d)):u&16?m&16?ce(l,d,n,r,i,a,o,s,c):he(l,i,a,!0):(u&8&&p(n,``),m&16&&ee(d,n,r,i,a,o,s,c))},se=(e,t,n,i,a,o,s,c,l)=>{e||=r,t||=r;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;pd?he(e,a,o,!0,!1,f):ee(t,n,i,a,o,s,c,l,f)},ce=(e,t,n,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let r=e[u],i=t[u]=l?Rs(t[u]):Ls(t[u]);if(Es(r,i))v(r,i,n,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let r=e[f],i=t[p]=l?Rs(t[p]):Ls(t[p]);if(Es(r,i))v(r,i,n,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,r=ep)for(;u<=f;)de(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?Rs(t[u]):Ls(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u=b){de(r,a,o,!0);continue}let i;if(r.key!=null)i=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Es(r,t[_])){i=_;break}i===void 0?de(r,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(r,t[i],n,null,a,o,s,c,l),y++)}let w=x?Zo(C):r;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,r=t[e],f=t[e+1],p=e+1{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){ue(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,ye);return}if(c===z){o(a,t,n);for(let e=0;el.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[Xr];a._isLeaving&&a[Xr](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}}else o(a,t,n)},de=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(ot(),_i(s,null,n,e,!0),st()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Ui(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&Vs(_,t,e),u&6)me(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Cr(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,ye,r):l&&!l.hasOnce&&(a!==z||d>0&&d&64)?he(l,t,n,!1,!0):(a===z&&d&384||!i&&u&16)&&he(c,t,n),r&&fe(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&R(()=>{_&&Vs(_,t,e),h&&Cr(e,null,t,`unmounted`),v&&(e.el=null)},n)},fe=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===z){pe(n,r);return}if(t===hs){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},pe=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},me=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;$o(c),$o(l),r&&ie(r),i.stop(),a&&(a.flags|=8,de(o,e,t,n)),s&&R(s,t),R(()=>{e.isUnmounted=!0},t)},he=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return ge(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Lr];return n?h(n):t},_e=!1,ve=(e,t,n)=>{let r;e==null?t._vnode&&(de(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,_e||=(_e=!0,lr(r),ur(),!1)},ye={p:v,um:de,m:ue,r:fe,mt:re,mc:ee,pc:oe,pbc:O,n:ge,o:e},be,xe;return t&&([be,xe]=t(ye)),{render:ve,hydrate:be,createApp:lo(ve,be)}}function qo({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function Jo({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Yo(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Xo(e,t,n=!1){let r=e.children,i=t.children;if(f(r)&&f(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function Qo(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Qo(t)}function $o(e){if(e)for(let t=0;te.__isSuspense,ns=0,rs={name:`Suspense`,__isSuspense:!0,process(e,t,n,r,i,a,o,s,c,l){if(e==null)as(t,n,r,i,a,o,s,c,l);else{if(a&&a.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}os(e,t,n,r,i,o,s,c,l)}},hydrate:cs,normalize:ls};function is(e,t){let n=e.props&&e.props[t];_(n)&&n()}function as(e,t,n,r,i,a,o,s,c){let{p:l,o:{createElement:u}}=c,d=u(`div`),f=e.suspense=ss(e,i,r,t,d,n,a,o,s,c);l(null,f.pendingBranch=e.ssContent,d,null,r,f,a,o),f.deps>0?(is(e,`onPending`),is(e,`onFallback`),l(null,e.ssFallback,t,n,r,null,a,o),fs(f,e.ssFallback)):f.resolve(!1,!0)}function os(e,t,n,r,i,a,o,s,{p:c,um:l,o:{createElement:u}}){let d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;let f=t.ssContent,p=t.ssFallback,{activeBranch:m,pendingBranch:h,isInFallback:g,isHydrating:_}=d;if(h)d.pendingBranch=f,Es(h,f)?(c(h,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():g&&(_||(c(m,p,n,r,i,null,a,o,s),fs(d,p)))):(d.pendingId=ns++,_?(d.isHydrating=!1,d.activeBranch=h):l(h,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u(`div`),g?(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():(c(m,p,n,r,i,null,a,o,s),fs(d,p))):m&&Es(m,f)?(c(m,f,n,r,i,d,a,o,s),d.resolve(!0)):(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0&&d.resolve()));else if(m&&Es(m,f))c(m,f,n,r,i,d,a,o,s),fs(d,f);else if(is(t,`onPending`),d.pendingBranch=f,d.pendingId=f.shapeFlag&512?f.component.suspenseId:ns++,c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0)d.resolve();else{let{timeout:e,pendingId:t}=d;e>0?setTimeout(()=>{d.pendingId===t&&d.fallback(p)},e):e===0&&d.fallback(p)}}function ss(e,t,n,r,i,a,o,s,c,l,u=!1){let{p:d,m:f,um:p,n:m,o:{parentNode:h,remove:g}}=l,_,v=ps(e);v&&t&&t.pendingBranch&&(_=t.pendingId,t.deps++);let y=e.props?se(e.props.timeout):void 0,b=a,x={vnode:e,parent:t,parentComponent:n,namespace:o,container:r,hiddenContainer:i,deps:0,pendingId:ns++,timeout:typeof y==`number`?y:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:r,activeBranch:i,pendingBranch:o,pendingId:s,effects:c,parentComponent:l,container:u,isInFallback:d}=x,g=!1;if(x.isHydrating)x.isHydrating=!1;else if(!e){g=i&&o.transition&&o.transition.mode===`out-in`;let e=!1;g&&(i.transition.afterLeave=()=>{s===x.pendingId&&(f(o,u,a===b&&!e?m(i):a,0),cr(c),d&&r.ssFallback&&(r.ssFallback.el=null))}),i&&!x.isFallbackMountPending&&(h(i.el)===u&&(a=m(i),e=!0),p(i,l,x,!0),!g&&d&&r.ssFallback&&R(()=>r.ssFallback.el=null,x)),g||f(o,u,a,0)}x.isFallbackMountPending=!1,fs(x,o),x.pendingBranch=null,x.isInFallback=!1;let y=x.parent,S=!1;for(;y;){if(y.pendingBranch){for(let e=0;e{x.isFallbackMountPending=!1,x.isInFallback&&(d(null,e,i,o,r,null,a,s,c),fs(x,e))},u=e.transition&&e.transition.mode===`out-in`;u&&(x.isFallbackMountPending=!0,n.transition.afterLeave=l),x.isInFallback=!0,p(n,r,null,!0),u||l()},move(e,t,n){x.activeBranch&&f(x.activeBranch,e,t,n),x.container=e},next(){return x.activeBranch&&m(x.activeBranch)},registerDep(e,t,n){let r=!!x.pendingBranch;r&&x.deps++;let i=e.vnode.el;e.asyncDep.catch(t=>{Yn(t,e,0)}).then(a=>{if(e.isUnmounted||x.isUnmounted||x.pendingId!==e.suspenseId)return;Ys(),e.asyncResolved=!0;let{vnode:s}=e;ec(e,a,!1),i&&(s.el=i);let c=!i&&e.subTree.el;t(e,s,h(i||e.subTree.el),i?null:m(e.subTree),x,o,n),c&&(s.placeholder=null,g(c)),To(e,s.el),r&&--x.deps===0&&x.resolve()})},unmount(e,t){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,e,t),x.pendingBranch&&p(x.pendingBranch,n,e,t)}};return x}function cs(e,t,n,r,i,a,o,s,c){let l=t.suspense=ss(t,r,n,e.parentNode,document.createElement(`div`),null,i,a,o,s,!0),u=c(e,l.pendingBranch=t.ssContent,n,l,a,o);return l.deps===0&&l.resolve(!1,!0),u}function ls(e){let{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=us(r?n.default:n),e.ssFallback=r?us(n.fallback):V(B)}function us(e){let t;if(_(e)){let n=bs&&e._c;n&&(e._d=!1,vs()),e=e(),n&&(e._d=!0,t=_s,ys())}return f(e)&&(e=yo(e)),e=Ls(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function ds(e,t){t&&t.pendingBranch?f(e)?t.effects.push(...e):t.effects.push(e):cr(e)}function fs(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)t=t.component.subTree,i=t.el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,To(r,i))}function ps(e){let t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var z=Symbol.for(`v-fgt`),ms=Symbol.for(`v-txt`),B=Symbol.for(`v-cmt`),hs=Symbol.for(`v-stc`),gs=[],_s=null;function vs(e=!1){gs.push(_s=e?null:[])}function ys(){gs.pop(),_s=gs[gs.length-1]||null}var bs=1;function xs(e,t=!1){bs+=e,e<0&&_s&&t&&(_s.hasOnce=!0)}function Ss(e){return e.dynamicChildren=bs>0?_s||r:null,ys(),bs>0&&_s&&_s.push(e),e}function Cs(e,t,n,r,i,a){return Ss(As(e,t,n,r,i,a,!0))}function ws(e,t,n,r,i){return Ss(V(e,t,n,r,i,!0))}function Ts(e){return e?e.__v_isVNode===!0:!1}function Es(e,t){return e.type===t.type&&e.key===t.key}function Ds(e){}var Os=({key:e})=>e??null,ks=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:v(e)||I(e)||_(e)?{i:L,r:e,k:t,f:!!n}:e);function As(e,t=null,n=null,r=0,i=null,a=e===z?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Os(t),ref:t&&ks(t),scopeId:gr,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:L};return s?(zs(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=v(n)?8:16),bs>0&&!o&&_s&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&_s.push(c),c}var V=js;function js(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===ga)&&(e=B),Ts(e)){let r=Ns(e,t,!0);return n&&zs(r,n),bs>0&&!a&&_s&&(r.shapeFlag&6?_s[_s.indexOf(e)]=r:_s.push(r)),r.patchFlag=-2,r}if(uc(e)&&(e=e.__vccOpts),t){t=Ms(t);let{class:e,style:n}=t;e&&!v(e)&&(t.class=_e(e)),b(n)&&(un(n)&&!f(n)&&(n=c({},n)),t.style=fe(n))}let o=v(e)?1:ts(e)?128:Rr(e)?64:b(e)?4:_(e)?2:0;return As(e,t,n,r,i,o,a,!0)}function Ms(e){return e?un(e)||Oo(e)?c({},e):e:null}function Ns(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?Bs(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Os(l),ref:t&&t.ref?n&&a?f(a)?a.concat(ks(t)):[a,ks(t)]:ks(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==z?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ns(e.ssContent),ssFallback:e.ssFallback&&Ns(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&li(u,c.clone(u)),u}function Ps(e=` `,t=0){return V(ms,null,e,t)}function Fs(e,t){let n=V(hs,null,e);return n.staticCount=t,n}function Is(e=``,t=!1){return t?(vs(),ws(B,null,e)):V(B,null,e)}function Ls(e){return e==null||typeof e==`boolean`?V(B):f(e)?V(z,null,e.slice()):Ts(e)?Rs(e):V(ms,null,String(e))}function Rs(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ns(e)}function zs(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(f(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),zs(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!Oo(t)?t._ctx=L:r===3&&L&&(L.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(_(t)){if(r&65){zs(e,{default:t});return}t={default:t,_ctx:L},n=32}else t=String(t),r&64?(n=16,t=[Ps(t)]):n=8;e.children=t,e.shapeFlag|=n}function Bs(...e){let t={};for(let n=0;nH||L,Ks,qs;{let e=le(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Ks=t(`__VUE_INSTANCE_SETTERS__`,e=>H=e),qs=t(`__VUE_SSR_SETTERS__`,e=>Zs=e)}var Js=e=>{let t=H;return Ks(e),e.scope.on(),()=>{e.scope.off(),Ks(t)}},Ys=()=>{H&&H.scope.off(),Ks(null)};function Xs(e){return e.vnode.shapeFlag&4}var Zs=!1;function Qs(e,t=!1,n=!1){t&&qs(t);let{props:r,children:i}=e.vnode,a=Xs(e);ko(e,r,a,t),Ho(e,i,n||t);let o=a?$s(e,t):void 0;return t&&qs(!1),o}function $s(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ka);let{setup:r}=n;if(r){ot();let n=e.setupContext=r.length>1?sc(e):null,i=Js(e),a=qn(r,e,0,[e.props,n]),o=x(a);if(st(),i(),(o||e.sp)&&!Ui(e)&&pi(e),o){if(a.then(Ys,Ys),t)return a.then(n=>{qs(!0);try{ec(e,n,t)}finally{qs(!1)}}).catch(t=>{Yn(t,e,0)});e.asyncDep=a}else ec(e,a,t)}else ac(e,t)}function ec(e,t,n){_(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:b(t)&&(e.setupState=Sn(t)),ac(e,n)}var tc,nc;function rc(e){tc=e,nc=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Aa))}}var ic=()=>!tc;function ac(e,t,n){let r=e.type;if(!e.render){if(!t&&tc&&!r.render){let t=r.template||Za(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r,s=c(c({isCustomElement:n,delimiters:a},i),o);r.render=tc(t,s)}}e.render=r.render||i,nc&&nc(e)}{let t=Js(e);ot();try{qa(e)}finally{st(),t()}}}var oc={get(e,t){return _t(e,`get`,``),e[t]}};function sc(e){return{attrs:new Proxy(e.attrs,oc),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function cc(e){return e.exposed?e.exposeProxy||=new Proxy(Sn(dn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Da)return Da[n](e)},has(e,t){return t in e||t in Da}}):e.proxy}function lc(e,t=!0){return _(e)?e.displayName||e.name:e.name||t&&e.__name}function uc(e){return _(e)&&`__vccOpts`in e}var dc=(e,t)=>jn(e,t,Zs);function fc(e,t,n){try{xs(-1);let r=arguments.length;return r===2?b(t)&&!f(t)?Ts(t)?V(e,null,[t]):V(e,t):V(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Ts(n)&&(n=[n]),V(e,t,n))}finally{xs(1)}}function pc(){}function mc(e,t,n,r){let i=n[r];if(i&&hc(i,e))return i;let a=t();return a.memo=e.slice(),a.cacheIndex=r,n[r]=a}function hc(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&_s&&_s.push(e),!0}var gc=`3.5.41`,_c=i,vc=Kn,yc=pr,bc=hr,xc={createComponentInstance:Ws,setupComponent:Qs,renderComponentRoot:vo,setCurrentRenderingInstance:_r,isVNode:Ts,normalizeVNode:Ls,getComponentPublicInstance:cc,ensureValidVNode:wa,pushWarningContext:Hn,popWarningContext:Un},Sc=e({BaseTransition:()=>ii,BaseTransitionPropsValidators:()=>ei,Comment:()=>B,DeprecationTypes:()=>null,EffectScope:()=>Re,ErrorCodes:()=>Gn,ErrorTypeStrings:()=>vc,Fragment:()=>z,KeepAlive:()=>qi,ReactiveEffect:()=>Ue,Static:()=>hs,Suspense:()=>rs,Teleport:()=>qr,Text:()=>ms,TrackOpTypes:()=>Mn,Transition:()=>Ic,TransitionGroup:()=>Gl,TriggerOpTypes:()=>Nn,VueElement:()=>Ll,assertNumber:()=>Wn,callWithAsyncErrorHandling:()=>Jn,callWithErrorHandling:()=>qn,camelize:()=>k,capitalize:()=>re,cloneVNode:()=>Ns,compatUtils:()=>null,computed:()=>dc,createApp:()=>Du,createBlock:()=>ws,createCommentVNode:()=>Is,createElementBlock:()=>Cs,createElementVNode:()=>As,createHydrationRenderer:()=>Go,createPropsRestProxy:()=>Wa,createRenderer:()=>Wo,createSSRApp:()=>Ou,createSlots:()=>Sa,createStaticVNode:()=>Fs,createTextVNode:()=>Ps,createVNode:()=>V,customRef:()=>wn,defineAsyncComponent:()=>Wi,defineComponent:()=>di,defineCustomElement:()=>Pl,defineEmits:()=>Ma,defineExpose:()=>Na,defineModel:()=>Ia,defineOptions:()=>Pa,defineProps:()=>ja,defineSSRCustomElement:()=>Fl,defineSlots:()=>Fa,devtools:()=>yc,effect:()=>nt,effectScope:()=>ze,getCurrentInstance:()=>Gs,getCurrentScope:()=>Be,getCurrentWatcher:()=>Ln,getTransitionRawChildren:()=>ui,guardReactiveProps:()=>Ms,h:()=>fc,handleError:()=>Yn,hasInjectionContext:()=>Er,hydrate:()=>Eu,hydrateOnIdle:()=>Li,hydrateOnInteraction:()=>Vi,hydrateOnMediaQuery:()=>Bi,hydrateOnVisible:()=>zi,initCustomFormatter:()=>pc,initDirectivesForSSR:()=>Mu,inject:()=>Tr,isMemoSame:()=>hc,isProxy:()=>un,isReactive:()=>sn,isReadonly:()=>cn,isRef:()=>I,isRuntimeOnly:()=>ic,isShallow:()=>ln,isVNode:()=>Ts,markRaw:()=>dn,mergeDefaults:()=>Ha,mergeModels:()=>Ua,mergeProps:()=>Bs,nextTick:()=>ir,nodeOps:()=>Ac,normalizeClass:()=>_e,normalizeProps:()=>ve,normalizeStyle:()=>fe,onActivated:()=>Yi,onBeforeMount:()=>ra,onBeforeUnmount:()=>sa,onBeforeUpdate:()=>aa,onDeactivated:()=>Xi,onErrorCaptured:()=>fa,onMounted:()=>ia,onRenderTracked:()=>da,onRenderTriggered:()=>ua,onScopeDispose:()=>Ve,onServerPrefetch:()=>la,onUnmounted:()=>ca,onUpdated:()=>oa,onWatcherCleanup:()=>Rn,openBlock:()=>vs,patchProp:()=>Al,popScopeId:()=>yr,provide:()=>wr,proxyRefs:()=>Sn,pushScopeId:()=>vr,queuePostFlushCb:()=>cr,reactive:()=>tn,readonly:()=>rn,ref:()=>mn,registerRuntimeCompiler:()=>rc,render:()=>Tu,renderList:()=>xa,renderSlot:()=>Ca,resolveComponent:()=>ha,resolveDirective:()=>va,resolveDynamicComponent:()=>_a,resolveFilter:()=>null,resolveTransitionHooks:()=>oi,setBlockTracking:()=>xs,setDevtoolsHook:()=>bc,setTransitionHooks:()=>li,shallowReactive:()=>nn,shallowReadonly:()=>an,shallowRef:()=>hn,ssrContextKey:()=>Dr,ssrUtils:()=>xc,stop:()=>rt,toDisplayString:()=>Pe,toHandlerKey:()=>j,toHandlers:()=>Ta,toRaw:()=>F,toRef:()=>On,toRefs:()=>Tn,toValue:()=>bn,transformVNodeArgs:()=>Ds,triggerRef:()=>vn,unref:()=>yn,useAttrs:()=>za,useCssModule:()=>Bl,useCssVars:()=>il,useHost:()=>Rl,useId:()=>fi,useModel:()=>fo,useSSRContext:()=>Or,useShadowRoot:()=>zl,useSlots:()=>Ra,useTemplateRef:()=>mi,useTransitionState:()=>Qr,vModelCheckbox:()=>iu,vModelDynamic:()=>du,vModelRadio:()=>ou,vModelSelect:()=>su,vModelText:()=>ru,vShow:()=>el,version:()=>gc,warn:()=>_c,watch:()=>Mr,watchEffect:()=>kr,watchPostEffect:()=>Ar,watchSyncEffect:()=>jr,withAsyncContext:()=>Ga,withCtx:()=>xr,withDefaults:()=>La,withDirectives:()=>Sr,withKeys:()=>yu,withMemo:()=>mc,withModifiers:()=>_u,withScopeId:()=>br}),Cc=void 0,wc=typeof window<`u`&&window.trustedTypes;if(wc)try{Cc=wc.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Tc=Cc?e=>Cc.createHTML(e):e=>e,Ec=`http://www.w3.org/2000/svg`,Dc=`http://www.w3.org/1998/Math/MathML`,Oc=typeof document<`u`?document:null,kc=Oc&&Oc.createElement(`template`),Ac={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?Oc.createElementNS(Ec,e):t===`mathml`?Oc.createElementNS(Dc,e):n?Oc.createElement(e,{is:n}):Oc.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>Oc.createTextNode(e),createComment:e=>Oc.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Oc.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{kc.innerHTML=Tc(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=kc.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},jc=`transition`,Mc=`animation`,Nc=Symbol(`_vtc`),Pc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Fc=c({},ei,Pc),Ic=(e=>(e.displayName=`Transition`,e.props=Fc,e))((e,{slots:t})=>fc(ii,zc(e),t)),Lc=(e,t=[])=>{f(e)?e.forEach(e=>e(...t)):e&&e(...t)},Rc=e=>e?f(e)?e.some(e=>e.length>1):e.length>1:!1;function zc(e){let t={};for(let n in e)n in Pc||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:l=a,appearActiveClass:u=o,appearToClass:d=s,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,h=Bc(i),g=h&&h[0],_=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:w=y,onAppearCancelled:T=b}=t,E=(e,t,n,r)=>{e._enterCancelled=r,Uc(e,t?d:s),Uc(e,t?u:o),n&&n()},D=(e,t)=>{e._isLeaving=!1,Uc(e,f),Uc(e,m),Uc(e,p),t&&t()},ee=e=>(t,n)=>{let i=e?w:y,o=()=>E(t,e,n);Lc(i,[t,o]),Wc(()=>{Uc(t,e?l:a),Hc(t,e?d:s),Rc(i)||Kc(t,r,g,o)})};return c(t,{onBeforeEnter(e){Lc(v,[e]),Hc(e,a),Hc(e,o)},onBeforeAppear(e){Lc(C,[e]),Hc(e,l),Hc(e,u)},onEnter:ee(!1),onAppear:ee(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>D(e,t);Hc(e,f),e._enterCancelled?(Hc(e,p),Xc(e)):(Xc(e),Hc(e,p)),Wc(()=>{e._isLeaving&&(Uc(e,f),Hc(e,m),Rc(x)||Kc(e,r,_,n))}),Lc(x,[e,n])},onEnterCancelled(e){E(e,!1,void 0,!0),Lc(b,[e])},onAppearCancelled(e){E(e,!0,void 0,!0),Lc(T,[e])},onLeaveCancelled(e){D(e),Lc(S,[e])}})}function Bc(e){if(e==null)return null;if(b(e))return[Vc(e.enter),Vc(e.leave)];{let t=Vc(e);return[t,t]}}function Vc(e){return se(e)}function Hc(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[Nc]||(e[Nc]=new Set)).add(t)}function Uc(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[Nc];n&&(n.delete(t),n.size||(e[Nc]=void 0))}function Wc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var Gc=0;function Kc(e,t,n,r){let i=e._endId=++Gc,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=qc(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${jc}Delay`),a=r(`${jc}Duration`),o=Jc(i,a),s=r(`${Mc}Delay`),c=r(`${Mc}Duration`),l=Jc(s,c),u=null,d=0,f=0;t===jc?o>0&&(u=jc,d=o,f=a.length):t===Mc?l>0&&(u=Mc,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?jc:Mc:null,f=u?u===jc?a.length:c.length:0);let p=u===jc&&/\b(?:transform|all)(?:,|$)/.test(r(`${jc}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Jc(e,t){for(;e.lengthYc(t)+Yc(e[n])))}function Yc(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function Xc(e){return(e?e.ownerDocument:document).body.offsetHeight}function Zc(e,t,n){let r=e[Nc];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Qc=Symbol(`_vod`),$c=Symbol(`_vsh`),el={name:`show`,beforeMount(e,{value:t},{transition:n}){e[Qc]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):tl(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),tl(e,!0),r.enter(e)):r.leave(e,()=>{tl(e,!1)}):tl(e,t))},beforeUnmount(e,{value:t}){tl(e,t)}};function tl(e,t){e.style.display=t?e[Qc]:`none`,e[$c]=!t}function nl(){el.getSSRProps=({value:e})=>{if(!e)return{style:{display:`none`}}}}var rl=Symbol(``);function il(e){let t=Gs();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>ol(e,n))},r=()=>{let r=e(t.proxy);t.ce?ol(t.ce,r):al(t.subTree,r),n(r)};aa(()=>{cr(r)}),ia(()=>{Mr(r,i,{flush:`post`});let e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),ca(()=>e.disconnect())})}function al(e,t){if(e.shapeFlag&128){let n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{al(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)ol(e.el,t);else if(e.type===z)e.children.forEach(e=>al(e,t));else if(e.type===hs){let{el:n,anchor:r}=e;for(;n&&(ol(n,t),n!==r);)n=n.nextSibling}}function ol(e,t){if(e.nodeType===1){let n=e.style,r=``;for(let e in t){let i=Le(t[e]);n.setProperty(`--${e}`,i),r+=`--${e}: ${i};`}n[rl]=r}}var sl=/(?:^|;)\s*display\s*:/;function cl(e,t,n){let r=e.style,i=v(n),a=!1;if(n&&!i){if(t){if(v(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??ul(r,t,``)}else for(let e in t)n[e]??ul(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?ul(r,i,``):ml(e,i,!v(t)&&t?t[i]:void 0,o)||ul(r,i,o)}}else if(i){if(t!==n){let e=r[rl];e&&(n+=`;`+e),r.cssText=n,a=sl.test(n)}}else t&&e.removeAttribute(`style`);Qc in e&&(e[Qc]=a?r.display:``,e[$c]&&(r.display=`none`))}var ll=/\s*!important$/;function ul(e,t,n){if(f(n))n.forEach(n=>ul(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=pl(e,t);ll.test(n)?e.setProperty(A(r),n.replace(ll,``),`important`):e[r]=n}}var dl=[`Webkit`,`Moz`,`ms`],fl={};function pl(e,t){let n=fl[t];if(n)return n;let r=k(t);if(r!==`filter`&&r in e)return fl[t]=r;r=re(r);for(let n=0;nTl||=(El.then(()=>Tl=0),Date.now());function Ol(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(f(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;ne.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Al=(e,t,n,r,i,a)=>{let c=i===`svg`;t===`class`?Zc(e,r,c):t===`style`?cl(e,n,r):o(t)?s(t)||xl(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):jl(e,t,r,c))?(_l(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&gl(e,t,r,c,a,t!==`value`)):e._isVueCE&&(Ml(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!v(r)))?_l(e,k(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),gl(e,t,r,c))};function jl(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&kl(t)&&_(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return kl(t)&&v(n)?!1:t in e}function Ml(e,t){let n=e._def.props;if(!n)return!1;let r=k(t);return Array.isArray(n)?n.some(e=>k(e)===r):Object.keys(n).some(e=>k(e)===r)}var Nl={};function Pl(e,t,n){let r=di(e,t);T(r)&&(r=c({},r,t));class i extends Ll{constructor(e){super(r,e,n)}}return i.def=r,i}var Fl=((e,t)=>Pl(e,t,Ou)),Il=typeof HTMLElement<`u`?HTMLElement:class{},Ll=class e extends Il{constructor(e,t={},n=Du){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==Du?this._root=this.shadowRoot:e.shadowRoot===!1?this._root=this:(this.attachShadow(c({},e.shadowRootOptions,{mode:`open`})),this._root=this.shadowRoot)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t&&=t.assignedSlot||t.parentNode||t.host;)if(t instanceof e){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{if(this._pendingResolve=void 0,this.isConnected)return this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,ir(()=>{this._connected||(this._ob&&=(this._ob.disconnect(),null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&=(this._teleportTargets.clear(),void 0))})}_processMutations(e){for(let t of e)this._setAttr(t.attributeName)}_resolveDef(){if(this._pendingResolve)return this._pendingResolve;for(let e=0;e{this._resolved=!0,this._pendingResolve=void 0;let{props:n,styles:r}=e,i;if(n&&!f(n))for(let e in n){let t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=se(this._props[e])),(i||=Object.create(null))[k(e)]=!0)}this._numberProps=i,this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;if(t)return this._pendingResolve=t().then(t=>{t.configureApp=this._def.configureApp,e(this._def=t,!0)}),this._pendingResolve;e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)d(this,e)||Object.defineProperty(this,e,{get:()=>yn(t[e])})}_resolveProps(e){let{props:t}=e,n=f(t)?t:Object.keys(t||{});for(let e of Object.keys(this))e[0]!==`_`&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(k))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!this._patching)}})}_setAttr(e){if(e.startsWith(`data-v-`))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):Nl,r=k(e);t&&this._numberProps&&this._numberProps[r]&&(n=se(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(this._dirty=!0,t===Nl?delete this._props[e]:(this._props[e]=t,e===`key`&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&(this._processMutations(n.takeRecords()),n.disconnect()),t===!0?this.setAttribute(A(e),``):typeof t==`string`||typeof t==`number`?this.setAttribute(A(e),t+``):t||this.removeAttribute(A(e)),n&&n.observe(this,{attributes:!0})}}_update(){let e=this._createVNode();this._app&&(e.appContext=this._app._context),Tu(e,this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=V(this._def,c(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,T(t[0])?c({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),A(e)!==e&&t(A(e),n)},this._setParent()}),t}_applyStyles(e,t,n){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let r=this._nonce,i=this.shadowRoot,a=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i),o=null;for(let s=e.length-1;s>=0;s--){let c=document.createElement(`style`);r&&c.setAttribute(`nonce`,r),c.textContent=e[s],i.insertBefore(c,o||a),o=c,s===0&&(n||this._styleAnchors.set(this._def,c),t&&this._styleAnchors.set(t,c))}}_getStyleAnchor(e){if(!e)return null;let t=this._styleAnchors.get(e);return t&&t.parentNode===this.shadowRoot?t:(t&&this._styleAnchors.delete(e),null)}_getRootStyleInsertionAnchor(e){for(let t=0;t(delete e.props.mode,e))({name:`TransitionGroup`,props:c({},Fc,{tag:String,moveClass:String}),setup(e,{slots:t}){let n=Gs(),r=Qr(),i,a;return oa(()=>{if(!i.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!Xl(i[0].el,n.vnode.el,t)){i=[];return}i.forEach(Kl),i.forEach(ql);let r=i.filter(Jl);Xc(n.vnode.el),r.forEach(e=>{let n=e.el,r=n.style;Hc(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[Ul]=e=>{e&&e.target!==n||(!e||e.propertyName.endsWith(`transform`))&&(n.removeEventListener(`transitionend`,i),n[Ul]=null,Uc(n,t))};n.addEventListener(`transitionend`,i)}),i=[]}),()=>{let o=F(e),s=zc(o),c=o.tag||z;if(i=[],a)for(let e=0;e{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=qc(r);return a.removeChild(r),o}var Zl=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return f(t)?e=>ie(t,e):t};function Ql(e){e.target.composing=!0}function $l(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var eu=Symbol(`_assign`),tu=Symbol(`_initialValue`);function nu(e,t,n){return t&&(e=e.trim()),n&&(e=oe(e)),e}var ru={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e.parentNode&&(e.type===`text`?e[tu]=e.defaultValue.replace(/[\r\n]/g,``):e.type===`textarea`&&(e[tu]=e.defaultValue.replace(/\r\n?/g,` +`))),e[eu]=Zl(i);let a=r||i.props&&i.props.type===`number`;vl(e,t?`change`:`input`,t=>{t.target.composing||e[eu](nu(e.value,n,a))}),(n||a)&&vl(e,`change`,()=>{e.value=nu(e.value,n,a)}),t||(vl(e,`compositionstart`,Ql),vl(e,`compositionend`,$l),vl(e,`change`,$l))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t??``,a=e[tu];delete e[tu],a!==void 0&&(e.type===`text`||e.type===`textarea`)&&e.value!==a?e[eu](nu(e.value,n,r)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[eu]=Zl(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?oe(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},iu={deep:!0,created(e,t,n){e[eu]=Zl(n),vl(e,`change`,()=>{let t=e._modelValue,n=lu(e),r=e.checked,i=e[eu];if(f(t)){let e=Me(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(m(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(uu(e,r))})},mounted:au,beforeUpdate(e,t,n){e[eu]=Zl(n),au(e,t,n)}};function au(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(f(t))i=Me(t,r.props.value)>-1;else if(m(t))i=t.has(r.props.value);else{if(t===n)return;i=je(t,uu(e,!0))}e.checked!==i&&(e.checked=i)}var ou={created(e,{value:t},n){e.checked=je(t,n.props.value),e[eu]=Zl(n),vl(e,`change`,()=>{e[eu](lu(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[eu]=Zl(r),t!==n&&(e.checked=je(t,r.props.value))}},su={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,vl(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?oe(lu(e)):lu(e));e[eu](e.multiple?m(e._modelValue)?new Set(t):t:t[0]),e._assigning=!0,ir(()=>{e._assigning=!1})}),e[eu]=Zl(r)},mounted(e,{value:t}){cu(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[eu]=Zl(n)},updated(e,{value:t}){e._assigning||cu(e,t)}};function cu(e,t){let n=e.multiple,r=f(t);if(!(n&&!r&&!m(t))){for(let i=0,a=e.options.length;iString(e)===String(o)):Me(t,o)>-1}else a.selected=t.has(o)}else if(je(lu(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function lu(e){return`_value`in e?e._value:e.value}function uu(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var du={created(e,t,n){pu(e,t,n,null,`created`)},mounted(e,t,n){pu(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){pu(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){pu(e,t,n,r,`updated`)}};function fu(e,t){switch(e){case`SELECT`:return su;case`TEXTAREA`:return ru;default:switch(t){case`checkbox`:return iu;case`radio`:return ou;default:return ru}}}function pu(e,t,n,r,i){let a=fu(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}function mu(){ru.getSSRProps=({value:e})=>({value:e}),ou.getSSRProps=({value:e},t)=>{if(t.props&&je(t.props.value,e))return{checked:!0}},iu.getSSRProps=({value:e},t)=>{if(f(e)){if(t.props&&Me(e,t.props.value)>-1)return{checked:!0}}else if(m(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},du.getSSRProps=(e,t)=>{if(typeof t.type!=`string`)return;let n=fu(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}var hu=[`ctrl`,`shift`,`alt`,`meta`],gu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>hu.some(n=>e[`${n}Key`]&&!t.includes(n))},_u=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=A(n.key);if(t.some(e=>e===r||vu[e]===r))return e(n)}))},bu=c({patchProp:Al},Ac),xu,Su=!1;function Cu(){return xu||=Wo(bu)}function wu(){return xu=Su?xu:Go(bu),Su=!0,xu}var Tu=((...e)=>{Cu().render(...e)}),Eu=((...e)=>{wu().hydrate(...e)}),Du=((...e)=>{let t=Cu().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Au(e);if(!r)return;let i=t._component;!_(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,ku(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t}),Ou=((...e)=>{let t=wu().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=Au(e);if(t)return n(t,!0,ku(t))},t});function ku(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function Au(e){return v(e)?document.querySelector(e):e}var ju=!1,Mu=()=>{ju||(ju=!0,mu(),nl())},Nu=Symbol(``),Pu=Symbol(``),Fu=Symbol(``),Iu=Symbol(``),Lu=Symbol(``),Ru=Symbol(``),zu=Symbol(``),Bu=Symbol(``),Vu=Symbol(``),Hu=Symbol(``),Uu=Symbol(``),Wu=Symbol(``),Gu=Symbol(``),Ku=Symbol(``),qu=Symbol(``),Ju=Symbol(``),Yu=Symbol(``),Xu=Symbol(``),Zu=Symbol(``),Qu=Symbol(``),$u=Symbol(``),ed=Symbol(``),td=Symbol(``),nd=Symbol(``),rd=Symbol(``),id=Symbol(``),ad=Symbol(``),od=Symbol(``),sd=Symbol(``),cd=Symbol(``),ld=Symbol(``),ud=Symbol(``),dd=Symbol(``),fd=Symbol(``),pd=Symbol(``),md=Symbol(``),hd=Symbol(``),gd=Symbol(``),_d=Symbol(``),vd={[Nu]:`Fragment`,[Pu]:`Teleport`,[Fu]:`Suspense`,[Iu]:`KeepAlive`,[Lu]:`BaseTransition`,[Ru]:`openBlock`,[zu]:`createBlock`,[Bu]:`createElementBlock`,[Vu]:`createVNode`,[Hu]:`createElementVNode`,[Uu]:`createCommentVNode`,[Wu]:`createTextVNode`,[Gu]:`createStaticVNode`,[Ku]:`resolveComponent`,[qu]:`resolveDynamicComponent`,[Ju]:`resolveDirective`,[Yu]:`resolveFilter`,[Xu]:`withDirectives`,[Zu]:`renderList`,[Qu]:`renderSlot`,[$u]:`createSlots`,[ed]:`toDisplayString`,[td]:`mergeProps`,[nd]:`normalizeClass`,[rd]:`normalizeStyle`,[id]:`normalizeProps`,[ad]:`guardReactiveProps`,[od]:`toHandlers`,[sd]:`camelize`,[cd]:`capitalize`,[ld]:`toHandlerKey`,[ud]:`setBlockTracking`,[dd]:`pushScopeId`,[fd]:`popScopeId`,[pd]:`withCtx`,[md]:`unref`,[hd]:`isRef`,[gd]:`withMemo`,[_d]:`isMemoSame`};function yd(e){Object.getOwnPropertySymbols(e).forEach(t=>{vd[t]=e[t]})}var bd={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:``};function xd(e,t=``){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:bd}}function Sd(e,t,n,r,i,a,o,s=!1,c=!1,l=!1,u=bd){return e&&(s?(e.helper(Ru),e.helper(jd(e.inSSR,l))):e.helper(Ad(e.inSSR,l)),o&&e.helper(Xu)),{type:13,tag:t,props:n,children:r,patchFlag:i,dynamicProps:a,directives:o,isBlock:s,disableTracking:c,isComponent:l,loc:u}}function Cd(e,t=bd){return{type:17,loc:t,elements:e}}function wd(e,t=bd){return{type:15,loc:t,properties:e}}function U(e,t){return{type:16,loc:bd,key:v(e)?W(e,!0):e,value:t}}function W(e,t=!1,n=bd,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function Td(e,t=bd){return{type:8,loc:t,children:e}}function G(e,t=[],n=bd){return{type:14,loc:n,callee:e,arguments:t}}function Ed(e,t=void 0,n=!1,r=!1,i=bd){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:i}}function Dd(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:bd}}function Od(e,t,n=!1,r=!1){return{type:20,index:e,value:t,needPauseTracking:n,inVOnce:r,needArraySpread:!1,loc:bd}}function kd(e){return{type:21,body:e,loc:bd}}function Ad(e,t){return e||t?Vu:Hu}function jd(e,t){return e||t?zu:Bu}function Md(e,{helper:t,removeHelper:n,inSSR:r}){e.isBlock||(e.isBlock=!0,n(Ad(r,e.isComponent)),t(Ru),t(jd(r,e.isComponent)))}var Nd=new Uint8Array([123,123]),Pd=new Uint8Array([125,125]);function Fd(e){return e>=97&&e<=122||e>=65&&e<=90}function Id(e){return e===32||e===10||e===9||e===12||e===13}function Ld(e){return e===47||e===62||Id(e)}function Rd(e){let t=new Uint8Array(e.length);for(let n=0;n100){let t=-1,n=r;for(;t+1>>1;this.newlines[r]=0;t--)if(e>this.newlines[t]){i=t;break}return i>=0&&(t=i+2,n=e-this.newlines[i]),{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){e===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex]){if(this.delimiterIndex===this.delimiterOpen.length-1){let e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++}else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.state=this.inRCDATA?32:1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(!(t?Ld(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!t){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(e===62||Id(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart=e||(this.state===28?this.currentSequence===zd.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}};function Vd(e,{compatConfig:t}){let n=t&&t[e];return e===`MODE`?n||3:n}function Hd(e,t){let n=Vd(`MODE`,t),r=Vd(e,t);return n===3?r===!0:r!==!1}function Ud(e,t,n,...r){return Hd(e,t)}function Wd(e){throw e}function Gd(e){}function K(e,t,n,r){let i=`https://vuejs.org/error-reference/#compiler-${e}`,a=SyntaxError(String(i));return a.code=e,a.loc=t,a}var Kd=e=>e.type===4&&e.isStatic;function qd(e){switch(e){case`Teleport`:case`teleport`:return Pu;case`Suspense`:case`suspense`:return Fu;case`KeepAlive`:case`keep-alive`:return Iu;case`BaseTransition`:case`base-transition`:return Lu}}var Jd=/^$|^\d|[^\$\w\xA0-\uFFFF]/,Yd=e=>!Jd.test(e),Xd=/[A-Za-z_$\xA0-\uFFFF]/,Zd=/[\.\?\w$\xA0-\uFFFF]/,Qd=/\s+[.[]\s*|\s*[.[]\s+/g,$d=e=>e.type===4?e.content:e.loc.source,ef=e=>{let t=$d(e).trim().replace(Qd,e=>e.trim()),n=0,r=[],i=0,a=0,o=null;for(let e=0;e|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,nf=e=>tf.test($d(e));function rf(e,t,n=!1){for(let r=0;re.type===7&&e.name===`bind`&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function cf(e){return e.type===5||e.type===2}function lf(e){return e.type===7&&e.name===`pre`}function uf(e){return e.type===7&&e.name===`slot`}function df(e){return e.type===1&&e.tagType===3}function ff(e){return e.type===1&&e.tagType===2}var pf=new Set([id,ad]);function mf(e,t=[]){if(e&&!v(e)&&e.type===14){let n=e.callee;if(!v(n)&&pf.has(n))return mf(e.arguments[0],t.concat(e))}return[e,t]}function hf(e,t,n){if(e.type!==13&&gf(e,t))return;let r,i=e.type===13?e.props:e.arguments[2],a=[],o;if(i&&!v(i)&&i.type===14){let e=mf(i);i=e[0],a=e[1],o=a[a.length-1]}if(i==null||v(i))r=wd([t]);else if(i.type===14){let e=i.arguments[0];!v(e)&&e.type===15?_f(t,e)||e.properties.unshift(t):i.callee===od?r=G(n.helper(td),[wd([t]),i]):i.arguments.unshift(wd([t])),!r&&(r=i)}else i.type===15?(_f(t,i)||i.properties.unshift(t),r=i):(r=G(n.helper(td),[wd([t]),i]),o&&o.callee===ad&&(o=a[a.length-2]));e.type===13?o?o.arguments[0]=r:e.props=r:o?o.arguments[0]=r:e.arguments[2]=r}function gf(e,t){var n,r,i;if(t.key.type!==4||t.key.content!==`key`)return!1;let a=e.arguments[2];if(a&&!v(a)){let[e]=mf(a);if(e&&!v(e)&&e.type===15&&_f(t,e))return!0}return(n=e.arguments)[2]||(n[2]=`{}`),(r=e.arguments)[3]||(r[3]=`undefined`),(i=e.arguments)[4]||(i[4]=`undefined`),e.arguments[5]=t.value,!0}function _f(e,t){let n=!1;if(e.key.type===4){let r=e.key.content;n=t.properties.some(e=>e.key.type===4&&e.key.content===r)}return n}function vf(e,t){return`_${t}_${e.replace(/[^\w]/g,(t,n)=>t===`-`?`_`:e.charCodeAt(n).toString())}`}function yf(e){return e.type===14&&e.callee===gd?e.arguments[1].returns:e}var bf=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function xf(e){for(let t=0;t0,isVoidTag:a,isPreTag:a,isIgnoreNewlineTag:a,isCustomElement:a,onError:Wd,onWarn:Gd,comments:!1,prefixIdentifiers:!1},q=wf,Tf=null,Ef=``,Df=null,J=null,Of=``,kf=-1,Af=-1,jf=0,Mf=!1,Nf=null,Y=[],X=new Bd(Y,{onerr:tp,ontext(e,t){Rf(Z(e,t),e,t)},ontextentity(e,t,n){Rf(e,t,n)},oninterpolation(e,t){if(Mf)return Rf(Z(e,t),e,t);let n=e+X.delimiterOpen.length,r=t-X.delimiterClose.length;for(;Id(Ef.charCodeAt(n));)n++;for(;Id(Ef.charCodeAt(r-1));)r--;let i=Z(n,r);i.includes(`&`)&&(i=q.decodeEntities(i,!1)),Xf({type:5,content:ep(i,!1,Q(n,r)),loc:Q(e,t)})},onopentagname(e,t){let n=Z(e,t);Df={type:1,tag:n,ns:q.getNamespace(n,Y[0],q.ns),tagType:0,props:[],children:[],loc:Q(e-1,t),codegenNode:void 0}},onopentagend(e){Lf(e)},onclosetag(e,t){let n=Z(e,t);if(!q.isVoidTag(n)){let r=!1;for(let e=0;e0&&tp(24,Y[0].loc.start.offset);for(let n=0;n<=e;n++)zf(Y.shift(),t,n(e.type===7?e.rawName:e.name)===n)&&tp(2,t)},onattribend(e,t){if(Df&&J){if(Qf(J.loc,t),e!==0){if(Of.includes(`&`)&&(Of=q.decodeEntities(Of,!0)),J.type===6)J.name===`class`&&(Of=Yf(Of).trim()),e===1&&!Of&&tp(13,t),J.value={type:2,content:Of,loc:e===1?Q(kf,Af):Q(kf-1,Af+1)},X.inSFCRoot&&Df.tag===`template`&&J.name===`lang`&&Of&&Of!==`html`&&X.enterRCDATA(Rd(`e.content===`sync`))>-1&&Ud(`COMPILER_V_BIND_SYNC`,q,J.loc,J.arg.loc.source)&&(J.name=`model`,J.modifiers.splice(e,1))}}(J.type!==7||J.name!==`pre`)&&Df.props.push(J)}Of=``,kf=Af=-1},oncomment(e,t){q.comments&&Xf({type:3,content:Z(e,t),loc:Q(e-4,t+3)})},onend(){let e=Ef.length;for(let t=0;t{let i=t.start.offset+n;return ep(e,!1,Q(i,i+e.length),0,+!!r)},s={source:o(a.trim(),n.indexOf(a,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1},c=i.trim().replace(Ff,``).trim(),l=i.indexOf(c),u=c.match(Pf);if(u){c=c.replace(Pf,``).trim();let e=u[1].trim(),t;if(e&&(t=n.indexOf(e,l+c.length),s.key=o(e,t,!0)),u[2]){let r=u[2].trim();r&&(s.index=o(r,n.indexOf(r,s.key?t+e.length:l+c.length),!0))}}return c&&(s.value=o(c,l,!0)),s}function Z(e,t){return Ef.slice(e,t)}function Lf(e){X.inSFCRoot&&(Df.innerLoc=Q(e+1,e+1)),Xf(Df);let{tag:t,ns:n}=Df;n===0&&q.isPreTag(t)&&jf++,q.isVoidTag(t)?zf(Df,e):(Y.unshift(Df),(n===1||n===2)&&(X.inXML=!0)),Df=null}function Rf(e,t,n){{let t=Y[0]&&Y[0].tag;t!==`script`&&t!==`style`&&e.includes(`&`)&&(e=q.decodeEntities(e,!1))}let r=Y[0]||Tf,i=r.children[r.children.length-1];i&&i.type===2?(i.content+=e,Qf(i.loc,n)):r.children.push({type:2,content:e,loc:Q(t,n)})}function zf(e,t,n=!1){n?Qf(e.loc,Vf(t,60)):Qf(e.loc,Bf(t,62)+1),X.inSFCRoot&&(e.children.length?e.innerLoc.end=c({},e.children[e.children.length-1].loc.end):e.innerLoc.end=c({},e.innerLoc.start),e.innerLoc.source=Z(e.innerLoc.start.offset,e.innerLoc.end.offset));let{tag:r,ns:i,children:a}=e;if(Mf||(r===`slot`?e.tagType=2:Uf(e)?e.tagType=3:Wf(e)&&(e.tagType=1)),X.inRCDATA||(e.children=qf(a)),i===0&&q.isIgnoreNewlineTag(r)){let e=a[0];e&&e.type===2&&(e.content=e.content.replace(/^\r?\n/,``))}i===0&&q.isPreTag(r)&&jf--,Nf===e&&(Mf=X.inVPre=!1,Nf=null),X.inXML&&(Y[0]?Y[0].ns:q.ns)===0&&(X.inXML=!1);{let t=e.props;if(!X.inSFCRoot&&Hd(`COMPILER_NATIVE_TEMPLATE`,q)&&e.tag===`template`&&!Uf(e)){let t=Y[0]||Tf,n=t.children.indexOf(e);t.children.splice(n,1,...e.children)}let n=t.find(e=>e.type===6&&e.name===`inline-template`);n&&Ud(`COMPILER_INLINE_TEMPLATE`,q,n.loc)&&e.children.length&&(n.value={type:2,content:Z(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function Bf(e,t){let n=e;for(;Ef.charCodeAt(n)!==t&&n=0;)n--;return n}var Hf=new Set([`if`,`else`,`else-if`,`for`,`slot`]);function Uf({tag:e,props:t}){if(e===`template`){for(let e=0;e64&&e<91}var Kf=/\r\n/g;function qf(e){let t=q.whitespace!==`preserve`,n=!1;for(let r=0;re.type!==3);return t.length===1&&t[0].type===1&&!ff(t[0])?t[0]:null}function op(e,t,n,r=!1,i=!1){let{children:a}=e,o=[];for(let t=0;t0){if(e>=2){s.codegenNode.patchFlag=-1,o.push(s);continue}}else{let e=s.codegenNode;if(e.type===13){let t=e.patchFlag;if((t===void 0||t===512||t===1)&&up(s,n)>=2){let t=dp(s);t&&(e.props=n.hoist(t))}e.dynamicProps&&=n.hoist(e.dynamicProps)}}}else if(s.type===12&&(r?0:sp(s,n))>=2){s.codegenNode.type===14&&s.codegenNode.arguments.length>0&&s.codegenNode.arguments.push(`-1`),o.push(s);continue}if(s.type===1){let t=s.tagType===1;t&&n.scopes.vSlot++,op(s,e,n,!1,i),t&&n.scopes.vSlot--}else if(s.type===11)op(s,e,n,s.children.length===1,!0);else if(s.type===9)for(let t=0;te.key===t||e.key.content===t);return n&&n.value}}o.length&&n.transformHoist&&n.transformHoist(a,n,e)}function sp(e,t){let{constantCache:n}=t;switch(e.type){case 1:if(e.tagType!==0)return 0;let r=n.get(e);if(r!==void 0)return r;let i=e.codegenNode;if(i.type!==13||i.isBlock&&e.tag!==`svg`&&e.tag!==`foreignObject`&&e.tag!==`math`)return 0;if(i.patchFlag===void 0){let r=3,a=up(e,t);if(a===0)return n.set(e,0),0;a1)for(let i=0;in&&(D.childIndex--,D.onNodeRemoved()),D.parent.children.splice(n,1)},onNodeRemoved:i,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){v(e)&&(e=W(e)),D.hoists.push(e);let t=W(`_hoisted_${D.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1,n=!1){let r=Od(D.cached.length,e,t,n);return D.cached.push(r),r}};return D.filters=new Set,D}function pp(e,t){let n=fp(e,t);gp(e,n),t.hoistStatic&&ip(e,n),t.ssr||mp(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function mp(e,t){let{helper:n}=t,{children:r}=e;if(r.length===1){let n=ap(e);if(n&&n.codegenNode){let r=n.codegenNode;r.type===13&&Md(r,t),e.codegenNode=r}else e.codegenNode=r[0]}else r.length>1&&(e.codegenNode=Sd(t,n(Nu),void 0,e.children,64,void 0,void 0,!0,void 0,!1))}function hp(e,t){let n=0,r=()=>{n--};for(;nt===e:t=>e.test(t);return(e,r)=>{if(e.type===1){let{props:i}=e;if(e.tagType===3&&i.some(uf))return;let a=[];for(let o=0;o`${vd[e]}: _${vd[e]}`;function bp(e,{mode:t=`function`,prefixIdentifiers:n=t===`module`,sourceMap:r=!1,filename:i=`template.vue.html`,scopeId:a=null,optimizeImports:o=!1,runtimeGlobalName:s=`Vue`,runtimeModuleName:c=`vue`,ssrRuntimeModuleName:l=`vue/server-renderer`,ssr:u=!1,isTS:d=!1,inSSR:f=!1}){let p={mode:t,prefixIdentifiers:n,sourceMap:r,filename:i,scopeId:a,optimizeImports:o,runtimeGlobalName:s,runtimeModuleName:c,ssrRuntimeModuleName:l,ssr:u,isTS:d,inSSR:f,source:e.source,code:``,column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(e){return`_${vd[e]}`},push(e,t=-2,n){p.code+=e},indent(){m(++p.indentLevel)},deindent(e=!1){e?--p.indentLevel:m(--p.indentLevel)},newline(){m(p.indentLevel)}};function m(e){p.push(` +`+` `.repeat(e),0)}return p}function xp(e,t={}){let n=bp(e,t);t.onContextCreated&&t.onContextCreated(n);let{mode:r,push:i,prefixIdentifiers:a,indent:o,deindent:s,newline:c,scopeId:l,ssr:u}=n,d=Array.from(e.helpers),f=d.length>0,p=!a&&r!==`module`;if(Sp(e,n),i(`function ${u?`ssrRender`:`render`}(${(u?[`_ctx`,`_push`,`_parent`,`_attrs`]:[`_ctx`,`_cache`]).join(`, `)}) {`),o(),p&&(i(`with (_ctx) {`),o(),f&&(i(`const { ${d.map(yp).join(`, `)} } = _Vue +`,-1),c())),e.components.length&&(Cp(e.components,`component`,n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(Cp(e.directives,`directive`,n),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),Cp(e.filters,`filter`,n),c()),e.temps>0){i(`let `);for(let t=0;t0?`, `:``}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(i(` +`,0),c()),u||i(`return `),e.codegenNode?Dp(e.codegenNode,n):i(`null`),p&&(s(),i(`}`)),s(),i(`}`),{ast:e,code:n.code,preamble:``,map:n.map?n.map.toJSON():void 0}}function Sp(e,t){let{ssr:n,prefixIdentifiers:r,push:i,newline:a,runtimeModuleName:o,runtimeGlobalName:s,ssrRuntimeModuleName:c}=t,l=s,u=Array.from(e.helpers);u.length>0&&(i(`const _Vue = ${l} +`,-1),e.hoists.length&&i(`const { ${[Vu,Hu,Uu,Wu,Gu].filter(e=>u.includes(e)).map(yp).join(`, `)} } = _Vue +`,-1)),wp(e.hoists,t),a(),i(`return `)}function Cp(e,t,{helper:n,push:r,newline:i,isTS:a}){let o=n(t===`filter`?Yu:t===`component`?Ku:Ju);for(let n=0;n3||!1;t.push(`[`),n&&t.indent(),Ep(e,t,n),n&&t.deindent(),t.push(`]`)}function Ep(e,t,n=!1,r=!0){let{push:i,newline:a}=t;for(let o=0;oe||`null`)}function Ip(e,t){let{push:n,helper:r,pure:i}=t,a=v(e.callee)?e.callee:r(e.callee);i&&n(vp),n(a+`(`,-2,e),Ep(e.arguments,t),n(`)`)}function Lp(e,t){let{push:n,indent:r,deindent:i,newline:a}=t,{properties:o}=e;if(!o.length){n(`{}`,-2,e);return}let s=o.length>1||!1;n(s?`{`:`{ `),s&&r();for(let e=0;e `),(c||s)&&(n(`{`),r()),o?(c&&n(`return `),f(o)?Tp(o,t):Dp(o,t)):s&&Dp(s,t),(c||s)&&(i(),n(`}`)),l&&(e.isNonScopedSlot&&n(`, undefined, true`),n(`)`))}function Bp(e,t){let{test:n,consequent:r,alternate:i,newline:a}=e,{push:o,indent:s,deindent:c,newline:l}=t;if(n.type===4){let e=!Yd(n.content);e&&o(`(`),kp(n,t),e&&o(`)`)}else o(`(`),Dp(n,t),o(`)`);a&&s(),t.indentLevel++,a||o(` `),o(`? `),Dp(r,t),t.indentLevel--,a&&l(),a||o(` `),o(`: `);let u=i.type===19;u||t.indentLevel++,Dp(i,t),u||t.indentLevel--,a&&c(!0)}function Vp(e,t){let{push:n,helper:r,indent:i,deindent:a,newline:o}=t,{needPauseTracking:s,needArraySpread:c}=e;c&&n(`[...(`),n(`_cache[${e.index}] || (`),s&&(i(),n(`${r(ud)}(-1`),e.inVOnce&&n(`, true`),n(`),`),o(),n(`(`)),n(`_cache[${e.index}] = `),Dp(e.value,t),s&&(n(`).cacheIndex = ${e.index},`),o(),n(`${r(ud)}(1),`),o(),n(`_cache[${e.index}]`),a()),n(`)`),c&&n(`)]`)}RegExp(`\\b`+`arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield`.split(`,`).join(`\\b|\\b`)+`\\b`);var Hp=_p(/^(?:if|else|else-if)$/,(e,t,n)=>Up(e,t,n,(e,t,r)=>{let i=n.parent.children,a=i.indexOf(e),o=0;for(;a-->=0;){let e=i[a];e&&e.type===9&&(o+=e.branches.length)}return()=>{if(r)e.codegenNode=Gp(t,o,n);else{let r=qp(e.codegenNode);r.alternate=Gp(t,o+e.branches.length-1,n)}}}));function Up(e,t,n,r){if(t.name!==`else`&&(!t.exp||!t.exp.content.trim())){let r=t.exp?t.exp.loc:e.loc;n.onError(K(28,t.loc)),t.exp=W(`true`,!1,r)}if(t.name===`if`){let i=Wp(e,t),a={type:9,loc:Zf(e.loc),branches:[i]};if(n.replaceNode(a),r)return r(a,i,!0)}else{let i=n.parent.children,a=i.indexOf(e);for(;a-->=-1;){let o=i[a];if(o&&Cf(o)){n.removeNode(o);continue}if(o&&o.type===9){(t.name===`else-if`||t.name===`else`)&&o.branches[o.branches.length-1].condition===void 0&&n.onError(K(30,e.loc)),n.removeNode();let i=Wp(e,t);o.branches.push(i);let a=r&&r(o,i,!1);gp(i,n),a&&a(),n.currentNode=null}else n.onError(K(30,e.loc));break}}}function Wp(e,t){let n=e.tagType===3;return{type:10,loc:e.loc,condition:t.name===`else`?void 0:t.exp,children:n&&!rf(e,`for`)?e.children:[e],userKey:af(e,`key`),isTemplateIf:n}}function Gp(e,t,n){return e.condition?Dd(e.condition,Kp(e,t,n),G(n.helper(Uu),[`""`,`true`])):Kp(e,t,n)}function Kp(e,t,n){let{helper:r}=n,i=U(`key`,W(`${t}`,!1,bd,2)),{children:a}=e,o=a[0];if(a.length!==1||o.type!==1){if(a.length===1&&o.type===11){let e=o.codegenNode;return hf(e,i,n),e}return Sd(n,r(Nu),wd([i]),a,64,void 0,void 0,!0,!1,!1,e.loc)}{let e=o.codegenNode,t=yf(e);return t.type===13&&Md(t,n),hf(t,i,n),e}}function qp(e){for(;;)if(e.type===19){if(e.alternate.type===19)e=e.alternate;else return e}else e.type===20&&(e=e.value)}var Jp=_p(`for`,(e,t,n)=>{let{helper:r,removeHelper:i}=n;return Yp(e,t,n,t=>{let a=G(r(Zu),[t.source]),o=df(e),s=rf(e,`memo`),c=af(e,`key`,!1,!0);c&&c.type;let l=c&&(c.type===6?c.value?W(c.value.content,!0):void 0:c.exp),u=l?U(`key`,l):null,d=t.source.type===4&&t.source.constType>0,f=d?64:c?128:256;return t.codegenNode=Sd(n,r(Nu),void 0,a,f,void 0,void 0,!0,!d,!1,e.loc),()=>{let c,{children:f}=t,p=f.length!==1||f[0].type!==1,m=ff(e)?e:o&&e.children.length===1&&ff(e.children[0])?e.children[0]:null;if(m)c=m.codegenNode,o&&u&&hf(c,u,n);else if(p)c=Sd(n,r(Nu),u?wd([u]):void 0,e.children,64,void 0,void 0,!0,void 0,!1);else{c=f[0].codegenNode,o&&u&&hf(c,u,n);let e=!d||c.isBlockRequired===!0;c.isBlock!==e&&(c.isBlock?(i(Ru),i(jd(n.inSSR,c.isComponent))):i(Ad(n.inSSR,c.isComponent))),c.isBlock=e,c.isBlock?(r(Ru),r(jd(n.inSSR,c.isComponent))):(r(Ad(n.inSSR,c.isComponent)),c.needsPatch&&(c.patchFlag=(c.patchFlag??0)|512))}if(s){let e=Ed(Zp(t.parseResult,[W(`_cached`)]));e.body=kd([Td([`const _memo = (`,s.exp,`)`]),Td([`if (_cached && _cached.el`,...l?[` && _cached.key === `,l]:[],` && ${n.helperString(_d)}(_cached, _memo)) return _cached`]),Td([`const _item = `,c]),W(`_item.memo = _memo`),W(`return _item`)]),a.arguments.push(e,W(`_cache`),W(String(n.cached.length))),n.cached.push(null)}else a.arguments.push(Ed(Zp(t.parseResult),c,!0))}})});function Yp(e,t,n,r){if(!t.exp){n.onError(K(31,t.loc));return}let i=t.forParseResult;if(!i){n.onError(K(32,t.loc));return}Xp(i,n);let{addIdentifiers:a,removeIdentifiers:o,scopes:s}=n,{source:c,value:l,key:u,index:d}=i,f={type:11,loc:t.loc,source:c,valueAlias:l,keyAlias:u,objectIndexAlias:d,parseResult:i,children:df(e)?e.children:[e]};n.replaceNode(f),s.vFor++;let p=r&&r(f);return()=>{s.vFor--,p&&p()}}function Xp(e,t){e.finalized||=!0}function Zp({value:e,key:t,index:n},r=[]){return Qp([e,t,n,...r])}function Qp(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((e,t)=>e||W(`_`.repeat(t+1),!1))}var $p=W(`undefined`,!1),em=(e,t)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){let n=rf(e,`slot`);if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},tm=(e,t,n,r)=>Ed(e,n,!1,!0,n.length?n[0].loc:r);function nm(e,t,n=tm){t.helper(pd);let{children:r,loc:i}=e,a=[],o=[],s=t.scopes.vSlot>0||t.scopes.vFor>0,c=rf(e,`slot`,!0);if(c){let{arg:e,exp:t}=c;e&&!Kd(e)&&(s=!0),a.push(U(e||W(`default`,!0),n(t,void 0,r,i)))}let l=!1,u=!1,d=[],f=new Set,p=0;for(let e=0;e{let a=n(e,void 0,r,i);return t.compatConfig&&(a.isNonScopedSlot=!0),U(`default`,a)};l?d.length&&!d.every(Sf)&&(u?t.onError(K(39,d[0].loc)):a.push(e(void 0,d))):a.push(e(void 0,r))}let m=s?2:im(e.children)?3:1,h=wd(a.concat(U(`_`,W(m+``,!1))),i);return o.length&&(h=G(t.helper($u),[h,Cd(o)])),{slots:h,hasDynamicSlots:s}}function rm(e,t,n){let r=[U(`name`,e),U(`fn`,t)];return n!=null&&r.push(U(`key`,W(String(n),!0))),wd(r)}function im(e){for(let t=0;tfunction(){if(e=t.currentNode,e.type!==1||e.tagType!==0&&e.tagType!==1)return;let{tag:n,props:r}=e,i=e.tagType===1,a=i?sm(e,t):`"${n}"`,o=b(a)&&a.callee===qu,s,c,l=0,u,d,f,p=!1,m=!1,h=o||a===Pu||a===Fu||!i&&(n===`svg`||n===`foreignObject`||n===`math`);if(r.length>0){let n=cm(e,t,void 0,i,o);s=n.props,l=n.patchFlag,d=n.dynamicPropNames,p=n.needsPatch,m=n.isBlockRequired;let r=n.directives;f=r&&r.length?Cd(r.map(e=>dm(e,t))):void 0,n.shouldUseBlock&&(h=!0)}if(e.children.length>0){if(a===Iu&&(h=!0,l|=1024),i&&a!==Pu&&a!==Iu){let{slots:n,hasDynamicSlots:r}=nm(e,t);c=n,r&&(l|=1024)}else if(e.children.length===1&&a!==Pu){let n=e.children[0],r=n.type,i=r===5||r===8;i&&sp(n,t)===0&&(l|=1),c=i||r===2?n:e.children}else c=e.children}d&&d.length&&(u=fm(d));let g=e.codegenNode=Sd(t,a,s,c,l===0?void 0:l,u,f,!!h,!1,i,e.loc);p&&=l===0||l===32,p&&(g.needsPatch=!0),m&&(g.isBlockRequired=!0)};function sm(e,t,n=!1){let{tag:r}=e,i=pm(r),a=af(e,`is`,!1,!0);if(a){if(i||Hd(`COMPILER_IS_ON_ELEMENT`,t)){let e;if(a.type===6?e=a.value&&W(a.value.content,!0):(e=a.exp,e||=W(`is`,!1,a.arg.loc)),e)return G(t.helper(qu),[e])}else a.type===6&&a.value.content.startsWith(`vue:`)&&(r=a.value.content.slice(4))}let o=qd(r)||t.isBuiltInComponent(r);return o?(n||t.helper(o),o):(t.helper(Ku),t.components.add(r),vf(r,`component`))}function cm(e,t,n=e.props,r,i,a=!1){let{tag:s,loc:c,children:l}=e,u=[],d=[],f=[],p=l.length>0,m=!1,h=!1,g=0,_=!1,v=!1,b=!1,x=!1,S=!1,C=!1,w=[],T=e=>{u.length&&(d.push(wd(lm(u),c)),u=[]),e&&d.push(e)},E=()=>{t.scopes.vFor>0&&u.push(U(W(`ref_for`,!0),W(`true`)))},te=({key:e,value:n})=>{if(Kd(e)){let a=e.content,s=o(a);if(s&&(!r||i)&&a.toLowerCase()!==`onclick`&&a!==`onUpdate:modelValue`&&!D(a)&&(x=!0),s&&D(a)&&(C=!0),a===`ref`&&(_=!0),s&&n.type===14&&(n=n.arguments[0]),n.type===20||(n.type===4||n.type===8)&&sp(n,t)>0)return;a===`class`?v=!0:a===`style`?b=!0:a!==`ref`&&a!==`key`&&!w.includes(a)&&w.push(a),r&&(a===`class`||a===`style`)&&!w.includes(a)&&w.push(a)}else S=!0};for(let i=0;ie.content===`prop`)&&(g|=32);let C=t.directiveTransforms[n];if(C){let{props:n,needRuntime:r}=C(o,e,t);!a&&n.forEach(te),x&&i&&!Kd(i)?T(wd(n,c)):u.push(...n),r&&(f.push(o),y(r)&&am.set(o,r))}else ee(n)||(f.push(o),p&&(m=!0,h=!0))}}let O;d.length?(T(),O=d.length>1?G(t.helper(td),d,c):d[0]):u.length&&(O=wd(lm(u),c)),S?g|=16:(v&&!r&&(g|=2),b&&!r&&(g|=4),w.length&&(g|=8),x&&(g|=32));let ne=(g===0||g===32)&&(_||C||f.length>0);if(!m&&ne&&(g|=512),!t.inSSR&&O)switch(O.type){case 15:let e=-1,n=-1,r=!1;for(let t=0;tU(e,t)),i))}return Cd(n,e.loc)}function fm(e){let t=`[`;for(let n=0,r=e.length;n{if(ff(e)){let{children:n,loc:r}=e,{slotName:i,slotProps:a}=hm(e,t),o=[t.prefixIdentifiers?`_ctx.$slots`:`$slots`,i,`{}`,`undefined`,`true`],s=2;a&&(o[2]=a,s=3),n.length&&(o[3]=Ed([],n,!1,!1,r),s=4),t.scopeId&&!t.slotted&&(s=5),o.splice(s),e.codegenNode=G(t.helper(Qu),o,r)}};function hm(e,t){let n=`"default"`,r,i=[];for(let t=0;t0){let{props:n,directives:a}=cm(e,t,i,!1,!1);r=n,a.length&&t.onError(K(36,a[0].loc))}return{slotName:n,slotProps:r}}var gm=(e,t,n,r)=>{let{loc:i,modifiers:a,arg:o}=e;!e.exp&&!a.length&&n.onError(K(35,i));let s;if(o.type===4){if(o.isStatic){let e=o.content;e.startsWith(`vue:`)&&(e=`vnode-${e.slice(4)}`),s=W(t.tagType!==0||e.startsWith(`vnode`)||!/[A-Z]/.test(e)?j(k(e)):`on:${e}`,!0,o.loc)}else s=Td([`${n.helperString(ld)}(`,o,`)`])}else s=o,s.children.unshift(`${n.helperString(ld)}(`),s.children.push(`)`);let c=e.exp;c&&!c.content.trim()&&(c=void 0);let l=n.cacheHandlers&&!c&&!n.inVOnce;if(c){let e=ef(c),t=!(e||nf(c)),n=c.content.includes(`;`);(t||l&&e)&&(c=Td([`${t?`$event`:`(...args)`} => ${n?`{`:`(`}`,c,n?`}`:`)`]))}let u={props:[U(s,c||W(`() => {}`,!1,i))]};return r&&(u=r(u)),l&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach(e=>e.key.isHandlerKey=!0),u},_m=(e,t,n)=>{let{modifiers:r,loc:i}=e,a=e.arg,{exp:o}=e;return o&&o.type===4&&!o.content.trim()&&(o=void 0),a.type===4?a.isStatic||(a.content=a.content?`${a.content} || ""`:`""`):(a.children.unshift(`(`),a.children.push(`) || ""`)),r.some(e=>e.content===`camel`)&&(a.type===4?a.content=a.isStatic?k(a.content):`${n.helperString(sd)}(${a.content})`:(a.children.unshift(`${n.helperString(sd)}(`),a.children.push(`)`))),n.inSSR||(r.some(e=>e.content===`prop`)&&vm(a,`.`),r.some(e=>e.content===`attr`)&&vm(a,`^`)),{props:[U(a,o)]}},vm=(e,t)=>{e.type===4?e.content=e.isStatic?t+e.content:`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(`)`))},ym=(e,t)=>{if(e.type===0||e.type===1||e.type===11||e.type===10)return()=>{let n=e.children,r,i=!1;for(let e=0;ee.type===7&&!t.directiveTransforms[e.name])&&e.tag!==`template`)))for(let e=0;e{if(e.type===1&&rf(e,`once`,!0))return bm.has(e)||t.inVOnce||t.inSSR?void 0:(bm.add(e),t.inVOnce=!0,t.helper(ud),()=>{t.inVOnce=!1;let e=t.currentNode;e.codegenNode&&=t.cache(e.codegenNode,!0,!0)})},Sm=(e,t,n)=>{let{exp:r,arg:i}=e;if(!r)return n.onError(K(41,e.loc)),Cm();let a=r.loc.source.trim(),o=r.type===4?r.content:a,s=n.bindingMetadata[a];if(s===`props`||s===`props-aliased`)return n.onError(K(44,r.loc)),Cm();if(s===`literal-const`||s===`setup-const`)return n.onError(K(45,r.loc)),Cm();if(!o.trim()||!ef(r))return n.onError(K(42,r.loc)),Cm();let c=i||W(`modelValue`,!0),l=i?Kd(i)?`onUpdate:${k(i.content)}`:Td([`"onUpdate:" + `,i]):`onUpdate:modelValue`,u;u=Td([`${n.isTS?`($event: any)`:`$event`} => ((`,r,`) = $event)`]);let d=[U(c,e.exp),U(l,u)];if(e.modifiers.length&&t.tagType===1){let t=e.modifiers.map(e=>e.content).map(e=>(Yd(e)?e:JSON.stringify(e))+`: true`).join(`, `),n=i?Kd(i)?`${i.content}Modifiers`:Td([i,` + "Modifiers"`]):`modelModifiers`;d.push(U(n,W(`{ ${t} }`,!1,e.loc,2)))}return Cm(d)};function Cm(e=[]){return{props:e}}var wm=/[\w).+\-_$\]]/,Tm=(e,t)=>{Hd(`COMPILER_FILTERS`,t)&&(e.type===5?Em(e.content,t):e.type===1&&e.props.forEach(e=>{e.type===7&&e.name!==`for`&&e.exp&&Em(e.exp,t)}))};function Em(e,t){if(e.type===4)Dm(e,t);else for(let n=0;n=0&&(t=n.charAt(e),t===` `);e--);(!t||!wm.test(t))&&(o=!0)}}m===void 0?m=n.slice(0,p).trim():u!==0&&g();function g(){h.push(n.slice(u,p).trim()),u=p+1}if(h.length){for(p=0;p{if(e.type===1){let n=rf(e,`memo`);return!n||km.has(e)||t.inSSR?void 0:(km.add(e),()=>{let r=e.codegenNode||t.currentNode.codegenNode;r&&r.type===13&&(e.tagType!==1&&Md(r,t),e.codegenNode=G(t.helper(gd),[n.exp,Ed(void 0,r),`_cache`,String(t.cached.length)]),t.cached.push(null))})}},jm=(e,t)=>{if(e.type===1){for(let n of e.props)if(n.type===7&&n.name===`bind`&&(!n.exp||n.exp.type===4&&!n.exp.content.trim())&&n.arg){let e=n.arg;if(e.type!==4||!e.isStatic)t.onError(K(53,e.loc)),n.exp=W(``,!0,e.loc);else{let t=k(e.content);(Xd.test(t[0])||t[0]===`-`)&&(n.exp=W(t,!1,e.loc))}}}};function Mm(e){return[[jm,xm,Hp,Am,Jp,Tm,mm,om,em,ym],{on:gm,bind:_m,model:Sm}]}function Nm(e,t={}){let n=t.onError||Wd,r=t.mode===`module`;t.prefixIdentifiers===!0?n(K(48)):r&&n(K(49)),t.cacheHandlers&&n(K(50)),t.scopeId&&!r&&n(K(51));let i=c({},t,{prefixIdentifiers:!1}),a=v(e)?rp(e,i):e,[o,s]=Mm();return pp(a,c({},i,{nodeTransforms:[...o,...t.nodeTransforms||[]],directiveTransforms:c({},s,t.directiveTransforms||{})})),xp(a,i)}var Pm=()=>({props:[]}),Fm=Symbol(``),Im=Symbol(``),Lm=Symbol(``),Rm=Symbol(``),zm=Symbol(``),Bm=Symbol(``),Vm=Symbol(``),Hm=Symbol(``),Um=Symbol(``),Wm=Symbol(``);yd({[Fm]:`vModelRadio`,[Im]:`vModelCheckbox`,[Lm]:`vModelText`,[Rm]:`vModelSelect`,[zm]:`vModelDynamic`,[Bm]:`withModifiers`,[Vm]:`withKeys`,[Hm]:`vShow`,[Um]:`Transition`,[Wm]:`TransitionGroup`});var Gm;function Km(e,t=!1){return Gm||=document.createElement(`div`),t?(Gm.innerHTML=`
    `,Gm.children[0].getAttribute(`foo`)):(Gm.innerHTML=e,Gm.textContent)}var qm={parseMode:`html`,isVoidTag:Ee,isNativeTag:e=>Ce(e)||we(e)||Te(e),isPreTag:e=>e===`pre`,isIgnoreNewlineTag:e=>e===`pre`||e===`textarea`,decodeEntities:Km,isBuiltInComponent:e=>{if(e===`Transition`||e===`transition`)return Um;if(e===`TransitionGroup`||e===`transition-group`)return Wm},getNamespace(e,t,n){let r=t?t.ns:n;if(t&&r===2){if(t.tag===`annotation-xml`){if(e===`svg`)return 1;t.props.some(e=>e.type===6&&e.name===`encoding`&&e.value!=null&&(e.value.content===`text/html`||e.value.content===`application/xhtml+xml`))&&(r=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&e!==`mglyph`&&e!==`malignmark`&&(r=0)}else t&&r===1&&(t.tag===`foreignObject`||t.tag===`desc`||t.tag===`title`)&&(r=0);if(r===0){if(e===`svg`)return 1;if(e===`math`)return 2}return r}},Jm=e=>{e.type===1&&e.props.forEach((t,n)=>{t.type===6&&t.name===`style`&&t.value&&(e.props[n]={type:7,name:`bind`,arg:W(`style`,!0,t.loc),exp:Ym(t.value.content,t.loc),modifiers:[],loc:t.loc})})},Ym=(e,t)=>{let n=ge(e);return W(JSON.stringify(n),!1,t,3)};function Xm(e,t){return K(e,t,void 0)}var Zm=(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(Xm(54,i)),t.children.length&&(n.onError(Xm(55,i)),t.children.length=0),{props:[U(W(`innerHTML`,!0,i),r||W(``,!0))]}},Qm=(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(Xm(56,i)),t.children.length&&(n.onError(Xm(57,i)),t.children.length=0),{props:[U(W(`textContent`,!0),r?sp(r,n)>0?r:G(n.helperString(ed),[r],i):W(``,!0))]}},$m=(e,t,n)=>{let r=Sm(e,t,n);if(!r.props.length||t.tagType===1)return r;e.arg&&n.onError(Xm(59,e.arg.loc));let{tag:i}=t,a=n.isCustomElement(i);if(i===`input`||i===`textarea`||i===`select`||a){let o=Lm,s=!1;if(i===`input`||a){let r=af(t,`type`);if(r){if(r.type===7)o=zm;else if(r.value)switch(r.value.content){case`radio`:o=Fm;break;case`checkbox`:o=Im;break;case`file`:s=!0,n.onError(Xm(60,e.loc))}}else sf(t)&&(o=zm)}else i===`select`&&(o=Rm);s||(r.needRuntime=n.helper(o))}else n.onError(Xm(58,e.loc));return r.props=r.props.filter(e=>e.key.type!==4||e.key.content!==`modelValue`),r},eh=t(`passive,once,capture`),th=t(`stop,prevent,self,ctrl,shift,alt,meta,exact,middle`),nh=t(`left,right`),rh=t(`onkeyup,onkeydown,onkeypress`),ih=(e,t,n,r)=>{let i=[],a=[],o=[];for(let s=0;sKd(e)&&e.content.toLowerCase()===`onclick`?W(t,!0):e.type===4?e:Td([`(`,e,`) === "onClick" ? "${t}" : (`,e,`)`]),oh=(e,t,n)=>gm(e,t,n,t=>{let{modifiers:r}=e;if(!r.length)return t;let{key:i,value:a}=t.props[0],{keyModifiers:o,nonKeyModifiers:s,eventOptionModifiers:c}=ih(i,r,n,e.loc);if(s.includes(`right`)&&(i=ah(i,`onContextmenu`)),s.includes(`middle`)&&(i=ah(i,`onMouseup`)),s.length&&(a=G(n.helper(Bm),[a,JSON.stringify(s)])),o.length&&(!Kd(i)||rh(i.content.toLowerCase()))&&(a=G(n.helper(Vm),[a,JSON.stringify(o)])),c.length){let e=c.map(re).join(``);i=Kd(i)?W(`${i.content}${e}`,!0):Td([`(`,i,`) + "${e}"`])}return{props:[U(i,a)]}}),sh=(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(Xm(62,i)),{props:[],needRuntime:n.helper(Hm)}},ch=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag===`script`||e.tag===`style`)&&t.removeNode()},lh=[Jm],uh={cloak:Pm,html:Zm,text:Qm,model:$m,on:oh,show:sh};function dh(e,t={}){return Nm(e,c({},qm,t,{nodeTransforms:[ch,...lh,...t.nodeTransforms||[]],directiveTransforms:c({},uh,t.directiveTransforms||{}),transformHoist:null}))}var fh=Object.create(null);function ph(e,t){if(!v(e)){if(e.nodeType)e=e.innerHTML;else return i}let n=ue(e,t),r=fh[n];if(r)return r;if(e[0]===`#`){let t=document.querySelector(e);e=t?t.innerHTML:``}let a=c({hoistStatic:!0,onError:void 0,onWarn:i},t);!a.isCustomElement&&typeof customElements<`u`&&(a.isCustomElement=e=>!!customElements.get(e));let{code:o}=dh(e,a),s=Function(`Vue`,o)(Sc);return s._rc=!0,fh[n]=s}rc(ph);var mh=[`top`,`right`,`bottom`,`left`],hh=[`start`,`end`],gh=mh.reduce((e,t)=>e.concat(t,t+`-`+hh[0],t+`-`+hh[1]),[]),_h=Math.min,vh=Math.max,yh={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function bh(e,t,n){return vh(e,_h(t,n))}function xh(e,t){return typeof e==`function`?e(t):e}function Sh(e){return e.split(`-`)[0]}function Ch(e){return e.split(`-`)[1]}function wh(e){return e===`x`?`y`:`x`}function Th(e){return e===`y`?`height`:`width`}function Eh(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Dh(e){return wh(Eh(e))}function Oh(e,t,n){n===void 0&&(n=!1);let r=Ch(e),i=Dh(e),a=Th(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Lh(o)),[o,Lh(o)]}function kh(e){let t=Lh(e);return[Ah(e),t,Ah(t)]}function Ah(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var jh=[`left`,`right`],Mh=[`right`,`left`],Nh=[`top`,`bottom`],Ph=[`bottom`,`top`];function Fh(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Mh:jh:t?jh:Mh;case`left`:case`right`:return t?Nh:Ph;default:return[]}}function Ih(e,t,n,r){let i=Ch(e),a=Fh(Sh(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ah)))),a}function Lh(e){let t=Sh(e);return yh[t]+e.slice(t.length)}function Rh(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function zh(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Rh(e)}function Bh(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Vh(e,t,n){let{reference:r,floating:i}=e,a=Eh(t),o=Dh(t),s=Th(o),c=Sh(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Ch(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Hh(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=xh(t,e),p=zh(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Bh(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Bh(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Uh=50,Wh=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Hh},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Vh(l,r,c),f=r,p=0,m={};for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=xh(e,t)||{};if(l==null)return{};let d=zh(u),f={x:n,y:r},p=Dh(i),m=Th(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=_h(d[_],T),D=_h(d[v],T),ee=C-h[m]-D,te=C/2-h[m]/2+w,O=bh(E,te,ee),k=!c.arrow&&Ch(i)!=null&&te!==O&&a.reference[m]/2-(teCh(t)===e),...n.filter(t=>Ch(t)!==e)]:n.filter(e=>Sh(e)===e)).filter(n=>!e||Ch(n)===e||(t?Ah(n)!==n:!1))}var qh=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=gh,autoAlignment:u=!0,...d}=xh(e,t),f=c!==void 0||l===gh?Kh(c||null,u,l):l,p=r.autoPlacement?.index||0,m=f[p];if(m==null)return{};if(i!==m)return{reset:{placement:f[0]}};let h=await a.detectOverflow(t,d),g=Oh(m,n,await(a.isRTL==null?void 0:a.isRTL(o.floating))),_=[h[Sh(m)],h[g[0]],h[g[1]]],v=[...r.autoPlacement?.overflows||[],{placement:m,overflows:_}],y=f[p+1];if(y)return{data:{index:p+1,overflows:v},reset:{placement:y}};let b=v.map(e=>{let t=Ch(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),x=b.filter(e=>e[2].slice(0,Ch(e[0])?2:3).every(e=>e<=0))[0]?.[0]||b[0][0];return x===i?{}:{data:{index:p+1,overflows:v},reset:{placement:x}}}}},Jh=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=xh(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Sh(r),_=Eh(o),v=Sh(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Lh(o)]:kh(o)),x=p!==`none`;!d&&x&&b.push(...Ih(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Oh(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Eh(t)||T.every(e=>Eh(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Eh(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},Yh=new Set([`left`,`top`]);async function Xh(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Sh(n),s=Ch(n),c=Eh(n)===`y`,l=Yh.has(o)?-1:1,u=a&&c?-1:1,d=xh(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Zh=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Xh(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Qh=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=xh(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Eh(i),p=wh(f),m=u[p],h=u[f],g=(e,t)=>bh(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},$h=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=xh(e,t),c=await i.detectOverflow(t,s),l=Sh(n),u=Ch(n),d=Eh(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=_h(p-c[m],g),y=_h(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*vh(c.left,c.right):S=p-2*vh(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function eg(e){return e.ownerDocument?.defaultView||window}function tg(e){return eg(e).getComputedStyle(e)}var ng=Math.min,rg=Math.max,ig=Math.round;function ag(e){let t=tg(e),n=parseFloat(t.width),r=parseFloat(t.height),i=e.offsetWidth,a=e.offsetHeight,o=ig(n)!==i||ig(r)!==a;return o&&(n=i,r=a),{width:n,height:r,fallback:o}}function og(e){return dg(e)?(e.nodeName||``).toLowerCase():``}var sg;function cg(){if(sg)return sg;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(sg=e.brands.map((e=>e.brand+`/`+e.version)).join(` `),sg):navigator.userAgent}function lg(e){return e instanceof eg(e).HTMLElement}function ug(e){return e instanceof eg(e).Element}function dg(e){return e instanceof eg(e).Node}function fg(e){return typeof ShadowRoot>`u`?!1:e instanceof eg(e).ShadowRoot||e instanceof ShadowRoot}function pg(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=tg(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&![`inline`,`contents`].includes(i)}function mg(e){return[`table`,`td`,`th`].includes(og(e))}function hg(e){let t=/firefox/i.test(cg()),n=tg(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!==`none`||n.perspective!==`none`||!!r&&r!==`none`||t&&n.willChange===`filter`||t&&!!n.filter&&n.filter!==`none`||[`transform`,`perspective`].some((e=>n.willChange.includes(e)))||[`paint`,`layout`,`strict`,`content`].some((e=>{let t=n.contain;return t!=null&&t.includes(e)}))}function gg(){return!/^((?!chrome|android).)*safari/i.test(cg())}function _g(e){return[`html`,`body`,`#document`].includes(og(e))}function vg(e){return ug(e)?e:e.contextElement}var yg={x:1,y:1};function bg(e){let t=vg(e);if(!lg(t))return yg;let n=t.getBoundingClientRect(),{width:r,height:i,fallback:a}=ag(t),o=(a?ig(n.width):n.width)/r,s=(a?ig(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}function xg(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=vg(e),o=yg;t&&(r?ug(r)&&(o=bg(r)):o=bg(e));let s=a?eg(a):window,c=!gg()&&n,l=(i.left+(c&&s.visualViewport?.offsetLeft||0))/o.x,u=(i.top+(c&&s.visualViewport?.offsetTop||0))/o.y,d=i.width/o.x,f=i.height/o.y;if(a){let e=eg(a),t=r&&ug(r)?eg(r):r,n=e.frameElement;for(;n&&r&&t!==e;){let e=bg(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,l*=e.x,u*=e.y,d*=e.x,f*=e.y,l+=t.x,u+=t.y,n=eg(n).frameElement}}return{width:d,height:f,top:u,right:l+d,bottom:u+f,left:l,x:l,y:u}}function Sg(e){return((dg(e)?e.ownerDocument:e.document)||window.document).documentElement}function Cg(e){return ug(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function wg(e){return xg(Sg(e)).left+Cg(e).scrollLeft}function Tg(e){if(og(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||fg(e)&&e.host||Sg(e);return fg(t)?t.host:t}function Eg(e){let t=Tg(e);return _g(t)?t.ownerDocument.body:lg(t)&&pg(t)?t:Eg(t)}function Dg(e,t){t===void 0&&(t=[]);let n=Eg(e),r=n===e.ownerDocument?.body,i=eg(n);return r?t.concat(i,i.visualViewport||[],pg(n)?n:[]):t.concat(n,Dg(n))}function Og(e,t,n){return t===`viewport`?Bh(function(e,t){let n=eg(e),r=Sg(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=gg();(e||!e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}(e,n)):ug(t)?Bh(function(e,t){let n=xg(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=lg(e)?bg(e):{x:1,y:1};return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}(t,n)):Bh(function(e){let t=Sg(e),n=Cg(e),r=e.ownerDocument.body,i=rg(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=rg(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+wg(e),s=-n.scrollTop;return tg(r).direction===`rtl`&&(o+=rg(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}(Sg(e)))}function kg(e){return lg(e)&&tg(e).position!==`fixed`?e.offsetParent:null}function Ag(e){let t=eg(e),n=kg(e);for(;n&&mg(n)&&tg(n).position===`static`;)n=kg(n);return n&&(og(n)===`html`||og(n)===`body`&&tg(n).position===`static`&&!hg(n))?t:n||function(e){let t=Tg(e);for(;lg(t)&&!_g(t);){if(hg(t))return t;t=Tg(t)}return null}(e)||t}function jg(e,t,n){let r=lg(t),i=Sg(t),a=xg(e,!0,n===`fixed`,t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(r||!r&&n!==`fixed`){if((og(t)!==`body`||pg(i))&&(o=Cg(t)),lg(t)){let e=xg(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=wg(i))}return{x:a.left+o.scrollLeft-s.x,y:a.top+o.scrollTop-s.y,width:a.width,height:a.height}}var Mg={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?function(e,t){let n=t.get(e);if(n)return n;let r=Dg(e).filter((e=>ug(e)&&og(e)!==`body`)),i=null,a=tg(e).position===`fixed`,o=a?Tg(e):e;for(;ug(o)&&!_g(o);){let e=tg(o),t=hg(o);(a?t||i:t||e.position!==`static`||!i||![`absolute`,`fixed`].includes(i.position))?i=e:r=r.filter((e=>e!==o)),o=Tg(o)}return t.set(e,r),r}(t,this._c):[].concat(n),r],o=a[0],s=a.reduce(((e,n)=>{let r=Og(t,n,i);return e.top=rg(r.top,e.top),e.right=ng(r.right,e.right),e.bottom=ng(r.bottom,e.bottom),e.left=rg(r.left,e.left),e}),Og(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,i=lg(n),a=Sg(n);if(n===a)return t;let o={scrollLeft:0,scrollTop:0},s={x:1,y:1},c={x:0,y:0};if((i||!i&&r!==`fixed`)&&((og(n)!==`body`||pg(a))&&(o=Cg(n)),lg(n))){let e=xg(n);s=bg(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-o.scrollLeft*s.x+c.x,y:t.y*s.y-o.scrollTop*s.y+c.y}},isElement:ug,getDimensions:function(e){return lg(e)?ag(e):e.getBoundingClientRect()},getOffsetParent:Ag,getDocumentElement:Sg,getScale:bg,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e,i=this.getOffsetParent||Ag,a=this.getDimensions;return{reference:jg(t,await i(n),r),floating:{x:0,y:0,...await a(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>tg(e).direction===`rtl`},Ng=(e,t,n)=>{let r=new Map,i={platform:Mg,...n},a={...i.platform,_c:r};return Wh(e,t,{...i,platform:a})};function Pg(e,t){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(typeof t[n]==`object`&&e[n]?Pg(e[n],t[n]):e[n]=t[n])}var Fg={disabled:!1,distance:5,skidding:0,container:`body`,boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:`absolute`,preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:`top`,triggers:[`hover`,`focus`,`touch`],hideTriggers:e=>[...e,`click`],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:`...`},dropdown:{placement:`bottom`,triggers:[`click`],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:`dropdown`,triggers:[`hover`,`focus`],popperTriggers:[`hover`],delay:{show:0,hide:400}}}};function Ig(e,t){let n=Fg.themes[e]||{},r;do r=n[t],typeof r>`u`?n.$extend?n=Fg.themes[n.$extend]||{}:(n=null,r=Fg[t]):n=null;while(n);return r}function Lg(e){let t=[e],n=Fg.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=Fg.themes[n.$extend]||{}):n=null;while(n);return t.map(e=>`v-popper--theme-${e}`)}function Rg(e){let t=[e],n=Fg.themes[e]||{};do n.$extend?(t.push(n.$extend),n=Fg.themes[n.$extend]||{}):n=null;while(n);return t}var zg=!1;if(typeof window<`u`){zg=!1;try{let e=Object.defineProperty({},"passive",{get(){zg=!0}});window.addEventListener(`test`,null,e)}catch{}}var Bg=!1;typeof window<`u`&&typeof navigator<`u`&&(Bg=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);var Vg=[`auto`,`top`,`bottom`,`left`,`right`].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),Hg={hover:`mouseenter`,focus:`focus`,click:`click`,touch:`touchstart`,pointer:`pointerdown`},Ug={hover:`mouseleave`,focus:`blur`,click:`click`,touch:`touchend`,pointer:`pointerup`};function Wg(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1)}function Gg(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}var Kg=[],qg=null,Jg={};function Yg(e){let t=Jg[e];return t||=Jg[e]=[],t}var Xg=function(){};typeof window<`u`&&(Xg=window.Element);function $(e){return function(t){return Ig(t.theme,e)}}var Zg=`__floating-vue__popper`,Qg=()=>di({name:`VPopper`,provide(){return{[Zg]:{parentPopper:this}}},inject:{[Zg]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:$(`disabled`)},positioningDisabled:{type:Boolean,default:$(`positioningDisabled`)},placement:{type:String,default:$(`placement`),validator:e=>Vg.includes(e)},delay:{type:[String,Number,Object],default:$(`delay`)},distance:{type:[Number,String],default:$(`distance`)},skidding:{type:[Number,String],default:$(`skidding`)},triggers:{type:Array,default:$(`triggers`)},showTriggers:{type:[Array,Function],default:$(`showTriggers`)},hideTriggers:{type:[Array,Function],default:$(`hideTriggers`)},popperTriggers:{type:Array,default:$(`popperTriggers`)},popperShowTriggers:{type:[Array,Function],default:$(`popperShowTriggers`)},popperHideTriggers:{type:[Array,Function],default:$(`popperHideTriggers`)},container:{type:[String,Object,Xg,Boolean],default:$(`container`)},boundary:{type:[String,Xg],default:$(`boundary`)},strategy:{type:String,validator:e=>[`absolute`,`fixed`].includes(e),default:$(`strategy`)},autoHide:{type:[Boolean,Function],default:$(`autoHide`)},handleResize:{type:Boolean,default:$(`handleResize`)},instantMove:{type:Boolean,default:$(`instantMove`)},eagerMount:{type:Boolean,default:$(`eagerMount`)},popperClass:{type:[String,Array,Object],default:$(`popperClass`)},computeTransformOrigin:{type:Boolean,default:$(`computeTransformOrigin`)},autoMinSize:{type:Boolean,default:$(`autoMinSize`)},autoSize:{type:[Boolean,String],default:$(`autoSize`)},autoMaxSize:{type:Boolean,default:$(`autoMaxSize`)},autoBoundaryMaxSize:{type:Boolean,default:$(`autoBoundaryMaxSize`)},preventOverflow:{type:Boolean,default:$(`preventOverflow`)},overflowPadding:{type:[Number,String],default:$(`overflowPadding`)},arrowPadding:{type:[Number,String],default:$(`arrowPadding`)},arrowOverflow:{type:Boolean,default:$(`arrowOverflow`)},flip:{type:Boolean,default:$(`flip`)},shift:{type:Boolean,default:$(`shift`)},shiftCrossAxis:{type:Boolean,default:$(`shiftCrossAxis`)},noAutoFocus:{type:Boolean,default:$(`noAutoFocus`)},disposeTimeout:{type:Number,default:$(`disposeTimeout`)}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:``,strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join(`_`)}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId==null?this.randomId:this.ariaId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide==`function`?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){return this[Zg]?.parentPopper},hasPopperShowTriggerHover(){return this.popperTriggers?.includes(`hover`)||this.popperShowTriggers?.includes(`hover`)}},watch:{shown:`$_autoShowHide`,disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:`$_refreshListeners`,deep:!0},positioningDisabled:`$_refreshListeners`,...[`placement`,`distance`,`skidding`,`boundary`,`strategy`,`overflowPadding`,`arrowPadding`,`preventOverflow`,`shift`,`shiftCrossAxis`,`flip`].reduce((e,t)=>(e[t]=`$_computePosition`,e),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:n=!1}={}){var r;(r=this.parentPopper)!=null&&r.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&(this.parentPopper?.lockedChild===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit(`show`),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit(`update:shown`,!0))},hide({event:e=null,skipDelay:t=!1}={}){if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}this.parentPopper?.lockedChild===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit(`hide`),this.$emit(`update:shown`,!1)}},init(){this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=this.referenceNode?.call(this)??this.$el,this.$_targetNodes=this.targetNodes().filter(e=>e.nodeType===e.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(`.v-popper__inner`),this.$_arrowNode=this.$_popperNode.querySelector(`.v-popper__arrow-container`),this.$_swapTargetAttrs(`title`,`data-original-title`),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs(`data-original-title`,`title`))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit(`resize`))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;let e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(Zh({mainAxis:this.distance,crossAxis:this.skidding}));let t=this.placement.startsWith(`auto`);if(t?e.middleware.push(qh({alignment:this.placement.split(`-`)[1]??``})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(Qh({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(Jh({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(Gh({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:`arrowOverflow`,fn:({placement:e,rects:t,middlewareData:n})=>{let r,{centerOffset:i}=n.arrow;return r=e.startsWith(`top`)||e.startsWith(`bottom`)?Math.abs(i)>t.reference.width/2:Math.abs(i)>t.reference.height/2,{data:{overflow:r}}}}),this.autoMinSize||this.autoSize){let t=this.autoSize?this.autoSize:this.autoMinSize?`min`:null;e.middleware.push({name:`autoSize`,fn:({rects:e,placement:n,middlewareData:r})=>{var i;if((i=r.autoSize)!=null&&i.skip)return{};let a,o;return n.startsWith(`top`)||n.startsWith(`bottom`)?a=e.reference.width:o=e.reference.height,this.$_innerNode.style[t===`min`?`minWidth`:t===`max`?`maxWidth`:`width`]=a==null?null:`${a}px`,this.$_innerNode.style[t===`min`?`minHeight`:t===`max`?`maxHeight`:`height`]=o==null?null:`${o}px`,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push($h({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:e,availableHeight:t})=>{this.$_innerNode.style.maxWidth=e==null?null:`${e}px`,this.$_innerNode.style.maxHeight=t==null?null:`${t}px`}})));let n=await Ng(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),qg&&this.instantMove&&qg.instantMove&&qg!==this.parentPopper){qg.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay(`show`))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(qg=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay(`hide`))},$_computeDelay(e){let t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await Gg(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Dg(this.$_referenceNode),...Dg(this.$_popperNode)],`scroll`,()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){let e=this.$_referenceNode.getBoundingClientRect(),t=this.$_popperNode.querySelector(`.v-popper__wrapper`),n=t.parentNode.getBoundingClientRect(),r=e.x+e.width/2-(n.left+t.offsetLeft),i=e.y+e.height/2-(n.top+t.offsetTop);this.result.transformOrigin=`${r}px ${i}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":``});let e=this.showGroup;if(e){let t;for(let n=0;n0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Wg(Kg,this),Kg.length===0&&document.body.classList.remove(`v-popper--some-open`);for(let e of Rg(this.theme)){let t=Yg(e);Wg(t,this),t.length===0&&document.body.classList.remove(`v-popper--some-open--${e}`)}qg===this&&(qg=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);let t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners(`scroll`),this.$emit(`apply-hide`),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await Gg(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e==`string`?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw Error(`No container for popover: `+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){let e=e=>{this.isShown&&!this.$_hideInProgress||(e.usedByTooltip=!0,!this.$_preventShow&&this.show({event:e}))};this.$_registerTriggerListeners(this.$_targetNodes,Hg,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],Hg,this.popperTriggers,this.popperShowTriggers,e);let t=e=>{e.usedByTooltip||this.hide({event:e})};this.$_registerTriggerListeners(this.$_targetNodes,Ug,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],Ug,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(e=>e.addEventListener(t,n,zg?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,r,i){let a=n;r!=null&&(a=typeof r==`function`?r(a):r),a.forEach(n=>{let r=t[n];r&&this.$_registerEventListeners(e,r,i)})},$_removeEventListeners(e){let t=[];this.$_events.forEach(n=>{let{targetNodes:r,eventType:i,handler:a}=n;!e||e===i?r.forEach(e=>e.removeEventListener(i,a)):t.push(n)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit(`close-directive`):this.$emit(`auto-hide`),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(let n of this.$_targetNodes){let r=n.getAttribute(e);r&&(n.removeAttribute(e),n.setAttribute(t,r))}},$_applyAttrsToTarget(e){for(let t of this.$_targetNodes)for(let n in e){let r=e[n];r==null?t.removeAttribute(n):t.setAttribute(n,r)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){let e=this.$_referenceNode.getBoundingClientRect();if(s_>=e.left&&s_<=e.right&&c_>=e.top&&c_<=e.bottom){let e=this.$_popperNode.getBoundingClientRect(),t=s_-a_,n=c_-o_,r=e.left+e.width/2-a_+(e.top+e.height/2)-o_+e.width+e.height,i=a_+t*r,a=o_+n*r;return l_(a_,o_,i,a,e.left,e.top,e.left,e.bottom)||l_(a_,o_,i,a,e.left,e.top,e.right,e.top)||l_(a_,o_,i,a,e.right,e.top,e.right,e.bottom)||l_(a_,o_,i,a,e.left,e.bottom,e.right,e.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<`u`&&typeof window<`u`){if(Bg){let e=!zg||{passive:!0,capture:!0};document.addEventListener(`touchstart`,e=>$g(e,!0),e),document.addEventListener(`touchend`,e=>e_(e,!0),e)}else window.addEventListener(`mousedown`,e=>$g(e,!1),!0),window.addEventListener(`click`,e=>e_(e,!1),!0);window.addEventListener(`resize`,i_)}function $g(e,t){if(Fg.autoHideOnMousedown)t_(e,t);else for(let t=0;t=0;r--){let i=Kg[r];try{let r=i.containsGlobalTarget=i.mouseDownContains||i.popperNode().contains(e.target);i.pendingHide=!1,requestAnimationFrame(()=>{if(i.pendingHide=!1,!n[i.randomId]&&n_(i,r,e)){if(i.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&r){let e=i.parentPopper;for(;e;)n[e.randomId]=!0,e=e.parentPopper;return}let a=i.parentPopper;for(;a&&n_(a,a.containsGlobalTarget,e);)a.$_handleGlobalClose(e,t),a=a.parentPopper}})}catch{}}}function n_(e,t,n){return n.closeAllPopover||n.closePopover&&t||r_(e,n)&&!t}function r_(e,t){if(typeof e.autoHide==`function`){let n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function i_(){for(let e=0;e{a_=s_,o_=c_,s_=e.clientX,c_=e.clientY},zg?{passive:!0}:void 0);function l_(e,t,n,r,i,a,o,s){let c=((o-i)*(t-a)-(s-a)*(e-i))/((s-a)*(n-e)-(o-i)*(r-t)),l=((n-e)*(t-a)-(r-t)*(e-i))/((s-a)*(n-e)-(o-i)*(r-t));return c>=0&&c<=1&&l>=0&&l<=1}var u_={extends:Qg()},d_=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};function f_(e,t,n,r,i,a){return vs(),Cs(`div`,{ref:`reference`,class:_e([`v-popper`,{"v-popper--shown":e.slotData.isShown}])},[Ca(e.$slots,`default`,ve(Ms(e.slotData)))],2)}var p_=d_(u_,[[`render`,f_]]);function m_(){var e=window.navigator.userAgent,t=e.indexOf(`MSIE `);if(t>0)return parseInt(e.substring(t+5,e.indexOf(`.`,t)),10);if(e.indexOf(`Trident/`)>0){var n=e.indexOf(`rv:`);return parseInt(e.substring(n+3,e.indexOf(`.`,n)),10)}var r=e.indexOf(`Edge/`);return r>0?parseInt(e.substring(r+5,e.indexOf(`.`,r)),10):-1}var h_;function g_(){g_.init||(g_.init=!0,h_=m_()!==-1)}var __={name:`ResizeObserver`,props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:[`notify`],mounted(){g_(),ir(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});let e=document.createElement(`object`);this._resizeObject=e,e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`tabindex`,-1),e.onload=this.addResizeHandlers,e.type=`text/html`,h_&&this.$el.appendChild(e),e.data=`about:blank`,h_||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit(`notify`,{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener(`resize`,this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!h_&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener(`resize`,this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}},v_=br(`data-v-b329ee4c`);vr(`data-v-b329ee4c`);var y_={class:`resize-observer`,tabindex:`-1`};yr(),__.render=v_((e,t,n,r,i,a)=>(vs(),ws(`div`,y_))),__.__scopeId=`data-v-b329ee4c`,__.__file=`src/components/ResizeObserver.vue`;var b_=(e=`theme`)=>({computed:{themeClass(){return Lg(this[e])}}}),x_=di({name:`VPopperContent`,components:{ResizeObserver:__},mixins:[b_()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:[`hide`,`resize`],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),S_=[`id`,`aria-hidden`,`tabindex`,`data-popper-placement`],C_={ref:`inner`,class:`v-popper__inner`},w_=[As(`div`,{class:`v-popper__arrow-outer`},null,-1),As(`div`,{class:`v-popper__arrow-inner`},null,-1)];function T_(e,t,n,r,i,a){let o=ha(`ResizeObserver`);return vs(),Cs(`div`,{id:e.popperId,ref:`popover`,class:_e([`v-popper__popper`,[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:fe(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?`false`:`true`,tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||=yu(t=>e.autoHide&&e.$emit(`hide`),[`esc`])},[As(`div`,{class:`v-popper__backdrop`,onClick:t[0]||=t=>e.autoHide&&e.$emit(`hide`)}),As(`div`,{class:`v-popper__wrapper`,style:fe(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[As(`div`,C_,[e.mounted?(vs(),Cs(z,{key:0},[As(`div`,null,[Ca(e.$slots,`default`)]),e.handleResize?(vs(),ws(o,{key:0,onNotify:t[1]||=t=>e.$emit(`resize`,t)})):Is(``,!0)],64)):Is(``,!0)],512),As(`div`,{ref:`arrow`,class:`v-popper__arrow-container`,style:fe(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},w_,4)],4)],46,S_)}var E_=d_(x_,[[`render`,T_]]),D_={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}},O_=function(){};typeof window<`u`&&(O_=window.Element);var k_=di({name:`VPopperWrapper`,components:{Popper:p_,PopperContent:E_},mixins:[D_,b_(`finalTheme`)],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,O_,Boolean],default:void 0},boundary:{type:[String,O_],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function A_(e,t,n,r,i,a){let o=ha(`PopperContent`),s=ha(`Popper`);return vs(),ws(s,Bs({ref:`popper`},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||=()=>e.$emit(`show`),onHide:t[1]||=()=>e.$emit(`hide`),"onUpdate:shown":t[2]||=t=>e.$emit(`update:shown`,t),onApplyShow:t[3]||=()=>e.$emit(`apply-show`),onApplyHide:t[4]||=()=>e.$emit(`apply-hide`),onCloseGroup:t[5]||=()=>e.$emit(`close-group`),onCloseDirective:t[6]||=()=>e.$emit(`close-directive`),onAutoHide:t[7]||=()=>e.$emit(`auto-hide`),onResize:t[8]||=()=>e.$emit(`resize`)}),{default:xr(({popperId:t,isShown:n,shouldMountContent:r,skipTransition:i,autoHide:a,show:s,hide:c,handleResize:l,onResize:u,classes:d,result:f})=>[Ca(e.$slots,`default`,{shown:n,show:s,hide:c}),V(o,{ref:`popperContent`,"popper-id":t,theme:e.finalTheme,shown:n,mounted:r,"skip-transition":i,"auto-hide":a,"handle-resize":l,classes:d,result:f,onHide:c,onResize:u},{default:xr(()=>[Ca(e.$slots,`popper`,{shown:n,hide:c})]),_:2},1032,[`popper-id`,`theme`,`shown`,`mounted`,`skip-transition`,`auto-hide`,`handle-resize`,`classes`,`result`,`onHide`,`onResize`])]),_:3},16,[`theme`,`target-nodes`,`popper-node`,`class`])}var j_=d_(k_,[[`render`,A_]]),M_={...j_,name:`VDropdown`,vPopperTheme:`dropdown`},N_={...j_,name:`VMenu`,vPopperTheme:`menu`},P_={...j_,name:`VTooltip`,vPopperTheme:`tooltip`},F_=di({name:`VTooltipDirective`,components:{Popper:Qg(),PopperContent:E_},mixins:[D_],inheritAttrs:!1,props:{theme:{type:String,default:`tooltip`},html:{type:Boolean,default:e=>Ig(e.theme,`html`)},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>Ig(e.theme,`loadingContent`)},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content==`function`},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content==`function`&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;let e=++this.$_fetchId,t=this.content(this);t.then?t.then(t=>this.onResult(e,t)):this.onResult(e,t)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),I_=[`innerHTML`],L_=[`textContent`];function R_(e,t,n,r,i,a){let o=ha(`PopperContent`),s=ha(`Popper`);return vs(),ws(s,Bs({ref:`popper`},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:xr(({popperId:t,isShown:n,shouldMountContent:r,skipTransition:i,autoHide:a,hide:s,handleResize:c,onResize:l,classes:u,result:d})=>[V(o,{ref:`popperContent`,class:_e({"v-popper--tooltip-loading":e.loading}),"popper-id":t,theme:e.theme,shown:n,mounted:r,"skip-transition":i,"auto-hide":a,"handle-resize":c,classes:u,result:d,onHide:s,onResize:l},{default:xr(()=>[e.html?(vs(),Cs(`div`,{key:0,innerHTML:e.finalContent},null,8,I_)):(vs(),Cs(`div`,{key:1,textContent:Pe(e.finalContent)},null,8,L_))]),_:2},1032,[`class`,`popper-id`,`theme`,`shown`,`mounted`,`skip-transition`,`auto-hide`,`handle-resize`,`classes`,`result`,`onHide`,`onResize`])]),_:1},16,[`theme`,`target-nodes`,`popper-node`,`onApplyShow`,`onApplyHide`])}var z_=d_(F_,[[`render`,R_]]),B_=`v-popper--has-tooltip`;function V_(e,t){let n=e.placement;if(!n&&t)for(let e of Vg)t[e]&&(n=e);return n||=Ig(e.theme||`tooltip`,`placement`),n}function H_(e,t,n){let r,i=typeof t;return r=i===`string`?{content:t}:t&&i===`object`?t:{content:!1},r.placement=V_(r,n),r.targetNodes=()=>[e],r.referenceNode=()=>e,r}var U_,W_,G_=0;function K_(){if(U_)return;W_=mn([]),U_=Du({name:`VTooltipDirectiveApp`,setup(){return{directives:W_}},render(){return this.directives.map(e=>fc(z_,{...e.options,shown:e.shown||e.options.shown,key:e.id}))},devtools:{hide:!0}});let e=document.createElement(`div`);document.body.appendChild(e),U_.mount(e)}function q_(e,t,n){K_();let r=mn(H_(e,t,n)),i=mn(!1),a={id:G_++,options:r,shown:i};return W_.value.push(a),e.classList&&e.classList.add(B_),e.$_popper={options:r,item:a,show(){i.value=!0},hide(){i.value=!1}}}function J_(e){if(e.$_popper){let t=W_.value.indexOf(e.$_popper.item);t!==-1&&W_.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(B_)}function Y_(e,{value:t,modifiers:n}){let r=H_(e,t,n);if(!r.content||Ig(r.theme||`tooltip`,`disabled`))J_(e);else{let i;e.$_popper?(i=e.$_popper,i.options.value=r):i=q_(e,t,n),typeof t.shown<`u`&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?i.show():i.hide())}}var X_={beforeMount:Y_,updated:Y_,beforeUnmount(e){J_(e)}};function Z_(e){e.addEventListener(`mousedown`,$_),e.addEventListener(`click`,$_),e.addEventListener(`touchstart`,ev,zg?{passive:!0}:!1)}function Q_(e){e.removeEventListener(`mousedown`,$_),e.removeEventListener(`click`,$_),e.removeEventListener(`touchstart`,ev),e.removeEventListener(`touchend`,tv),e.removeEventListener(`touchcancel`,nv)}function $_(e){let t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function ev(e){if(e.changedTouches.length===1){let t=e.currentTarget;t.$_vclosepopover_touch=!0,t.$_vclosepopover_touchPoint=e.changedTouches[0],t.addEventListener(`touchend`,tv),t.addEventListener(`touchcancel`,nv)}}function tv(e){let t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){let n=e.changedTouches[0],r=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-r.screenY)<20&&Math.abs(n.screenX-r.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function nv(e){let t=e.currentTarget;t.$_vclosepopover_touch=!1}var rv={beforeMount(e,{value:t,modifiers:n}){e.$_closePopoverModifiers=n,(typeof t>`u`||t)&&Z_(e)},updated(e,{value:t,oldValue:n,modifiers:r}){e.$_closePopoverModifiers=r,t!==n&&(typeof t>`u`||t?Z_(e):Q_(e))},beforeUnmount(e){Q_(e)}},iv=M_,av=P_;function ov(e,t={}){e.$_vTooltipInstalled||(e.$_vTooltipInstalled=!0,Pg(Fg,t),e.directive(`tooltip`,X_),e.directive(`close-popper`,rv),e.component(`VTooltip`,P_),e.component(`VDropdown`,M_),e.component(`VMenu`,N_))}var sv={version:`5.2.2`,install:ov,options:Fg},cv=typeof navigator<`u`&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),lv={install:(e,t={})=>{if(typeof window<`u`&&(window.addEventListener(`vitepress:codeGroupTabActivate`,i_,{passive:!0}),window.addEventListener(`click`,e=>{e.composedPath().some(e=>e?.classList?.contains?.(`vp-code-group`)||e?.classList?.contains?.(`tabs`))&&i_()},{passive:!0}),!cv)){let t=!1;window.addEventListener(`mousedown`,()=>{t=!0},{passive:!0}),window.addEventListener(`mouseup`,()=>{t=!1},{passive:!0});let n=e.component;e.component=function(...e){let r=n.apply(this,e);if(e.length>=2&&e[0]===`VMenu`)try{let n=e[1].components.Popper.extends,r=n.methods.show;n.methods.show=function(...e){if(!t)return r.apply(this,e)};let i=n.methods.hide;n.methods.hide=function(...e){if(!t)return i.apply(this,e)}}catch(e){console.error(`Failed to patch FloatingVue`,e)}return r}}e.use(sv,{strategy:`fixed`,...t,themes:{...t.themes,twoslash:{$extend:`dropdown`,triggers:cv?[`touch`]:[`hover`,`touch`],popperTriggers:cv?[`touch`]:[`hover`,`touch`],placement:`bottom-start`,overflowPadding:10,delay:{show:200,hide:0},handleResize:!1,autoHide:!0,noAutoFocus:!0,instantMove:!0,flip:!1,arrowPadding:8,autoBoundaryMaxSize:!0,...t.themes?.twoslash??{}},"twoslash-query":{$extend:`twoslash`,triggers:[`click`],popperTriggers:[`click`],autoHide:!1,noAutoFocus:!0,...t.themes?.[`twoslash-query`]??{}},"twoslash-completion":{$extend:`twoslash-query`,triggers:[`click`],popperTriggers:[`click`],autoHide:!1,noAutoFocus:!0,distance:0,arrowOverflow:!0,...t.themes?.[`twoslash-completion`]??{}}}})}};export{jr as $,Tr as A,vs as B,V as C,Pe as Ct,Ms as D,Gs as E,Yi as F,va as G,xa as H,sa as I,fo as J,_a as K,Xi as L,Ua as M,Bs as N,fc as O,ir as P,kr as Q,ia as R,Ps as S,fe as St,di as T,Ca as U,wr as V,ha as W,mi as X,Ra as Y,Mr as Z,As as _,Tn as _t,Ic as a,cn as at,Cs as b,_e as bt,iu as c,Ve as ct,yu as d,mn as dt,xr as et,_u as f,nn as ft,dc as g,On as gt,qi as h,F as ht,i_ as i,Be as it,Ts as j,Er as k,ru as l,tn as lt,z as m,hn as mt,av as n,wn as nt,Gl as o,I as ot,B as p,an as pt,fi as q,iv as r,ze as rt,Du as s,dn as st,lv as t,Sr as tt,el as u,rn as ut,ws as v,bn as vt,Wi as w,Fs as x,ve as xt,Is as y,yn as yt,ca as z}; \ No newline at end of file diff --git a/lecture-01/assets/modules/unplugin-icons-Dfv7de-_.js b/lecture-01/assets/modules/unplugin-icons-Dfv7de-_.js new file mode 100644 index 0000000000000000000000000000000000000000..21535fb64a52e21b3234c40024b21f5be99c3570 --- /dev/null +++ b/lecture-01/assets/modules/unplugin-icons-Dfv7de-_.js @@ -0,0 +1 @@ +import{B as e,_ as t,b as n,st as r}from"./shiki-CJZsCeMT.js";var i={class:`slidev-icon`,viewBox:`0 0 32 32`,width:`1.2em`,height:`1.2em`};function a(r,a){return e(),n(`svg`,i,[...a[0]||=[t(`path`,{fill:`currentColor`,d:`M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6M5.394 6.813L6.81 5.399l3.505 3.506L8.9 10.319zM2 15.005h5v2H2zm3.394 10.193L8.9 21.692l1.414 1.414l-3.505 3.506zM15 25.005h2v5h-2zm6.687-1.9l1.414-1.414l3.506 3.506l-1.414 1.414zm3.313-8.1h5v2h-5zm-3.313-6.101l3.506-3.506l1.414 1.414l-3.506 3.506zM15 2.005h2v5h-2z`},null,-1)]])}var o=r({name:`carbon-sun`,render:a}),s={class:`slidev-icon`,viewBox:`0 0 32 32`,width:`1.2em`,height:`1.2em`};function c(r,i){return e(),n(`svg`,s,[...i[0]||=[t(`path`,{fill:`currentColor`,d:`M13.503 5.414a15.076 15.076 0 0 0 11.593 18.194a11.1 11.1 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1 1 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.07 13.07 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3`},null,-1)]])}var l=r({name:`carbon-moon`,render:c}),u={class:`slidev-icon`,viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`};function d(r,i){return e(),n(`svg`,u,[...i[0]||=[t(`path`,{fill:`currentColor`,d:`m220.49 207.8l-12.69 12.69a12 12 0 0 1-17 0l-56.57-56.57L115 214.08l-.13.33a15.84 15.84 0 0 1-14.61 9.59h-.78a15.82 15.82 0 0 1-14.41-11L32.8 52.92A15.95 15.95 0 0 1 52.92 32.8L213 85.07a16 16 0 0 1 1.41 29.8l-.33.13l-50.16 19.27l56.57 56.56a12 12 0 0 1 0 16.97`},null,-1)]])}var f=r({name:`ph-cursor-fill`,render:d});export{l as n,o as r,f as t}; \ No newline at end of file diff --git a/lecture-01/assets/modules/vue-ClnAKIA7.js b/lecture-01/assets/modules/vue-ClnAKIA7.js new file mode 100644 index 0000000000000000000000000000000000000000..d0963ffa39c750889f0a5b0c34a02bdd9b852301 --- /dev/null +++ b/lecture-01/assets/modules/vue-ClnAKIA7.js @@ -0,0 +1,5 @@ +import{A as e,E as t,O as n,P as r,Q as i,R as a,T as o,V as s,Y as c,Z as l,_t as u,ct as d,dt as f,ft as p,g as m,gt as h,ht as g,it as _,k as v,lt as y,m as b,mt as x,nt as S,ot as C,pt as w,rt as T,ut as E,vt as D,yt as O,z as k}from"./shiki-CJZsCeMT.js";function ee(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function A(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&ee(e.default)}var j=Object.assign;function te(e,t){let n={};for(let r in t){let i=t[r];n[r]=M(i)?i.map(e):e(i)}return n}var ne=()=>{},M=Array.isArray;function re(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var ie=Symbol(``);function N(e,t){return j(Error(),{type:e,[ie]:!0},t)}function P(e,t){return e instanceof Error&&ie in e&&(t==null||!!(e.type&t))}var ae=Symbol(``),oe=Symbol(``),se=Symbol(``),ce=Symbol(``),le=Symbol(``);function ue(){return e(se)}function de(t){return e(ce)}var F=typeof document<`u`,fe=/#/g,pe=/&/g,me=/\//g,he=/=/g,ge=/\?/g,_e=/\+/g,ve=/%5B/g,ye=/%5D/g,I=/%5E/g,be=/%60/g,xe=/%7B/g,Se=/%7C/g,Ce=/%7D/g,we=/%20/g;function Te(e){return e==null?``:encodeURI(``+e).replace(Se,`|`).replace(ve,`[`).replace(ye,`]`)}function Ee(e){return Te(e).replace(xe,`{`).replace(Ce,`}`).replace(I,`^`)}function De(e){return Te(e).replace(_e,`%2B`).replace(we,`+`).replace(fe,`%23`).replace(pe,`%26`).replace(be,"`").replace(xe,`{`).replace(Ce,`}`).replace(I,`^`)}function Oe(e){return De(e).replace(he,`%3D`)}function ke(e){return Te(e).replace(fe,`%23`).replace(ge,`%3F`)}function Ae(e){return ke(e).replace(me,`%2F`)}function je(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var Me=/\/$/,Ne=e=>e.replace(Me,``);function Pe(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=He(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:je(o)}}function Fe(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function Ie(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function Le(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&Re(t.matched[r],n.matched[i])&&ze(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Re(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ze(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Be(e[n],t[n]))return!1;return!0}function Be(e,t){return M(e)?Ve(e,t):M(t)?Ve(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function Ve(e,t){return M(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function He(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o1&&a--;else break}return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var L={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};function Ue(e){if(!e){if(F){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^/]+/,``)}else e=`/`}return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),Ne(e)}var We=/^[^#]+#/;function Ge(e,t){return e.replace(We,`#`)+t}function Ke(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var qe=()=>({left:window.scrollX,top:window.scrollY});function Je(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=Ke(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function Ye(e,t){return(history.state?history.state.position-t:-1)+e}var Xe=new Map;function Ze(e,t){Xe.set(e,t)}function Qe(e){let t=Xe.get(e);return Xe.delete(e),t}function $e(e){return typeof e==`string`||e&&typeof e==`object`}function et(e){return typeof e==`string`||typeof e==`symbol`}function tt(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;ee&&De(e)):[r&&De(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function rt(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=M(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function it(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function R(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(N(4,{from:n,to:t})):e instanceof Error?c(e):$e(e)?c(N(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function at(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e])){if(ee(s)){let c=(s.__vccOpts||s)[t];c&&a.push(R(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=A(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&R(c,n,r,o,e,i)()}))}}}return a}function ot(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;oRe(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>Re(e,s))||i.push(s))}return[n,r,i]}var st=()=>location.protocol+`//`+location.host;function ct(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),Ie(n,``)}return Ie(n,e)+r+i}function lt(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=ct(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:`pop`,direction:u?u>0?`forward`:`back`:``})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(j({},e.state,{scroll:qe()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function ut(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?qe():null}}function dt(e){let{history:t,location:n}=window,r={value:ct(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:st()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,j({},t.state,ut(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=j({},i.value,t.state,{forward:e,scroll:qe()});a(o.current,o,!0),a(e,j({},ut(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function ft(e){e=Ue(e);let t=dt(e),n=lt(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=j({location:``,base:e,go:r,createHref:Ge.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function pt(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),ft(e)}var mt={type:0,value:``},ht=/[a-zA-Z0-9_]/;function gt(e){if(!e)return[[]];if(e===`/`)return[[mt]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;st.length?t.length===1&&t[0]===80?1:-1:0}function St(e,t){let n=0,r=e.score,i=t.score;for(;n0&&t[t.length-1]<0}var wt={strict:!1,end:!0,sensitive:!1};function Tt(e,t,n){let r=j(bt(gt(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Et(e,t){let n=[],r=new Map;t=re(wt,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=Ot(e);s.aliasOf=r&&r.record;let l=re(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(Ot(j({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=Tt(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!At(d)&&o(e.name)),Pt(d)&&c(d),s.children){let e=s.children;for(let t=0;t{o(f)}:ne}function o(e){if(et(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=Mt(e,n);n.splice(t,0,e),e.record.name&&!At(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw N(1,{location:e});s=i.record.name,a=j(Dt(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&Dt(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name,i.keys.forEach(e=>{e.optional&&!a[e.name]&&delete a[e.name]}));else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw N(1,{location:e,currentLocation:t});s=i.record.name,a=j({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:jt(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function Dt(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Ot(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:kt(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function kt(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function At(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function jt(e){return e.reduce((e,t)=>j(e,t.meta),{})}function Mt(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;St(e,t[i])<0?r=i:n=i+1}let i=Nt(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function Nt(e){let t=e;for(;t=t.parent;)if(Pt(t)&&St(e,t)===0)return t}function Pt({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Ft(t){let n=e(se),r=e(ce),i=m(()=>{let e=O(t.to);return n.resolve(e)}),a=m(()=>{let{matched:e}=i.value,{length:t}=e,n=e[t-1],a=r.matched;if(!n||!a.length)return-1;let o=a.findIndex(Re.bind(null,n));if(o>-1)return o;let s=Bt(e[t-2]);return t>1&&Bt(n)===s&&a[a.length-1].path!==s?a.findIndex(Re.bind(null,e[t-2])):o}),o=m(()=>a.value>-1&&zt(r.params,i.value.params)),s=m(()=>a.value>-1&&a.value===r.matched.length-1&&ze(r.params,i.value.params));function c(e={}){if(Rt(e)){let e=n[O(t.replace)?`replace`:`push`](O(t.to)).catch(ne);return t.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>e),e}return Promise.resolve()}return{route:i,href:m(()=>i.value.href),isActive:o,isExactActive:s,navigate:c}}function It(e){return e.length===1?e[0]:e}var Lt=o({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:Ft,setup(t,{slots:r}){let i=y(Ft(t)),{options:a}=e(se),o=m(()=>({[Vt(t.activeClass,a.linkActiveClass,`router-link-active`)]:i.isActive,[Vt(t.exactActiveClass,a.linkExactActiveClass,`router-link-exact-active`)]:i.isExactActive}));return()=>{let e=r.default&&It(r.default(i));return t.custom?e:n(`a`,{"aria-current":i.isExactActive?t.ariaCurrentValue:null,href:i.href,onClick:i.navigate,class:o.value},e)}}});function Rt(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(e.button===void 0||e.button===0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function zt(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!M(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function Bt(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var Vt=(e,t,n)=>e??t??n,Ht=o({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(t,{attrs:r,slots:i}){let a=e(le),o=m(()=>t.route||a.value),c=e(oe,0),u=m(()=>{let e=O(c),{matched:t}=o.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),d=m(()=>o.value.matched[u.value]);s(oe,m(()=>u.value+1)),s(ae,d),s(le,o);let p=f();return l(()=>[p.value,d.value,t.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!Re(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let e=o.value,a=t.name,s=d.value,c=s&&s.components[a];if(!c)return Ut(i.default,{Component:c,route:e});let l=s.props[a],u=l?l===!0?e.params:typeof l==`function`?l(e):l:null,f=n(c,j({},u,r,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(s.instances[a]=null)},ref:p}));return Ut(i.default,{Component:f,route:e})||f}}});function Ut(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var Wt=Ht;function Gt(e){let t=Et(e.routes,e),n=e.parseQuery||tt,i=e.stringifyQuery||nt,a=e.history,o=it(),s=it(),c=it(),l=x(L),u=L;F&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let d=te.bind(null,e=>``+e),f=te.bind(null,Ae),m=te.bind(null,je);function h(e,n){let r,i;return et(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function g(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function _(){return t.getRoutes().map(e=>e.record)}function v(e){return!!t.getRecordMatcher(e)}function y(e,r){if(r=j({},r||l.value),typeof e==`string`){let i=Pe(n,e,r.path),o=t.resolve({path:i.path},r),s=a.createHref(i.fullPath);return j(i,o,{params:m(o.params),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=j({},e,{path:Pe(n,e.path,r.path).path});else{let t=j({},e.params);for(let e in t)t[e]??delete t[e];o=j({},e,{params:f(t)}),r.params=f(r.params)}let s=t.resolve(o,r),c=e.hash||``;s.params=d(m(s.params));let u=Fe(i,j({},e,{hash:Ee(c),path:s.path})),p=a.createHref(u);return j({fullPath:u,hash:c,query:i===nt?rt(e.query):e.query||{}},s,{redirectedFrom:void 0,href:p})}function b(e){return typeof e==`string`?Pe(n,e,l.value.path):j({},e)}function S(e,t){if(u!==e)return N(8,{from:t,to:e})}function C(e){return E(e)}function w(e){return C(j(b(e),{replace:!0}))}function T(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=b(i):{path:i},i.params={}),j({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function E(e,t){let n=u=y(e),r=l.value,a=e.state,o=e.force,s=e.replace===!0,c=T(n,r);if(c)return E(j(b(c),{state:typeof c==`object`?j({},a,c.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&Le(i,r,n)&&(f=N(16,{to:d,from:r}),he(r,r,!0,!1)),(f?Promise.resolve(f):ee(d,r)).catch(e=>P(e)?P(e,2)?e:me(e):fe(e,d,r)).then(e=>{if(e){if(P(e,2))return E(j({replace:s},b(e.to),{state:typeof e.to==`object`?j({},a,e.to.state):a,force:o}),t||d)}else e=re(d,r,!0,s,a);return A(d,r,e),e})}function D(e,t){let n=S(e,t);return n?Promise.reject(n):Promise.resolve()}function k(e){let t=ve.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function ee(e,t){let n,[r,i,a]=ot(e,t);n=at(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(R(r,e,t))});let c=D.bind(null,e,t);return n.push(c),I(n).then(()=>{n=[];for(let r of o.list())n.push(R(r,e,t));return n.push(c),I(n)}).then(()=>{n=at(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(R(r,e,t))});return n.push(c),I(n)}).then(()=>{n=[];for(let r of a)if(r.beforeEnter){if(M(r.beforeEnter))for(let i of r.beforeEnter)n.push(R(i,e,t));else n.push(R(r.beforeEnter,e,t))}return n.push(c),I(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=at(a,`beforeRouteEnter`,e,t,k),n.push(c),I(n))).then(()=>{n=[];for(let r of s.list())n.push(R(r,e,t));return n.push(c),I(n)}).catch(e=>P(e,8)?e:Promise.reject(e))}function A(e,t,n){c.list().forEach(r=>k(()=>r(e,t,n)))}function re(e,t,n,r,i){let o=S(e,t);if(o)return o;let s=t===L,c=F?history.state:{};n&&(r||s?a.replace(e.fullPath,j({scroll:s&&c&&c.scroll},i)):a.push(e.fullPath,i)),l.value=e,he(e,t,n,s),me()}let ie;function ae(){ie||=a.listen((e,t,n)=>{if(!ye.listening)return;let r=y(e),i=T(r,ye.currentRoute.value);if(i){E(j(i,{replace:!0,force:!0}),r).catch(ne);return}u=r;let o=l.value;F&&Ze(Ye(o.fullPath,n.delta),qe()),ee(r,o).catch(e=>P(e,12)?e:P(e,2)?(E(j(b(e.to),{force:!0}),r).then(e=>{P(e,20)&&!n.delta&&n.type===`pop`&&a.go(-1,!1)}).catch(ne),Promise.reject()):(n.delta&&a.go(-n.delta,!1),fe(e,r,o))).then(e=>{e||=re(r,o,!1),e&&(n.delta&&!P(e,8)?a.go(-n.delta,!1):n.type===`pop`&&P(e,20)&&a.go(-1,!1)),A(r,o,e)}).catch(ne)})}let oe=it(),ue=it(),de;function fe(e,t,n){me(e);let r=ue.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function pe(){return de&&l.value!==L?Promise.resolve():new Promise((e,t)=>{oe.add([e,t])})}function me(e){return de||(de=!e,ae(),oe.list().forEach(([t,n])=>e?n(e):t()),oe.reset()),e}function he(t,n,i,a){let{scrollBehavior:o}=e;if(!F||!o)return Promise.resolve();let s=!i&&Qe(Ye(t.fullPath,0))||(a||!i)&&history.state&&history.state.scroll||null;return r().then(()=>o(t,n,s)).then(e=>t===l.value&&e&&Je(e)).catch(e=>t===l.value&&fe(e,t,n))}let ge=e=>a.go(e),_e,ve=new Set,ye={currentRoute:l,listening:!0,addRoute:h,removeRoute:g,clearRoutes:t.clearRoutes,hasRoute:v,getRoutes:_,resolve:y,options:e,push:C,replace:w,go:ge,back:()=>ge(-1),forward:()=>ge(1),beforeEach:o.add,beforeResolve:s.add,afterEach:c.add,onError:ue.add,isReady:pe,install(e){e.component(`RouterLink`,Lt),e.component(`RouterView`,Wt),e.config.globalProperties.$router=ye,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>O(l)}),F&&!_e&&l.value===L&&(_e=!0,C(a.location).catch(e=>{}));let t={};for(let e in L)Object.defineProperty(t,e,{get:()=>l.value[e],enumerable:!0});e.provide(se,ye),e.provide(ce,p(t)),e.provide(le,l);let n=e.unmount;ve.add(e),e.unmount=function(){ve.delete(e),ve.size<1&&(u=L,ie&&ie(),ie=null,l.value=L,_e=!1,de=!1),n()}}};function I(e){return e.reduce((e,t)=>e.then(()=>k(t)),Promise.resolve())}return ye}function z(e,t){return _()?(d(e,t),!0):!1}var Kt=new WeakMap,qt=(...n)=>{let r=n[0],i=t()?.proxy??_();if(i==null&&!v())throw Error(`injectLocal must be called in setup`);return i&&Kt.has(i)&&r in Kt.get(i)?Kt.get(i)[r]:e(...n)};function Jt(e,n){let r=t()?.proxy??_();if(r==null)throw Error(`provideLocal must be called in setup`);Kt.has(r)||Kt.set(r,Object.create(null));let i=Kt.get(r);return i[e]=n,s(e,n)}var B=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var Yt=e=>e!==void 0,Xt=e=>e!=null,Zt=Object.prototype.toString,Qt=e=>Zt.call(e)===`[object Object]`,$t=()=>+Date.now(),V=()=>{},en=tn();function tn(){var e,t;return B&&!!((e=window)!=null&&(e=e.navigator)!=null&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)==null||(t=t.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function nn(...e){if(e.length!==1)return h(...e);let t=e[0];return typeof t==`function`?E(S(()=>({get:t,set:V}))):f(t)}function rn(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return`cancel`in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}var an=e=>e();function on(e,t={}){let n,r,i=V,a=V,o=x(!1),s=e=>{clearTimeout(e),i(),i=V},c;return Object.assign(l=>{let u=D(e),d=D(t.maxWait);return n&&s(n),u<=0||d!==void 0&&d<=0?(r&&=(s(r),void 0),o.value=!1,Promise.resolve(l())):(o.value=!0,new Promise((e,f)=>{i=t.rejectOnCancel?f:e,a=e,c=l,d&&!r&&(r=setTimeout(()=>{n&&s(n),r=void 0,o.value=!1,e(c())},d)),n=setTimeout(()=>{r&&s(r),r=void 0,o.value=!1,e(l())},u)}))},{cancel:()=>{n&&=(s(n),void 0),r&&=(s(r),void 0),o.value=!1,a=V},flush:()=>{if(o.value){n&&=(clearTimeout(n),void 0),r&&=(clearTimeout(r),void 0),o.value=!1;let e=a;i=V,a=V,e(c())}},isPending:w(o)})}function sn(e=an,t={}){let{initialState:n=`active`}=t,r=nn(n===`active`);function i(){r.value=!1}function a(){r.value=!0}return{isActive:w(r),pause:i,resume:a,eventFilter:(...t)=>{r.value&&e(...t)}}}function cn(e,t){if(typeof e==`number`)return e+t;let n=e.match(/^-?\d+\.?\d*/)?.[0]||``,r=e.slice(n.length),i=Number.parseFloat(n)+t;return Number.isNaN(i)?e:i+r}function ln(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function un(e,t,n=!1){return Object.fromEntries(Object.entries(e).filter(([e,r])=>(!n||r!==void 0)&&!t.includes(e)))}function dn(e){return Array.isArray(e)?e:[e]}function fn(e){return e||t()}function pn(e){if(!B)return e;let t=0,n,r,i=()=>{--t,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return((...a)=>(t+=1,r||(r=T(!0),n=r.run(()=>e(...a))),z(i),n))}function mn(e,t,n={}){let{eventFilter:r=an,...i}=n;return l(e,rn(r,t),i)}function hn(e,t,n={}){let{eventFilter:r,initialState:i=`active`,...a}=n,{eventFilter:o,pause:s,resume:c,isActive:l}=sn(r,{initialState:i});return{stop:mn(e,t,{...a,eventFilter:o}),pause:s,resume:c,isActive:l}}function gn(e,t={}){if(!C(e))return u(e);let n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(let r in e.value)n[r]=S(()=>({get(){return e.value[r]},set(n){if(D(t.replaceRef)??!0){if(Array.isArray(e.value)){let t=[...e.value];t[r]=n,e.value=t}else{let t={...e.value,[r]:n};Object.setPrototypeOf(t,Object.getPrototypeOf(e.value)),e.value=t}}else e.value[r]=n}}));return n}function H(e,t=!0,n){fn(n)?a(e,n):t?e():r(e)}function _n(e,t=1e3,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=null,o=x(!1);function s(){a&&=(clearInterval(a),null)}function c(){o.value=!1,s()}function u(){let n=D(t);n<=0||(o.value=!0,i&&e(),s(),o.value&&(a=setInterval(e,n)))}return r&&B&&u(),(C(t)||typeof t==`function`)&&z(l(t,()=>{o.value&&B&&u()})),z(c),{isActive:w(o),pause:c,resume:u}}function vn(e=1e3,t={}){let{controls:n=!1,immediate:r=!0,callback:i}=t,a=x(0),o=()=>a.value+=1,s=()=>{a.value=0},c=_n(i?()=>{o(),i(a.value)}:o,e,{immediate:r});return n?{counter:w(a),reset:s,...c}:w(a)}function yn(e=!1,t={}){let{truthyValue:n=!0,falsyValue:r=!1}=t,i=C(e),a=x(e);function o(e){if(arguments.length)return a.value=e,a.value;{let e=D(n);return a.value=a.value===e?D(r):e,a.value}}return i?o:[a,o]}function bn(e,t,n={}){let{debounce:r=0,maxWait:i=void 0,...a}=n;return mn(e,t,{...a,eventFilter:on(r,{maxWait:i})})}var xn=bn;function Sn(e,t,n={}){let{eventFilter:r=an,...i}=n,a=rn(r,t),o,s,c;if(i.flush===`sync`){let t=!1;s=()=>{},o=e=>{t=!0,e(),t=!1},c=l(e,(...e)=>{t||a(...e)},i)}else{let t=[],n=0,r=0;s=()=>{n=r},t.push(l(e,()=>{r++},{...i,flush:`sync`})),o=e=>{let t=r;e(),n+=r-t},t.push(l(e,(...e)=>{let t=n>0&&n===r;n=0,r=0,!t&&a(...e)},i)),c=()=>{t.forEach(e=>e())}}return{stop:c,ignoreUpdates:o,ignorePrevAsyncUpdates:s}}var Cn=Sn;function wn(e,t,n){return l(e,t,{...n,immediate:!0})}function Tn(e,t,n){let i=l(e,(e,a,o)=>{e&&(n?.once&&r(()=>i()),t(e,a,o))},{...n,once:!1});return i}var U=B?window:void 0,En=B?window.document:void 0,Dn=B?window.navigator:void 0;B&&window.location;function W(e){let t=D(e);return t?.$el??t}function G(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=m(()=>{let t=dn(D(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return wn(()=>[n.value?.map(e=>W(e))??[U].filter(e=>e!=null),dn(D(n.value?e[1]:e[0])),dn(O(n.value?e[2]:e[1])),D(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=Qt(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}var On=!1;function kn(e,t,n={}){let{window:r=U,ignore:i=[],capture:a=!0,detectIframe:o=!1,controls:s=!1}=n;if(!r)return s?{stop:V,cancel:V,trigger:V}:V;if(en&&!On){On=!0;let e={passive:!0};Array.from(r.document.body.children).forEach(t=>t.addEventListener(`click`,V,e)),r.document.documentElement.addEventListener(`click`,V,e)}let c=!0,l=e=>D(i).some(t=>{if(typeof t==`string`)return Array.from(r.document.querySelectorAll(t)).some(t=>t===e.target||e.composedPath().includes(t));{let n=W(t);return n&&(e.target===n||e.composedPath().includes(n))}});function u(e){let t=D(e);return t&&t.$.subTree.shapeFlag===16}function d(e,t){let n=D(e),r=n.$.subTree&&n.$.subTree.children;return r==null||!Array.isArray(r)?!1:r.some(e=>e.el===t.target||t.composedPath().includes(e.el))}let f=n=>{let r=W(e);if(n.target!=null&&!(!(r instanceof Element)&&u(e)&&d(e,n))&&!(!r||r===n.target||n.composedPath().includes(r))){if(`detail`in n&&n.detail===0&&(c=!l(n)),!c){c=!0;return}t(n)}},p=!1,m=[G(r,`click`,e=>{p||(p=!0,setTimeout(()=>{p=!1},0),f(e))},{passive:!0,capture:a}),G(r,`pointerdown`,t=>{let n=W(e);c=!l(t)&&!!(n&&!t.composedPath().includes(n))},{passive:!0}),o&&G(r,`blur`,n=>{setTimeout(()=>{let i=W(e),a=r.document.activeElement;for(;a?.shadowRoot;)a=a.shadowRoot.activeElement;a?.tagName===`IFRAME`&&!i?.contains(r.document.activeElement)&&t(n)},0)},{passive:!0})].filter(Boolean),h=()=>m.forEach(e=>e());return s?{stop:h,cancel:()=>{c=!1},trigger:e=>{c=!0,f(e),c=!1}}:h}function An(){let e=x(!1),n=t();return n&&a(()=>{e.value=!0},n),e}function jn(e){let t=An();return m(()=>(t.value,!!e()))}function Mn(e,t,n={}){let{window:r=U,...i}=n,a,o=jn(()=>r&&`MutationObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=l(m(()=>{let t=dn(D(e)).map(W).filter(Xt);return new Set(t)}),e=>{s(),o.value&&e.size&&(a=new MutationObserver(t),e.forEach(e=>a.observe(e,i)))},{immediate:!0,flush:`post`}),u=()=>a?.takeRecords(),d=()=>{c(),s()};return z(d),{isSupported:o,stop:d,takeRecords:u}}function Nn(e,t,n={}){let{window:r=U,document:a=r?.document,flush:o=`sync`}=n;if(!r||!a)return V;let s,c=e=>{s?.(),s=e},l=i(()=>{let n=W(e);if(n){let{stop:e}=Mn(a,e=>{e.map(e=>[...e.removedNodes]).flat().some(e=>e===n||e.contains(n))&&t(e)},{window:r,childList:!0,subtree:!0});c(e)}},{flush:o}),u=()=>{l(),c()};return z(u),u}function Pn(e){return typeof e==`function`?e:typeof e==`string`?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Fn(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]==`object`?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);let{target:i=U,eventName:a=`keydown`,passive:o=!1,dedupe:s=!1}=r,c=Pn(t);return G(i,a,e=>{e.repeat&&D(s)||c(e)&&n(e)},o)}function In(e={}){let{window:t=U,deep:n=!0,triggerOnRemoval:r=!1}=e,i=e.document??t?.document,a=()=>{let e=i?.activeElement;if(n)for(var t;e?.shadowRoot;)e=e==null||(t=e.shadowRoot)==null?void 0:t.activeElement;return e},o=x(),s=()=>{o.value=a()};if(t){let e={capture:!0,passive:!0};G(t,`blur`,e=>{e.relatedTarget===null&&s()},e),G(t,`focus`,s,e)}return r&&Nn(o,s,{document:i}),s(),o}var Ln=Symbol(`vueuse-ssr-width`);function Rn(){let e=v()?qt(Ln,null):null;return typeof e==`number`?e:void 0}function K(e,t={}){let{window:n=U,ssrWidth:r=Rn()}=t,a=jn(()=>n&&`matchMedia`in n&&typeof n.matchMedia==`function`),o=x(typeof r==`number`),s=x(),c=x(!1);return i(()=>{if(o.value){o.value=!a.value;let t=D(e).split(`,`);c.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||i);return n&&a&&(a=r>=ln(n[1])),i&&a&&(a=r<=ln(i[1])),t?!a:a});return}a.value&&(s.value=n.matchMedia(D(e)),c.value=s.value.matches)}),G(s,`change`,e=>{c.value=e.matches},{passive:!0}),m(()=>c.value)}var zn={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function Bn(e,t={}){function n(t,n){let r=D(e[D(t)]);return n!=null&&(r=cn(r,n)),typeof r==`number`&&(r=`${r}px`),r}let{window:r=U,strategy:i=`min-width`,ssrWidth:a=Rn()}=t,o=typeof a==`number`,s=o?x(!1):{value:!0};o&&H(()=>s.value=!!r);function c(e,t){return!s.value&&o?e===`min`?a>=ln(t):a<=ln(t):r?r.matchMedia(`(${e}-width: ${t})`).matches:!1}let l=e=>K(()=>`(min-width: ${n(e)})`,t),u=e=>K(()=>`(max-width: ${n(e)})`,t),d=Object.keys(e).reduce((e,t)=>(Object.defineProperty(e,t,{get:()=>i===`min-width`?l(t):u(t),enumerable:!0,configurable:!0}),e),{});function f(){let t=Object.keys(e).map(e=>[e,d[e],ln(n(e))]).sort((e,t)=>e[2]-t[2]);return m(()=>t.filter(([,e])=>e.value).map(([e])=>e))}return Object.assign(d,{greaterOrEqual:l,smallerOrEqual:u,greater(e){return K(()=>`(min-width: ${n(e,.1)})`,t)},smaller(e){return K(()=>`(max-width: ${n(e,-.1)})`,t)},between(e,r){return K(()=>`(min-width: ${n(e)}) and (max-width: ${n(r,-.1)})`,t)},isGreater(e){return c(`min`,n(e,.1))},isGreaterOrEqual(e){return c(`min`,n(e))},isSmaller(e){return c(`max`,n(e,-.1))},isSmallerOrEqual(e){return c(`max`,n(e))},isInBetween(e,t){return c(`min`,n(e))&&c(`max`,n(t,-.1))},current:f,active(){let e=f();return m(()=>e.value.length===0?``:e.value.at(i===`min-width`?-1:0))}})}function Vn(e){return JSON.parse(JSON.stringify(e))}var Hn=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},Un=`__vueuse_ssr_handlers__`,Wn=Gn();function Gn(){return Un in Hn||(Hn[Un]=Hn[Un]||{}),Hn[Un]}function Kn(e,t){return Wn[e]||t}function qn(e){return K(`(prefers-color-scheme: dark)`,e)}function Jn(e){return e==null?`any`:e instanceof Set?`set`:e instanceof Map?`map`:e instanceof Date?`date`:typeof e==`boolean`?`boolean`:typeof e==`string`?`string`:typeof e==`object`?`object`:Number.isNaN(e)?`any`:`number`}var Yn={boolean:{read:e=>e===`true`,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Xn=`vueuse-storage`;function Zn(e,t,n,i={}){let{flush:a=`pre`,deep:o=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:d,window:p=U,eventFilter:h,onError:g=e=>{console.error(e)},initOnMounted:_}=i,v=(d?x:f)(typeof t==`function`?t():t),y=m(()=>D(e));if(!n)try{n=Kn(`getDefaultStorage`,()=>U?.localStorage)()}catch(e){g(e)}if(!n)return v;let b=D(t),S=Jn(b),C=i.serializer??Yn[S],{pause:w,resume:T}=hn(v,e=>k(e),{flush:a,deep:o,eventFilter:h});l(y,()=>A(),{flush:a});let E=!1;p&&s&&(n instanceof Storage?G(p,`storage`,e=>{_&&!E||A(e)},{passive:!0}):G(p,Xn,e=>{_&&!E||j(e)})),_?H(()=>{E=!0,A()}):A();function O(e,t){if(p){let r={key:y.value,oldValue:e,newValue:t,storageArea:n};p.dispatchEvent(n instanceof Storage?new StorageEvent(`storage`,r):new CustomEvent(Xn,{detail:r}))}}function k(e){try{let t=n.getItem(y.value);if(e==null)O(t,null),n.removeItem(y.value);else{let r=C.write(e);t!==r&&(n.setItem(y.value,r),O(t,r))}}catch(e){g(e)}}function ee(e){let t=e?e.newValue:n.getItem(y.value);if(t==null)return c&&b!=null&&n.setItem(y.value,C.write(b)),b;if(!e&&u){let e=C.read(t);return typeof u==`function`?u(e,b):S===`object`&&!Array.isArray(e)?{...b,...e}:e}return typeof t==`string`?C.read(t):t}function A(e){if(!(e&&e.storageArea!==n)){if(e&&e.key==null){v.value=b;return}if(!(e&&e.key!==y.value)){w();try{let t=C.write(v.value);(e===void 0||e?.newValue!==t)&&(v.value=ee(e))}catch(e){g(e)}finally{e?r(T):T()}}}}function j(e){A(e.detail)}return v}function Qn(e={}){let{document:t=En}=e;if(!t)return x(`visible`);let n=x(t.visibilityState);return G(t,`visibilitychange`,()=>{n.value=t.visibilityState},{passive:!0}),n}var $n={speed:2,margin:30,direction:`both`};function er(e){e.scrollLeft>e.scrollWidth-e.clientWidth&&(e.scrollLeft=Math.max(0,e.scrollWidth-e.clientWidth)),e.scrollTop>e.scrollHeight-e.clientHeight&&(e.scrollTop=Math.max(0,e.scrollHeight-e.clientHeight))}function tr(e,t={}){let{pointerTypes:n,preventDefault:r,stopPropagation:i,exact:a,onMove:o,onEnd:s,onStart:c,initialValue:u,axis:d=`both`,draggingElement:p=U,containerElement:h,handle:g=e,buttons:_=[0],restrictInView:v,autoScroll:y=!1}=t,b=f(D(u)??{x:0,y:0}),x=f(),S=e=>!n||n.includes(e.pointerType),C=e=>{D(r)&&e.preventDefault(),D(i)&&e.stopPropagation()},w=D(y),T=typeof w==`object`?{speed:D(w.speed)??$n.speed,margin:D(w.margin)??$n.margin,direction:w.direction??$n.direction}:$n,E=e=>typeof e==`number`?[e,e]:[e.x,e.y],O=(e,t,n)=>{let{clientWidth:r,clientHeight:i,scrollLeft:a,scrollTop:o,scrollWidth:s,scrollHeight:c}=e,[l,u]=E(T.margin),[d,f]=E(T.speed),p=0,m=0;(T.direction===`x`||T.direction===`both`)&&(n.x0?p=-d:n.x+t.width>r-l&&a0?m=-f:n.y+t.height>i-u&&o{let t=D(h);t&&!k&&(k=setInterval(()=>{let n=D(e).getBoundingClientRect(),{x:r,y:i}=b.value,a={x:r-t.scrollLeft,y:i-t.scrollTop};a.x>=0&&a.y>=0&&(O(t,n,a),a.x+=t.scrollLeft,a.y+=t.scrollTop,b.value=a)},1e3/60))},A=()=>{k&&=(clearInterval(k),null)},j=(e,t,n,r)=>{let[i,a]=typeof n==`number`?[n,n]:[n.x,n.y],{clientWidth:o,clientHeight:s}=t;return e.xo-i||e.ys-a};D(y)&&l(b,()=>{if(D(t.disabled)||!x.value)return;let n=D(h);if(!n)return;let r=D(e).getBoundingClientRect(),{x:i,y:a}=b.value,o={x:i-n.scrollLeft,y:a-n.scrollTop};j(o,n,T.margin,r)?ee():A()});let te=n=>{var r;if(!D(_).includes(n.button)||D(t.disabled)||!S(n)||D(a)&&n.target!==D(e))return;let i=D(h),o=i==null||(r=i.getBoundingClientRect)==null?void 0:r.call(i),s=D(e).getBoundingClientRect(),l={x:n.clientX-(i?s.left-o.left+(y?0:i.scrollLeft):s.left),y:n.clientY-(i?s.top-o.top+(y?0:i.scrollTop):s.top)};c?.(l,n)!==!1&&(x.value=l,C(n))},ne=n=>{if(D(t.disabled)||!S(n)||!x.value)return;let r=D(h);r instanceof HTMLElement&&er(r);let i=D(e).getBoundingClientRect(),{x:a,y:s}=b.value;if((d===`x`||d===`both`)&&(a=n.clientX-x.value.x,r&&(a=Math.min(Math.max(0,a),r.scrollWidth-i.width))),(d===`y`||d===`both`)&&(s=n.clientY-x.value.y,r&&(s=Math.min(Math.max(0,s),r.scrollHeight-i.height))),D(y)&&r&&(k===null&&O(r,i,{x:a,y:s}),a+=r.scrollLeft,s+=r.scrollTop),r&&(v||y)){if(d!==`y`){let e=a-r.scrollLeft;e<0?a=r.scrollLeft:e>r.clientWidth-i.width&&(a=r.clientWidth-i.width+r.scrollLeft)}if(d!==`x`){let e=s-r.scrollTop;e<0?s=r.scrollTop:e>r.clientHeight-i.height&&(s=r.clientHeight-i.height+r.scrollTop)}}b.value={x:a,y:s},o?.(b.value,n),C(n)},M=e=>{D(t.disabled)||!S(e)||x.value&&(x.value=void 0,y&&A(),s?.(b.value,e),C(e))};if(B){let e=()=>({capture:t.capture??!0,passive:!D(r)});G(g,`pointerdown`,te,e),G(p,`pointermove`,ne,e),G(p,[`pointerup`,`pointercancel`],M,e)}return{...gn(b),position:b,isDragging:m(()=>!!x.value),style:m(()=>` + left: ${b.value.x}px; + top: ${b.value.y}px; + ${y?`text-wrap: nowrap;`:``} + `)}}function nr(e,t,n={}){let{window:r=U,...i}=n,a,o=jn(()=>r&&`ResizeObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=l(m(()=>{let t=D(e);return Array.isArray(t)?t.map(e=>W(e)):[W(t)]}),e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),u=()=>{s(),c()};return z(u),{isSupported:o,stop:u}}function rr(e,t={}){let{reset:n=!0,windowResize:r=!0,windowScroll:i=!0,immediate:a=!0,updateTiming:o=`sync`}=t,s=x(0),c=x(0),u=x(0),d=x(0),f=x(0),p=x(0),m=x(0),h=x(0);function g(){let t=W(e);if(!t){n&&(s.value=0,c.value=0,u.value=0,d.value=0,f.value=0,p.value=0,m.value=0,h.value=0);return}let r=t.getBoundingClientRect();s.value=r.height,c.value=r.bottom,u.value=r.left,d.value=r.right,f.value=r.top,p.value=r.width,m.value=r.x,h.value=r.y}function _(){o===`sync`?g():o===`next-frame`&&requestAnimationFrame(()=>g())}return nr(e,_),l(()=>W(e),e=>!e&&_()),Mn(e,_,{attributeFilter:[`style`,`class`]}),i&&G(`scroll`,_,{capture:!0,passive:!0}),r&&G(`resize`,_,{passive:!0}),H(()=>{a&&_()}),{height:s,bottom:c,left:u,right:d,top:f,width:p,x:m,y:h,update:_}}function ir(e,t={width:0,height:0},n={}){let{window:r=U,box:i=`content-box`}=n,a=m(()=>{var t;return(t=W(e))==null||(t=t.namespaceURI)==null?void 0:t.includes(`svg`)}),o=x(t.width),s=x(t.height),{stop:c}=nr(e,([t])=>{let n=i===`border-box`?t.borderBoxSize:i===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&a.value){let t=W(e);if(t){let e=t.getBoundingClientRect();o.value=e.width,s.value=e.height}}else if(n){let e=dn(n);o.value=e.reduce((e,{inlineSize:t})=>e+t,0),s.value=e.reduce((e,{blockSize:t})=>e+t,0)}else o.value=t.contentRect.width,s.value=t.contentRect.height},n);H(()=>{let n=W(e);if(n&&`offsetWidth`in n){if(i===`content-box`&&r){let e=r.getComputedStyle(n),t=Number.parseFloat(e.paddingLeft)+Number.parseFloat(e.paddingRight),i=Number.parseFloat(e.paddingTop)+Number.parseFloat(e.paddingBottom),a=Number.parseFloat(e.borderLeftWidth)+Number.parseFloat(e.borderRightWidth),c=Number.parseFloat(e.borderTopWidth)+Number.parseFloat(e.borderBottomWidth);o.value=n.offsetWidth-t-a,s.value=n.offsetHeight-i-c}else o.value=n.offsetWidth,s.value=n.offsetHeight}else n&&(o.value=t.width,s.value=t.height)});let u=l(()=>W(e),e=>{o.value=e?t.width:0,s.value=e?t.height:0});function d(){c(),u()}return{width:o,height:s,stop:d}}var ar=[`fullscreenchange`,`webkitfullscreenchange`,`webkitendfullscreen`,`mozfullscreenchange`,`MSFullscreenChange`];function or(e,t={}){let{document:n=En,autoExit:r=!1}=t,i=m(()=>W(e)??n?.documentElement),a=x(!1),o=m(()=>[`requestFullscreen`,`webkitRequestFullscreen`,`webkitEnterFullscreen`,`webkitEnterFullScreen`,`webkitRequestFullScreen`,`mozRequestFullScreen`,`msRequestFullscreen`].find(e=>n&&e in n||i.value&&e in i.value)),s=m(()=>[`exitFullscreen`,`webkitExitFullscreen`,`webkitExitFullScreen`,`webkitCancelFullScreen`,`mozCancelFullScreen`,`msExitFullscreen`].find(e=>n&&e in n||i.value&&e in i.value)),c=m(()=>[`fullScreen`,`webkitIsFullScreen`,`webkitDisplayingFullscreen`,`mozFullScreen`,`msFullscreenElement`].find(e=>n&&e in n||i.value&&e in i.value)),l=[`fullscreenElement`,`webkitFullscreenElement`,`mozFullScreenElement`,`msFullscreenElement`].find(e=>n&&e in n),u=jn(()=>i.value&&n&&o.value!==void 0&&s.value!==void 0&&c.value!==void 0),d=()=>l?n?.[l]===i.value:!1,f=()=>{if(c.value){if(n&&n[c.value]!=null)return n[c.value];{let e=i.value;if(e?.[c.value]!=null)return!!e[c.value]}}return!1};async function p(){if(!(!u.value||!a.value)){if(s.value){if(n?.[s.value]!=null)await n[s.value]();else{let e=i.value;e?.[s.value]!=null&&await e[s.value]()}}a.value=!1}}async function h(){if(!u.value||a.value)return;f()&&await p();let e=i.value;o.value&&e?.[o.value]!=null&&(await e[o.value](),a.value=!0)}async function g(){await(a.value?p():h())}let _=()=>{let e=f();(!e||e&&d())&&(a.value=e)},v={capture:!1,passive:!0};return G(n,ar,_,v),G(()=>W(i),ar,_,v),H(_,!1),r&&z(p),{isSupported:u,isFullscreen:a,enter:h,exit:p,toggle:g}}function sr(e,t,n={}){let{window:r=U}=n;return Zn(e,t,r?.localStorage,n)}var cr={ctrl:`control`,command:`meta`,cmd:`meta`,option:`alt`,up:`arrowup`,down:`arrowdown`,left:`arrowleft`,right:`arrowright`};function lr(e={}){let{reactive:t=!1,target:n=U,aliasMap:r=cr,passive:i=!0,onEventFired:a=V}=e,o=y(new Set),s={toJSON(){return{}},current:o},c=t?y(s):s,l=new Set,u=new Map([[`Meta`,l],[`Shift`,new Set],[`Alt`,new Set]]),d=new Set;function f(e,n){e in c&&(t?c[e]=n:c[e].value=n)}function p(){o.clear();for(let e of d)f(e,!1)}function h(e,t,n){if(!(!e||typeof t.getModifierState!=`function`)){for(let[e,r]of u)if(t.getModifierState(e)){n.forEach(e=>r.add(e));break}}}function g(e,t){if(e)return;let n=`${t[0].toUpperCase()}${t.slice(1)}`,r=u.get(n);if(![`shift`,`alt`].includes(t)||!r)return;let i=Array.from(r),a=i.indexOf(t);i.forEach((e,t)=>{t>=a&&(o.delete(e),f(e,!1))}),r.clear()}function _(e,t){let n=e.key?.toLowerCase(),r=[e.code?.toLowerCase(),n].filter(Boolean);if(n){n&&(t?o.add(n):o.delete(n));for(let e of r)d.add(e),f(e,t);h(t,e,[...o,...r]),g(t,n),n===`meta`&&!t&&(l.forEach(e=>{o.delete(e),f(e,!1)}),l.clear())}}G(n,`keydown`,e=>(_(e,!0),a(e)),{passive:i}),G(n,`keyup`,e=>(_(e,!1),a(e)),{passive:i}),G(`blur`,p,{passive:i}),G(`focus`,p,{passive:i});let v=new Proxy(c,{get(e,n,i){if(typeof n!=`string`)return Reflect.get(e,n,i);if(n=n.toLowerCase(),n in r&&(n=r[n]),!(n in c)){if(/[+_-]/.test(n)){let e=n.split(/[+_-]/g).map(e=>e.trim());c[n]=m(()=>e.map(e=>D(v[e])).every(Boolean))}else c[n]=x(!1)}let a=Reflect.get(e,n,i);return t?D(a):a}});return v}var ur={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof MouseEvent?[e.movementX,e.movementY]:null};function dr(e={}){let{type:t=`page`,touch:n=!0,resetOnTouchEnds:r=!1,initialValue:i={x:0,y:0},window:a=U,target:o=a,scroll:s=!0,eventFilter:c}=e,l=null,u=0,d=0,f=x(i.x),p=x(i.y),m=x(null),h=typeof t==`function`?t:ur[t],g=e=>{let t=h(e);l=e,t&&([f.value,p.value]=t,m.value=`mouse`),a&&(u=a.scrollX,d=a.scrollY)},_=e=>{if(e.touches.length>0){let t=h(e.touches[0]);t&&([f.value,p.value]=t,m.value=`touch`)}},v=()=>{if(!l||!a)return;let e=h(l);l instanceof MouseEvent&&e&&(f.value=e[0]+a.scrollX-u,p.value=e[1]+a.scrollY-d)},y=()=>{f.value=i.x,p.value=i.y},b=c?e=>c(()=>g(e),{}):e=>g(e),S=c?e=>c(()=>_(e),{}):e=>_(e),C=c?()=>c(()=>v(),{}):()=>v();if(o){let e={passive:!0};G(o,[`mousemove`,`dragover`],b,e),n&&t!==`movement`&&(G(o,[`touchstart`,`touchmove`],S,e),r&&G(o,`touchend`,y,e)),s&&t===`page`&&G(a,`scroll`,C,e)}return{x:f,y:p,sourceType:m}}function fr(e,t={}){let n=nn(e),{threshold:r=50,onSwipe:i,onSwipeEnd:a,onSwipeStart:o,disableTextSelect:s=!1}=t,c=y({x:0,y:0}),l=(e,t)=>{c.x=e,c.y=t},u=y({x:0,y:0}),d=(e,t)=>{u.x=e,u.y=t},f=m(()=>c.x-u.x),p=m(()=>c.y-u.y),{max:h,abs:g}=Math,_=m(()=>h(g(f.value),g(p.value))>=r),v=x(!1),b=x(!1),S=m(()=>_.value?g(f.value)>g(p.value)?f.value>0?`left`:`right`:p.value>0?`up`:`down`:`none`),C=e=>{let n=e.buttons===0,r=e.buttons===1;return t.pointerTypes?.includes(e.pointerType)??(n||r)??!0},T={passive:!0},D=[G(e,`pointerdown`,e=>{if(!C(e))return;b.value=!0,e.target?.setPointerCapture(e.pointerId);let{clientX:t,clientY:n}=e;l(t,n),d(t,n),o?.(e)},T),G(e,`pointermove`,e=>{if(!C(e)||!b.value)return;let{clientX:t,clientY:n}=e;d(t,n),!v.value&&_.value&&(v.value=!0),v.value&&i?.(e)},T),G(e,[`pointerup`,`pointercancel`],e=>{C(e)&&(v.value&&a?.(e,S.value),b.value=!1,v.value=!1)},T)];return H(()=>{var e;if((e=n.value)==null||(e=e.style)==null||e.setProperty(`touch-action`,`pan-y`),s){var t,r,i;(t=n.value)==null||(t=t.style)==null||t.setProperty(`-webkit-user-select`,`none`),(r=n.value)==null||(r=r.style)==null||r.setProperty(`-ms-user-select`,`none`),(i=n.value)==null||(i=i.style)==null||i.setProperty(`user-select`,`none`)}}),{isSwiping:w(v),direction:w(S),posStart:E(c),posEnd:E(u),distanceX:f,distanceY:p,stop:()=>D.forEach(e=>e())}}var pr=0,mr=new WeakMap;function hr(e,t={}){let n=x(!1),{document:r=En,immediate:i=!0,manual:a=!1,id:o=`vueuse_styletag_${++pr}`}=t,s=x(e),c=()=>{},u=()=>{if(!r)return;let e=r.getElementById(o)||r.createElement(`style`);e.isConnected||(e.id=o,t.nonce&&(e.nonce=t.nonce),t.media&&(e.media=t.media),r.head.appendChild(e)),!n.value&&(mr.set(e,(mr.get(e)??0)+1),c=l(s,t=>{e.textContent=t},{immediate:!0}),n.value=!0)},d=()=>{if(!r||!n.value)return;c();let e=r.getElementById(o);if(e){let t=(mr.get(e)??1)-1;t<=0?(mr.delete(e),r.head.removeChild(e)):mr.set(e,t)}n.value=!1};return i&&!a&&H(u),a||z(d),{id:o,css:s,unload:d,load:u,isLoaded:w(n)}}function gr(e,n,i,a={}){var o,s;let{clone:c=!1,passive:u=!1,eventName:d,deep:p=!1,defaultValue:h,shouldEmit:g}=a,_=t(),v=i||_?.emit||(_==null||(o=_.$emit)==null?void 0:o.bind(_))||(_==null||(s=_.proxy)==null||(s=s.$emit)==null?void 0:s.bind(_?.proxy)),y=d;n||=`modelValue`,y||=`update:${n.toString()}`;let b=e=>c?typeof c==`function`?c(e):Vn(e):e,x=()=>Yt(e[n])?b(e[n]):h,S=e=>{g?g(e)&&v(y,e):v(y,e)};if(u){let t=f(x()),i=!1;return l(()=>e[n],e=>{i||(i=!0,t.value=b(e),r(()=>i=!1))}),l(t,t=>{!i&&(t!==e[n]||p)&&S(t)},{deep:p}),t}return m({get(){return x()},set(e){S(e)}})}function _r(e={}){let{navigator:t=Dn,document:n=En}=e,r=x(!1),i=x(null),a=Qn({document:n}),o=jn(()=>t&&`wakeLock`in t),s=m(()=>!!i.value&&a.value===`visible`);o.value&&(G(i,`release`,()=>{r.value=i.value?.type??!1},{passive:!0}),Tn(()=>a.value===`visible`&&n?.visibilityState===`visible`&&r.value,e=>{r.value=!1,c(e)}));async function c(e){await i.value?.release(),i.value=o.value?await t.wakeLock.request(e):null}async function l(e){a.value===`visible`?await c(e):r.value=e}async function u(){r.value=!1;let e=i.value;i.value=null,await e?.release()}return z(()=>{u()}),{sentinel:i,isSupported:o,isActive:s,request:l,forceRequest:c,release:u}}function vr(e={}){let{window:t=U}=e;if(!t)return x(!1);let n=x(t.document.hasFocus()),r={passive:!0};return G(t,`blur`,()=>{n.value=!1},r),G(t,`focus`,()=>{n.value=!0},r),n}function yr(e={}){let{window:t=U,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:i=!0,includeScrollbar:a=!0,type:o=`inner`}=e,s=x(n),c=x(r),u=()=>{if(t){if(o===`outer`)s.value=t.outerWidth,c.value=t.outerHeight;else if(o===`visual`&&t.visualViewport){let{width:e,height:n,scale:r}=t.visualViewport;s.value=Math.round(e*r),c.value=Math.round(n*r)}else a?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)}};u(),H(u);let d={passive:!0};return G(`resize`,u,d),t&&o===`visual`&&t.visualViewport&&G(t.visualViewport,`resize`,u,d),i&&l(K(`(orientation: portrait)`),()=>u()),{width:s,height:c}}function br(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function xr(e,t,n=`.`,r){if(!br(t))return xr(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(i[t]=Array.isArray(a)&&Array.isArray(i[t])?[...a,...i[t]]:br(a)&&br(i[t])?xr(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function Sr(e){return(...t)=>t.reduce((t,n)=>xr(t,n,``,e),{})}var Cr=Sr();function wr(e){return _()?(d(e),!0):!1}var Tr=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var Er=e=>e!=null,Dr=Object.prototype.toString,Or=e=>Dr.call(e)===`[object Object]`,kr=()=>{};function Ar(e){return Array.isArray(e)?e:[e]}function jr(e){return e||t()}function Mr(e,t){jr(t)&&k(e,t)}function Nr(e,t,n){return l(e,t,{...n,immediate:!0})}var Pr=Tr?window:void 0;Tr&&window.document,Tr&&window.navigator,Tr&&window.location;function Fr(e){let t=D(e);return t?.$el??t}function q(...e){let t=[],n=()=>{t.forEach(e=>e()),t.length=0},r=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),i=m(()=>{let t=Ar(D(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0}),a=Nr(()=>[i.value?.map(e=>Fr(e))??[Pr].filter(e=>e!=null),Ar(D(i.value?e[1]:e[0])),Ar(O(i.value?e[2]:e[1])),D(i.value?e[3]:e[2])],([e,i,a,o])=>{if(n(),!e?.length||!i?.length||!a?.length)return;let s=Or(o)?{...o}:o;t.push(...e.flatMap(e=>i.flatMap(t=>a.map(n=>r(e,t,n,s)))))},{flush:`post`});return wr(n),()=>{a(),n()}}function Ir(){let e=x(!1),n=t();return n&&a(()=>{e.value=!0},n),e}function Lr(e){let t=Ir();return m(()=>(t.value,!!e()))}function Rr(e,t,n={}){let{root:r,rootMargin:i=`0px`,threshold:a=0,window:o=Pr,immediate:s=!0}=n,c=Lr(()=>o&&`IntersectionObserver`in o),u=m(()=>Ar(D(e)).map(Fr).filter(Er)),d=kr,f=x(s),p=c.value?l(()=>[u.value,Fr(r),f.value],([e,n])=>{if(d(),!f.value||!e.length)return;let r=new IntersectionObserver(t,{root:Fr(n),rootMargin:i,threshold:a});e.forEach(e=>e&&r.observe(e)),d=()=>{r.disconnect(),d=kr}},{immediate:s,flush:`post`}):kr,h=()=>{d(),p(),f.value=!1};return wr(h),{isSupported:c,isActive:f,pause(){d(),f.value=!1},resume(){f.value=!0},stop:h}}var zr=1/60*1e3,Br=typeof performance<`u`?()=>performance.now():()=>Date.now(),Vr=typeof window<`u`?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Br()),zr);function Hr(e){let t=[],n=[],r=0,i=!1,a=!1,o=new WeakSet,s={schedule:(e,a=!1,s=!1)=>{let c=s&&i,l=c?t:n;return a&&o.add(e),l.indexOf(e)===-1&&(l.push(e),c&&i&&(r=t.length)),e},cancel:e=>{let t=n.indexOf(e);t!==-1&&n.splice(t,1),o.delete(e)},process:c=>{if(i){a=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;n(e[t]=Hr(()=>Gr=!0),e),{}),Xr=Jr.reduce((e,t)=>{let n=Yr[t];return e[t]=(e,t=!1,r=!1)=>(Gr||ei(),n.schedule(e,t,r)),e},{}),Zr=Jr.reduce((e,t)=>(e[t]=Yr[t].cancel,e),{});Jr.reduce((e,t)=>(e[t]=()=>Yr[t].process(qr),e),{});var Qr=e=>Yr[e].process(qr),$r=e=>{Gr=!1,qr.delta=Wr?zr:Math.max(Math.min(e-qr.timestamp,Ur),1),qr.timestamp=e,Kr=!0,Jr.forEach(Qr),Kr=!1,Gr&&(Wr=!1,Vr($r))},ei=()=>{Gr=!0,Wr=!0,Kr||Vr($r)},ti=()=>qr;function ni(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),ii=.001,ai=.01,oi=.05;function si({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a,o=1-t;o=ri(oi,1,o),e=ri(ai,10,e/1e3),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=ui(t,o),c=Math.exp(-i);return ii-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=ui(t**2,o);return(-i(t)+ii>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=li(i,a,s);if(e*=1e3,isNaN(c))return{stiffness:100,damping:10,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var ci=12;function li(e,t,n){let r=n;for(let n=1;ne[t]!==void 0)}function mi(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!pi(e,fi)&&pi(e,di)){let n=si(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function hi(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,a=ni(e,[`from`,`to`,`restSpeed`,`restDelta`]);let o={done:!1,value:t},{stiffness:s,damping:c,mass:l,velocity:u,duration:d,isResolvedFromDuration:f}=mi(a),p=gi,m=gi;function h(){let e=u?-(u/1e3):0,r=n-t,a=c/(2*Math.sqrt(s*l)),o=Math.sqrt(s/l)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),a<1){let t=ui(o,a);p=i=>{let s=Math.exp(-a*o*i);return n-s*((e+a*o*r)/t*Math.sin(t*i)+r*Math.cos(t*i))},m=n=>{let i=Math.exp(-a*o*n);return a*o*i*(Math.sin(t*n)*(e+a*o*r)/t+r*Math.cos(t*n))-i*(Math.cos(t*n)*(e+a*o*r)-t*r*Math.sin(t*n))}}else if(a===1)p=t=>n-Math.exp(-o*t)*(r+(e+o*r)*t);else{let t=o*Math.sqrt(a*a-1);p=i=>{let s=Math.exp(-a*o*i),c=Math.min(t*i,300);return n-s*((e+a*o*r)*Math.sinh(c)+t*r*Math.cosh(c))/t}}}return h(),{next:e=>{let t=p(e);if(f)o.done=e>=d;else{let a=m(e)*1e3,s=Math.abs(a)<=r,c=Math.abs(n-t)<=i;o.done=s&&c}return o.value=o.done?n:t,o},flipTarget:()=>{u=-u,[t,n]=[n,t],h()}}}hi.needsInterpolation=(e,t)=>typeof e==`string`||typeof t==`string`;var gi=e=>0,_i=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},vi=(e,t,n)=>-n*e+n*t+e,yi=(e,t)=>n=>Math.max(Math.min(n,t),e),bi=e=>e%1?Number(e.toFixed(5)):e,xi=/(-)?([\d]*\.?[\d])+/g,Si=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Ci=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function wi(e){return typeof e==`string`}var Ti={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Ei=Object.assign(Object.assign({},Ti),{transform:yi(0,1)}),Di=Object.assign(Object.assign({},Ti),{default:1}),Oi=e=>({test:t=>wi(t)&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),J=Oi(`deg`),ki=Oi(`%`),Y=Oi(`px`),Ai=Object.assign(Object.assign({},ki),{parse:e=>ki.parse(e)/100,transform:e=>ki.transform(e*100)}),ji=(e,t)=>n=>!!(wi(n)&&Ci.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Mi=(e,t,n)=>r=>{if(!wi(r))return r;let[i,a,o,s]=r.match(xi);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},X={test:ji(`hsl`,`hue`),parse:Mi(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+ki.transform(bi(t))+`, `+ki.transform(bi(n))+`, `+bi(Ei.transform(r))+`)`},Ni=yi(0,255),Pi=Object.assign(Object.assign({},Ti),{transform:e=>Math.round(Ni(e))}),Z={test:ji(`rgb`,`red`),parse:Mi(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Pi.transform(e)+`, `+Pi.transform(t)+`, `+Pi.transform(n)+`, `+bi(Ei.transform(r))+`)`};function Fi(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Ii={test:ji(`#`),parse:Fi,transform:Z.transform},Q={test:e=>Z.test(e)||Ii.test(e)||X.test(e),parse:e=>Z.test(e)?Z.parse(e):X.test(e)?X.parse(e):Ii.parse(e),transform:e=>wi(e)?e:e.hasOwnProperty(`red`)?Z.transform(e):X.transform(e)},Li="${c}",Ri="${n}";function zi(e){return isNaN(e)&&wi(e)&&(e.match(xi)?.length??0)+(e.match(Si)?.length??0)>0}function Bi(e){typeof e==`number`&&(e=`${e}`);let t=[],n=0,r=e.match(Si);r&&(n=r.length,e=e.replace(Si,Li),t.push(...r.map(Q.parse)));let i=e.match(xi);return i&&(e=e.replace(xi,Ri),t.push(...i.map(Ti.parse))),{values:t,numColors:n,tokenised:e}}function Vi(e){return Bi(e).values}function Hi(e){let{values:t,numColors:n,tokenised:r}=Bi(e),i=t.length;return e=>{let t=r;for(let r=0;rtypeof e==`number`?0:e;function Wi(e){let t=Vi(e);return Hi(e)(t.map(Ui))}var Gi={test:zi,parse:Vi,createTransformer:Hi,getAnimatableNone:Wi},Ki=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function qi(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(xi)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Ki.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Ji=/([a-z-]*)\(.*?\)/g,Yi=Object.assign(Object.assign({},Gi),{getAnimatableNone:e=>{let t=e.match(Ji);return t?t.map(qi).join(` `):e}});function Xi(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Zi({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Xi(s,r,e+1/3),a=Xi(s,r,e),o=Xi(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}var Qi=(e,t,n)=>{let r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},$i=[Ii,Z,X],ea=e=>$i.find(t=>t.test(e)),ta=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,na=(e,t)=>{let n=ea(e),r=ea(t);ta(e),ta(t);let i=n.parse(e),a=r.parse(t);n===X&&(i=Zi(i),n=Z),r===X&&(a=Zi(a),r=Z);let o=Object.assign({},i);return e=>{for(let t in o)t!==`alpha`&&(o[t]=Qi(i[t],a[t],e));return o.alpha=vi(i.alpha,a.alpha,e),n.transform(o)}},ra=e=>typeof e==`number`,ia=(e,t)=>n=>t(e(n)),aa=(...e)=>e.reduce(ia);function oa(e,t){return ra(e)?n=>vi(e,t,n):Q.test(e)?na(e,t):ua(e,t)}var sa=(e,t)=>{let n=[...e],r=n.length,i=e.map((e,n)=>oa(e,t[n]));return e=>{for(let t=0;t{let n=Object.assign(Object.assign({},e),t),r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=oa(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}};function la(e){let t=Gi.parse(e),n=t.length,r=0,i=0,a=0;for(let e=0;e{let n=Gi.createTransformer(t),r=la(e),i=la(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?aa(sa(r.parsed,i.parsed),n):(`${e}${t}`,n=>`${n>0?t:e}`)},da=(e,t)=>n=>vi(e,t,n);function fa(e){if(typeof e==`number`)return da;if(typeof e==`string`)return Q.test(e)?na:ua;if(Array.isArray(e))return sa;if(typeof e==`object`)return ca}function pa(e,t,n){let r=[],i=n||fa(e[0]),a=e.length-1;for(let n=0;nn(_i(e,t,r))}function ha(e,t){let n=e.length,r=n-1;return i=>{let a=0,o=!1;if(i<=e[0]?o=!0:i>=e[r]&&(a=r-1,o=!0),!o){let t=1;for(;ti||t===r);t++);a=t-1}let s=_i(e[a],e[a+1],i);return t[a](s)}}function ga(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;t.length,!r||!Array.isArray(r)||(r.length,a-1),e[0]>e[a-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());let o=pa(t,r,i),s=a===2?ma(e,o):ha(e,o);return n?t=>s(ri(e[0],e[a-1],t)):s}var _a=e=>t=>1-e(1-t),va=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ya=e=>t=>t**+e,ba=e=>t=>t*t*((e+1)*t-e),xa=e=>{let t=ba(e);return e=>(e*=2)<1?.5*t(e):.5*(2-2**(-10*(e-1)))},Sa=1.525,Ca=4/11,wa=8/11,Ta=9/10,Ea=e=>e,Da=ya(2),Oa=_a(Da),ka=va(Da),Aa=e=>1-Math.sin(Math.acos(e)),ja=_a(Aa),Ma=va(ja),Na=ba(Sa),Pa=_a(Na),Fa=va(Na),Ia=xa(Sa),La=4356/361,Ra=35442/1805,za=16061/1805,Ba=e=>{if(e===1||e===0)return e;let t=e*e;return ee<.5?.5*(1-Ba(1-e*2)):.5*Ba(e*2-1)+.5;function Ua(e,t){return e.map(()=>t||ka).splice(0,e.length-1)}function Wa(e){let t=e.length;return e.map((e,n)=>n===0?0:n/(t-1))}function Ga(e,t){return e.map(e=>e*t)}function Ka({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){let a={done:!1,value:e},o=Array.isArray(t)?t:[e,t],s=Ga(r&&r.length===o.length?r:Wa(o),i);function c(){return ga(s,o,{ease:Array.isArray(n)?n:Ua(o,n)})}let l=c();return{next:e=>(a.value=l(e),a.done=e>=i,a),flipTarget:()=>{o.reverse(),l=c()}}}function qa({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:a}){let o={done:!1,value:t},s=n*e,c=t+s,l=a===void 0?c:a(c);return l!==c&&(s=l-t),{next:e=>{let t=-s*Math.exp(-e/r);return o.done=!(t>i||t<-i),o.value=o.done?l:l+t,o},flipTarget:()=>{}}}var Ja={keyframes:Ka,spring:hi,decay:qa};function Ya(e){if(Array.isArray(e.to))return Ka;if(Ja[e.type])return Ja[e.type];let t=new Set(Object.keys(e));return t.has(`ease`)||t.has(`duration`)&&!t.has(`dampingRatio`)?Ka:t.has(`dampingRatio`)||t.has(`stiffness`)||t.has(`mass`)||t.has(`damping`)||t.has(`restSpeed`)||t.has(`restDelta`)?hi:Ka}function Xa(e,t,n=0){return e-t-n}function Za(e,t,n=0,r=!0){return r?Xa(t+-e,t,n):t-(e-t)+n}function Qa(e,t,n,r){return r?e>=t+n:e<=-n}var $a=e=>{let t=({delta:t})=>e(t);return{start:()=>Xr.update(t,!0),stop:()=>Zr.update(t)}};function eo(e){var t,{from:n,autoplay:r=!0,driver:i=$a,elapsed:a=0,repeat:o=0,repeatType:s=`loop`,repeatDelay:c=0,onPlay:l,onStop:u,onComplete:d,onRepeat:f,onUpdate:p}=e,m=ni(e,[`from`,`autoplay`,`driver`,`elapsed`,`repeat`,`repeatType`,`repeatDelay`,`onPlay`,`onStop`,`onComplete`,`onRepeat`,`onUpdate`]);let{to:h}=m,g,_=0,v=m.duration,y,b=!1,x=!0,S,C=Ya(m);(t=C).needsInterpolation?.call(t,n,h)&&(S=ga([0,100],[n,h],{clamp:!1}),n=0,h=100);let w=C(Object.assign(Object.assign({},m),{from:n,to:h}));function T(){_++,s===`reverse`?(x=_%2==0,a=Za(a,v,c,x)):(a=Xa(a,v,c),s===`mirror`&&w.flipTarget()),b=!1,f&&f()}function E(){g.stop(),d&&d()}function D(e){if(x||(e=-e),a+=e,!b){let e=w.next(Math.max(0,a));y=e.value,S&&(y=S(y)),b=x?e.done:a<=0}p?.(y),b&&(_===0&&(v??=a),_{u?.(),g.stop()}}}function to(e,t){return t?1e3/t*e:0}function no({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:a=750,bounceStiffness:o=500,bounceDamping:s=10,restDelta:c=1,modifyTarget:l,driver:u,onUpdate:d,onComplete:f,onStop:p}){let m;function h(e){return n!==void 0&&er}function g(e){return n===void 0?r:r===void 0||Math.abs(n-e){var n;d?.(t),(n=e.onUpdate)==null||n.call(e,t)},onComplete:f,onStop:p}))}function v(e){_(Object.assign({type:`spring`,stiffness:o,damping:s,restDelta:c},e))}if(h(e))v({from:e,velocity:t,to:g(e)});else{let r=i*t+e;l!==void 0&&(r=l(r));let o=g(r),s=o===n?-1:1,u,d;_({type:`decay`,from:e,velocity:t,timeConstant:a,power:i,restDelta:c,modifyTarget:l,onUpdate:h(r)?e=>{u=d,d=e,t=to(e-u,ti().delta),(s===1&&e>o||s===-1&&em?.stop()}}var ro=(e,t)=>1-3*t+3*e,io=(e,t)=>3*t-6*e,ao=e=>3*e,oo=(e,t,n)=>((ro(t,n)*e+io(t,n))*e+ao(t))*e,so=(e,t,n)=>3*ro(t,n)*e*e+2*io(t,n)*e+ao(t),co=1e-7,lo=10;function uo(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=oo(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>co&&++s=po?mo(t,s,e,n):c===0?s:uo(t,r,r+go,e,n)}return e=>e===0||e===1?e:oo(a(e),t,r)}var vo={},yo=class{subscriptions=new Set;add(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}notify(e,t,n){if(this.subscriptions.size)for(let r of this.subscriptions)r(e,t,n)}clear(){this.subscriptions.clear()}};function bo(e){return!Number.isNaN(Number.parseFloat(e))}var xo=class{current;prev;timeDelta=0;lastUpdated=0;updateSubscribers=new yo;stopAnimation;canTrackVelocity=!1;constructor(e){this.prev=this.current=e,this.canTrackVelocity=bo(this.current)}onChange(e){return this.updateSubscribers.add(e)}clearListeners(){this.updateSubscribers.clear()}set(e){this.updateAndNotify(e)}updateAndNotify=e=>{this.prev=this.current,this.current=e;let{delta:t,timestamp:n}=ti();this.lastUpdated!==n&&(this.timeDelta=t,this.lastUpdated=n),Xr.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)};get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?to(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}scheduleVelocityCheck=()=>Xr.postRender(this.velocityCheck);velocityCheck=({timestamp:e})=>{this.canTrackVelocity||=bo(this.current),e!==this.lastUpdated&&(this.prev=this.current)};start(e){return this.stop(),new Promise(t=>{let{stop:n}=e(t);this.stopAnimation=n}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.stop()}};function So(e){return new xo(e)}var{isArray:Co}=Array;function wo(){let e=f({}),t=t=>{let n=t=>{e.value[t]&&(e.value[t].stop(),e.value[t].destroy(),delete e.value[t])};t?Co(t)?t.forEach(n):n(t):Object.keys(e.value).forEach(n)};return Mr(t),{motionValues:e,get:(t,n,r)=>{if(e.value[t])return e.value[t];let i=So(n);return i.onChange(e=>r[t]=e),e.value[t]=i,i},stop:t}}function To(e){return Array.isArray(e)}function $(){return{type:`spring`,stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function Eo(e){return{type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function Do(e){return{type:`spring`,stiffness:550,damping:e===0?100:30,restDelta:.01,restSpeed:10}}function Oo(){return{type:`keyframes`,ease:`linear`,duration:300}}function ko(e){return{type:`keyframes`,duration:800,values:e}}var Ao={default:Do,x:$,y:$,z:$,rotate:$,rotateX:$,rotateY:$,rotateZ:$,scaleX:Eo,scaleY:Eo,scale:Eo,backgroundColor:Oo,color:Oo,opacity:Oo};function jo(e,t){let n;return n=To(t)?ko:Ao[e]||Ao.default,{to:t,...n(t)}}var Mo={...Ti,transform:Math.round},No={color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,radius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,size:Y,top:Y,right:Y,bottom:Y,left:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,rotate:J,rotateX:J,rotateY:J,rotateZ:J,scale:Di,scaleX:Di,scaleY:Di,scaleZ:Di,skew:J,skewX:J,skewY:J,distance:Y,translateX:Y,translateY:Y,translateZ:Y,x:Y,y:Y,z:Y,perspective:Y,transformPerspective:Y,opacity:Ei,originX:Ai,originY:Ai,originZ:Y,zIndex:Mo,filter:Yi,WebkitFilter:Yi,fillOpacity:Ei,strokeOpacity:Ei,numOctaves:Mo},Po=e=>No[e];function Fo(e,t){return t&&typeof e==`number`&&t.transform?t.transform(e):e}function Io(e,t){let n=Po(e);return n!==Yi&&(n=Gi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Lo={linear:Ea,easeIn:Da,easeInOut:ka,easeOut:Oa,circIn:Aa,circInOut:Ma,circOut:ja,backIn:Na,backInOut:Fa,backOut:Pa,anticipate:Ia,bounceIn:Va,bounceInOut:Ha,bounceOut:Ba};function Ro(e){if(Array.isArray(e)){let[t,n,r,i]=e;return _o(t,n,r,i)}return typeof e==`string`?Lo[e]:e}function zo(e){return Array.isArray(e)&&typeof e[0]!=`number`}function Bo(e,t){return e!==`zIndex`&&!!(typeof t==`number`||Array.isArray(t)||typeof t==`string`&&Gi.test(t)&&!t.startsWith(`url(`))}function Vo(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Ho({ease:e,times:t,delay:n,...r}){let i={...r};return t&&(i.offset=t),e&&(i.ease=zo(e)?e.map(Ro):Ro(e)),n&&(i.elapsed=-n),i}function Uo(e,t,n){return Array.isArray(t.to)&&(e.duration||(e.duration=800)),Vo(t),Wo(e)||(e={...e,...jo(n,t.to)}),{...t,...Ho(e)}}function Wo({delay:e,repeat:t,repeatType:n,repeatDelay:r,from:i,...a}){return!!Object.keys(a).length}function Go(e,t){return e[t]||e.default||e}function Ko(e,t,n,r,i){let a=Go(r,e),o=a.from===null||a.from===void 0?t.get():a.from,s=Bo(e,n);o===`none`&&s&&typeof n==`string`&&(o=Io(e,n));let c=Bo(e,o);function l(s){let c={from:o,to:n,velocity:r.velocity?r.velocity:t.getVelocity(),onUpdate:e=>t.set(e)};return a.type===`inertia`||a.type===`decay`?no({...c,...a}):eo({...Uo(a,c,e),onUpdate:e=>{c.onUpdate(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{i&&i(),s&&s()}})}function u(e){return t.set(n),i&&i(),e&&e(),{stop:()=>{}}}return!c||!s||a.type===!1?u:l}function qo(){let{motionValues:e,stop:t,get:n}=wo();return{motionValues:e,stop:t,push:(e,t,r,i={},a)=>{let o=r[e],s=n(e,o,r);if(i&&i.immediate){s.set(t);return}let c=Ko(e,s,t,i,a);s.start(c)}}}function Jo(e,t={},{motionValues:n,push:r,stop:i}=qo()){let a=O(t),o=f(!1);l(n,e=>{o.value=Object.values(e).filter(e=>e.isAnimating()).length>0},{immediate:!0,deep:!0});let s=e=>{if(!a||!a[e])throw Error(`The variant ${e} does not exist.`);return a[e]},c=t=>{typeof t==`string`&&(t=s(t));let n=Object.entries(t).map(([n,i])=>{if(n!==`transition`)return new Promise(a=>r(n,i,e,t.transition||jo(n,t[n]),a))}).filter(Boolean);async function i(){await Promise.all(n),t.transition?.onComplete?.()}return Promise.all([i()])};return{isAnimating:o,apply:c,set:t=>{let n=Or(t)?t:s(t);Object.entries(n).forEach(([t,n])=>{t!==`transition`&&r(t,n,e,{immediate:!0})})},leave:async e=>{let t;if(a&&(a.leave&&(t=a.leave),!a.leave&&a.initial&&(t=a.initial)),!t){e();return}await c(t),e()},stop:i}}var Yo=typeof window<`u`,Xo=()=>Yo&&(window.onpointerdown===null||void 0),Zo=()=>Yo&&(window.ontouchstart===null||void 0),Qo=()=>Yo&&(window.onmousedown===null||void 0);function $o({target:e,state:t,variants:n,apply:r}){let i=O(n),a=f(!1),o=f(!1),s=f(!1),c=m(()=>{let e=[...Object.keys(t.value||{})];return i?(i.hovered&&(e=[...e,...Object.keys(i.hovered)]),i.tapped&&(e=[...e,...Object.keys(i.tapped)]),i.focused&&(e=[...e,...Object.keys(i.focused)]),e):e}),u=m(()=>{let e={};Object.assign(e,t.value),a.value&&i.hovered&&Object.assign(e,i.hovered),o.value&&i.tapped&&Object.assign(e,i.tapped),s.value&&i.focused&&Object.assign(e,i.focused);for(let t in e)c.value.includes(t)||delete e[t];return e});i.hovered&&(q(e,`mouseenter`,()=>a.value=!0),q(e,`mouseleave`,()=>{a.value=!1,o.value=!1})),i.tapped&&(Qo()&&(q(e,`mousedown`,()=>o.value=!0),q(e,`mouseup`,()=>o.value=!1)),Xo()&&(q(e,`pointerdown`,()=>o.value=!0),q(e,`pointerup`,()=>o.value=!1)),Zo()&&(q(e,`touchstart`,()=>o.value=!0),q(e,`touchend`,()=>o.value=!1))),i.focused&&(q(e,`focus`,()=>s.value=!0),q(e,`blur`,()=>s.value=!1)),l([a,o,s],()=>{r(u.value)})}function es({set:e,target:t,variants:n,variant:r}){let i=O(n);l(()=>t,()=>{i&&(i.initial&&(e(`initial`),r.value=`initial`),i.enter&&(r.value=`enter`))},{immediate:!0,flush:`pre`})}function ts({state:e,apply:t}){l(e,e=>{e&&t(e)},{immediate:!0})}function ns({target:e,variants:t,variant:n}){let r=O(t);r&&(r.visible||r.visibleOnce)&&Rr(e,([{isIntersecting:e}])=>{r.visible?n.value=e?`visible`:`initial`:r.visibleOnce&&(e&&n.value!==`visibleOnce`?n.value=`visibleOnce`:n.value||=`initial`)})}function rs(e,t={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){t.lifeCycleHooks&&es(e),t.syncVariants&&ts(e),t.visibilityHooks&&ns(e),t.eventListeners&&$o(e)}function is(e={}){let t=y({...e}),n=f({});return l(t,()=>{let e={};for(let[n,r]of Object.entries(t))e[n]=Fo(r,Po(n));n.value=e},{immediate:!0,deep:!0}),{state:t,style:n}}function as(e,t){l(()=>Fr(e),e=>{e&&t(e)},{immediate:!0})}var os={x:`translateX`,y:`translateY`,z:`translateZ`};function ss(e={},t=!0){let n=y({...e}),r=f(``);return l(n,e=>{let n=``,i=!1;if(t&&(e.x||e.y||e.z)){let t=[e.x||0,e.y||0,e.z||0].map(e=>Fo(e,Y)).join(`,`);n+=`translate3d(${t}) `,i=!0}for(let[r,i]of Object.entries(e)){if(t&&(r===`x`||r===`y`||r===`z`))continue;let e=Fo(i,Po(r));n+=`${os[r]||r}(${e}) `}t&&!i&&(n+=`translateZ(0px) `),r.value=n.trim()},{immediate:!0,deep:!0}),{state:n,transform:r}}var cs=[``,`X`,`Y`,`Z`],ls=[`perspective`,`translate`,`scale`,`rotate`,`skew`],us=[`transformPerspective`,`x`,`y`,`z`];ls.forEach(e=>{cs.forEach(t=>{let n=e+t;us.push(n)})});var ds=new Set(us);function fs(e){return ds.has(e)}var ps=new Set([`originX`,`originY`,`originZ`]);function ms(e){return ps.has(e)}function hs(e){let t={},n={};return Object.entries(e).forEach(([e,r])=>{fs(e)||ms(e)?t[e]=r:n[e]=r}),{transform:t,style:n}}function gs(e){let{transform:t,style:n}=hs(e),{transform:r}=ss(t),{style:i}=is(n);return r.value&&(i.value.transform=r.value),i.value}function _s(e,t){let n,r,{state:i,style:a}=is();return as(e,e=>{r=e;for(let t of Object.keys(No))e.style[t]===null||e.style[t]===``||fs(t)||ms(t)||(i[t]=e.style[t]);n&&Object.entries(n).forEach(([t,n])=>e.style[t]=n),t&&t(i)}),l(a,e=>{if(!r){n=e;return}for(let t in e)r.style[t]=e[t]},{immediate:!0}),{style:i}}function vs(e){let t=e.trim().split(/\) |\)/);if(t.length===1)return{};let n=e=>e.endsWith(`px`)||e.endsWith(`deg`)?Number.parseFloat(e):Number.isNaN(Number(e))?Number(e):e;return t.reduce((e,t)=>{if(!t)return e;let[r,i]=t.split(`(`),a=i.split(`,`).map(e=>n(e.endsWith(`)`)?e.replace(`)`,``):e.trim())),o=a.length===1?a[0]:a;return{...e,[r]:o}},{})}function ys(e,t){Object.entries(vs(t)).forEach(([t,n])=>{let r=[`x`,`y`,`z`];if(t===`translate3d`){if(n===0){r.forEach(t=>e[t]=0);return}n.forEach((t,n)=>e[r[n]]=t);return}if(n=Number.parseFloat(`${n}`),t===`translateX`){e.x=n;return}if(t===`translateY`){e.y=n;return}if(t===`translateZ`){e.z=n;return}e[t]=n})}function bs(e,t){let n,r,{state:i,transform:a}=ss();return as(e,e=>{r=e,e.style.transform&&ys(i,e.style.transform),n&&(e.style.transform=n),t&&t(i)}),l(a,e=>{if(!r){n=e;return}r.style.transform=e},{immediate:!0}),{transform:i}}function xs(e){return Object.entries(e)}function Ss(e,t){let n=y({}),r=e=>Object.entries(e).forEach(([e,t])=>n[e]=t),{style:i}=_s(e,r),{transform:a}=bs(e,r);return l(n,e=>{xs(e).forEach(([e,t])=>{let n=fs(e)?a:i;n[e]&&n[e]===t||(n[e]=t)})},{immediate:!0,deep:!0}),as(e,()=>t&&r(t)),{motionProperties:n,style:i,transform:a}}function Cs(e={}){let t=O(e),n=f();return{state:m(()=>{if(n.value)return t[n.value]}),variant:n}}function ws(e,t={},n){let{motionProperties:r}=Ss(e),{variant:i,state:a}=Cs(t),o={target:e,variant:i,variants:t,state:a,motionProperties:r,...Jo(r,t)};return rs(o,n),o}var Ts=[`delay`,`duration`],Es=[`initial`,`enter`,`leave`,`visible`,`visible-once`,`visibleOnce`,`hovered`,`tapped`,`focused`,...Ts];function Ds(e){return Ts.includes(e)}function Os(e,t){let n=e.props?e.props:e.data&&e.data.attrs?e.data.attrs:{};if(n){n.variants&&Or(n.variants)&&(t.value={...t.value,...n.variants});for(let e of Es)if(!(!n||!n[e])){if(Ds(e)&&typeof n[e]==`number`){for(let r of[`enter`,`visible`,`visibleOnce`]){let i=t.value[r];i!=null&&(i.transition??={},i.transition[e]=n[e])}continue}if(Or(n[e])){let r=n[e];e===`visible-once`&&(e=`visibleOnce`),t.value[e]=r}}}}function ks(e,t=!1){return{created:(n,r,i)=>{let a=r.value&&typeof r.value==`string`?r.value:i.key;a&&vo[a]&&vo[a].stop();let o=t?structuredClone(g(e)||{}):e||{},s=f(o);typeof r.value==`object`&&(s.value=r.value),Os(i,s);let c=ws(n,s,{eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1});n.motionInstance=c,a&&(vo[a]=c)},mounted:(e,t,n)=>{e.motionInstance&&ns(e.motionInstance)},getSSRProps(t,n){let{initial:r}=t.value||n&&n?.props||{};r=O(r);let i=Cr({},e?.initial||{},r||{});if(!(!i||Object.keys(i).length===0))return{style:gs(i)}}}}var As={__proto__:null,fade:{initial:{opacity:0},enter:{opacity:1}},fadeVisible:{initial:{opacity:0},visible:{opacity:1}},fadeVisibleOnce:{initial:{opacity:0},visibleOnce:{opacity:1}},pop:{initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},popVisible:{initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},popVisibleOnce:{initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},rollBottom:{initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},rollLeft:{initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},rollRight:{initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},rollTop:{initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},rollVisibleBottom:{initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},rollVisibleLeft:{initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},rollVisibleOnceBottom:{initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},rollVisibleOnceLeft:{initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},rollVisibleOnceRight:{initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},rollVisibleOnceTop:{initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},rollVisibleRight:{initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},rollVisibleTop:{initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},slideBottom:{initial:{y:100,opacity:0},enter:{y:0,opacity:1}},slideLeft:{initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},slideRight:{initial:{x:100,opacity:0},enter:{x:0,opacity:1}},slideTop:{initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},slideVisibleBottom:{initial:{y:100,opacity:0},visible:{y:0,opacity:1}},slideVisibleLeft:{initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},slideVisibleOnceBottom:{initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},slideVisibleOnceLeft:{initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},slideVisibleOnceRight:{initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},slideVisibleOnceTop:{initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},slideVisibleRight:{initial:{x:100,opacity:0},visible:{x:0,opacity:1}},slideVisibleTop:{initial:{y:-100,opacity:0},visible:{y:0,opacity:1}}},js=Symbol(``),Ms={preset:{type:String,required:!1},instance:{type:Object,required:!1},variants:{type:Object,required:!1},initial:{type:Object,required:!1},enter:{type:Object,required:!1},leave:{type:Object,required:!1},visible:{type:Object,required:!1},visibleOnce:{type:Object,required:!1},hovered:{type:Object,required:!1},tapped:{type:Object,required:!1},focused:{type:Object,required:!1},delay:{type:[Number,String],required:!1},duration:{type:[Number,String],required:!1}};function Ns(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ps(e){if(Array.isArray(e))return e.map(Ps);if(Ns(e)){let t={};for(let n in e)t[n]=Ps(e[n]);return t}return e}function Fs(t){let n=y({}),r=e(js,{}),i=m(()=>t.preset==null?{}:r!=null&&t.preset in r?structuredClone(g(r)[t.preset]):t.preset in As?structuredClone(As[t.preset]):{}),a=m(()=>({initial:t.initial,enter:t.enter,leave:t.leave,visible:t.visible,visibleOnce:t.visibleOnce,hovered:t.hovered,tapped:t.tapped,focused:t.focused}));function o(e,t){for(let n of[`delay`,`duration`]){if(t[n]==null)continue;let r=Number.parseInt(t[n]);for(let t of[`enter`,`visible`,`visibleOnce`]){let i=e[t];i!=null&&(i.transition??={},i.transition[n]=r)}}return e}let s=m(()=>o({...Cr({},a.value,i.value,t.variants||{})},t));function c(e,t,r){e.props??={},e.props.style??={},e.props.style={...e.props.style,...r};let i=o(Ps(s.value),e.props);return e.props.onVnodeMounted=({el:e})=>{n[t]=ws(e,i)},e.props.onVnodeUpdated=({el:e})=>{let r=gs(n[t].state);for(let[t,n]of Object.entries(r))e.style[t]=n},e}return{motionConfig:s,setNodeInstance:c}}o({name:`Motion`,props:{...Ms,is:{type:[String,Object],default:`div`}},setup(e){let t=c(),{motionConfig:r,setNodeInstance:i}=Fs(e);return()=>{let a=gs(r.value.initial||{}),o=n(e.is,void 0,t);return i(o,0,a),o}}}),o({name:`MotionGroup`,props:{...Ms,is:{type:[String,Object],required:!1}},setup(e){let t=c(),{motionConfig:r,setNodeInstance:i}=Fs(e);return()=>{let a=gs(r.value.initial||{}),o=t.default?.()||[];for(let e=0;ee.every(e=>D(e)))}var Ls=Is;function Rs(e){return m(()=>!D(e))}var zs=Rs;function Bs(...e){return m(()=>e.some(e=>D(e)))}var Vs=Bs;export{B as A,ue as B,_r as C,xn as D,pn as E,_n as F,yn as I,Gt as L,Jt as M,$t as N,Cn as O,vn as P,pt as R,gr as S,yr as T,K as _,zn as a,qn as b,In as c,rr as d,ir as f,lr as g,sr as h,ks as i,un as j,qt as k,Bn as l,or as m,zs as n,kn as o,G as p,Vs as r,Fn as s,Ls as t,tr as u,dr as v,vr as w,hr as x,fr as y,de as z}; \ No newline at end of file diff --git a/lecture-01/assets/packet-7NZHBO7P-4S63VQ2U-B1bmXRL8.js b/lecture-01/assets/packet-7NZHBO7P-4S63VQ2U-B1bmXRL8.js new file mode 100644 index 0000000000000000000000000000000000000000..afc8b3191110cba8ab4fdd3fdaba64f3a08ccb74 --- /dev/null +++ b/lecture-01/assets/packet-7NZHBO7P-4S63VQ2U-B1bmXRL8.js @@ -0,0 +1 @@ +import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as e}from"./chunk-LJTN6OYE-BTsXVLFU.js";export{e as createPacketServices}; \ No newline at end of file diff --git a/lecture-01/assets/pegDiagram-CCMLLSNW-CZgz04bV.js b/lecture-01/assets/pegDiagram-CCMLLSNW-CZgz04bV.js new file mode 100644 index 0000000000000000000000000000000000000000..5fae0969f9227af09be372ddb8f070289af2e61b --- /dev/null +++ b/lecture-01/assets/pegDiagram-CCMLLSNW-CZgz04bV.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as t}from"./chunk-FO5PYUIK-CPzj2963.js";import"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-BPTLHSDI-QRS_xuYz.js";import{n,r,t as i}from"./chunk-QR6SRGRY-cBZQLGGn.js";import{t as a}from"./chunk-6ZKBGPIT-B4RTUexp.js";import"./chunk-A7G5T7E5-C2HISlqa.js";import{t as o}from"./chunk-BQKPLVCE-CH-bQZj9.js";import"./chunk-NYCIP5HP-BZs_nZUU.js";import"./chunk-6QIBY7DQ-xR0SR3RB.js";import"./chunk-SLCUJWJ3-Bzf1BoPP.js";import"./chunk-43ACQNTO-CVHKukau.js";import"./chunk-FXRKSSP6-BDxrggHz.js";import"./chunk-RRYK4PFG-DZMcopsb.js";import{n as s}from"./chunk-IT6C5QXO-BI6Sf-cR.js";import"./chunk-GMJQP6DO-gEw8rKqu.js";import"./chunk-ODPFZSHR-BUzFQ4Zq.js";import"./chunk-6OZ7KPF7-CpRlDBGl.js";import"./chunk-LJTN6OYE-BTsXVLFU.js";import"./chunk-Z6Q54H3S-B8XyqzVF.js";import"./chunk-4KMQCWFH-ClzK3uec.js";import"./chunk-S7Q6ZHN2-CSIi0_Nw.js";import"./chunk-IIWGMRJM-k15frrBU.js";var c=s().RailroadPeg.parser.LangiumParser,l=e(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformOrderedChoice`),u=e(e=>{let t=e.elements.map(d);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=e(e=>{let t=p(e.suffix);return e.operator?{type:`special`,text:e.operator===`&`?`&${f(t)}`:`!${f(t)}`}:t},`transformPrefix`),f=e(e=>{switch(e.type){case`terminal`:return`"${e.value}"`;case`nonterminal`:return e.name;case`special`:return e.text;default:return`(...)`}},`nodeToLabel`),p=e(e=>{let t=m(e.primary);if(!e.operator)return t;switch(e.operator){case`?`:return{type:`optional`,element:t};case`*`:return{type:`repetition`,element:t,min:0,max:1/0};case`+`:return{type:`repetition`,element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},`transformSuffix`),m=e(e=>{switch(e.$type){case`PegLiteral`:return{type:`terminal`,value:e.value};case`PegIdentifier`:return{type:`nonterminal`,name:e.name};case`PegGroup`:return l(e.element);case`PegAny`:return{type:`special`,text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},`transformPrimary`),h=e(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),g=e(e=>{a(e,i),e.title&&i.setTitle(e.title),e.rules.map(e=>i.addRule(h(e)))},`populateDb`),_={parser:{parse:e(e=>{i.clear(),t.debug(`[PEG Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new o(n);let r=n.value;t.debug(`[PEG Parser] Parsed rules:`,r.rules.length),g(r),t.debug(`[PEG Parser] Parse complete`)},`parse`),parser:{yy:i}},db:i,renderer:r,styles:n};export{_ as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/pie-RZYD4A2V-Z4KIYNQL-CIuLkzY1.js b/lecture-01/assets/pie-RZYD4A2V-Z4KIYNQL-CIuLkzY1.js new file mode 100644 index 0000000000000000000000000000000000000000..ea6fe6d5420996d1dcb4cf2f39c8065534599e31 --- /dev/null +++ b/lecture-01/assets/pie-RZYD4A2V-Z4KIYNQL-CIuLkzY1.js @@ -0,0 +1 @@ +import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as e}from"./chunk-Z6Q54H3S-B8XyqzVF.js";export{e as createPieServices}; \ No newline at end of file diff --git a/lecture-01/assets/pieDiagram-KV7KQJTS-Ds0asnUL.js b/lecture-01/assets/pieDiagram-KV7KQJTS-Ds0asnUL.js new file mode 100644 index 0000000000000000000000000000000000000000..6159de0c30c010295b0476fe1f400349c25caa25 --- /dev/null +++ b/lecture-01/assets/pieDiagram-KV7KQJTS-Ds0asnUL.js @@ -0,0 +1,39 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{M as t,N as n,T as r,n as i}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as a,E as o,J as s,Q as c,Y as l,b as u,l as d,m as f,o as p,x as m}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as h}from"./chunk-BPTLHSDI-QRS_xuYz.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{h as g,i as _}from"./chunk-OX6ZKUVE-roiHi12N.js";import{t as v}from"./chunk-6ZKBGPIT-B4RTUexp.js";import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as y}from"./chunk-BQKPLVCE-CH-bQZj9.js";import"./chunk-NYCIP5HP-BZs_nZUU.js";import"./chunk-6QIBY7DQ-xR0SR3RB.js";import"./chunk-SLCUJWJ3-Bzf1BoPP.js";import"./chunk-43ACQNTO-CVHKukau.js";import"./chunk-FXRKSSP6-BDxrggHz.js";import"./chunk-RRYK4PFG-DZMcopsb.js";import"./chunk-IT6C5QXO-BI6Sf-cR.js";import"./chunk-GMJQP6DO-gEw8rKqu.js";import"./chunk-ODPFZSHR-BUzFQ4Zq.js";import"./chunk-6OZ7KPF7-CpRlDBGl.js";import"./chunk-LJTN6OYE-BTsXVLFU.js";import"./chunk-Z6Q54H3S-B8XyqzVF.js";import"./chunk-4KMQCWFH-ClzK3uec.js";import"./chunk-S7Q6ZHN2-CSIi0_Nw.js";import"./chunk-IIWGMRJM-k15frrBU.js";var b=f.pie,x={sections:new Map,showData:!1,config:b},S=x.sections,C=x.showData,w=structuredClone(b),T={getConfig:e(()=>structuredClone(w),`getConfig`),clear:e(()=>{S=new Map,C=x.showData,p()},`clear`),setDiagramTitle:c,getDiagramTitle:o,setAccTitle:l,getAccTitle:m,setAccDescription:s,getAccDescription:u,addSection:e(({label:e,value:t})=>{if(t<0)throw Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);S.has(e)||(S.set(e,t),r.debug(`added new section: ${e}, with value: ${t}`))},`addSection`),getSections:e(()=>S,`getSections`),setShowData:e(e=>{C=e},`setShowData`),getShowData:e(()=>C,`getShowData`)},E=e((e,t)=>{v(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},`populateDb`),D={parse:e(async e=>{let t=await y(`pie`,e);r.debug(t),E(t,T)},`parse`)},O=e(e=>` + .pieCircle{ + stroke: ${e.pieStrokeColor}; + stroke-width : ${e.pieStrokeWidth}; + opacity : ${e.pieOpacity}; + } + .pieCircle.highlighted{ + scale: 1.05; + opacity: 1; + } + .pieCircle.highlightedOnHover:hover{ + transition-duration: 250ms; + scale: 1.05; + opacity: 1; + } + .pieOuterCircle{ + stroke: ${e.pieOuterStrokeColor}; + stroke-width: ${e.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${e.pieTitleTextSize}; + fill: ${e.pieTitleTextColor}; + font-family: ${e.fontFamily}; + } + .slice { + font-family: ${e.fontFamily}; + fill: ${e.pieSectionTextColor}; + font-size:${e.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${e.pieLegendTextColor}; + font-family: ${e.fontFamily}; + font-size: ${e.pieLegendTextSize}; + } +`,`getStyles`),k=e(e=>{let t=[...e.values()].reduce((e,t)=>e+t,0),r=[...e.entries()].map(([e,t])=>({label:e,value:t})).filter(e=>e.value/t*100>=1);return n().value(e=>e.value).sort(null)(r)},`createPieArcs`),A={parser:D,db:T,renderer:{draw:e((e,n,o,s)=>{r.debug(`rendering pie chart +`+e);let c=s.db,l=a(),u=_(c.getConfig(),l.pie),f=h(n),p=f.append(`g`);p.attr(`transform`,`translate(225,225)`);let{themeVariables:m}=l,[v]=g(m.pieOuterStrokeWidth);v??=2;let y=u.legendPosition,b=u.textPosition,x=u.donutHole>0&&u.donutHole<=.9?u.donutHole:0,S=i().innerRadius(x*185).outerRadius(185),C=i().innerRadius(185*b).outerRadius(185*b),w=p.append(`g`);w.append(`circle`).attr(`cx`,0).attr(`cy`,0).attr(`r`,185+v/2).attr(`class`,`pieOuterCircle`);let T=c.getSections(),E=k(T),D=[m.pie1,m.pie2,m.pie3,m.pie4,m.pie5,m.pie6,m.pie7,m.pie8,m.pie9,m.pie10,m.pie11,m.pie12],O=0;T.forEach(e=>{O+=e});let A=E.filter(e=>(e.data.value/O*100).toFixed(0)!==`0`),j=t(D).domain([...T.keys()]);w.selectAll(`mySlices`).data(A).enter().append(`path`).attr(`d`,S).attr(`fill`,e=>j(e.data.label)).attr(`class`,e=>{let t=`pieCircle`;return u.highlightSlice===`hover`?t+=` highlightedOnHover`:u.highlightSlice===e.data.label&&(t+=` highlighted`),t}),w.selectAll(`mySlices`).data(A).enter().append(`text`).text(e=>(e.data.value/O*100).toFixed(0)+`%`).attr(`transform`,e=>`translate(`+C.centroid(e)+`)`).style(`text-anchor`,`middle`).attr(`class`,`slice`);let M=p.append(`text`).text(c.getDiagramTitle()).attr(`x`,0).attr(`y`,-200).attr(`class`,`pieTitleText`),N=[...T.entries()].map(([e,t])=>({label:e,value:t})),P=p.selectAll(`.legend`).data(N).enter().append(`g`).attr(`class`,`legend`);P.append(`rect`).attr(`width`,18).attr(`height`,18).style(`fill`,e=>j(e.label)).style(`stroke`,e=>j(e.label)),P.append(`text`).attr(`x`,22).attr(`y`,14).text(e=>c.getShowData()?`${e.label} [${e.value}]`:e.label);let F=Math.max(...P.selectAll(`text`).nodes().map(e=>e?.getBoundingClientRect().width??0)),I=450,L=490,R=N.length*22;switch(y){case`center`:P.attr(`transform`,(e,t)=>{let n=22*N.length/2,r=-F/2-22,i=t*22-n;return`translate(`+r+`,`+i+`)`});break;case`top`:I+=R,P.attr(`transform`,(e,t)=>`translate(${-F/2-22}, ${t*22-185})`),w.attr(`transform`,()=>`translate(0, ${R+22})`);break;case`bottom`:I+=R,P.attr(`transform`,(e,t)=>{let n=-F/2-22,r=t*22- -207;return`translate(`+n+`,`+r+`)`});break;case`left`:L+=22+F,P.attr(`transform`,(e,t)=>{let n=22*N.length/2;return`translate(-207,`+(t*22-n)+`)`}),w.attr(`transform`,()=>`translate(${F+18+4}, 0)`);break;default:L+=22+F,P.attr(`transform`,(e,t)=>{let n=22*N.length/2;return`translate(216,`+(t*22-n)+`)`})}let z=M.node()?.getBoundingClientRect().width??0,B=225-z/2,V=225+z/2,H=Math.min(0,B),U=Math.max(L,V)-H;f.attr(`viewBox`,`${H} 0 ${U} ${I}`),d(f,I,U,u.useMaxWidth)},`draw`)},styles:O};export{A as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/preload-helper-DpA04vUI.js b/lecture-01/assets/preload-helper-DpA04vUI.js new file mode 100644 index 0000000000000000000000000000000000000000..a8804dd9626117dd13e2ee21461183c2220106ff --- /dev/null +++ b/lecture-01/assets/preload-helper-DpA04vUI.js @@ -0,0 +1 @@ +var e=function(e){return`/lecture-01/`+e},t={},n=function(n,r,i){let a=Promise.resolve();if(r&&r.length>0){let n=document.getElementsByTagName(`link`),o=document.querySelector(`meta[property=csp-nonce]`),s=o?.nonce||o?.getAttribute(`nonce`);function c(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function l(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}a=c(r.map(r=>{if(r=e(r,i),r=l(r),r in t)return;t[r]=!0;let a=r.endsWith(`.css`);for(let e=n.length-1;e>=0;e--){let t=n[e];if(t.href===r&&(!a||t.rel===`stylesheet`))return}let o=document.createElement(`link`);if(o.rel=a?`stylesheet`:`modulepreload`,a||(o.as=`script`),o.crossOrigin=``,o.href=r,s&&o.setAttribute(`nonce`,s),document.head.appendChild(o),a)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}))}function o(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return a.then(e=>{for(let t of e||[])t.status===`rejected`&&o(t.reason);return n().catch(o)})};export{n as t}; \ No newline at end of file diff --git a/lecture-01/assets/quadrantDiagram-MXEHXERY-BqDgIJYL.js b/lecture-01/assets/quadrantDiagram-MXEHXERY-BqDgIJYL.js new file mode 100644 index 0000000000000000000000000000000000000000..d58c36f293aee19100c883c9ac2ffcc7840886c4 --- /dev/null +++ b/lecture-01/assets/quadrantDiagram-MXEHXERY-BqDgIJYL.js @@ -0,0 +1,7 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as t,S as n,T as r}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as i,E as a,G as o,J as s,Q as c,Y as l,b as u,k as d,l as f,m as p,o as m,x as h}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[1,7],s=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],d=[1,37],f=[1,36],p=[1,38],m=[1,35],h=[1,43],g=[1,41],_=[1,45],v=[1,14],y=[1,23],b=[1,18],x=[1,19],S=[1,20],C=[1,21],w=[1,22],T=[1,24],E=[1,25],D=[1,26],O=[1,27],k=[1,28],A=[1,29],j=[1,32],M=[1,33],N=[1,34],P=[1,39],F=[1,40],I=[1,42],L=[1,44],R=[1,63],z=[1,62],B=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],ee=[1,66],te=[1,67],ne=[1,68],re=[1,69],ie=[1,70],ae=[1,71],oe=[1,72],se=[1,73],ce=[1,74],le=[1,75],ue=[1,76],de=[1,77],V=[4,5,6,7,8,9,10,11,12,13,14,15,18],H=[1,91],U=[1,92],W=[1,93],G=[1,100],K=[1,94],q=[1,97],J=[1,95],Y=[1,96],X=[1,98],Z=[1,99],fe=[1,103],pe=[10,55,56,57],Q=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],me={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:`error`,4:`ALPHA`,5:`NUM`,6:`NODE_STRING`,7:`DOWN`,8:`MINUS`,9:`DEFAULT`,10:`COMMA`,11:`COLON`,12:`AMP`,13:`BRKT`,14:`MULT`,15:`UNICODE_TEXT`,17:`UNIT`,18:`SPACE`,19:`STYLE`,20:`PCT`,25:`CLASSDEF`,28:`QUADRANT`,35:`title`,36:`title_value`,37:`acc_title`,38:`acc_title_value`,39:`acc_descr`,40:`acc_descr_value`,41:`acc_descr_multiline_value`,42:`section`,44:`point_start`,45:`point_x`,46:`point_y`,47:`class_name`,48:`X-AXIS`,49:`AXIS-TEXT-DELIMITER`,50:`Y-AXIS`,51:`QUADRANT_1`,52:`QUADRANT_2`,53:`QUADRANT_3`,54:`QUADRANT_4`,55:`NEWLINE`,56:`SEMI`,57:`EOF`,60:`STR`,61:`MD_STR`,63:`PUNCTUATION`,64:`PLUS`,65:`EQUALS`,66:`DOT`,67:`UNDERSCORE`},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 23:this.$=a[s];break;case 24:this.$=a[s-1]+``+a[s];break;case 26:this.$=a[s-1]+a[s];break;case 27:this.$=[a[s].trim()];break;case 28:a[s-2].push(a[s].trim()),this.$=a[s-2];break;case 29:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 37:this.$=[];break;case 42:this.$=a[s].trim(),r.setDiagramTitle(this.$);break;case 43:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 44:case 45:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 46:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 47:r.addPoint(a[s-3],``,a[s-1],a[s],[]);break;case 48:r.addPoint(a[s-4],a[s-3],a[s-1],a[s],[]);break;case 49:r.addPoint(a[s-4],``,a[s-2],a[s-1],a[s]);break;case 50:r.addPoint(a[s-5],a[s-4],a[s-2],a[s-1],a[s]);break;case 51:r.setXAxisLeftText(a[s-2]),r.setXAxisRightText(a[s]);break;case 52:a[s-1].text+=` ⟶ `,r.setXAxisLeftText(a[s-1]);break;case 53:r.setXAxisLeftText(a[s]);break;case 54:r.setYAxisBottomText(a[s-2]),r.setYAxisTopText(a[s]);break;case 55:a[s-1].text+=` ⟶ `,r.setYAxisBottomText(a[s-1]);break;case 56:r.setYAxisBottomText(a[s]);break;case 57:r.setQuadrant1Text(a[s]);break;case 58:r.setQuadrant2Text(a[s]);break;case 59:r.setQuadrant3Text(a[s]);break;case 60:r.setQuadrant4Text(a[s]);break;case 64:this.$={text:a[s],type:`text`};break;case 65:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 66:this.$={text:a[s],type:`text`};break;case 67:this.$={text:a[s],type:`markdown`};break;case 68:this.$=a[s];break;case 69:this.$=a[s-1]+``+a[s]}},`anonymous`),table:[{18:n,26:1,27:2,28:r,55:i,56:a,57:o},{1:[3]},{18:n,26:8,27:2,28:r,55:i,56:a,57:o},{18:n,26:9,27:2,28:r,55:i,56:a,57:o},t(s,[2,33],{29:10}),t(c,[2,61]),t(c,[2,62]),t(c,[2,63]),{1:[2,30]},{1:[2,31]},t(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(s,[2,34]),{27:46,55:i,56:a,57:o},t(l,[2,37]),t(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(l,[2,39]),t(l,[2,40]),t(l,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(l,[2,45]),t(l,[2,46]),{18:[1,51]},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:52,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:53,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:54,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:55,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:56,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:57,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,44:[1,58],47:[1,59],58:61,59:60,63:N,64:P,65:F,66:I,67:L},t(B,[2,64]),t(B,[2,66]),t(B,[2,67]),t(B,[2,70]),t(B,[2,71]),t(B,[2,72]),t(B,[2,73]),t(B,[2,74]),t(B,[2,75]),t(B,[2,76]),t(B,[2,77]),t(B,[2,78]),t(B,[2,79]),t(B,[2,80]),t(B,[2,81]),t(s,[2,35]),t(l,[2,38]),t(l,[2,42]),t(l,[2,43]),t(l,[2,44]),{3:65,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,21:64},t(l,[2,53],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,78],63:N,64:P,65:F,66:I,67:L}),t(l,[2,56],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,79],63:N,64:P,65:F,66:I,67:L}),t(l,[2,57],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,58],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,59],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,60],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),{45:[1,80]},{44:[1,81]},t(B,[2,65]),t(B,[2,82]),t(B,[2,83]),t(B,[2,84]),{3:83,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,18:[1,82]},t(V,[2,23]),t(V,[2,1]),t(V,[2,2]),t(V,[2,3]),t(V,[2,4]),t(V,[2,5]),t(V,[2,6]),t(V,[2,7]),t(V,[2,8]),t(V,[2,9]),t(V,[2,10]),t(V,[2,11]),t(V,[2,12]),t(l,[2,52],{58:31,43:84,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(l,[2,55],{58:31,43:85,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),{46:[1,86]},{45:[1,87]},{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:89,23:88},t(V,[2,24]),t(l,[2,51],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,54],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,47],{22:89,16:90,23:101,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{46:[1,102]},t(l,[2,29],{10:fe}),t(pe,[2,27],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),t(Q,[2,25]),t(Q,[2,13]),t(Q,[2,14]),t(Q,[2,15]),t(Q,[2,16]),t(Q,[2,17]),t(Q,[2,18]),t(Q,[2,19]),t(Q,[2,20]),t(Q,[2,21]),t(Q,[2,22]),t(l,[2,49],{10:fe}),t(l,[2,48],{22:89,16:90,23:105,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:106},t(Q,[2,26]),t(l,[2,50],{10:fe}),t(pe,[2,28],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z})],defaultActions:{8:[2,30],9:[2,31]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};me.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin(`title`),35;case 5:return this.popState(),`title_value`;case 6:return this.begin(`acc_title`),37;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),39;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin(`md_string`);break;case 22:return`MD_STR`;case 23:this.popState();break;case 24:this.begin(`string`);break;case 25:this.popState();break;case 26:return`STR`;case 27:this.begin(`class_name`);break;case 28:return this.popState(),47;case 29:return this.begin(`point_start`),44;case 30:return this.begin(`point_x`),45;case 31:this.popState();break;case 32:this.popState(),this.begin(`point_y`);break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}})();function $(){this.yy={}}return e($,`Parser`),$.prototype=me,me.Parser=$,new $})();g.parser=g;var _=g,v=d(),y=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{e(this,`QuadrantBuilder`)}getDefaultData(){return{titleText:``,quadrant1Text:``,quadrant2Text:``,quadrant3Text:``,quadrant4Text:``,xAxisLeftText:``,xAxisRightText:``,yAxisBottomText:``,yAxisTopText:``,points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:p.quadrantChart?.chartWidth||500,chartWidth:p.quadrantChart?.chartHeight||500,titlePadding:p.quadrantChart?.titlePadding||10,titleFontSize:p.quadrantChart?.titleFontSize||20,quadrantPadding:p.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:p.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:p.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:p.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:p.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:p.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:p.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:p.quadrantChart?.pointTextPadding||5,pointLabelFontSize:p.quadrantChart?.pointLabelFontSize||12,pointRadius:p.quadrantChart?.pointRadius||5,xAxisPosition:p.quadrantChart?.xAxisPosition||`top`,yAxisPosition:p.quadrantChart?.yAxisPosition||`left`,quadrantInternalBorderStrokeWidth:p.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:p.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:v.quadrant1Fill,quadrant2Fill:v.quadrant2Fill,quadrant3Fill:v.quadrant3Fill,quadrant4Fill:v.quadrant4Fill,quadrant1TextFill:v.quadrant1TextFill,quadrant2TextFill:v.quadrant2TextFill,quadrant3TextFill:v.quadrant3TextFill,quadrant4TextFill:v.quadrant4TextFill,quadrantPointFill:v.quadrantPointFill,quadrantPointTextFill:v.quadrantPointTextFill,quadrantXAxisTextFill:v.quadrantXAxisTextFill,quadrantYAxisTextFill:v.quadrantYAxisTextFill,quadrantTitleFill:v.quadrantTitleFill,quadrantInternalBorderStrokeFill:v.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:v.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,r.info(`clear called`)}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,t){this.classes.set(e,t)}setConfig(e){r.trace(`setConfig called with: `,e),this.config={...this.config,...e}}setThemeConfig(e){r.trace(`setThemeConfig called with: `,e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,t,n,r){let i=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,a={top:e===`top`&&t?i:0,bottom:e===`bottom`&&t?i:0},o=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,s={left:this.config.yAxisPosition===`left`&&n?o:0,right:this.config.yAxisPosition===`right`&&n?o:0},c=this.config.titleFontSize+this.config.titlePadding*2,l={top:r?c:0},u=this.config.quadrantPadding+s.left,d=this.config.quadrantPadding+a.top+l.top,f=this.config.chartWidth-this.config.quadrantPadding*2-s.left-s.right,p=this.config.chartHeight-this.config.quadrantPadding*2-a.top-a.bottom-l.top;return{xAxisSpace:a,yAxisSpace:s,titleSpace:l,quadrantSpace:{quadrantLeft:u,quadrantTop:d,quadrantWidth:f,quadrantHalfWidth:f/2,quadrantHeight:p,quadrantHalfHeight:p/2}}}getAxisLabels(e,t,n,r){let{quadrantSpace:i,titleSpace:a}=r,{quadrantHalfHeight:o,quadrantHeight:s,quadrantLeft:c,quadrantHalfWidth:l,quadrantTop:u,quadrantWidth:d}=i,f=!!this.data.xAxisRightText,p=!!this.data.yAxisTopText,m=[];return this.data.xAxisLeftText&&t&&m.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+(f?l/2:0),y:e===`top`?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+u+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:f?`center`:`left`,horizontalPos:`top`,rotation:0}),this.data.xAxisRightText&&t&&m.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+l+(f?l/2:0),y:e===`top`?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+u+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:f?`center`:`left`,horizontalPos:`top`,rotation:0}),this.data.yAxisBottomText&&n&&m.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition===`left`?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+d+this.config.quadrantPadding,y:u+s-(p?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?`center`:`left`,horizontalPos:`top`,rotation:-90}),this.data.yAxisTopText&&n&&m.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition===`left`?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+d+this.config.quadrantPadding,y:u+o-(p?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?`center`:`left`,horizontalPos:`top`,rotation:-90}),m}getQuadrants(e){let{quadrantSpace:t}=e,{quadrantHalfHeight:n,quadrantLeft:r,quadrantHalfWidth:i,quadrantTop:a}=t,o=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r+i,y:a,width:i,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r,y:a,width:i,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r+i,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant4Fill}];for(let e of o)e.text.x=e.x+e.width/2,this.data.points.length===0?(e.text.y=e.y+e.height/2,e.text.horizontalPos=`middle`):(e.text.y=e.y+this.config.quadrantTextTopPadding,e.text.horizontalPos=`top`);return o}getQuadrantPoints(e){let{quadrantSpace:t}=e,{quadrantHeight:r,quadrantLeft:i,quadrantTop:a,quadrantWidth:o}=t,s=n().domain([0,1]).range([i,o+i]),c=n().domain([0,1]).range([r+a,a]);return this.data.points.map(e=>{let t=this.classes.get(e.className);return t&&(e={...t,...e}),{x:s(e.x),y:c(e.y),fill:e.color??this.themeConfig.quadrantPointFill,radius:e.radius??this.config.pointRadius,text:{text:e.text,fill:this.themeConfig.quadrantPointTextFill,x:s(e.x),y:c(e.y)+this.config.pointTextPadding,verticalPos:`center`,horizontalPos:`top`,fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:e.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:e.strokeWidth??`0px`}})}getBorders(e){let t=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=e,{quadrantHalfHeight:r,quadrantHeight:i,quadrantLeft:a,quadrantHalfWidth:o,quadrantTop:s,quadrantWidth:c}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:s,x2:a+c+t,y2:s},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+c,y1:s+t,x2:a+c,y2:s+i-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:s+i,x2:a+c+t,y2:s+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:s+t,x2:a,y2:s+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+o,y1:s+t,x2:a+o,y2:s+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+t,y1:s+r,x2:a+c-t,y2:s+r}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:`top`,verticalPos:`center`,rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),t=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,r=this.data.points.length>0?`bottom`:this.config.xAxisPosition,i=this.calculateSpace(r,e,t,n);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(r,e,t,i),borderLines:this.getBorders(i),title:this.getTitle(n)}}},b=class extends Error{static{e(this,`InvalidStyleError`)}constructor(e,t,n){super(`value for ${e} ${t} is invalid, please use a valid ${n}`),this.name=`InvalidStyleError`}};function x(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}e(x,`validateHexCode`);function S(e){return!/^\d+$/.test(e)}e(S,`validateNumber`);function C(e){return!/^\d+px$/.test(e)}e(C,`validateSizeInPixels`);function w(e){return o(e.trim(),i())}e(w,`textSanitizer`);var T=new y;function E(e){T.setData({quadrant1Text:w(e.text)})}e(E,`setQuadrant1Text`);function D(e){T.setData({quadrant2Text:w(e.text)})}e(D,`setQuadrant2Text`);function O(e){T.setData({quadrant3Text:w(e.text)})}e(O,`setQuadrant3Text`);function k(e){T.setData({quadrant4Text:w(e.text)})}e(k,`setQuadrant4Text`);function A(e){T.setData({xAxisLeftText:w(e.text)})}e(A,`setXAxisLeftText`);function j(e){T.setData({xAxisRightText:w(e.text)})}e(j,`setXAxisRightText`);function M(e){T.setData({yAxisTopText:w(e.text)})}e(M,`setYAxisTopText`);function N(e){T.setData({yAxisBottomText:w(e.text)})}e(N,`setYAxisBottomText`);function P(e){let t={};for(let n of e){let[e,r]=n.trim().split(/\s*:\s*/);if(e===`radius`){if(S(r))throw new b(e,r,`number`);t.radius=parseInt(r)}else if(e===`color`){if(x(r))throw new b(e,r,`hex code`);t.color=r}else if(e===`stroke-color`){if(x(r))throw new b(e,r,`hex code`);t.strokeColor=r}else if(e===`stroke-width`){if(C(r))throw new b(e,r,`number of pixels (eg. 10px)`);t.strokeWidth=r}else throw Error(`style named ${e} is not supported.`)}return t}e(P,`parseStyles`);function F(e,t,n,r,i){let a=P(i);T.addPoints([{x:n,y:r,text:w(e.text),className:t,...a}])}e(F,`addPoint`);function I(e,t){T.addClass(e,P(t))}e(I,`addClass`);function L(e){T.setConfig({chartWidth:e})}e(L,`setWidth`);function R(e){T.setConfig({chartHeight:e})}e(R,`setHeight`);function z(){let{themeVariables:e,quadrantChart:t}=i();return t&&T.setConfig(t),T.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),T.setData({titleText:a()}),T.build()}e(z,`getQuadrantData`);var B={parser:_,db:{setWidth:L,setHeight:R,setQuadrant1Text:E,setQuadrant2Text:D,setQuadrant3Text:O,setQuadrant4Text:k,setXAxisLeftText:A,setXAxisRightText:j,setYAxisTopText:M,setYAxisBottomText:N,parseStyles:P,addPoint:F,addClass:I,getQuadrantData:z,clear:e(function(){T.clear(),m()},`clear`),setAccTitle:l,getAccTitle:h,setDiagramTitle:c,getDiagramTitle:a,getAccDescription:u,setAccDescription:s},renderer:{draw:e((n,a,o,s)=>{function c(e){return e===`top`?`hanging`:`middle`}e(c,`getDominantBaseLine`);function l(e){return e===`left`?`start`:`middle`}e(l,`getTextAnchor`);function u(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}e(u,`getTransformation`);let d=i();r.debug(`Rendering quadrant chart +`+n);let p=d.securityLevel,m;p===`sandbox`&&(m=t(`#i`+a));let h=t(p===`sandbox`?m.nodes()[0].contentDocument.body:`body`).select(`[id="${a}"]`),g=h.append(`g`).attr(`class`,`main`),_=d.quadrantChart?.chartWidth??500,v=d.quadrantChart?.chartHeight??500;f(h,v,_,d.quadrantChart?.useMaxWidth??!0),h.attr(`viewBox`,`0 0 `+_+` `+v),s.db.setHeight(v),s.db.setWidth(_);let y=s.db.getQuadrantData(),b=g.append(`g`).attr(`class`,`quadrants`),x=g.append(`g`).attr(`class`,`border`),S=g.append(`g`).attr(`class`,`data-points`),C=g.append(`g`).attr(`class`,`labels`),w=g.append(`g`).attr(`class`,`title`);y.title&&w.append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,y.title.fill).attr(`font-size`,y.title.fontSize).attr(`dominant-baseline`,c(y.title.horizontalPos)).attr(`text-anchor`,l(y.title.verticalPos)).attr(`transform`,u(y.title)).text(y.title.text),y.borderLines&&x.selectAll(`line`).data(y.borderLines).enter().append(`line`).attr(`x1`,e=>e.x1).attr(`y1`,e=>e.y1).attr(`x2`,e=>e.x2).attr(`y2`,e=>e.y2).style(`stroke`,e=>e.strokeFill).style(`stroke-width`,e=>e.strokeWidth);let T=b.selectAll(`g.quadrant`).data(y.quadrants).enter().append(`g`).attr(`class`,`quadrant`);T.append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill),T.append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.text.fill).attr(`font-size`,e=>e.text.fontSize).attr(`dominant-baseline`,e=>c(e.text.horizontalPos)).attr(`text-anchor`,e=>l(e.text.verticalPos)).attr(`transform`,e=>u(e.text)).text(e=>e.text.text),C.selectAll(`g.label`).data(y.axisLabels).enter().append(`g`).attr(`class`,`label`).append(`text`).attr(`x`,0).attr(`y`,0).text(e=>e.text).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>c(e.horizontalPos)).attr(`text-anchor`,e=>l(e.verticalPos)).attr(`transform`,e=>u(e));let E=S.selectAll(`g.data-point`).data(y.points).enter().append(`g`).attr(`class`,`data-point`);E.append(`circle`).attr(`cx`,e=>e.x).attr(`cy`,e=>e.y).attr(`r`,e=>e.radius).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeColor).attr(`stroke-width`,e=>e.strokeWidth),E.append(`text`).attr(`x`,0).attr(`y`,0).text(e=>e.text.text).attr(`fill`,e=>e.text.fill).attr(`font-size`,e=>e.text.fontSize).attr(`dominant-baseline`,e=>c(e.text.horizontalPos)).attr(`text-anchor`,e=>l(e.text.verticalPos)).attr(`transform`,e=>u(e.text))},`draw`)},styles:e(()=>``,`styles`)};export{B as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/radar-I7S5WNFK-UWZYMAIF-C3y3vUe8.js b/lecture-01/assets/radar-I7S5WNFK-UWZYMAIF-C3y3vUe8.js new file mode 100644 index 0000000000000000000000000000000000000000..f6cf5d57f0491b6c0e1964b8c135046f45110dd0 --- /dev/null +++ b/lecture-01/assets/radar-I7S5WNFK-UWZYMAIF-C3y3vUe8.js @@ -0,0 +1 @@ +import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as e}from"./chunk-SLCUJWJ3-Bzf1BoPP.js";export{e as createRadarServices}; \ No newline at end of file diff --git a/lecture-01/assets/railroad-3IZDKUUU-NPR2B6A7-dVr-qo4D.js b/lecture-01/assets/railroad-3IZDKUUU-NPR2B6A7-dVr-qo4D.js new file mode 100644 index 0000000000000000000000000000000000000000..69b7f30e813179646d8078be5f0749efa51a8428 --- /dev/null +++ b/lecture-01/assets/railroad-3IZDKUUU-NPR2B6A7-dVr-qo4D.js @@ -0,0 +1 @@ +import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as e}from"./chunk-43ACQNTO-CVHKukau.js";export{e as createRailroadServices}; \ No newline at end of file diff --git a/lecture-01/assets/railroad-abnf-AHOZXSZD-ZQ2ZTVQN-b86BQvgz.js b/lecture-01/assets/railroad-abnf-AHOZXSZD-ZQ2ZTVQN-b86BQvgz.js new file mode 100644 index 0000000000000000000000000000000000000000..92f1eb2304e48f1293cf8b7099afc5f5dec1d36d --- /dev/null +++ b/lecture-01/assets/railroad-abnf-AHOZXSZD-ZQ2ZTVQN-b86BQvgz.js @@ -0,0 +1 @@ +import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as e}from"./chunk-RRYK4PFG-DZMcopsb.js";export{e as createRailroadAbnfServices}; \ No newline at end of file diff --git a/lecture-01/assets/railroad-ebnf-EBAXGLYW-KNIRPJJ3-C3J20xdH.js b/lecture-01/assets/railroad-ebnf-EBAXGLYW-KNIRPJJ3-C3J20xdH.js new file mode 100644 index 0000000000000000000000000000000000000000..1ab4b2ce162fe84473c387c71c65bfbc375d2059 --- /dev/null +++ b/lecture-01/assets/railroad-ebnf-EBAXGLYW-KNIRPJJ3-C3J20xdH.js @@ -0,0 +1 @@ +import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as e}from"./chunk-FXRKSSP6-BDxrggHz.js";export{e as createRailroadEbnfServices}; \ No newline at end of file diff --git a/lecture-01/assets/railroad-peg-LSFZ7HO6-HLXQPOFZ-BwD06NSa.js b/lecture-01/assets/railroad-peg-LSFZ7HO6-HLXQPOFZ-BwD06NSa.js new file mode 100644 index 0000000000000000000000000000000000000000..80eabeb2502e089032485c3d0ef292dff5f64b7c --- /dev/null +++ b/lecture-01/assets/railroad-peg-LSFZ7HO6-HLXQPOFZ-BwD06NSa.js @@ -0,0 +1 @@ +import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as e}from"./chunk-IT6C5QXO-BI6Sf-cR.js";export{e as createRailroadPegServices}; \ No newline at end of file diff --git a/lecture-01/assets/railroadDiagram-MV55M447-C4p67Sjt.js b/lecture-01/assets/railroadDiagram-MV55M447-C4p67Sjt.js new file mode 100644 index 0000000000000000000000000000000000000000..fec77510ffa6bb4e5d4712bd583eccacb67e97c3 --- /dev/null +++ b/lecture-01/assets/railroadDiagram-MV55M447-C4p67Sjt.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as t}from"./chunk-FO5PYUIK-CPzj2963.js";import"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-BPTLHSDI-QRS_xuYz.js";import{n,r,t as i}from"./chunk-QR6SRGRY-cBZQLGGn.js";import{t as a}from"./chunk-6ZKBGPIT-B4RTUexp.js";import"./chunk-A7G5T7E5-C2HISlqa.js";import{t as o}from"./chunk-BQKPLVCE-CH-bQZj9.js";import"./chunk-NYCIP5HP-BZs_nZUU.js";import"./chunk-6QIBY7DQ-xR0SR3RB.js";import"./chunk-SLCUJWJ3-Bzf1BoPP.js";import{n as s}from"./chunk-43ACQNTO-CVHKukau.js";import"./chunk-FXRKSSP6-BDxrggHz.js";import"./chunk-RRYK4PFG-DZMcopsb.js";import"./chunk-IT6C5QXO-BI6Sf-cR.js";import"./chunk-GMJQP6DO-gEw8rKqu.js";import"./chunk-ODPFZSHR-BUzFQ4Zq.js";import"./chunk-6OZ7KPF7-CpRlDBGl.js";import"./chunk-LJTN6OYE-BTsXVLFU.js";import"./chunk-Z6Q54H3S-B8XyqzVF.js";import"./chunk-4KMQCWFH-ClzK3uec.js";import"./chunk-S7Q6ZHN2-CSIi0_Nw.js";import"./chunk-IIWGMRJM-k15frrBU.js";var c=s().Railroad.parser.LangiumParser,l=e(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 t=e.elements.map(l);return t.length===1?t[0]:{type:`sequence`,elements:t}}case`RailroadChoiceExpr`:{let t=e.alternatives.map(l);return t.length===1?t[0]:{type:`choice`,alternatives:t}}case`RailroadOptionalExpr`:return{type:`optional`,element:l(e.element)};case`RailroadOneOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:1,max:1/0};case`RailroadZeroOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${e.$type}`)}},`transformExpression`),u=e(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),d=e(e=>{a(e,i),e.title&&i.setTitle(e.title),e.rules.map(e=>i.addRule(u(e)))},`populateDb`),f={parser:{parse:e(e=>{i.clear(),t.debug(`[Railroad Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new o(n);let r=n.value;t.debug(`[Railroad Parser] Parsed rules:`,r.rules.length),d(r),t.debug(`[Railroad Parser] Parse complete`)},`parse`),parser:{yy:i}},db:i,renderer:r,styles:n};export{f as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/requirementDiagram-ZEWAG7YM-gqIjNuUm.js b/lecture-01/assets/requirementDiagram-ZEWAG7YM-gqIjNuUm.js new file mode 100644 index 0000000000000000000000000000000000000000..9e76d9f5a1920ac7f1a605dcb6b7c3c2bd22227f --- /dev/null +++ b/lecture-01/assets/requirementDiagram-ZEWAG7YM-gqIjNuUm.js @@ -0,0 +1,84 @@ +import{n as e,r as t}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as n}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as r,E as i,J as a,Q as o,S as s,Y as c,b as l,o as u,x as d}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-PLCLPJVV-BfMyJHbe.js";import"./chunk-XXV7AQMY-qeLKYxsH.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{v as f}from"./chunk-OX6ZKUVE-roiHi12N.js";import"./chunk-YV36FAQU-CkTVkoM6.js";import"./chunk-AQ2D6KKF-AxjphkEe.js";import"./chunk-2V3FENDJ-B1mkZICr.js";import"./chunk-DKH7L6O3-pKUB4f-O.js";import"./chunk-RTI7CJYH-CrTK6TD7.js";import"./chunk-MPM6TOF7-5cxd71sq.js";import{r as p,t as m}from"./chunk-STSWKLMO-1NGmNrHs.js";import{t as h}from"./chunk-HPLX5OYV-zid2YVw5.js";import{t as g}from"./chunk-BYAF6FXG-DqiL_6qO.js";var _=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],c=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],k=[27,29],ee=[1,70],A=[1,71],te=[1,72],ne=[1,73],re=[1,74],ie=[1,75],ae=[1,76],j=[1,83],M=[1,80],N=[1,84],P=[1,85],F=[1,86],I=[1,87],L=[1,88],R=[1,89],z=[1,90],B=[1,91],V=[1,92],oe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],H=[63,64],se=[1,101],ce=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],U=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],W=[1,110],G=[1,106],K=[1,107],q=[1,108],J=[1,109],Y=[1,111],X=[1,116],Z=[1,117],Q=[1,114],$=[1,115],le={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:`error`,5:`NEWLINE`,6:`RD`,8:`EOF`,9:`acc_title`,10:`acc_title_value`,11:`acc_descr`,12:`acc_descr_value`,13:`acc_descr_multiline_value`,21:`direction_tb`,22:`direction_bt`,23:`direction_rl`,24:`direction_lr`,27:`STRUCT_START`,29:`STYLE_SEPARATOR`,31:`ID`,32:`COLONSEP`,34:`TEXT`,36:`RISK`,38:`VERIFYMTHD`,40:`STRUCT_STOP`,41:`REQUIREMENT`,42:`FUNCTIONAL_REQUIREMENT`,43:`INTERFACE_REQUIREMENT`,44:`PERFORMANCE_REQUIREMENT`,45:`PHYSICAL_REQUIREMENT`,46:`DESIGN_CONSTRAINT`,47:`LOW_RISK`,48:`MED_RISK`,49:`HIGH_RISK`,50:`VERIFY_ANALYSIS`,51:`VERIFY_DEMONSTRATION`,52:`VERIFY_INSPECTION`,53:`VERIFY_TEST`,54:`ELEMENT`,57:`TYPE`,59:`DOCREF`,61:`END_ARROW_L`,63:`LINE`,64:`END_ARROW_R`,65:`CONTAINS`,66:`COPIES`,67:`DERIVES`,68:`SATISFIES`,69:`VERIFIES`,70:`REFINES`,71:`TRACES`,72:`CLASSDEF`,74:`CLASS`,75:`ALPHA`,76:`COMMA`,77:`STYLE`,80:`NUM`,81:`COLON`,82:`UNIT`,83:`SPACE`,84:`BRKT`,85:`PCT`,86:`MINUS`,87:`LABEL`,88:`SEMICOLON`,89:`unqString`,90:`qString`},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection(`TB`);break;case 18:r.setDirection(`BT`);break;case 19:r.setDirection(`RL`);break;case 20:r.setDirection(`LR`);break;case 21:r.addRequirement(a[s-3],a[s-4]);break;case 22:r.addRequirement(a[s-5],a[s-6]),r.setClass([a[s-5]],a[s-3]);break;case 23:r.setNewReqId(a[s-2]);break;case 24:r.setNewReqText(a[s-2]);break;case 25:r.setNewReqRisk(a[s-2]);break;case 26:r.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[s-3]);break;case 43:r.addElement(a[s-5]),r.setClass([a[s-5]],a[s-3]);break;case 44:r.setNewElementType(a[s-2]);break;case 45:r.setNewElementDocRef(a[s-2]);break;case 48:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 58:r.setClass(a[s-1],a[s]);break;case 59:r.setClass([a[s-2]],a[s]);break;case 60:case 62:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 65:this.$=[a[s]];break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s]}},`anonymous`),table:[{3:1,4:2,6:n,9:r,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:r,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(o,[2,6]),{3:12,4:2,6:n,9:r,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},e(o,[2,4]),e(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:43,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:44,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:45,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:46,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:47,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:48,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:49,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:50,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(T,[2,17]),e(T,[2,18]),e(T,[2,19]),e(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},e(D,[2,29]),e(D,[2,30]),e(D,[2,31]),e(D,[2,32]),e(D,[2,33]),e(D,[2,34]),e(O,[2,81]),e(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(k,[2,79]),e(k,[2,80]),{27:[1,67],29:[1,68]},e(k,[2,85]),e(k,[2,86]),{62:69,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{62:77,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{30:78,33:62,75:E,89:C,90:w},{73:79,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},e(oe,[2,60]),e(oe,[2,62]),{73:93,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},{30:94,33:62,75:E,76:M,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},e(H,[2,50]),e(H,[2,51]),e(H,[2,52]),e(H,[2,53]),e(H,[2,54]),e(H,[2,55]),e(H,[2,56]),{64:[1,100]},e(T,[2,59],{76:M}),e(T,[2,64],{76:se}),{33:103,75:[1,102],89:C,90:w},e(ce,[2,65],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),e(U,[2,67]),e(U,[2,69]),e(U,[2,70]),e(U,[2,71]),e(U,[2,72]),e(U,[2,73]),e(U,[2,74]),e(U,[2,75]),e(U,[2,76]),e(U,[2,77]),e(U,[2,78]),e(T,[2,57],{76:se}),e(T,[2,58],{76:M}),{5:W,28:105,31:G,34:K,36:q,38:J,40:Y},{27:[1,112],76:M},{5:X,40:Z,56:113,57:Q,59:$},{27:[1,118],76:M},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:j,78:121,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},e(oe,[2,61]),e(oe,[2,63]),e(U,[2,68]),e(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:W,28:126,31:G,34:K,36:q,38:J,40:Y},e(T,[2,28]),{5:[1,127]},e(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:Z,56:130,57:Q,59:$},e(T,[2,47]),{5:[1,131]},e(T,[2,48]),e(T,[2,49]),e(ce,[2,66],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),{33:132,89:C,90:w},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(T,[2,27]),{5:W,28:145,31:G,34:K,36:q,38:J,40:Y},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(T,[2,46]),{5:X,40:Z,56:152,57:Q,59:$},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(T,[2,43]),{5:W,28:159,31:G,34:K,36:q,38:J,40:Y},{5:W,28:160,31:G,34:K,36:q,38:J,40:Y},{5:W,28:161,31:G,34:K,36:q,38:J,40:Y},{5:W,28:162,31:G,34:K,36:q,38:J,40:Y},{5:X,40:Z,56:163,57:Q,59:$},{5:X,40:Z,56:164,57:Q,59:$},e(T,[2,23]),e(T,[2,24]),e(T,[2,25]),e(T,[2,26]),e(T,[2,44]),e(T,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+A.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(te,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:A})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),ee=s[r[r.length-2]][r[r.length-1]],r.push(ee);break;case 3:return!0}}return!0},`parse`)};le.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,t,n,r){switch(n){case 0:return`title`;case 1:return this.begin(`acc_title`),9;case 2:return this.popState(),`acc_title_value`;case 3:return this.begin(`acc_descr`),11;case 4:return this.popState(),`acc_descr_value`;case 5:this.begin(`acc_descr_multiline`);break;case 6:this.popState();break;case 7:return`acc_descr_multiline_value`;case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin(`style`),77;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return`PERCENT`;case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin(`string`);break;case 58:this.popState();break;case 59:return this.begin(`style`),72;case 60:return this.begin(`style`),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin(`string`);break;case 65:this.popState();break;case 66:return`qString`;case 67:return t.yytext=t.yytext.trim(),89;case 68:return 75;case 69:return 80;case 70:return 76}},`anonymous`),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}})();function ue(){this.yy={}}return t(ue,`Parser`),ue.prototype=le,le.Parser=ue,new ue})();_.parser=_;var v=_,y=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction=`TB`,this.RequirementType={REQUIREMENT:`Requirement`,FUNCTIONAL_REQUIREMENT:`Functional Requirement`,INTERFACE_REQUIREMENT:`Interface Requirement`,PERFORMANCE_REQUIREMENT:`Performance Requirement`,PHYSICAL_REQUIREMENT:`Physical Requirement`,DESIGN_CONSTRAINT:`Design Constraint`},this.RiskLevel={LOW_RISK:`Low`,MED_RISK:`Medium`,HIGH_RISK:`High`},this.VerifyType={VERIFY_ANALYSIS:`Analysis`,VERIFY_DEMONSTRATION:`Demonstration`,VERIFY_INSPECTION:`Inspection`,VERIFY_TEST:`Test`},this.Relationships={CONTAINS:`contains`,COPIES:`copies`,DERIVES:`derives`,SATISFIES:`satisfies`,VERIFIES:`verifies`,REFINES:`refines`,TRACES:`traces`},this.setAccTitle=c,this.getAccTitle=d,this.setAccDescription=a,this.getAccDescription=l,this.setDiagramTitle=o,this.getDiagramTitle=i,this.getConfig=t(()=>r().requirement,`getConfig`),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{t(this,`RequirementDB`)}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:``,text:``,risk:``,verifyMethod:``,name:``,type:``,cssStyles:[],classes:[`default`]}}getInitialElement(){return{name:``,type:``,docRef:``,cssStyles:[],classes:[`default`]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:[`default`]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=e)}setNewReqText(e){this.latestRequirement!==void 0&&(this.latestRequirement.text=e)}setNewReqRisk(e){this.latestRequirement!==void 0&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:[`default`]}),n.info(`Added new element: `,e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){this.latestElement!==void 0&&(this.latestElement.type=e)}setNewElementDocRef(e){this.latestElement!==void 0&&(this.latestElement.docRef=e)}addRelationship(e,t,n){this.relations.push({type:e,src:t,dst:n})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,u()}setCssStyle(e,t){for(let n of e){let e=this.requirements.get(n)??this.elements.get(n);if(!t||!e)return;for(let n of t)n.includes(`,`)?e.cssStyles.push(...n.split(`,`)):e.cssStyles.push(n)}}setClass(e,t){for(let n of e){let e=this.requirements.get(n)??this.elements.get(n);if(e)for(let n of t){e.classes.push(n);let t=this.classes.get(n)?.styles;t&&e.cssStyles.push(...t)}}}defineClass(e,t){for(let n of e){let e=this.classes.get(n);e===void 0&&(e={id:n,styles:[],textStyles:[]},this.classes.set(n,e)),t&&t.forEach(function(t){if(/color/.exec(t)){let n=t.replace(`fill`,`bgFill`);e.textStyles.push(n)}e.styles.push(t)}),this.requirements.forEach(e=>{e.classes.includes(n)&&e.cssStyles.push(...t.flatMap(e=>e.split(`,`)))}),this.elements.forEach(e=>{e.classes.includes(n)&&e.cssStyles.push(...t.flatMap(e=>e.split(`,`)))})}}getClasses(){return this.classes}getData(){let e=r(),t=[],n=[];for(let n of this.requirements.values()){let r=n;r.id=n.name,r.cssStyles=n.cssStyles,r.cssClasses=n.classes.join(` `),r.shape=`requirementBox`,r.look=e.look,r.colorIndex=t.length,t.push(r)}for(let n of this.elements.values()){let r=n;r.shape=`requirementBox`,r.look=e.look,r.id=n.name,r.cssStyles=n.cssStyles,r.cssClasses=n.classes.join(` `),r.colorIndex=t.length,t.push(r)}for(let t of this.relations){let r=0,i=t.type===this.Relationships.CONTAINS,a={id:`${t.src}-${t.dst}-${r}`,start:this.requirements.get(t.src)?.name??this.elements.get(t.src)?.name,end:this.requirements.get(t.dst)?.name??this.elements.get(t.dst)?.name,label:`<<${t.type}>>`,classes:`relationshipLine`,style:[`fill:none`,i?``:`stroke-dasharray: 10,7`],labelpos:`c`,thickness:`normal`,type:`normal`,pattern:i?`normal`:`dashed`,arrowTypeStart:i?`requirement_contains`:``,arrowTypeEnd:i?``:`requirement_arrow`,look:e.look,labelType:`markdown`};n.push(a),r++}return{nodes:t,edges:n,other:{},config:e,direction:this.getDirection()}}},b=t(e=>{let{themeVariables:t,look:n}=s(),{bkgColorArray:r,borderColorArray:i}=t;if(!i?.length)return``;let a=``;for(let t=0;t{let{look:t,themeVariables:n}=s(),{requirementEdgeLabelBackground:r}=n;return` + ${b(e)} + marker { + fill: ${e.relationColor}; + stroke: ${e.relationColor}; + } + + marker.cross { + stroke: ${e.lineColor}; + } + + svg { + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; + } + + .reqBox { + fill: ${e.requirementBackground}; + fill-opacity: 1.0; + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${e.requirementTextColor}; + } + .reqLabelBox { + fill: ${e.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + .relationshipLine { + stroke: ${e.relationColor}; + stroke-width: ${t===`neo`?e.strokeWidth:`1px`}; + } + .relationshipLabel { + fill: ${e.relationLabelColor}; + } + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + } + .edgeLabel .label rect { + fill: ${e.edgeLabelBackground}; + } + .edgeLabel .label text { + fill: ${e.relationLabelColor}; + } + .divider { + stroke: ${e.nodeBorder}; + stroke-width: 1; + } + .label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .label text,span { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + .labelBkg { + background-color: ${r??e.edgeLabelBackground}; + } + +`},`getStyles`),S={};e(S,{draw:()=>C});var C=t(async function(e,t,i,a){n.info(`REF0:`),n.info(`Drawing requirement diagram (unified)`,t);let{securityLevel:o,state:s,layout:c,look:l}=r(),u=a.db.getData(),d=h(t,o);u.type=a.type,u.layoutAlgorithm=m(c),u.nodeSpacing=s?.nodeSpacing??50,u.rankSpacing=s?.rankSpacing??50,u.markers=l===`neo`?[`requirement_contains_neo`,`requirement_arrow_neo`]:[`requirement_contains`,`requirement_arrow`],u.diagramId=t,await p(u,d),f.insertTitle(d,`requirementDiagramTitleText`,s?.titleTopMargin??25,a.db.getDiagramTitle()),g(d,8,`requirementDiagram`,s?.useMaxWidth??!0)},`draw`),w={parser:v,get db(){return new y},renderer:S,styles:x};export{w as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/research-ecg-ljyEVJf6.jpeg b/lecture-01/assets/research-ecg-ljyEVJf6.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..670668f3b9734e0610f0e19d299470dc9487d3fa --- /dev/null +++ b/lecture-01/assets/research-ecg-ljyEVJf6.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c0e739899ac222917abd3f2c01a6653d1695d824ac64e68fbc04d6b2aeb3774 +size 524430 diff --git a/lecture-01/assets/research-polyps-BnJ5zZJF.jpeg b/lecture-01/assets/research-polyps-BnJ5zZJF.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..28993d9aa0ee06d83f499acb241594151b61b8c6 --- /dev/null +++ b/lecture-01/assets/research-polyps-BnJ5zZJF.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2997bc6e8161c8a9051310b0faadec7eaa5d1c1024b5a31666c40b3c24099f1c +size 143072 diff --git a/lecture-01/assets/sankeyDiagram-ZEB2SQIR-BYbqBT66.js b/lecture-01/assets/sankeyDiagram-ZEB2SQIR-BYbqBT66.js new file mode 100644 index 0000000000000000000000000000000000000000..322600c894d4282216575795ca8ce5ddf94d6431 --- /dev/null +++ b/lecture-01/assets/sankeyDiagram-ZEB2SQIR-BYbqBT66.js @@ -0,0 +1,40 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as t,M as n,t as r}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as i,E as a,J as o,Q as s,Y as c,b as l,c as u,et as d,o as f,p,x as m}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";var h=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,9],r=[1,10],i=[1,5,10,12],a={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:`error`,4:`SANKEY`,5:`NEWLINE`,10:`EOF`,11:`field[source]`,12:`COMMA`,13:`field[target]`,14:`field[value]`,18:`DQUOTE`,19:`ESCAPED_TEXT`,20:`NON_ESCAPED_TEXT`},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 7:let e=r.findOrCreateNode(a[s-4].trim().replaceAll(`""`,`"`)),t=r.findOrCreateNode(a[s-2].trim().replaceAll(`""`,`"`)),n=parseFloat(a[s].trim());r.addLink(e,t,n);break;case 8:case 9:case 11:this.$=a[s];break;case 10:this.$=a[s-1]}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:r},{15:18,16:7,17:8,18:n,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:n,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};a.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return this.pushState(`csv`),4;case 1:return this.pushState(`csv`),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState(`escaped_text`),18;case 6:return 20;case 7:return this.popState(`escaped_text`),18;case 8:return 19}},`anonymous`),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}}})();function o(){this.yy={}}return e(o,`Parser`),o.prototype=a,a.Parser=o,new o})();h.parser=h;var g=h,_=[],v=[],y=new Map,b=e(()=>{_=[],v=[],y=new Map,f()},`clear`),x=class{constructor(e,t,n=0){this.source=e,this.target=t,this.value=n}static{e(this,`SankeyLink`)}},S=e((e,t,n)=>{_.push(new x(e,t,n))},`addLink`),C=class{constructor(e){this.ID=e}static{e(this,`SankeyNode`)}},w={nodesMap:y,getConfig:e(()=>i().sankey,`getConfig`),getNodes:e(()=>v,`getNodes`),getLinks:e(()=>_,`getLinks`),getGraph:e(()=>({nodes:v.map(e=>({id:e.ID})),links:_.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),`getGraph`),addLink:S,findOrCreateNode:e(e=>{e=u.sanitizeText(e,i());let t=y.get(e);return t===void 0&&(t=new C(e),y.set(e,t),v.push(t)),t},`findOrCreateNode`),getAccTitle:m,setAccTitle:c,getAccDescription:l,setAccDescription:o,getDiagramTitle:a,setDiagramTitle:s,clear:b};function T(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}e(T,`max`);function E(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}e(E,`min`);function D(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}e(D,`sum`);function O(e){return e.target.depth}e(O,`targetDepth`);function k(e){return e.depth}e(k,`left`);function A(e,t){return t-1-e.height}e(A,`right`);function j(e,t){return e.sourceLinks.length?e.depth:t-1}e(j,`justify`);function M(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?E(e.sourceLinks,O)-1:0}e(M,`center`);function N(e){return function(){return e}}e(N,`constant`);function P(e,t){return I(e.source,t.source)||e.index-t.index}e(P,`ascendingSourceBreadth`);function F(e,t){return I(e.target,t.target)||e.index-t.index}e(F,`ascendingTargetBreadth`);function I(e,t){return e.y0-t.y0}e(I,`ascendingBreadth`);function L(e){return e.value}e(L,`value`);function R(e){return e.index}e(R,`defaultId`);function z(e){return e.nodes}e(z,`defaultNodes`);function B(e){return e.links}e(B,`defaultLinks`);function V(e,t){let n=e.get(t);if(!n)throw Error(`missing: `+t);return n}e(V,`find`);function H({nodes:e}){for(let t of e){let e=t.y0,n=e;for(let n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(let e of t.targetLinks)e.y1=n+e.width/2,n+=e.width}}e(H,`computeLinkBreadths`);function U(){let t=0,n=0,r=1,i=1,a=24,o=8,s,c=R,l=j,u,d,f=z,p=B,m=6;function h(){let e={nodes:f.apply(null,arguments),links:p.apply(null,arguments)};return g(e),_(e),v(e),y(e),S(e),H(e),e}e(h,`sankey`),h.update=function(e){return H(e),e},h.nodeId=function(e){return arguments.length?(c=typeof e==`function`?e:N(e),h):c},h.nodeAlign=function(e){return arguments.length?(l=typeof e==`function`?e:N(e),h):l},h.nodeSort=function(e){return arguments.length?(u=e,h):u},h.nodeWidth=function(e){return arguments.length?(a=+e,h):a},h.nodePadding=function(e){return arguments.length?(o=s=+e,h):o},h.nodes=function(e){return arguments.length?(f=typeof e==`function`?e:N(e),h):f},h.links=function(e){return arguments.length?(p=typeof e==`function`?e:N(e),h):p},h.linkSort=function(e){return arguments.length?(d=e,h):d},h.size=function(e){return arguments.length?(t=n=0,r=+e[0],i=+e[1],h):[r-t,i-n]},h.extent=function(e){return arguments.length?(t=+e[0][0],r=+e[1][0],n=+e[0][1],i=+e[1][1],h):[[t,n],[r,i]]},h.iterations=function(e){return arguments.length?(m=+e,h):m};function g({nodes:e,links:t}){for(let[t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];let n=new Map(e.map((t,n)=>[c(t,n,e),t]));for(let[e,r]of t.entries()){r.index=e;let{source:t,target:i}=r;typeof t!=`object`&&(t=r.source=V(n,t)),typeof i!=`object`&&(i=r.target=V(n,i)),t.sourceLinks.push(r),i.targetLinks.push(r)}if(d!=null)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(d),n.sort(d)}e(g,`computeNodeLinks`);function _({nodes:e}){for(let t of e)t.value=t.fixedValue===void 0?Math.max(D(t.sourceLinks,L),D(t.targetLinks,L)):t.fixedValue}e(_,`computeNodeValues`);function v({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.depth=i;for(let{target:t}of e.sourceLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}e(v,`computeNodeDepths`);function y({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.height=i;for(let{source:t}of e.targetLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}e(y,`computeNodeHeights`);function b({nodes:e}){let n=T(e,e=>e.depth)+1,i=(r-t-a)/(n-1),o=Array(n);for(let r of e){let e=Math.max(0,Math.min(n-1,Math.floor(l.call(null,r,n))));r.layer=e,r.x0=t+e*i,r.x1=r.x0+a,o[e]?o[e].push(r):o[e]=[r]}if(u)for(let e of o)e.sort(u);return o}e(b,`computeNodeLayers`);function x(e){let t=E(e,e=>(i-n-(e.length-1)*s)/D(e,L));for(let r of e){let e=n;for(let n of r){n.y0=e,n.y1=e+n.value*t,e=n.y1+s;for(let e of n.sourceLinks)e.width=e.value*t}e=(i-e+s)/(r.length+1);for(let t=0;te.length)-1)),x(t);for(let e=0;e0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,M(e)}u===void 0&&i.sort(I),O(i,n)}}e(C,`relaxLeftToRight`);function w(e,t,n){for(let r=e.length-2;r>=0;--r){let i=e[r];for(let e of i){let n=0,r=0;for(let{target:t,value:i}of e.sourceLinks){let a=i*(t.layer-e.layer);n+=G(e,t)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,M(e)}u===void 0&&i.sort(I),O(i,n)}}e(w,`relaxRightToLeft`);function O(e,t){let r=e.length>>1,a=e[r];A(e,a.y0-s,r-1,t),k(e,a.y1+s,r+1,t),A(e,i,e.length-1,t),k(e,n,0,t)}e(O,`resolveCollisions`);function k(e,t,n,r){for(;n1e-6&&(i.y0+=a,i.y1+=a),t=i.y1+s}}e(k,`resolveCollisionsTopToBottom`);function A(e,t,n,r){for(;n>=0;--n){let i=e[n],a=(i.y1-t)*r;a>1e-6&&(i.y0-=a,i.y1-=a),t=i.y0-s}}e(A,`resolveCollisionsBottomToTop`);function M({sourceLinks:e,targetLinks:t}){if(d===void 0){for(let{source:{sourceLinks:e}}of t)e.sort(F);for(let{target:{targetLinks:t}}of e)t.sort(P)}}e(M,`reorderNodeLinks`);function U(e){if(d===void 0)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(F),n.sort(P)}e(U,`reorderLinks`);function W(e,t){let n=e.y0-(e.sourceLinks.length-1)*s/2;for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n+=i+s}for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n-=i}return n}e(W,`targetTop`);function G(e,t){let n=t.y0-(t.targetLinks.length-1)*s/2;for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n+=i+s}for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n-=i}return n}return e(G,`sourceTop`),h}e(U,`Sankey`);var W=Math.PI,G=2*W,K=1e-6,ee=G-K;function q(){this._x0=this._y0=this._x1=this._y1=null,this._=``}e(q,`Path`);function J(){return new q}e(J,`path`),q.prototype=J.prototype={constructor:q,moveTo:e(function(e,t){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)},`moveTo`),closePath:e(function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)},`closePath`),lineTo:e(function(e,t){this._+=`L`+(this._x1=+e)+`,`+(this._y1=+t)},`lineTo`),quadraticCurveTo:e(function(e,t,n,r){this._+=`Q`+ +e+`,`+ +t+`,`+(this._x1=+n)+`,`+(this._y1=+r)},`quadraticCurveTo`),bezierCurveTo:e(function(e,t,n,r,i,a){this._+=`C`+ +e+`,`+ +t+`,`+ +n+`,`+ +r+`,`+(this._x1=+i)+`,`+(this._y1=+a)},`bezierCurveTo`),arcTo:e(function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(i<0)throw Error(`negative radius: `+i);if(this._x1===null)this._+=`M`+(this._x1=e)+`,`+(this._y1=t);else if(d>K){if(!(Math.abs(u*s-c*l)>K)||!i)this._+=`L`+(this._x1=e)+`,`+(this._y1=t);else{var f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((W-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>K&&(this._+=`L`+(e+y*l)+`,`+(t+y*u)),this._+=`A`+i+`,`+i+`,0,0,`+ +(u*f>l*p)+`,`+(this._x1=e+b*s)+`,`+(this._y1=t+b*c)}}},`arcTo`),arc:e(function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;if(n<0)throw Error(`negative radius: `+n);this._x1===null?this._+=`M`+c+`,`+l:(Math.abs(this._x1-c)>K||Math.abs(this._y1-l)>K)&&(this._+=`L`+c+`,`+l),n&&(d<0&&(d=d%G+G),d>ee?this._+=`A`+n+`,`+n+`,0,1,`+u+`,`+(e-o)+`,`+(t-s)+`A`+n+`,`+n+`,0,1,`+u+`,`+(this._x1=c)+`,`+(this._y1=l):d>K&&(this._+=`A`+n+`,`+n+`,0,`+ +(d>=W)+`,`+u+`,`+(this._x1=e+n*Math.cos(i))+`,`+(this._y1=t+n*Math.sin(i))))},`arc`),rect:e(function(e,t,n,r){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)+`h`+ +n+`v`+ +r+`h`+-n+`Z`},`rect`),toString:e(function(){return this._},`toString`)};var te=J;function Y(t){return e(function(){return t},`constant`)}e(Y,`default`);function X(e){return e[0]}e(X,`x`);function Z(e){return e[1]}e(Z,`y`);var ne=Array.prototype.slice;function Q(e){return e.source}e(Q,`linkSource`);function $(e){return e.target}e($,`linkTarget`);function re(t){var n=Q,r=$,i=X,a=Z,o=null;function s(){var e,s=ne.call(arguments),c=n.apply(this,s),l=r.apply(this,s);if(o||=e=te(),t(o,+i.apply(this,(s[0]=c,s)),+a.apply(this,s),+i.apply(this,(s[0]=l,s)),+a.apply(this,s)),e)return o=null,e+``||null}return e(s,`link`),s.source=function(e){return arguments.length?(n=e,s):n},s.target=function(e){return arguments.length?(r=e,s):r},s.x=function(e){return arguments.length?(i=typeof e==`function`?e:Y(+e),s):i},s.y=function(e){return arguments.length?(a=typeof e==`function`?e:Y(+e),s):a},s.context=function(e){return arguments.length?(o=e??null,s):o},s}e(re,`link`);function ie(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}e(ie,`curveHorizontal`);function ae(){return re(ie)}e(ae,`linkHorizontal`);function oe(e){return[e.source.x1,e.y0]}e(oe,`horizontalSource`);function se(e){return[e.target.x0,e.y1]}e(se,`horizontalTarget`);function ce(){return ae().source(oe).target(se)}e(ce,`default`);var le=class t{static{e(this,`Uid`)}static{this.count=0}static next(e){return new t(e+ ++t.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return`url(`+this.href+`)`}},ue={left:k,right:A,center:M,justify:j},de=e(e=>{let t=0,n=0;for(let r of e){let e=r.value??0;e>t&&(t=e,n=r.layer??0)}return n},`findCentralNodeLayer`),fe={draw:e(function(a,o,s,c){let{securityLevel:l,sankey:u}=i(),f=p.sankey,m;l===`sandbox`&&(m=t(`#i`+o));let h=t(l===`sandbox`?m.nodes()[0].contentDocument.body:`body`),g=l===`sandbox`?h.select(`[id="${o}"]`):t(`[id="${o}"]`),_=u?.width??f.width,v=u?.height??f.width,y=u?.useMaxWidth??f.useMaxWidth,b=u?.nodeAlignment??f.nodeAlignment,x=u?.prefix??f.prefix,S=u?.suffix??f.suffix,C=u?.showValues??f.showValues,w=u?.nodeWidth??f.nodeWidth??10,T=u?.nodePadding??f.nodePadding??12,E=u?.labelStyle??f.labelStyle??`legacy`,D=u?.nodeColors??{},O=c.db.getGraph(),k=ue[b];U().nodeId(e=>e.id).nodeWidth(w).nodePadding(T+(C?15:0)).nodeAlign(k).extent([[0,0],[_,v]])(O);let A=de(O.nodes),j=n(r),M=e(e=>D[e]??j(e),`getNodeColor`);g.append(`g`).attr(`class`,`nodes`).selectAll(`.node`).data(O.nodes).join(`g`).attr(`class`,`node`).attr(`id`,e=>(e.uid=le.next(`node-`)).id).attr(`transform`,function(e){return`translate(`+e.x0+`,`+e.y0+`)`}).attr(`x`,e=>e.x0).attr(`y`,e=>e.y0).append(`rect`).attr(`height`,e=>e.y1-e.y0).attr(`width`,e=>e.x1-e.x0).attr(`fill`,e=>M(e.id));let N=e(({id:e,value:t})=>C?`${e} +${x}${Math.round(t*100)/100}${S}`:e,`getText`),P=e(e=>E===`outlined`?(e.layer??0)F.selectAll(e?`.${e}`:`text`).data(O.nodes).join(`text`).attr(`class`,e??null).attr(`x`,e=>P(e).x).attr(`y`,e=>(e.y1+e.y0)/2).attr(`dy`,`${C?`0`:`0.35`}em`).attr(`text-anchor`,e=>P(e).anchor).text(N),`appendLabel`);E===`outlined`?(I(`sankey-label-bg`),I(`sankey-label-fg`)):I();let L=g.append(`g`).attr(`class`,`links`).attr(`fill`,`none`).attr(`stroke-opacity`,.5).selectAll(`.link`).data(O.links).join(`g`).attr(`class`,`link`).style(`mix-blend-mode`,`multiply`),R=u?.linkColor??`gradient`;if(R===`gradient`){let e=L.append(`linearGradient`).attr(`id`,e=>(e.uid=le.next(`linearGradient-`)).id).attr(`gradientUnits`,`userSpaceOnUse`).attr(`x1`,e=>e.source.x1).attr(`x2`,e=>e.target.x0);e.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,e=>M(e.source.id)),e.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,e=>M(e.target.id))}let z;switch(R){case`gradient`:z=e(e=>e.uid,`coloring`);break;case`source`:z=e(e=>M(e.source.id),`coloring`);break;case`target`:z=e(e=>M(e.target.id),`coloring`);break;default:z=R}L.append(`path`).attr(`d`,ce()).attr(`stroke`,z).attr(`stroke-width`,e=>Math.max(1,e.width)),d(void 0,g,0,y)},`draw`)},pe=e(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,``).replaceAll(/([\n\r])+/g,` +`).trim(),`prepareTextForParsing`),me=e(e=>`.label { + font-family: ${e.fontFamily}; + } + + .node-labels { + font-family: ${e.fontFamily}; + } + + /* Outlined label style - background stroke for better readability */ + .sankey-label-bg { + stroke: ${e.mainBkg||e.background||`#fff`}; + stroke-width: 4px; + stroke-linejoin: round; + paint-order: stroke; + } + + /* Foreground label text */ + .sankey-label-fg { + fill: ${e.textColor}; + } + + /* Node styling */ + .node rect { + shape-rendering: crispEdges; + } + + /* Link styling */ + .link { + fill: none; + stroke-opacity: 0.5; + mix-blend-mode: multiply; + } +`,`getStyles`),he=g.parse.bind(g);g.parse=e=>he(pe(e));var ge={styles:me,parser:g,db:w,renderer:fe};export{ge as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/section-B0St524Y.js b/lecture-01/assets/section-B0St524Y.js new file mode 100644 index 0000000000000000000000000000000000000000..994e83619fd6af5c129e7f74f6673457f25c1d81 --- /dev/null +++ b/lecture-01/assets/section-B0St524Y.js @@ -0,0 +1 @@ +import{B as e,Ct as t,T as n,U as r,_ as i,b as a,y as o}from"./modules/shiki-CJZsCeMT.js";import{t as s}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as c}from"./slidev/context-C6dxaFaS.js";var l={class:`slidev-layout dl-section`},u={key:0,class:`dl-section__index`},d={class:`dl-section__body`},f=s(n({__name:`section`,props:{index:{}},setup(n){let{$slidev:s,$nav:f,$clicksContext:p,$clicks:m,$page:h,$renderContext:g,$frontmatter:_}=c(),v=n;return(n,s)=>(e(),a(`div`,l,[v.index?(e(),a(`div`,u,t(v.index),1)):o(`v-if`,!0),i(`div`,d,[r(n.$slots,`default`,{},void 0,!0)]),s[0]||=i(`div`,{class:`dl-rule dl-section__rule`},null,-1)]))}}),[[`__scopeId`,`data-v-833128c2`]]);export{f as t}; \ No newline at end of file diff --git a/lecture-01/assets/section-BZ9Dfv_4.css b/lecture-01/assets/section-BZ9Dfv_4.css new file mode 100644 index 0000000000000000000000000000000000000000..d27ca99afbadaf5a880bb2ca13a5955a547e6164 --- /dev/null +++ b/lecture-01/assets/section-BZ9Dfv_4.css @@ -0,0 +1 @@ +.dl-section[data-v-833128c2]{background:var(--dl-surface);flex-direction:column;justify-content:center;padding-left:4rem;display:flex}.dl-section__index[data-v-833128c2]{font-size:var(--dl-fs-secondary);letter-spacing:.2em;color:var(--dl-accent);margin-bottom:.8rem;font-weight:700}.dl-section__body[data-v-833128c2] h1,.dl-section__body[data-v-833128c2] h2{font-size:var(--dl-fs-section);margin:0;line-height:1.1}.dl-section__body[data-v-833128c2] p{color:var(--dl-muted);max-width:46ch;margin-top:.6rem}.dl-section__rule[data-v-833128c2]{margin-top:1.4rem} diff --git a/lecture-01/assets/sequenceDiagram-DLAT6Y6V-CQQd0Avg.js b/lecture-01/assets/sequenceDiagram-DLAT6Y6V-CQQd0Avg.js new file mode 100644 index 0000000000000000000000000000000000000000..033b64ba1780f18b08eb1eac498686237df87e37 --- /dev/null +++ b/lecture-01/assets/sequenceDiagram-DLAT6Y6V-CQQd0Avg.js @@ -0,0 +1,162 @@ +import{i as e,r as t}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as n,T as r}from"./chunk-FO5PYUIK-CPzj2963.js";import{A as i,B as a,C as o,E as s,G as c,J as l,M as u,Q as d,S as f,Y as p,Z as m,b as h,c as g,i as _,l as v,o as y,r as b,x}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{n as S,t as C}from"./chunk-PWCFYZI5-Dz1excih.js";import{t as w}from"./chunk-IPM4HZQ6-CQmHNgJe.js";import{h as T,v as E}from"./chunk-OX6ZKUVE-roiHi12N.js";import{a as D,c as O,i as k,n as A,r as j,s as M}from"./chunk-ZICDAICJ-CB44yeNY.js";import{t as N}from"./chunk-IALYP65X-Bv3ioVcB.js";var P=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],ee=[1,74],L=[1,80],R=[1,81],te=[1,82],ne=[1,83],re=[1,84],z=[1,85],B=[1,86],V=[1,87],ie=[1,88],H=[1,89],U=[1,90],W=[1,91],ae=[1,92],oe=[1,93],se=[1,94],G=[1,95],ce=[1,96],K=[1,97],le=[1,98],ue=[1,99],de=[1,100],fe=[1,101],pe=[1,102],me=[1,103],he=[1,104],ge=[1,105],_e=[2,78],ve=[4,5,17,51,53,54],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],xe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ce=[5,52],q=[70,71,72,73],J=[1,151],we={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1))}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),e(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(I,[2,30]),e(I,[2,31]),{33:[1,62]},{35:[1,63]},e(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:ee},{23:75,55:76,73:ee},{23:77,73:F},{69:78,72:[1,79],78:L,79:R,80:te,81:ne,82:re,83:z,84:B,85:V,86:ie,87:H,88:U,89:W,90:ae,91:oe,92:se,93:G,94:ce,95:K,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],_e),e(I,[2,6]),e(I,[2,16]),e(ve,[2,10],{11:114}),e(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(I,[2,22]),{5:[1,118]},{5:[1,119]},e(I,[2,25]),e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,32]),e(I,[2,33]),e(ye,a,{7:120}),e(ye,a,{7:121}),e(ye,a,{7:122}),e(be,a,{41:123,7:124}),e(xe,a,{43:125,7:126}),e(xe,a,{7:126,43:127}),e(Se,a,{46:128,7:129}),e(ye,a,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Ce,_e,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:F},{69:146,78:L,79:R,80:te,81:ne,82:re,83:z,84:B,85:V,86:ie,87:H,88:U,89:W,90:ae,91:oe,92:se,93:G,94:ce,95:K,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},e(q,[2,79]),e(q,[2,80]),e(q,[2,81]),e(q,[2,82]),e(q,[2,83]),e(q,[2,84]),e(q,[2,85]),e(q,[2,86]),e(q,[2,87]),e(q,[2,88]),e(q,[2,89]),e(q,[2,90]),e(q,[2,91]),e(q,[2,92]),e(q,[2,93]),e(q,[2,94]),e(q,[2,95]),e(q,[2,96]),e(q,[2,97]),e(q,[2,98]),e(q,[2,99]),e(q,[2,100]),e(q,[2,101]),e(q,[2,102]),e(q,[2,103]),e(q,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:J},{58:152,104:J},{58:153,104:J},{58:154,104:J},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},e(I,[2,20]),e(I,[2,21]),e(I,[2,23]),e(I,[2,24]),{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},e(I,[2,50]),{16:[1,173]},e(I,[2,55]),e(Ce,[2,76]),{76:[1,174]},{16:[1,175]},e(I,[2,52]),{16:[1,176]},e(I,[2,57]),e(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:J},{23:181,72:[1,182],73:F},{58:183,104:J},{58:184,104:J},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(I,[2,17]),e(ve,[2,11]),{13:186,51:D,53:O,54:k},e(ve,[2,13]),e(ve,[2,14]),e(I,[2,19]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),e(I,[2,38]),{16:[1,187]},e(I,[2,39]),{16:[1,188]},e(I,[2,40]),e(I,[2,41]),{16:[1,189]},e(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:J},{58:196,104:J},{58:197,104:J},{5:[2,75]},{58:198,104:J},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},e(ve,[2,12]),e(be,a,{7:124,41:201}),e(xe,a,{7:126,43:202}),e(Se,a,{7:129,46:203}),e(I,[2,49]),e(I,[2,54]),e(Ce,[2,77]),e(I,[2,51]),e(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:J},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};we.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,t,n,r){switch(n){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin(`CONFIG`),75;case 8:return 76;case 9:return this.popState(),this.begin(`ALIAS`),77;case 10:return this.popState(),this.popState(),77;case 11:return t.yytext=t.yytext.trim(),73;case 12:return t.yytext=t.yytext.trim(),this.begin(`ALIAS`),73;case 13:return t.yytext=t.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return t.yytext=t.yytext.trim(),this.popState(),10;case 16:return this.begin(`LINE`),15;case 17:return this.begin(`ID`),51;case 18:return this.begin(`ID`),53;case 19:return 14;case 20:return this.begin(`ID`),54;case 21:return this.popState(),this.popState(),this.begin(`LINE`),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin(`LINE`),37;case 24:return this.begin(`LINE`),38;case 25:return this.begin(`LINE`),39;case 26:return this.begin(`LINE`),40;case 27:return this.begin(`LINE`),50;case 28:return this.begin(`LINE`),42;case 29:return this.begin(`LINE`),44;case 30:return this.begin(`LINE`),49;case 31:return this.begin(`LINE`),45;case 32:return this.begin(`LINE`),48;case 33:return this.begin(`LINE`),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin(`ID`),22;case 45:return this.begin(`ID`),24;case 46:return 30;case 47:return 31;case 48:return this.begin(`acc_title`),32;case 49:return this.popState(),`acc_title_value`;case 50:return this.begin(`acc_descr`),34;case 51:return this.popState(),`acc_descr_value`;case 52:this.begin(`acc_descr_multiline`);break;case 53:this.popState();break;case 54:return`acc_descr_multiline_value`;case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return t.yytext=t.yytext.trim(),73;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},`anonymous`),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}}})();function Te(){this.yy={}}return t(Te,`Parser`),Te.prototype=we,we.Parser=Te,new Te})();P.parser=P;var F=P,I={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},ee={FILLED:0,OPEN:1},L={LEFTOF:0,RIGHTOF:1,OVER:2},R={ACTOR:`actor`,BOUNDARY:`boundary`,COLLECTIONS:`collections`,CONTROL:`control`,DATABASE:`database`,ENTITY:`entity`,PARTICIPANT:`participant`,QUEUE:`queue`},te=class{constructor(){this.state=new N(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=p,this.setAccDescription=l,this.setDiagramTitle=d,this.getAccTitle=x,this.getAccDescription=h,this.getDiagramTitle=s,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(o().wrap),this.LINETYPE=I,this.ARROWTYPE=ee,this.PLACEMENT=L}static{t(this,`SequenceDB`)}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,n,r,i){let a=this.state.records.currentBox,o;if(i!==void 0){let e;e=i.includes(` +`)?i+` +`:`{ +`+i+` +}`,o=S(e,{schema:C})}r=o?.type??r,o?.alias&&(!n||n.text===t)&&(n={text:o.alias,wrap:n?.wrap,type:r});let s=this.state.records.actors.get(e);if(s){if(this.state.records.currentBox&&s.box&&this.state.records.currentBox!==s.box)throw Error(`A same participant should only be defined in one Box: ${s.name} can't be in '${s.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=s.box?s.box:this.state.records.currentBox,s.box=a,s&&t===s.name&&n==null)return}if(n?.text??(n={text:t,type:r}),(r==null||n.text==null)&&(n={text:t,type:r}),this.state.records.actors.set(e,{box:a,name:t,description:n.text,wrap:n.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??`participant`}),this.state.records.prevActor){let t=this.state.records.actors.get(this.state.records.prevActor);t&&(t.nextActor=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,n=0;if(!e)return 0;for(t=0;t>-`,token:`->>-`,line:`1`,loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[`'ACTIVE_PARTICIPANT'`]},t}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:n?.text??``,wrap:n?.wrap??this.autoWrap(),type:r,activate:i,centralConnection:a??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(e===void 0)return{};e=e.trim();let t=/^:?wrap:/.exec(e)!==null||/^:?nowrap:/.exec(e)===null&&void 0;return{cleanedText:(t===void 0?e:e.replace(/^:?(?:no)?wrap:/,``)).trim(),wrap:t}}autoWrap(){return this.state.records.wrapEnabled===void 0?o().sequence?.wrap??!1:this.state.records.wrapEnabled}clear(){this.state.reset(),y()}parseMessage(e){let t=e.trim(),{wrap:n,cleanedText:i}=this.extractWrap(t),a={text:i,wrap:n};return r.debug(`parseMessage: ${JSON.stringify(a)}`),a}parseBoxData(e){let t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),n=t?.[1]?t[1].trim():`transparent`,r=t?.[2]?t[2].trim():void 0;if(window?.CSS)window.CSS.supports(`color`,n)||(n=`transparent`,r=e.trim());else{let t=new Option().style;t.color=n,t.color!==n&&(n=`transparent`,r=e.trim())}let{wrap:i,cleanedText:a}=this.extractWrap(r);return{text:a?c(a,o()):void 0,color:n,wrap:i}}addNote(e,t,n){let r={actor:e,placement:t,message:n.text,wrap:n.wrap??this.autoWrap()},i=[].concat(e,e);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:n.text,wrap:n.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(e,t){let n=this.getActor(e);try{let e=c(t.text,o());e=e.replace(/=/g,`=`),e=e.replace(/&/g,`&`);let r=JSON.parse(e);this.insertLinks(n,r)}catch(e){r.error(`error while parsing actor link text`,e)}}addALink(e,t){let n=this.getActor(e);try{let e={},r=c(t.text,o()),i=r.indexOf(`@`);r=r.replace(/=/g,`=`),r=r.replace(/&/g,`&`);let a=r.slice(0,i-1).trim();e[a]=r.slice(i+1).trim(),this.insertLinks(n,e)}catch(e){r.error(`error while parsing actor link text`,e)}}insertLinks(e,t){if(e.links==null)e.links=t;else for(let n in t)e.links[n]=t[n]}addProperties(e,t){let n=this.getActor(e);try{let e=c(t.text,o()),r=JSON.parse(e);this.insertProperties(n,r)}catch(e){r.error(`error while parsing actor properties text`,e)}}insertProperties(e,t){if(e.properties==null)e.properties=t;else for(let n in t)e.properties[n]=t[n]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,t){let n=this.getActor(e),i=document.getElementById(t.text);try{let e=i.innerHTML,t=JSON.parse(e);t.properties&&this.insertProperties(n,t.properties),t.links&&this.insertLinks(n,t.links)}catch(e){r.error(`error while parsing actor details text`,e)}}getActorProperty(e,t){if(e?.properties!==void 0)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(e=>{this.apply(e)});else switch(e.type){case`sequenceIndex`:this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case`addParticipant`:this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case`createParticipant`:if(this.state.records.actors.has(e.actor))throw Error(`It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior`);this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case`destroyParticipant`:this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case`activeStart`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`centralConnection`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`centralConnectionReverse`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`activeEnd`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`addNote`:this.addNote(e.actor,e.placement,e.text);break;case`addLinks`:this.addLinks(e.actor,e.text);break;case`addALink`:this.addALink(e.actor,e.text);break;case`addProperties`:this.addProperties(e.actor,e.text);break;case`addDetails`:this.addDetails(e.actor,e.text);break;case`addMessage`:if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw Error(`The created participant `+this.state.records.lastCreated.name+` does not have an associated creating message after its declaration. Please check the sequence diagram.`);this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw Error(`The destroyed participant `+this.state.records.lastDestroyed.name+` does not have an associated destroying message after its declaration. Please check the sequence diagram.`);this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate,e.centralConnection);break;case`boxStart`:this.addBox(e.boxData);break;case`boxEnd`:this.boxEnd();break;case`loopStart`:this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case`loopEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`rectStart`:this.addSignal(void 0,void 0,e.color,e.signalType);break;case`rectEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`optStart`:this.addSignal(void 0,void 0,e.optText,e.signalType);break;case`optEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`altStart`:this.addSignal(void 0,void 0,e.altText,e.signalType);break;case`else`:this.addSignal(void 0,void 0,e.altText,e.signalType);break;case`altEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`setAccTitle`:p(e.text);break;case`parStart`:this.addSignal(void 0,void 0,e.parText,e.signalType);break;case`and`:this.addSignal(void 0,void 0,e.parText,e.signalType);break;case`parEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`criticalStart`:this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case`option`:this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case`criticalEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`breakStart`:this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case`breakEnd`:this.addSignal(void 0,void 0,void 0,e.signalType)}}getConfig(){return o().sequence}},ne=t(e=>{let t=e.dropShadow??`none`,{look:n}=o();return`.actor { + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; + stroke-width: ${e.strokeWidth??1}; + } + + rect.actor.outer-path[data-look="neo"] { + filter: ${t}; + } + + rect.note[data-look="neo"] { + stroke:${e.noteBorderColor}; + fill:${e.noteBkgColor}; + filter: ${t}; + } + + text.actor > tspan { + fill: ${e.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${e.actorLineColor}; + } + + .innerArc { + stroke-width: 1.5; + stroke-dasharray: none; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${e.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${e.signalColor}; + } + + [id$="-arrowhead"] path { + fill: ${e.signalColor}; + stroke: ${e.signalColor}; + } + + .sequenceNumber { + fill: ${e.sequenceNumberColor}; + } + + [id$="-sequencenumber"] { + fill: ${e.signalColor}; + } + + [id$="-crosshead"] path { + fill: ${e.signalColor}; + stroke: ${e.signalColor}; + } + + .messageText { + fill: ${e.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${e.labelBoxBorderColor}; + fill: ${e.labelBoxBkgColor}; + filter: ${n===`neo`?t:`none`}; + } + + .labelText, .labelText > tspan { + fill: ${e.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${e.loopTextColor}; + stroke: none; + } + + .sectionTitle, .sectionTitle > tspan { + fill: ${e.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${e.labelBoxBorderColor}; + fill: ${e.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${e.noteBorderColor}; + fill: ${e.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${e.noteTextColor}; + stroke: none; + ${e.noteFontWeight?`font-weight: ${e.noteFontWeight};`:``} + } + + .activation0 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .activation1 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .activation2 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${e.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man circle, line { + fill: ${e.actorBkg}; + stroke-width: 2px; + } + + g rect.rect { + filter: ${t}; + stroke: ${e.nodeBorder}; + } +`},`getStyles`),re=e(w(),1),z=36,B=`actor-top`,V=`actor-bottom`,ie=`actor-box`,H=`actor-man`,U=new Set([`redux-color`,`redux-dark-color`]),W=t(function(e,t){let n=D(e,t);return f().look===`neo`&&n.attr(`data-look`,`neo`),n},`drawRect`),ae=t(function(e,t,n,r,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let a=t.links,o=t.actorCnt,s=t.rectData;var c=`none`;i&&(c=`block !important`);let l=e.append(`g`);l.attr(`id`,`actor`+o+`_popup`),l.attr(`class`,`actorPopupMenu`),l.attr(`display`,c);var u=``;s.class!==void 0&&(u=` `+s.class);let d=s.width>n?s.width:n,f=l.append(`rect`);if(f.attr(`class`,`actorPopupMenuPanel`+u),f.attr(`x`,s.x),f.attr(`y`,s.height),f.attr(`fill`,s.fill),f.attr(`stroke`,s.stroke),f.attr(`width`,d),f.attr(`height`,s.height),f.attr(`rx`,s.rx),f.attr(`ry`,s.ry),a!=null){var p=20;for(let e in a){var m=l.append(`a`),h=(0,re.sanitizeUrl)(a[e]);m.attr(`xlink:href`,h),m.attr(`target`,`_blank`),Me(r)(e,m,s.x+10,s.height+p,d,20,{class:`actor`},r),p+=30}}return f.attr(`height`,p),{height:s.height+p,width:d}},`drawPopup`),oe=t(function(e){return`var pu = document.getElementById('`+e+`'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }`},`popupMenuToggle`),se=t(async function(e,t,n=null){let r=e.append(`foreignObject`),i=await a(t.text,f()),o=r.append(`xhtml:div`).attr(`style`,`width: fit-content;`).attr(`xmlns`,`http://www.w3.org/1999/xhtml`).html(i).node().getBoundingClientRect();if(r.attr(`height`,Math.round(o.height)).attr(`width`,Math.round(o.width)),t.class===`noteText`){let n=e.node().firstChild;n.setAttribute(`height`,o.height+2*t.textMargin);let i=n.getBBox();r.attr(`x`,Math.round(i.x+i.width/2-o.width/2)).attr(`y`,Math.round(i.y+i.height/2-o.height/2))}else if(n){let{startx:e,stopx:i,starty:a}=n;if(e>i){let t=e;e=i,i=t}r.attr(`x`,Math.round(e+Math.abs(e-i)/2-o.width/2)),t.class===`loopText`?r.attr(`y`,Math.round(a)):r.attr(`y`,Math.round(a-o.height))}return[r]},`drawKatex`),G=t(function(e,n){let r=0,i=0,a=n.text.split(g.lineBreakRegex),[o,s]=T(n.fontSize),c=[],l=0,u=t(()=>n.y,`yfunc`);if(n.valign!==void 0&&n.textMargin!==void 0&&n.textMargin>0)switch(n.valign){case`top`:case`start`:u=t(()=>Math.round(n.y+n.textMargin),`yfunc`);break;case`middle`:case`center`:u=t(()=>Math.round(n.y+(r+i+n.textMargin)/2),`yfunc`);break;case`bottom`:case`end`:u=t(()=>Math.round(n.y+(r+i+2*n.textMargin)-n.textMargin),`yfunc`)}if(n.anchor!==void 0&&n.textMargin!==void 0&&n.width!==void 0)switch(n.anchor){case`left`:case`start`:n.x=Math.round(n.x+n.textMargin),n.anchor=`start`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`;break;case`middle`:case`center`:n.x=Math.round(n.x+n.width/2),n.anchor=`middle`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`;break;case`right`:case`end`:n.x=Math.round(n.x+n.width-n.textMargin),n.anchor=`end`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`}for(let[t,d]of a.entries()){n.textMargin!==void 0&&n.textMargin===0&&o!==void 0&&(l=t*o);let a=e.append(`text`);a.attr(`x`,n.x),a.attr(`y`,u()),n.anchor!==void 0&&a.attr(`text-anchor`,n.anchor).attr(`dominant-baseline`,n.dominantBaseline).attr(`alignment-baseline`,n.alignmentBaseline),n.fontFamily!==void 0&&a.style(`font-family`,n.fontFamily),s!==void 0&&a.style(`font-size`,s),n.fontWeight!==void 0&&a.style(`font-weight`,n.fontWeight),n.fill!==void 0&&a.attr(`fill`,n.fill),n.class!==void 0&&a.attr(`class`,n.class),n.dy===void 0?l!==0&&a.attr(`dy`,l):a.attr(`dy`,n.dy);let f=d||`​`;if(n.tspan){let e=a.append(`tspan`);e.attr(`x`,n.x),n.fill!==void 0&&e.attr(`fill`,n.fill),e.text(f)}else a.text(f);n.valign!==void 0&&n.textMargin!==void 0&&n.textMargin>0&&(i+=(a._groups||a)[0][0].getBBox().height,r=i),c.push(a)}return c},`drawText`),ce=t(function(e,n){function r(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}t(r,`genPoints`);let i=e.append(`polygon`);return i.attr(`points`,r(n.x,n.y,n.width,n.height,7)),i.attr(`class`,`labelBox`),n.y+=n.height/2,G(e,n),i},`drawLabel`),K=-1,le=t((e,t,n,r)=>{e.select&&n.forEach(n=>{let i=t.get(n),a=e.select(`#actor`+i.actorCnt);!r.mirrorActors&&i.stopy?a.attr(`y2`,i.stopy+i.height/2):r.mirrorActors&&a.attr(`y2`,i.stopy)})},`fixLifeLineHeights`),ue=t(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+t.height,{look:c,theme:l,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower();var h=m;r||(K++,Object.keys(t.links||{}).length&&!n.forceMenus&&h.attr(`onclick`,oe(`actor${K}_popup`)).attr(`cursor`,`pointer`),h.append(`line`).attr(`id`,`actor`+K).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),h=m.append(`g`),t.actorCnt=K,t.links!=null&&h.attr(`id`,`root-`+K),c===`neo`&&h.attr(`data-look`,`neo`));let g=M();var _=`actor`;t.properties?.class?_=t.properties.class:g.fill=`#eaeaea`,_+=r?` ${V}`:` ${B}`,g.x=t.x,g.y=a,g.width=t.width,g.height=t.height,g.class=_,g.rx=3,g.ry=3,g.name=t.name,c===`neo`&&(g.rx=6,g.ry=6);let v=W(h,g),y=i.get(t.name)??0;if(U.has(l)&&(v.style(`stroke`,p[y%p.length]),v.style(`fill`,f[y%p.length])),c===`neo`&&v.attr(`filter`,`url(#drop-shadow)`),t.rectData=g,t.properties?.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?j(h,g.x+g.width-20,g.y+10,e.substr(1)):k(h,g.x+g.width-20,g.y+10,e)}r||(h.attr(`data-et`,`participant`),h.attr(`data-type`,`participant`),h.attr(`data-id`,t.name)),Y(n,u(t.description))(t.description,h,g.x,g.y,g.width,g.height,{class:`actor ${ie}`},n);let b=t.height;if(v.node){let e=v.node().getBBox();t.height=e.height,b=e.height}return b},`drawActorTypeParticipant`),de=t(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+t.height,{look:c,theme:l,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower();var h=m;r||(K++,Object.keys(t.links||{}).length&&!n.forceMenus&&h.attr(`onclick`,oe(`actor${K}_popup`)).attr(`cursor`,`pointer`),h.append(`line`).attr(`id`,`actor`+K).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),h=m.append(`g`),t.actorCnt=K,t.links!=null&&h.attr(`id`,`root-`+K),c===`neo`&&h.attr(`data-look`,`neo`));let g=M();var _=`actor`;t.properties?.class?_=t.properties.class:g.fill=`#eaeaea`,_+=r?` ${V}`:` ${B}`,g.x=t.x,g.y=a,g.width=t.width,g.height=t.height,g.class=_,g.name=t.name;let v={...g,x:g.x+-6,y:g.y+6,class:`actor`},y=W(h,g),b=W(h,v);t.rectData=g,c===`neo`&&h.attr(`filter`,`url(#drop-shadow)`);let x=i.get(t.name)??0;if(U.has(l)&&(y.style(`stroke`,p[x%p.length]),y.style(`fill`,f[x%p.length]),b.style(`stroke`,p[x%p.length]),b.style(`fill`,f[x%p.length])),t.properties?.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?j(h,g.x+g.width-20,g.y+10,e.substr(1)):k(h,g.x+g.width-20,g.y+10,e)}Y(n,u(t.description))(t.description,h,g.x-6,g.y+6,g.width,g.height,{class:`actor ${ie}`},n);let S=t.height;if(y.node){let e=y.node().getBBox();t.height=e.height,S=e.height}return r||(h.attr(`data-et`,`participant`),h.attr(`data-type`,`collections`),h.attr(`data-id`,t.name)),S},`drawActorTypeCollections`),fe=t(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+t.height,{look:c,theme:l,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower(),h=m;r||(K++,Object.keys(t.links||{}).length&&!n.forceMenus&&h.attr(`onclick`,oe(`actor${K}_popup`)).attr(`cursor`,`pointer`),h.append(`line`).attr(`id`,`actor`+K).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),h=m.append(`g`),t.actorCnt=K,t.links!=null&&h.attr(`id`,`root-`+K),c===`neo`&&h.attr(`data-look`,`neo`));let g=M(),_=`actor`;t.properties?.class?_=t.properties.class:g.fill=`#eaeaea`,_+=r?` ${V}`:` ${B}`,h.attr(`class`,_),g.x=t.x,g.y=a,g.width=t.width,g.height=t.height,g.name=t.name;let v=g.height/2,y=v/(2.5+g.height/50),b=h.append(`g`),x=h.append(`g`),S=`M ${g.x},${g.y+v} + a ${y},${v} 0 0 0 0,${g.height} + h ${g.width-2*y} + a ${y},${v} 0 0 0 0,-${g.height} + Z + `;b.append(`path`).attr(`d`,S),x.append(`path`).attr(`d`,`M ${g.x},${g.y+v} + a ${y},${v} 0 0 0 0,${g.height}`),b.attr(`transform`,`translate(${y}, ${-(g.height/2)})`),x.attr(`transform`,`translate(${g.width-y}, ${-g.height/2})`),t.rectData=g,c===`neo`&&b.attr(`filter`,`url(#drop-shadow)`);let C=i.get(t.name)??0;if(U.has(l)&&(b.style(`stroke`,p[C%p.length]),b.style(`fill`,f[C%p.length]),x.style(`stroke`,p[C%p.length]),x.style(`fill`,f[C%p.length])),t.properties?.icon){let e=t.properties.icon.trim(),n=g.x+g.width-20,r=g.y+10;e.charAt(0)===`@`?j(h,n,r,e.substr(1)):k(h,n,r,e)}Y(n,u(t.description))(t.description,h,g.x,g.y,g.width,g.height,{class:`actor ${ie}`},n);let w=t.height,T=b.select(`path:last-child`);if(T.node()){let e=T.node().getBBox();t.height=e.height,w=e.height}return r||(h.attr(`data-et`,`participant`),h.attr(`data-type`,`queue`),h.attr(`data-id`,t.name)),w},`drawActorTypeQueue`),pe=t(function(e,t,n,r,i,a){let o=r?t.stopy:t.starty,s=t.x+t.width/2,c=o+75,{look:l,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m,actorBorder:h,actorBkg:g}=f,_=e.append(`g`).lower();r||(K++,_.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let v=e.append(`g`),y=H;y+=r?` ${V}`:` ${B}`,v.attr(`class`,y),v.attr(`name`,t.name);let b=M();b.x=t.x,b.y=o,b.fill=`#eaeaea`,b.width=t.width,b.height=t.height,b.class=`actor`;let x=t.x+t.width/2,S=o+32;v.append(`defs`).append(`marker`).attr(`id`,i+`-filled-head-control`).attr(`refX`,11).attr(`refY`,5.8).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`172.5`).attr(`stroke-width`,1.2).append(`path`).attr(`d`,`M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z`),v.append(`circle`).attr(`cx`,x).attr(`cy`,S).attr(`r`,22).attr(`filter`,`${l===`neo`?`url(#drop-shadow)`:``}`),v.append(`line`).attr(`marker-end`,`url(#`+i+`-filled-head-control)`).attr(`transform`,`translate(${x}, ${S-22})`);let C=a.get(t.name)??0;return U.has(d)?(v.style(`stroke`,m[C%m.length]),v.style(`fill`,p[C%m.length])):(v.style(`stroke`,h),v.style(`fill`,g)),t.height=v.node().getBBox().height+2*(n?.sequence?.labelBoxHeight??0),Y(n,u(t.description))(t.description,v,b.x,b.y+22+(r?5:12),b.width,b.height,{class:`actor ${H}`},n),r||(v.attr(`data-et`,`participant`),v.attr(`data-type`,`control`),v.attr(`data-id`,t.name)),t.height},`drawActorTypeControl`),me=t(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+75,{look:c,theme:l,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower(),h=e.append(`g`),g=`actor`;g+=r?` ${V}`:` ${B}`,h.attr(`class`,g),h.attr(`name`,t.name);let _=M();_.x=t.x,_.y=a,_.fill=`#eaeaea`,_.width=t.width,_.height=t.height,_.class=`actor`;let v=t.x+t.width/2,y=a+(r?10:25);h.append(`circle`).attr(`cx`,v).attr(`cy`,y).attr(`r`,22).attr(`width`,t.width).attr(`height`,t.height),h.append(`line`).attr(`x1`,v-22).attr(`x2`,v+22).attr(`y1`,y+22).attr(`y2`,y+22).attr(`stroke-width`,2),c===`neo`&&h.attr(`filter`,`url(#drop-shadow)`);let b=i.get(t.name)??0;return U.has(l)&&(h.style(`stroke`,p[b%p.length]),h.style(`fill`,f[b%p.length])),t.height=h.node().getBBox().height+(n?.sequence?.labelBoxHeight??0),r||(K++,m.append(`line`).attr(`id`,`actor`+K).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K),Y(n,u(t.description))(t.description,h,_.x,_.y+(r?15:30),_.width,_.height,{class:`actor ${H}`},n),r?h.attr(`transform`,`translate(0, 22)`):(h.attr(`transform`,`translate(0, 6)`),h.attr(`data-et`,`participant`),h.attr(`data-type`,`entity`),h.attr(`data-id`,t.name)),t.height},`drawActorTypeEntity`),he=t(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+t.height+2*n.boxTextMargin,{theme:c,themeVariables:l,look:d}=n,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=l,h=e.append(`g`).lower(),g=h;r||(K++,Object.keys(t.links||{}).length&&!n.forceMenus&&g.attr(`onclick`,oe(`actor${K}_popup`)).attr(`cursor`,`pointer`),g.append(`line`).attr(`id`,`actor`+K).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),g=h.append(`g`),t.actorCnt=K,t.links!=null&&g.attr(`id`,`root-`+K),d===`neo`&&g.attr(`data-look`,`neo`));let _=M(),v=`actor`;t.properties?.class?v=t.properties.class:_.fill=`#eaeaea`,v+=r?` ${V}`:` ${B}`,_.x=t.x,_.y=a,_.width=t.width,_.height=t.height,_.class=v,_.name=t.name,_.x=t.x,_.y=a;let y=_.width/3,b=_.width/3,x=y/2,S=x/(2.5+y/50),C=g.append(`g`);C.attr(`class`,v);let w=` + M ${_.x},${_.y+S} + a ${x},${S} 0 0 0 ${y},0 + a ${x},${S} 0 0 0 -${y},0 + l 0,${b-2*S} + a ${x},${S} 0 0 0 ${y},0 + l 0,-${b-2*S} +`;C.append(`path`).attr(`d`,w),d===`neo`&&C.attr(`filter`,`url(#drop-shadow)`);let T=i.get(t.name)??0;U.has(c)?(C.style(`stroke`,p[T%p.length]),C.style(`fill`,f[T%p.length])):C.style(`stroke`,m),C.attr(`transform`,`translate(${y}, ${S})`),t.rectData=_,Y(n,u(t.description))(t.description,g,_.x,_.y+35,_.width,_.height,{class:`actor ${ie}`},n);let E=C.select(`path:last-child`);return E.node()&&(t.height=E.node().getBBox().height+(n.sequence.labelBoxHeight??0)),r||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`database`),g.attr(`data-id`,t.name)),t.height},`drawActorTypeDatabase`),ge=t(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+80,c=e.append(`g`).lower(),{look:l,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m,actorBorder:h}=f;r||(K++,c.append(`line`).attr(`id`,`actor`+K).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let g=e.append(`g`),_=H;_+=r?` ${V}`:` ${B}`,g.attr(`class`,_),g.attr(`name`,t.name);let v=M();v.x=t.x,v.y=a,v.fill=`#eaeaea`,v.width=t.width,v.height=t.height,v.class=`actor`,g.append(`line`).attr(`id`,`actor-man-torso`+K).attr(`x1`,t.x+t.width/2-55).attr(`y1`,a+12).attr(`x2`,t.x+t.width/2-15).attr(`y2`,a+12),g.append(`line`).attr(`id`,`actor-man-arms`+K).attr(`x1`,t.x+t.width/2-55).attr(`y1`,a+2).attr(`x2`,t.x+t.width/2-55).attr(`y2`,a+22),g.append(`circle`).attr(`cx`,t.x+t.width/2).attr(`cy`,a+12).attr(`r`,22),l===`neo`&&g.attr(`filter`,`url(#drop-shadow)`);let y=i.get(t.name)??0;return U.has(d)?(g.style(`stroke`,m[y%m.length]),g.style(`fill`,p[y%m.length])):g.style(`stroke`,h),t.height=g.node().getBBox().height+(n.sequence.labelBoxHeight??0),Y(n,u(t.description))(t.description,g,v.x,v.y+15,v.width,v.height,{class:`actor ${H}`},n),g.attr(`transform`,`translate(0,21)`),r||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`boundary`),g.attr(`data-id`,t.name)),t.height},`drawActorTypeBoundary`),_e=t(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+80,{look:c,theme:l,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=d,h=e.append(`g`).lower();r||(K++,h.append(`line`).attr(`id`,`actor`+K).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let g=e.append(`g`),_=H;_+=r?` ${V}`:` ${B}`,g.attr(`class`,_),g.attr(`name`,t.name),r||g.attr(`data-et`,`participant`).attr(`data-type`,`actor`).attr(`data-id`,t.name);let v=c===`neo`?.5:1,y=c===`neo`?a+(1-v)*30:a;g.append(`line`).attr(`id`,`actor-man-torso`+K).attr(`x1`,o).attr(`y1`,y+25*v).attr(`x2`,o).attr(`y2`,y+45*v),g.append(`line`).attr(`id`,`actor-man-arms`+K).attr(`x1`,o-z/2*v).attr(`y1`,y+33*v).attr(`x2`,o+z/2*v).attr(`y2`,y+33*v),g.append(`line`).attr(`x1`,o-z/2*v).attr(`y1`,y+60*v).attr(`x2`,o).attr(`y2`,y+45*v),g.append(`line`).attr(`x1`,o).attr(`y1`,y+45*v).attr(`x2`,o+(z/2-2)*v).attr(`y2`,y+60*v);let b=g.append(`circle`);b.attr(`cx`,t.x+t.width/2),b.attr(`cy`,y+10*v),b.attr(`r`,15*v),b.attr(`width`,t.width*v),b.attr(`height`,t.height*v),t.height=g.node().getBBox().height;let x=M();x.x=t.x,x.y=y,x.fill=`#eaeaea`,x.width=t.width,x.height=t.height/v,x.class=`actor`,x.rx=3,x.ry=3;let S=i.get(t.name)??0;return U.has(l)?(g.style(`stroke`,p[S%p.length]),g.style(`fill`,f[S%p.length])):g.style(`stroke`,m),Y(n,u(t.description))(t.description,g,x.x,y+35*v-(c===`neo`?10:0),x.width,x.height,{class:`actor ${H}`},n),t.height},`drawActorTypeActor`),ve=t(async function(e,t,n,r,i,a,o){let s=o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]));switch(t.type){case`actor`:return await _e(e,t,n,r,s);case`participant`:return await ue(e,t,n,r,s);case`boundary`:return await ge(e,t,n,r,s);case`control`:return await pe(e,t,n,r,i,s);case`entity`:return await me(e,t,n,r,s);case`database`:return await he(e,t,n,r,s);case`collections`:return await de(e,t,n,r,s);case`queue`:return await fe(e,t,n,r,s)}},`drawActor`),ye=t(function(e,t,n){let r=e.append(`g`);Ce(r,t),t.name&&Y(n)(t.name,r,t.x,t.y+n.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:`text`},n),r.lower()},`drawBox`),be=t(function(e){return e.append(`g`)},`anchorElement`),xe=t(function(e,t,n,r,i,a,o){let{theme:s,themeVariables:c}=r,{bkgColorArray:l,borderColorArray:u,mainBkg:d}=c,f=M(),p=t.anchored,m=t.actor;f.x=t.startx,f.y=t.starty,f.class=`activation`+i%3,f.width=t.stopx-t.startx,f.height=n-t.starty;let h=W(p,f),g=(o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]))).get(m)??0;U.has(s)&&(h.style(`stroke`,u[g%u.length]),h.style(`fill`,l[g%u.length]??d))},`drawActivation`),Se=t(async function(e,n,r,i,a){let{boxMargin:o,boxTextMargin:s,labelBoxHeight:c,labelBoxWidth:l,messageFontFamily:d,messageFontSize:f,messageFontWeight:p}=i,m=e.append(`g`).attr(`data-et`,`control-structure`).attr(`data-id`,`i`+a.id),h=t(function(e,t,n,r){return m.append(`line`).attr(`x1`,e).attr(`y1`,t).attr(`x2`,n).attr(`y2`,r).attr(`class`,`loopLine`)},`drawLoopLine`);h(n.startx,n.starty,n.stopx,n.starty),h(n.stopx,n.starty,n.stopx,n.stopy),h(n.startx,n.stopy,n.stopx,n.stopy),h(n.startx,n.starty,n.startx,n.stopy),n.sections!==void 0&&n.sections.forEach(function(e){h(n.startx,e.y,n.stopx,e.y).style(`stroke-dasharray`,`3, 3`)});let g=O();g.text=r,g.x=n.startx,g.y=n.starty,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.anchor=`middle`,g.valign=`middle`,g.tspan=!1,g.width=Math.max(l??0,50),g.height=c+(i.look===`neo`?15:0)||20,g.textMargin=s,g.class=`labelText`,ce(m,g),g=Ae(),g.text=n.title,g.x=n.startx+l/2+(n.stopx-n.startx)/2,g.y=n.starty+o+s,g.anchor=`middle`,g.valign=`middle`,g.textMargin=s,g.class=`loopText`,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.wrap=!0;let _=u(g.text)?await se(m,g,n):G(m,g);if(n.sectionTitles!==void 0){for(let[e,t]of Object.entries(n.sectionTitles))if(t.message){g.text=t.message,g.x=n.startx+(n.stopx-n.startx)/2,g.y=n.sections[e].y+o+s,g.class=`sectionTitle`,g.anchor=`middle`,g.valign=`middle`,g.tspan=!1,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.wrap=n.wrap,u(g.text)?(n.starty=n.sections[e].y,await se(m,g,n)):G(m,g);let r=Math.round(_.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));n.sections[e].height+=r-(o+s)}}return n.height=Math.round(n.stopy-n.starty),m},`drawLoop`),Ce=t(function(e,t){A(e,t)},`drawBackgroundRect`),q=t(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-database`).attr(`fill-rule`,`evenodd`).attr(`clip-rule`,`evenodd`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z`)},`insertDatabaseIcon`),J=t(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-computer`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z`)},`insertComputerIcon`),we=t(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-clock`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z`)},`insertClockIcon`),Te=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,7.9).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M -1 0 L 10 5 L 0 10 z`)},`insertArrowHead`),Ee=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-filled-head`).attr(`refX`,15.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`insertArrowFilledHead`),De=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-sequencenumber`).attr(`refX`,15).attr(`refY`,15).attr(`markerWidth`,60).attr(`markerHeight`,40).attr(`orient`,`auto`).append(`circle`).attr(`cx`,15).attr(`cy`,15).attr(`r`,6)},`insertSequenceNumber`),Oe=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-crosshead`).attr(`markerWidth`,15).attr(`markerHeight`,8).attr(`orient`,`auto`).attr(`refX`,4).attr(`refY`,4.5).append(`path`).attr(`fill`,`none`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1pt`).attr(`d`,`M 1,2 L 6,7 M 6,2 L 1,7`)},`insertArrowCrossHead`),ke=t(function(e,t){let{theme:n}=t;e.append(`defs`).append(`filter`).attr(`id`,`drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${n===`redux`||n===`redux-color`?`#000000`:`#FFFFFF`}`)},`insertDropShadow`),Ae=t(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:`#666`,width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},`getTextObj`),je=t(function(){return{x:0,y:0,fill:`#EDF2AE`,stroke:`#666`,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),Y=(function(){function e(e,t,n,r,i,a,s){o(t.append(`text`).attr(`x`,n+i/2).attr(`y`,r+a/2+5).style(`text-anchor`,`middle`).text(e),s)}t(e,`byText`);function n(e,t,n,r,i,a,s,c){let{actorFontSize:l,actorFontFamily:u,actorFontWeight:d}=c,[f,p]=T(l),m=e.split(g.lineBreakRegex);for(let e=0;ee.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},`getHeight`),clear:t(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},`clear`),addBox:t(function(e){this.boxes.push(e)},`addBox`),addActor:t(function(e){this.actors.push(e)},`addActor`),addLoop:t(function(e){this.loops.push(e)},`addLoop`),addMessage:t(function(e){this.messages.push(e)},`addMessage`),addNote:t(function(e){this.notes.push(e)},`addNote`),lastActor:t(function(){return this.actors[this.actors.length-1]},`lastActor`),lastLoop:t(function(){return this.loops[this.loops.length-1]},`lastLoop`),lastMessage:t(function(){return this.messages[this.messages.length-1]},`lastMessage`),lastNote:t(function(){return this.notes[this.notes.length-1]},`lastNote`),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:t(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,qe(o())},`init`),updateVal:t(function(e,t,n,r){e[t]=e[t]===void 0?n:r(n,e[t])},`updateVal`),updateBounds:t(function(e,n,r,i){let a=this,o=0;function s(s){return t(function(t){o++;let c=a.sequenceItems.length-o+1;a.updateVal(t,`starty`,n-c*Z.boxMargin,Math.min),a.updateVal(t,`stopy`,i+c*Z.boxMargin,Math.max),a.updateVal(Q.data,`startx`,e-c*Z.boxMargin,Math.min),a.updateVal(Q.data,`stopx`,r+c*Z.boxMargin,Math.max),s!==`activation`&&(a.updateVal(t,`startx`,e-c*Z.boxMargin,Math.min),a.updateVal(t,`stopx`,r+c*Z.boxMargin,Math.max),a.updateVal(Q.data,`starty`,n-c*Z.boxMargin,Math.min),a.updateVal(Q.data,`stopy`,i+c*Z.boxMargin,Math.max))},`updateItemBounds`)}t(s,`updateFn`),this.sequenceItems.forEach(s()),this.activations.forEach(s(`activation`))},`updateBounds`),insert:t(function(e,t,n,r){let i=g.getMin(e,n),a=g.getMax(e,n),o=g.getMin(t,r),s=g.getMax(t,r);this.updateVal(Q.data,`startx`,i,Math.min),this.updateVal(Q.data,`starty`,o,Math.min),this.updateVal(Q.data,`stopx`,a,Math.max),this.updateVal(Q.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),newActivation:t(function(e,t,n){let r=n.get(e.from),i=Je(e.from).length||0,a=r.x+r.width/2+(i-1)*Z.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Z.activationWidth,stopy:void 0,actor:e.from,anchored:X.anchorElement(t)})},`newActivation`),endActivation:t(function(e){let t=this.activations.map(function(e){return e.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},`endActivation`),createLoop:t(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},`createLoop`),newLoop:t(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},`newLoop`),endLoop:t(function(){return this.sequenceItems.pop()},`endLoop`),isLoopOverlap:t(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},`isLoopOverlap`),addSectionToLoop:t(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:Q.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},`addSectionToLoop`),saveVerticalPos:t(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},`saveVerticalPos`),resetVerticalPos:t(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},`resetVerticalPos`),bumpVerticalPos:t(function(e){this.verticalPos+=e,this.data.stopy=g.getMax(this.data.stopy,this.verticalPos)},`bumpVerticalPos`),getVerticalPos:t(function(){return this.verticalPos},`getVerticalPos`),getBounds:t(function(){return{bounds:this.data,models:this.models}},`getBounds`)},Le=t(async function(e,t,n){Q.bumpVerticalPos(Z.boxMargin),t.height=Z.boxMargin,t.starty=Q.getVerticalPos();let r=M();r.x=t.startx,r.y=t.starty,r.width=t.width||Z.width,r.class=`note`;let i=e.append(`g`);i.attr(`data-et`,`note`),i.attr(`data-id`,`i`+n);let a=X.drawRect(i,r),o=O();o.x=t.startx,o.y=t.starty,o.width=r.width,o.dy=`1em`,o.text=t.message,o.class=`noteText`,o.fontFamily=Z.noteFontFamily,o.fontSize=Z.noteFontSize,o.fontWeight=Z.noteFontWeight,o.anchor=Z.noteAlign,o.textMargin=Z.noteMargin,o.valign=`center`;let s=u(o.text)?await se(i,o):G(i,o),c=Math.round(s.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));a.attr(`height`,c+2*Z.noteMargin),t.height+=c+2*Z.noteMargin,Q.bumpVerticalPos(c+2*Z.noteMargin),t.stopy=t.starty+c+2*Z.noteMargin,t.stopx=t.startx+r.width,Q.insert(t.startx,t.starty,t.stopx,t.stopy),Q.models.addNote(t)},`drawNote`),Re=t(function(e,n,r,i,a,o,s){let c=i.db.getActors(),l=c.get(n.from),u=c.get(n.to),d=r.sequenceVisible,f=l.x+l.width/2,p=u.x+u.width/2,m=f<=p,h=ot(n,i),g=e.append(`g`),_=t((e,t)=>{let n=e?16.5:-16.5;return t?-n:n},`getCircleOffset`),v=t(e=>{g.append(`circle`).attr(`cx`,e).attr(`cy`,s).attr(`r`,5).attr(`width`,10).attr(`height`,10)},`drawCircle`),{CENTRAL_CONNECTION:y,CENTRAL_CONNECTION_REVERSE:b,CENTRAL_CONNECTION_DUAL:x}=i.db.LINETYPE;if(d)switch(n.centralConnection){case y:h&&(p+=_(m,!0));break;case b:h||(f+=_(m,!1));break;case x:h?p+=_(m,!0):f+=_(m,!1)}switch(n.centralConnection){case y:v(p);break;case b:v(f);break;case x:v(f),v(p)}},`drawCentralConnection`),ze=t(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`),Be=t(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),`noteFont`),Ve=t(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),`actorFont`);async function He(e,t){Q.bumpVerticalPos(10);let{startx:n,stopx:r,message:i}=t,a=g.splitBreaks(i).length,s=u(i),c=s?await _(i,o()):E.calculateTextDimensions(i,ze(Z));if(!s){let e=c.height/a;t.height+=e,Q.bumpVerticalPos(e)}let l,d=c.height-10,f=c.width;if(n===r){l=Q.getVerticalPos()+d,Z.rightAngles||(d+=Z.boxMargin,l=Q.getVerticalPos()+d),d+=30;let e=g.getMax(f/2,Z.width/2);Q.insert(n-e,Q.getVerticalPos()-10+d,r+e,Q.getVerticalPos()+30+d)}else d+=Z.boxMargin,l=Q.getVerticalPos()+d,Q.insert(n,l-10,r,l);return Q.bumpVerticalPos(d),t.height+=d,t.stopy=t.starty+t.height,Q.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),l}t(He,`boundMessage`);var Ue=t(async function(e,t,n,r,a,o){let{startx:s,stopx:c,starty:l,message:d,type:f,sequenceIndex:p,sequenceVisible:m}=t,h=E.calculateTextDimensions(d,ze(Z)),_=O();_.x=Math.min(s,c),_.y=l+10,_.width=Math.abs(c-s),_.class=`messageText`,_.dy=`1em`,_.text=d,_.fontFamily=Z.messageFontFamily,_.fontSize=Z.messageFontSize,_.fontWeight=Z.messageFontWeight,_.anchor=Z.messageAlign,_.valign=`center`,_.textMargin=Z.wrapPadding,_.tspan=!1,u(_.text)?await se(e,_,{startx:s,stopx:c,starty:n}):G(e,_);let v=h.width,y;if(s===c){let i=m||Z.showSequenceNumbers,o=ot(a,r),l=st(a,r),u=s+(i&&(o||l)?10:0);y=Z.rightAngles?e.append(`path`).attr(`d`,`M ${u},${n} H ${s+g.getMax(Z.width/2,v/2)} V ${n+25} H ${s}`):e.append(`path`).attr(`d`,`M `+u+`,`+n+` C `+(u+60)+`,`+(n-10)+` `+(s+60)+`,`+(n+30)+` `+s+`,`+(n+20)),it(a,r)&&Re(e,a,t,r,s,c,n)}else y=e.append(`line`),y.attr(`x1`,s),y.attr(`y1`,n),y.attr(`x2`,c),y.attr(`y2`,n),it(a,r)&&Re(e,a,t,r,s,c,n);f===r.db.LINETYPE.DOTTED||f===r.db.LINETYPE.DOTTED_CROSS||f===r.db.LINETYPE.DOTTED_POINT||f===r.db.LINETYPE.DOTTED_OPEN||f===r.db.LINETYPE.BIDIRECTIONAL_DOTTED||f===r.db.LINETYPE.SOLID_TOP_DOTTED||f===r.db.LINETYPE.SOLID_BOTTOM_DOTTED||f===r.db.LINETYPE.STICK_TOP_DOTTED||f===r.db.LINETYPE.STICK_BOTTOM_DOTTED||f===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||f===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||f===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||f===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(y.style(`stroke-dasharray`,`3, 3`),y.attr(`class`,`messageLine1`)):y.attr(`class`,`messageLine0`),y.attr(`data-et`,`message`),y.attr(`data-id`,`i`+t.id),y.attr(`data-from`,t.from),y.attr(`data-to`,t.to);let b=``;if(Z.arrowMarkerAbsolute&&(b=i(!0)),y.attr(`stroke-width`,2),y.attr(`stroke`,`none`),y.style(`fill`,`none`),(f===r.db.LINETYPE.SOLID_TOP||f===r.db.LINETYPE.SOLID_TOP_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-solidTopArrowHead)`),(f===r.db.LINETYPE.SOLID_BOTTOM||f===r.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-solidBottomArrowHead)`),(f===r.db.LINETYPE.STICK_TOP||f===r.db.LINETYPE.STICK_TOP_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-stickTopArrowHead)`),(f===r.db.LINETYPE.STICK_BOTTOM||f===r.db.LINETYPE.STICK_BOTTOM_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-stickBottomArrowHead)`),(f===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||f===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-solidBottomArrowHead)`),(f===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||f===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-solidTopArrowHead)`),(f===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||f===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-stickBottomArrowHead)`),(f===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||f===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-stickTopArrowHead)`),(f===r.db.LINETYPE.SOLID||f===r.db.LINETYPE.DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-arrowhead)`),(f===r.db.LINETYPE.BIDIRECTIONAL_SOLID||f===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(y.attr(`marker-start`,`url(`+b+`#`+o+`-arrowhead)`),y.attr(`marker-end`,`url(`+b+`#`+o+`-arrowhead)`)),(f===r.db.LINETYPE.SOLID_POINT||f===r.db.LINETYPE.DOTTED_POINT)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-filled-head)`),(f===r.db.LINETYPE.SOLID_CROSS||f===r.db.LINETYPE.DOTTED_CROSS)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-crosshead)`),m||Z.showSequenceNumbers){let i=f===r.db.LINETYPE.BIDIRECTIONAL_SOLID||f===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,l=f===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||f===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||f===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||f===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||f===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||f===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||f===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||f===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,u=it(a,r),d=s,m=c;i?(ss?m=c-12:(m=c-6,d+=a?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||a?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),m+=u?15:0,y.attr(`x2`,m),y.attr(`x1`,d)):y.attr(`x1`,s+6);let h=0,g=s===c,_=s<=c;h=g?t.fromBounds+1:l?_?t.toBounds-1:t.fromBounds+1:_?t.fromBounds+1:t.toBounds-1;let v=`12px`,x=p.toString().length;x>5?v=`7px`:x>3&&(v=`9px`),e.append(`line`).attr(`x1`,h).attr(`y1`,n).attr(`x2`,h).attr(`y2`,n).attr(`stroke-width`,0).attr(`marker-start`,`url(`+b+`#`+o+`-sequencenumber)`),e.append(`text`).attr(`x`,h).attr(`y`,n+4).attr(`font-family`,`sans-serif`).attr(`font-size`,v).attr(`text-anchor`,`middle`).attr(`class`,`sequenceNumber`).text(p)}},`drawMessage`),We=t(function(e,t,n,r,i,a,o){let s=0,c=0,l,u=0;for(let e of r){let r=t.get(e),a=r.box;l&&l!=a&&(o||Q.models.addBox(l),c+=Z.boxMargin+l.margin),a&&a!=l&&(o||(a.x=s+c,a.y=i),c+=a.margin),r.width=g.getMax(r.width||Z.width,Z.width),r.height=g.getMax(r.height||Z.height,Z.height),r.margin=r.margin||Z.actorMargin,u=g.getMax(u,r.height),n.get(r.name)&&(c+=r.width/2),r.x=s+c,r.starty=Q.getVerticalPos(),Q.insert(r.x,i,r.x+r.width,r.height),s+=r.width+c,r.box&&(r.box.width=s+a.margin-r.box.x),c=r.margin,l=r.box,Q.models.addActor(r)}l&&!o&&Q.models.addBox(l),Q.bumpVerticalPos(u)},`addActorRenderingData`),Ge=t(async function(e,t,n,r,i,a,o){if(r){let r=0;Q.bumpVerticalPos(Z.boxMargin*2);for(let s of n){let n=t.get(s);n.stopy||=Q.getVerticalPos();let c=await X.drawActor(e,n,Z,!0,i,a,o);r=g.getMax(r,c)}Q.bumpVerticalPos(r+Z.boxMargin)}else for(let r of n){let n=t.get(r);await X.drawActor(e,n,Z,!1,i,a,o)}},`drawActors`),Ke=t(function(e,t,n,r){let i=0,a=0;for(let o of n){let n=t.get(o),s=$e(n),c=X.drawPopup(e,n,s,Z,Z.forceMenus,r);c.height>i&&(i=c.height),c.width+n.x>a&&(a=c.width+n.x)}return{maxHeight:i,maxWidth:a}},`drawActorsPopup`),qe=t(function(e){b(Z,e),e.fontFamily&&(Z.actorFontFamily=Z.noteFontFamily=Z.messageFontFamily=e.fontFamily),e.fontSize&&(Z.actorFontSize=Z.noteFontSize=Z.messageFontSize=e.fontSize),e.fontWeight&&(Z.actorFontWeight=Z.noteFontWeight=Z.messageFontWeight=e.fontWeight)},`setConf`),Je=t(function(e){return Q.activations.filter(function(t){return t.actor===e})},`actorActivations`),Ye=t(function(e,t){let n=t.get(e),r=Je(e);return[r.reduce(function(e,t){return g.getMin(e,t.startx)},n.x+n.width/2-1),r.reduce(function(e,t){return g.getMax(e,t.stopx)},n.x+n.width/2+1)]},`activationBounds`);function $(e,t,n,i,a){Q.bumpVerticalPos(n);let o=i;if(t.id&&t.message&&e[t.id]){let n=e[t.id].width,a=ze(Z);t.message=E.wrapLabel(`[${t.message}]`,n-2*Z.wrapPadding,a),t.width=n,t.wrap=!0;let s=E.calculateTextDimensions(t.message,a),c=g.getMax(s.height,Z.labelBoxHeight);o=i+c,r.debug(`${c} - ${t.message}`)}a(t),Q.bumpVerticalPos(o)}t($,`adjustLoopHeightForWrap`);function Xe(e,n,r,i,a,o,s){function c(t,r){t.x{e.add(t.from),e.add(t.to)}),x=x.filter(t=>e.has(t))}let D=new Map(x.map((e,t)=>[g.get(e)?.name??e,t]));We(h,g,_,x,0,S,!1);let O=await lt(S,g,E,s);X.insertArrowHead(h,i),X.insertArrowCrossHead(h,i),X.insertArrowFilledHead(h,i),X.insertSequenceNumber(h,i),X.insertSolidTopArrowHead(h,i),X.insertSolidBottomArrowHead(h,i),X.insertStickTopArrowHead(h,i),X.insertStickBottomArrowHead(h,i),u===`neo`&&X.insertDropShadow(h,Z);function k(e,t){let n=Q.endActivation(e);n.starty+18>t&&(n.starty=t-6,t+=12),X.drawActivation(h,n,t,Z,Je(e.from).length,s,D),Q.insert(n.startx,t-10,n.stopx,t)}t(k,`activeEnd`);let A=1,j=1,M=[],N=[],P=0;for(let e of S){let t,n,i;switch(e.type){case s.db.LINETYPE.NOTE:Q.resetVerticalPos(),n=e.noteModel,await Le(h,n,e.id);break;case s.db.LINETYPE.ACTIVE_START:Q.newActivation(e,h,g);break;case s.db.LINETYPE.CENTRAL_CONNECTION:Q.newActivation(e,h,g);break;case s.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:Q.newActivation(e,h,g);break;case s.db.LINETYPE.ACTIVE_END:k(e,Q.getVerticalPos());break;case s.db.LINETYPE.LOOP_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case s.db.LINETYPE.LOOP_END:t=Q.endLoop(),await X.drawLoop(h,t,`loop`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case s.db.LINETYPE.RECT_START:$(O,e,Z.boxMargin,Z.boxMargin,e=>{let t=e.message;t||=d?.rectBkgColor||d?.actorBkg||`rgba(128, 128, 128, 0.5)`,Q.newLoop(void 0,t)});break;case s.db.LINETYPE.RECT_END:t=Q.endLoop(),N.push(t),Q.models.addLoop(t),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos());break;case s.db.LINETYPE.OPT_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case s.db.LINETYPE.OPT_END:t=Q.endLoop(),await X.drawLoop(h,t,`opt`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case s.db.LINETYPE.ALT_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case s.db.LINETYPE.ALT_ELSE:$(O,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case s.db.LINETYPE.ALT_END:t=Q.endLoop(),await X.drawLoop(h,t,`alt`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e)),Q.saveVerticalPos();break;case s.db.LINETYPE.PAR_AND:$(O,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case s.db.LINETYPE.PAR_END:t=Q.endLoop(),await X.drawLoop(h,t,`par`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case s.db.LINETYPE.AUTONUMBER:A=e.message.start||A,j=e.message.step||j,e.message.visible?s.db.enableSequenceNumbers():s.db.disableSequenceNumbers();break;case s.db.LINETYPE.CRITICAL_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case s.db.LINETYPE.CRITICAL_OPTION:$(O,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case s.db.LINETYPE.CRITICAL_END:t=Q.endLoop(),await X.drawLoop(h,t,`critical`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case s.db.LINETYPE.BREAK_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case s.db.LINETYPE.BREAK_END:t=Q.endLoop(),await X.drawLoop(h,t,`break`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;default:try{i=e.msgModel,i.starty=Q.getVerticalPos(),i.sequenceIndex=A,i.sequenceVisible=s.db.showSequenceNumbers(),i.id=e.id,i.from=e.from,i.to=e.to;let t=await He(h,i);Xe(e,i,t,P,g,_,y),M.push({messageModel:i,lineStartY:t,msg:e}),Q.models.addMessage(i)}catch(e){r.error(`error while drawing message`,e)}}[s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.SOLID,s.db.LINETYPE.SOLID_TOP,s.db.LINETYPE.SOLID_BOTTOM,s.db.LINETYPE.STICK_TOP,s.db.LINETYPE.STICK_BOTTOM,s.db.LINETYPE.SOLID_TOP_DOTTED,s.db.LINETYPE.SOLID_BOTTOM_DOTTED,s.db.LINETYPE.STICK_TOP_DOTTED,s.db.LINETYPE.STICK_BOTTOM_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.DOTTED,s.db.LINETYPE.SOLID_CROSS,s.db.LINETYPE.DOTTED_CROSS,s.db.LINETYPE.SOLID_POINT,s.db.LINETYPE.DOTTED_POINT,s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(A=Math.round((A+j)*100)/100),P++}r.debug(`createdActors`,_),r.debug(`destroyedActors`,y),await Ge(h,g,x,!1,i,s,D);for(let e of M)await Ue(h,e.messageModel,e.lineStartY,s,e.msg,i);Z.mirrorActors&&await Ge(h,g,x,!0,i,s,D),N.forEach(e=>X.drawBackgroundRect(h,e)),le(h,g,x,Z);for(let e of Q.models.boxes){e.height=Q.getVerticalPos()-e.y,Q.insert(e.x,e.y,e.x+e.width,e.height);let t=Z.boxMargin*2;e.startx=e.x-t,e.starty=e.y-t*.25,e.stopx=e.startx+e.width+2*t,e.stopy=e.starty+e.height+t*.75,e.stroke=`rgb(0,0,0, 0.5)`,X.drawBox(h,e,Z)}w&&Q.bumpVerticalPos(Z.boxMargin);let F=Ke(h,g,x,m),{bounds:I}=Q.getBounds();I.startx===void 0&&(I.startx=0),I.starty===void 0&&(I.starty=0),I.stopx===void 0&&(I.stopx=0),I.stopy===void 0&&(I.stopy=0);let ee=I.stopy-I.starty;ee{let n=ze(Z),r=t.actorKeys.reduce((t,n)=>t+=e.get(n).width+(e.get(n).margin||0),0),a=Z.boxMargin*8;r+=a,r-=2*Z.boxTextMargin,t.wrap&&(t.name=E.wrapLabel(t.name,r-2*Z.wrapPadding,n));let o=E.calculateTextDimensions(t.name,n);i=g.getMax(o.height,i);let s=g.getMax(r,o.width+2*Z.wrapPadding);if(t.margin=Z.boxTextMargin,re.textMaxHeight=i),g.getMax(r,Z.height)}t(et,`calculateActorMargins`);var tt=t(async function(e,t,n){let i=t.get(e.from),a=t.get(e.to),s=i.x,c=a.x,l=e.wrap&&e.message,d=u(e.message)?await _(e.message,o()):E.calculateTextDimensions(l?E.wrapLabel(e.message,Z.width,Be(Z)):e.message,Be(Z)),f={width:l?Z.width:g.getMax(Z.width,d.width+2*Z.noteMargin),height:0,startx:i.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===n.db.PLACEMENT.RIGHTOF?(f.width=l?g.getMax(Z.width,d.width):g.getMax(i.width/2+a.width/2,d.width+2*Z.noteMargin),f.startx=s+(i.width+Z.actorMargin)/2):e.placement===n.db.PLACEMENT.LEFTOF?(f.width=l?g.getMax(Z.width,d.width+2*Z.noteMargin):g.getMax(i.width/2+a.width/2,d.width+2*Z.noteMargin),f.startx=s-f.width+(i.width-Z.actorMargin)/2):e.to===e.from?(d=E.calculateTextDimensions(l?E.wrapLabel(e.message,g.getMax(Z.width,i.width),Be(Z)):e.message,Be(Z)),f.width=l?g.getMax(Z.width,i.width):g.getMax(i.width,Z.width,d.width+2*Z.noteMargin),f.startx=s+(i.width-f.width)/2):(f.width=Math.abs(s+i.width/2-(c+a.width/2))+Z.actorMargin,f.startx=s2,m=t(e=>u?-e:e,`adjustValue`);e.from===e.to?f=d:(e.activate&&!p&&(f+=m(Z.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(f+=m(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(d-=m(3)));let h=[a,s,c,l],_=Math.abs(d-f);e.wrap&&e.message&&(e.message=E.wrapLabel(e.message,g.getMax(_+2*Z.wrapPadding,Z.width),ze(Z)));let v=E.calculateTextDimensions(e.message,ze(Z));return{width:g.getMax(e.wrap?0:v.width+2*Z.wrapPadding,_+2*Z.wrapPadding,Z.width),height:0,startx:d,stopx:f,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,h),toBounds:Math.max.apply(null,h)}},`buildMessageModel`),lt=t(async function(e,t,n,i){let a={},o=[],s,c,l;for(let n of e){switch(n.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:o.push({id:n.id,msg:n.message,from:2**53-1,to:-(2**53-1),width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:n.message&&(s=o.pop(),a[s.id]=s,a[n.id]=s,o.push(s));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:s=o.pop(),a[s.id]=s;break;case i.db.LINETYPE.ACTIVE_START:{let e=t.get(n.from?n.from:n.to.actor),r=Je(n.from?n.from:n.to.actor).length,i=e.x+e.width/2+(r-1)*Z.activationWidth/2,a={startx:i,stopx:i+Z.activationWidth,actor:n.from,enabled:!0};Q.activations.push(a)}break;case i.db.LINETYPE.ACTIVE_END:{let e=Q.activations.map(e=>e.actor).lastIndexOf(n.from);Q.activations.splice(e,1).splice(0,1)}}n.placement===void 0?(l=ct(n,t,i),n.msgModel=l,l.startx&&l.stopx&&o.length>0&&o.forEach(e=>{if(s=e,l.startx===l.stopx){let e=t.get(n.from),r=t.get(n.to);s.from=g.getMin(e.x-l.width/2,e.x-e.width/2,s.from),s.to=g.getMax(r.x+l.width/2,r.x+e.width/2,s.to),s.width=g.getMax(s.width,Math.abs(s.to-s.from))-Z.labelBoxWidth}else s.from=g.getMin(l.startx,s.from),s.to=g.getMax(l.stopx,s.to),s.width=g.getMax(s.width,l.width)-Z.labelBoxWidth})):(c=await tt(n,t,i),n.noteModel=c,o.forEach(e=>{s=e,s.from=g.getMin(s.from,c.startx),s.to=g.getMax(s.to,c.startx+c.width),s.width=g.getMax(s.width,Math.abs(s.from-s.to))-Z.labelBoxWidth}))}return Q.activations=[],r.debug(`Loop type widths:`,a),a},`calculateLoopBounds`),ut={parser:F,get db(){return new te},renderer:{bounds:Q,drawActors:Ge,drawActorsPopup:Ke,setConf:qe,draw:Ze},styles:ne,init:t(e=>{e.sequence||={},e.wrap&&(e.sequence.wrap=e.wrap,m({sequence:{wrap:e.wrap}}))},`init`)};export{ut as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/simulamet-BhBKFkpT.jpeg b/lecture-01/assets/simulamet-BhBKFkpT.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..5ed8243260fbccbd503f9c5430b2b1224848e778 Binary files /dev/null and b/lecture-01/assets/simulamet-BhBKFkpT.jpeg differ diff --git a/lecture-01/assets/sizeCapture-XSFMG7G3-DrCb_sCb.js b/lecture-01/assets/sizeCapture-XSFMG7G3-DrCb_sCb.js new file mode 100644 index 0000000000000000000000000000000000000000..fea1850bce62057400ca1c177c7968012601f9a3 --- /dev/null +++ b/lecture-01/assets/sizeCapture-XSFMG7G3-DrCb_sCb.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";var t=1;function n(){if(!(typeof globalThis>`u`))return globalThis}e(n,`getCaptureGlobal`);function r(){return!!n()?.mermaidCaptureSizes}e(r,`shouldCaptureSizes`);function i(){return typeof location>`u`?`browser-dev`:`${location.pathname}${location.search}`}e(i,`capturedFromLocation`);function a(e,t){let r=n();if(!r)return;let i=t.node(),a=((i&&`ownerSVGElement`in i?i.ownerSVGElement:null)??i)?.id??`(unknown)`;r.mermaidCapturedSizes??=[];let o={svgId:a,sizes:e};r.mermaidCapturedSizes.push(o),r.mermaidLastCapturedSizes=o}e(a,`emitCapturedSizes`);function o(e,n){let r=[];for(let e of n.nodes)e.isGroup||r.push({id:e.id,width:e.width??0,height:e.height??0});r.length!==0&&a({metadata:{captureVersion:t,capturedAt:new Date().toISOString(),capturedFrom:i()},nodes:r},e)}e(o,`captureNodeSizes`);export{o as captureNodeSizes}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/404-DBEk8rxH.js b/lecture-01/assets/slidev/404-DBEk8rxH.js new file mode 100644 index 0000000000000000000000000000000000000000..b43f6bfa821f9d39722799e0d864a5fabbb799f7 --- /dev/null +++ b/lecture-01/assets/slidev/404-DBEk8rxH.js @@ -0,0 +1 @@ +import{B as e,Ct as t,S as n,T as r,W as i,_ as a,b as o,et as s,g as c,v as l,y as u,yt as d}from"../modules/shiki-CJZsCeMT.js";import{t as f}from"../useNav-CGjBnVA8.js";import{t as p}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{B as m}from"../modules/vue-ClnAKIA7.js";var h={class:`grid justify-center text-center pt-15% gap-5`},g={class:`text-2xl`},_={class:`op-60`},v={class:`mt-3 flex flex-col gap-2 max-w-xs mx-auto w-full`},y=p(r({__name:`404`,setup(r){let p=/\d+/,{currentRoute:y}=m(),{total:b}=f(),x=c(()=>{let e=y.value.path.match(p);if(e){let t=+e[0];if(t>0&&t<=b.value)return t}return null});return(r,c)=>{let f=i(`RouterLink`);return e(),o(`div`,h,[a(`div`,null,[c[2]||=a(`h1`,{class:`text-9xl font-light`},` 404 `,-1),a(`p`,g,[c[0]||=n(` Page `,-1),a(`code`,_,t(d(y).path),1),c[1]||=n(` not found `,-1)])]),a(`div`,v,[x.value===1?u(`v-if`,!0):(e(),l(f,{key:0,to:`/`,class:`page-link`},{default:s(()=>[...c[3]||=[n(` Go Home `,-1)]]),_:1})),x.value?(e(),l(f,{key:1,to:`/${x.value}`,class:`page-link`},{default:s(()=>[n(` Go to Slide `+t(x.value),1)]),_:1},8,[`to`])):u(`v-if`,!0)])])}}}),[[`__scopeId`,`data-v-b584852f`]]);export{y as default}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/DrawingControls-B1ZvAJ65.js b/lecture-01/assets/slidev/DrawingControls-B1ZvAJ65.js new file mode 100644 index 0000000000000000000000000000000000000000..56da042f44d59b0ef010a2961bf38c77da9b0df8 --- /dev/null +++ b/lecture-01/assets/slidev/DrawingControls-B1ZvAJ65.js @@ -0,0 +1 @@ +import{n as e}from"../rolldown-runtime-hePW80VL.js";import{B as t,C as n,Ct as r,H as i,St as a,T as o,U as s,_ as c,b as l,bt as u,dt as d,et as f,l as p,m,r as h,tt as g,u as _,v,y,yt as b}from"../modules/shiki-CJZsCeMT.js";import{h as x,u as S}from"../modules/vue-ClnAKIA7.js";import{t as C}from"../useDrawings-aZNIHmMQ.js";import{t as w}from"./IconButton-BwA4p7Ax.js";import{t as T}from"./VerticalDivider-Bvc1MZzH.js";var E=o({__name:`Draggable`,props:{storageKey:{},initial:{}},setup(e){let n=e,r=d(null),i=n.initial??{x:0,y:0},o=n.storageKey?x(n.storageKey,i):d(i),{style:c}=S(r,{initialValue:o});return(e,n)=>(t(),l(`div`,{ref_key:`el`,ref:r,class:`fixed`,style:a(b(c))},[s(e.$slots,`default`)],4))}}),D={class:`flex bg-main p-2`},O={class:`inline-block w-7 text-center`},k={class:`pt-.5`},A={class:`i-carbon:pin-filled transform -rotate-45`},j={class:`i-carbon:pin`},M={class:`i-carbon:error`},N={class:`i-carbon:close-outline`},P=o({__name:`DrawingControls`,setup(e){let{brush:o,canClear:s,canRedo:x,canUndo:S,clear:P,drauu:F,drawingEnabled:I,drawingMode:L,drawingPinned:R,brushColors:z}=C(),B=d(!1);function V(e){e.preventDefault(),e.stopPropagation(),requestAnimationFrame(()=>{requestAnimationFrame(()=>{B.value=!0})})}function H(e){e.pointerType!==`mouse`&&V(e)}function U(){F.undo()}function W(){F.redo()}let G=`stylus`;function K(e){L.value=e,I.value=!0,e!==`eraseLine`&&(G=e)}function q(e){o.value.color=e,I.value=!0,L.value=G}return(e,d)=>b(I)||b(R)?(t(),v(E,{key:0,class:u([`flex flex-wrap text-xl p-2 gap-1 rounded-md bg-main shadow transition-opacity duration-200 z-nav border border-main`,!b(I)&&b(R)?`opacity-40 hover:opacity-90`:``]),"storage-key":`slidev-drawing-pos`,"initial-x":10,"initial-y":10},{default:f(()=>[n(w,{title:`Draw with stylus`,class:u({shallow:b(L)!==`stylus`}),onClick:d[0]||=e=>K(`stylus`)},{default:f(()=>[...d[14]||=[c(`div`,{class:`i-carbon:pen`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Draw a line`,class:u({shallow:b(L)!==`line`}),onClick:d[1]||=e=>K(`line`)},{default:f(()=>[...d[15]||=[c(`svg`,{width:`1em`,height:`1em`,class:`-mt-0.5`,preserveAspectRatio:`xMidYMid meet`,viewBox:`0 0 24 24`},[c(`path`,{d:`M21.71 3.29a1 1 0 0 0-1.42 0l-18 18a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l18-18a1 1 0 0 0 0-1.42z`,fill:`currentColor`})],-1)]]),_:1},8,[`class`]),n(w,{title:`Draw an arrow`,class:u({shallow:b(L)!==`arrow`}),onClick:d[2]||=e=>K(`arrow`)},{default:f(()=>[...d[16]||=[c(`div`,{class:`i-carbon:arrow-up-right`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Draw an ellipse`,class:u({shallow:b(L)!==`ellipse`}),onClick:d[3]||=e=>K(`ellipse`)},{default:f(()=>[...d[17]||=[c(`div`,{class:`i-carbon:radio-button`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Draw a rectangle`,class:u({shallow:b(L)!==`rectangle`}),onClick:d[4]||=e=>K(`rectangle`)},{default:f(()=>[...d[18]||=[c(`div`,{class:`i-carbon:checkbox`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Erase`,class:u({shallow:b(L)!==`eraseLine`}),onClick:d[5]||=e=>K(`eraseLine`)},{default:f(()=>[...d[19]||=[c(`div`,{class:`i-carbon:erase`},null,-1)]]),_:1},8,[`class`]),n(T),n(b(h),{shown:B.value,"onUpdate:shown":d[8]||=e=>B.value=e,triggers:[]},{popper:f(()=>[c(`div`,D,[c(`div`,O,r(b(o).size),1),c(`div`,k,[g(c(`input`,{"onUpdate:modelValue":d[6]||=e=>b(o).size=e,type:`range`,min:`1`,max:`15`,onChange:d[7]||=e=>L.value=b(G)},null,544),[[p,b(o).size]])])])]),default:f(()=>[n(w,{title:`Adjust stroke width`,class:u({shallow:b(L)===`eraseLine`}),onClick:V,onPointerdown:H,onPointerup:H,onTouchend:V},{default:f(()=>[...d[20]||=[c(`svg`,{viewBox:`0 0 32 32`,width:`1.2em`,height:`1.2em`},[c(`line`,{x1:`2`,y1:`15`,x2:`22`,y2:`4`,stroke:`currentColor`,"stroke-width":`1`,"stroke-linecap":`round`}),c(`line`,{x1:`2`,y1:`24`,x2:`28`,y2:`10`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`}),c(`line`,{x1:`7`,y1:`31`,x2:`29`,y2:`19`,stroke:`currentColor`,"stroke-width":`3`,"stroke-linecap":`round`})],-1)]]),_:1},8,[`class`])]),_:1},8,[`shown`]),(t(!0),l(m,null,i(b(z),e=>(t(),v(w,{key:e,title:`Set brush color`,class:u(b(o).color===e&&b(L)!==`eraseLine`?`active`:`shallow`),onClick:t=>q(e)},{default:f(()=>[c(`div`,{class:u([`w-6 h-6 transition-all transform border`,b(o).color===e?`rounded-md border-gray-300/50`:`rounded-1/2 scale-85 border-white`]),style:a(b(I)?{background:e}:{borderColor:e})},null,6)]),_:2},1032,[`class`,`onClick`]))),128)),n(T),n(w,{title:`Undo`,class:u({disabled:!b(S)}),onClick:d[9]||=e=>U()},{default:f(()=>[...d[21]||=[c(`div`,{class:`i-carbon:undo`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Redo`,class:u({disabled:!b(x)}),onClick:d[10]||=e=>W()},{default:f(()=>[...d[22]||=[c(`div`,{class:`i-carbon:redo`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Delete`,class:u({disabled:!b(s)}),onClick:d[11]||=e=>b(P)()},{default:f(()=>[...d[23]||=[c(`div`,{class:`i-carbon:trash-can`},null,-1)]]),_:1},8,[`class`]),n(T),n(w,{title:b(R)?`Unpin drawing`:`Pin drawing`,class:u({shallow:!b(R)}),onClick:d[12]||=e=>R.value=!b(R)},{default:f(()=>[g(c(`div`,A,null,512),[[_,b(R)]]),g(c(`div`,j,null,512),[[_,!b(R)]])]),_:1},8,[`title`,`class`]),b(I)?(t(),v(w,{key:0,title:b(R)?`Drawing pinned`:`Drawing unpinned`,class:u({shallow:!b(I)}),onClick:d[13]||=e=>I.value=!b(I)},{default:f(()=>[g(c(`div`,M,null,512),[[_,b(R)]]),g(c(`div`,N,null,512),[[_,!b(R)]])]),_:1},8,[`title`,`class`])):y(`v-if`,!0)]),_:1},8,[`class`])):y(`v-if`,!0)}}),F=e({default:()=>I}),I=P;export{F as n,I as t}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/DrawingLayer-kvJBPGC2.js b/lecture-01/assets/slidev/DrawingLayer-kvJBPGC2.js new file mode 100644 index 0000000000000000000000000000000000000000..c0d662482e84bd9eb2a1552598edd1cf25b2ad63 --- /dev/null +++ b/lecture-01/assets/slidev/DrawingLayer-kvJBPGC2.js @@ -0,0 +1 @@ +import{B as e,I as t,R as n,T as r,Z as i,b as a,bt as o,dt as s,yt as c}from"../modules/shiki-CJZsCeMT.js";import{n as l}from"./context-C6dxaFaS.js";import{t as u}from"../useDrawings-aZNIHmMQ.js";var d=r({__name:`DrawingLayer`,setup(r){let{drauu:d,drawingEnabled:f,loadCanvas:p}=u(),m=l().$scale,h=s();return n(()=>{d.mount(h.value,h.value.parentElement),i(m,e=>d.options.coordinateScale=1/e,{immediate:!0}),p()}),t(()=>{d.unmount()}),(t,n)=>(e(),a(`svg`,{ref_key:`svg`,ref:h,class:o([`w-full h-full absolute top-0`,{"pointer-events-none":!c(f),"touch-none":c(f)}])},null,2))}});export{d as default}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/IconButton-BwA4p7Ax.js b/lecture-01/assets/slidev/IconButton-BwA4p7Ax.js new file mode 100644 index 0000000000000000000000000000000000000000..2fbf02259081003a9351e7e5ee3213762a65f648 --- /dev/null +++ b/lecture-01/assets/slidev/IconButton-BwA4p7Ax.js @@ -0,0 +1 @@ +import{B as e,Ct as t,K as n,T as r,U as i,_ as a,bt as o,et as s,g as c,v as l}from"../modules/shiki-CJZsCeMT.js";var u={class:`sr-only`},d=r({__name:`IconButton`,props:{title:{},icon:{},as:{},to:{},disabled:{type:Boolean},active:{type:Boolean}},setup(r){let d=r,f=c(()=>d.as||(d.to?`router-link`:`button`));return(c,d)=>(e(),l(n(f.value),{class:o([`slidev-icon-btn`,{disabled:r.disabled,active:r.active}]),title:r.title,to:r.to},{default:s(()=>[a(`span`,u,t(r.title),1),i(c.$slots,`default`,{},()=>[a(`div`,{class:o(r.icon)},null,2)])]),_:3},8,[`class`,`title`,`to`]))}});export{d as t}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/Modal-cvUjgiyd.js b/lecture-01/assets/slidev/Modal-cvUjgiyd.js new file mode 100644 index 0000000000000000000000000000000000000000..b19f0513a547f4f352d3defb50974faf2361deae --- /dev/null +++ b/lecture-01/assets/slidev/Modal-cvUjgiyd.js @@ -0,0 +1 @@ +import{B as e,T as t,U as n,_ as r,b as i,bt as a,h as o,v as s,y as c,yt as l}from"../modules/shiki-CJZsCeMT.js";import{S as u}from"../modules/vue-ClnAKIA7.js";var d={key:0,class:`fixed top-0 bottom-0 left-0 right-0 grid z-modal`},f=t({__name:`Modal`,props:{modelValue:{default:!1},class:{default:``}},emits:[`update:modelValue`],setup(t,{emit:f}){let p=t,m=u(p,`modelValue`,f);function h(){m.value=!1}return(t,u)=>(e(),s(o,null,[l(m)?(e(),i(`div`,d,[r(`div`,{bg:`black opacity-80`,class:`absolute top-0 bottom-0 left-0 right-0 -z-1`,onClick:u[0]||=e=>h()}),r(`div`,{class:a([`m-auto rounded-md bg-main shadow`,p.class]),"dark:border":`~ main`},[n(t.$slots,`default`)],2)])):c(`v-if`,!0)],1024))}});export{f as t}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/NoteDisplay-CBOFmNF_.js b/lecture-01/assets/slidev/NoteDisplay-CBOFmNF_.js new file mode 100644 index 0000000000000000000000000000000000000000..031c9bee3f17c11ad722e7a801639c8885507bf6 --- /dev/null +++ b/lecture-01/assets/slidev/NoteDisplay-CBOFmNF_.js @@ -0,0 +1 @@ +import{B as e,Ct as t,H as n,P as r,Q as i,R as a,St as o,T as s,Z as c,_ as l,b as u,bt as d,dt as f,g as p,m,ot as h,y as g,yt as _}from"../modules/shiki-CJZsCeMT.js";import{et as v,rt as y}from"../useNav-CGjBnVA8.js";import{l as b}from"./context-C6dxaFaS.js";var x=[`title`],S={key:0,"flex-auto":``},C={"text-primary":``},w={op50:``,"text-sm":``},T={key:0,absolute:``,"inset-y-0":``,"right-0":``,"w-0.5":``,"bg-primary":``,"z-1":``},E=s({__name:`ClicksSlider`,props:{clicksContext:{},readonly:{type:Boolean},active:{type:Boolean,default:!0},resettable:{type:Boolean},compact:{type:Boolean},attached:{type:Boolean}},emits:[`activate`,`reset`],setup(r,{emit:i}){let a=r,s=i,c=p(()=>a.clicksContext.total),E=p(()=>v(0,a.clicksContext.clicksStart,c.value)),D=p(()=>c.value-E.value+1),O=p({get(){return a.resettable&&!a.active||a.clicksContext.current>c.value?-1:a.clicksContext.current},set(e){if(a.resettable&&e<0){s(`reset`),a.clicksContext.current=b;return}s(`activate`),a.clicksContext.current=e}}),k=p(()=>a.resettable&&O.value<0),A=p(()=>y(E.value,c.value+1)),j=f(),M;function N(e){let t=j.value.getBoundingClientRect();return(e.clientX-t.left)/Math.max(1,t.width)}function P(e,t){if(a.readonly||!j.value||!t&&!(e.buttons&1))return;let n=N(e);if(a.resettable&&n<0){O.value=-1;return}let r=v(0,n,t?.999999:1)*D.value,i=v(0,O.value-E.value,D.value-1),o=t?E.value+Math.floor(r):O.value;!t&&r>=i+1.5?o=E.value+Math.floor(r-.5):!t&&r(e(),u(`div`,{class:d([`flex gap-1 select-none`,[r.attached?`items-end`:`items-center`,D.value&&a.clicksContext.isMounted?``:`op50`]]),title:`Clicks in this slide: ${D.value}`},[l(`div`,{class:d([`flex items-center font-mono`,[r.compact?`gap-1 min-w-0 mr0`:`gap-0.2 min-w-16 mr1`,r.attached?`h-[22px]`:``]])},[l(`div`,{class:d([`i-carbon:cursor-1 text-sm op50`,r.compact?`ml-1`:``])},null,2),O.value>=0&&O.value!==_(999999)&&r.active?(e(),u(m,{key:0},[r.compact?g(`v-if`,!0):(e(),u(`div`,S)),l(`span`,null,[l(`span`,C,t(O.value),1),s[2]||=l(`span`,{op25:``,"text-sm":``},`/`,-1),l(`span`,w,t(c.value),1)])],64)):(e(),u(`div`,{key:1,op50:``,class:d(r.compact?``:`flex-auto pl1`)},[l(`span`,{class:d(r.compact?`inline-block text-center`:``),style:o(r.compact?{width:`${String(c.value).length*2+1}ch`,marginLeft:`-0.25ch`}:void 0)},t(c.value),7)],2))],2),l(`div`,{ref_key:`sliderEl`,ref:j,relative:``,"flex-auto":``,"font-mono":``,flex:`~`,"touch-none":``,class:d([r.attached?`h-[22px]`:`h5`,k.value?`op80`:``]),onPointerdownCapture:F,onPointermove:I,onPointerup:s[0]||=e=>h(M)?M.value=void 0:M=void 0,onPointercancel:s[1]||=e=>h(M)?M.value=void 0:M=void 0},[(e(!0),u(m,null,n(A.value,n=>(e(),u(`div`,{key:n,border:`y main`,"of-hidden":``,relative:``,class:d([n===0?`border-l`:``,n===0?r.attached?`rounded-tl`:`rounded-l`:``,n===c.value?`border-r`:``,n===c.value&&+n!=+O.value?r.attached?`rounded-tr`:`rounded-r`:``,r.attached?`border-b-0`:``]),style:o({width:D.value>0?`${1/D.value*100}%`:`100%`})},[l(`div`,{absolute:``,"inset-0":``,class:d(n<=O.value&&r.active?`bg-primary op15`:``)},null,2),+n==+O.value&&r.active?(e(),u(`div`,T)):g(`v-if`,!0),l(`div`,{class:d([+n==+O.value&&r.active?`text-primary font-bold op100`:`op30`,n===c.value?``:`border-r-2 border-main`]),"w-full":``,"h-full":``,"text-xs":``,flex:``,"items-center":``,"justify-center":``,"z-1":``},t(n),3)],6))),128))],34)],10,x))}}),D=[`innerHTML`],O=[`textContent`],k=[`textContent`],A=`slidev-note-fade`,j=`slidev-note-click-mark`,M=s({__name:`NoteDisplay`,props:{class:{},noteHtml:{},note:{},highlight:{type:Boolean,default:!0},placeholder:{},clicksContext:{},autoScroll:{type:Boolean}},emits:[`markerDblclick`,`markerClick`],setup(n,{emit:o}){let s=n,m=o,h=p(()=>s.clicksContext!=null&&s.noteHtml?.includes(j)),g=f(null);function _(){if(!g.value||!h.value)return;let e=Array.from(g.value.querySelectorAll(`.${j}`)),t=new Map,n=new Map,r=0;for(let i of e){let e=Number(i.dataset.clicks);t.set(i,e);let a=i,o=i.parentElement;for(;o&&a!==g.value;)n.has(o)||n.set(o,[[null,r]]),n.get(o).push([a,e]),a=o,o=o.parentElement;r=e}let i=new Map;for(let[e,t]of n){let n=!1,r=0;for(let a of Array.from(e.childNodes)){let o=!1;for(;a===t[r+1]?.[0];)o=!0,r++;if(o)continue;let s=a;if(a.nodeType===3){if(!a.textContent?.trim())continue;s=document.createElement(`span`),s.textContent=a.textContent,e.insertBefore(s,a),a.remove()}n||=r===0,i.set(s,t[r][1])}n||(t[0][1]=-1)}return e=>{let r=s.highlight;for(let[t,i]of n)t.classList.toggle(A,r&&!i.some(([t,n])=>n===e));for(let[t,n]of i)t.classList.toggle(A,r&&n!==e);for(let[n,i]of t)n.classList.remove(A),n.classList.toggle(`${j}-past`,r&&ie+1),n.ondblclick=e=>{r&&(m(`markerDblclick`,e,i),!e.defaultPrevented&&(s.clicksContext.current=i,e.stopPropagation(),e.stopImmediatePropagation()))},n.onclick=e=>{r&&m(`markerClick`,e,i)},r&&s.autoScroll&&i===e&&n.scrollIntoView({block:`center`,behavior:`smooth`})}}let v=f();return c(()=>[s.noteHtml,s.highlight],()=>{r(()=>{v.value=_()})},{immediate:!0}),a(()=>{_()}),i(()=>{let e=s.clicksContext?.current??999999;v.value?.(e)}),(r,i)=>n.noteHtml?(e(),u(`div`,{key:0,ref_key:`noteDisplay`,ref:g,class:d([`prose dark:prose-invert overflow-auto outline-none slidev-note`,[s.class,h.value?`slidev-note-with-clicks`:``]]),innerHTML:n.noteHtml},null,10,D)):n.note?(e(),u(`div`,{key:1,class:d([`prose dark:prose-invert overflow-auto outline-none slidev-note`,s.class])},[l(`p`,{textContent:t(n.note)},null,8,O)],2)):(e(),u(`div`,{key:2,class:d([`prose dark:prose-invert overflow-auto outline-none opacity-50 italic select-none slidev-note`,s.class])},[l(`p`,{textContent:t(s.placeholder||`No notes.`)},null,8,k)],2))}});export{E as n,M as t}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/NoteEditable-Ca89u0zd.js b/lecture-01/assets/slidev/NoteEditable-Ca89u0zd.js new file mode 100644 index 0000000000000000000000000000000000000000..7b87e16db2ed88fa68c1701d65248e0522aeacc9 --- /dev/null +++ b/lecture-01/assets/slidev/NoteEditable-Ca89u0zd.js @@ -0,0 +1 @@ +import{B as e,P as t,Q as n,St as r,T as i,Z as a,b as o,bt as s,d as c,dt as l,gt as u,l as d,tt as f,v as p,yt as m}from"../modules/shiki-CJZsCeMT.js";import{O as h,S as g,o as _}from"../modules/vue-ClnAKIA7.js";import{t as v}from"../index-DOePylYH.js";import{t as y}from"./NoteDisplay-CBOFmNF_.js";var b=[`placeholder`],x=i({__name:`NoteEditable`,props:{no:{type:Number,required:!0},class:{default:``},editing:{default:!1},style:{default:()=>({})},placeholder:{default:`No notes for this slide`},clicksContext:{type:Object},highlight:{default:!0},autoHeight:{default:!1}},emits:[`update:editing`,`markerDblclick`,`markerClick`],setup(i,{emit:x}){let S=i,C=x,w=g(S,`editing`,C,{passive:!0}),{info:T,update:E}=v(u(S,`no`)),D=l(``),O,{ignoreUpdates:k}=h(D,e=>{if(!w.value)return;let t=S.no;clearTimeout(O),O=setTimeout(()=>{E({note:e},t)},500)});a(()=>T.value?.note,(e=``)=>{w.value||(clearTimeout(O),k(()=>{D.value=e}))},{immediate:!0,flush:`sync`});let A=l(),j=l();n(()=>{w.value&&A.value?.focus()}),_(A,()=>{w.value=!1});function M(){!S.autoHeight||!A.value||!w.value||A.value.scrollHeight>A.value.clientHeight&&(A.value.style.height=`${A.value.scrollHeight}px`)}function N(e){w.value&&e.metaKey&&e.key===`s`&&(e.preventDefault(),E({note:D.value},S.no))}return a([D,w],()=>{t(()=>{M()})},{flush:`post`,immediate:!0}),(t,n)=>m(w)?f((e(),o(`textarea`,{key:1,ref_key:`inputEl`,ref:A,"onUpdate:modelValue":n[2]||=e=>D.value=e,class:s([`prose dark:prose-invert resize-none overflow-auto outline-none bg-transparent block border-primary border-2 slidev-note placeholder:op25`,[S.class,D.value?``:`italic`]]),style:r([S.style,j.value==null?{}:{height:`${j.value}px`}]),placeholder:i.placeholder,onKeydown:[n[3]||=c(e=>w.value=!1,[`esc`]),N]},null,46,b)),[[d,D.value]]):(e(),p(y,{key:0,class:s([`border-transparent border-2`,[S.class,D.value?``:`opacity-25 italic select-none`]]),style:r(S.style),note:D.value||i.placeholder,"note-html":m(T)?.noteHTML,"clicks-context":i.clicksContext,"auto-scroll":!i.autoHeight,highlight:S.highlight,onMarkerClick:n[0]||=(e,t)=>C(`markerClick`,e,t),onMarkerDblclick:n[1]||=(e,t)=>C(`markerDblclick`,e,t)},null,8,[`class`,`style`,`note`,`note-html`,`clicks-context`,`auto-scroll`,`highlight`]))}});export{x as t}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/TimerBar-C_NwmFId.js b/lecture-01/assets/slidev/TimerBar-C_NwmFId.js new file mode 100644 index 0000000000000000000000000000000000000000..bf9265be578a4b45c610184f849c712d25ba384e --- /dev/null +++ b/lecture-01/assets/slidev/TimerBar-C_NwmFId.js @@ -0,0 +1 @@ +import{B as e,C as t,H as n,St as r,T as i,a,b as o,bt as s,et as c,g as l,gt as u,lt as d,m as f,y as p,yt as m}from"../modules/shiki-CJZsCeMT.js";import{$ as h,H as g,t as _}from"../useNav-CGjBnVA8.js";import{P as v}from"../modules/vue-ClnAKIA7.js";import{o as y}from"../index-DOePylYH.js";var b={class:`relative flex gap-px`},x=i({__name:`CurrentProgressBar`,props:{clicksContext:{},current:{}},setup(i){let u=i,d=_(),h=l(()=>u.clicksContext??d.clicksContext.value),g=l(()=>u.current??d.currentSlideNo.value),{total:v}=d;return(i,l)=>(e(),o(`div`,b,[(e(!0),o(f,null,n(m(v)-1,n=>(e(),o(`div`,{key:n,class:s([`border-x border-b border-main h-4px transition-all`,n[n===g.value?(e(),o(`div`,{key:0,class:`h-full bg-primary op75 transition-all`,style:r({width:`${h.value.total===0?0:h.value.current/(h.value.total+1)*100}%`})},null,4)):p(`v-if`,!0)]),_:2},1024)],6))),128))]))}});function S(){let e=l(()=>h.timer||`stopwatch`),t=l(()=>g(h.duration).seconds),n=v(100,{controls:!0}),r=u(y,`timer`),i=l(()=>r.value?.status),a=l(()=>(n.counter.value,r.value.status===`stopped`||!r.value.startedAt?0:r.value.status===`paused`?r.value.pausedAt-r.value.startedAt:Date.now()-r.value.startedAt)),o=l(()=>a.value/1e3),s=l(()=>o.value/t.value*100),c=l(()=>{if(e.value===`stopwatch`&&(r.value.status===`stopped`||!r.value.startedAt))return{h:``,m:`-`,s:`--`,ms:`-`};let n=e.value===`countdown`?t.value*1e3-a.value:a.value,i=Math.floor(n/1e3/60/60).toString();i===`0`&&(i=``);let o=Math.floor(n/1e3/60%60).toString();i&&(o=o.padStart(2,`0`));let s=Math.floor(n/1e3%60).toString().padStart(2,`0`),c=Math.floor(n%1e3/100).toString();return{h:i,m:o,s,ms:c}});function d(){n.pause(),r.value={status:`stopped`,slides:{},startedAt:0,pausedAt:0}}function f(){r.value&&(r.value?.status===`stopped`?(r.value.status=`running`,r.value.startedAt=Date.now()):r.value.status===`paused`&&(r.value.status=`running`,r.value.startedAt=Date.now()-(r.value.pausedAt-r.value.startedAt)),n.resume())}function p(){r.value.status=`paused`,r.value.pausedAt=Date.now(),n.pause()}function m(){r.value.status===`running`?p():f()}return{state:r,status:i,timer:c,reset:d,toggle:m,resume:f,pause:p,passed:o,percentage:s,duration:t,mode:e}}var C={class:`border-b mt-px border-main relative flex h-4px`},w=i({__name:`TimerBar`,setup(t){let n=d(S()),i=l(()=>n.status===`stopped`?`op50`:n.status===`paused`?`bg-blue`:n.percentage>100?`bg-red`:n.percentage>80?`bg-yellow`:`bg-green`);return(t,a)=>(e(),o(`div`,C,[n.status===`stopped`?p(`v-if`,!0):(e(),o(`div`,{key:0,class:s([`h-4px`,i.value]),style:r({width:`${n.percentage}%`})},null,6)),p(` {{ timesplits }} `)]))}});export{S as n,x as r,w as t}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/VClicks-XVjwUv_k.js b/lecture-01/assets/slidev/VClicks-XVjwUv_k.js new file mode 100644 index 0000000000000000000000000000000000000000..0c0ef57dce5cc63bd9fec9df32ab0cbfbcf94d3d --- /dev/null +++ b/lecture-01/assets/slidev/VClicks-XVjwUv_k.js @@ -0,0 +1 @@ +import{B as e,C as t,G as n,O as r,R as i,T as a,j as o,m as s,p as c,tt as l,v as u,z as d}from"../modules/shiki-CJZsCeMT.js";import{G as f,it as p}from"../useNav-CGjBnVA8.js";import{n as m}from"./context-C6dxaFaS.js";import{u as h}from"../index-DOePylYH.js";var g=a({__name:`VClickGap`,props:{size:{type:[String,Number],default:1}},setup(t){let n=t,{$clicksContext:r}=m(),a=h(),o=+n.size;return Number.isNaN(o)&&(console.warn(`[slidev] Invalid size for VClickGap: ${n.size}`),o=1),i(()=>{let e=r.currentOffset+o-1;r.register(a,{max:e,delta:o})}),d(()=>{r.unregister(a)}),(t,n)=>(e(),u(s))}}),_=[`ul`,`ol`],v=/[\s,]+/,y=a({props:{depth:{type:[Number,String],default:1},every:{type:[Number,String],default:1},at:{type:[Number,String],default:`+1`},hide:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},animation:{type:[String,Array],default:void 0},handleSpecialElements:{type:Boolean,default:!0}},render(){let e=+this.every,i=f(this.at),a=typeof i==`string`,s=this.$slots.default?.();if(i==null||!s)return s;let u=n(`click`),d=(e,t)=>{let n={hide:this.hide};return typeof this.animation==`string`?this.animation.split(v).forEach(e=>{e&&(n[e]=!0)}):Array.isArray(this.animation)&&this.animation.forEach(e=>n[e]=!0),this.fade&&(n.fade=!0),l(e,[[u,t,``,n]])},m=e=>e.flatMap(e=>o(e)&&typeof e.type==`symbol`&&Array.isArray(e.children)?m(e.children):[e]);s=m(p(s));let h=(e,t=1)=>m(e).map(e=>{if(!o(e))return e;if(_.includes(e.type)&&Array.isArray(e.children)){let n=x(e.children,t+1);return r(e,{},n)}return r(e)}),y=1,b=0,x=(t,n=1)=>m(t).map(t=>{if(!o(t)||t.type===c)return t;let s=+i+Math.ceil(y++/e)-1,l;l=n<+this.depth&&Array.isArray(t.children)?r(t,{},h(t.children,n)):r(t);let u=s-b;return b=s,d(l,a?u>=0?`+${u}`:`${u}`:s)}),S=()=>t(g,{size:+i+Math.ceil((y-1)/e)-1-b});if(this.handleSpecialElements){if(s.length===1&&_.includes(s[0].type)&&Array.isArray(s[0].children))return r(s[0],{},[...x(s[0].children),S()]);if(s.length===1&&s[0].type===`table`){let e=s[0];if(Array.isArray(e.children))return r(e,{},e.children.map(e=>o(e)?e.type===`tbody`&&Array.isArray(e.children)?r(e,{},[...x(e.children),S()]):r(e):e))}}return[...x(s),S()]}});export{y as t}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/VerticalDivider-Bvc1MZzH.js b/lecture-01/assets/slidev/VerticalDivider-Bvc1MZzH.js new file mode 100644 index 0000000000000000000000000000000000000000..7baee7089fa1641fb3758cffac78681be2961193 --- /dev/null +++ b/lecture-01/assets/slidev/VerticalDivider-Bvc1MZzH.js @@ -0,0 +1 @@ +import{B as e,b as t}from"../modules/shiki-CJZsCeMT.js";import{t as n}from"../_plugin-vue_export-helper-BDNMzG2s.js";var r={},i={class:`w-1px opacity-10 bg-current m-1 lg:m-2`};function a(n,r){return e(),t(`div`,i)}var o=n(r,[[`render`,a]]);export{o as t}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/context-C6dxaFaS.js b/lecture-01/assets/slidev/context-C6dxaFaS.js new file mode 100644 index 0000000000000000000000000000000000000000..38587cfc74fb21cefc7b04e491b4d4806ebf590c --- /dev/null +++ b/lecture-01/assets/slidev/context-C6dxaFaS.js @@ -0,0 +1 @@ +import{dt as e,g as t,gt as n}from"../modules/shiki-CJZsCeMT.js";import{j as r,k as i}from"../modules/vue-ClnAKIA7.js";var a=`$$slidev-clicks-context`,o=`$$slidev-page`,s=`$$slidev-slide-element`,c=`$$slidev-slide-scale`,l=`$$slidev-context`,u=`$$slidev-route`,d=`$$slidev-render-context`,f=`$$slidev-fontmatter`,p=`$$slidev-slide-zoom`,m=`slidev-vclick-target`,h=`slidev-vclick-hidden`,g=`slidev-vclick-hidden-explicitly`,_=`slidev-vclick-current`,v=`slidev-vclick-prior`,y=`slidev-vclick-anim-`,b=999999,x=[`localhost`,`127.0.0.1`],S=[`clicks`,`clicksStart`,`disabled`,`hide`,`hideInToc`,`layout`,`level`,`preload`,`routeAlias`,`src`,`title`,`transition`,`zoom`,`dragPos`,`lang`,`clickAnimation`],C=[...S,`theme`,`titleTemplate`,`info`,`author`,`keywords`,`presenter`,`browserExporter`,`download`,`exportFilename`,`export`,`highlighter`,`lineNumbers`,`monaco`,`monacoTypesSource`,`monacoTypesAdditionalPackages`,`monacoRunAdditionalDeps`,`monacoRunUseStrict`,`remoteAssets`,`selectable`,`record`,`colorSchema`,`routerMode`,`aspectRatio`,`canvasWidth`,`themeConfig`,`favicon`,`plantUmlServer`,`fonts`,`defaults`,`drawings`,`htmlAttrs`,`mdc`,`comark`,`contextMenu`,`wakeLock`,`pwa`,`seoMeta`,`notesAutoRuby`,`magicMoveDuration`,`preloadImages`];function w(){let r=i(l),s=n(r,`nav`),m=i(a).value,h=n(m,`current`),g=i(o),_=i(d),v=i(f,{});return{$slidev:r,$nav:s,$clicksContext:m,$clicks:h,$page:g,$route:i(u,void 0),$renderContext:_,$frontmatter:v,$scale:i(c,e(1)),$zoom:i(p,t(()=>1))}}function T(e,t){return{...r(e,t===0?C:S),frontmatter:e}}export{c as _,h as a,m as c,a as d,o as f,s as g,u as h,_ as i,b as l,d as m,w as n,g as o,f as p,y as r,v as s,T as t,x as u,p as v,l as y}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/entry-C7SFAt6v.js b/lecture-01/assets/slidev/entry-C7SFAt6v.js new file mode 100644 index 0000000000000000000000000000000000000000..4c79e7e49694f2683fcec0df3d86845b2d4c09ca --- /dev/null +++ b/lecture-01/assets/slidev/entry-C7SFAt6v.js @@ -0,0 +1 @@ +import{B as e,C as t,S as n,W as r,_ as i,b as a,et as o}from"../modules/shiki-CJZsCeMT.js";import{t as s}from"../_plugin-vue_export-helper-BDNMzG2s.js";var c={},l={class:`h-full w-full flex items-center justify-center gap-5 lt-md:flex-col`};function u(s,c){let u=r(`RouterLink`);return e(),a(`div`,l,[t(u,{to:`/`,class:`page-link`},{default:o(()=>[...c[0]||=[i(`div`,{class:`i-carbon:presentation-file`},null,-1),n(` Slides `,-1)]]),_:1}),t(u,{to:`/presenter`,class:`page-link`},{default:o(()=>[...c[1]||=[i(`div`,{class:`i-carbon:user-speaker`},null,-1),n(` Presenter `,-1)]]),_:1}),t(u,{to:`/notes`,class:`page-link`},{default:o(()=>[...c[2]||=[i(`div`,{class:`i-carbon:catalog`},null,-1),n(` Notes `,-1)]]),_:1}),t(u,{to:`/overview`,class:`page-link`},{default:o(()=>[...c[3]||=[i(`div`,{class:`i-carbon:list-boxes`},null,-1),n(` Overview `,-1)]]),_:1})])}var d=s(c,[[`render`,u],[`__scopeId`,`data-v-966650ef`]]);export{d as default}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/notes-FMbByPOo.js b/lecture-01/assets/slidev/notes-FMbByPOo.js new file mode 100644 index 0000000000000000000000000000000000000000..c65ef98863ea4d8cb83a8e5a4422dd50f1888348 --- /dev/null +++ b/lecture-01/assets/slidev/notes-FMbByPOo.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,S as r,St as i,T as a,Z as o,_ as s,b as c,dt as l,et as u,g as d,m as f,yt as p}from"../modules/shiki-CJZsCeMT.js";import{U as m,Z as h,t as g,u as _}from"../useNav-CGjBnVA8.js";import{h as v}from"../modules/vue-ClnAKIA7.js";import{m as y,o as b}from"../index-DOePylYH.js";import{t as x}from"./IconButton-BwA4p7Ax.js";import{t as S}from"./Modal-cvUjgiyd.js";import{n as C,t as w}from"./NoteDisplay-CBOFmNF_.js";import{r as T,t as E}from"./TimerBar-C_NwmFId.js";var D={class:`flex my-1`},O={class:`h-full flex flex-col`},k={class:`flex-none border-t border-main`,px3:``,py2:``},A={class:`flex-none border-t border-main`},j={class:`flex gap-1 items-center px-6 py-3`},M={key:0,class:`i-carbon:minimize`},N={key:1,class:`i-carbon:maximize`},P={class:`px2 my-auto`},F={class:`text-lg`},I={class:`opacity-50 text-sm`},L=a({__name:`notes`,setup(a){y({title:`Notes - ${h}`});let{slides:L,total:R}=g(),{isFullscreen:z,toggle:B}=_,V=l(),H=v(`slidev-notes-font-size`,18),U=d(()=>b.page),W=l(!1),G=d(()=>L.value.find(e=>e.no===U.value));o(U,()=>{V.value?.scrollTo({left:0,top:0,behavior:`smooth`}),window.scrollTo({left:0,top:0,behavior:`smooth`})});function K(){H.value+=1}function q(){--H.value}let J=d(()=>{let e=b.clicks,t=b.clicksTotal;return m(l(e),void 0,t)});return(a,o)=>(e(),c(f,null,[t(S,{modelValue:W.value,"onUpdate:modelValue":o[1]||=e=>W.value=e,class:`px-6 py-4 flex flex-col gap-2`},{default:u(()=>[o[3]||=s(`div`,{class:`flex gap-2 text-xl`},[s(`div`,{class:`i-carbon:information my-auto`}),r(` Help `)],-1),o[4]||=s(`div`,{class:`prose dark:prose-invert`},[s(`p`,null,`This is the hands-free live notes viewer.`),s(`p`,null,`It's designed to be used in a separate view or device. The progress is controlled by and auto synced with the main presenter or slide.`)],-1),s(`div`,D,[s(`button`,{class:`slidev-form-button`,onClick:o[0]||=e=>W.value=!1},` Close `)])]),_:1},8,[`modelValue`]),s(`div`,O,[t(T,{"clicks-context":J.value,current:U.value},null,8,[`clicks-context`,`current`]),t(E),s(`div`,{ref_key:`scroller`,ref:V,class:`px-5 py-3 flex-auto h-full overflow-auto`,style:i({fontSize:`${p(H)}px`})},[t(w,{note:G.value?.meta.slide.note,"note-html":G.value?.meta.slide.noteHTML,placeholder:`No notes for Slide ${U.value}.`,"clicks-context":J.value,"auto-scroll":!0},null,8,[`note`,`note-html`,`placeholder`,`clicks-context`])],4),s(`div`,k,[t(C,{"clicks-context":J.value,readonly:``},null,8,[`clicks-context`])]),s(`div`,A,[s(`div`,j,[t(x,{title:p(z)?`Close fullscreen`:`Enter fullscreen`,onClick:p(B)},{default:u(()=>[p(z)?(e(),c(`div`,M)):(e(),c(`div`,N))]),_:1},8,[`title`,`onClick`]),t(x,{title:`Increase font size`,onClick:K},{default:u(()=>[...o[5]||=[s(`div`,{class:`i-carbon:zoom-in`},null,-1)]]),_:1}),t(x,{title:`Decrease font size`,onClick:q},{default:u(()=>[...o[6]||=[s(`div`,{class:`i-carbon:zoom-out`},null,-1)]]),_:1}),t(x,{title:`Edit notes`,to:`/notes-edit`,target:`_blank`},{default:u(()=>[...o[7]||=[s(`div`,{class:`i-carbon:edit`},null,-1)]]),_:1}),t(x,{title:`Help`,class:`rounded-full`,onClick:o[2]||=e=>W.value=!0},{default:u(()=>[...o[8]||=[s(`div`,{class:`i-carbon:help`},null,-1)]]),_:1}),o[9]||=s(`div`,{class:`flex-auto`},null,-1),s(`div`,P,[s(`span`,F,n(U.value),1),s(`span`,I,` / `+n(p(R)),1)])])])])],64))}});export{L as default}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/notes-edit-BEK9xtMD.js b/lecture-01/assets/slidev/notes-edit-BEK9xtMD.js new file mode 100644 index 0000000000000000000000000000000000000000..1bb44b20e3de4185ce7339c3d2bf9bbc74565917 --- /dev/null +++ b/lecture-01/assets/slidev/notes-edit-BEK9xtMD.js @@ -0,0 +1,2 @@ +import{B as e,C as t,S as n,T as r,_ as i,b as a,dt as o,et as s,l as c,m as l,tt as u}from"../modules/shiki-CJZsCeMT.js";import{Z as d,t as f}from"../useNav-CGjBnVA8.js";import{D as p}from"../modules/vue-ClnAKIA7.js";import{m,t as h}from"../index-DOePylYH.js";import{t as g}from"./IconButton-BwA4p7Ax.js";import{t as _}from"./Modal-cvUjgiyd.js";var v={class:`flex my-1`},y={class:`h-full`},b={class:`slidev-glass-effect fixed bottom-5 right-5 rounded-full border border-main`},x=r({__name:`notes-edit`,setup(r){let x=/^---\s*#(\d+)\s*$/;m({title:`Notes Edit - ${d}`});let{slides:S}=f(),C=o(!1),w=o(T(S.value));function T(e){let t=[];for(let n of e)n.meta.slide.note?.trim()&&(t.push(`--- #${n.no}`),t.push(``),t.push(n.meta.slide.note),t.push(``));return t.join(` +`)}function E(e,t){let n=e.split(/^(---\s*#\d+\s*)$/gm);n.forEach((e,r)=>{let i=e.match(x);if(i){let e=Number.parseInt(i[1]),a=n[r+1].trim(),o=t.find(t=>t.no===e);o&&(o.meta.slide.note=a,h(e).update({note:a}))}})}return p(w,e=>{E(e,S.value)},{debounce:300}),(r,o)=>(e(),a(l,null,[t(_,{modelValue:C.value,"onUpdate:modelValue":o[1]||=e=>C.value=e,class:`px-6 py-4 flex flex-col gap-2`},{default:s(()=>[o[4]||=i(`div`,{class:`flex gap-2 text-xl`},[i(`div`,{class:`i-carbon:information my-auto`}),n(` Help `)],-1),o[5]||=i(`div`,{class:`prose dark:prose-invert`},[i(`p`,null,`This is the batch notes editor. You can edit the notes for all the slides at once here.`),i(`p`,null,[n(`The note for each slide are separated by `),i(`code`,null,`--- #[no]`),n(` lines, you might want to keep them while editing.`)])],-1),i(`div`,v,[i(`button`,{class:`slidev-form-button`,onClick:o[0]||=e=>C.value=!1},` Close `)])]),_:1},8,[`modelValue`]),i(`div`,y,[i(`div`,b,[t(g,{title:`Help`,class:`rounded-full`,onClick:o[2]||=e=>C.value=!0},{default:s(()=>[...o[6]||=[i(`div`,{class:`i-carbon:help text-2xl`},null,-1)]]),_:1})]),u(i(`textarea`,{"onUpdate:modelValue":o[3]||=e=>w.value=e,class:`prose dark:prose-invert resize-none p5 outline-none bg-transparent block h-full w-full! max-w-full! max-h-full! min-h-full! min-w-full!`},null,512),[[c,w.value]])])],64))}});export{x as default}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/overview-GwLNj2Wj.js b/lecture-01/assets/slidev/overview-GwLNj2Wj.js new file mode 100644 index 0000000000000000000000000000000000000000..6595f12786ad2ebb481df4f7aef628371e3a3b1c --- /dev/null +++ b/lecture-01/assets/slidev/overview-GwLNj2Wj.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,H as r,P as i,R as a,St as o,T as s,_ as c,b as l,bt as u,dt as d,et as f,g as p,lt as m,m as h,mt as ee,v as g,y as _,yt as v,z as te}from"../modules/shiki-CJZsCeMT.js";import{B as y,J as ne,R as b,W as re,Z as ie,q as x,t as ae}from"../useNav-CGjBnVA8.js";import{t as S}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{B as oe,z as se}from"../modules/vue-ClnAKIA7.js";import{l as C}from"./context-C6dxaFaS.js";import{d as ce,f as w,m as le,p as ue}from"../index-DOePylYH.js";import{t as T}from"./IconButton-BwA4p7Ax.js";import{n as E}from"./NoteDisplay-CBOFmNF_.js";import{n as de,r as fe}from"../modules/unplugin-icons-Dfv7de-_.js";import{i as pe,o as me,t as he}from"../SlideWrapper-CMn-GoeN.js";import{t as ge}from"./NoteEditable-Ca89u0zd.js";var _e={class:`h-screen w-screen of-hidden flex`},ve={key:0,class:`grid grid-rows-[auto_max-content] border-r border-main select-none max-h-full h-full`},ye={class:`relative`},be={class:`absolute left-0 top-0 bottom-0 w-200 flex flex-col flex-auto items-end group p-6px md:p-10px gap-1 max-h-full of-x-visible of-y-auto`,style:{direction:`rtl`}},xe=[`onClick`],Se={p2:``,border:`t main`},Ce={class:`flex flex-col gap-1 mx-1 items-end`},we={key:0,class:`flex items-end gap-2`},Te=[`onClick`],Ee=[`onDblclick`],De={key:2,class:`select-none absolute bottom-0 right-0 bg-main rounded-tl p2 op35 text-xs`},Oe={key:1,class:`absolute z-2 top-0 right-0 px3 py1.5 border-b border-l rounded-lb bg-main/80 backdrop-blur border-main select-none`},ke={class:`text-xs op50`},D=450,O=S(s({__name:`overview`,setup(s){le({title:`Overview - ${ie}`});let S=se(),O=oe(),{openInEditor:Ae,slides:k,isEmbedded:A}=ae(),j=p(()=>S.query.mode===`preview`),M=p(()=>j.value&&A.value),N=p(()=>j.value?M.value?Math.max(0,b.width.value-16):Math.min(900,Math.max(320,b.width.value-160)):D),je=p(()=>N.value/ne.value),P=m(new Map),F=m(new Map),I=d([]),L=d(),R=d(null),z=0,B,V,H=p(()=>k.value.map(e=>Fe(e.meta?.slide?.note||``))),Me=p(()=>H.value.reduce((e,t)=>e+t,0)),Ne=p(()=>k.value.map(e=>K(e)).reduce((e,t)=>e+t,0)),Pe=p(()=>String(Math.max(1,k.value.length)).length),U=ee(),W=new WeakMap;function G(e){return W.has(e)||W.set(e,re(e,C)),W.get(e)}function K(e){return e.meta?.clicks||G(e)?.total}function q(e){U.value===e?U.value=void 0:U.value=e}function Fe(e){let t=e.match(/[\w`'\-\u0392-\u03C9\u00C0-\u00FF\u0600-\u06FF\u0400-\u04FF]+|[\u4E00-\u9FFF\u3400-\u4DBF\uF900-\uFAFF\u3040-\u309F\uAC00-\uD7AF]+/g),n=0;if(!t)return 0;for(let e=0;e=19968?n+=t[e].length:n+=1;return n}function J(){let e=window.innerHeight||document.documentElement.clientHeight,t,n=[];for(let[r,i]of P.entries()){let a=i.getBoundingClientRect(),o=Math.max(0,Math.min(a.bottom,e)-Math.max(a.top,0));o!==0&&(o>=a.height&&n.push(r),(!t||o>t.visibleHeight)&&(t={idx:r,visibleHeight:o}))}I.value=n.length?n:t?[t.idx]:[]}function Y(e){let t=document.createElement(`a`);t.target=`_blank`,t.href=x+e.slice(1),t.click()}function Ie(e){let t=new URL(x+e.slice(1),location.href).href;if(A.value){window.parent.postMessage({target:`slidev`,sender:`slidev`,type:`open-external`,url:t},`*`);return}Y(e)}function Le(e){let t=P.get(e);t&&t.scrollIntoView({behavior:`smooth`,block:`start`})}function X(e){let t=F.get(e)||P.get(e);if(!t||!L.value)return null;let n=L.value.getBoundingClientRect();return t.getBoundingClientRect().top-n.top+L.value.scrollTop}function Z(e){if(!L.value||k.value.length===0)return;let t=Math.min(Math.max(e,1),k.value.length),n=Math.floor(t)-1,r=t-(n+1),i=X(n),a=X(n+1);if(i==null)return;let o=i+(a==null?0:(a-i)*r)-L.value.clientHeight*.5;Math.abs(L.value.scrollTop-o)<1||L.value.scrollTo({top:o})}function Re(){let e=S.query.slideNo,t=Number(Array.isArray(e)?e[0]:e);return Number.isFinite(t)&&t>0?t:void 0}function Q(e){if(!M.value)return;let t=Number(e.toFixed(3)).toString();S.query.slideNo!==t&&O.replace({query:{...S.query,slideNo:t}})}function ze(){if(!L.value||k.value.length===0)return null;let e=L.value.scrollTop+L.value.clientHeight*.5,t=k.value.map((e,t)=>X(t)).filter(e=>e!=null);if(t.length===0)return null;if(t.length===1||e<=t[0])return 1;for(let n=1;n{V=void 0;let e=B;B=void 0,e!=null&&(Q(e),!(Date.now()0&&(z=Date.now()+300,B=void 0,Q(t),Z(t))}function He(e,t,n){let r=G(n);r.current=r.current===t?C:t,e.preventDefault()}function Ue(e,t){if(e.ctrlKey||e.metaKey){e.preventDefault(),Ie(y(t,!1));return}let n=t.meta?.slide;n&&window.parent.postMessage({target:`slidev`,type:`command`,command:`goto`,args:[n.filepath,n.sourceIndex]},`*`)}return a(()=>{window.addEventListener(`message`,$);let e=M.value?Re():void 0;e!=null&&(z=Date.now()+300,Z(e)),i(()=>{e!=null&&Z(e),J()})}),te(()=>{window.removeEventListener(`message`,$),V&&clearTimeout(V)}),(i,a)=>{let s=de,d=fe;return e(),l(`div`,_e,[v(A)?_(`v-if`,!0):(e(),l(`nav`,ve,[c(`div`,ye,[c(`div`,be,[(e(!0),l(h,null,r(v(k),(t,r)=>(e(),l(`div`,{key:t.no,class:`relative`,style:{direction:`ltr`}},[c(`button`,{class:u([`relative transition duration-300 w-8 h-8 rounded hover:bg-active hover:op100`,I.value.includes(r)?`op100 text-primary bg-gray:5`:`op20`]),onClick:e=>Le(r)},[c(`div`,null,n(r+1),1)],10,xe),t.meta?.slide?.title?(e(),l(`div`,{key:0,class:u([`pointer-events-none select-none absolute left-110% top-50% translate-y--50% ws-nowrap z-label px2 slidev-glass-effect transition duration-400 op0 group-hover:op100`,I.value.includes(r)?`text-primary`:`text-main important-text-op-50`])},n(t.meta?.slide?.title),3)):_(`v-if`,!0)]))),128))])]),c(`div`,Se,[v(ce)?(e(),g(T,{key:1,title:v(w)?`Dark mode`:`Light mode`,"pointer-events-none":``,op50:``},{default:f(()=>[v(w)?(e(),g(s,{key:0})):(e(),g(d,{key:1}))]),_:1},8,[`title`])):(e(),g(T,{key:0,title:v(w)?`Switch to light mode theme`:`Switch to dark mode theme`,onClick:a[0]||=e=>v(ue)()},{default:f(()=>[v(w)?(e(),g(s,{key:0})):(e(),g(d,{key:1}))]),_:1},8,[`title`]))])])),c(`main`,{ref_key:`scroller`,ref:L,class:`flex-1 h-full of-auto`,style:o(`grid-template-columns: repeat(auto-fit,minmax(${D}px,1fr))`),onScroll:Ve},[(e(!0),l(h,null,r(v(k),(r,i)=>(e(),l(`div`,{key:r.no,ref_for:!0,ref:e=>P.set(i,e),class:u([`overview-slide-block relative of-hidden flex gap-4 min-h-50`,[i===0&&!M.value?`pt2`:``,M.value?`justify-center`:`border-t border-main`]])},[M.value?_(`v-if`,!0):(e(),l(`div`,{key:0,class:u([`select-none text-right my5 flex flex-col justify-between items-end`,j.value?`w-9`:`w-13`]),style:o({height:`${je.value}px`})},[c(`div`,{class:`self-center text-3xl op20 mb2 text-center mr--14px tabular-nums`,style:o({width:`${Pe.value}ch`})},n(i+1),5),c(`div`,Ce,[t(T,{class:u([`overview-slide-action mr--4 op0`,j.value?`text-lg`:``]),title:`Play in new tab`,onClick:e=>Y(v(y)(r,!1))},{default:f(()=>[...a[4]||=[c(`div`,{class:`i-carbon:presentation-file`},null,-1)]]),_:1},8,[`class`,`onClick`]),_(`v-if`,!0)])],6)),c(`div`,{class:u([`flex flex-col`,M.value?`my1 gap-0`:`my5 gap-2`]),style:o({width:`${N.value}px`})},[M.value?(e(),l(`div`,we,[c(`button`,{type:`button`,class:`select-none pl-1 text-lg leading-tight op60 tabular-nums hover:op90 hover:underline underline-offset-2`,onClick:e=>Ue(e,r)},n(i+1),9,Te),K(r)?(e(),g(E,{key:0,active:U.value===r,"clicks-context":G(r),resettable:``,compact:``,attached:``,class:`ml-auto w-88 min-w-[70%] max-w-[calc(100%-3rem)]`,onDblclick:e=>q(r),onActivate:e=>U.value=r,onReset:a[1]||=e=>U.value=void 0},null,8,[`active`,`clicks-context`,`onDblclick`,`onActivate`])):_(`v-if`,!0)])):_(`v-if`,!0),c(`div`,{ref_for:!0,ref:e=>F.set(i,e),class:u([`border rounded border-main overflow-hidden bg-main h-max`,[M.value&&K(r)?`rounded-tr-0`:``,M.value?``:`select-none`]]),onDblclick:e=>!M.value&&Y(v(y)(r,!1))},[(e(),g(pe,{key:r.no,width:N.value,class:u(M.value?``:`pointer-events-none important:[&_*]:select-none`)},{default:f(()=>[t(he,{"clicks-context":G(r),route:r,"render-context":`overview`},null,8,[`clicks-context`,`route`]),t(me,{page:r.no},null,8,[`page`])]),_:2},1032,[`width`,`class`]))],42,Ee),K(r)&&!M.value?(e(),g(E,{key:1,active:U.value===r,"clicks-context":G(r),resettable:``,class:u([`ml-1 w-[calc(100%-0.25rem)]`,j.value?``:`mt-2`]),onDblclick:e=>q(r),onActivate:e=>U.value=r,onReset:a[2]||=e=>U.value=void 0},null,8,[`active`,`clicks-context`,`class`,`onDblclick`,`onActivate`])):_(`v-if`,!0)],6),j.value?_(`v-if`,!0):(e(),g(ge,{key:1,no:r.no,class:`relative z-1 max-w-250 w-250 text-lg rounded p3`,"auto-height":!0,highlight:U.value===r,editing:R.value===r.no,"clicks-context":G(r),onDblclick:e=>R.value===r.no?null:R.value=r.no,"onUpdate:editing":a[3]||=e=>R.value=null,onMarkerClick:(e,t)=>He(e,t,r)},null,8,[`no`,`highlight`,`editing`,`clicks-context`,`onDblclick`,`onMarkerClick`])),!j.value&&H.value[i]>0?(e(),l(`div`,De,n(H.value[i])+` words `,1)):_(`v-if`,!0)],2))),128))],36),v(A)?_(`v-if`,!0):(e(),l(`div`,Oe,[c(`div`,ke,n(v(k).length)+` slides · `+n(Ne.value+v(k).length-1)+` clicks · `+n(Me.value)+` words `,1)]))])}}}),[[`__scopeId`,`data-v-47f32601`]]);export{O as default}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/play-imIlfZCb.js b/lecture-01/assets/slidev/play-imIlfZCb.js new file mode 100644 index 0000000000000000000000000000000000000000..6322e70140cfca35ab102616992d33a9cc52d04c --- /dev/null +++ b/lecture-01/assets/slidev/play-imIlfZCb.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/slidev/DrawingControls-B1ZvAJ65.js","assets/rolldown-runtime-hePW80VL.js","assets/modules/shiki-CJZsCeMT.js","assets/modules/shiki-BrmBd2_v.css","assets/modules/vue-ClnAKIA7.js","assets/useDrawings-aZNIHmMQ.js","assets/useNav-CGjBnVA8.js","assets/preload-helper-DpA04vUI.js","assets/_plugin-vue_export-helper-BDNMzG2s.js","assets/slidev/context-C6dxaFaS.js","assets/index-DOePylYH.js","assets/syncState-3Tc2ZArb.js","assets/index-DCPWAYn_.css","assets/slidev/IconButton-BwA4p7Ax.js","assets/slidev/VerticalDivider-Bvc1MZzH.js","assets/DrawingControls-Dhbx0szf.css"])))=>i.map(i=>d[i]); +import{B as e,C as t,S as n,St as r,T as i,Z as a,_ as o,b as s,bt as c,ct as l,dt as u,et as d,g as f,m as p,mt as m,ot as h,v as g,y as _,yt as v}from"../modules/shiki-CJZsCeMT.js";import{$ as y,E as b,F as x,I as S,f as C,h as w,k as T,t as E,v as D,w as O}from"../useNav-CGjBnVA8.js";import{t as k}from"../preload-helper-DpA04vUI.js";import{S as A,p as j}from"../modules/vue-ClnAKIA7.js";import{o as M}from"../index-DOePylYH.js";import{t as N}from"../useDrawings-aZNIHmMQ.js";import{t as P}from"./Modal-cvUjgiyd.js";import{t as F}from"../modules/unplugin-icons-Dfv7de-_.js";import{i as I}from"../SlideWrapper-CMn-GoeN.js";import{a as L,c as R,d as z,f as B,l as V,n as H,r as U,s as W,t as G,u as K}from"./shortcuts-Cv21o_fH.js";var q=2e3;function J(e){let t=f(()=>e.value&&C.value);function n(){document.body.style.cursor=`none`}function r(){document.body.style.cursor=``}let i=null;a(t,e=>{e||(r(),i&&clearTimeout(i),i=null)}),l(()=>{r(),i&&clearTimeout(i),i=null}),j(document.body,[`pointermove`,`pointerdown`],()=>{r(),i&&clearTimeout(i),i=t.value?setTimeout(n,q):null},{passive:!0})}var Y={class:`slidev-info-dialog slidev-layout flex flex-col gap-4 text-base`},X=[`innerHTML`],Z=i({__name:`InfoDialog`,props:{modelValue:{default:!1}},emits:[`update:modelValue`],setup(t,{emit:r}){let i=A(t,`modelValue`,r),a=f(()=>typeof y.info==`string`);return(t,r)=>(e(),g(P,{modelValue:v(i),"onUpdate:modelValue":r[0]||=e=>h(i)?i.value=e:null,class:`px-6 py-4`},{default:d(()=>[o(`div`,Y,[a.value?(e(),s(`div`,{key:0,class:`mb-4`,innerHTML:v(y).info},null,8,X)):_(`v-if`,!0),r[1]||=o(`a`,{href:`https://github.com/slidevjs/slidev`,target:`_blank`,class:`!opacity-100 !border-none !text-current`},[o(`div`,{class:`flex gap-1 children:my-auto`},[o(`div`,{class:`opacity-50 text-sm mr-2`},`Powered by`),o(`img`,{class:`w-5 h-5`,src:`/lecture-01/assets/logo-BYkHSa_O.png`,alt:`Slidev logo`}),o(`div`,{style:{color:`#2082A6`}},[o(`b`,null,`Sli`),n(`dev `)])])],-1)])]),_:1},8,[`modelValue`]))}}),Q=i({__name:`Controls`,setup(n){let{isEmbedded:r}=E(),i=!y.drawings.presenterOnly&&!r.value,a=m();i&&k(()=>import(`./DrawingControls-B1ZvAJ65.js`).then(e=>e.n).then(e=>a.value=e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]));let o=m(),c=m();return(n,r)=>(e(),s(p,null,[a.value?(e(),g(v(a),{key:0})):_(`v-if`,!0),t(W),t(R),o.value?(e(),g(v(o),{key:1})):_(`v-if`,!0),c.value?(e(),g(v(c),{key:2,modelValue:v(T),"onUpdate:modelValue":r[0]||=e=>h(T)?T.value=e:null},null,8,[`modelValue`])):_(`v-if`,!0),v(y).info?(e(),g(Z,{key:3,modelValue:v(b),"onUpdate:modelValue":r[1]||=e=>h(b)?b.value=e:null},null,8,[`modelValue`])):_(`v-if`,!0),t(V)],64))}}),$={key:0,class:`absolute top-0 left-0 right-0 bottom-0 pointer-events-none text-xl`},ee=i({__name:`PresenterMouse`,setup(n){return(n,i)=>{let a=F;return v(M).cursor?.style===`cursor`?(e(),s(`div`,$,[t(a,{class:`absolute stroke-white dark:stroke-black`,style:r({left:`${v(M).cursor.x}%`,top:`${v(M).cursor.y}%`,strokeWidth:16})},null,8,[`style`])])):_(`v-if`,!0)}}}),te=i({__name:`play`,setup(n){let{next:r,prev:i,isPrintMode:a,isPlaying:l,isEmbedded:h}=E(),{isDrawing:y}=N(),b=u();function C(e){O.value||e.button===0&&e.target?.id===`slide-container`&&(e.pageX/window.innerWidth>.5?r():i())}B(b),G(),z(),J(f(()=>l.value&&!h.value&&!O.value));let T=f(()=>D.value||O.value),k=m(),A=f(()=>{let e=``;return x.value.brightness!==S.brightness&&(e+=`brightness(${x.value.brightness}) `),x.value.contrast!==S.contrast&&(e+=`contrast(${x.value.contrast}) `),x.value.sepia!==S.sepia&&(e+=`sepia(${x.value.sepia}) `),x.value.hueRotate!==S.hueRotate&&(e+=`hue-rotate(${x.value.hueRotate}deg) `),x.value.invert&&(e+=`invert(1) `),{filter:e}});return(n,r)=>(e(),s(p,null,[o(`div`,{id:`page-root`,ref_key:`root`,ref:b,class:c([`grid`,v(w)?`grid-rows-[1fr_max-content]`:`grid-cols-[1fr_max-content]`])},[t(I,{style:{background:`var(--slidev-slide-container-background, black)`},"is-main":``,"content-style":A.value,onPointerdown:C,onContextmenu:v(K)},{default:d(()=>[t(H,{"render-context":`slide`}),t(ee),t(L)]),controls:d(()=>[v(a)?_(`v-if`,!0):(e(),s(`div`,{key:0,class:c([`absolute bottom-0 left-0 transition duration-300 opacity-0 hover:opacity-100 focus-within:opacity-100 focus-visible:opacity-100`,[T.value?`!opacity-100 right-0`:`opacity-0 p-2`,v(y)?`pointer-events-none`:``]])},[t(U,{persist:T.value},null,8,[`persist`])],2))]),_:1},8,[`content-style`,`onContextmenu`]),k.value&&v(O)?(e(),g(v(k),{key:0,resize:!0})):_(`v-if`,!0)],2),v(a)?_(`v-if`,!0):(e(),g(Q,{key:0})),r[0]||=o(`div`,{id:`twoslash-container`},null,-1)],64))}});export{te as default}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/presenter-BvM1iukx.js b/lecture-01/assets/slidev/presenter-BvM1iukx.js new file mode 100644 index 0000000000000000000000000000000000000000..efed9ce7808be70f00c85327af4a090d6af778e8 --- /dev/null +++ b/lecture-01/assets/slidev/presenter-BvM1iukx.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,Q as r,R as i,S as a,St as o,T as s,X as c,Z as l,_ as u,b as d,bt as f,dt as p,et as m,g as h,m as ee,mt as g,ot as te,tt as _,u as v,v as y,y as b,yt as x}from"../modules/shiki-CJZsCeMT.js";import{O as ne,U as re,Z as ie,a as ae,b as S,m as oe,o as se,t as ce,w as le,x as ue}from"../useNav-CGjBnVA8.js";import{t as C}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{_ as w,h as T,p as E,w as D}from"../modules/vue-ClnAKIA7.js";import{m as de,n as O,o as k}from"../index-DOePylYH.js";import{t as fe}from"../useDrawings-aZNIHmMQ.js";import{t as pe}from"./DrawingControls-B1ZvAJ65.js";import{t as A}from"./IconButton-BwA4p7Ax.js";import{n as me,t as j}from"./NoteDisplay-CBOFmNF_.js";import{n as M,r as he,t as ge}from"./TimerBar-C_NwmFId.js";import{i as N,t as _e}from"../SlideWrapper-CMn-GoeN.js";import"./NoteEditable-Ca89u0zd.js";import{a as ve,c as ye,d as be,f as xe,i as Se,l as Ce,n as we,o as Te,r as Ee,s as De,t as Oe,u as ke}from"./shortcuts-Cv21o_fH.js";var Ae=s({__name:`NoteStatic`,props:{no:{},class:{},clicksContext:{}},setup(t){let n=t,{info:r}=O(n.no);return(i,a)=>(e(),y(j,{class:f(n.class),note:x(r)?.note,"note-html":x(r)?.noteHTML,"clicks-context":t.clicksContext},null,8,[`class`,`note`,`note-html`,`clicks-context`]))}}),P={"h-full":``,"w-full":``},je={key:0,"w-full":``,"h-full":``,flex:`~ col gap-4 items-center justify-center`},Me=s({__name:`ScreenCaptureMirror`,setup(t){let n=c(`video`),r=g(null),i=g(!1);async function o(){r.value=await navigator.mediaDevices.getDisplayMedia({video:{cursor:`always`},audio:!1,selfBrowserSurface:`include`,preferCurrentTab:!1}),n.value.srcObject=r.value,n.value.play(),i.value=!0,r.value.addEventListener(`inactive`,()=>{n.value.srcObject=null,i.value=!1}),r.value.addEventListener(`ended`,()=>{n.value.srcObject=null,i.value=!1})}return(t,r)=>(e(),d(`div`,P,[_(u(`video`,{ref_key:`video`,ref:n,class:`w-full h-full object-contain`},null,512),[[v,i.value]]),i.value?b(`v-if`,!0):(e(),d(`div`,je,[r[0]||=u(`div`,{op50:``},[a(` Use screen capturing to mirror your main screen back to presenter view.`),u(`br`),a(` Click the button below and `),u(`b`,null,`select your other monitor or window`),a(`. `)],-1),u(`button`,{class:`slidev-form-button`,onClick:o},` Start Screen Mirroring `)]))]))}}),Ne={class:`w-22px cursor-pointer`},Pe={class:`group-not-hover:hidden flex flex-col items-center`},Fe={key:0,class:`i-carbon:pause text-lg`},Ie={key:1,class:`i-carbon:play`},Le={class:`text-3xl px-3 my-auto font-mono`},Re=s({__name:`TimerInlined`,setup(t){let{status:r,percentage:i,mode:a,timer:o,reset:s,toggle:c}=M(),l=h(()=>r.value===`stopped`?`op50`:r.value===`paused`?`text-blue6 dark:text-blue3`:i.value>100?`text-red6 dark:text-red3`:i.value>80?`text-yellow6 dark:text-yellow3`:`text-green6 dark:text-green3`);return(t,i)=>(e(),d(`div`,{class:f([`group flex items-center justify-center pl-4 select-none`,l.value])},[u(`div`,Ne,[u(`div`,{class:f([`group-hover:hidden text-2xl`,x(a)===`countdown`?`i-carbon:timer`:`i-carbon:time`])},null,2),u(`div`,Pe,[u(`div`,{class:`relative op-80 hover:op-100`,onClick:i[0]||=(...e)=>x(c)&&x(c)(...e)},[x(r)===`running`?(e(),d(`div`,Fe)):(e(),d(`div`,Ie))]),u(`div`,{class:`op-80 hover:op-100`,onClick:i[1]||=(...e)=>x(s)&&x(s)(...e)},[...i[2]||=[u(`div`,{class:`i-carbon:renew`},null,-1)]])])]),u(`div`,Le,[x(o).h?(e(),d(ee,{key:0},[u(`span`,null,n(x(o).h),1),i[3]||=u(`span`,{op50:``},`:`,-1)],64)):b(`v-if`,!0),u(`span`,null,n(x(o).m),1),i[4]||=u(`span`,{op50:``},`:`,-1),u(`span`,null,n(x(o).s),1)])],2))}}),ze={class:`bg-main h-full slidev-presenter grid grid-rows-[max-content_1fr] of-hidden`},Be={flex:`~ gap-4 items-center`,border:`b main`,p1:``},Ve={class:`relative grid-section next flex flex-col p-2 lg:p-4`},He={key:2,class:`h-full flex justify-center items-center`},Ue={key:3,class:`h-full grid grid-rows-[1fr_min-content]`},F=C(s({__name:`presenter`,setup(n){let a=D(),s=p(),c=p(),C=p(),O=p();Oe(),xe(s),be();let{clicksContext:j,currentSlideNo:M,currentSlideRoute:P,hasNext:je,nextRoute:Ne,slides:Pe,getPrimaryClicks:Fe}=ce(),{isDrawing:Ie}=fe();de({title:`Presenter - ${ie}`}),p(!1);let Le=h(()=>Pe.value.map(e=>{let t=p(0);return{context:re(t,e?.meta.slide?.frontmatter.clicksStart??0,e?.meta.clicks),clicks:t}})),F=h(()=>j.value.currentF.value&&Le.value[F.value[0].no-1]);l(F,()=>{I.value&&F.value&&(I.value.clicks.value=F.value[1])},{immediate:!0});let L=T(`slidev-presenter-main-slide-mode`,`slides`),R=T(`slidev-presenter-notes-width`,360),z=T(`slidev-presenter-notes-row-size`,280),B=p(0),V=p(!1),H=p(!1),U=p(0),W=p(360),We=p(0),G=p(280),K={minNotesWidth:240,maxNotesWidth:720,minNotesRowSize:160,maxNotesWidthRatio:.7,maxNotesRowHeightRatio:.75},Ge=w(`(min-aspect-ratio: 1/1)`),q=w(`(max-aspect-ratio: 3/5)`),J=h(()=>S.value===1&&Ge.value),Y=h(()=>!(S.value===1&&q.value)),X=h(()=>S.value===1&&!q.value||S.value===2||S.value===3),Z=h(()=>S.value===1&&!q.value);function Ke(e){return Number.isFinite(e)?Math.max(K.minNotesWidth,Math.min(K.maxNotesWidth,Math.round(e))):K.minNotesWidth}function qe(e){let t=c.value;if(!t)return;let n=t.getBoundingClientRect(),r=e-U.value,i=Ke(J.value?W.value-r:W.value+r),a=Math.round(n.width*K.maxNotesWidthRatio);R.value=Math.min(i,Math.max(K.minNotesWidth,a))}function Q(e){Y.value&&e.button===0&&(e.preventDefault(),U.value=e.clientX,W.value=R.value,V.value=!0)}function $(e){return Number.isFinite(e)?Math.max(K.minNotesRowSize,Math.round(e)):K.minNotesRowSize}function Je(e){let t=c.value;if(!t)return;let n=t.getBoundingClientRect(),r=e-We.value,i=Z.value?G.value-r:G.value+r,a=Math.round(n.height*K.maxNotesRowHeightRatio);z.value=Math.min($(i),Math.max(K.minNotesRowSize,a))}function Ye(e){if(!X.value||e.button!==0)return;e.preventDefault();let t=S.value===2?s.value?.getBoundingClientRect().height:C.value?.getBoundingClientRect().height;We.value=e.clientY,G.value=$(t??z.value),H.value=!0}function Xe(){let e=O.value;e&&(B.value=Math.round(e.getBoundingClientRect().height))}function Ze(){V.value=!1,H.value=!1}function Qe(){Xe(),$e()}E(window,`pointermove`,e=>{V.value&&qe(e.clientX),H.value&&Je(e.clientY)}),E(window,`pointerup`,Ze),E(window,`pointercancel`,Ze),i(()=>{Qe()}),E(window,`resize`,()=>{Qe()});function $e(){R.value=Ke(R.value),z.value=$(z.value);let e=c.value;if(!e)return;let t=e.getBoundingClientRect(),n=Math.round(t.width*K.maxNotesWidthRatio),r=Math.round(t.height*K.maxNotesRowHeightRatio);R.value=Math.min(R.value,Math.max(K.minNotesWidth,n)),z.value=Math.min(z.value,Math.max(K.minNotesRowSize,r))}let et=g();return i(()=>{let e=Te(),t=D();r(()=>{!e.value||!t.value||Ie.value||!ne.value?k.cursor=void 0:k.cursor={...e.value,style:ae.value}})}),(n,r)=>(e(),d(ee,null,[u(`div`,ze,[u(`div`,null,[t(he),t(ge)]),u(`div`,{ref_key:`gridContainer`,ref:c,class:f([`grid-container`,`layout${x(S)}`]),style:o({"--slidev-presenter-notes-width":`${x(R)}px`,"--slidev-presenter-notes-row-size":`${x(z)}px`,"--slidev-presenter-bottom-height":`${B.value}px`})},[b(` Unified vertical resizer for wide layout `),Y.value&&J.value?(e(),d(`div`,{key:0,class:`notes-vertical-resizer`,role:`separator`,"aria-orientation":`vertical`,title:`Resize notes panel`,onPointerdown:Q},null,32)):b(`v-if`,!0),b(` Unified vertical resizer for layout 3 `),Y.value&&x(S)===3?(e(),d(`div`,{key:1,class:`notes-vertical-resizer-left`,role:`separator`,"aria-orientation":`vertical`,title:`Resize notes panel`,onPointerdown:Q},null,32)):b(`v-if`,!0),u(`div`,{ref_key:`main`,ref:s,class:`relative grid-section main flex flex-col`},[u(`div`,Be,[r[3]||=u(`span`,{op50:``,px2:``},`Current`,-1),r[4]||=u(`div`,{"flex-auto":``},null,-1),t(Se,{modelValue:x(L),"onUpdate:modelValue":r[0]||=e=>te(L)?L.value=e:null,options:[{label:`Slides`,value:`slides`},{label:`Screen Mirror`,value:`mirror`}]},null,8,[`modelValue`])]),x(L)===`mirror`?(e(),y(Me,{key:0})):b(`v-if`,!0),b(` We use v-show here to still infer the clicks context `),_(t(N,{key:`main`,class:`p-2 lg:p-4 flex-auto`,"is-main":``,onContextmenu:x(ke)},{default:m(()=>[t(we,{"render-context":`presenter`}),t(ve)]),_:1},8,[`onContextmenu`]),[[v,x(L)===`slides`]]),(e(),y(me,{key:x(P)?.no,"clicks-context":x(Fe)(x(P)),class:`w-full pb2 px4 flex-none`},null,8,[`clicks-context`]))],512),u(`div`,Ve,[X.value&&x(S)===2?(e(),d(`div`,{key:0,class:`notes-row-resizer top-[-6px]`,role:`separator`,"aria-orientation":`horizontal`,title:`Resize notes panel height`,onPointerdown:Ye},null,32)):b(`v-if`,!0),F.value&&I.value?(e(),y(N,{key:`next`},{default:m(()=>[(e(),y(_e,{key:F.value[0].no,"clicks-context":I.value.context,route:F.value[0],"render-context":`previewNext`},null,8,[`clicks-context`,`route`]))]),_:1})):(e(),d(`div`,He,[...r[5]||=[u(`div`,{class:`text-gray-500`},` End of the presentation `,-1)]])),r[6]||=u(`div`,{class:`absolute left-0 top-0 bg-main border-b border-r border-main px2 py1 op50 text-sm`},` Next `,-1)]),u(`div`,{ref_key:`noteSection`,ref:C,class:`relative grid-section note overflow-hidden`},[Y.value&&!J.value&&x(S)!==3?(e(),d(`div`,{key:0,class:`notes-resizer right-[-6px]`,role:`separator`,"aria-orientation":`vertical`,title:`Resize notes panel`,onPointerdown:Q},null,32)):b(`v-if`,!0),X.value&&x(S)!==2?(e(),d(`div`,{key:1,class:f([`notes-row-resizer`,Z.value?`top-[-6px]`:`bottom-[-6px]`]),role:`separator`,"aria-orientation":`horizontal`,title:`Resize notes panel height`,onPointerdown:Ye},null,34)):b(`v-if`,!0),et.value&&x(le)?(e(),y(x(et),{key:2,class:`h-full`})):(e(),d(`div`,Ue,[(e(),y(Ae,{key:`static-${x(M)}`,no:x(M),class:`w-full max-w-full h-full overflow-auto p-2 lg:p-4`,style:o({fontSize:`${x(ue)}em`}),"clicks-context":x(j)},null,8,[`no`,`style`,`clicks-context`])),r[10]||=u(`div`,{"border-t":``,"border-main":``},null,-1),u(`div`,{class:f([`py-1 px-2 text-sm transition`,x(a)?``:`op25`])},[t(A,{title:`Increase font size`,onClick:x(oe)},{default:m(()=>[...r[7]||=[u(`div`,{class:`i-carbon:zoom-in`},null,-1)]]),_:1},8,[`onClick`]),t(A,{title:`Decrease font size`,onClick:x(se)},{default:m(()=>[...r[8]||=[u(`div`,{class:`i-carbon:zoom-out`},null,-1)]]),_:1},8,[`onClick`]),b(`v-if`,!0)],2)]))],512),u(`div`,{ref_key:`bottomSection`,ref:O,class:`grid-section bottom flex`},[t(Ee,{persist:!0,class:f([`transition`,x(a)?``:`op25`])},null,8,[`class`]),r[11]||=u(`div`,{"flex-auto":``},null,-1),t(Re)],512),(e(),y(pe,{key:2}))],6)]),t(ye),t(De),t(Ce)],64))}}),[[`__scopeId`,`data-v-e7a794bf`]]);export{F as default}; \ No newline at end of file diff --git a/lecture-01/assets/slidev/shortcuts-Cv21o_fH.js b/lecture-01/assets/slidev/shortcuts-Cv21o_fH.js new file mode 100644 index 0000000000000000000000000000000000000000..48e2ac71b066728915cfe4eaed8b006b886e32d0 --- /dev/null +++ b/lecture-01/assets/slidev/shortcuts-Cv21o_fH.js @@ -0,0 +1,4 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/slidev/DrawingLayer-kvJBPGC2.js","assets/modules/shiki-CJZsCeMT.js","assets/rolldown-runtime-hePW80VL.js","assets/modules/shiki-BrmBd2_v.css","assets/slidev/context-C6dxaFaS.js","assets/modules/vue-ClnAKIA7.js","assets/useDrawings-aZNIHmMQ.js","assets/useNav-CGjBnVA8.js","assets/preload-helper-DpA04vUI.js","assets/_plugin-vue_export-helper-BDNMzG2s.js","assets/index-DOePylYH.js","assets/syncState-3Tc2ZArb.js","assets/index-DCPWAYn_.css"])))=>i.map(i=>d[i]); +import{A as e,B as t,C as n,Ct as r,D as i,H as a,J as o,K as s,M as c,N as l,Q as u,R as d,S as f,St as p,T as m,U as h,Z as g,_,a as v,b as y,bt as b,c as x,d as S,dt as C,et as w,f as T,g as E,h as D,i as ee,l as O,m as k,mt as te,n as ne,o as re,ot as ie,tt as ae,u as oe,v as A,xt as j,y as M,yt as N}from"../modules/shiki-CJZsCeMT.js";import{$ as P,A as se,C as ce,D as F,E as le,F as I,I as L,L as ue,M as de,N as fe,O as pe,P as me,R as he,S as ge,T as R,V as _e,W as ve,X as ye,Y as be,_ as xe,a as z,b as Se,d as Ce,et as we,f as Te,g as Ee,i as De,j as B,n as Oe,p as ke,q as Ae,r as je,s as Me,t as V,u as Ne,w as Pe,y as Fe,z as Ie}from"../useNav-CGjBnVA8.js";import{t as Le}from"../preload-helper-DpA04vUI.js";import{t as Re}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{B as ze,C as Be,F as Ve,N as He,S as Ue,d as We,n as H,o as Ge,p as Ke,r as qe,s as Je,t as U,v as Ye,w as Xe,y as Ze}from"../modules/vue-ClnAKIA7.js";import{_ as Qe,l as $e,n as et}from"./context-C6dxaFaS.js";import{d as tt,f as nt,i as rt,o as it,p as at,r as ot,t as st}from"../index-DOePylYH.js";import{t as ct}from"../useDrawings-aZNIHmMQ.js";import{t as W}from"./IconButton-BwA4p7Ax.js";import{t as lt}from"./VerticalDivider-Bvc1MZzH.js";import{a as ut,i as dt,n as ft,o as pt,r as mt,t as ht}from"../SlideWrapper-CMn-GoeN.js";function gt(e){let{next:t,nextSlide:n,prev:r,prevSlide:i}=V(),{isDrawing:a}=ct(),o=C(0),{direction:s,distanceX:c,distanceY:l}=Ze(e,{pointerTypes:[`touch`],onSwipeStart(){a.value||(o.value=He())},onSwipeEnd(){if(!o.value||a.value)return;let e=Math.abs(c.value),u=Math.abs(l.value);e/window.innerWidth>.3||e>75?s.value===`left`?t():r():(u/window.innerHeight>.4||u>200)&&(s.value===`down`?i():n())}})}function _t(){let{request:e,release:t}=Be();g(ue,n=>{n?e(`screen`):t()},{immediate:!0})}var vt=Object.assign({}),yt=Object.assign({}),bt=Object.assign({}),xt=[Object.values(vt)[0],Object.values(yt)[0],Object.values(bt)[0]].filter(Boolean),St,Ct=()=>{if(St)return St;let{next:e,nextSlide:t,prev:n,prevSlide:r,hasNext:i,hasPrev:a,currentPage:o,total:s,isPresenter:c,enterPresenter:l,exitPresenter:u,isEmbedded:d,isPresenterAvailable:f}=V(),{drawingEnabled:p}=ct(),{isFullscreen:m,toggle:h}=Ne;return St=xt.reduce((e,t)=>t(e),E(()=>[{small:!0,icon:`i-carbon:arrow-left`,label:`Previous Click`,action:n,disabled:!a.value},{small:!0,icon:`i-carbon:arrow-right`,label:`Next Click`,action:e,disabled:!i.value},{small:!0,icon:`i-carbon:arrow-up`,label:`Previous Slide`,action:r,disabled:o.value<=1},{small:!0,icon:`i-carbon:arrow-down`,label:`Next Slide`,action:t,disabled:o.value>=s.value},`separator`,{icon:`i-carbon:text-annotation-toggle`,label:Pe.value?`Hide editor`:`Show editor`,action:()=>Pe.value=!Pe.value,show:!1},{icon:`i-carbon:pen`,label:p.value?`Hide drawing toolbar`:`Show drawing toolbar`,action:()=>p.value=!p.value},{icon:`i-carbon:apps`,label:`Show slide overview`,action:de},c.value&&{icon:`i-carbon:presentation-file`,label:`Exit Presenter Mode`,action:u},f.value&&{icon:`i-carbon:user-speaker`,label:`Enter Presenter Mode`,action:l},!d.value&&{icon:m.value?`i-carbon:minimize`:`i-carbon:maximize`,label:m.value?`Close fullscreen`:`Enter fullscreen`,action:h}].filter(Boolean)))},wt=te(null);function Tt(e,t){wt.value={x:e,y:t,items:Ct()}}function Et(){wt.value=null}function Dt(e){if(P.contextMenu!==!0&&P.contextMenu!=null&&P.contextMenu!==`build`||e.shiftKey||e.defaultPrevented)return;let{isEmbedded:t}=V();t.value||(Tt(e.pageX,e.pageY),e.preventDefault(),e.stopPropagation())}var Ot=[`title`,`onClick`],kt=[`onClick`],At={class:`mx-auto flex`},jt={key:0},Mt={class:`w-full text-xs p2`},Nt={class:`text-main text-opacity-50!`},Pt=m({__name:`ContextMenu`,setup(e){let n=C();Ge(n,Et),Ke(document,`mousedown`,e=>{e.buttons&2&&Et()},{passive:!0,capture:!0});let i=E(()=>P.contextMenu!=null),o=Xe();g(o,e=>{e||Et()}),st(1);let{width:c,height:l}=We(n),u=E(()=>{let e=wt.value?.x;return e?e+c.value>he.width.value?he.width.value-c.value:e:0}),d=E(()=>{let e=wt.value?.y;return e?e+l.value>he.height.value?he.height.value-l.value:e:0});return(e,o)=>N(wt)?(t(),y(`div`,{key:0,ref_key:`container`,ref:n,style:p(`left:${u.value}px;top:${d.value}px`),class:`slidev-glass-effect fixed z-context-menu w-60 flex flex-wrap justify-items-start p-1 animate-fade-in animate-duration-100 rounded-md shadow overflow-hidden select-none`,onContextmenu:o[1]||=T(()=>{},[`prevent`]),onClick:o[2]||=(...e)=>N(Et)&&N(Et)(...e)},[(t(!0),y(k,null,a(N(wt).items.value,(e,n)=>(t(),y(k,{key:n},[e===`separator`?(t(),y(`div`,{key:n,class:`w-full my1 border-t border-main`})):e.show??!0?(t(),y(k,{key:1},[e.small?(t(),y(`div`,{key:0,class:b([`p-2 w-[40px] h-[40px] inline-block text-center cursor-pointer rounded flex`,e.disabled?`op40`:`hover:bg-active`]),title:e.label,onClick:e.action},[typeof e.icon==`string`?(t(),y(`div`,{key:0,class:b([e.icon,`text-1.2em ma`])},null,2)):(t(),A(s(e.icon),{key:1}))],10,Ot)):(t(),y(`div`,{key:1,class:b([`w-full grid grid-cols-[35px_1fr] p-2 pl-0 cursor-pointer rounded`,e.disabled?`op40`:`hover:bg-active`]),onClick:e.action},[_(`div`,At,[typeof e.icon==`string`?(t(),y(`div`,{key:0,class:b([e.icon,`text-1.2em ma`])},null,2)):(t(),A(s(e.icon),{key:1}))]),typeof e.label==`string`?(t(),y(`div`,jt,r(e.label),1)):(t(),A(s(e.label),{key:1}))],10,kt))],64)):M(`v-if`,!0)],64))),128)),i.value?M(`v-if`,!0):(t(),y(k,{key:0},[o[6]||=_(`div`,{class:`w-full my1 border-t border-main`},null,-1),_(`div`,Mt,[_(`div`,Nt,[o[3]||=f(` Hold `,-1),o[4]||=_(`kbd`,{class:`border px1 py0.5 border-main rounded text-primary`},`Shift`,-1),o[5]||=f(` and right click to open the native context menu `,-1),M(`v-if`,!0)])])],64))],36)):M(`v-if`,!0)}});function G(e){return Array.isArray?Array.isArray(e):Ht(e)===`[object Array]`}function Ft(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function It(e){return e==null?``:Ft(e)}function K(e){return typeof e==`string`}function Lt(e){return typeof e==`number`}function Rt(e){return e===!0||e===!1||Bt(e)&&Ht(e)==`[object Boolean]`}function zt(e){return typeof e==`object`}function Bt(e){return zt(e)&&e!==null}function q(e){return e!=null}function Vt(e){return!e.trim().length}function Ht(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Ut=`Incorrect 'index' type`,Wt=`Invalid doc index: must be a non-negative integer within the bounds of the docs array`,Gt=e=>`Invalid value for key ${e}`,Kt=e=>`Pattern length exceeds max of ${e}.`,qt=e=>`Missing ${e} property in key`,Jt=e=>`Property 'weight' in key '${e}' must be a positive integer`,Yt=`Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`,Xt=Object.prototype.hasOwnProperty,Zt=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=Qt(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function Qt(e){let t=null,n=null,r=null,i=1,a=null;if(K(e)||G(e))r=e,t=$t(e),n=en(e);else{if(!Xt.call(e,`name`))throw Error(qt(`name`));let o=e.name;if(r=o,Xt.call(e,`weight`)&&e.weight!==void 0&&(i=e.weight,i<=0))throw Error(Jt(en(o)));t=$t(o),n=en(o),a=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:a}}function $t(e){return G(e)?e:e.split(`.`)}function en(e){return G(e)?e.join(`.`):e}function tn(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(q(e)){if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!q(s))return;if(a===t.length-1&&(K(s)||Lt(s)||Rt(s)||typeof s==`bigint`))n.push(o===void 0?It(s):{v:It(s),i:o});else if(G(s)){r=!0;for(let e=0,n=s.length;ee.score===t.score?e.idx=9&&e<=13||e===32||e===160}function cn(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=0,a=!1;for(let e=0;e{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;let e=this.docs.length;this.records=Array(e);let t=0;if(K(this.docs[0]))for(let n=0;ne&&--this.records[t].i}removeAll(e){let t=new Set;for(let n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(t.size===0)return;this.records=this.records.filter(e=>!t.has(e.i));let n=Array.from(t).sort((e,t)=>e-t);for(let e of this.records){let t=0,r=n.length;for(;t>>1;n[i]t),records:this.records}}};function un(e,t,{getFn:n=J.getFn,fieldNormWeight:r=J.fieldNormWeight}={}){let i=new ln({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(Qt)),i.setSources(t),i.create(),i}function dn(e,{getFn:t=J.getFn,fieldNormWeight:n=J.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new ln({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function fn(e=[],t=J.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}function pn(e,t,n,{location:r=J.location,distance:i=J.distance,threshold:a=J.threshold,findAllMatches:o=J.findAllMatches,minMatchCharLength:s=J.minMatchCharLength,includeMatches:c=J.includeMatches,ignoreLocation:l=J.ignoreLocation}={}){if(t.length>32)throw Error(Kt(32));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e=a;--r){let i=r-1,o=n[e[i]];if(c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&C&&(b=h(t,i),b<=p)){if(p=b,m=i,x=t,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}if(g&&m>=0){let t=Math.min(d-1,m+u-1+x);for(let r=m;r<=t;r+=1)n[e[r]]&&(_[r]=1)}let w={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=fn(_,s);e.length?c&&(w.indices=e):w.isMatch=!1}return w}function mn(e){let t={};for(let n=0,r=e.length;ne[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;ne.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``).replace(_n,e=>gn[e]):e=>e,yn=class{constructor(e,{location:t=J.location,threshold:n=J.threshold,distance:r=J.distance,includeMatches:i=J.includeMatches,findAllMatches:a=J.findAllMatches,minMatchCharLength:o=J.minMatchCharLength,isCaseSensitive:s=J.isCaseSensitive,ignoreDiacritics:c=J.ignoreDiacritics,ignoreLocation:l=J.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?vn(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:mn(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0,t=d%32,n=d-t;for(;e{let{isMatch:m,score:h,indices:g}=pn(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=hn(u)),p}},bn=new Set([`fuzzy`,`include`]);function xn(e){return e.startsWith(`inverse`)}var Sn=[{type:`exact`,multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:`exact`,search(t){let n=t===e;return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`include`,multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:`include`,search(t){let n=0,r,i=[],a=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+a,i.push([r,n-1]);let o=!!i.length;return{isMatch:o,score:+!o,indices:i}}})},{type:`prefix-exact`,multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:`prefix-exact`,search(t){let n=t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`inverse-prefix-exact`,multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:`inverse-prefix-exact`,search(t){let n=!t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`inverse-suffix-exact`,multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:`inverse-suffix-exact`,search(t){let n=!t.endsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`suffix-exact`,multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:`suffix-exact`,search(t){let n=t.endsWith(e);return{isMatch:n,score:+!n,indices:[t.length-e.length,t.length-1]}}})},{type:`inverse-exact`,multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:`inverse-exact`,search(t){let n=t.indexOf(e)===-1;return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`fuzzy`,multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let n=new yn(e,{location:t.location??J.location,threshold:t.threshold??J.threshold,distance:t.distance??J.distance,includeMatches:t.includeMatches??J.includeMatches,findAllMatches:t.findAllMatches??J.findAllMatches,minMatchCharLength:t.minMatchCharLength??J.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??J.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??J.ignoreDiacritics,ignoreLocation:t.ignoreLocation??J.ignoreLocation});return{type:`fuzzy`,search(e){return n.searchIn(e)}}}}],Cn=Sn.length,wn=`\0`,Tn=`|`;function En(e){let t=[],n=e.length,r=0;for(;r=n)break;let i=r;for(;i=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i{let n=En(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e!!(e[Nn.AND]||e[Nn.OR]),In=e=>!!e[Pn.PATH],Ln=e=>!G(e)&&zt(e)&&!Fn(e),Rn=e=>({[Nn.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function zn(e,t,{auto:n=!0}={}){let r=e=>{if(K(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=Mn(e,t)),r}let i=Object.keys(e),a=In(e);if(!a&&i.length>1&&!Fn(e))return r(Rn(e));if(Ln(e)){let r=a?e[Pn.PATH]:i[0],o=a?e[Pn.PATTERN]:e[r];if(!K(o))throw Error(Gt(r));let s={keyId:en(r),pattern:o};return n&&(s.searcher=Mn(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];G(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return Fn(e)||(e=Rn(e)),r(e)}function Bn(e,{ignoreFieldNorm:t=J.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function Vn(e,{ignoreFieldNorm:t=J.ignoreFieldNorm}){e.forEach(e=>{e.score=Bn(e.matches,{ignoreFieldNorm:t})})}var Hn=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size0;){let n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i0&&(r=i),a0&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function Un(e){let t=[];return e.matches.forEach(e=>{if(!q(e.indices)||!e.indices.length)return;let n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.id),e.idx>-1&&(n.refIndex=e.idx),t.push(n)}),t}function Wn(e,t,{includeMatches:n=J.includeMatches,includeScore:r=J.includeScore}={}){return e.map(e=>{let{idx:i}=e,a={item:t[i],refIndex:i};return n&&(a.matches=Un(e)),r&&(a.score=e.score),a})}var Gn=/[\p{L}\p{M}\p{N}_]+/gu,Kn=new WeakSet;function qn(e){Kn.has(e)||(Kn.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function Jn(e){if(typeof e==`function`){let t=!1;return n=>{let r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>typeof e!=`string`)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?`array containing non-strings`:typeof r}.`);return r}}return e instanceof RegExp?(e.global||qn(e),t=>t.match(e)||[]):e=>e.match(Gn)||[]}function Yn({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=Jn(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=vn(n)),r(n)}}}var Xn=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=Yn({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new yn(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}this.combineAll=t.tokenMatch===`all`,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0,a=0,o=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(c.indices=hn(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}};function Zn(e,t,n,r){let i=r.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);let a=new Set(i),o=e.docTermFieldHits.get(n);o||(o=new Map,e.docTermFieldHits.set(n,o));for(let t of a)o.set(t,(o.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function Qn(e,t,n,r){let{i,v:a,$:o}=t;if(a!==void 0){Zn(e,a,i,r);return}if(o)for(let t=0;te-t);for(let t of n)tr(e,t);let r=e=>{let t=0,r=n.length;for(;t>>1;n[i]i?r(t):t,n);e.docFieldCount=a;let o=new Map;for(let[t,n]of e.docTermFieldHits)o.set(t>i?r(t):t,n);e.docTermFieldHits=o}var Y=class{constructor(e,t,n){this.options={...J,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Zt(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=Mn(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof ln))throw Error(Ut);if(this._myIndex=t||un(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=Yn({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=$n(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!q(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){let e=Yn({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});er(this._invertedIndex,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r!e.has(n)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw Error(Wt);this._invertedIndex&&nr(this._invertedIndex,[e]);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(K(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return Lt(n)&&n>-1&&(e=e.slice(0,n)),e}let c=a&&Lt(n)&&n>0&&K(e),l=o,u=(e,t)=>l(e,t)||e.idx-t.idx,d;if(c){let t=new Hn(n,u);K(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),d=t.extractSorted()}else d=K(e)?K(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),Vn(d,{ignoreFieldNorm:s}),a&&d.sort(K(e)?u:l),Lt(n)&&n>-1&&(d=d.slice(0,n));return Wn(d,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=t?null:[];return a.forEach(({v:e,i:a,n:s})=>{if(!q(e))return;let c=r.searchIn(e);if(c.isMatch){let r={score:c.score,value:e,norm:s,indices:c.indices};i&&(r.matchedMask=c.matchedMask,r.matchedTerms=c.matchedTerms,r.termCount=c.termCount);let l=[r];if(!i||this._coversAllTokens(l)){let r={item:e,idx:a,matches:l};t?(r.score=Bn(r.matches,{ignoreFieldNorm:n}),t.insert(r)):o.push(r)}}}),o}_searchLogical(e){let t=zn(e,this.options),n=this._normalizedKeys(),r=(e,t,i)=>{if(!(`children`in e)){let{keyId:r,searcher:a}=e,o;return r===null?(o=[],n.forEach((e,n)=>{o.push(...this._findMatches({key:e,value:t[n],searcher:a}))})):o=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:a}),o&&o.length?[{idx:i,item:t,matches:o}]:[]}let{children:a,operator:o}=e,s=[];for(let e=0,n=a.length;e{if(q(e)){let i=r(t,e,n);i.length&&(a.has(n)||(a.set(n,{idx:n,item:e,matches:[]}),o.push(a.get(n))),i.forEach(({matches:e})=>{a.get(n).matches.push(...e)}))}}),o}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=this._normalizedKeys(),s=t?null:[];return a.forEach(({$:e,i:a})=>{if(!q(e))return;let c=[],l=!1,u=!1;if(o.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(c.push(...i),i[0].hasInverse&&(u=!0)):l=!0}),!(u&&l)&&c.length&&(!i||this._coversAllTokens(c))){let r={idx:a,item:e,matches:c};t?(r.score=Bn(r.matches,{ignoreFieldNorm:n}),t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!q(t))return[];let r=[];if(G(t))t.forEach(({v:t,i,n:a})=>{if(!q(t))return;let o=n.searchIn(t);if(o.isMatch){let n={score:o.score,key:e,value:t,idx:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(n.matchedMask=o.matchedMask,n.matchedTerms=o.matchedTerms,n.termCount=o.termCount),r.push(n)}});else{let{v:i,n:a}=t,o=n.searchIn(i);if(o.isMatch){let t={score:o.score,key:e,value:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(t.matchedMask=o.matchedMask,t.matchedTerms=o.matchedTerms,t.termCount=o.termCount),r.push(t)}}return r}_coversAllTokens(e){let t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let n=0;for(let t=0;tjn(e))};var rr=Y,ir={key:0},ar={key:1},or={key:2},sr={key:3},cr={key:4},lr={key:5},ur={key:6},dr={key:7},fr={key:8},pr={key:9},mr={key:10},hr={key:11},gr={key:12},_r={key:13},vr={key:14},yr={key:15},br={key:16},xr={key:17},Sr={key:18},Cr={key:19},wr={key:20},Tr={key:21},Er={key:22},Dr={key:23},Or={key:24},kr={key:25},Ar={key:26},jr={key:27},Mr={key:28},Nr={key:29},Pr=m({__name:`title-renderer`,props:{no:{}},setup(e){let n=e,{$page:r}=et(),i=E(()=>+(n.no??r.value));return(e,n)=>(t(),y(`div`,null,[i.value===1?(t(),y(`p`,ir,`Introduction to Deep Learning`)):i.value===2?(t(),y(`p`,ar,`Introduction to Deep Learning`)):i.value===3?(t(),y(`p`,or,`Who am I?`)):i.value===4?(t(),y(`p`,sr,`undefined`)):i.value===5?(t(),y(`p`,cr,`Class representatives`)):i.value===6?(t(),y(`p`,lr,`Outline`)):i.value===7?(t(),y(`p`,ur,`Introduction to course content`)):i.value===8?(t(),y(`p`,dr,`Workload`)):i.value===9?(t(),y(`p`,fr,`References`)):i.value===10?(t(),y(`p`,pr,`What we will learn`)):i.value===11?(t(),y(`p`,mr,`What is deep learning?`)):i.value===12?(t(),y(`p`,hr,`What do you think about these photos?`)):i.value===13?(t(),y(`p`,gr,`From a sentence to an image`)):i.value===14?(t(),y(`p`,_r,`Large language models`)):i.value===15?(t(),y(`p`,vr,`Try them yourself`)):i.value===16?(t(),y(`p`,yr,`Can we use DL knowledge to earn money?`)):i.value===17?(t(),y(`p`,br,`Definition of deep learning`)):i.value===18?(t(),y(`p`,xr,`Three different types of machine learning`)):i.value===19?(t(),y(`p`,Sr,`Application of deep learning`)):i.value===20?(t(),y(`p`,Cr,`Some applications of DL`)):i.value===21?(t(),y(`p`,wr,`Computer vision categories`)):i.value===22?(t(),y(`p`,Tr,`Our projects`)):i.value===23?(t(),y(`p`,Er,`Synthetic polyp generation`)):i.value===24?(t(),y(`p`,Dr,`Synthetic ECG`)):i.value===25?(t(),y(`p`,Or,`The main pipeline`)):i.value===26?(t(),y(`p`,kr,`Collecting data is its own pipeline`)):i.value===27?(t(),y(`p`,Ar,`Deep learning frameworks`)):i.value===28?(t(),y(`p`,jr,`Frameworks`)):i.value===29?(t(),y(`p`,Mr,`Hardware`)):i.value===30?(t(),y(`p`,Nr,`Practical session — Week 1`)):M(`v-if`,!0)]))}}),Fr={class:`bg-main transform`,shadow:`~`,p:`x-4 y-2`,border:`~ transparent rounded dark:main`},Ir=[`value`,`disabled`],Lr={table:``,"w-full":``,"border-collapse":``},Rr=[`border`,`onClick`],zr={"text-right":``,op50:``,"text-sm":``,"table-cell":``,"py-2":``,"pl-4":``,"pr-3":``,"vertical-middle":``},Br=Re(m({__name:`Goto`,setup(e){let i=C(),o=C(),s=C(),c=C(),l=C(``),u=C(0),{go:d,slides:f}=V();function p(e){return e!=null}let m=E(()=>new rr(f.value.map(e=>e.meta?.slide).filter(p),{keys:[`no`,`title`],threshold:.3,shouldSort:!0,minMatchCharLength:1})),h=E(()=>l.value.startsWith(`/`)?l.value.substring(1):l.value),v=E(()=>h.value?m.value.search(h.value).map(e=>e.item):[]),x=E(()=>!!v.value.length);function w(){if(x.value){let e=v.value.at(u.value||0);e&&d(e.no)}D()}function D(){l.value=``,R.value=!1}function ee(e){e.preventDefault(),u.value++,u.value>=v.value.length&&(u.value=0),te()}function O(e){e.preventDefault(),u.value--,u.value<=-2&&(u.value=v.value.length-1),te()}function te(){let e=c.value?.[u.value];e&&s.value&&(e.offsetTop+e.offsetHeight>s.value.offsetHeight+s.value.scrollTop?s.value.scrollTo({behavior:`smooth`,top:e.offsetTop+e.offsetHeight-s.value.offsetHeight+1}):e.offsetTop{e?(l.value=``,u.value=0,setTimeout(()=>o.value?.focus(),0)):o.value?.blur()}),g(je,()=>{i.value?.contains(je.value)||D()}),(e,d)=>(t(),y(`div`,{id:`slidev-goto-dialog`,ref_key:`container`,ref:i,class:b([`fixed right-5 transition-all`,N(R)?`top-5`:`-top-20 op0 pointer-events-none`]),"w-90":``,"max-w-90":``,"min-w-90":``},[_(`div`,Fr,[_(`input`,{id:`slidev-goto-input`,ref_key:`input`,ref:o,value:l.value,type:`text`,disabled:!N(R),class:b([`outline-none bg-transparent`,{"text-red-400":!x.value&&l.value}]),placeholder:`Goto...`,onKeydown:[S(w,[`enter`]),S(D,[`escape`]),S(ee,[`down`]),S(O,[`up`])],onInput:ne},null,42,Ir)]),N(R)&&v.value.length>0?(t(),y(`div`,{key:0,ref_key:`list`,ref:s,class:`autocomplete-list`,shadow:`~`,border:`~ transparent rounded dark:main`},[_(`ul`,Lr,[(t(!0),y(k,null,a(v.value,(e,i)=>(t(),y(`li`,{ref_for:!0,ref_key:`items`,ref:c,key:e.id,role:`button`,tabindex:`0`,"cursor-pointer":``,hover:`op100`,"table-row":``,"items-center":``,border:i===0?void 0:`t main`,class:b(u.value===i?`bg-active op100`:`op80`),onClick:T(t=>re(e.no),[`stop`,`prevent`])},[_(`div`,zr,r(e.no),1),n(N(Pr),{"table-cell":``,"py-2":``,"pr-4":``,"w-full":``,no:e.no},null,8,[`no`])],10,Rr))),128))])],512)):M(`v-if`,!0)],2))}}),[[`__scopeId`,`data-v-61e41ebd`]]),Vr=C(1),Hr=E(()=>_e.value.length),X=C(0),Ur=C(0);function Wr(){X.value>Vr.value&&--X.value}function Gr(){X.valueVr.value){let e=X.value-Ur.value;eHr.value&&(e=Hr.value),X.value=e}}var Jr=[`onClick`],Yr={class:`text-green font-bold`},Xr={class:`opacity-50`},Zr={key:1,class:`opacity-50`},Qr={class:`fixed top-4 right-4 z-modal text-gray-400 flex flex-col items-center gap-2`},$r=128,ei=32,ti=m({__name:`QuickOverview`,setup(e){let{currentSlideNo:i,go:o,slides:s}=V();function c(){F.value=!1}function l(e){o(e),c()}function d(e){return e===X.value}let f=De.smaller(`xs`),m=De.smaller(`sm`),h=E(()=>f.value?he.width.value-$r:m.value?(he.width.value-$r-ei)/2:300),g=E(()=>Math.floor((he.width.value-$r)/(h.value+ei))),x=C(``);return Ke(`keypress`,e=>{if(!F.value){x.value=``;return}if(e.key===`Enter`){e.preventDefault(),x.value?(l(+x.value),x.value=``):l(X.value);return}let t=Number.parseInt(e.key.replace(/\D/g,``));if(Number.isNaN(t)){x.value=``;return}if(!x.value&&t===0)return;if(x.value+=String(t),+x.value>s.value.length){x.value=``;return}let n=s.value.findIndex(e=>`/${e.no}`===x.value);n!==-1&&(X.value=n+1),x.value*10>s.value.length&&(l(+x.value),x.value=``)}),u(()=>{X.value=i.value,Ur.value=g.value}),(e,i)=>(t(),y(k,null,[n(v,{"enter-active-class":`duration-150 ease-out`,"enter-from-class":`opacity-0 scale-102 !backdrop-blur-0px`,"leave-active-class":`duration-200 ease-in`,"leave-to-class":`opacity-0 scale-102 !backdrop-blur-0px`},{default:w(()=>[N(F)?(t(),y(`div`,{key:0,class:`fixed left-0 right-0 top-0 h-[calc(var(--vh,1vh)*100)] z-modal bg-main !bg-opacity-75 p-16 py-20 overflow-y-auto backdrop-blur-5px select-none`,onClick:c},[_(`div`,{class:`grid gap-y-4 gap-x-8 w-full`,style:p(`grid-template-columns: repeat(auto-fit,minmax(${h.value}px,1fr))`)},[(t(!0),y(k,null,a(N(s),(e,i)=>(t(),y(`div`,{key:e.no,class:`relative`},[_(`div`,{class:b([`inline-block border rounded overflow-hidden bg-main hover:border-primary transition`,d(i+1)||N(X)===i+1?`border-primary`:`border-main`]),onClick:t=>l(e.no)},[(t(),A(dt,{key:e.no,no:e.no,"use-snapshot":!0,width:h.value,class:`pointer-events-none`},{default:w(()=>[n(ht,{"clicks-context":N(ve)(e,N($e)),route:e,"render-context":`overview`},null,8,[`clicks-context`,`route`]),n(pt,{page:e.no},null,8,[`page`])]),_:2},1032,[`no`,`width`]))],10,Jr),_(`div`,{class:`absolute top-0`,style:p(`left: ${h.value+5}px`)},[x.value&&String(i+1).startsWith(x.value)?(t(),y(k,{key:0},[_(`span`,Yr,r(x.value),1),_(`span`,Xr,r(String(i+1).slice(x.value.length)),1)],64)):(t(),y(`span`,Zr,r(i+1),1))],4)]))),128))],4)])):M(`v-if`,!0)]),_:1}),ae(_(`div`,Qr,[n(W,{title:`Close`,class:`text-2xl`,onClick:c},{default:w(()=>[...i[0]||=[_(`div`,{class:`i-carbon:close`},null,-1)]]),_:1}),(t(),A(W,{key:0,as:`a`,title:`Slides Overview`,target:`_blank`,href:`${N(Ae)}overview`,"tab-index":`-1`,class:`text-2xl`},{default:w(()=>[...i[1]||=[_(`div`,{class:`i-carbon:list-boxes`},null,-1)]]),_:1},8,[`href`])),M(`v-if`,!0)],512),[[oe,N(F)]])],64))}});function ni(){let e=Ye();return E(()=>{let t=ut.value?.getBoundingClientRect();if(!t)return;let n=(e.x.value-t.left)/t.width*100,r=(e.y.value-t.top)/t.height*100;if(!(n<0||n>100||r<0||r>100))return{x:n,y:r}})}var ri={key:0,class:`absolute top-0 left-0 right-0 bottom-0 pointer-events-none text-xl`},ii=Re(m({__name:`LaserPointer`,setup(e){let n=ni(),{isPresenter:r}=V(),i=E(()=>!r.value&&it.cursor?.style===`laser`?it.cursor:z.value===`laser`?n.value:null);return d(()=>{u(()=>{document.body.classList.toggle(`slidev-self-laser-active`,z.value===`laser`&&!!i.value)})}),(e,n)=>i.value?(t(),y(`div`,ri,[_(`div`,{class:`laser-pointer`,style:p({left:`${i.value.x}%`,top:`${i.value.y}%`})},null,4)])):M(`v-if`,!0)}}),[[`__scopeId`,`data-v-1d1438ab`]]),ai={render:()=>[]},oi={key:0,class:`bg-main text-main shadow-xl absolute bottom-10 left-0 z-menu py2`,border:`~ main rounded-md`},si=m({__name:`MenuButton`,props:{modelValue:{default:!1},disabled:{default:!1}},setup(e,{emit:n}){let r=Ue(e,`modelValue`,n,{passive:!0}),i=C();return Ge(i,()=>{r.value=!1}),(n,a)=>(t(),y(`div`,{ref_key:`el`,ref:i,class:`flex relative`},[_(`button`,{class:b({disabled:e.disabled}),onClick:a[0]||=e=>r.value=!N(r)},[h(n.$slots,`button`,{value:N(r),class:b({disabled:e.disabled})})],2),(t(),A(D,null,[N(r)?(t(),y(`div`,oi,[h(n.$slots,`menu`)])):M(`v-if`,!0)],1024))],512))}}),ci={border:`~ main rounded`,flex:`~ gap-2 items-center`,relative:``,"h-5":``,"w-5":``,"p0.5":``,"hover:bg-active":``,p1:``},li=[`disabled`],ui=m({__name:`FormCheckbox`,props:c({disabled:{type:Boolean}},{modelValue:{type:Boolean,type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=o(e,`modelValue`);return(r,i)=>(t(),y(`div`,ci,[_(`div`,{"i-ri-check-line":``,class:b(n.value?``:`op0`)},null,2),ae(_(`input`,{"onUpdate:modelValue":i[0]||=e=>n.value=e,type:`checkbox`,absolute:``,"inset-0":``,"opacity-10":``,disabled:e.disabled},null,8,li),[[x,n.value]])]))}}),di={"w-30":``,"h-8":``,flex:`~ gap-1 items-center`},fi={key:0,"w-1.5":``,"h-1.5":``,"bg-primary":``,rounded:``,absolute:``,"top-0":``,"right--2":``},pi={key:0,"w-1.5":``,"h-1.5":``,"bg-primary":``,rounded:``,absolute:``,"top-0":``,"right--2":``},mi=[`innerHTML`],Z=m({__name:`FormItem`,props:{title:{},nested:{type:[Boolean,Number]},div:{type:Boolean},description:{},dot:{type:Boolean}},emits:[`reset`],setup(e,{emit:n}){let i=n;function a(){i(`reset`)}return(n,i)=>(t(),A(s(e.div?`div`:`label`),{flex:`~ row gap-2 items-center`,"select-none":``},{default:w(()=>[_(`div`,di,[e.nested?(t(),y(`div`,{key:0,"i-ri-corner-down-right-line":``,op40:``,style:p(typeof e.nested==`number`?{marginLeft:`${e.nested*.5+.5}rem`}:{marginLeft:`0.25rem`})},null,4)):M(`v-if`,!0),e.description?(t(),A(N(ne),{key:2,distance:`10`},{popper:w(()=>[_(`div`,{"text-sm":``,"min-w-90":``,innerHTML:e.description},null,8,mi)]),default:w(()=>[_(`div`,{op75:``,"text-right":``,relative:``,onDblclick:a},[f(r(e.title)+` `,1),e.dot?(t(),y(`div`,pi)):M(`v-if`,!0)],32)]),_:1})):(t(),y(`div`,{key:1,op75:``,relative:``,onDblclick:a},[f(r(e.title)+` `,1),e.dot?(t(),y(`div`,fi)):M(`v-if`,!0)],32))]),h(n.$slots,`default`)]),_:3}))}}),hi={relative:``,"h-22px":``},gi={key:0,"pointer-events-none":``,absolute:``,"right-1":``,"top-0.5":``,"text-xs":``,op25:``},_i=m({__name:`FormSlider`,props:c({max:{},min:{},step:{},unit:{},default:{}},{modelValue:{type:Number},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,i=o(e,`modelValue`);return(a,o)=>(t(),y(k,null,[_(`div`,{relative:``,"h-22px":``,"w-60":``,"flex-auto":``,onDblclick:o[1]||=e=>n.default===void 0?null:i.value=n.default},[ae(_(`input`,l({"onUpdate:modelValue":o[0]||=e=>i.value=e,type:`range`,class:`slider`},n,{absolute:``,"bottom-0":``,"left-0":``,"right-0":``,"top-0":``,"z-10":``,"w-full":``,"align-top":``}),null,16),[[O,i.value,void 0,{number:!0}]]),n.default==null?M(`v-if`,!0):(t(),y(`span`,{key:0,border:`r main`,absolute:``,"bottom-0":``,"top-0":``,"h-full":``,"w-1px":``,op75:``,style:p({left:`${(n.default-e.min)/(e.max-e.min)*100}%`})},null,4))],32),_(`div`,hi,[ae(_(`input`,l({"onUpdate:modelValue":o[2]||=e=>i.value=e,type:`number`},n,{border:`~ main rounded`,m0:``,"w-20":``,"bg-gray:5":``,pl2:``,"align-top":``,"text-sm":``}),null,16),[[O,i.value,void 0,{number:!0}]]),n.unit?(t(),y(`span`,gi,r(n.unit),1)):M(`v-if`,!0)])],64))}}),vi={error:0,client:60,Light:60,Dark:240};function yi(e,t=1){if(vi[e])return bi(vi[e],t);let n=0;for(let t=0;t!n.text||n.color===!1?{}:{color:typeof n.color==`number`?bi(n.color):yi(n.text),background:typeof n.color==`number`?bi(n.color,.1):yi(n.text,.1)}),a=E(()=>(n.size||`sm`)===`sm`?`px-1.5 text-11px leading-1.6em`:``);return(o,c)=>(t(),A(s(e.as||`span`),{"ws-nowrap":``,rounded:``,class:b(a.value),style:p(i.value)},{default:w(()=>[h(o.$slots,`default`,{},()=>[_(`span`,{textContent:r(n.text)},null,8,xi)])]),_:3},8,[`class`,`style`]))}}),Ci={flex:`~ gap-1 items-center`,rounded:``,"bg-gray:4":``,p1:``,"m--1":``},wi=m({__name:`SegmentControl`,props:{options:{},modelValue:{}},emits:[`update:modelValue`],setup(e){return(n,r)=>(t(),y(`div`,Ci,[(t(!0),y(k,null,a(e.options,r=>(t(),A(Si,{key:r.value,class:b([`px-2 py-1 text-xs font-mono`,r.value===e.modelValue?``:`op50`]),color:r.value===e.modelValue,"aria-pressed":r.value===e.modelValue,size:`none`,text:r.label,as:`button`,onClick:e=>n.$emit(`update:modelValue`,r.value)},null,8,[`class`,`color`,`aria-pressed`,`text`,`onClick`]))),128))]))}}),Ti={"text-sm":``,"select-none":``,flex:`~ col gap-1`,"min-w-30":``,px4:``},Ei=m({__name:`Settings`,setup(e){let{isPresenter:r}=V(),{isSupported:i}=Be();return(e,a)=>(t(),y(`div`,Ti,[n(Z,{title:`Invert`,dot:N(I).invert!==N(L).invert,onReset:a[1]||=e=>N(I).invert=N(L).invert},{default:w(()=>[n(ui,{modelValue:N(I).invert,"onUpdate:modelValue":a[0]||=e=>N(I).invert=e},null,8,[`modelValue`])]),_:1},8,[`dot`]),n(Z,{title:`Brightness`,dot:N(I).brightness!==N(L).brightness,onReset:a[3]||=e=>N(I).brightness=N(L).brightness},{default:w(()=>[n(_i,{modelValue:N(I).brightness,"onUpdate:modelValue":a[2]||=e=>N(I).brightness=e,max:1.5,min:.5,step:.02,default:N(L).brightness},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),n(Z,{title:`Contrast`,dot:N(I).contrast!==N(L).contrast,onReset:a[5]||=e=>N(I).contrast=N(L).contrast},{default:w(()=>[n(_i,{modelValue:N(I).contrast,"onUpdate:modelValue":a[4]||=e=>N(I).contrast=e,max:1.5,min:.5,step:.02,default:N(L).contrast},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),n(Z,{title:`Saturation`,dot:N(I).saturate!==N(L).saturate,onReset:a[7]||=e=>N(I).saturate=N(L).saturate},{default:w(()=>[n(_i,{modelValue:N(I).saturate,"onUpdate:modelValue":a[6]||=e=>N(I).saturate=e,max:1.5,min:.5,step:.02,default:N(L).saturate},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),n(Z,{title:`Sepia`,dot:N(I).sepia!==N(L).sepia,onReset:a[9]||=e=>N(I).sepia=N(L).sepia},{default:w(()=>[n(_i,{modelValue:N(I).sepia,"onUpdate:modelValue":a[8]||=e=>N(I).sepia=e,max:2,min:-2,step:.02,default:N(L).sepia},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),n(Z,{title:`Hue Rotate`,dot:N(I).hueRotate!==N(L).hueRotate,onReset:a[11]||=e=>N(I).hueRotate=N(L).hueRotate},{default:w(()=>[n(_i,{modelValue:N(I).hueRotate,"onUpdate:modelValue":a[10]||=e=>N(I).hueRotate=e,max:180,min:-180,step:.1,default:N(L).hueRotate},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),a[16]||=_(`div`,{class:`h-1px opacity-5 bg-current w-full my2`},null,-1),n(Z,{title:`Cursor Style`},{default:w(()=>[n(wi,{modelValue:N(z),"onUpdate:modelValue":a[12]||=e=>ie(z)?z.value=e:null,options:[{label:`Cursor`,value:`cursor`},{label:`Laser`,value:`laser`}]},null,8,[`modelValue`])]),_:1}),N(r)?M(`v-if`,!0):(t(),A(Z,{key:0,title:`Slide Scale`},{default:w(()=>[n(wi,{modelValue:N(se),"onUpdate:modelValue":a[13]||=e=>ie(se)?se.value=e:null,options:[{label:`Fit`,value:0},{label:`1:1`,value:1}]},null,8,[`modelValue`])]),_:1})),N(i)?(t(),A(Z,{key:1,title:`Wake Lock`},{default:w(()=>[n(ui,{modelValue:N(ue),"onUpdate:modelValue":a[14]||=e=>ie(ue)?ue.value=e:null},null,8,[`modelValue`])]),_:1})):M(`v-if`,!0),N(r)?M(`v-if`,!0):(t(),A(Z,{key:2,title:`Hide Idle Cursor`},{default:w(()=>[n(ui,{modelValue:N(Te),"onUpdate:modelValue":a[15]||=e=>ie(Te)?Te.value=e:null},null,8,[`modelValue`])]),_:1}))]))}}),Di={class:`select-list`},Oi={class:`title`},ki={class:`items`},Ai=[`onClick`],ji=Re(m({__name:`SelectList`,props:{modelValue:{type:[Object,String,Number,Boolean]},title:{type:String},items:{type:Array}},setup(e,{emit:n}){let i=Ue(e,`modelValue`,n,{passive:!0});return(n,o)=>(t(),y(`div`,Di,[_(`div`,Oi,r(e.title),1),_(`div`,ki,[(t(!0),y(k,null,a(e.items,e=>(t(),y(`div`,{key:e.value,class:b([`item`,{active:N(i)===e.value}]),onClick:()=>{i.value=e.value,e.onClick?.()}},[_(`div`,{class:b([`i-carbon:checkmark text-green-500 mya`,{"opacity-0":N(i)!==e.value}])},null,2),_(`div`,{class:b({"opacity-50":N(i)!==e.value})},r(e.display||e.value),3)],10,Ai))),128))])]))}}),[[`__scopeId`,`data-v-aa3b28a6`]]),Mi={"text-sm":``,flex:`~ col gap-2`},Ni={px3:``,"ws-nowrap":``},Pi={"font-bold":``,"text-primary":``},Fi=m({__name:`SyncControls`,setup(e){let{isPresenter:i}=V(),a=E({get:()=>i.value?B.value.presenterReceive:B.value.viewerReceive,set(e){i.value?B.value.presenterReceive=e:B.value.viewerReceive=e}}),o=E({get:()=>i.value?B.value.presenterSend:B.value.viewerSend,set(e){i.value?B.value.presenterSend=e:B.value.viewerSend=e}}),s=E({get:()=>a.value&&o.value?`bidirectional`:a.value&&!o.value?`receive-only`:!a.value&&o.value?`send-only`:`off`,set(e){switch(e){case`bidirectional`:a.value=!0,o.value=!0;break;case`receive-only`:a.value=!0,o.value=!1;break;case`send-only`:a.value=!1,o.value=!0;break;case`off`:a.value=!1,o.value=!1}}});return(e,c)=>(t(),A(si,null,{button:w(()=>[n(W,{title:`Change sync settings`},{default:w(()=>[_(`div`,{class:b([`i-ph:arrow-up-bold mx--1.2 scale-x-80`,o.value?`text-green6 dark:text-green`:`op30`])},null,2),_(`div`,{class:b([`i-ph:arrow-down-bold mx--1.2 scale-x-80`,a.value?`text-green6 dark:text-green`:`op30`])},null,2)]),_:1})]),menu:w(()=>[_(`div`,Mi,[_(`div`,Ni,[c[1]||=_(`span`,{op75:``},`Slides navigation syncing for `,-1),_(`span`,Pi,r(N(i)?`presenter`:`viewer`),1)]),c[2]||=_(`div`,{class:`h-1px opacity-10 bg-current w-full`},null,-1),n(ji,{modelValue:s.value,"onUpdate:modelValue":c[0]||=e=>s.value=e,title:`Sync Mode`,items:[{value:`bidirectional`,display:`Bidirectional Sync`},{value:`receive-only`,display:`Receive Only`},{value:`send-only`,display:`Send Only`},{value:`off`,display:`Disable`}]},null,8,[`modelValue`])])]),_:1}))}}),Ii={key:0,class:`i-carbon:minimize`},Li={key:1,class:`i-carbon:maximize`},Ri={key:0,class:`i-carbon-moon`},zi={key:1,class:`i-carbon-sun`},Bi={key:0,class:`i-carbon-magic-wand-filled color-red-600 dark:color-red-400`},Vi={key:1,class:`i-carbon-magic-wand`},Hi={key:0,class:`i-ph-cursor-fill`},Ui={key:1,class:`i-ph-cursor-duotone`},Wi={key:0,"w-2":``,"h-2":``,"bg-primary":``,"rounded-full":``,absolute:``,"top-0.5":``,"right-0.5":``},Gi={class:`px2 my-auto`},Ki={class:`text-lg`},qi={class:`opacity-50 text-sm`},Ji=m({__name:`NavControls`,props:{persist:{default:!1}},setup(e){let i=e,{currentSlideNo:a,hasNext:o,hasPrev:s,isEmbedded:c,isPresenter:l,isPresenterAvailable:u,next:d,prev:m,total:h,enterPresenter:g,exitPresenter:v}=V(),{brush:x,drawingEnabled:S}=ct(),T=De.smaller(`md`),{isFullscreen:D,toggle:ee}=Ne,O=C();function ne(){O.value&&je.value&&O.value.contains(je.value)&&je.value.blur()}let re=E(()=>i.persist?`text-$slidev-controls-foreground bg-transparent`:`rounded-md bg-main shadow-xl border border-main`),ie=te();return(e,i)=>(t(),y(`nav`,{ref_key:`root`,ref:O,class:`flex flex-col`},[_(`div`,{class:b([`flex flex-wrap-reverse text-xl gap-0.5 p-1 lg:p-2`,re.value]),onMouseleave:ne},[N(c)?M(`v-if`,!0):(t(),A(W,{key:0,title:N(D)?`Close fullscreen`:`Enter fullscreen`,onClick:N(ee)},{default:w(()=>[N(D)?(t(),y(`div`,Ii)):(t(),y(`div`,Li))]),_:1},8,[`title`,`onClick`])),n(W,{disabled:!N(s),title:`Go to previous slide`,onClick:N(m)},{default:w(()=>[...i[6]||=[_(`div`,{class:`i-carbon:arrow-left`},null,-1)]]),_:1},8,[`disabled`,`onClick`]),n(W,{disabled:!N(o),title:`Go to next slide`,onClick:N(d)},{default:w(()=>[...i[7]||=[_(`div`,{class:`i-carbon:arrow-right`},null,-1)]]),_:1},8,[`disabled`,`onClick`]),N(c)?M(`v-if`,!0):(t(),A(W,{key:1,title:`Show slide overview`,onClick:i[0]||=e=>N(de)()},{default:w(()=>[...i[8]||=[_(`div`,{class:`i-carbon:apps`},null,-1)]]),_:1})),N(tt)?M(`v-if`,!0):(t(),A(W,{key:2,title:N(nt)?`Switch to light mode theme`:`Switch to dark mode theme`,onClick:i[1]||=e=>N(at)()},{default:w(()=>[N(nt)?(t(),y(`div`,Ri)):(t(),y(`div`,zi))]),_:1},8,[`title`])),n(lt),N(c)?M(`v-if`,!0):(t(),y(k,{key:3},[!N(l)&&!N(T)&&ie.value?(t(),y(k,{key:0},[n(N(ie)),n(lt)],64)):M(`v-if`,!0),N(l)?(t(),A(W,{key:1,title:N(z)===`laser`?N(pe)?`Disable laser pointer`:`Enable laser pointer`:N(pe)?`Hide presenter cursor`:`Show presenter cursor`,active:N(pe),onClick:i[2]||=e=>N(fe)()},{default:w(()=>[N(z)===`laser`?(t(),y(k,{key:0},[N(pe)?(t(),y(`div`,Bi)):(t(),y(`div`,Vi))],64)):(t(),y(k,{key:1},[N(pe)?(t(),y(`div`,Hi)):(t(),y(`div`,Ui))],64))]),_:1},8,[`title`,`active`])):M(`v-if`,!0),!N(P).drawings.presenterOnly||N(l)?(t(),A(W,{key:2,class:`relative`,title:N(S)?`Hide drawing toolbar`:`Show drawing toolbar`,active:N(S),onClick:i[3]||=e=>S.value=!N(S)},{default:w(()=>[i[9]||=_(`div`,{class:`i-carbon:pen`},null,-1),N(S)?(t(),y(`div`,{key:0,class:`absolute left-1 right-1 bottom-0 h-0.7 rounded-full`,style:p({background:N(x).color})},null,4)):M(`v-if`,!0)]),_:1},8,[`title`,`active`])):M(`v-if`,!0),n(lt),N(l)?(t(),A(W,{key:3,title:`Play Mode`,onClick:N(v)},{default:w(()=>[...i[10]||=[_(`div`,{class:`i-carbon:presentation-file`},null,-1)]]),_:1},8,[`onClick`])):M(`v-if`,!0),N(u)?(t(),A(W,{key:4,title:`Presenter Mode`,onClick:N(g)},{default:w(()=>[...i[11]||=[_(`div`,{class:`i-carbon:user-speaker`},null,-1)]]),_:1},8,[`onClick`])):M(`v-if`,!0),M(`v-if`,!0)],64)),(t(),y(k,{key:4},[N(P).download?(t(),A(W,{key:0,title:`Download as PDF`,onClick:N(rt)},{default:w(()=>[...i[13]||=[_(`div`,{class:`i-carbon:download`},null,-1)]]),_:1},8,[`onClick`])):M(`v-if`,!0)],64)),M(`v-if`,!0),!N(l)&&N(P).info&&!N(c)?(t(),A(W,{key:6,title:`Show info`,onClick:i[5]||=e=>le.value=!N(le)},{default:w(()=>[...i[15]||=[_(`div`,{class:`i-carbon:information`},null,-1)]]),_:1})):M(`v-if`,!0),N(c)?M(`v-if`,!0):(t(),y(k,{key:7},[n(lt),N(l)?(t(),A(W,{key:0,title:`Toggle Presenter Layout`,class:`aspect-ratio-initial flex items-center`,onClick:N(me)},{default:w(()=>[i[16]||=_(`div`,{class:`i-carbon:template`},null,-1),f(` `+r(N(Se)),1)]),_:1},8,[`onClick`])):M(`v-if`,!0),(t(),A(Fi,{key:1})),n(si,null,{button:w(({value:e})=>[n(W,{title:`More Options`,active:e},{default:w(()=>[i[17]||=_(`div`,{class:`i-carbon:settings-adjust`},null,-1),N(Ce)?(t(),y(`div`,Wi)):M(`v-if`,!0)]),_:1},8,[`active`])]),menu:w(()=>[n(Ei)]),_:1})],64)),N(c)?M(`v-if`,!0):(t(),A(lt,{key:8})),_(`div`,Gi,[_(`span`,Ki,r(N(a)),1),_(`span`,qi,` / `+r(N(h)),1)]),n(N(ai))],34)],512))}}),Yi=new Set,Xi=new Set,Zi=/\/$/;function Qi(e){return e.startsWith(`http`)||e.startsWith(`//`)?e:`${`/lecture-01/`.replace(Zi,``)}${e.startsWith(`/`)?e:`/${e}`}`}var $i=2,ea=new Map,ta=C(0),na=C(0),ra=E(()=>na.value===0?1:ta.value/na.value);E(()=>ra.value>=1);function ia(e){let t=Qi(e);if(Yi.has(t)||Xi.has(t))return;Xi.add(t);let n=new Image;n.onload=()=>{Xi.delete(t),Yi.add(t),ea.delete(t),ta.value=Yi.size},n.onerror=()=>{Xi.delete(t);let n=ea.get(t)??0;n<$i&&(ea.set(t,n+1),setTimeout(ia,1e3*(n+1),e))},n.src=t}function aa(e){let t=e.meta?.slide?.images;if(t?.length)for(let e of t)ia(e)}function oa(e,t,n,r){let i=P.preloadImages;if(i===!1)return;let a=typeof i==`object`&&i?.ahead||3;u(()=>{let e=r.value;if(!e?.length)return;let t=new Set;for(let n of e)for(let e of n.meta?.slide?.images??[])t.add(Qi(e));na.value=t.size}),u(()=>{let i=e.value,o=r.value;if(!i||!o?.length)return;aa(i),aa(t.value),aa(n.value);let s=i.no-1;for(let e=1;e<=a;e++){let t=s+e;t{let t=r.value,n=setTimeout(()=>{if(t?.length)for(let e of t)aa(e)},3e3);e(()=>clearTimeout(n))})}function sa(){let e=ze(),t=C(!1),n,r,i=typeof document<`u`&&`startViewTransition`in document;return e.beforeResolve((e,a)=>{let o=Ie(a.params.no)?.meta,s=Ie(e.params.no)?.meta,c=o?.slide?.no,l=s?.slide?.no;if((c!=null&&l!=null&&c!==l&&((c{n=e,r=t}),d,f=new Promise(e=>d=e);return setTimeout(()=>{document.startViewTransition(()=>(d(),u))},50),f}),i&&e.afterEach(()=>{n?.(),r?.()}),t}var ca=[`data-drag-id`],Q=10,$=10,la=`absolute border border-gray bg-gray dark:border-gray-500 dark:bg-gray-800 bg-opacity-30 `,ua=20,da=m({__name:`DragControl`,props:{data:{}},setup(n){let{dragId:r,zoom:a,autoHeight:o,x0:s,y0:c,width:l,height:d,rotate:f,isArrow:m}=n.data,h=e(Qe,C(1)),g=E(()=>h.value*a.value),{left:v,top:x}=ot(),S=m?-1/0:40,w=E(()=>f.value*Math.PI/180),T=E(()=>Math.sin(w.value)),D=E(()=>Math.cos(w.value)),ee=E(()=>l.value*D.value+d.value*T.value),O=E(()=>l.value*T.value+d.value*D.value),te=E(()=>s.value-ee.value/2),ne=E(()=>c.value-O.value/2),re=E(()=>s.value+ee.value/2),ie=E(()=>c.value+O.value/2),ae=E(()=>m&&l.value<0),oe=E(()=>m&&d.value<0),A=null;function P(e){if(e.buttons!==1)return;e.preventDefault(),e.stopPropagation();let t=e.target.getBoundingClientRect(),n=l.value*D.value-d.value*T.value,r=l.value*T.value+d.value*D.value,i=l.value*D.value+d.value*T.value,a=-l.value*T.value+d.value*D.value;A={x0:s.value,y0:c.value,width:l.value,height:d.value,rotate:f.value,dx0:e.clientX-(t.left+t.right)/2,dy0:e.clientY-(t.top+t.bottom)/2,ltx:s.value-n/2,lty:c.value-r/2,rtx:s.value+i/2,rty:c.value-a/2,lbx:s.value-i/2,lby:c.value+a/2,rbx:s.value+n/2,rby:c.value+r/2},e.currentTarget.setPointerCapture(e.pointerId)}function se(e){if(!A||e.buttons!==1)return;e.preventDefault(),e.stopPropagation();let t=(e.clientX-v.value-A.dx0)/g.value,n=(e.clientY-x.value-A.dy0)/g.value;s.value=we(t,-ee.value/2+$,ye.value+ee.value/2-$),c.value=we(n,-O.value/2+$,be.value+O.value/2-$)}function ce(e){A&&=(e.preventDefault(),e.stopPropagation(),null)}function F(e,t){return{onPointerdown:P,onPointermove:n=>{if(!A||n.buttons!==1)return;n.preventDefault(),n.stopPropagation();let r=(n.clientX-v.value)/g.value,i=(n.clientY-x.value)/g.value,{ltx:a,lty:o,rtx:u,rty:f,lbx:p,lby:m,rbx:h,rby:_}=A,y=A.width/A.height,b=Math.max(S,S*y);function C(e,t){if(n.shiftKey){let n=Math.max(e,t*y,b);return{w:n,h:n/y}}return{w:Math.max(e,S),h:Math.max(t,S)}}if(e){if(t){let{w:e,h:t}=C((h-r)*D.value+(_-i)*T.value,-(h-r)*T.value+(_-i)*D.value);r=h-e*D.value+t*T.value,i=_-e*T.value-t*D.value}else{let{w:e,h:t}=C((u-r)*D.value-(i-f)*T.value,(u-r)*T.value+(i-f)*D.value);r=u-e*D.value-t*T.value,i=f-e*T.value+t*D.value}}else if(t){let{w:e,h:t}=C((r-p)*D.value-(m-i)*T.value,(r-p)*T.value+(m-i)*D.value);r=p+e*D.value+t*T.value,i=m+e*T.value-t*D.value}else{let{w:e,h:t}=C((r-a)*D.value+(i-o)*T.value,-(r-a)*T.value+(i-o)*D.value);r=a+e*D.value-t*T.value,i=o+e*T.value+t*D.value}e?t?(s.value=(r+h)/2,c.value=(i+_)/2,l.value=(h-r)*D.value+(_-i)*T.value,d.value=-(h-r)*T.value+(_-i)*D.value):(s.value=(r+u)/2,c.value=(i+f)/2,l.value=(u-r)*D.value-(i-f)*T.value,d.value=(u-r)*T.value+(i-f)*D.value):t?(s.value=(r+p)/2,c.value=(i+m)/2,l.value=(r-p)*D.value-(m-i)*T.value,d.value=(r-p)*T.value+(m-i)*D.value):(s.value=(r+a)/2,c.value=(i+o)/2,l.value=(r-a)*D.value+(i-o)*T.value,d.value=-(r-a)*T.value+(i-o)*D.value)},onPointerup:ce,style:{width:`${Q}px`,height:`${Q}px`,margin:`-${Q/2}px`,left:e===ae.value?void 0:`0`,right:e===ae.value?`0`:void 0,top:t===oe.value?void 0:`0`,bottom:t===oe.value?`0`:void 0,cursor:m?`move`:+e+ +t==1?`nesw-resize`:`nwse-resize`,borderRadius:m?`50%`:void 0},class:la}}function le(e){return{onPointerdown:P,onPointermove:t=>{if(!A||t.buttons!==1)return;t.preventDefault(),t.stopPropagation();let n=(t.clientX-v.value)/g.value,r=(t.clientY-x.value)/g.value,{ltx:i,lty:a,rtx:o,rty:u,lbx:f,lby:p,rbx:m,rby:h}=A;if(e===`l`){let e=(o+m)/2,t=(u+h)/2;l.value=Math.max((e-n)*D.value+(t-r)*T.value,S),s.value=e-l.value*D.value/2,c.value=t-l.value*T.value/2}else if(e===`r`){let e=(i+f)/2,t=(a+p)/2;l.value=Math.max((n-e)*D.value+(r-t)*T.value,S),s.value=e+l.value*D.value/2,c.value=t+l.value*T.value/2}else if(e===`t`){let e=(f+m)/2,t=(p+h)/2;d.value=Math.max((t-r)*D.value-(e-n)*T.value,S),s.value=e+d.value*T.value/2,c.value=t-d.value*D.value/2}else if(e===`b`){let e=(i+o)/2,t=(a+u)/2;d.value=Math.max((r-t)*D.value-(n-e)*T.value,S),s.value=e-d.value*T.value/2,c.value=t+d.value*D.value/2}},onPointerup:ce,style:{width:`${Q}px`,height:`${Q}px`,margin:`-${Q/2}px`,left:e===`l`?`0`:e===`r`?`100%`:`50%`,top:e===`t`?`0`:e===`b`?`100%`:`50%`,cursor:`lr`.includes(e)?`ew-resize`:`ns-resize`,borderRadius:`50%`},class:la}}function I(){return{onPointerdown:P,onPointermove:e=>{if(!A||e.buttons!==1)return;e.preventDefault(),e.stopPropagation();let t=(e.clientX-v.value-A.dx0)/g.value-Q/4,n=(e.clientY-x.value-A.dy0)/g.value-Q/4,r=Math.atan2(n-c.value,t-s.value)*180/Math.PI+90;for(let e of[0,90,180,270,360])if(Math.abs(r-e)<5){r=e%360;break}f.value=r},onPointerup:ce,style:{width:`${Q}px`,height:`${Q}px`,margin:`-${Q/2}px`,left:`50%`,top:`-20px`,cursor:`grab`,borderRadius:`50%`},class:la}}let L={immediate:!1,immediateCallback:!1},ue=Ve(()=>{re.value<=$||s.value--},ua,L),de=Ve(()=>{te.value>=ye.value-$||s.value++},ua,L),fe=Ve(()=>{ie.value<=$||c.value--},ua,L),pe=Ve(()=>{ne.value>=be.value-$||c.value++},ua,L);return u(()=>{function e(e,t){Fe[e].value?t.resume():t.pause()}e(`left`,ue),e(`right`,de),e(`up`,fe),e(`down`,pe)}),(e,n)=>Number.isFinite(N(s))?(t(),y(`div`,{key:0,id:`drag-control-container`,"data-drag-id":N(r),style:p({position:`absolute`,zIndex:100,left:`${N(a)*(N(s)-Math.abs(N(l))/2)}px`,top:`${N(a)*(N(c)-Math.abs(N(d))/2)}px`,width:`${N(a)*Math.abs(N(l))}px`,height:`${N(a)*Math.abs(N(d))}px`,transformOrigin:`center center`,transform:`rotate(${N(f)}deg)`}),onPointerdown:P,onPointermove:se,onPointerup:ce},[_(`div`,{class:b([`absolute inset-0 z-nav dark:b-gray-400`,N(m)?``:`b b-dark`])},[N(o)?M(`v-if`,!0):(t(),y(k,{key:0},[_(`div`,j(i(F(!0,!0))),null,16),_(`div`,j(i(F(!1,!1))),null,16),N(m)?M(`v-if`,!0):(t(),y(k,{key:0},[_(`div`,j(i(F(!0,!1))),null,16),_(`div`,j(i(F(!1,!0))),null,16)],64))],64)),N(m)?M(`v-if`,!0):(t(),y(k,{key:1},[_(`div`,j(i(le(`l`))),null,16),_(`div`,j(i(le(`r`))),null,16),N(o)?M(`v-if`,!0):(t(),y(k,{key:0},[_(`div`,j(i(le(`t`))),null,16),_(`div`,j(i(le(`b`))),null,16)],64)),_(`div`,j(i(I())),null,16),_(`div`,{class:`absolute -top-15px w-0 b b-dashed b-dark dark:b-gray-400`,style:p({left:`calc(50% - 1px)`,height:N(o)?`14px`:`10px`})},null,4)],64))],2)],44,ca)):M(`v-if`,!0)}}),fa=Re(m({__name:`SlidesShow`,props:{renderContext:{}},setup(e){let{currentSlideRoute:r,currentTransition:i,getPrimaryClicks:o,prevRoute:c,nextRoute:d,slides:f,isPrintMode:p,isPrintWithClicks:m,clicksDirection:h,printRange:g}=V();function _(e){e.meta.preload!==!1&&(e.meta.__preloaded=!0,e.load())}u(()=>{_(r.value),_(c.value),_(d.value)}),u(e=>{let t=f.value,n=setTimeout(()=>{t.forEach(_)},3e3);e(()=>clearTimeout(n))}),oa(r,c,d,f);let v=sa(),b=te();Le(()=>import(`./DrawingLayer-kvJBPGC2.js`).then(e=>b.value=e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]));let x=E(()=>p.value?g.value.map(e=>f.value[e-1]):f.value.filter(e=>e.meta?.__preloaded||e===r.value));function S(){ke.value=!0,ee()}return(c,u)=>(t(),y(k,null,[M(` Global Bottom `),n(N(ft)),M(` Slides `),(t(),A(s(N(v)&&!N(p)&&!N(ke)&&!N(Me)?`div`:re),l(N(ke)||N(Me)||N(p)?{}:N(i),{id:`slideshow`,tag:`div`,class:{"slidev-nav-go-forward":N(h)>0,"slidev-nav-go-backward":N(h)<0},onAfterLeave:S}),{default:w(()=>[(t(!0),y(k,null,a(x.value,n=>ae((t(),A(ht,{key:n.no,"clicks-context":N(p)&&!N(m)?N(ve)(n,N($e)):N(o)(n),route:n,"render-context":e.renderContext},null,8,[`clicks-context`,`route`,`render-context`])),[[oe,n===N(r)]])),128))]),_:1},16,[`class`])),N(Oe)?(t(),A(da,{key:0,data:N(Oe)},null,8,[`data`])):M(`v-if`,!0),M(` Global Top `),n(N(mt)),b.value?(t(),A(N(b),{key:1})):M(`v-if`,!0)],64))}}),[[`__scopeId`,`data-v-835d2635`]]),pa=Object.assign({}),ma=Object.assign({}),ha=Object.assign({}),ga=[Object.values(pa)[0],Object.values(ma)[0],Object.values(ha)[0]].filter(Boolean);function _a(){let{go:e,goFirst:t,goLast:n,next:r,nextSlide:i,prev:a,prevSlide:o}=V(),{drawingEnabled:s}=ct(),{escape:c,space:l,shift:u,left:d,right:f,up:p,down:m,enter:h,d:g,g:_,o:v,"`":y}=Fe,b={next:r,prev:a,nextSlide:i,prevSlide:o,go:e,goFirst:t,goLast:n,downloadPDF:rt,toggleDark:at,toggleOverview:de,toggleDrawing:()=>s.value=!s.value,escapeOverview:()=>F.value=!1,showGotoDialog:()=>R.value=!R.value},x=U(H(F),H(Oe)),S=[{name:`next_space`,key:U(l,H(u)),fn:r,autoRepeat:!0},{name:`prev_space`,key:U(l,u),fn:a,autoRepeat:!0},{name:`next_right`,key:U(f,H(u),x),fn:r,autoRepeat:!0},{name:`prev_left`,key:U(d,H(u),x),fn:a,autoRepeat:!0},{name:`next_page_key`,key:`pageDown`,fn:r,autoRepeat:!0},{name:`prev_page_key`,key:`pageUp`,fn:a,autoRepeat:!0},{name:`next_down`,key:U(m,x),fn:i,autoRepeat:!0},{name:`prev_up`,key:U(p,x),fn:o,autoRepeat:!0},{name:`next_shift`,key:U(f,u),fn:i,autoRepeat:!0},{name:`prev_shift`,key:U(d,u),fn:o,autoRepeat:!0},{name:`toggle_dark`,key:U(g,H(s)),fn:at},{name:`toggle_overview`,key:U(qe(v,y),H(s)),fn:de},{name:`hide_overview`,key:U(c,H(s)),fn:()=>F.value=!1},{name:`goto`,key:U(_,H(s)),fn:()=>R.value=!R.value},{name:`next_overview`,key:U(f,F),fn:Gr},{name:`prev_overview`,key:U(d,F),fn:Wr},{name:`up_overview`,key:U(p,F),fn:Kr},{name:`down_overview`,key:U(m,F),fn:qr},{name:`goto_from_overview`,key:U(h,F),fn:()=>{e(X.value),F.value=!1}}],C=new Set(S.map(e=>e.name));for(let e of ga)S=e(b,S);if(S.filter(e=>e.name&&C.has(e.name)).length===0){let e=[`========== WARNING ==========`,`defineShortcutsSetup did not return any of the base shortcuts.`,`See https://sli.dev/custom/config-shortcuts.html for migration.`,`If it is intentional, return at least one shortcut with one of the base names (e.g. name:"goto").`].join(` + +`);alert(e),console.warn(e)}return S}function va(){let{isPrintMode:e}=V(),t=U(H(Ee),H(xe),H(e),ge,H(ce)),n=_a();new Map(n.map(e=>[e.key,e])).forEach(e=>{e.fn&&r(e.key,e.fn,e.autoRepeat)}),i(`f`,()=>Ne.toggle());function r(e,n,r=!1){typeof e==`string`&&(e=Fe[e]);let i=U(e,t),a=0,o,s=()=>{if(clearTimeout(o),!i.value){a=0;return}r&&(o=setTimeout(s,Math.max(1e3-a*250,150)),a++),n()};return g(i,s,{flush:`sync`})}function i(e,n){return Je(e,e=>{t.value&&(e.repeat||n())})}}export{ii as a,Br as c,_t as d,gt as f,wi as i,Pt as l,fa as n,ni as o,Ji as r,ti as s,va as t,Dt as u}; \ No newline at end of file diff --git a/lecture-01/assets/stateDiagram-EYHZ2SRL-Bet3Zm5V.js b/lecture-01/assets/stateDiagram-EYHZ2SRL-Bet3Zm5V.js new file mode 100644 index 0000000000000000000000000000000000000000..7b3f648156efc2b7c77ce93cb514df4d47c20510 --- /dev/null +++ b/lecture-01/assets/stateDiagram-EYHZ2SRL-Bet3Zm5V.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as t,T as n,c as r,x as i}from"./chunk-FO5PYUIK-CPzj2963.js";import{A as a,C as o,c as s,l as c}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-PLCLPJVV-BfMyJHbe.js";import"./chunk-XXV7AQMY-qeLKYxsH.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{v as l}from"./chunk-OX6ZKUVE-roiHi12N.js";import"./chunk-YV36FAQU-CkTVkoM6.js";import"./chunk-AQ2D6KKF-AxjphkEe.js";import"./chunk-2V3FENDJ-B1mkZICr.js";import"./chunk-DKH7L6O3-pKUB4f-O.js";import"./chunk-RTI7CJYH-CrTK6TD7.js";import"./chunk-MPM6TOF7-5cxd71sq.js";import"./chunk-STSWKLMO-1NGmNrHs.js";import{t as u}from"./chunk-XAKTCX7R-DiVetB2y.js";import"./chunk-ZICDAICJ-CB44yeNY.js";import"./chunk-HPLX5OYV-zid2YVw5.js";import"./chunk-BYAF6FXG-DqiL_6qO.js";import{t as d}from"./chunk-T5XCKZAJ-1iVrcyuQ.js";import{i as f,n as p,t as m}from"./chunk-OVFB7FZ2-DfSjEz3X.js";var h=e(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit).attr(`cy`,o().state.padding+o().state.sizeUnit),`drawStartState`),g=e(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,o().state.textHeight).attr(`class`,`divider`).attr(`x2`,o().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=e((e,t)=>{let n=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+2*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,r.width+2*o().state.padding).attr(`height`,r.height+2*o().state.padding).attr(`rx`,o().state.radius),n},`drawSimpleState`),v=e((t,n)=>{let r=e(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*o().state.padding).text(t);n||r.attr(`dy`,o().state.textHeight)},`addTspan`),i=t.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+1.3*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(n.descriptions[0]).node().getBBox(),a=i.height,s=t.append(`text`).attr(`x`,o().state.padding).attr(`y`,a+o().state.padding*.4+o().state.dividerMargin+o().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;n.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=t.append(`line`).attr(`x1`,o().state.padding).attr(`y1`,o().state.padding+a+o().state.dividerMargin/2).attr(`y2`,o().state.padding+a+o().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,i.width);return u.attr(`x2`,f+3*o().state.padding),t.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,f+2*o().state.padding).attr(`height`,d.height+a+2*o().state.padding).attr(`rx`,o().state.radius),t},`drawDescrState`),y=e((e,t,n)=>{let r=o().state.padding,i=2*o().state.padding,a=e.node().getBBox(),s=a.width,c=a.x,l=e.append(`text`).attr(`x`,0).attr(`y`,o().state.titleShift).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,s);d===s&&(d+=i);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)s&&(f=c-(u-s)/2);let m=1-o().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+o().state.textHeight+o().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,o().state.textHeight*3).attr(`rx`,o().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*o().state.textHeight).attr(`rx`,o().state.radius),e},`addTitleAndBox`),b=e(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,o().state.sizeUnit+o().state.miniPadding).attr(`cx`,o().state.padding+o().state.sizeUnit+o().state.miniPadding).attr(`cy`,o().state.padding+o().state.sizeUnit+o().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit+2).attr(`cy`,o().state.padding+o().state.sizeUnit+2)),`drawEndState`),x=e((e,t)=>{let n=o().state.forkWidth,r=o().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,o().state.padding).attr(`y`,o().state.padding)},`drawForkJoinState`),S=e((e,t,n,r)=>{let i=0,a=r.append(`text`);a.style(`text-anchor`,`start`),a.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`
    `);c=c.replace(/\n/g,`
    `);let l=c.split(s.lineBreakRegex),u=1.25*o().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=a.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}i+=u,e.attr(`x`,t+o().state.noteMargin),e.attr(`y`,n+i+1.25*o().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}},`_drawLongText`),C=e((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,o().state.padding),{textWidth:r,textHeight:i}=S(e,0,0,t.append(`g`));return n.attr(`height`,i+2*o().state.noteMargin),n.attr(`width`,r+o().state.noteMargin*2),n},`drawNote`),w=e(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(i),t.type===`end`&&b(i),(t.type===`fork`||t.type===`join`)&&x(i,t),t.type===`note`&&C(t.note.text,i),t.type===`divider`&&g(i),t.type==="default"&&t.descriptions.length===0&&_(i,t),t.type==="default"&&t.descriptions.length>0&&v(i,t);let a=i.node().getBBox();return r.width=a.width+2*o().state.padding,r.height=a.height+2*o().state.padding,r},`drawState`),T=0,E=e(function(t,c,u){let d=e(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);c.points=c.points.filter(e=>!Number.isNaN(e.y));let f=c.points,p=i().x(function(e){return e.x}).y(function(e){return e.y}).curve(r),h=t.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(o().state.arrowMarkerAbsolute&&(g=a(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let e=t.append(`g`).attr(`class`,`stateLabel`),{x:r,y:i}=l.calcLabelPosition(c.points),a=s.getRows(u.title),d=0,f=[],p=0,m=0;for(let t=0;t<=a.length;t++){let o=e.append(`text`).attr(`text-anchor`,`middle`).text(a[t]).attr(`x`,r).attr(`y`,i+d),s=o.node().getBBox();p=Math.max(p,s.width),m=Math.min(m,s.x),n.info(s.x,r,i+d),d===0&&(d=o.node().getBBox().height,n.info(`Title height`,d,i)),f.push(o)}let h=d*a.length;if(a.length>1){let e=(a.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,i+n*d-e)),h=d*a.length}let g=e.node().getBBox();e.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-o().state.padding/2).attr(`y`,i-h/2-o().state.padding/2-3.5).attr(`width`,p+o().state.padding).attr(`height`,h+o().state.padding),n.info(g)}T++},`drawEdge`),D,O={},k=e(function(){},`setConf`),A=e(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=e(function(e,r,i,a){D=o().state;let s=o().securityLevel,l;s===`sandbox`&&(l=t(`#i`+r));let u=t(s===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=s===`sandbox`?l.nodes()[0].contentDocument:document;n.debug(`Rendering diagram `+e);let f=u.select(`[id='${r}']`);A(f),N(a.db.getRootDoc(),f.append(`g`).attr(`id`,r+`-root`),void 0,!1,u,d,a);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2,_=h*1.75;c(f,g,_,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=e(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=e((e,t,r,i,a,o,c)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):n.debug(`No Node `+e+`: `+JSON.stringify(l.node(e)))});let b=v.getBBox();l.edges().forEach(function(e){e!==void 0&&l.edge(e)!==void 0&&(n.debug(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(l.edge(e))),E(t,l.edge(e),l.edge(e).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,n.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/stateDiagram-v2-5MG54T2I-UdwpDpjp.js b/lecture-01/assets/stateDiagram-v2-5MG54T2I-UdwpDpjp.js new file mode 100644 index 0000000000000000000000000000000000000000..8d4f224022c08f5aa627324cb6f28938133c6f27 --- /dev/null +++ b/lecture-01/assets/stateDiagram-v2-5MG54T2I-UdwpDpjp.js @@ -0,0 +1 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import"./chunk-FO5PYUIK-CPzj2963.js";import"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-PLCLPJVV-BfMyJHbe.js";import"./chunk-XXV7AQMY-qeLKYxsH.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import"./chunk-OX6ZKUVE-roiHi12N.js";import"./chunk-YV36FAQU-CkTVkoM6.js";import"./chunk-AQ2D6KKF-AxjphkEe.js";import"./chunk-2V3FENDJ-B1mkZICr.js";import"./chunk-DKH7L6O3-pKUB4f-O.js";import"./chunk-RTI7CJYH-CrTK6TD7.js";import"./chunk-MPM6TOF7-5cxd71sq.js";import"./chunk-STSWKLMO-1NGmNrHs.js";import"./chunk-ZICDAICJ-CB44yeNY.js";import"./chunk-HPLX5OYV-zid2YVw5.js";import"./chunk-BYAF6FXG-DqiL_6qO.js";import{i as t,n,r,t as i}from"./chunk-OVFB7FZ2-DfSjEz3X.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/swimlanes-TLWVG3JD-DxVaPJg8.js b/lecture-01/assets/swimlanes-TLWVG3JD-DxVaPJg8.js new file mode 100644 index 0000000000000000000000000000000000000000..dedefbc690e3dc6b6c4b1f084869e619bc279f67 --- /dev/null +++ b/lecture-01/assets/swimlanes-TLWVG3JD-DxVaPJg8.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-XSFMG7G3-DrCb_sCb.js","assets/chunk-PTVI3W5X-DVfdoxm6.js"])))=>i.map(i=>d[i]); +import{t as e}from"./preload-helper-DpA04vUI.js";import{r as t}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as n}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as r,S as i}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-PLCLPJVV-BfMyJHbe.js";import"./chunk-XXV7AQMY-qeLKYxsH.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{v as a}from"./chunk-OX6ZKUVE-roiHi12N.js";import{n as o}from"./chunk-YV36FAQU-CkTVkoM6.js";import"./chunk-AQ2D6KKF-AxjphkEe.js";import"./chunk-2V3FENDJ-B1mkZICr.js";import{a as s,c,i as l,n as u,t as d}from"./chunk-DKH7L6O3-pKUB4f-O.js";import{r as f}from"./chunk-RTI7CJYH-CrTK6TD7.js";import{a as p,i as m,n as h,r as g,s as _,t as v}from"./chunk-MPM6TOF7-5cxd71sq.js";import{t as y}from"./chunk-XAKTCX7R-DiVetB2y.js";import{n as b}from"./chunk-GUDDZZ3A-DadEmnfX.js";async function x(t,n){let i=new y({multigraph:!0,compound:!0}),a=[...n.edges],o=r(),c=t.insert(`g`).attr(`class`,`root`),l=c.insert(`g`).attr(`class`,`clusters`),u=c.insert(`g`).attr(`class`,`edges edgePath`),d=c.insert(`g`).attr(`class`,`edgeLabels`),f=c.insert(`g`).attr(`class`,`nodes`),p=new Map,m=t.node()!=null;await Promise.all(n.nodes.map(async e=>{if(e.isGroup)i.setNode(e.id,{...e});else{if(m){let t=await s(f,e,{config:o,dir:e.dir}),n=t.node()?.getBBox()??{width:0,height:0};p.set(e.id,t),e.width=n.width,e.height=n.height}i.setNode(e.id,{...e})}}));for(let e of a)i.setEdge(e.start,e.end,{...e},e.id),n.edges.some(t=>t.id===e.id)||n.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:r}=await e(async()=>{let{captureNodeSizes:e}=await import(`./sizeCapture-XSFMG7G3-DrCb_sCb.js`);return{captureNodeSizes:e}},__vite__mapDeps([0,1]));r(t,n)}return{graph:i,groups:{clusters:l,edgePaths:u,edgeLabels:d,nodes:f,rootGroups:c},nodeElements:p}}t(x,`createGraphWithElements`);var S=5,C=1e-5,w=1e-6;function T(e){let t=[];for(let n=0;n=1-w||f<=w||f>=1-w?null:{point:{x:e.x+d*i,y:e.y+d*a},tA:d,tB:f}}t(E,`segmentIntersection`);function D(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}t(D,`isHorizontalSeg`);function O(e){let t=[];for(let n=0;n=Math.abs(n)?+(t>=0):+(n>=0)}t(j,`getArcSweepFlag`);var ee=.001;function te(e,t){if(e.length<2)return e.map(e=>({...e}));let n=e.map(e=>({...e})),r=t.arrowTypeStart&&f[t.arrowTypeStart];if(r){let t=e[0],i=e[1],a=Math.atan2(i.y-t.y,i.x-t.x);n[0].x=t.x+r*Math.cos(a),n[0].y=t.y+r*Math.sin(a)}let i=t.arrowTypeEnd&&f[t.arrowTypeEnd];if(i){let t=e.length,r=e[t-2],a=e[t-1],o=Math.atan2(a.y-r.y,a.x-r.x);n[t-1].x=a.x-i*Math.cos(o),n[t-1].y=a.y-i*Math.sin(o)}return n}t(te,`applyMarkerOffsets`);function M(e,t,n,r,i){let a=e.point.x,o=e.point.y,s={x:a-t*e.r,y:o-n*e.r},c={x:a+t*e.r,y:o+n*e.r},l=[`L${A(s)}`];return i===`arc`?l.push(`A${k(e.r)},${k(e.r)} 0 0 ${r} ${A(c)}`):l.push(`M${A(c)}`),l}t(M,`emitJump`);function ne(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=n.x-t.x,s=n.y-t.y,c=Math.hypot(i,a),l=Math.hypot(o,s);if(c0){let t=ne(i[e-1],i[e],i[e+1]??i[e],S);t&&(f=t.cutLen)}let p=r,m=null;a&&ee.t-t.t);for(let e of h)e.r=Math.min(e.r,e.d-f,p-e.d);for(let e=0;et){let n=t/2;h[e].r=Math.min(h[e].r,n),h[e+1].r=Math.min(h[e+1].r,n)}}for(let e of h)e.r=2?r:null}catch{return null}}t(ie,`decodeDataPoints`);function ae(e,t,n){if(!n.enabled)return;let r=e.node();if(!r)return;let i=new Map;for(let e of t)i.set(e.id,e);let a=[],o=new Map;for(let e of t){let t=typeof CSS<`u`&&CSS.escape?CSS.escape(e.id):e.id,n=r.querySelector(`path[data-id="${t}"]`);if(!n)continue;o.set(e.id,n);let i=ie(n.getAttribute(`data-points`))??e.points;a.push({...e,points:i})}let s=O(a);if(s.length===0)return;let c=new Map;for(let e of s){let t=c.get(e.jumpEdgeId)??[];t.push(e),c.set(e.jumpEdgeId,t)}for(let e of a){let t=c.get(e.id);if(!t||t.length===0)continue;let r=i.get(e.id)?.curve;if(r!==void 0&&!P(r))continue;let a=o.get(e.id);if(!a||r===void 0&&!re(a.getAttribute(`d`)??``))continue;let s=a.getAttribute(`style`)??``,l=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(s),u=l?Number.parseFloat(l[1]):null,d=l?Number.parseFloat(l[2]):null,f=N(e,t,n);if(a.setAttribute(`d`,f),u!==null&&d!==null&&typeof a.getTotalLength==`function`){let e=a.getTotalLength(),t=`0 ${u} ${Math.max(0,e-u-d)} ${d}`,n=s.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${t};`).replace(/;\s*;+/g,`;`);a.setAttribute(`style`,n)}}}t(ae,`applyLineJumpsToSvg`);async function oe(e,t){for(let n of e.nodes)n.isGroup?await l(t.clusters,n):c(n);let n=new Map;for(let t of e.nodes)t?.id&&n.set(t.id,t);for(let r of e.edges){let i=r.start?n.get(r.start)??{}:{},a=r.end?n.get(r.end)??{}:{},o=g(t.edgePaths,{...r},{},e.type,i,a,e.diagramId);r.label&&await m(t.rootGroups,r),r.label&&se(r,o)}let r=e.config?.swimlane?.lineHops;if(r!==!1){let n=r===`gap`?`gap`:`arc`,i=e.edges.filter(e=>Array.isArray(e.points)&&e.points.length>=2).map(e=>({id:e.id,points:e.points,curve:e.curve,arrowTypeStart:e.arrowTypeStart,arrowTypeEnd:e.arrowTypeEnd}));ae(t.edgePaths,i,{enabled:!0,jumpRadius:6,jumpStyle:n})}}t(oe,`adjustLayout`);function se(e,t){let r=t?.updatedPath??t?.originalPath,s=i(),{subGraphTitleTotalMargin:c}=o({flowchart:s.flowchart??{}});if(e.label){let i=h.get(e.id),o=e.x,s=e.y;if(r){let i=a.calcLabelPosition(r);n.debug(`Moving label `+e.label+` from (`,o,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),t&&(o=i.x,s=i.y)}i.attr(`transform`,`translate(${o}, ${s+c/2})`)}if(e?.startLabelLeft){let t=_.get(e.id).startLeft,n=e?.x,i=e?.y;if(r){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.startLabelRight){let t=_.get(e.id).startRight,n=e.x,i=e.y;if(r){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelLeft){let t=_.get(e.id).endLeft,n=e.x,i=e.y;if(r){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelRight){let t=_.get(e.id).endRight,n=e.x,i=e.y;if(r){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}}t(se,`positionEdgeLabel`);var ce=`__swimlane_default__`,le=21,ue=20;function de(e){return Math.max(e.padding??ue,ue)}t(de,`topLaneHorizontalPadding`);function fe(e){let{x:t,y:n,width:r,height:i}=e,a=e.swimlaneContentTop;if(typeof t!=`number`||typeof n!=`number`||typeof r!=`number`||typeof i!=`number`||typeof a!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a)||r<=0||i<=0){delete e.groupTitleRect;return}let o=n-i/2,s=Math.min(a,n+i/2),c=o+Math.min(le,Math.max(0,s-o));if(c<=o){delete e.groupTitleRect;return}e.groupTitleRect={left:t-r/2,right:t+r/2,top:o,bottom:c}}t(fe,`assignTopLaneTitleRect`);function pe(e){let t=e.direction,n=e.nodes??=[];for(let n of e.nodes??[])n.isGroup&&!n.parentId&&(n.shape=`swimlane`,t&&(n.direction=t));let r=n.filter(e=>!e.isGroup&&!e.parentId);if(r.length===0)return;let i=n.find(e=>e.id===ce);i?i.isGroup&&(i.shape=`swimlane`,t&&(i.direction=t)):(i={id:ce,label:``,isGroup:!0,shape:`swimlane`,padding:20,...t?{direction:t}:{}},n.push(i));for(let e of r)e.parentId=ce}t(pe,`prepareLayoutForSwimlanes`);function F(e){let t=new Map;for(let n of e.nodes??[])t.set(n.id,n);let n=[];for(let t of e.edges??[]){let e=typeof t.start==`string`?t.start:void 0,r=typeof t.end==`string`?t.end:void 0;!e||!r||t.labelNodeId||n.push({id:t.id,src:e,dst:r,ref:t})}let r=e.nodes??[],i=r.filter(e=>e.isGroup),a=r.filter(e=>!e.isGroup);return{nodes:[...[...i].reverse(),...a].map(e=>e.id),edges:n,layout:e,nodeById:t}}t(F,`toGraphView`);function I(e,t,n,r){let{layout:i}=e,a=e.nodeById,o=r?.layerGap??100,s=r?.nodeGap??40,c=0;for(let e of t.layers){let t=0;for(let r of e){let e=a.get(r);if(!e){t++;continue}e.layer=c,e.order=t;let i=n.x[r]??t*s,l=n.y[r]??c*o;e.x=i,e.y=l,t++}c++}let l=i.nodes??[],u=new Map,d=[];for(let e of l){if(!e?.isGroup)continue;e.parentId||d.push(e);let t=l.filter(t=>t.parentId===e.id),r=1/0,i=-1/0,a=1/0,o=-1/0;for(let e of t){let t=e.x??n.x[e.id],s=e.y??n.y[e.id],c=e.width??0,l=e.height??0;t!=null&&s!=null&&(r=Math.min(r,t-c/2),i=Math.max(i,t+c/2),a=Math.min(a,s-l/2),o=Math.max(o,s+l/2))}if(r===1/0||a===1/0)e.x=e.x??0,e.y=e.y??0,e.width=e.width??0,e.height=e.height??0;else{let t=e.padding??20,n=e.parentId?t:2*de(e),s=t,c=Math.max(0,i-r)+n,l=Math.max(0,o-a)+s,d=(r+i)/2,f=(a+o)/2;e.x=d,e.y=f,e.width=c,e.height=l,u.set(e.id,{minX:r,maxX:i,minY:a,maxY:o})}}if(d.length>0&&u.size>0){let e=1/0,t=-1/0,n=0;for(let r of d){let i=r.padding??20;i>n&&(n=i);let a=u.get(r.id);a&&(e=Math.min(e,a.minY),t=Math.max(t,a.maxY))}if(e!==1/0&&t!==-1/0){let r=Math.max(0,t-e)+2*Math.max(n,36),i=(e+t)/2;for(let t of d)t.y=i,t.height=r,t.swimlaneContentTop=e;let a=[...d].sort((e,t)=>(e.x??0)-(t.x??0)),o=[],s=[],c=[];for(let e of a){let t=u.get(e.id);if(!t)continue;let n=Math.max(0,t.maxX-t.minX)+2*de(e),r=(t.minX+t.maxX)/2;o.push(e.id),s.push(r),c.push(n)}let l=o.length;if(l>0){let e=new Map;if(l===1)e.set(o[0],c[0]);else{let t=[];for(let e=0;e0&&i>0?{cx:t,cy:n,rect:Ee(t,n,r,i)}:void 0}t(ge,`measuredNodeRect`);function _e(e){if(e.isGroup)return;let t=ge(e);if(t)return{id:String(e.id??``),cx:t.cx,cy:t.cy,rect:t.rect}}t(_e,`nodeBoundsInfoFor`);function R(e,t,n=L){return Math.abs(e.x-t.x)n}t(V,`isHorizontalSegment`);function H(e,t,n=L){return z(e,t,n)&&Math.abs(e.y-t.y)>n}t(H,`isVerticalSegment`);function U(e,t,n,r){return Math.max(0,Math.min(Math.max(e,t),Math.max(n,r))-Math.max(Math.min(e,t),Math.min(n,r)))}t(U,`overlapLength`);function ve(e,t,n=L){return e.horizontal&&t.horizontal&&B(e.a,t.a,n)?U(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&z(e.a,t.a,n)?U(e.a.y,e.b.y,t.a.y,t.b.y):0}t(ve,`sameAxisSegmentOverlapLength`);function ye(e,t=L){let n=[];for(let r=0;r0?n[n.length-1]:void 0;(!e||!R(e,r,t))&&n.push({x:r.x,y:r.y})}return n}t(G,`dedupeConsecutivePoints`);function be(e,t=L){if(!e||e.length!==4)return;let[n,r,i,a]=e;return V(n,r,t)&&H(r,i,t)&&V(i,a,t)?{kind:`HVH`,p0:n,p1:r,p2:i,p3:a}:H(n,r,t)&&V(r,i,t)&&H(i,a,t)?{kind:`VHV`,p0:n,p1:r,p2:i,p3:a}:void 0}t(be,`classifyThreeSegmentRoute`);function xe(e,t,n,r=0){let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return a>n.left-r&&in.top-r&&ot.left+n&&e.xt.top+n&&e.y=t.right&&e.top<=t.top&&e.bottom>=t.bottom}t(Ce,`rectContainsRect`);function we(e,t){return e.leftt.left&&e.topt.top}t(we,`rectsOverlap`);function Te(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}t(Te,`inflateRect`);function Ee(e,t,n,r){return{left:e-n/2,right:e+n/2,top:t-r/2,bottom:t+r/2}}t(Ee,`rectFromCenterSize`);function K(e){return ge(e)?.rect}t(K,`rectOfNodeBounds`);function De(e,t){switch(t){case`top`:return{x:e.cx,y:e.rect.top};case`bottom`:return{x:e.cx,y:e.rect.bottom};case`left`:return{x:e.rect.left,y:e.cy};case`right`:return{x:e.rect.right,y:e.cy}}}t(De,`portForRectSide`);function Oe(e,t,n,r,i,a=L){let o=t===`left`||t===`right`,s=r===`left`||r===`right`;if(o&&s){if(t===`right`&&r===`left`&&e.xn.x){if(B(e,n,a))return[e,n];let t=(e.x+n.x)/2;return[e,{x:t,y:e.y},{x:t,y:n.y},n]}if(t===r){if(B(e,n,a))return;let r=t===`left`?Math.min(e.x,n.x)-i:Math.max(e.x,n.x)+i;return[e,{x:r,y:e.y},{x:r,y:n.y},n]}return}if(!o&&!s){if(t===r){if(z(e,n,a))return;let r=t===`top`?Math.min(e.y,n.y)-i:Math.max(e.y,n.y)+i;return[e,{x:e.x,y:r},{x:n.x,y:r},n]}if(!(t===`bottom`&&r===`top`&&e.yn.y))return;if(z(e,n,a))return[e,n];let o=(e.y+n.y)/2;return[e,{x:e.x,y:o},{x:n.x,y:o},n]}if(o&&!s){let i=t===`right`&&n.x>e.x||t===`left`&&n.xn.y;return i&&a?[e,{x:n.x,y:e.y},n]:void 0}let c=t===`bottom`&&n.y>e.y||t===`top`&&n.yn.x;return c&&l?[e,{x:e.x,y:n.y},n]:void 0}t(Oe,`buildOrthogonalPortPath`);function ke(e,t,n,r){return t===`left`||t===`right`?[e,{x:r,y:e.y},{x:r,y:n.y},n]:[e,{x:e.x,y:r},{x:n.x,y:r},n]}t(ke,`buildSameSideTrackPath`);function Ae(e){let t=new Map,n=[];for(let r of e){if(r.isEdgeLabel)continue;let e=_e(r);e&&(t.set(e.id,e),n.push({id:e.id,rect:e.rect}))}return{nodeInfoById:t,realNodeRects:n}}t(Ae,`collectRealNodeBounds`);function je(e){let t=[],n=[];for(let r of e){let e=_e(r);if(!e)continue;let i={id:e.id,rect:e.rect};r.isEdgeLabel?n.push(i):t.push(i)}return{realNodeRects:t,labelNodeRects:n}}t(je,`collectNodeRectEntries`);function Me(e,{includeEdgeLabels:t=!0}={}){let n=[];for(let r of e){if(r.isGroup||!t&&r.isEdgeLabel)continue;let e=r.x??0,i=r.y??0,a=r.width??0,o=r.height??0;n.push({nodeId:r.id,...Ee(e,i,a,o)})}return n}t(Me,`collectLayoutNodeRects`);function Ne(e,t,n=L){let r=e.start,i=e.end;if(!r||!i)return;let a=t.get(r),o=t.get(i);if(!(!a||!o))return{srcId:r,dstId:i,srcInfo:a,dstInfo:o,collinearX:Math.abs(a.cx-o.cx)m||f_)return!1;let v=Math.abs(h-u.a.x)i:a&&s&&B(e,n,i)?U(e.x,t.x,n.x,r.x)>i:!1}t(Fe,`sameAxisSegmentsOverlap`);function Ie(e,t,n,r,{epsilon:i=L,skipDegenerateOther:a=!1}={}){for(let o of n){if(o===r||o.isLayoutOnly)continue;let n=o.points;if(!(!n||n.length<2))for(let r=0;rf+i&&mh+i&&dr+L&&e=2?t[t.length-2]:void 0,n=e&&z(e,r)?{x:r.x,y:i.y}:{x:i.x,y:r.y};t.push(n)}t.push(i)}let n=[];for(let e of t){let t=n[n.length-1];(!t||!R(t,e))&&n.push(e)}return n}t(Ve,`orthogonalizePolyline`);function He(e){if(e.length<3)return e;let t=[...e];for(let e=0;e<32;e++){let e=Be(t);if(t=e.points,!e.changed)break}return t}t(He,`simplifyPolyline`);var J=.001,Ue=.5,We=4;function Ge(e,t,n){let r=e;if(r.isLayoutOnly||!r.points||r.points.length=0&&i=e.length)return e;let a=i-r;if(a<0||a>=e.length)return e;let o=Ke(e[i],e[a],t);return n?[o,...e.slice(i)]:[...e.slice(0,i+1),o]}t(qe,`clipEndpoint`);function Je(e,t){for(let n of e){let e=Ge(n,t,2);if(!e)continue;let r=[...e.points];e.srcRect&&(r=qe(r,e.srcRect,!0)),e.dstRect&&(r=qe(r,e.dstRect,!1)),r=He(Ve(r)),r=at(r,e.srcRect,e.dstRect),e.edge.points=He(Ve(r))}}t(Je,`clipEdgeEndpointsToNodeBoundaries`);function Ye(e,t,n,r=!1){if(B(e,t,J)){if(t.yn.bottom+J)return t;if(r){if(e.xn.right+J)return{x:n.right,y:e.y}}return{x:Math.abs(t.x-n.left)<=Math.abs(t.x-n.right)?n.left:n.right,y:e.y}}if(z(e,t,J)){if(t.xn.right+J)return t;if(r){if(e.yn.bottom+J)return{x:e.x,y:n.bottom}}let i=Math.abs(t.y-n.top)<=Math.abs(t.y-n.bottom);return{x:e.x,y:i?n.top:n.bottom}}return t}t(Ye,`snapEndpointToBoundary`);function Xe(e,t,n){let r=e[t];for(let i=t+n;i>=0&&ie.lo)),n=Math.min(...e.map(e=>e.hi));if(!(t>n))return{lo:t,hi:n}}t($e,`intersectRanges`);function et(e,t){return t===`left`||t===`right`?Ze(e.top,e.bottom):Ze(e.left,e.right)}t(et,`clearanceRangeForSide`);function tt(e,t,n){let r=e.y>=n.top-J&&e.y<=n.bottom+J,i=e.x>=n.left-J&&e.x<=n.right+J;if(B(e,t,J)&&r){if(Math.abs(e.x-n.left)0?$e(a):void 0}t(rt,`straightClearanceRange`);function it(e,t,n,r,i){let a=rt(e,t,n,r,i);if(!a)return;let o=i?e.y:e.x,s=Math.min(a.hi,Math.max(a.lo,o));if(!(Math.abs(s-o)({...e}));for(let s=t;s>=0&&s=n.left-J&&Math.max(e.x,t.x)<=n.right+J,i=Math.min(e.y,t.y)>=n.top-J&&Math.max(e.y,t.y)<=n.bottom+J;if(Math.abs(e.y-n.top)r.bottom+J;case`left`:return B(t,n,J)&&n.xr.right+J}}t(ut,`leavesOutward`);function dt(e,t,n){if(e.length<3)return e;if(n){let n=lt(e[0],e[1],t);return n&&ut(n,e[1],e[2],t)?e.slice(1):e}let r=e.length-1,i=lt(e[r-1],e[r],t);return i&&ut(i,e[r-1],e[r-2],t)?e.slice(0,r):e}t(dt,`collapseOwnBorderStub`);function ft(e,t,n){let r=e;if(t){let e=Xe(r,0,1);if(e){let n=Ye(e,r[0],t);n!==r[0]&&(r=[n,...r.slice(1)])}r=dt(r,t,!0)}if(n){let e=r.length-1,t=Xe(r,e,-1);if(t){let i=Ye(t,r[e],n,!0);i!==r[e]&&(r=[...r.slice(0,e),i])}r=dt(r,n,!1)}let i=at(r,t,n);return i!==r||r.length===2?i:(t&&(r=ct(r,t,!0)),n&&(r=ct(r,n,!1)),r)}t(ft,`snapAndCollapseEndpoints`);function pt(e,t){for(let n of e){let e=Ge(n,t,2);if(!e)continue;let r=ft(G(e.points,J),e.srcRect,e.dstRect);if(r.length<3){e.edge.points=r;continue}let i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];e.edge.points=i}}t(pt,`prepareEdgeEndpointsForRenderer`);function mt(e){return new Map(e.map(e=>[e.id,e]))}t(mt,`buildNodeMap`);function ht(e,t){let n=e.parentId,r=null;for(;n;){let e=t.get(n);if(!e?.isGroup)break;r=e.id,n=e.parentId}return r}t(ht,`resolveTopLevelGroupId`);function gt(e,t){let n=0,r=e.parentId;for(;r;){let e=t.get(r);if(!e?.isGroup)break;n++,r=e.parentId}return n}t(gt,`groupDepth`);function _t(e){let t=1/0,n=-1/0,r=1/0,i=-1/0;for(let a of e){let e=a.x,o=a.y;if(typeof e!=`number`||typeof o!=`number`)continue;let s=a.width??0,c=a.height??0;t=Math.min(t,e-s/2),n=Math.max(n,e+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}return t===1/0||r===1/0?null:{minX:t,maxX:n,minY:r,maxY:i}}t(_t,`boundsForChildren`);function vt(e,t){let n=e.padding??20;e.x=(t.minX+t.maxX)/2,e.y=(t.minY+t.maxY)/2,e.width=Math.max(0,t.maxX-t.minX)+n,e.height=Math.max(0,t.maxY-t.minY)+n}t(vt,`applyGroupBounds`);function yt(e){let t=mt(e),n=e.filter(e=>e.isGroup&&e.parentId).sort((e,n)=>gt(n,t)-gt(e,t));for(let t of n){let n=_t(e.filter(e=>e.parentId===t.id));n&&vt(t,n)}}t(yt,`recomputeNestedGroupBounds`);function bt(e,n){let r=e.nodes??[],i=e.edges??[],a=r.filter(e=>!e.isGroup),o=1/0,s=-1/0;for(let e of a){let t=e[n];typeof t==`number`&&(o=Math.min(o,t),s=Math.max(s,t))}if(!Number.isFinite(o)||!Number.isFinite(s))return!1;let c=t(e=>o+s-e,`mirror`);for(let e of r){let t=e[n];typeof t==`number`&&(e[n]=c(t));let r=e.groupTitleRect;r&&(e.groupTitleRect=n===`x`?{...r,left:c(r.right),right:c(r.left)}:{...r,top:c(r.bottom),bottom:c(r.top)})}for(let e of i)for(let t of e.points??[])t[n]=c(t[n]);return!0}t(bt,`mirrorAxis`);function xt(e){return!(e.nodes??[]).some(e=>!e.isGroup)||bt(e,`y`)}t(xt,`applyBtDirectionTransform`);function St(e,t=`LR`){let n=e.nodes??[],r=e.edges??[],i=n.filter(e=>!e.isGroup),a=1/0,o=1/0;for(let e of i){let t=e.x??0,n=e.y??0;t0?Math.max(1,l/u):1;for(let e of i){let t=e.x??0,n=((e.y??0)-o)*d+36,r=t-a;e.x=n,e.y=r}for(let e of r)if(e.points)for(let t of e.points){let e=t.x,n=(t.y-o)*d+36,r=e-a;t.x=n,t.y=r}yt(n);let f=n.filter(e=>e.isGroup&&!e.parentId);if(f.length===0)return t===`RL`&&bt(e,`x`),!0;let p=mt(n),m=new Map;for(let e of n){if(e.isGroup)continue;let t=ht(e,p);if(!t)continue;let n=m.get(t)??[];n.push(e),m.set(t,n)}let h=0;for(let e of f){let t=e.padding??0;t>h&&(h=t)}let g=[],_=1/0,v=-1/0;for(let e of f){let t=_t(m.get(e.id)??[]);t&&(_=Math.min(_,t.minX),v=Math.max(v,t.maxX),g.push({lane:e,contentTop:t.minY,contentBottom:t.maxY,centerY:(t.minY+t.maxY)/2}))}if(_===1/0||v===-1/0)return!0;let y=Math.max(0,v-_)+2*Math.max(h,10),b=36+y,x=(_+v)/2-y/2-36,S=x+b/2,C=Math.max(h,36);g.sort((e,t)=>e.centerY-t.centerY);for(let e=0;ed.cy?g.bottom:g.top,t=d.cx+n;if(t<=g.left+Ct||t>=g.right-Ct)continue;i={x:t,y:e},a={x:t,y:o.y},c={x:o.x,y:o.y}}else{let e=f.cx>d.cx?g.right:g.left,t=d.cy+n;if(t<=g.top+Ct||t>=g.bottom-Ct)continue;i={x:e,y:t},a={x:o.x,y:t},c={x:o.x,y:o.y}}let p=R(i,a,Ct),m=R(a,c,Ct);if(p&&m||!p&&q(i,a,r,[l],1)||!m&&q(a,c,r,[u],1))continue;let _=!p&&Ie(i,a,e,t,{epsilon:Ct,skipDegenerateOther:!0}),v=!m&&Ie(a,c,e,t,{epsilon:Ct,skipDegenerateOther:!0});if(!(_||v)){h=p?[a,c]:m?[i,a]:[i,a,c];break}}h&&(t.points=h)}}t(Et,`portSwapToLShape`);function Dt(e,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=je(n.values());for(let o of e){if(o.isLayoutOnly)continue;let s=o.points;if(!s||s.length<4)continue;let c=G(s,r);if(c.length<4)continue;let l=c.length-1,u=c[l],d=c[l-1],f=c[l-2],p=u.x-d.x,m=u.y-d.y,h=Math.hypot(p,m);if(h>=10||h0;O={x:f.x,y:E},k={x:e?D.right:D.left,y:E}}if(q(O,k,i,S?[S]:[],-2)||q(O,k,a,[],-2))continue;if(C){let e=n.get(C),t=e?K(e):void 0;if(t&&Se(O,t,2))continue}let A=t((e,t)=>`${e.x.toFixed(3)},${e.y.toFixed(3)}|${t.x.toFixed(3)},${t.y.toFixed(3)}`,`ownSegmentKey`),j=new Set;for(let e=0;e{for(let i of e){if(i===o||i.isLayoutOnly)continue;let e=i.points;if(!(!e||e.length<2))for(let i=0;i=0){let e=c[l-3],t=[C,S].filter(e=>!!e);if(q(e,O,i,t,-2)||ee(e,O))continue}let te=[...c.slice(0,l-2),O,k];o.points=te;let M=o.labelNodeId;if(M){let e=n.get(M);if(e){let t=e.width??0,n=e.height??0;if(t>0&&n>0){let i,a,o=-1;for(let e=0;e=t+2||d&&l>=n+2)&&l>o&&(o=l,i=(s.x+c.x)/2,a=(s.y+c.y)/2)}i!==void 0&&a!==void 0&&(e.x=i,e.y=a)}}}}}t(Dt,`collapseShortTerminalStub`);var Y=.001,X=8,Z=ye,Ot=t((e,t)=>z(e,t,Y)||B(e,t,Y),`orthogonallyAligned`);function kt(e,n){let r=t((e,t)=>{let n=e.x??0,r=e.y??0,i=t.x-n,a=t.y-r,o=(e.width??0)/2,s=(e.height??0)/2;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),{x:n+(a===0?0:s*i/a),y:r+s}):(i<0&&(o=-o),{x:n+o,y:r+(i===0?0:o*a/i)})},`rectIntersect`),i=t((e,t)=>{let i=G(e.points??[]);if(i.length<2)return;let a=t?e.start:e.end,o=a?n.get(a):void 0,s=o?K(o):void 0;if(!o||!a||!s)return;let c=t?i[0]:i[i.length-1],l=t?i[1]:i[i.length-2],u=r(o,c),d=c;if(Ot(l,u)&&(d=l),z(u,d,Y))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`V`,coord:u.x,min:Math.min(u.y,d.y),max:Math.max(u.y,d.y),boundary:u,railEnd:d,rect:s};if(B(u,d,Y))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`H`,coord:u.y,min:Math.min(u.x,d.x),max:Math.max(u.x,d.x),boundary:u,railEnd:d,rect:s}},`terminalLaneFor`),a=t((e,t)=>Math.max(0,Math.min(e.max,t.max)-Math.max(e.min,t.min)),`projectedOverlapLength`),o=t((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:e.orientation===`H`?(Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1)&&z(e.boundary,t.boundary,1):(Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1)&&B(e.boundary,t.boundary,1),`sameTerminalFace`),s=t((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:a(e,t)>=X&&Math.abs(e.coord-t.coord)<.5,`exactTerminalLaneConflict`),c=t((e,t)=>{if(e.nodeId!==t.nodeId||e.orientation!==t.orientation||e.orientation!==`H`||e.atStart===t.atStart)return!1;let n=a(e,t);if(n2*r?!1:o(e,t)&&Math.abs(e.coord-t.coord)<16},`nearTerminalLaneConflict`),l=t((e,n)=>{let r=G(e.edge.points??[]);if(r.length<2)return;let i=e.orientation===`V`?{x:e.boundary.x+n,y:e.boundary.y}:{x:e.boundary.x,y:e.boundary.y+n},a=e.orientation===`V`?{x:e.railEnd.x+n,y:e.railEnd.y}:{x:e.railEnd.x,y:e.railEnd.y+n};if(!t(()=>Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1?B(i,e.boundary,Y)&&i.x>=e.rect.left+1&&i.x<=e.rect.right-1:Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1?z(i,e.boundary,Y)&&i.y>=e.rect.top+1&&i.y<=e.rect.bottom-1:!1,`boundaryStaysOnSameFace`)())return;if(e.atStart){let t=r.length>1&&R(r[1],e.railEnd,Y),n=r.slice(t?2:1),o=n[0];return o&&!Ot(o,a)?void 0:[i,a,...n]}let o=r.length>1&&R(r[r.length-2],e.railEnd,Y),s=r.slice(0,o?-2:-1),c=s[s.length-1];if(!(c&&!Ot(c,a)))return[...s,a,i]},`shiftedCandidate`),u=t(e=>{let t=e.edge,r=G(t.points??[]);if(r.length!==2)return!1;let i=t.start,a=t.end,o=i?n.get(i):void 0,s=a?n.get(a):void 0;if(!o||!s)return!1;let c=o.x??0,l=o.y??0,u=s.x??0,d=s.y??0,[f,p]=r;return B(f,p,Y)&&Math.abs(l-d)<1&&Math.abs(c-u)>1||z(f,p,Y)&&Math.abs(c-u)<1&&Math.abs(l-d)>1},`laneIsStraightCollinearConnector`),d=[-7,7,-14,14,-21,21];for(let t=0;t<8;t++){let t=e.filter(e=>!e.isLayoutOnly).flatMap(e=>[i(e,!0),i(e,!1)]).filter(e=>!!e),n=!1;for(let e=0;e{let n=u(e),r=u(t);return n===r?Number(!t.atStart)-Number(!e.atStart):Number(n)-Number(r)});for(let e of p){for(let r of d){let a=l(e,r);if(!a)continue;let o=i({...e.edge,points:a},e.atStart);if(!(!o||t.some(t=>t.edge!==e.edge&&(s(o,t)||f&&c(o,t))))){e.edge.points=a,n=!0;break}}if(n)break}}if(!n)return}}t(kt,`separateSharedRenderedTerminalLanes`);function At(e,n){let{realNodeRects:r,labelNodeRects:i}=je(n.values()),a=t((t,n)=>{let a=t.start,o=t.end,s=Z(n);if(s.length!==n.length-1)return!1;let c=[a,o].filter(e=>!!e);for(let e of s)if(q(e.a,e.b,r,c,-2)||q(e.a,e.b,i,[],-2))return!1;for(let n of e){if(n===t||n.isLayoutOnly)continue;let e=n.points;if(!(!e||e.length<2)){for(let t of s)for(let n of Z(G(e)))if(ve(t,n,.5)>=X||Le(t.a,t.b,n.a,n.b,Y))return!1}}return!0},`candidateIsSafe`),o=t((e,t)=>{if(t+4>=e.length)return;let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=e[t+4],s=V(n,r)&&H(r,i)&&V(i,a)&&H(a,o)&&z(n,a,Y)&&z(n,o,Y)&&z(r,i,Y)&&(r.x-n.x)*(a.x-i.x)<0,c=H(n,r)&&V(r,i)&&H(i,a)&&V(a,o)&&B(n,a,Y)&&B(n,o,Y)&&B(r,i,Y)&&(r.y-n.y)*(a.y-i.y)<0;if(s||c)return G([...e.slice(0,t+1),o,...e.slice(t+5)]);if(t+5>=e.length)return;let l=e[t+5],u=H(n,r)&&V(r,i)&&H(i,a)&&V(a,o)&&H(o,l)&&z(n,o,Y)&&z(n,l,Y)&&z(i,a,Y)&&(i.x-r.x)*(o.x-a.x)<0,d=V(n,r)&&H(r,i)&&V(i,a)&&H(a,o)&&V(o,l)&&B(n,o,Y)&&B(n,l,Y)&&B(i,a,Y)&&(i.y-r.y)*(o.y-a.y)<0;if(!(!u&&!d))return G([...e.slice(0,t+1),l,...e.slice(t+6)])},`withoutDogleg`);for(let t=0;t<8;t++){let t=!1;for(let n of e){if(n.isLayoutOnly)continue;let e=G(n.points??[]);for(let r=0;r<=e.length-5;r++){let i=o(e,r);if(!(!i||!a(n,i))){n.points=i,t=!0;break}}if(t)break}if(!t)return}}t(At,`collapseRedundantRectangularDoglegs`);function jt(e,n){let{realNodeRects:r,labelNodeRects:i}=je(n.values()),a=e.filter(e=>!e.isLayoutOnly),o=t((e,t,n)=>G(e===t?n??[]:e.points??[]),`pointsFor`),s=t((e,t)=>{let n=0;for(let r=0;r{let t=Z(e);if(t.length!==3)return;let n=t[1];if(t[0].horizontal!==n.horizontal&&t[2].horizontal!==n.horizontal)return{index:n.index,horizontal:n.horizontal,vertical:n.vertical,segment:n}},`middleRail`),l=t((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);return r.filter(e=>{if(n.includes(e.id))return!1;let r=e.rect;return t.horizontal?U(t.a.x,t.b.x,r.left,r.right)>=X&&t.a.y>=r.top-2&&t.a.y<=r.bottom+2:U(t.a.y,t.b.y,r.top,r.bottom)>=X&&t.a.x>=r.left-2&&t.a.x<=r.right+2})},`blockingRectsFor`),u=t((e,t,n)=>{let r=e.map(e=>({...e}));if(t.horizontal)r[t.index].y=n,r[t.index+1].y=n;else if(t.vertical)r[t.index].x=n,r[t.index+1].x=n;else return;let i=He(G(r));return Z(i).length===i.length-1?i:void 0},`candidateByMovingRail`),d=t((e,t,n)=>{let c=[e.start,e.end].filter(e=>!!e),l=Z(t);if(l.length!==t.length-1)return!1;for(let e of l)if(q(e.a,e.b,r,c,-2)||q(e.a,e.b,i,[],-2))return!1;for(let t of a)if(t!==e){for(let e of l)for(let n of Z(o(t)))if(ve(e,n,.5)>=X)return!1}return s(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=s(),t=!1;for(let n of a){let r=o(n),i=c(r);if(!i)continue;let a=l(n,i.segment);if(a.length===0)continue;let s=i.horizontal?[Math.min(...a.map(e=>e.rect.top))-20,Math.max(...a.map(e=>e.rect.bottom))+20]:[Math.min(...a.map(e=>e.rect.left))-20,Math.max(...a.map(e=>e.rect.right))+20];for(let a of s){let o=u(r,i.segment,a);if(!(!o||!d(n,o,e))){n.points=o,t=!0;break}}if(t)break}if(!t)return}}t(jt,`liftObstacleHuggingSameSideRails`);function Mt(e,n){let r=t(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),i=t(e=>{if(!e.isGroup||e.parentId)return;let t=e.direction,n=typeof t==`string`?t.toUpperCase():``;if(n===`LR`||n===`RL`||n===`BT`)return;let i=r(e),a=e.y,o=e.height;if(!i||typeof a!=`number`||typeof o!=`number`||!Number.isFinite(a)||!Number.isFinite(o)||o<=0)return;let s=i.right-i.left,c=i.bottom-i.top;if(!(c<=0||s{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+Y||n>=t.bottom-Y?!1:U(e.a.x,e.b.x,t.left,t.right)>=X},`horizontalSegmentIntersectsTitle`),o=[...n.values()].map(i).filter(e=>!!e);if(o.length===0)return;let s=0;for(let t of e){if(t.isLayoutOnly)continue;let e=G(t.points??[]);for(let t of Z(e))for(let e of o)a(t,e.rect)&&(s=Math.max(s,e.rect.bottom-t.a.y+4))}if(!(s<=Y))for(let e of o){let t=e.node.y,n=e.node.height;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.y=t-s/2,e.node.height=n+s,e.node.groupTitleRect={...e.rect,top:e.rect.top-s,bottom:e.rect.bottom-s})}}t(Mt,`liftTopLaneTitleBandsAboveRails`);function Nt(e,n){let r=t(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),i=t(e=>{if(!e.isGroup||e.parentId||e.direction!==`LR`)return;let t=r(e),n=e.x,i=e.width;if(!t||typeof n!=`number`||typeof i!=`number`||!Number.isFinite(n)||!Number.isFinite(i)||i<=0)return;let a=t.right-t.left,o=t.bottom-t.top;if(!(a<=0||o{if(!e.vertical)return!1;let n=e.a.x;return n<=t.left+Y||n>=t.right-Y?!1:U(e.a.y,e.b.y,t.top,t.bottom)>=X},`verticalSegmentIntersectsTitle`),o=t((e,t)=>{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+Y||n>=t.bottom-Y?!1:U(e.a.x,e.b.x,t.left,t.right)>=X},`horizontalSegmentIntersectsTitle`),s=[...n.values()].map(i).filter(e=>!!e);if(s.length===0)return;let c=0;for(let t of e){if(t.isLayoutOnly)continue;let e=G(t.points??[]);for(let t of Z(e))for(let e of s)if(a(t,e.rect))c=Math.max(c,e.rect.right-t.a.x+4);else if(o(t,e.rect)){let n=Math.min(t.a.x,t.b.x);c=Math.max(c,e.rect.right-n+4)}}if(!(c<=Y))for(let e of s){let t=e.node.x,n=e.node.width;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.x=t-c/2,e.node.width=n+c,e.node.groupTitleRect={...e.rect,left:e.rect.left-c,right:e.rect.right-c})}}t(Nt,`shiftLeftLaneTitleBandsLeftOfRails`);function Pt(e,n){let{realNodeRects:r}=je(n.values()),i=e.filter(e=>!e.isLayoutOnly),a=t((e,t=new Map)=>G(t.get(e)??e.points??[]),`replacementPointsFor`),o=t((e=new Map)=>{let t=0;for(let n=0;ni.reduce((t,n)=>t+W(a(n,e)),0),`totalBends`),c=t(e=>{let t=a(e);if(t.length<4)return;let n=t[t.length-2],r=t[t.length-1];if(!(!V(n,r,Y)&&!H(n,r,Y)))return{tailStart:n,terminal:r}},`terminalTailFor`),l=t((e,t)=>{let n=a(e);if(n.length<3)return;let r=n[0],i=n[1],o;if(V(r,i,Y))o={x:i.x,y:t.tailStart.y};else if(H(r,i,Y))o={x:t.tailStart.x,y:i.y};else return;let s=He(G([r,i,o,t.tailStart,t.terminal]));return Z(s).length===s.length-1?s:void 0},`candidateWithDestinationTail`),u=t((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Z(t))if(q(e.a,e.b,r,n,-2))return!0;return!1},`pathHasNodeHit`),d=t((e,t,n)=>{for(let r of i)if(r!==e){for(let e of Z(t))for(let t of Z(a(r,n)))if(ve(e,t,.5)>=X)return!0}return!1},`pathHasSharedTrack`),f=t((e,t,n)=>!u(e,t)&&!d(e,t,n),`candidateIsSafe`),p=t(()=>{let e=new Map;for(let t of i){let r=t.end;if(!r||!n.has(r)||a(t).length<4)continue;let i=e.get(r)??[];i.push(t),e.set(r,i)}return e},`edgesByDestination`);for(let e=0;e<4;e++){let e=o();if(e===0)return;let t=s(),n,r=e,i=t;for(let t of p().values())for(let a=0;a=e||y>r||y===r&&b>=i||(n=v,r=y,i=b)}if(!n)return;for(let[e,t]of n)e.points=t}}t(Pt,`swapDestinationTerminalTailsToReduceCrossings`);function Ft(e,n){let{realNodeRects:r,labelNodeRects:i}=je(n.values()),a=e.filter(e=>!e.isLayoutOnly),o=t((e,t=new Map)=>G(t.get(e)??e.points??[]),`replacementPointsFor`),s=t((e=new Map)=>{let t=0;for(let n=0;na.reduce((t,n)=>t+W(o(n,e)),0),`totalBends`),l=t(e=>{let t=e.start,r=e.end,i=t?n.get(t):void 0,a=r?n.get(r):void 0,o=i?K(i):void 0,s=a?K(a):void 0;return o&&s?{src:o,dst:s}:void 0},`endpointRectsFor`),u=t((e,t,n)=>{if(n.index<=0||n.index+1>=t.length-1)return;let r=l(e);if(r){if(n.vertical){let i=n.a.x,a=Math.min(r.src.left,r.dst.left),o=Math.max(r.src.right,r.dst.right),s=io+Y?`right`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`vertical`,side:s,coord:i,min:Math.min(n.a.y,n.b.y),max:Math.max(n.a.y,n.b.y)}:void 0}if(n.horizontal){let i=n.a.y,a=Math.min(r.src.top,r.dst.top),o=Math.max(r.src.bottom,r.dst.bottom),s=io+Y?`bottom`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`horizontal`,side:s,coord:i,min:Math.min(n.a.x,n.b.x),max:Math.max(n.a.x,n.b.x)}:void 0}}},`externalRailForSegment`),d=t(()=>{let e=[];for(let t of a){let n=o(t);for(let r of Z(n)){let i=u(t,n,r);i&&e.push(i)}}return e},`collectExternalRails`),f=t((e,t)=>e.edge!==t.edge&&e.axis===t.axis&&e.side===t.side&&U(e.min,e.max,t.min,t.max)>=X,`railsInteract`),p=t(e=>{let t=[],n=new Set;for(let r of e){if(n.has(r))continue;let i=[r],a=[];for(n.add(r);i.length>0;){let t=i.pop();a.push(t);for(let r of e)!n.has(r)&&f(t,r)&&(n.add(r),i.push(r))}a.length>1&&t.push(a)}return t},`connectedComponents`),m=t(e=>{let t=[];for(let n of e)t.some(e=>Math.abs(e-n.coord){let n=e.map(e=>e.coord),r=m(e),i=[];if(e.length<=6){let a=Array(r.length).fill(!1),o=[],s=t(()=>{if(o.length===e.length){o.some((e,t)=>Math.abs(e-n[t])>=Y)&&i.push([...o]);return}for(let[e,t]of r.entries())a[e]||(a[e]=!0,o.push(t),s(),o.pop(),a[e]=!1)},`visit`);return s(),i}for(let e=0;e{let n=new Map;for(let[r,i]of e.entries()){let e=t[r],a=n.get(i.edge)??i.points.map(e=>({x:e.x,y:e.y}));i.axis===`vertical`?(a[i.segmentIndex].x=e,a[i.segmentIndex+1].x=e):(a[i.segmentIndex].y=e,a[i.segmentIndex+1].y=e),n.set(i.edge,a)}let r=new Map;for(let[e,t]of n){let n=He(G(t));if(Z(n).length!==n.length-1)return;r.set(e,n)}return r},`replacementsForAssignment`),_=t(e=>{for(let[t,n]of e){let e=[t.start,t.end].filter(e=>!!e);for(let t of Z(n))if(q(t.a,t.b,r,e,-2)||q(t.a,t.b,i,[],-2))return!1}for(let t=0;t=X)return!1}}return!0},`candidateIsSafe`);for(let e=0;e<4;e++){let e=s();if(e===0)return;let t,n=e,r=c(),i=1/0;for(let a of p(d()))for(let o of h(a)){let l=g(a,o);if(!l||!_(l))continue;let u=s(l);if(u>=e)continue;let d=c(l),f=a.reduce((e,t,n)=>e+Math.abs(o[n]-t.coord),0);u>n||u===n&&(d>r||d===r&&f>=i)||(t=l,n=u,r=d,i=f)}if(!t)return;for(let[e,n]of t)e.points=n}}t(Ft,`reassignCrossingExternalRailChannels`);function It(e,n){let{realNodeRects:r,labelNodeRects:i}=je(n.values()),a=e.filter(e=>!e.isLayoutOnly),o=t((e,t,n)=>G(e===t?n??[]:e.points??[]),`pointsFor`),s=t(e=>Z(e).reduce((e,t)=>{let n=t.a.x-t.b.x,r=t.a.y-t.b.y;return e+Math.hypot(n,r)},0),`pathLength`),c=t((e,t)=>{let n=0;for(let r=0;r{if(e.horizontal){let n=e.a.y;return(Math.abs(n-t.top)<1||Math.abs(n-t.bottom)<1)&&U(e.a.x,e.b.x,t.left,t.right)>=X}if(e.vertical){let n=e.a.x;return(Math.abs(n-t.left)<1||Math.abs(n-t.right)<1)&&U(e.a.y,e.b.y,t.top,t.bottom)>=X}return!1},`segmentRunsAlongRectBorder`),u=t(e=>{let t=[e.start,e.end].filter(e=>!!e),r=[];for(let e of t){let t=n.get(e),i=t?K(t):void 0;i&&r.push(i)}return r},`endpointRectsFor`),d=t((e,t)=>{if(t+3>=e.length)return[];let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=V(n,r,Y)&&H(r,i,Y)&&V(i,a,Y),s=H(n,r,Y)&&V(r,i,Y)&&H(i,a,Y);if(!o&&!s||!(o?Math.sign(r.x-n.x)!==Math.sign(a.x-i.x):Math.sign(r.y-n.y)!==Math.sign(a.y-i.y)))return[];let c=z(n,a,Y)||B(n,a,Y)?[]:[{x:n.x,y:a.y},{x:a.x,y:n.y}],l=c.length===0?[[...e.slice(0,t+1),...e.slice(t+3)]]:c.map(n=>[...e.slice(0,t+1),n,...e.slice(t+3)]),u=new Set;return l.map(e=>He(G(e))).filter(e=>{if(Z(e).length!==e.length-1||!e.some(e=>R(e,a,Y)))return!1;let t=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return!u.has(t)&&(u.add(t),!0)})},`shortcutCandidatesAt`),f=t((e,t,n)=>{let s=[e.start,e.end].filter(e=>!!e),d=u(e);for(let e of Z(t))if(q(e.a,e.b,r,s,-2)||q(e.a,e.b,i,[],-2)||d.some(t=>l(e,t)))return!1;for(let n of a)if(n!==e){for(let e of Z(t))for(let t of Z(o(n)))if(ve(e,t,.5)>=X)return!1}return c(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=c(),t,n,r=e,i=1/0,l=1/0;for(let u of a){let a=o(u),p=W(a,Y),m=s(a);for(let o=0;o<=a.length-4;o++)for(let h of d(a,o)){let a=W(h,Y),o=s(h);if(!(ar||d===r&&(a>i||a===i&&o>=l)||(t=u,n=h,r=d,i=a,l=o)}}if(!t||!n)return;t.points=n}}t(It,`shortcutRedundantOrthogonalJogs`);function Lt(e,n){let r=[];for(let e of n.values()){if(e.isGroup||e.isEdgeLabel)continue;let t=e.x??0,n=e.y??0,i=K(e);i&&r.push({id:String(e.id??``),cx:t,cy:n,rect:i})}if(r.length===0)return;let i=new Map(r.map(e=>[e.id,e])),a=r.map(e=>({id:e.id,rect:e.rect})),o=[`top`,`bottom`,`left`,`right`],s={top:Math.min(...r.map(e=>e.rect.top))-20,bottom:Math.max(...r.map(e=>e.rect.bottom))+20,left:Math.min(...r.map(e=>e.rect.left))-20,right:Math.max(...r.map(e=>e.rect.right))+20},c=e.filter(e=>!e.isLayoutOnly),l=new Map(c.map((e,t)=>[e,t])),u=t(e=>{let t=e===`left`||e===`top`?-1:1,n=[];for(let r=0;r<=2;r++)n.push(s[e]+t*20*r);return n},`outwardTracksForSide`),d=t((e,t=new Map)=>G(t.get(e)??e.points??[]),`replacementPointsFor`),f=t((e,t)=>{let n=0;for(let r of e)for(let e of t)Le(r.a,r.b,e.a,e.b,Y)&&n++;return n},`crossingCountBetweenSegments`),p=t((e,t)=>f(Z(e),Z(t)),`crossingCountBetweenPaths`),m=t((e=new Map)=>{let n=0,r=[],i=new Set,a=[],o=t(e=>{i.has(e)||(i.add(e),a.push(e))},`addEdge`);for(let t=0;t0&&(n+=l,r.push({first:i,second:t,count:l}),o(i),o(t))}}return a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),{count:n,pairs:r,edgeSet:i,edges:a}},`crossingSnapshot`),h=t((e,t)=>{let n=new Set(t.keys());if(n.size===0)return e.count;let r=0;for(let t of e.pairs)(n.has(t.first)||n.has(t.second))&&(r+=t.count);let i=0;for(let e=0;e{let t=new Map;for(let n of e.pairs){let e=t.get(n.first)??new Set;e.add(n.second),t.set(n.first,e);let r=t.get(n.second)??new Set;r.add(n.first),t.set(n.second,r)}let n=[],r=new Set;for(let i of e.edges){if(r.has(i))continue;let e=[i],a=[];for(r.add(i);e.length>0;){let n=e.pop();a.push(n);for(let i of t.get(n)??[])r.has(i)||(r.add(i),e.push(i))}a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),a.length>1&&n.push(a)}return n},`crossingComponents`),_=t(e=>[e.start,e.end].filter(e=>!!e),`endpointIdsFor`),v=t(e=>{let t=[];for(let n of g(e)){let e=new Set(n),r=new Set(n.flatMap(e=>_(e))),i=[...n];for(let t of c)e.has(t)||_(t).some(e=>r.has(e))&&i.push(t);i.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),t.push(i)}return t},`pairSearchGroups`),y=t((e,t,n)=>h(e,new Map([[t,n]])),`crossingCountWithSingleReplacement`),b=t(e=>{let t=new Map;for(let n of e.pairs)t.set(n.first,(t.get(n.first)??0)+n.count),t.set(n.second,(t.get(n.second)??0)+n.count);return t},`currentCrossingsByEdge`),x=t(e=>e.slice(1).reduce((t,n,r)=>{let i=e[r];return t+Math.abs(n.x-i.x)+Math.abs(n.y-i.y)},0),`pathLength`),S=t((e=new Map)=>c.reduce((t,n)=>t+W(d(n,e)),0),`totalBends`),C=t((e=new Map)=>c.reduce((t,n)=>t+x(d(n,e)),0),`totalLength`),w=t((e,t,n=new Map)=>{let r=Z(t);for(let t of c)if(t!==e){for(let e of r)for(let r of Z(d(t,n)))if(ve(e,r,.5)>=X)return!0}return!1},`pathHasSegmentConflict`),T=t((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Z(t))if(q(e.a,e.b,a,n,-2))return!0;return!1},`pathHitsNode`),E=t((e,t)=>{let n=He(G(t));Z(n).length===n.length-1&&e.push(n)},`pushOrthogonalCandidate`),D=t(e=>e===`left`||e===`right`,`sideIsHorizontal`),O=t((e,t,n)=>{switch(t){case`left`:return Math.min(e.x,n.x)-20;case`right`:return Math.max(e.x,n.x)+20;case`top`:return Math.min(e.y,n.y)-20;case`bottom`:return Math.max(e.y,n.y)+20}},`localTrackForSameSide`),k=t((e,t,n,r)=>{let i=n===`left`||n===`top`?-1:1,a=[O(t,n,r),s[n]];for(let o of a)for(let a=0;a<=2;a++)E(e,ke(t,n,r,o+i*20*a))},`addSameSideCandidates`),A=t((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:a,y:t.y},{x:a,y:n},{x:r.x,y:n},r])},`addHorizontalToVerticalCandidates`),j=t((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:t.x,y:a},{x:n,y:a},{x:n,y:r.y},r])},`addVerticalToHorizontalCandidates`),ee=t((e,t,n,r,i)=>{let a=[...u(`top`),...u(`bottom`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:o,y:t.y},{x:o,y:i},{x:n,y:i},{x:n,y:r.y},r])},`addHorizontalPairCandidates`),te=t((e,t,n,r,i)=>{let a=[...u(`left`),...u(`right`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:t.x,y:o},{x:i,y:o},{x:i,y:n},{x:r.x,y:n},r])},`addVerticalPairCandidates`),M=t(e=>{let t=new Set;return e.map(e=>G(e)).filter(e=>{let n=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return t.has(n)||e.length<2?!1:(t.add(n),!0)})},`dedupeCandidatePaths`),ne=t((e,t,n,r)=>{let i=[],a=Oe(e,t,n,r,20,Y);a&&E(i,a),t===r&&k(i,e,t,n);let o=D(t),s=D(r);return o&&!s?A(i,e,t,n,r):!o&&s?j(i,e,t,n,r):o?ee(i,e,t,n,r):te(i,e,t,n,r),M(i)},`buildCandidatesForSides`),N=t((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=De(r,s),c=s===`top`||s===`bottom`?u(s):a;for(let r of i){E(e,[t,n,{x:r,y:n.y},{x:r,y:o.y},o]);for(let i of c)E(e,[t,n,{x:r,y:n.y},{x:r,y:i},{x:o.x,y:i},o])}}},`addVerticalDepartureOuterTrackCandidates`),re=t((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=De(r,s),c=s===`left`||s===`right`?u(s):i;for(let r of a){E(e,[t,n,{x:n.x,y:r},{x:o.x,y:r},o]);for(let i of c)E(e,[t,n,{x:n.x,y:r},{x:i,y:r},{x:i,y:o.y},o])}}},`addHorizontalDepartureOuterTrackCandidates`),P=t(e=>{let t=e.start,n=e.end,r=n?i.get(n):void 0;if(!t||!r)return[];let a=G(e.points??[]);if(a.length<4)return[];let o=a[0],s=a[1],c=[];return H(o,s,Y)?N(c,o,s,r):V(o,s,Y)&&re(c,o,s,r),c},`terminalPreservingOuterTrackCandidates`),ie=t(e=>{let t=e.start,n=e.end,r=t?i.get(t):void 0,a=n?i.get(n):void 0;if(!r||!a)return[];let s=[];for(let e of o){let t=De(r,e);for(let n of o)s.push(...ne(t,e,De(a,n),n))}return s.push(...P(e)),s},`candidatePathsFor`),ae=t(()=>new Map(c.map(e=>[e,Z(d(e))])),`currentSegmentsByEdge`),oe=t((e,t,n)=>{let r=new Set;for(let i of c){if(i===e)continue;let a=n.get(i)??Z(d(i));t.some(e=>a.some(t=>ve(e,t,.5)>=X))&&r.add(i)}return r},`sharedTrackConflictsFor`),se=t((e,t,n,r)=>{let i=new Set;return ie(e).map(e=>He(G(e))).filter(t=>{if(T(e,t))return!1;let n=t.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return i.has(n)||t.length<2?!1:(i.add(n),!0)}).map(i=>{let a=Z(i),o=0;for(let t of c)t!==e&&(o+=f(a,n.get(t)??Z(d(t))));return{candidate:i,candidateSegments:a,crossings:t.count-(r.get(e)??0)+o,bends:W(i,Y),totalBends:W(i),length:x(i)}}).filter(({crossings:e})=>e<=t.count).sort((e,t)=>e.crossings-t.crossings||e.bends-t.bends||e.length-t.length).slice(0,48).map(t=>({path:t.candidate,segments:t.candidateSegments,sharedTrackConflicts:oe(e,t.candidateSegments,n),totalBends:t.totalBends,length:t.length}))},`pairCandidatesFor`),ce=t((e,t,n,r,i,a)=>{let o=0;for(let n of e.pairs)(n.first===t||n.second===t||n.first===r||n.second===r)&&(o+=n.count);let s=f(n.segments,i.segments);for(let e of c){if(e===t||e===r)continue;let o=a.get(e)??Z(d(e));s+=f(n.segments,o)+f(i.segments,o)}return e.count-o+s},`pairCrossingCount`),le=t((e,t)=>{for(let n of e.sharedTrackConflicts)if(n!==t)return!1;return!0},`conflictsOnlyWith`),ue=t((e,t)=>e.segments.some(e=>t.segments.some(t=>ve(e,t,.5)>=X)),`candidatesShareTrack`),de=t((e,t,n,r)=>le(t,n.edge)&&le(r,e.edge)&&!ue(t,r),`pairCandidatesAreCompatible`),fe=t((e,t,n,r,i)=>{let a=ce(e.current,t.edge,n,r.edge,i,e.baseSegments);if(!(a>=e.current.count))return{replacements:new Map([[t.edge,n.path],[r.edge,i.path]]),crossings:a,bends:e.currentBends-(e.baseBendsByEdge.get(t.edge)??0)-(e.baseBendsByEdge.get(r.edge)??0)+n.totalBends+i.totalBends,length:e.currentLength-(e.baseLengthByEdge.get(t.edge)??0)-(e.baseLengthByEdge.get(r.edge)??0)+n.length+i.length}},`scorePairReplacement`),pe=t((e,t)=>e.crossings{let i=r;for(let r of t.candidates)for(let a of n.candidates){if(!de(t,r,n,a))continue;let o=fe(e,t,r,n,a);o&&pe(o,i)&&(i=o)}return i},`bestScoreForOptionPair`),I=t(e=>{let t=S(),n=C(),r=ae(),i=b(e),a=new Map(c.map(e=>[e,W(d(e))])),o=new Map(c.map(e=>[e,x(d(e))])),s=new Map,l=v(e);for(let t of l)for(let n of t){if(s.has(n))continue;let t=se(n,e,r,i);t.length>0&&s.set(n,{edge:n,candidates:t})}let u={replacements:new Map,crossings:e.count,bends:t,length:n},f={current:e,currentBends:t,currentLength:n,baseBendsByEdge:a,baseLengthByEdge:o,baseSegments:r};for(let t of l){let n=new Set(t.filter(t=>e.edgeSet.has(t))),r=t.map(e=>s.get(e)).filter(e=>!!e);for(let e=0;e0?u.replacements:void 0},`bestPairedReplacement`);for(let e=0;e<4;e++){let e=m(),t=e.count;if(t===0)return;let n,r,i=t,a=1/0;for(let o of e.edges){let s=W(d(o),Y);for(let c of ie(o)){let l=T(o,c),u=!l&&w(o,c),d=y(e,o,c),f=W(c,Y);l||u||(di||d===i&&f>=a||(n=o,r=c,i=d,a=f))}}if(n&&r){n.points=r;continue}let o=I(e);if(!o)return;for(let[e,t]of o)e.points=t}}t(Lt,`resolveRenderedOrthogonalCrossings`);var Rt=.001,zt=8;function Bt(e,n){let{nodeInfoById:r,realNodeRects:i}=Ae(n),a=[`top`,`bottom`,`left`,`right`],o={top:Math.min(...i.map(e=>e.rect.top))-20,bottom:Math.max(...i.map(e=>e.rect.bottom))+20,left:Math.min(...i.map(e=>e.rect.left))-20,right:Math.max(...i.map(e=>e.rect.right))+20},s=t((e,t,n,r)=>{let i=[],a=Oe(e,t,n,r,20,Rt);return a&&i.push(a),t===r&&i.push(ke(e,t,n,o[t])),i},`buildOrthogonalPathCandidates`),c=t((e,t)=>{for(let n=0;n{let i=0,a=ye(t,Rt),o=n.start,s=n.end;for(let t of e){if(t===n||t.isLayoutOnly)continue;let e=t.start,c=t.end;if(!r&&o&&s&&(e===o||e===s||c===o||c===s))continue;let l=t.points;if(!(!l||l.length<2))for(let e of a)for(let t of ye(l,Rt)){if(Pe(e.a,e.b,t.a,t.b,Rt,Rt)){i++;continue}ve(e,t,Rt)>=zt&&i++}}return i},`pathConflictCount`),u=t((e,t)=>{let n=Math.abs(e.y-t.rect.top),r=Math.abs(e.y-t.rect.bottom),i=Math.abs(e.x-t.rect.left),a=Math.abs(e.x-t.rect.right),o=`top`,s=n;return r{let r=d.get(e)??[];r.push({side:t,edgeId:n}),d.set(e,r)},`addFaceClaim`);for(let t of e){if(t.isLayoutOnly)continue;let e=t.points??[];if(e.length<1)continue;let n=t.id??``,i=t.start,a=t.end;if(i){let t=r.get(i);t&&f(i,u(e[0],t),n)}if(a){let t=r.get(a);t&&f(a,u(e[e.length-1],t),n)}}let p=t((e,t,n)=>d.get(e)?.some(e=>e.edgeId!==n&&e.side===t)??!1,`faceIsClaimed`);for(let t of e){if(t.isLayoutOnly)continue;let e=t.points;if(!e||e.length<2)continue;let n=W(e,Rt);if(n<4)continue;let i=t.start,o=t.end;if(!i||!o)continue;let m=r.get(i),h=r.get(o);if(!m||!h)continue;let g=t.id??``,_=l(e,t,!0),v=l(e,t),y,b=_,x=n;for(let e of a){if(p(i,e,g))continue;let n=De(m,e);for(let r of a){if(p(o,r,g))continue;let a=De(h,r);for(let u of s(n,e,a,r)){if(c(u,[i,o]))continue;let e=W(u,Rt);if(_>0){let n=l(u,t,!0);if(n>b||n===b&&e>=x)continue;b=n,x=e,y=u;continue}l(u,t)>v||ee.edgeId!==g));let n=d.get(o);n&&d.set(o,n.filter(e=>e.edgeId!==g)),f(i,u(y[0],m),g),f(o,u(y[y.length-1],h),g)}}}t(Bt,`simplifyDetouredEdges`);var Q=.001,Vt=10,Ht=7;function Ut(e,t){let n=t?0:e.length-1,r=t?1:-1,i=e[n],a=e[n+r];if(!i||!a)return;let o=a.x-i.x,s=a.y-i.y;if(!(Math.abs(o)+Math.abs(s)t&&we(e,Wt(t)))}t(Gt,`labelOverlapsOwnMarker`);function Kt(e,n){let r=[];for(let t of e){if(t.isLayoutOnly)continue;let e=t.points;if(!(!e||e.length<2))for(let n=0;n{let n=Te(t,3);for(let{nodeId:t,rect:r}of i)if(t!==e&&we(n,r))return!0;return!1},`labelOverlapsForeignNode`),s=t((e,t)=>{let n=Te(t,3);for(let t of r)if(t.edgeId!==e&&xe(t.p1,t.p2,n))return!0;return!1},`labelOverlapsForeignEdge`),c=t((e,t,n)=>o(e,n)||s(t,n),`labelOverlapsAnything`),l=[],u=t(e=>{for(let{id:t,rect:n}of a)if(Ce(n,e))return t},`findContainingLane`),d=t((e,t)=>l.some(n=>n.labelId!==e&&we(t,n.rect)),`overlapsPlacedLabel`);for(let r of e){if(r.isLayoutOnly)continue;let e=r.labelNodeId;if(!e)continue;let i=n.get(e);if(!i)continue;let f=r.points;if(!f||f.length<2)continue;let p=i.width??0,m=i.height??0;if(p<=0||m<=0)continue;let h=[];for(let e=0;e=Q&&i>=Q||h.push({idx:e,length:r+i,orientation:r>=Q?`horizontal`:`vertical`,midX:(t.x+n.x)/2,midY:(t.y+n.y)/2})}if(h.length===0)continue;let g=h.length>=3?h.filter(e=>e.idx>0&&e.idx0?g:h,v=p>=m?`horizontal`:`vertical`,y=t(e=>[...e].sort((e,t)=>{let n=e.orientation===v;if(n!==(t.orientation===v))return n?-1:1;let r=e.length>=(e.orientation===`horizontal`?p:m)+2;return r===t.length>=(t.orientation===`horizontal`?p:m)+2?t.length-e.length:r?-1:1}),`rankSegments`),b=h[0],x=h[h.length-1],S=[.5,.25,.75,.05,.95,.15,.85,.1,.9],C=t((e,t)=>{let n=f[e.idx],r=f[e.idx+1];return{midX:n.x+(r.x-n.x)*t,midY:n.y+(r.y-n.y)*t}},`anchorAtT`),w=t((e,t,n)=>Math.min(n,Math.max(t,e)),`clamp`),T=t((e,t)=>e.midX>=t.left-Q&&e.midX<=t.right+Q&&e.midY>=t.top-Q&&e.midY<=t.bottom+Q,`pointInsideRectInclusive`),E=t(e=>{let t=Ee(e.midX,e.midY,p,m),n=u(t);if(n)return{laneId:n,anchor:e,rect:t};let r=a.find(({rect:t})=>T(e,t));if(!r)return;let i=r.rect.left+p/2+1,o=r.rect.right-p/2-1,s=r.rect.top+m/2+1,c=r.rect.bottom-m/2-1;if(i>o||s>c)return;let l={midX:w(e.midX,i,o),midY:w(e.midY,s,c)},d=Ee(l.midX,l.midY,p,m);return T(e,d)?{laneId:r.id,anchor:l,rect:d}:void 0},`placementForAnchor`),D=t((e,t,n)=>e.orientation===`horizontal`?Math.abs(t.midX-n.x):Math.abs(t.midY-n.y),`distanceAlongSegment`),O=t((e,t)=>{let n=(e.orientation===`horizontal`?p/2:m/2)+12;if(e===b){let r=f[e.idx];if(D(e,t,r)+Q{let n=y(t);for(let t of n)for(let n of S){let i=C(t,n);if(!O(t,i))continue;let a=E(i);if(a&&!Gt(a.rect,f)&&!d(e,a.rect)&&!c(e,r.id,a.rect))return{laneId:a.laneId,anchor:a.anchor}}},`tryPool`),A=t((t,n,i=!1)=>{let a=y(t);for(let t of a){let a={midX:t.midX,midY:t.midY};if(n&&!O(t,a))continue;let c=E(a);if(c&&!Gt(c.rect,f)&&!d(e,c.rect)&&!o(e,c.rect)&&(i||!s(r.id,c.rect)))return{laneId:c.laneId,anchor:c.anchor}}},`findLaneContainingFallback`),j=k(_)??(_.lengtht.labelId===e);n>=0?l[n]={labelId:e,rect:t}:l.push({labelId:e,rect:t})}}}t(Kt,`anchorLabelsToPolyline`);var qt=1e-6,Jt=4,Yt=3;function Xt(e,t){return e{let s=Xt(r,i),c=0,l=t(e=>{if(!e)return;let t=a.get(e);if(!t)return;let n=o===`x`?t.w/2:t.h/2;n>c&&(c=n)},`consider`);l(n.labelNodeId);for(let t of e){if(t===n||t.isLayoutOnly)continue;let e=t.start,r=t.end;!e||!r||Xt(e,r)===s&&l(t.labelNodeId)}return c>0?c+Yt:0},`labelClearanceFor`);for(let t of e){if(t.isLayoutOnly)continue;let n=t.points;if(!be(n,qt))continue;let a=Ne(t,r,qt);if(!a)continue;let{srcId:s,dstId:c,srcInfo:l,dstInfo:u,collinearX:d,collinearY:f}=a;if(d===f)continue;let p,m;if(d){let e=u.cy>l.cy;p={x:l.cx,y:e?l.rect.bottom:l.rect.top},m={x:u.cx,y:e?u.rect.top:u.rect.bottom}}else{let e=u.cx>l.cx;p={x:e?l.rect.right:l.rect.left,y:l.cy},m={x:e?u.rect.left:u.rect.right,y:u.cy}}if(q(p,m,i,[s,c],1))continue;let h=o(t,s,c,d?`x`:`y`),g=h>Jt?h:Jt,_=[0,g,-g];for(let n of _){let r={...p},a={...m};if(d){if(r.x+=n,a.x+=n,r.x<=l.rect.left||r.x>=l.rect.right||a.x<=u.rect.left||a.x>=u.rect.right)continue}else if(r.y+=n,a.y+=n,r.y<=l.rect.top||r.y>=l.rect.bottom||a.y<=u.rect.top||a.y>=u.rect.bottom)continue;if(!q(r,a,i,[s,c],1)&&!Ie(r,a,e,t,{epsilon:qt})){t.points=[r,a];break}}}}t(Zt,`straightenCollinearSiblingDetours`);function Qt(e,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=je(n.values()),o=t((e,t)=>ye(t,r).map(n=>({...n,edge:e,interior:n.index>=1&&n.index<=t.length-3})),`segmentsFor`),s=t(()=>{let t=[];for(let n of e){if(n.isLayoutOnly)continue;let e=n.points;!e||e.length<2||t.push(...o(n,G(e)))}return t},`allSegments`),c=t((e,t)=>e.horizontal&&t.horizontal?U(e.a.x,e.b.x,t.a.x,t.b.x)>=8&&Math.abs(e.a.y-t.a.y)<7:e.vertical&&t.vertical?U(e.a.y,e.b.y,t.a.y,t.b.y)>=8&&Math.abs(e.a.x-t.a.x)<7:!1,`hasCrowdedParallelTrack`),l=t((t,n)=>{let s=t.start,l=t.end,u=o(t,n);if(u.length!==n.length-1)return!1;let d=[s,l].filter(e=>!!e),f=t.labelNodeId?[t.labelNodeId]:[];for(let e of u)if(q(e.a,e.b,i,d,-2)||q(e.a,e.b,a,f,-2))return!1;for(let n of e){if(n===t||n.isLayoutOnly)continue;let e=n.points;if(!(!e||e.length<2)){for(let t of u)for(let i of o(n,G(e)))if(c(t,i)||Le(t.a,t.b,i.a,i.b,r))return!1}}return!0},`candidateIsSafe`),u=t((e,t)=>{let n=G(e.edge.points??[]);if(n.length<4||e.index>=n.length-1)return;let r=n.map(e=>({...e}));if(e.horizontal)r[e.index].y+=t,r[e.index+1].y+=t;else if(e.vertical)r[e.index].x+=t,r[e.index+1].x+=t;else return;return o(e.edge,r).length===r.length-1?r:void 0},`shiftedCandidate`),d=t((e,t)=>({x:e.x??(t.left+t.right)/2,y:e.y??(t.top+t.bottom)/2}),`nodeCenter`),f=t(e=>{let t=e.edge,r=G(t.points??[]);if(r.length!==4||e.index!==1)return;let i=t.start?n.get(t.start):void 0,a=t.end?n.get(t.end):void 0,o=i?K(i):void 0,s=a?K(a):void 0,c=r.slice(e.index+2);if(!(!i||!a||!o||!s||c.length===0))return{sourceCenter:d(i,o),targetCenter:d(a,s),sourceRect:o,tail:c}},`sourceDetourContextFor`),p=t((e,t,n,i,a,o)=>{let s=i.y>=n.y,c=s?a.bottom:a.top,l=c+(s?20:-20);if(s&&e.b.y<=l+r||!s&&e.b.y>=l-r)return;let u=e.a.x+t;return G([{x:n.x,y:c},{x:n.x,y:l},{x:u,y:l},{x:u,y:e.b.y},...o],r)},`verticalSourceDetour`),m=t((e,t,n,i,a,o)=>{let s=i.x>=n.x,c=s?a.right:a.left,l=c+(s?20:-20);if(s&&e.b.x<=l+r||!s&&e.b.x>=l-r)return;let u=e.a.y+t;return G([{x:c,y:n.y},{x:l,y:n.y},{x:l,y:u},{x:e.b.x,y:u},...o],r)},`horizontalSourceDetour`),h=t((e,t)=>{let n=f(e);if(n){if(e.vertical)return p(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail);if(e.horizontal)return m(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail)}},`sourceDetourCandidate`),g=[-7,7,-14,14,-21,21];for(let e=0;e<12;e++){let e=s(),t=!1;for(let n=0;ne.interior);for(let e of o){for(let n of g){let r=u(e,n);if(r&&l(e.edge,r)){e.edge.points=r,t=!0;break}let i=h(e,n);if(i&&l(e.edge,i)){e.edge.points=i,t=!0;break}}if(t)break}}if(!t)return}}t(Qt,`nudgeSharedInteriorSubpaths`);function $t(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=r.x-n.x,s=r.y-n.y,c=i*s-a*o;if(Math.abs(c)<1e-10)return!1;let l=n.x-e.x,u=n.y-e.y,d=(l*s-u*o)/c,f=(l*a-u*i)/c,p=.01;return d>p&&d<.99&&f>p&&f<.99}t($t,`segmentsIntersect`);function en(e){let t=e.nodes??[],r=e.edges??[],i=[];if(!r.length||!t.length)return i;let a=Me(t),o=[];for(let e of r){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=e.start,r=e.end,s=e.labelNodeId,c=e.id??`${n}->${r}`;for(let e of a)if(e.nodeId!==n&&e.nodeId!==r&&!(s&&e.nodeId===s)){for(let n=0;n0){let e=i.filter(e=>e.type===`edge-node-overlap`).length,t=i.filter(e=>e.type===`edge-edge-crossing`).length;n.warn(`[SWIMLANE_VALIDATE] ${i.length} issue(s) detected: ${e} edge-node overlap(s), ${t} edge crossing(s)`);for(let e of i)n.warn(`[SWIMLANE_VALIDATE] ${e.type}: ${e.detail}`)}return i}t(en,`validateSwimlanesLayout`);function tn(e,n){let r=e.nodes??[],i=e.edges??[],a=r.filter(e=>!e.isGroup);if((n===`LR`||n===`RL`)&&a.length>0&&!St(e,n)||n===`BT`&&a.length>0&&!xt(e))return;for(let e of i){if(e.isLayoutOnly)continue;let t=e.points;!t||t.length<2||(e.points=He(Ve(t)))}Bt(i,r),Zt(i,r),Et(i,r);let o=new Map;for(let e of r)o.set(String(e.id),e);Kt(i,o),Je(i,o),Dt(i,o),Qt(i,o),kt(i,o),At(i,o),jt(i,o),Pt(i,o);let s=t(()=>{Lt(i,o),Ft(i,o),It(i,o),Kt(i,o),pt(i,o),jt(i,o),Kt(i,o),pt(i,o)},`finalizeRenderedEdges`);s(),Qt(i,o),s(),Mt(i,o),Nt(i,o),Mt(i,o),Nt(i,o)}t(tn,`postProcessSwimlaneLayout`);function nn(e){let t=new Map(e.nodeById),n=new Set,r=[];for(let i of e.edges){if(!t.has(i.src)||!t.has(i.dst))continue;let e=`${i.id}:${i.src}->${i.dst}`;n.has(e)||(n.add(e),r.push(i))}return{nodes:[...t.keys()],edges:r,layout:e.layout,nodeById:t}}t(nn,`normalizeGraph`);function rn(e,t){return e.edges.filter(e=>e.dst===t)}t(rn,`incoming`);function an(e){let t=new Map;for(let n of e.nodes)t.set(n,[]);for(let n of e.edges)t.get(n.src).push(n.dst);return t}t(an,`buildSuccessorMap`);function on(e){let t=an(e);for(let e of t.values())e.sort((e,t)=>e.localeCompare(t));return t}t(on,`buildSortedSuccessorMap`);function sn(e){let t=new Map;for(let n of e.nodes)t.set(n,0);for(let n of e.edges)t.set(n.dst,(t.get(n.dst)??0)+1);return t}t(sn,`buildInDegreeMap`);function cn(e){return[...e.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,t)=>e.localeCompare(t))}t(cn,`sortedZeroInDegreeNodes`);function ln(e,t=()=>!0){let n=new Map,r=new Map;for(let t of e.nodes)n.set(t,[]),r.set(t,[]);for(let i of e.edges)t(i)&&(r.get(i.src).push(i.dst),n.get(i.dst).push(i.src));return{preds:n,succs:r}}t(ln,`buildPredecessorSuccessorMaps`);function un(e,t,n,r){let i=0;for(let t of e.nodes)r?.skipGroups&&e.nodeById.get(t)?.isGroup||(i=Math.max(i,n[t]??0));let a=Array.from({length:i+1},()=>[]);for(let i of t)r?.skipGroups&&e.nodeById.get(i)?.isGroup||a[Math.max(0,n[i]??0)].push(i);return a}t(un,`buildLayersFromRanks`);function dn(e){let t=sn(e),n=cn(t),r=[],i=on(e);for(;n.length;){let e=n.shift();r.push(e);for(let r of i.get(e)??[])if(t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0){let e=0;for(;e{if(i-t<=1)return 0;let a=t+i>>1,o=r(t,a)+r(a,i),s=t,c=a,l=t;for(;s=i||se.dst===t.dst?e.id.localeCompare(t.id):e.dst.localeCompare(t.dst));let i=Object.create(null);for(let e of n.nodes)i[e]=0;let a=[],o=t(e=>{i[e]=1;for(let t of r.get(e)??[]){let e=t.dst;i[e]===0?o(e):i[e]===1&&a.push(t)}i[e]=2},`dfs`),s=[...n.nodes].sort((e,t)=>e.localeCompare(t));for(let e of s)i[e]===0&&o(e);let c=new Set(a.map(e=>`${e.id}:${e.src}->${e.dst}`)),l=n.edges.map(e=>c.has(`${e.id}:${e.src}->${e.dst}`)?{id:e.id,src:e.dst,dst:e.src,weight:e.weight,ref:e.ref}:e);return{acyclic:{nodes:[...n.nodes],edges:l,layout:n.layout,nodeById:new Map(n.nodeById)},reversed:a}}t(mn,`removeCycles_DFS`);function hn(e){let n=new Map,r=t(t=>{if(n.has(t))return n.get(t);let i=e.nodeById.get(t);if(!i)return n.set(t,null),null;let a=i.parentId;if(!a)return n.set(t,null),null;let o=r(a)??a;return n.set(t,o),o},`resolve`);for(let t of e.nodes)r(t);return n}t(hn,`buildTopLaneMap`);function gn(e){let t=hn(e);return e=>t.get(e)??null}t(gn,`createTopLaneResolver`);function _n(e){let t=[];for(let n of e.layout.nodes??[])n.isGroup&&!n.parentId&&t.push(n.id);return[...new Set(t)].reverse()}t(_n,`buildTopLaneOrder`);function vn(e,t){let n=_n(e);if(!t||t.length===0)return n;let r=new Set(n),i=new Set,a=[];for(let e of t)!r.has(e)||i.has(e)||(i.add(e),a.push(e));for(let e of n)i.has(e)||a.push(e);return a}t(vn,`resolveTopLaneOrder`);var yn={EPSILON:1e-6},bn={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},xn={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function Sn(e,n){let r=nn(e),i=n?.laneOf??(()=>null),a=n?.rankHint,{preds:o}=ln(r);for(let e of o.values())e.sort((e,t)=>e.localeCompare(t));let s=dn(r)??[...r.nodes].sort((e,t)=>e.localeCompare(t)),c=new Map;for(let[e,t]of s.entries())c.set(t,e);let l=new Map,u=new Map;for(let e of r.nodes)u.set(e,[]);for(let e of s){let t=(o.get(e)??[]).filter(e=>l.has(e));if(t.length>0){let n=Cn(e,t,{laneOf:i,rankHint:a,topoIndex:c});l.set(e,n),u.get(n).push(e)}else l.has(e)||l.set(e,null)}for(let e of r.nodes)l.has(e)||l.set(e,null);let d=new Set;for(let e of r.nodes)(l.get(e)??null)===null&&d.add(e);let f=[...d].sort((e,t)=>{let n=c.get(e)??0,r=c.get(t)??0;return n===r?e.localeCompare(t):n-r}),p=wn(r),m=new Map;for(let[e,t]of p.entries())m.set(e,[...t].sort((e,t)=>e.localeCompare(t)));let h=Tn(m),g=En(m),_=new Map;for(let e of r.nodes)_.set(e,[]);for(let e of g)for(let t of e.nodes){let n=_.get(t);n?n.push(e.id):_.set(t,[e.id])}let v=[],y=[],b=new Set,x=t(e=>{if(!b.has(e)){b.add(e),v.push(e);for(let t of u.get(e)??[])x(t);y.push(e)}},`walk`);for(let e of f)x(e);for(let e of s)x(e);return{parent:l,children:u,roots:f,componentOf:h,blocks:g,nodeBlocks:_,adjacency:m,preorder:v,postorder:y,topologicalOrder:s}}t(Sn,`buildDrivingTree`);function Cn(e,t,n){let r=n.laneOf(e);return[...t].sort((e,t)=>{let i=n.laneOf(e),a=n.laneOf(t),o=i!=null&&i===r;if(o!==(a!=null&&a===r))return o?-1:1;let s=n.rankHint?.[e],c=n.rankHint?.[t];if(s!=null&&c!=null&&s!==c)return c-s;let l=n.topoIndex.get(e)??0,u=n.topoIndex.get(t)??0;return l===u?e.localeCompare(t):l-u})[0]}t(Cn,`chooseParent`);function wn(e){let t=new Map;for(let n of e.nodes)t.set(n,new Set);for(let n of e.edges)t.get(n.src).add(n.dst),t.get(n.dst).add(n.src);return t}t(wn,`buildAdjacency`);function Tn(e){let t=new Map,n=0;for(let r of e.keys()){if(t.has(r))continue;let i=[r];for(;i.length>0;){let r=i.pop();if(!t.has(r)){t.set(r,n);for(let n of e.get(r)??[])t.has(n)||i.push(n)}}n++}return t}t(Tn,`assignComponents`);function En(e){let n=new Map,r=new Map,i=[],a=[],o=0,s=t((t,c)=>{n.set(t,++o),r.set(t,o);for(let l of e.get(t)??[])l!==c&&(n.has(l)?(n.get(l)??0)<(n.get(t)??0)&&(i.push([t,l]),r.set(t,Math.min(r.get(t)??o,n.get(l)??o))):(i.push([t,l]),s(l,t),r.set(t,Math.min(r.get(t)??o,r.get(l)??o)),(r.get(l)??0)>=(n.get(t)??0)&&a.push(Dn(t,l,i,a.length))))},`visit`);for(let t of e.keys())n.has(t)||s(t,null);return a}t(En,`computeBlocks`);function Dn(e,t,n,r){let i=[],a=new Set;for(;n.length>0;){let r=n.pop();if(i.push(r),a.add(r[0]),a.add(r[1]),r[0]===e&&r[1]===t||r[0]===t&&r[1]===e)break}return{id:r,edges:i,nodes:[...a]}}t(Dn,`popBlock`);function On(e,n,r){let i=[...e.nodes],a=new Map;for(let[e,t]of i.entries())a.set(t,e);let o=i.length,s=Array(o).fill(-1),c=Array(o).fill(0),l=[],u=new Set;for(let e of i){let t=r.parent.get(e)??null,n=a.get(e);n!=null&&(t??(s[n]=-1,c[n]=0,u.has(e)||(u.add(e),l.push(e))))}for(;l.length>0;){let e=l.shift(),t=a.get(e);if(t==null)continue;let n=r.children.get(e)??[];for(let e of n){if(u.has(e))continue;let n=a.get(e);n!=null&&(s[n]=t,c[n]=c[t]+1,u.add(e),l.push(e))}}for(let e of i){if(u.has(e))continue;let t=a.get(e);t!=null&&(s[t]=-1,c[t]=0,u.add(e))}let d=Math.max(1,Math.ceil(Math.log2(Math.max(1,o)))+1),f=Array.from({length:d},()=>Array(o).fill(-1));for(let e=0;e{if(e===-1||t===-1)return-1;c[e]>t&1&&(e=f[t][e],e===-1))return-1;if(e===t)return e;for(let n=d-1;n>=0;n--){let r=f[n][e],i=f[n][t];r!==-1&&i!==-1&&r!==i&&(e=r,t=i)}return f[0][e]},`lcaIndex`),m=Array.from({length:o},()=>new Map);for(let t of e.edges){let e=t.src,r=t.dst,i=n[e],o=n[r];if(i==null||o==null||(i>o&&([e,r]=[r,e],[i,o]=[o,i]),i==null||o==null||i===o))continue;let s=a.get(e),c=a.get(r);if(s==null||c==null)continue;let l=p(s,c);if(l===-1)continue;let u=m[l];for(let e=i;e{if(t.size!==0)for(let[n,r]of t)e.set(n,(e.get(n)??0)+r)},`mergeInto`),_=new Set,v=t(e=>{let t=a.get(e);_.add(e);let i=t==null?void 0:m[t],o=i?new Map(i):new Map,s=r.children.get(e)??[];for(let t of s){let r=v(t),i=n[e];if(i!=null){let a=h.get(e);a||(a=new Map,h.set(e,a));let o=r.get(i)??0,s=n[t];s!=null&&s>i&&(o+=1),a.set(t,o)}g(o,r)}return o},`dfs`);for(let e of r.roots)_.has(e)||v(e);for(let e of i)_.has(e)||v(e);return h}t(On,`computeSubtreeCrossCounts`);function kn(e,n,r){let i=new Map,a=t(e=>{let t=r[e]??0,o=[...n.get(e)??[]];o.sort(An(r));for(let e of o){a(e);let n=i.get(e);n!=null&&(t=Math.min(t,n))}i.set(e,t)},`annotate`);for(let t of e)a(t);return i}t(kn,`annotateMinimumLayers`);function An(e){return(t,n)=>{let r=e[t]??0,i=e[n]??0;return r===i?t.localeCompare(n):r-i}}t(An,`compareByRankThenId`);function jn(e,n,r,i){let a=0;for(let e of n){let t=r[e]??0;t>a&&(a=t)}let o=Array.from({length:a+1},()=>[]),s=new Set,c=t(e=>{if(s.has(e))return;s.add(e);let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e);for(let t of i(e))c(t)},`emit`);for(let t of e)c(t);for(let e of n)if(!s.has(e)){let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e),s.add(e)}return o}t(jn,`emitNodesInTreeOrder`);function Mn(e){let t=[];for(let n of e){let e=new Set,r=[];for(let t of n)e.has(t)||(e.add(t),r.push(t));t.push(r)}return t}t(Mn,`deduplicateLayers`);function Nn(e,t,n,r){return i=>{let a=e.get(i)??[];if(a.length===0)return[];let o=t[i]??0,s=[],c=[],l=n.get(i);for(let e of a){let t=r.get(e)??o;t>o?s.push({child:e,min:t}):c.push(e)}return s.sort((e,t)=>e.min===t.min?e.child.localeCompare(t.child):e.min-t.min),c.sort((e,t)=>{let n=l?.get(e)??0,i=l?.get(t)??0;if(n!==i)return n-i;let a=r.get(e)??o,s=r.get(t)??o;return a===s?e.localeCompare(t):a-s}),[...s.map(e=>e.child),...c]}}t(Nn,`createChildOrderer`);function Pn(e,t,n){let r=Sn(e,{rankHint:t,laneOf:n}),{children:i,roots:a}=r;for(let t of e.nodes)i.has(t)||i.set(t,[]);let o=On(e,t,r),s=[...a].sort(An(t)),c=Nn(i,t,o,kn(s,i,t)),l=jn(s,e.nodes,t,c);return l=Mn(l),l}t(Pn,`buildMultitreeLayerOrder`);function Fn(e,t,n){let r=new Set(e),i=new Set(t),a=fn(t),o=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&o.push(a.get(e.dst));return pn(o)}t(Fn,`countCrossingsBetweenAdjacent`);function In(e,t,n){let r=[];for(let e of t){let t=n[e.src],i=n[e.dst];if(t==null||i==null||t===i)continue;let a=e.src,o=e.dst,s=t,c=i;t>i&&(a=e.dst,o=e.src,s=i,c=t);for(let t=s;t(n[t]??0)-(n[e]??0));for(let s of o){let o=n[s]??0;if(o===0)continue;let c=0;for(let e of r.get(s)??[])c=Math.max(c,(n[e]??0)+1);if(c>=o)continue;let l=o;n[s]=c;let u=In(Pn(e,n,i),e.edges,n);u(t[e]??0)-(t[n]??0)||e.localeCompare(n));for(let i of r){let r=n(i);if(!r)continue;let a=e.edges.filter(e=>e.src===i);if(a.length===0)continue;let o=!1,s=0;for(let e of a){let t=n(e.dst);t==null||t===r?o=!0:s++}if(s===0||o)continue;let c=0,l=!1;for(let t of e.edges){if(t.dst!==i)continue;let e=n(t.src);e&&(e===r?l=!0:c++)}if(c>0||!l)continue;let u=t[i]??0,d=u+s,f=0;for(let n of e.edges)n.dst===i&&(f=Math.max(f,(t[n.src]??0)+1));let p=Math.max(u,f,d);p!==u&&(t[i]=p)}}t(Rn,`adjustCrossLaneSources`);function zn(e,t){let n=nn(e),r=dn(n)??[...n.nodes].sort(),i=t?.compactSingleInput??!1,a=gn(n),o=Object.create(null);for(let e of r){let r=rn(n,e),s=t?.ignoreCrossLaneEdges?r.filter(t=>{let n=a(t.src),r=a(e);return!n||!r||n===r}):r;if(s.length===0)o[e]=0;else if(i&&s.length===1){let t=s[0].src;a(t)===a(e)?o[e]=(o[t]??0)+1:o[e]=o[t]??0}else{let t=-1/0;for(let e of s)t=Math.max(t,(o[e.src]??0)+1);o[e]=t===-1/0?0:t}}return(t?.optimizeRanksByCrossings??!1)&&(o=Ln(n,o)),t?.ignoreCrossLaneEdges&&Rn(n,o),{layers:Pn(n,o,a),rankOf:o,dummy:new Set}}t(zn,`assignLayers_LongestPath`);function Bn(e,n){let r=nn(e),i={...zn(r,{compactSingleInput:n?.compactSingleInput,ignoreCrossLaneEdges:n?.ignoreCrossLaneEdges,optimizeRanksByCrossings:n?.optimizeRanksByCrossings}).rankOf},a=gn(r),{preds:o,succs:s}=ln(r,e=>{if(n?.ignoreCrossLaneEdges){let t=a(e.src),n=a(e.dst);if(t&&n&&t!==n)return!1}return!0}),c=dn(r)??[...r.nodes],l=[...c].reverse(),u=t((e,t)=>{let n=0;for(let t of o.get(e)??[])n=Math.max(n,(i[t]??0)+1);let r=1/0,a=s.get(e)??[];return a.length>0&&(r=Math.min(...a.map(e=>(i[e]??0)-1))),Number.isFinite(r)||(r=Math.max(n,t)),Math.min(Math.max(t,n),r)},`clampFeasible`),d=bn.GRAVITY_ITERATIONS,f=t(e=>{let t=!1;for(let n of e){let e=o.get(n)??[],r=s.get(n)??[];if(e.length===0&&r.length===0)continue;let a=e.length>0?e.reduce((e,t)=>e+(i[t]??0)+1,0)/e.length:i[n]??0,c=r.length>0?r.reduce((e,t)=>e+(i[t]??0)-1,0)/r.length:i[n]??0,l=Math.round((a+c)/2),d=u(n,l);d!==i[n]&&(i[n]=d,t=!0)}return t},`relaxOrder`);for(let e=0;e0){let n=Math.min(...t.map(e=>(i[e]??0)-1));(i[e]??0)>n&&(i[e]=n)}}return{layers:un(r,c,i),rankOf:i,dummy:new Set}}t(Bn,`assignLayers_Gravity`);function Vn(e){let t=sn(e),n=on(e),r=cn(t),i=[];for(;r.length>0;){let e=[];for(let a of r){i.push(a);for(let r of n.get(a)??[])t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0&&e.push(r)}r=e.sort((e,t)=>e.localeCompare(t))}return i.length===e.nodes.length?i:null}t(Vn,`topoSortByGenerationIfAcyclic`);function Hn(e,n){let r=nn(e),i=n?.direction===`LR`?Vn(r)??[...r.nodes].sort():dn(r)??[...r.nodes].sort(),a=gn(r),o=t(e=>a(e)??e,`laneOf`),s=Object.create(null),c=new Map,l=t((e,t)=>n?.ignoreCrossLaneEdges??!0?+(o(e)===o(t)):1,`edgeWeight`);for(let e of i){if(r.nodeById.get(e)?.isGroup)continue;let t=rn(r,e),n=0;if(t.length>0)for(let r of t){let t=r.src,i=s[t]??0;n=Math.max(n,i+l(t,e))}let i=o(e),a=c.get(i)??0,u=Math.max(n,a);s[e]=u,c.set(i,u+1)}return{layers:un(r,i,s,{skipGroups:!0}),rankOf:s,dummy:new Set}}t(Hn,`assignLayers_LaneAwareCompact`);function Un(e,n){let r=nn(n),{rankOf:i}=e,a=e.layers.map(e=>[...e]),o=new Set(e.dummy?[...e.dummy]:[]),s=0,c=new Map(r.nodeById),l=t(e=>{let t=`placeholder-${s++}`,n={id:t,isGroup:!1,isDummy:!0,width:0,height:0};for(c.set(t,n),o.add(t);a.length<=e;)a.push([]);return a[e].push(t),i[t]=e,t},`addDummyAt`),u=[...r.edges].sort((e,t)=>e.id===t.id?e.src===t.src?e.dst.localeCompare(t.dst):e.src.localeCompare(t.src):e.id.localeCompare(t.id)),d=[];for(let e of u){let t=i[e.src]??0,n=i[e.dst]??0;if(n-t<=1){d.push(e);continue}let r=e.src;for(let i=t+1,a=0;i!r.nodes.includes(e))],edges:d,layout:r.layout,nodeById:c};return{layering:{layers:a,rankOf:i,dummy:o},graphWithDummies:f}}t(Un,`makeProperLayering`);function Wn(e){let t=e.length;if(t===0)return 1/0;let n=[...e].sort((e,t)=>e-t);return t%2==1?n[(t-1)/2]:.5*(n[t/2-1]+n[t/2])}t(Wn,`median`);function Gn(e){return e.length===0?1/0:e.reduce((e,t)=>e+t,0)/e.length}t(Gn,`barycenter`);function Kn(e,t,n,r){let i=new Map;for(let t of e)i.set(t,[]);for(let e of n)r===`down`?t.has(e.src)&&i.has(e.dst)&&i.get(e.dst).push(t.get(e.src)):t.has(e.dst)&&i.has(e.src)&&i.get(e.src).push(t.get(e.dst));return i}t(Kn,`neighborPositionsFor`);function qn(e,t,n){let r=n.get(e)??0,i=n.get(t)??0;return r===i?e.localeCompare(t):r-i}t(qn,`currentOrderTieBreak`);function Jn(e,t,n){let r=new Set(e),i=new Set(t),a=fn(e),o=fn(t),s=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&s.push({u:a.get(e.src),v:o.get(e.dst)});return s.sort((e,t)=>e.u===t.u?e.v-t.v:e.u-t.u),pn(s.map(e=>e.v))}t(Jn,`countCrossingsBetweenAdjacent`);function Yn(e,t,n){return[...e].sort((e,r)=>{let i=Wn(t.get(e)??[]),a=Wn(t.get(r)??[]);return i===a?qn(e,r,n):isFinite(i)?isFinite(a)?i-a:-1:1})}t(Yn,`sortByHeuristic`);function Xn(e,t,n,r,i,a){let o=fn(e),s=fn(t),c=Kn(t,o,n,r);if(!i||!a||a.length===0)return Yn(t,c,s);let l=new Map;for(let e of t){let t=i(e),n=l.get(t)??[];n.push(e),l.set(t,n)}let u=[];for(let e of a){let t=l.get(e);if(!t||t.length===0)continue;let n=Yn(t,c,s);u.push(...n)}let d=l.get(null);if(d&&d.length>0){let e=Yn(d,c,s);for(let t of e){let e=Gn(c.get(t)??[]),n=u.length;if(isFinite(e)){for(let[t,r]of u.entries())if(es.has(e.src)&&c.has(e.dst)),d=l?r.filter(e=>c.has(e.src)&&l.has(e.dst)):void 0,f=t(t=>{let n=Jn(e,t,u);return d&&i&&(n+=Jn(t,i,d)),n},`crossingScore`),p=a?new Map:null;if(a&&p)for(let e of n)p.set(e,a(e));let m=!0,h=f(o);for(;m;){m=!1;for(let e=0;e+1[...e]),i=t.edges,a=gn(t),o=vn(t,n?.laneOrder);for(let e=0;e<3;e++){for(let e=1;e=0;e--)r[e]=Xn(r[e+1],r[e],i,`up`,a,o),r[e]=Zn(r[e+1],r[e],i,r[e-1],a)}return{layers:r}}t(Qn,`orderLayers`);function $n(e,n,r){let i=r?.layerGap??xn.DEFAULT_LAYER_GAP,a=r?.nodeGap??xn.DEFAULT_NODE_GAP,o=r?.laneGap??a*2,s=r?.direction??`TB`,c=s===`LR`||s===`RL`,l=e.layers,u=Object.create(null),d=Object.create(null),f=t(e=>n.nodeById.get(e),`getNode`),p=t(e=>f(e)?.width??0,`getWidth`),m=t(e=>f(e)?.height??0,`getHeight`),h=gn(n),g=vn(n,r?.laneOrder),_=l.map(e=>e.reduce((e,t)=>Math.max(e,m(t)),0)),v=[];if(c)for(let e=0;e+1Math.max(e,p(t)),0),n=l[e+1].reduce((e,t)=>Math.max(e,p(t)),0),r=_[e],a=_[e+1],o=r/2+a/2,s=(t+n)/2,c=Math.max(0,s-o-i);v.push(c)}let y=new Set;for(let e of l)for(let t of e)y.add(h(t));let b=y.has(null),x=g.filter(e=>y.has(e)),S=[...b?[null]:[],...x],C=Object.create(null);for(let e of x)C[e]=0;b&&(C.null=0);for(let e of l){let t=Object.create(null),n=[];for(let r of e){let e=h(r);e===null?n.push(r):(t[e]||=[]).push(r)}for(let[e,n]of Object.entries(t)){let t=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C[e]=Math.max(C[e]??0,t)}if(b&&n.length){let e=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C.null=Math.max(C.null??0,e)}}let w=new Map;{let e=S.map(e=>(e===null?C.null:C[e])??0),t=-(e.reduce((e,t)=>e+t,0)+o*Math.max(0,S.length-1))/2;for(let n=0;np(e)),r=i-(e.reduce((e,t)=>e+t,0)+a*(t.length-1))/2;for(let[i,o]of t.entries()){let t=e[i];u[o]=r+t/2,d[o]=T+n/2,r+=t+a}}}let o=v[e]??0;T+=n+i+o}let E=new Map;for(let e of n.edges){let t=e.ref.id;E.has(t)||E.set(t,[]),E.get(t).push(e)}for(let[,e]of E){if(e.length===0)continue;let t=e[0].ref,r=t.start,i=t.end;if(r==null||i==null)continue;let a=Math.round(((u[r]??0)+(u[i]??0))/2),o=new Set;for(let t of e)o.add(t.src),o.add(t.dst);for(let e of o)e!==r&&e!==i&&n.nodeById.get(e)?.isDummy&&(u[e]=a)}return{x:u,y:d}}t($n,`assignCoordinates`);var er=8;function tr(e){let t=2166136261;for(let n=0;n>>0}t(tr,`hashString`);function nr(e){let t=e>>>0;return()=>{t+=1831565813;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}t(nr,`mulberry32`);function rr(e,t){let n=[...e],r=nr(t);for(let e=n.length-1;e>0;e--){let t=Math.floor(r()*(e+1));[n[e],n[t]]=[n[t],n[e]]}return n}t(rr,`deterministicShuffle`);function ir(e,t){let n=0;for(let[r,i]of e.entries())n+=Math.abs(r-(t.get(i)??r));return n}t(ir,`sourceDistance`);function ar(e,t){let n=new Map;for(let[t,r]of e.entries())n.set(r,t);let r=0;for(let{a:e,b:i,weight:a}of t){let t=n.get(e),o=n.get(i);t!=null&&o!=null&&(r+=a*Math.abs(t-o))}return r}t(ar,`laneArrangementCost`);function or(e){let t=_n(e);if(t.length<2)return[];let n=new Map(t.map((e,t)=>[e,t])),r=gn(e),i=new Map;for(let t of e.layout.edges??[]){if(t.isLayoutOnly)continue;let a=typeof t.start==`string`?t.start:void 0,o=typeof t.end==`string`?t.end:void 0;if(!a||!o||!e.nodeById.has(a)||!e.nodeById.has(o))continue;let s=r(a),c=r(o);if(!s||!c||s===c)continue;let l=n.get(s),u=n.get(c);if(l==null||u==null)continue;let[d,f]=l<=u?[s,c]:[c,s],p=`${d}\0${f}`,m=i.get(p);m?m.weight++:i.set(p,{a:d,b:f,weight:1})}return[...i.values()]}t(or,`buildWeightedLaneEdges`);function sr(e,t,n){let r=[...e],i=ar(r,t),a=!0,o=0,s=Math.max(1,r.length);for(;a&&oe.a===t.a?e.b.localeCompare(t.b):e.a.localeCompare(t.a)).map(({a:e,b:t,weight:n})=>`${e}:${t}:${n}`).join(`|`);return tr(`${e.join(`|`)}#${r}#${n}`)}t(lr,`seedForRestart`);function ur(e,t={}){let n=_n(e);if(n.length<2)return n;let r=or(e);if(r.length===0)return n;let i=new Map(n.map((e,t)=>[e,t])),a=sr(n,r,i),o=Math.max(0,t.restarts??er);for(let e=0;e$&&c*3>=s?o>0?`bottom`:`top`:s>$?a>0?`right`:`left`:n}t(vr,`chooseOrthogonalSide`);function yr(e,t){return Math.abs(e.to-t.from)<$||Math.abs(e.to-t.to)<$?e.to:e.from}t(yr,`sharedLineEndpointCoord`);function br(e,t){return e.orient===`vertical`?{x:e.coord,y:t}:{x:t,y:e.coord}}t(br,`pointOnLine`);function xr(e,n){let r=e.nodes??[],i=e.edges??[],a=[];for(let e of i)e.isLayoutOnly||a.push({...e,__originalEdge:e});let o=new Map,s=new Map,c=[],l=n===`LR`;for(let e of r)o.set(e.id,e);let u=r.filter(e=>e.isGroup&&!e.parentId);for(let e of u){let n={id:e.id},i=t(e=>{s.set(e.id,n),r.filter(t=>t.parentId===e.id).forEach(i)},`assignLane`);i(e)}let d=r.filter(e=>!e.isGroup&&!e.isEdgeLabel).map(e=>{let t=e.width??10,n=e.height??10,r=e.x??0,i=e.y??0,a=fr;return{nodeId:e.id,minX:r-t/2-a,maxX:r+t/2+a,minY:i-n/2-a,maxY:i+n/2+a,visualXHalfExtent:l?n/2+a:t/2+a}}),f=t((e,t,n,r)=>{let i=c.find(n=>n.orientation===e&&Math.abs(n.coord-t)<1);return i||(i={id:`pipe-${e}-${t.toFixed(0)}`,orientation:e,coord:t,spanMin:n,spanMax:r,tracks:[]},c.push(i)),i.spanMin=Math.min(i.spanMin,n),i.spanMax=Math.max(i.spanMax,r),i},`getOrAddPipe`),p=t((e,t)=>{let n=e.width??10,r=e.height??10,i=e.x??0,a=e.y??0;switch(t){case`top`:return{x:i,y:a-r/2};case`bottom`:return{x:i,y:a+r/2};case`left`:return{x:i-n/2,y:a};case`right`:return{x:i+n/2,y:a}}},`portForSide`),m=t((e,t,n)=>p(e,vr(e,t,n?`bottom`:`top`)),`getOrthogonalPort`),h=[],g=[],_=new Set,v=1e3,y=t((e,t,n)=>{if(h.length===0)return 0;let r=Math.abs(t.y-n.y)<$,i=Math.abs(t.x-n.x)<$;if(!r&&!i)return 0;let a=0;if(r){let r=t.y,i=Math.min(t.x,n.x)-$,o=Math.max(t.x,n.x)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex!==e&&t.orientation===`vertical`&&(t.pipe.coordo||t.from-$<=r&&t.to+$>=r&&(a+=v))}else if(i){let r=t.x,i=Math.min(t.y,n.y)-$,o=Math.max(t.y,n.y)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex!==e&&t.orientation===`horizontal`&&(t.pipe.coordo||t.from-$<=r&&t.to+$>=r&&(a+=v))}return a},`crossingPenalty`),b=a.map((e,t)=>{if(!e.start||!e.end)return{idx:t,crossLane:0,dx:0,dy:0};let n=o.get(e.start),r=o.get(e.end),i=s.get(e.start),a=s.get(e.end);return{idx:t,crossLane:i&&a&&i.id!==a.id?1:0,dx:n&&r?Math.abs((r.x??0)-(n.x??0)):0,dy:n&&r?Math.abs((r.y??0)-(n.y??0)):0}}).sort((e,t)=>{if(e.crossLane!==t.crossLane)return t.crossLane-e.crossLane;let n=e.dx+e.dy,r=t.dx+t.dy;return Math.abs(n-r)>1?n-r:e.idx-t.idx}).map(e=>e.idx),x=t((e,t,n,r)=>{let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return!!d.find(c=>n&&c.nodeId===n||r&&c.nodeId===r?!1:Math.abs(e.x-t.x)>$?c.minYe.y&&c.maxX>i&&c.minXe.x&&c.maxY>o&&c.minYvr(e,t,`bottom`),`determineSide`),T=new Map;for(let[e,t]of a.entries()){if(!t.start||!t.end||t.start===t.end||t.points&&t.points.length>0)continue;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)continue;let i=(r.x??0)-(n.x??0),a=(r.y??0)-(n.y??0);T.set(e,{edgeIdx:e,srcId:t.start,dstId:t.end,srcSide:w(n,{x:r.x??0,y:r.y??0}),dstSide:w(r,{x:n.x??0,y:n.y??0}),absDx:Math.abs(i),absDy:Math.abs(a),dxSign:Math.sign(i),dySign:Math.sign(a)})}let E=t(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.absDx===0?1/0:e.absDy/e.absDx:e.absDy===0?1/0:e.absDx/e.absDy,`preferenceStrength`),D=t(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.dxSign>=0?`right`:`left`:e.dySign>=0?`bottom`:`top`,`secondarySide`),O=new Map;for(let e of T.values()){let t=`${e.srcId}:${e.srcSide}`;O.has(t)||O.set(t,[]),O.get(t).push(e)}let k=new Map,A=t((e,t)=>`${e}:${t}`,`loadKey`);for(let e of T.values())k.set(A(e.srcId,e.srcSide),(k.get(A(e.srcId,e.srcSide))??0)+1),k.set(A(e.dstId,e.dstSide),(k.get(A(e.dstId,e.dstSide))??0)+1);for(let e of O.values())if(!(e.length<2)){e.sort((e,t)=>{let n=E(e),r=E(t);return Math.abs(n-r)>1e-9?r-n:e.edgeIdx-t.edgeIdx});for(let t=1;t=i||(k.set(A(n.srcId,n.srcSide),i-1),k.set(A(n.srcId,r),a+1),n.srcSide=r)}}let j=t(e=>{let t=e?.shape;return t===`question`||t===`diamond`},`isDiamondNode`),ee=new Map;for(let e of T.values())ee.has(e.dstId)||ee.set(e.dstId,new Set),ee.get(e.dstId).add(e.dstSide);for(let e of T.values()){if(!j(o.get(e.srcId)))continue;let t=ee.get(e.srcId);if(!t?.has(e.srcSide))continue;let n=D(e);if(t.has(n)||(k.get(A(e.srcId,n))??0)>0)continue;let r=k.get(A(e.srcId,e.srcSide))??0;k.set(A(e.srcId,e.srcSide),Math.max(0,r-1)),k.set(A(e.srcId,n),1),e.srcSide=n}for(let e of T.values()){let{edgeIdx:t,srcId:n,dstId:r,srcSide:i,dstSide:a}=e,s=o.get(n),c=o.get(r),l=`${n}:${i}:src`,u=i===`top`||i===`bottom`?c.x??0:c.y??0;S.has(l)||S.set(l,[]),S.get(l).push({edgeIdx:t,oppositeCoord:u});let d=`${r}:${a}:dst`,f=a===`top`||a===`bottom`?s.x??0:s.y??0;S.has(d)||S.set(d,[]),S.get(d).push({edgeIdx:t,oppositeCoord:f})}let te=new Map;for(let[e,t]of S){if(t.length<2)continue;t.sort((e,t)=>e.oppositeCoord-t.oppositeCoord);let n=e.split(`:`),r=n.slice(0,-2).join(`:`),i=n[n.length-2],a=n[n.length-1],s=o.get(r);if(!s)continue;let c=i===`left`||i===`right`?s.height??10:s.width??10,l=s.shape,u=l===`question`||l===`diamond`?c*.3:c,d=Math.min(20,Math.max(8,u/(t.length+1))),f=-(d*(t.length-1))/2;for(let[e,n]of t.entries()){let t=f+e*d,r=`${n.edgeIdx}:${a}`;te.set(r,t)}}let M=t(e=>!!a[e]?.labelNodeId,`edgeHasLabelNode`),ne=t((e,t)=>e?(S.get(`${e}:${t}:src`)??[]).some(({edgeIdx:e})=>M(e))||(S.get(`${e}:${t}:dst`)??[]).some(({edgeIdx:e})=>M(e)):!1,`faceHasLabelNode`),N=t((e,t,n)=>t===`top`||t===`bottom`?{x:e.x+n,y:e.y}:{x:e.x,y:e.y+n},`applyPortOffset`),re=t((e,t,n)=>{let r=T.get(e),i={x:n.x??0,y:n.y??0},a={x:t.x??0,y:t.y??0},o=r?.srcSide??w(t,i),s=r?.dstSide??w(n,a),c=r?p(t,r.srcSide):m(t,i,!0),l=r?p(n,r.dstSide):m(n,a,!1),u=te.get(`${e}:src`),d=te.get(`${e}:dst`);return u!==void 0&&(c=N(c,o,u)),d!==void 0&&(l=N(l,s,d)),{pSrcPort:c,pDstPort:l,srcSide:o,dstSide:s}},`portsForEdge`);for(let e of b){let n=a[e];if(g[e]=[],!n.start||!n.end||n.points&&n.points.length>0||n.start===n.end)continue;let r=o.get(n.start),i=o.get(n.end);if(!r||!i)continue;let{pSrcPort:s,pDstPort:u,srcSide:p,dstSide:m}=re(e,r,i),v={...s},b={...u},w=p===`top`||p===`bottom`,T=m===`top`||m===`bottom`;w?v.y=s.y>(r.y??0)?s.y+gr:s.y-gr:v.x=s.x>(r.x??0)?s.x+gr:s.x-gr,T?b.y=u.y>(i.y??0)?u.y+gr:u.y-gr:b.x=u.x>(i.x??0)?u.x+gr:u.x-gr;let E=t((e,t)=>{for(let n of d)if(!t.includes(n.nodeId)&&e.x>n.minX&&e.xn.minY&&e.y{if(i){let i=e.y>(t.y??0);return{x:(n.x??0)>=e.x?r.maxX+pr:r.minX-pr,y:i?r.maxY+mr:r.minY-mr,leavesPositiveSide:i}}let a=e.x>(t.x??0),o=(n.y??0)>=e.y;return{x:a?r.maxX+pr:r.minX-pr,y:o?r.maxY+mr:r.minY-mr,leavesPositiveSide:a}},`obstacleDetour`),O=[],k=[n.start,n.end],A=E(v,k);if(A.inside&&A.obstacle){let e=A.obstacle;if(w){let t=D(s,r,i,e,!0);v.x=t.x,v.y=t.y;let n=t.leavesPositiveSide?Math.min(e.minY-2,s.y+gr):Math.max(e.maxY+2,s.y-gr);O=[{x:s.x,y:n},{x:t.x,y:n},{x:t.x,y:t.y}]}else{let t=D(s,r,i,e,!1),n=t.leavesPositiveSide?Math.min(e.minX-2,s.x+gr):Math.max(e.maxX+2,s.x-gr);v.x=t.x,v.y=t.y,O=[{x:n,y:s.y},{x:n,y:t.y},{x:t.x,y:t.y}]}}let j=[],ee=E(b,k);if(ee.inside&&ee.obstacle){let e=ee.obstacle;if(T){let t=D(u,i,r,e,!0);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:u.x,y:t.y}]}else{let t=D(u,i,r,e,!1);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:t.x,y:u.y}]}}if(O.length===0&&j.length===0){let t=pr,r=Math.abs(v.x-b.x)1||c>1,d=C.get(n.start??``)??0,f=C.get(n.end??``)??0,g=o>1&&ne(n.start,p)||c>1&&ne(n.end,m);if((r||i)&&!a&&(!l||l&&!g&&(o<=1||d<=2)&&(c<=1||f<=2))&&!x(s,u,n.start,n.end)){n.points=[{...s},{...v},{...b},{...u}],_.add(e);let t=i?`horizontal`:`vertical`,r=i?s.y:s.x,a=i?Math.min(s.x,u.x):Math.min(s.y,u.y),o=i?Math.max(s.x,u.x):Math.max(s.y,u.y),c={id:`fast-path-${t}-${r.toFixed(0)}-${e}`,orientation:t,coord:r,spanMin:a,spanMax:o,tracks:[]};h.push({edgeIndex:e,segmentIndex:0,orientation:t,pipe:c,trackIndex:0,from:a,to:o});continue}}v.x=f(`vertical`,v.x,v.y,v.y).coord,b.x=f(`vertical`,b.x,b.y,b.y).coord;let M=Math.min(v.x,b.x)-50,N=Math.max(v.x,b.x)+50,P=Math.min(v.y,b.y)-50,ie=Math.max(v.y,b.y)+50;for(let e of d){let t=Math.min(v.x,b.x),n=Math.max(v.x,b.x),r=Math.min(v.y,b.y),i=Math.max(v.y,b.y);e.minXt&&e.minYr&&(M=Math.min(M,e.minX-hr),N=Math.max(N,e.maxX+hr),P=Math.min(P,e.minY-hr),ie=Math.max(ie,e.maxY+hr))}for(let e of d){if(e.maxXN||e.maxYie)continue;let t=pr;f(`horizontal`,e.minY-t,M,N),f(`horizontal`,e.maxY+t,M,N);let n=mr;f(`vertical`,e.minX-n,P,ie),f(`vertical`,e.maxX+n,P,ie)}f(`horizontal`,v.y,M,N),f(`horizontal`,b.y,M,N);let ae=c.filter(e=>e.orientation===`horizontal`&&e.coord>=P&&e.coord<=ie),oe=c.filter(e=>e.orientation===`vertical`&&e.coord>=M&&e.coord<=N),se=t((e,t)=>`${e.toFixed(1)},${t.toFixed(1)}`,`getKey`),ce=se(v.x,v.y),le=se(b.x,b.y),ue=new Map,de=new Map,fe=new Map,pe=new Set,F=[];ue.set(ce,0),fe.set(ce,`n`),F.push({key:ce,f:Math.hypot(b.x-v.x,b.y-v.y),pt:v}),pe.add(ce);let I=[],me=t((e,t)=>x(e,t,n.start,n.end),`checkSegmentBlocked`),he={x:b.x,y:v.y},L=me(v,he),ge=me(he,b),_e=L||ge,R={x:v.x,y:b.y},z=me(v,R),B=me(R,b);if(_e?z||B||(I=Math.abs(v.x-b.x)<$?[v,b]:[v,R,b]):I=Math.abs(v.y-b.y)<$||Math.abs(v.x-b.x)<$?[v,b]:[v,he,b],I.length===0)for(;F.length>0;){F.sort((e,t)=>e.f-t.f);let t=F.shift();if(pe.delete(t.key),t.key===le){let e=le,t=b;for(I=[t];de.has(e);){let n=de.get(e);I.unshift(n),t=n,e=se(n.x,n.y)}break}let r=t.pt.x,i=t.pt.y,a=oe.sort((e,t)=>e.coord-t.coord),o=a.findIndex(e=>Math.abs(e.coord-r)<1),s=ae.sort((e,t)=>e.coord-t.coord),c=s.findIndex(e=>Math.abs(e.coord-i)<1),l=[];o>0&&l.push({x:a[o-1].coord,y:i}),o>=0&&o0&&l.push({x:r,y:s[c-1].coord}),c>=0&&ce.nodeId===n.start||e.nodeId===n.end?!1:o===s?e.minXr&&e.maxY>c&&e.minYi&&e.maxX>o&&e.minX10&&x<-5||g<-10&&x>5)&&(m=Math.abs(x)*100),(h>10&&_<-5||h<-10&&_>5)&&(m+=Math.abs(_)*50);let S=0,C=fe.get(t.key)??`n`,w=Math.abs(_)>$?`h`:`v`;C!==`n`&&C!==w&&(S=50);let T=f+p+m+S,E=(ue.get(t.key)??1/0)+T,D=Math.abs(b.x-a.x)+Math.abs(b.y-a.y);if(E<(ue.get(u)??1/0)){if(de.set(u,t.pt),ue.set(u,E),fe.set(u,w),!pe.has(u))F.push({key:u,f:E+D,pt:a}),pe.add(u);else{let e=F.findIndex(e=>e.key===u);e!==-1&&(F[e].f=E+D)}}}}if(I.length===0&&(I=[v,{x:v.x,y:b.y},b]),I.length>4){let e=I[0],n=I[I.length-1],r=Math.min(e.x,n.x),i=Math.max(e.x,n.x),a=Math.min(e.y,n.y),o=Math.max(e.y,n.y);for(let e of I)r=Math.min(r,e.x),i=Math.max(i,e.x),a=Math.min(a,e.y),o=Math.max(o,e.y);let s=i>Math.max(e.x,n.x),c=re.minXr&&e.minYa);if(s.length>0){let r=Math.max(e.x,n.x);for(let e of s){let n=(e.minX+e.maxX)/2;if(e.visualXHalfExtent===void 0||isNaN(e.visualXHalfExtent))continue;let i=n+e.visualXHalfExtent+t;r=Math.max(r,i)}isNaN(r)||(i=r)}}if(c){let i=d.filter(r=>r.minXMath.min(e.y,n.y));if(i.length>0){let a=Math.min(e.x,n.x);for(let e of i){let n=(e.minX+e.maxX)/2-e.visualXHalfExtent-t;a=Math.min(a,n)}r=a}}}let u=t(t=>{let r=n.y>e.y,i=d.filter(t=>{let r=Math.min(e.x,n.x)t.minX,i=Math.min(e.y,n.y)t.minY;return r&&i}),a=i;if(l&&i.length>0){let e=i.filter(e=>e.minXt);e.length>0&&(a=e)}if(a.length===0)return n.y;let o=pr;if(r){let e=Math.max(...a.map(e=>e.maxY))+o;if(ee.minY))-o;if(e>n.y+$)return e}return n.y},`findBestReturnY`),f=t(t=>{let r=u(t),i={x:t,y:e.y},a={x:t,y:r},o={x:n.x,y:r},s=me(e,i),c=me(i,a),l=me(a,o),d=r!==n.y&&me(o,n);return!s&&!c&&!l&&!d?Math.abs(r-n.y)<$?[e,i,a,n]:[e,i,a,o,n]:null},`trySimplifyWithDetourX`),p=s&&!c?f(i):c&&!s?f(r):null;p&&(I=p)}let V=[s,...O,...I,...j.reverse(),u];if(V.length>=3){let e=V[V.length-1],t=V[V.length-2],n=V[V.length-3],r=Math.abs(n.y-t.y)<$&&Math.abs(t.y-e.y)<$,i=Math.abs(n.x-t.x)<$&&Math.abs(t.x-e.x)<$;if(r){let r=Math.sign(t.x-n.x),i=Math.sign(e.x-n.x);r!==0&&r===i&&Math.abs(t.x-n.x)>Math.abs(e.x-n.x)&&V.splice(-2,1)}else if(i){let r=Math.sign(t.y-n.y),i=Math.sign(e.y-n.y);r!==0&&r===i&&Math.abs(t.y-n.y)>Math.abs(e.y-n.y)&&V.splice(-2,1)}}let H=[V[0]];for(let e=1;et.x!=r.x>n.x){H.push(n);continue}continue}if(Math.abs(t.x-n.x)<$&&Math.abs(n.x-r.x)<$){if(n.y>t.y!=r.y>n.y){H.push(n);continue}continue}H.push(n)}H.push(V[V.length-1]);for(let t=0;te.from{let i=!r.segments.some(n=>(n.edgeIndex!==t.edgeIndex||n.segmentIndex!==t.segmentIndex)&&P(n,e)),a=!n.segments.some(n=>(n.edgeIndex!==e.edgeIndex||n.segmentIndex!==e.segmentIndex)&&P(n,t));return i&&a?(e.trackIndex=r.index,t.trackIndex=n.index,n.segments=[...n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),{edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,from:t.from,to:t.to}],r.segments=[...r.segments.filter(e=>e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex),{edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to}],!0):!1},`trySwapSegmentsAcrossTracks`),ae=t(e=>{let t=e.tracks.length;return e.tracks[t]={index:t,coord:e.coord,segments:[]},t},`createNewTrack`),oe=t((e,t)=>{let n=e.pipe.tracks[e.trackIndex];n.segments=n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),e.trackIndex=t,e.pipe.tracks[t].segments.push({edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to})},`moveSegmentToTrack`),se=t((e,t)=>{let n=g[e.edgeIndex];for(let r of n){let n=h[r];n.pipe===e.pipe&&oe(n,t)}},`moveSegmentChainToTrack`),ce=t(e=>{let t=g[e.edgeIndex],n=t.indexOf(h.indexOf(e)),r=[];return n>0&&r.push(h[t[n-1]]),n{if(e.orientation===t.orientation)return!1;let n=e.orientation===`horizontal`?e:t,r=e.orientation===`horizontal`?t:e;return r.pipe.coord>n.from&&r.pipe.coordr.from&&n.pipe.coord{for(let n of e.tracks)if(!n.segments.some(e=>(e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex)&&P(e,t)))return n.index;return-1},`findAvailableTrack`),de=t((e,t)=>{if(e.trackIndex===t.trackIndex)return P(e,t);let n=ce(e),r=ce(t);return n.some(e=>r.some(t=>le(e,t)))},`segmentsConflict`),fe=t((e,t,n)=>{if(ie(e,t,e.pipe.tracks[e.trackIndex],t.pipe.tracks[t.trackIndex]))return;let r=ue(e.pipe,t);n(t,r===-1?ae(e.pipe):r)},`resolveTrackConflict`),pe=t(e=>{let t=0;for(let n=0;n{if(F.has(e))return F.get(e);let t=g[e];if(t.length===0){let t={dest:0,deviation:0,base:0,delta:0};return F.set(e,t),t}let n=h[t[0]].pipe.coord,r=n;for(let e=1;eMath.abs(t-n)?e:t;break}}let i=Math.abs(r-n),a={dest:r,deviation:i,base:n,delta:r-n};return F.set(e,a),a},`getDestInfo`),me=t(()=>{let e=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.start&&(n.has(t.start)||n.set(t.start,[]),n.get(t.start).push(e));let r=t(e=>{let t=a[e];if(!t.start||!t.end)return 0;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)return 0;let i=(r.x??0)-(n.x??0),s=(r.y??0)-(n.y??0);return Math.abs(i)+Math.abs(s)},`getEdgeDistance`);for(let t of n.values()){t.sort((e,t)=>{let n=I(e),i=I(t);if(Math.abs(n.deviation-i.deviation)>1)return n.deviation-i.deviation;if(Math.abs(n.dest-i.dest)>1)return n.dest-i.dest;let a=r(e),o=r(t);if(Math.abs(a-o)>1)return o-a;let s=g[e].length,c=g[t].length;if(s!==c)return s-c;if(s===1){let n=g[e][0],r=g[t][0];if(h[n]&&h[r]){let e=h[n],t=h[r],i=Math.abs(e.to-e.from),a=Math.abs(t.to-t.from);if(Math.abs(i-a)>1)return i-a}}return 0});let n=t.map(e=>h[g[e][0]]);e+=pe(n)}return e},`fixSourceHandleCrossings`),he=t(()=>{let e=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.end&&(n.has(t.end)||n.set(t.end,[]),n.get(t.end).push(e));for(let r of n.values()){r.sort((e,n)=>{let r=t(e=>{let t=g[e];if(t.length<2)return 0;let n=h[t[t.length-2]];return Math.abs(n.to-n.from)},`getDist`),i=r(e),a=r(n);return Math.abs(i-a)>.1?i-a:e-n});let n=r.map(e=>h[g[e][g[e].length-1]]);e+=pe(n)}return e},`fixTargetHandleCrossings`),L=t(()=>{let e=0;for(let t of c){let n=[];for(let e of t.tracks)for(let t of e.segments){let e=g[t.edgeIndex].find(e=>h[e].segmentIndex===t.segmentIndex);e!==void 0&&n.push(h[e])}n.sort((e,t)=>e.edgeIndex-t.edgeIndex||e.segmentIndex-t.segmentIndex);for(let t=0;t{e.segments.forEach(t=>{n.push({edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,trackIndex:e.index,from:t.from,to:t.to})})}),n.sort((e,t)=>e.from-t.from);let r=[];if(n.length>0){let e=[n[0]],t=n[0].to;for(let i=1;ir.add(e.trackIndex));let i=new Map;n.forEach(e=>{let t=I(e.edgeIndex);i.set(e.trackIndex,(i.get(e.trackIndex)??0)+t.delta)});let a=[...r].filter(e=>(i.get(e)??0)<-1),o=[...r].filter(e=>(i.get(e)??0)>1),s=[...r].filter(e=>Math.abs(i.get(e)??0)<=1);a.sort((e,t)=>(i.get(t)??0)-(i.get(e)??0)),o.sort((e,t)=>(i.get(e)??0)-(i.get(t)??0));let c=t((t,r)=>{n.filter(e=>e.trackIndex===t).forEach(t=>{let n=_.has(t.edgeIndex)?e.coord:r;_e.set(`${t.edgeIndex}-${t.segmentIndex}`,n)})},`assignCoord`),l=0;for(let t of a)l++,c(t,e.coord-l*_r);if(s.length===0&&r.size>0){let e=[...r].sort((e,t)=>Math.abs(i.get(e)??0)-Math.abs(i.get(t)??0))[0],t=a.indexOf(e);t!==-1&&a.splice(t,1);let n=o.indexOf(e);n!==-1&&o.splice(n,1),s.push(e)}let u=0;for(let t of s){if(u===0)c(t,e.coord);else{let n=u%2==1?1:-1,r=Math.ceil(u/2);c(t,e.coord+n*r*_r*.5)}u++}let d=0;for(let t of o)d++,c(t,e.coord+d*_r)}}for(let[e,t]of a.entries()){let n=g[e]??[];if(n.length===0)continue;let r=[],{pSrcPort:i,pDstPort:a}=re(e,o.get(t.start),o.get(t.end)),s=n.map(e=>{let t=h[e],n=_e.get(`${t.edgeIndex}-${t.segmentIndex}`)??t.pipe.coord;return{orient:t.orientation,coord:n,from:t.from,to:t.to}});r.push(i);for(let e=0;e$&&r.push(br(t,i)),c&&o.orient===t.orient){if(Math.abs(t.coord-o.coord)>$){let e=t.orient===`vertical`?(i+o.from)/2:yr(t,o);r.push(br(t,e),br(o,e))}else(e===0||e===s.length-2)&&r.push(br(t,yr(t,o)))}else if(c)r.push(br(t,o.coord));else{let e=Math.abs(t.from-i)$||Math.abs(c.y-a.y)>$)&&r.push(a);let l=[];r.length>0&&l.push(r[0]);for(let e=1;e$||Math.abs(t.y-n.y)>$)&&l.push(t)}t.points=l}for(let e of a){let t=e.__originalEdge;t&&e.points&&(t.points=e.points)}e.edges=(e.edges??[]).filter(e=>!e.isLayoutOnly);let R=t((e,t)=>{let n=t.x??0,r=t.y??0,i=t.width??0,a=t.height??0;if(i<=0||a<=0)return e;let o=n-i/2,s=n+i/2,c=r-a/2,l=r+a/2;if(e.xs||e.yl)return e;let u=e.x-o,d=s-e.x,f=e.y-c,p=l-e.y,m=Math.min(u,d,f,p);return m===u?{x:o,y:e.y}:m===d?{x:s,y:e.y}:m===f?{x:e.x,y:c}:{x:e.x,y:l}},`nodeBoundaryClamp`);for(let t of e.edges){let e=t.points;if(!e||e.length<2)continue;let n=t.start,r=t.end,i=n?o.get(n):void 0,a=r?o.get(r):void 0;i&&(e[0]=R(e[0],i)),a&&(e[e.length-1]=R(e[e.length-1],a))}return e}t(xr,`routeEdgesOrthogonal`);function Sr(e){return e.direction??`TB`}t(Sr,`getSwimlaneDirection`);function Cr(e){let t=F(e),n=e.config.flowchart?.nodeSpacing??40,r=e.config.flowchart?.rankSpacing??100,i=e.config.swimlane?.ignoreCrossLaneEdges??!0,a=e.config.swimlane?.optimizeRanksByCrossings??!0,o=e.config.swimlane?.automaticLaneOrdering??!1,s=Sr(e),{ordered:c,coordinates:l}=dr(t,{nodeGap:n,layerGap:r,ignoreCrossLaneEdges:i,optimizeRanksByCrossings:a,automaticLaneOrdering:o,direction:s});I(t,c,l,{nodeGap:n,layerGap:r});for(let t of e.edges??[])delete t.points;xr(e,s);for(let t of e.edges??[])(!t.curve||t.curve===`basis`)&&(t.curve=`rounded`);return tn(e,s),en(e),s}t(Cr,`runSwimlaneLayoutCore`);async function wr(e,t){let n=t.select(`g`);p(n,e.markers,e.type,e.diagramId),u(),v(),d(),b(),pe(e);let r=he(e);e.nodes=r.nodes,e.edges=r.edges;let{groups:i}=await x(n,e);Cr(e),await oe(e,i)}t(wr,`render`);export{wr as render}; \ No newline at end of file diff --git a/lecture-01/assets/swimlanesDiagram-GLBMEWQJ-B7w8hc2n.js b/lecture-01/assets/swimlanesDiagram-GLBMEWQJ-B7w8hc2n.js new file mode 100644 index 0000000000000000000000000000000000000000..eea6cd5b48ab4a9d547d607bc5045ce561eb37fe --- /dev/null +++ b/lecture-01/assets/swimlanesDiagram-GLBMEWQJ-B7w8hc2n.js @@ -0,0 +1,8 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import"./chunk-FO5PYUIK-CPzj2963.js";import"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import"./chunk-PWCFYZI5-Dz1excih.js";import"./chunk-PLCLPJVV-BfMyJHbe.js";import"./chunk-XXV7AQMY-qeLKYxsH.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import"./chunk-OX6ZKUVE-roiHi12N.js";import"./chunk-YV36FAQU-CkTVkoM6.js";import"./chunk-AQ2D6KKF-AxjphkEe.js";import"./chunk-2V3FENDJ-B1mkZICr.js";import"./chunk-DKH7L6O3-pKUB4f-O.js";import"./chunk-RTI7CJYH-CrTK6TD7.js";import"./chunk-MPM6TOF7-5cxd71sq.js";import"./chunk-STSWKLMO-1NGmNrHs.js";import"./chunk-ZICDAICJ-CB44yeNY.js";import"./chunk-HPLX5OYV-zid2YVw5.js";import"./chunk-BYAF6FXG-DqiL_6qO.js";import{r as t,t as n}from"./chunk-MX3EQCGM-dfbghwBz.js";var r=n({defaultLayout:`swimlane`,styles:e(e=>`${t(e)} + .swimlane.cluster rect { + stroke: ${e.clusterBorder} !important; + } + [data-look="neo"].cluster rect { + filter: none; + } +`,`getStyles`)});export{r as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/syncState-3Tc2ZArb.js b/lecture-01/assets/syncState-3Tc2ZArb.js new file mode 100644 index 0000000000000000000000000000000000000000..7794b717327092940b94b7656a001e0380a9332e --- /dev/null +++ b/lecture-01/assets/syncState-3Tc2ZArb.js @@ -0,0 +1 @@ +import{Z as e,dt as t,ht as n,lt as r}from"./modules/shiki-CJZsCeMT.js";function i(){return Math.random().toString(36).replace(/[^a-z]+/g,``).substr(2,10)}function a(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!1})}var o=r([{channels:[],enabled:!0,init(e,t,r,i=!1){let a;if(!i)a=new BroadcastChannel(e),a.addEventListener(`message`,e=>t(e.data)),this.channels.push(a);else if(i){this.listener=function(n){n&&n.key===e&&n.newValue&&t(JSON.parse(n.newValue))},window.addEventListener(`storage`,this.listener);let n=window.localStorage.getItem(e);n&&t(JSON.parse(n))}return(t,r=!1)=>{this.enabled&&(!i&&a&&!r&&a.postMessage(n(t)),i&&!r&&window.localStorage.setItem(e,JSON.stringify(t)))}},disable(){this.enabled=!1,this.channels.forEach(e=>e.close()),this.listener&&window.removeEventListener(`storage`,this.listener)}}]),s=new Map,c=t({});function l(t,i,a=!1){let l=[],u=!1,d=!1,f,p,m=r(i);function h(e){l.push(e)}function g(e,t){m[e]!==t&&(clearTimeout(f),u=!0,m[e]=t,f=setTimeout(()=>u=!1,0))}function _(e){u||(clearTimeout(p),d=!0,Object.entries(e).forEach(([e,t])=>{m[e]=t}),p=setTimeout(()=>d=!1,0))}function v(t){s.set(t,{onUpdate:_,persist:a,state:m}),c.value[t]=o.map(e=>e.init(t,_,m,a)).filter(e=>!!e);function r(){c.value[t].forEach(e=>e?.(n(m),d)),u||l.forEach(e=>e(m))}e(m,r,{deep:!0})}return{init:v,onPatch:h,onUpdate:_,patch:g,state:m}}export{a as n,i as r,l as t}; \ No newline at end of file diff --git a/lecture-01/assets/synthetic-ecg-BNIVEI6m.jpeg b/lecture-01/assets/synthetic-ecg-BNIVEI6m.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..d6ccb1eb7fc8adb98eddc9fc065995883e73bd3f --- /dev/null +++ b/lecture-01/assets/synthetic-ecg-BNIVEI6m.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d776ee8545a6764240619460e773c3b4a71c08314a95b912e46c17941fc77f25 +size 586460 diff --git a/lecture-01/assets/synthetic-polyp-CIkbWMkW.jpeg b/lecture-01/assets/synthetic-polyp-CIkbWMkW.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..a8e538358e5855a25c070026225e0fbcbcdfd407 --- /dev/null +++ b/lecture-01/assets/synthetic-polyp-CIkbWMkW.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5dc46fd6a7fc07c6233a496996877680e4846824baf61b205fe11a6368538e96 +size 295929 diff --git a/lecture-01/assets/timeline-definition-XWTBQSRE-eRYZnOTU.js b/lecture-01/assets/timeline-definition-XWTBQSRE-eRYZnOTU.js new file mode 100644 index 0000000000000000000000000000000000000000..d61611b58db01aa3492d75895aec84d8a03e3151 --- /dev/null +++ b/lecture-01/assets/timeline-definition-XWTBQSRE-eRYZnOTU.js @@ -0,0 +1,120 @@ +import{n as e,r as t}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as n,T as r,n as i}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as a,N as o,P as s,S as c,d as l,et as u,o as d,s as f}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as p}from"./chunk-BPTLHSDI-QRS_xuYz.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{h as m}from"./chunk-OX6ZKUVE-roiHi12N.js";var h=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s]}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(n,[2,5],{5:6}),e(n,[2,2]),e(n,[2,3]),e(n,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},e(n,[2,10],{1:[2,1]}),e(n,[2,6]),{12:21,14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},e(n,[2,8]),e(n,[2,9]),e(n,[2,11]),{16:[1,22]},{18:[1,23]},e(n,[2,14]),e(n,[2,15]),e(n,[2,16]),e(n,[2,17]),e(n,[2,18]),e(n,[2,19]),e(n,[2,7]),e(n,[2,12]),e(n,[2,13])],defaultActions:{},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};u.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin(`acc_title`),15;case 10:return this.popState(),`acc_title_value`;case 11:return this.begin(`acc_descr`),17;case 12:return this.popState(),`acc_descr_value`;case 13:this.begin(`acc_descr_multiline`);break;case 14:this.popState();break;case 15:return`acc_descr_multiline_value`;case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return`INVALID`}},`anonymous`),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}}})();function d(){this.yy={}}return t(d,`Parser`),d.prototype=u,u.Parser=d,new d})();h.parser=h;var g=h,_={};e(_,{addEvent:()=>M,addSection:()=>O,addTask:()=>j,addTaskOrg:()=>N,clear:()=>T,default:()=>ee,getCommonDb:()=>w,getDirection:()=>D,getSections:()=>k,getTasks:()=>A,setDirection:()=>E});var v=``,y=0,b=`LR`,x=[],S=[],C=[],w=t(()=>f,`getCommonDb`),T=t(function(){x.length=0,S.length=0,v=``,C.length=0,b=`LR`,d()},`clear`),E=t(function(e){b=e},`setDirection`),D=t(function(){return b},`getDirection`),O=t(function(e){v=e,x.push(e)},`addSection`),k=t(function(){return x},`getSections`),A=t(function(){let e=P(),t=0;for(;!e&&t<100;)e=P(),t++;return S.push(...C),S},`getTasks`),j=t(function(e,t,n){let r={id:y++,section:v,type:v,task:e,score:t||0,events:n?[n]:[]};C.push(r)},`addTask`),M=t(function(e){C.find(e=>e.id===y-1).events.push(e)},`addEvent`),N=t(function(e){let t={section:v,type:v,description:e,task:e,classes:[]};S.push(t)},`addTaskOrg`),P=t(function(){let e=t(function(e){return C[e].processed},`compileTask`),n=!0;for(let[t,r]of C.entries())e(t),n&&=r.processed;return n},`compileTasks`),ee={clear:T,getCommonDb:w,getDirection:D,setDirection:E,addSection:O,getSections:k,getTasks:A,addTask:j,addTaskOrg:N,addEvent:M},F=0,I=t(function(e,t){let n=e.append(`rect`);return n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),n.attr(`rx`,t.rx),n.attr(`ry`,t.ry),t.class!==void 0&&n.attr(`class`,t.class),n},`drawRect`),te=t(function(e,n){let r=e.append(`circle`).attr(`cx`,n.cx).attr(`cy`,n.cy).attr(`class`,`face`).attr(`r`,15).attr(`stroke-width`,2).attr(`overflow`,`visible`),a=e.append(`g`);a.append(`circle`).attr(`cx`,n.cx-5).attr(`cy`,n.cy-5).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`),a.append(`circle`).attr(`cx`,n.cx+5).attr(`cy`,n.cy-5).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`);function o(e){let t=i().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+2)+`)`)}t(o,`smile`);function s(e){let t=i().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+7)+`)`)}t(s,`sad`);function c(e){e.append(`line`).attr(`class`,`mouth`).attr(`stroke`,2).attr(`x1`,n.cx-5).attr(`y1`,n.cy+7).attr(`x2`,n.cx+5).attr(`y2`,n.cy+7).attr(`class`,`mouth`).attr(`stroke-width`,`1px`).attr(`stroke`,`#666`)}return t(c,`ambivalent`),n.score>3?o(a):n.score<3?s(a):c(a),r},`drawFace`),ne=t(function(e,t){let n=e.append(`circle`);return n.attr(`cx`,t.cx),n.attr(`cy`,t.cy),n.attr(`class`,`actor-`+t.pos),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`r`,t.r),n.class!==void 0&&n.attr(`class`,n.class),t.title!==void 0&&n.append(`title`).text(t.title),n},`drawCircle`),L=t(function(e,t){let n=t.text.replace(//gi,` `),r=e.append(`text`);r.attr(`x`,t.x),r.attr(`y`,t.y),r.attr(`class`,`legend`),r.style(`text-anchor`,t.anchor),t.class!==void 0&&r.attr(`class`,t.class);let i=r.append(`tspan`);return i.attr(`x`,t.x+t.textMargin*2),i.text(n),r},`drawText`),re=t(function(e,n){function r(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}t(r,`genPoints`);let i=e.append(`polygon`);i.attr(`points`,r(n.x,n.y,50,20,7)),i.attr(`class`,`labelBox`),n.y+=n.labelMargin,n.x+=.5*n.labelMargin,L(e,n)},`drawLabel`),R=t(function(e,t,n){let r=e.append(`g`),i=B();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width,i.height=n.height,i.class=`journey-section section-type-`+t.num,i.rx=3,i.ry=3,I(r,i),V(n)(t.text,r,i.x,i.y,i.width,i.height,{class:`journey-section section-type-`+t.num},n,t.colour)},`drawSection`),z=-1,ie=t(function(e,t,n,r){let i=t.x+n.width/2,a=e.append(`g`);z++,a.append(`line`).attr(`id`,r+`-task`+z).attr(`x1`,i).attr(`y1`,t.y).attr(`x2`,i).attr(`y2`,450).attr(`class`,`task-line`).attr(`stroke-width`,`1px`).attr(`stroke-dasharray`,`4 2`).attr(`stroke`,`#666`),te(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let o=B();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=n.width,o.height=n.height,o.class=`task task-type-`+t.num,o.rx=3,o.ry=3,I(a,o),V(n)(t.task,a,o.x,o.y,o.width,o.height,{class:`task`},n,t.colour)},`drawTask`),ae=t(function(e,t){I(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:`rect`}).lower()},`drawBackgroundRect`),oe=t(function(){return{x:0,y:0,fill:void 0,"text-anchor":`start`,width:100,height:100,textMargin:0,rx:0,ry:0}},`getTextObj`),B=t(function(){return{x:0,y:0,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),V=(function(){function e(e,t,n,r,a,o,s,c){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`font-color`,c).style(`text-anchor`,`middle`).text(e),s)}t(e,`byText`);function n(e,t,n,r,a,o,s,c,l){let{taskFontSize:u,taskFontFamily:d}=c,f=e.split(//gi);for(let e=0;e)/).reverse(),i,a=[],o=1.1,s=e.attr(`y`),c=parseFloat(e.attr(`dy`)),l=e.text(null).append(`tspan`).attr(`x`,0).attr(`y`,s).attr(`dy`,c+`em`);for(let n=0;nt||i===`
    `)&&(a.pop(),l.text(a.join(` `).trim()),a=i===`
    `?[``]:[i],l=e.append(`tspan`).attr(`x`,0).attr(`y`,s).attr(`dy`,o+`em`).text(i))})}t(H,`wrap`);var ce=t(function(e,t,r,i,a,o=!1){let{theme:s,look:c}=i,l=s?.includes(`redux`),u=r%(i?.themeVariables?.THEME_COLOR_LIMIT??12)-1,d=e.append(`g`);t.section=u,d.attr(`class`,(t.class?t.class+` `:``)+`timeline-node `+(`section-`+u));let f=d.append(`g`),p=d.append(`g`),m=p.append(`text`).text(t.descr).attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).call(H,t.width).node().getBBox(),h=i.fontSize?.replace?i.fontSize.replace(`px`,``):i.fontSize;if(t.height=m.height+h*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width+=2*t.padding,p.attr(`transform`,`translate(`+t.width/2+`, `+t.padding/2+`)`),l&&p.attr(`transform`,`translate(${t.width/2}, ${o?t.padding/2+3:t.padding})`),ue(f,t,u,a,i),c===`neo`&&(d.attr(`data-look`,`neo`),l)){let t=s.includes(`dark`),r=e.node()?.ownerSVGElement??e.node(),i=n(r),a=i.attr(`id`)??``,o=a?`${a}-drop-shadow`:`drop-shadow`;if(i.select(`#${o}`).empty()){let e=i.select(`defs`);(e.empty()?i.append(`defs`):e).append(`filter`).attr(`id`,o).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,t?`0.2`:`0.06`).attr(`flood-color`,t?`#FFFFFF`:`#000000`)}}return t},`drawNode`),le=t(function(e,t,n){let r=e.append(`g`),i=r.append(`text`).text(t.descr).attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).call(H,t.width).node().getBBox(),a=n.fontSize?.replace?n.fontSize.replace(`px`,``):n.fontSize;return r.remove(),i.height+a*1.1*.5+t.padding},`getVirtualNodeHeight`),ue=t(function(e,t,n,r,i){let{theme:a}=i,o=a?.includes(`redux`)?0:5,s=o>0?`M0 ${t.height-5} v${-t.height+10} q0,-${o},${o},-${o} h${t.width-10} q${o},0,${o},${o} v${t.height-5} H0 Z`:`M0 ${t.height-5} v${-(t.height-5)} h${t.width} v${t.height} H0 Z`;e.append(`path`).attr(`id`,r+`-node-`+F++).attr(`class`,`node-bkg node-`+t.type).attr(`d`,s),a?.includes(`redux`)||e.append(`line`).attr(`class`,`node-line-`+n).attr(`x1`,0).attr(`y1`,t.height).attr(`x2`,t.width).attr(`y2`,t.height)},`defaultBkg`),U={drawRect:I,drawCircle:ne,drawSection:R,drawText:L,drawLabel:re,drawTask:ie,drawBackgroundRect:ae,getTextObj:oe,getNoteRect:B,initGraphics:se,drawNode:ce,getVirtualNodeHeight:le},de=t(function(e,t,i,o){let s=a(),{look:c,theme:l,themeVariables:d}=s,{useGradient:f,gradientStart:p,gradientStop:m}=d,h=s.timeline?.leftMargin??50;r.debug(`timeline`,o.db);let g=s.securityLevel,_;g===`sandbox`&&(_=n(`#i`+t));let v=n(g===`sandbox`?_.nodes()[0].contentDocument.body:`body`).select(`#`+t);v.append(`g`);let y=o.db.getTasks(),b=o.db.getCommonDb().getDiagramTitle();r.debug(`task`,y),U.initGraphics(v,t);let x=o.db.getSections();r.debug(`sections`,x);let S=0,C=0,w=0,T=0,E=50+h,D=50;T=50;let O=0,k=!0;x.forEach(function(e){let t={number:O,descr:e,section:O,width:150,padding:20,maxHeight:S},n=U.getVirtualNodeHeight(v,t,s);r.debug(`sectionHeight before draw`,n),S=Math.max(S,n+20)});let A=0,j=0;r.debug(`tasks.length`,y.length);for(let[e,t]of y.entries()){let n={number:e,descr:t,section:t.section,width:150,padding:20,maxHeight:C},i=U.getVirtualNodeHeight(v,n,s);r.debug(`taskHeight before draw`,i),C=Math.max(C,i+20),A=Math.max(A,t.events.length);let a=0;for(let e of t.events){let n={descr:e,section:t.section,number:t.section,width:150,padding:20,maxHeight:50};a+=U.getVirtualNodeHeight(v,n,s)}t.events.length>0&&(a+=(t.events.length-1)*10),j=Math.max(j,a)}r.debug(`maxSectionHeight before draw`,S),r.debug(`maxTaskHeight before draw`,C),x&&x.length>0?x.forEach(e=>{let n=y.filter(t=>t.section===e),i={number:O,descr:e,section:O,width:200*Math.max(n.length,1)-50,padding:20,maxHeight:S};r.debug(`sectionNode`,i);let a=v.append(`g`),o=U.drawNode(a,i,O,s,t);r.debug(`sectionNode output`,o),a.attr(`transform`,`translate(${E}, ${T})`),D+=S+50,n.length>0&&W(v,n,O,E,D,C,s,A,j,S,!1,t),E+=200*Math.max(n.length,1),D=T,O++}):(k=!1,W(v,y,O,E,D,C,s,A,j,S,!0,t));let M=v.node().getBBox();if(r.debug(`bounds`,M),b&&v.append(`text`).text(b).attr(`x`,c===`neo`?M.x*2+h:M.width/2-h).attr(`font-size`,`4ex`).attr(`font-weight`,`bold`).attr(`y`,20),w=k?S+C+150:C+100,v.append(`g`).attr(`class`,`lineWrapper`).append(`line`).attr(`x1`,h).attr(`y1`,w).attr(`x2`,M.width+3*h).attr(`y2`,w).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#${t}-arrowhead)`),c===`neo`&&f&&l!==`neutral`){let e=v.select(`defs`),t=(e.empty()?v.append(`defs`):e).append(`linearGradient`).attr(`id`,v.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);t.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,p).attr(`stop-opacity`,1),t.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,m).attr(`stop-opacity`,1)}u(void 0,v,s.timeline?.padding??50,s.timeline?.useMaxWidth??!1)},`draw`),W=t(function(e,t,n,i,a,o,s,c,l,u,d,f){for(let c of t){let t={descr:c.task,section:n,number:n,width:150,padding:20,maxHeight:o};r.debug(`taskNode`,t);let u=e.append(`g`).attr(`class`,`taskWrapper`),p=U.drawNode(u,t,n,s,f).height;if(r.debug(`taskHeight after draw`,p),u.attr(`transform`,`translate(${i}, ${a})`),o=Math.max(o,p),c.events){let t=e.append(`g`).attr(`class`,`lineWrapper`),r=o;a+=100,r+=fe(e,c.events,n,i,a,s,f),a-=100,t.append(`line`).attr(`x1`,i+95).attr(`y1`,a+o).attr(`x2`,i+95).attr(`y2`,a+o+100+l+100).attr(`stroke-width`,2).attr(`stroke`,`black`).attr(`marker-end`,`url(#${f}-arrowhead)`).attr(`stroke-dasharray`,`5,5`)}i+=200,d&&!s.timeline?.disableMulticolor&&n++}a-=10},`drawTasks`),fe=t(function(e,t,n,i,a,o,s){let c=0,l=a;a+=100;for(let l of t){let t={descr:l,section:n,number:n,width:150,padding:20,maxHeight:50};r.debug(`eventNode`,t);let u=e.append(`g`).attr(`class`,`eventWrapper`),d=U.drawNode(u,t,n,o,s,!0).height;c+=d,u.attr(`transform`,`translate(${i}, ${a})`),a=a+10+d}return a=l,c},`drawEvents`),pe={setConf:t(()=>{},`setConf`),draw:de},G=200,K=5,me=G+K*2,q=G+100,he=q+K*2,J=10,ge=0,Y=20,X=20,Z=30,Q=50,_e=t(function(e,t,n,i){let o=a(),s=o.timeline?.leftMargin??50;r.debug(`timeline`,i.db);let c=p(t);c.append(`g`);let l=i.db.getTasks(),d=i.db.getCommonDb().getDiagramTitle();r.debug(`task`,l),U.initGraphics(c);let f=i.db.getSections();r.debug(`sections`,f);let h=0,g=0,_=50+s,v=50,y=v,b=_,x=me+X,S=he+Q,C=b+x,w=0,T=f&&f.length>0,E=T?C:_+x,D=Math.max(50,x+S-K*2);f.forEach(function(e){let t={number:w,descr:e,section:w,width:D,padding:K,maxHeight:h},n=U.getVirtualNodeHeight(c,t,o);r.debug(`sectionHeight before draw`,n),h=Math.max(h,n)});let O=0;r.debug(`tasks.length`,l.length);for(let[e,t]of l.entries()){let n={number:e,descr:t,section:t.section,width:G,padding:K,maxHeight:g},i=U.getVirtualNodeHeight(c,n,o);r.debug(`taskHeight before draw`,i),g=Math.max(g,i);let a=0;for(let e of t.events){let n={descr:e,section:t.section,number:t.section,width:q,padding:K,maxHeight:50};a+=U.getVirtualNodeHeight(c,n,o)}t.events.length>0&&(a+=(t.events.length-1)*J),O=Math.max(O,a)+ge}r.debug(`maxSectionHeight before draw`,h),r.debug(`maxTaskHeight before draw`,g);let k=Math.max(g,O)+Z;T?f.forEach(e=>{let t=l.filter(t=>t.section===e),n={number:w,descr:e,section:w,width:D,padding:K,maxHeight:h};r.debug(`sectionNode`,n);let i=c.append(`g`),a=U.drawNode(i,n,w,o);r.debug(`sectionNode output`,a);let s=E-x;i.attr(`transform`,`translate(${s}, ${v})`);let u=v+a.height+Y;t.length>0&&$(c,t,w,E,u,g,o,k,!1);let d=t.length,f=a.height+Y+k*Math.max(d,1)-(d>0?Z*2:0);v+=f,w++}):$(c,l,w,E,v,g,o,k,!0);let A=c.node()?.getBBox();if(!A)throw Error(`bbox not found`);if(r.debug(`bounds`,A),d){if(c.append(`text`).text(d).attr(`x`,A.width/2-s).attr(`font-size`,`4ex`).attr(`font-weight`,`bold`).attr(`y`,20),A=c.node()?.getBBox(),!A)throw Error(`bbox not found`);r.debug(`bounds after title`,A)}let[j]=m(o.fontSize),M=(j??16)*2,N=(j??16)*.5+20,P=c.append(`g`).attr(`class`,`lineWrapper`);P.append(`line`).attr(`x1`,E).attr(`y1`,y-M).attr(`x2`,E).attr(`y2`,A.y+A.height+N).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#arrowhead)`),P.lower(),u(void 0,c,o.timeline?.padding??50,o.timeline?.useMaxWidth??!1)},`draw`),$=t(function(e,t,n,i,a,o,s,c,l){for(let u of t){let t={descr:u.task,section:n,number:n,width:G,padding:K,maxHeight:o};r.debug(`taskNode`,t);let d=e.append(`g`).attr(`class`,`taskWrapper`),f=U.drawNode(d,t,n,s),p=f.height;r.debug(`taskHeight after draw`,p);let m=i-X-f.width;if(d.attr(`transform`,`translate(${m}, ${a})`),o=Math.max(o,p),u.events&&u.events.length>0){let t=a,r=i+Q;ve(e,u.events,n,i,r,t,s)}a+=c,l&&!s.timeline?.disableMulticolor&&n++}},`drawTasks`),ve=t(function(e,t,n,i,a,o,s){let c=o;for(let o of t){let t={descr:o,section:n,number:n,width:q,padding:K,maxHeight:0};r.debug(`eventNode`,t);let l=e.append(`g`).attr(`class`,`eventWrapper`),u=U.drawNode(l,t,n,s).height;l.attr(`transform`,`translate(${a}, ${c})`);let d=e.append(`g`).attr(`class`,`lineWrapper`),f=c+u/2;d.append(`line`).attr(`x1`,i).attr(`y1`,f).attr(`x2`,a).attr(`y2`,f).attr(`stroke-width`,2).attr(`stroke`,`black`).attr(`marker-end`,`url(#arrowhead)`).attr(`stroke-dasharray`,`5,5`),c=c+u+J}return c-o},`drawEvents`),ye={setConf:t(()=>{},`setConf`),draw:_e},be=t(e=>{let{theme:t}=c(),n=t?.includes(`dark`),r=t?.includes(`color`),i=e.svgId?.replace(/^#/,``)??``,a=i?`url(#${i}-drop-shadow)`:e.dropShadow??`none`,o=``;for(let t=0;t{let t=``;for(let t=0;t{},`setConf`),draw:t((e,t,n,r)=>(r?.db?.getDirection?.()??`LR`)===`TD`?ye.draw(e,t,n,r):pe.draw(e,t,n,r),`draw`)},parser:g,styles:t(e=>{let{theme:t}=c(),n=t?.includes(`redux`),r=t===`neutral`,i=e.svgId?.replace(/^#/,``)??``,a=``;if(e.useGradient&&i&&e.THEME_COLOR_LIMIT&&!r)for(let t=0;t({emit(e,...t){for(let n=this.events[e]||[],r=0,i=n.length;r{this.events[e]=this.events[e]?.filter(e=>t!==e)}}});function h(e,t){return e-t}function g(e){return e<0?-1:1}function _(e){return[Math.abs(e),g(e)]}function v(){let e=()=>((1+Math.random())*65536|0).toString(16).substring(1);return`${e()+e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`}var y=2;function b(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,`defs`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`marker`),i=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return i.setAttribute(`fill`,t),r.setAttribute(`id`,e),r.setAttribute(`viewBox`,`0 -5 10 10`),r.setAttribute(`refX`,`5`),r.setAttribute(`refY`,`0`),r.setAttribute(`markerWidth`,`4`),r.setAttribute(`markerHeight`,`4`),r.setAttribute(`orient`,`auto`),i.setAttribute(`d`,`M0,-5L10,0L0,5`),r.appendChild(i),n.appendChild(r),n}function x(e,t){let n=e.x-t.x,r=e.y-t.y;return n*n+r*r}function S(e,t,n){let r=t.x,i=t.y,a=n.x-r,o=n.y-i;if(a!==0||o!==0){let t=((e.x-r)*a+(e.y-i)*o)/(a*a+o*o);t>1?(r=n.x,i=n.y):t>0&&(r+=a*t,i+=o*t)}return a=e.x-r,o=e.y-i,a*a+o*o}function C(e,t){let n=e[0],r=[n],i;for(let a=1,o=e.length;at&&(r.push(i),n=i);return n!==i&&i&&r.push(i),r}function w(e,t,n,r,i){let a=r,o=0;for(let r=t+1;ra&&(o=r,a=i)}a>r&&(o-t>1&&w(e,t,o,r,i),i.push(e[o]),n-o>1&&w(e,o,n,r,i))}function T(e,t){let n=e.length-1,r=[e[0]];return w(e,0,n,t,r),r.push(e[n]),r}function E(e,t,n=!1){if(e.length<=2)return e;let r=t===void 0?1:t*t;return e=n?e:C(e,r),e=T(e,r),e}var D=class{constructor(e){this.drauu=e,this.event=void 0,this.point=void 0,this.start=void 0,this.el=null}onSelected(e){}onUnselected(){}onStart(e){}onMove(e){return!1}onEnd(e){}get brush(){return this.drauu.brush}get shiftPressed(){return this.drauu.shiftPressed}get altPressed(){return this.drauu.altPressed}get svgElement(){return this.drauu.el}getMousePosition(e){let t=this.drauu.el,n=this.drauu.options.cssZoom??1,r=this.drauu.options.coordinateScale??1,i=this.drauu.options.offset??{x:0,y:0};if(this.drauu.options.coordinateTransform===!1){let t=this.drauu.el.getBoundingClientRect();return{x:(e.pageX/n-t.left+i.x)*r,y:(e.pageY/n-t.top+i.y)*r,pressure:e.pressure}}{let a=this.drauu.svgPoint;a.x=e.clientX/n+i.x,a.y=e.clientY/n+i.y;let o=a.matrixTransform(t.getScreenCTM()?.inverse());return{x:o.x*r,y:o.y*r,pressure:e.pressure}}}createElement(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,e),r=t?{...this.brush,...t}:this.brush;return n.setAttribute(`fill`,r.fill??`transparent`),n.setAttribute(`stroke`,r.color),n.setAttribute(`stroke-width`,r.size.toString()),n.setAttribute(`stroke-linecap`,`round`),r.dasharray&&n.setAttribute(`stroke-dasharray`,r.dasharray),n}attr(e,t){this.el.setAttribute(e,typeof t==`string`?t:t.toFixed(y))}_setEvent(e){this.event=e,this.point=this.getMousePosition(e)}_eventDown(e){return this._setEvent(e),this.start=this.point,this.onStart(this.point)}_eventMove(e){return this._setEvent(e),this.onMove(this.point)}_eventUp(e){return this._setEvent(e),this.onEnd(this.point)}},O=class e extends D{constructor(...e){super(...e),this.points=[],this.count=0}onStart(e){if(this.el=this.createElement(`path`,{fill:`transparent`}),this.points=[e],this.brush.arrowEnd){this.arrowId=v();let e=b(this.arrowId,this.brush.color);this.el.appendChild(e)}return this.el}onMove(t){return this.el||this.onStart(t),this.points[this.points.length-1]!==t&&(this.points.push(t),this.count+=1),this.count>5&&(this.points=E(this.points,1,!0),this.count=0),this.attr(`d`,e.toSvgData(this.points)),!0}onEnd(){let t=this.el;if(this.el=null,!t)return!1;if(t.setAttribute(`d`,e.toSvgData(E(this.points,1,!0))),!t.getTotalLength()){let{x:e,y:n}=this.points[0],r=this.brush.size/2;t.setAttribute(`d`,`M ${e-r} ${n} a ${r},${r} 0 1,0 ${r*2},0 a ${r},${r} 0 1,0 ${-r*2},0`),t.setAttribute(`fill`,this.brush.color),t.setAttribute(`stroke-width`,`0`)}return!0}static line(e,t){let n=t.x-e.x,r=t.y-e.y;return{length:Math.sqrt(n**2+r**2),angle:Math.atan2(r,n)}}static controlPoint(t,n,r,i){let a=n||t,o=r||t,s=e.line(a,o),c=s.angle+(i?Math.PI:0),l=s.length*.2;return{x:t.x+Math.cos(c)*l,y:t.y+Math.sin(c)*l}}static bezierCommand(t,n,r){let i=e.controlPoint(r[n-1],r[n-2],t),a=e.controlPoint(t,r[n-1],r[n+1],!0);return`C ${i.x.toFixed(y)},${i.y.toFixed(y)} ${a.x.toFixed(y)},${a.y.toFixed(y)} ${t.x.toFixed(y)},${t.y.toFixed(y)}`}static toSvgData(t){return t.reduce((t,n,r,i)=>r===0?`M ${n.x.toFixed(y)},${n.y.toFixed(y)}`:`${t} ${e.bezierCommand(n,r,i)}`,``)}},k=class extends D{onStart(e){return this.el=this.createElement(`ellipse`),this.attr(`cx`,e.x),this.attr(`cy`,e.y),this.el}onMove(e){if(!this.el||!this.start)return!1;let[t,n]=_(e.x-this.start.x),[r,i]=_(e.y-this.start.y);if(this.shiftPressed){let e=Math.min(t,r);t=e,r=e}if(this.altPressed)this.attr(`cx`,this.start.x),this.attr(`cy`,this.start.y),this.attr(`rx`,t),this.attr(`ry`,r);else{let[e,a]=[this.start.x,this.start.x+t*n].sort(h),[o,s]=[this.start.y,this.start.y+r*i].sort(h);this.attr(`cx`,(e+a)/2),this.attr(`cy`,(o+s)/2),this.attr(`rx`,(a-e)/2),this.attr(`ry`,(s-o)/2)}return!0}onEnd(){let e=this.el;if(this.el=null,!e)return!1;try{if(!e.getTotalLength())return!1}catch{return!1}return!0}},A=class extends D{constructor(...e){super(...e),this.pathSubFactor=20,this.pathFragments=[],this._erased=[]}onSelected(e){let t=(e,n)=>{if(e&&e.length)for(let r=0;re.forEach(e=>this.drauu._restoreNode(e)),redo:()=>e.forEach(e=>this.drauu._removeNode(e))}}checkAndEraseElement(){if(this.pathFragments.length)for(let e=0;e!this._erased.includes(e.element))),this._erased.length>0}lineLineIntersect(e,t){let n=e.x1,r=e.x2,i=t.x1,a=t.x2,o=e.y1,s=e.y2,c=t.y1,l=t.y2,u=(n-r)*(c-l)-(o-s)*(i-a),d=(n*s-o*r)*(i-a)-(n-r)*(i*l-c*a),f=(n*s-o*r)*(c-l)-(o-s)*(i*l-c*a),p=(e,t,n)=>e>=t&&e<=n||e>=n&&e<=t;if(u===0)return!1;{let e={x:d/u,y:f/u};return p(e.x,n,r)&&p(e.y,o,s)&&p(e.x,i,a)&&p(e.y,c,l)}}},j=class extends D{onStart(e){if(this.el=this.createElement(`line`,{fill:`transparent`}),this.attr(`x1`,e.x),this.attr(`y1`,e.y),this.attr(`x2`,e.x),this.attr(`y2`,e.y),this.brush.arrowEnd){let e=v(),t=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return t.append(b(e,this.brush.color)),t.append(this.el),this.attr(`marker-end`,`url(#${e})`),t}return this.el}onMove(e){if(!this.el)return!1;let{x:t,y:n}=e;if(this.shiftPressed){let r=e.x-this.start.x,i=e.y-this.start.y;if(i!==0){let e=r/i;e=Math.round(e),Math.abs(e)<=1?(t=this.start.x+i*e,n=this.start.y+i):(t=this.start.x+r,n=this.start.y)}}return this.altPressed?(this.attr(`x1`,this.start.x*2-t),this.attr(`y1`,this.start.y*2-n),this.attr(`x2`,t),this.attr(`y2`,n)):(this.attr(`x1`,this.start.x),this.attr(`y1`,this.start.y),this.attr(`x2`,t),this.attr(`y2`,n)),!0}onEnd(){let e=this.el;if(this.el=null,!e)return!1;try{if(e.getTotalLength()<5)return!1}catch{return!1}return!0}},M=class extends D{onStart(e){return this.el=this.createElement(`rect`),this.brush.cornerRadius&&(this.attr(`rx`,this.brush.cornerRadius),this.attr(`ry`,this.brush.cornerRadius)),this.attr(`x`,e.x),this.attr(`y`,e.y),this.el}onMove(e){if(!this.el||!this.start)return!1;let[t,n]=_(e.x-this.start.x),[r,i]=_(e.y-this.start.y);if(this.shiftPressed){let e=Math.min(t,r);t=e,r=e}if(this.altPressed)this.attr(`x`,this.start.x-t),this.attr(`y`,this.start.y-r),this.attr(`width`,t*2),this.attr(`height`,r*2);else{let[e,a]=[this.start.x,this.start.x+t*n].sort(h),[o,s]=[this.start.y,this.start.y+r*i].sort(h);this.attr(`x`,e),this.attr(`y`,o),this.attr(`width`,a-e),this.attr(`height`,s-o)}return!0}onEnd(){let e=this.el;if(this.el=null,!e)return!1;try{if(!e.getTotalLength())return!1}catch{return!1}return!0}};function N(e,t,n,r=e=>e){return e*r(.5-t*(.5-n))}function P(e){return[-e[0],-e[1]]}function F(e,t){return[e[0]+t[0],e[1]+t[1]]}function I(e,t){return[e[0]-t[0],e[1]-t[1]]}function L(e,t){return[e[0]*t,e[1]*t]}function R(e,t){return[e[0]/t,e[1]/t]}function z(e){return[e[1],-e[0]]}function B(e,t){return e[0]*t[0]+e[1]*t[1]}function V(e,t){return e[0]===t[0]&&e[1]===t[1]}function H(e){return Math.hypot(e[0],e[1])}function U(e){return e[0]*e[0]+e[1]*e[1]}function W(e,t){return U(I(e,t))}function G(e){return R(e,H(e))}function K(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function q(e,t,n){let r=Math.sin(n),i=Math.cos(n),a=e[0]-t[0],o=e[1]-t[1],s=a*i-o*r,c=a*r+o*i;return[s+t[0],c+t[1]]}function J(e,t,n){return F(e,L(I(t,e),n))}function Y(e,t,n){return F(e,L(t,n))}var{min:X,PI:Z}=Math,Q=.275,$=Z+1e-4;function ee(e,t={}){let{size:n=16,smoothing:r=.5,thinning:i=.5,simulatePressure:a=!0,easing:o=e=>e,start:s={},end:c={},last:l=!1}=t,{cap:u=!0,easing:d=e=>e*(2-e)}=s,{cap:f=!0,easing:p=e=>--e*e*e+1}=c;if(e.length===0||n<=0)return[];let m=e[e.length-1].runningLength,h=s.taper===!1?0:s.taper===!0?Math.max(n,m):s.taper,g=c.taper===!1?0:c.taper===!0?Math.max(n,m):c.taper,_=(n*r)**2,v=[],y=[],b=e.slice(0,10).reduce((e,t)=>{let r=t.pressure;if(a){let i=X(1,t.distance/n);r=X(1,e+(X(1,1-i)-e)*(i*Q))}return(e+r)/2},e[0].pressure),x=N(n,i,e[e.length-1].pressure,o),S,C=e[0].vector,w=e[0].point,T=w,E=w,D=T,O=!1;for(let t=0;t_)&&(v.push(E),w=E),D=F(s,R),(t<=1||W(T,D)>_)&&(y.push(D),T=D),b=r,C=c}let k=e[0].point.slice(0,2),A=e.length>1?e[e.length-1].point.slice(0,2):F(e[0].point,[1,1]),j=[],M=[];if(e.length===1){if(!(h||g)||l){let e=Y(k,G(z(I(k,A))),-(S||x)),t=[];for(let n=1/13,r=n;r<=1;r+=n)t.push(q(e,k,$*2*r));return t}}else{if(!(h||g&&e.length===1)){if(u)for(let e=1/13,t=e;t<=1;t+=e){let e=q(y[0],k,$*t);j.push(e)}else{let e=I(v[0],y[0]),t=L(e,.5),n=L(e,.51);j.push(I(k,t),I(k,n),F(k,n),F(k,t))}}let t=z(P(e[e.length-1].vector));if(g||h&&e.length===1)M.push(A);else if(f){let e=Y(A,t,x);for(let t=1/29,n=t;n<1;n+=t)M.push(q(e,A,$*3*n))}else M.push(F(A,L(t,x)),F(A,L(t,x*.99)),I(A,L(t,x*.99)),I(A,L(t,x)))}return v.concat(M,y.reverse(),j)}function te(e,t={}){let{streamline:n=.5,size:r=16,last:i=!1}=t;if(e.length===0)return[];let a=.15+(1-n)*.85,o=Array.isArray(e[0])?e:e.map(({x:e,y:t,pressure:n=.5})=>[e,t,n]);if(o.length===2){let e=o[1];o=o.slice(0,-1);for(let t=1;t<5;t++)o.push(J(o[0],e,t/4))}o.length===1&&(o=[...o,[...F(o[0],[1,1]),...o[0].slice(2)]]);let s=[{point:[o[0][0],o[0][1]],pressure:o[0][2]>=0?o[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],c=!1,l=0,u=s[0],d=o.length-1;for(let e=1;e=0?o[e][2]:.5,vector:G(I(u.point,t)),distance:n,runningLength:l},s.push(u)}return s[0].vector=s[1]?.vector||[0,0],s}function ne(e,t={}){return ee(te(e,t),t)}var re=class e extends D{constructor(...e){super(...e),this.points=[]}onStart(e){return this.el=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),this.points=[e],this.attr(`fill`,this.brush.color),this.attr(`d`,this.getSvgData(this.points)),this.el}onMove(e){return this.el||this.onStart(e),this.points[this.points.length-1]!==e&&this.points.push(e),this.attr(`d`,this.getSvgData(this.points)),!0}onEnd(){let e=this.el;return this.el=null,!!e}getSvgData(t){return e.getSvgData(t,this.brush)}static getSvgData(e,t){let n=ne(e,{size:t.size,thinning:.9,simulatePressure:!1,start:{taper:5},end:{taper:5},...t.stylusOptions});if(!n.length)return``;let r=n.reduce((e,[t,n],r,i)=>{let[a,o]=i[(r+1)%i.length];return e.push(t,n,(t+a)/2,(n+o)/2),e},[`M`,...n[0],`Q`]);return r.push(`Z`),r.map(e=>typeof e==`number`?e.toFixed(2):e).join(` `)}};function ie(e){return{draw:new O(e),stylus:new re(e),line:new j(e),rectangle:new M(e),ellipse:new k(e),eraseLine:new A(e)}}var ae=class{constructor(e={}){this.options=e,this.el=null,this.svgPoint=null,this.eventEl=null,this.shiftPressed=!1,this.altPressed=!1,this.drawing=!1,this._emitter=m(),this._originalPointerId=null,this._models=ie(this),this._opStack=[],this._opIndex=0,this._disposables=[],this._elements=[],this.options.brush||(this.options.brush={color:`black`,size:3,mode:`stylus`}),e.el&&this.mount(e.el,e.eventTarget,e.window)}get model(){return this._models[this.mode]}get mounted(){return!!this.el}get mode(){return this.options.brush.mode||`stylus`}set mode(e){this._models[this.mode].onUnselected(),this.options.brush.mode=e,this.model.onSelected(this.el)}get brush(){return this.options.brush}set brush(e){this.options.brush=e}resolveSelector(e){return typeof e==`string`?document.querySelector(e):e||null}mount(e,t,n=window){if(this.el)throw Error(`[drauu] already mounted, unmount previous target first`);if(this.el=this.resolveSelector(e),!this.el)throw Error(`[drauu] target element not found`);if(this.el.tagName.toLocaleLowerCase()!==`svg`)throw Error(`[drauu] can only mount to a SVG element`);if(!this.el.createSVGPoint)throw Error(`[drauu] SVG element must be create by document.createElementNS('http://www.w3.org/2000/svg', 'svg')`);this.svgPoint=this.el.createSVGPoint();let r=this.resolveSelector(t)||this.el,i=this.eventStart.bind(this),a=this.eventMove.bind(this),o=this.eventEnd.bind(this),s=this.eventKeyboard.bind(this),c=this.touchMove.bind(this);r.addEventListener(`pointerdown`,i,{passive:!1}),n.addEventListener(`pointermove`,a,{passive:!1}),n.addEventListener(`pointerup`,o,{passive:!1}),n.addEventListener(`pointercancel`,o,{passive:!1}),n.addEventListener(`keydown`,s,!1),n.addEventListener(`keyup`,s,!1),n.addEventListener(`touchmove`,c,{passive:!1}),this._disposables.push(()=>{r.removeEventListener(`pointerdown`,i),n.removeEventListener(`pointermove`,a),n.removeEventListener(`pointerup`,o),n.removeEventListener(`pointercancel`,o),n.removeEventListener(`keydown`,s,!1),n.removeEventListener(`keyup`,s,!1),n.removeEventListener(`touchmove`,c)}),this._emitter.emit(`mounted`)}unmount(){this._disposables.forEach(e=>e()),this._disposables.length=0,this._elements.length=0,this.el=null,this._emitter.emit(`unmounted`)}on(e,t){return this._emitter.on(e,t)}undo(){return!this.canUndo()||this.drawing?!1:(this._opStack[--this._opIndex].undo(),this._emitter.emit(`changed`),!0)}redo(){return!this.canRedo()||this.drawing?!1:(this._opStack[this._opIndex++].redo(),this._emitter.emit(`changed`),!0)}canRedo(){return this._opIndex0}eventMove(e){!this.acceptsInput(e)||!this.drawing||this.model._eventMove(e)&&(e.stopPropagation(),e.preventDefault(),this._emitter.emit(`changed`))}eventStart(e){this.acceptsInput(e)&&(e.stopPropagation(),e.preventDefault(),this._currentNode&&this.cancel(),this.drawing=!0,this._originalPointerId=e.pointerId,this._emitter.emit(`start`),this._currentNode=this.model._eventDown(e),this._currentNode&&this.mode!==`eraseLine`&&this.el.appendChild(this._currentNode),this._emitter.emit(`changed`))}eventEnd(e){if(!this.acceptsInput(e)||!this.drawing)return;let t=this.model._eventUp(e);if(!t)this.cancel();else if(t===!0){let e=this._currentNode;e&&(this._appendNode(e),this.commit({undo:()=>this._removeNode(e),redo:()=>this._restoreNode(e)}))}else this.commit(t);this.drawing=!1,this._emitter.emit(`end`),this._emitter.emit(`changed`),this._originalPointerId=null}touchMove(e){Array.from(e.touches).some(e=>e.touchType===`stylus`&&e.identifier===this._originalPointerId)&&e.preventDefault()}acceptsInput(e){return(!this.options.acceptsInputTypes||this.options.acceptsInputTypes.includes(e.pointerType))&&!(this._originalPointerId&&this._originalPointerId!==e.pointerId)}eventKeyboard(e){(this.shiftPressed!==e.shiftKey||this.altPressed!==e.altKey)&&(this.shiftPressed=e.shiftKey,this.altPressed=e.altKey,this.model.point&&this.model.onMove(this.model.point)&&this._emitter.emit(`changed`))}commit(e){this._opStack.length=this._opIndex,this._opStack.push(e),this._opIndex++;let t=this._currentNode;this._currentNode=void 0,this._emitter.emit(`committed`,t)}clear(){this._opStack.length=0,this._opIndex=0,this._elements=[],this.cancel(),this.el.innerHTML=``,this._emitter.emit(`changed`)}cancel(){this._currentNode&&(this.el.removeChild(this._currentNode),this._currentNode=void 0,this._emitter.emit(`canceled`))}dump(){return this.el.innerHTML}load(e){this.clear(),this.el.innerHTML=e}_appendNode(e){let t=this._elements.at(-1);t?t.after(e):this.el.append(e);let n=this._elements.push(e)-1;e.dataset.drauu_index=n.toString()}_removeNode(e){e.remove(),this._elements[+e.dataset.drauu_index]=null}_restoreNode(e){let t=+e.dataset.drauu_index;this._elements[t]=e;for(let n=t-1;n>=0;n--){let t=this._elements[n];if(t){t.after(e);return}}this.el.prepend(e)}};function oe(e){return new ae(e)}var se=l(()=>{let{currentSlideNo:l,isPresenter:m}=c(),h=[`#ff595e`,`#ffca3a`,`#8ac926`,`#1982c4`,`#6a4c93`,`#ffffff`,`#000000`],g=u(`slidev-drawing-enabled`,!1),_=u(`slidev-drawing-pinned`,!1),v=u(`slidev-drawing-brush`,{color:h[0],size:4,mode:`stylus`}),y=n(!1),b=n(!1),x=n(!1),S=n(!1),C=n(`stylus`),w=r(()=>o.drawings.syncAll||m.value),T=!1,E=r({get(){return C.value},set(e){C.value=e,e===`arrow`?(O.mode=`line`,v.value.arrowEnd=!0):(O.mode=e,v.value.arrowEnd=!1)}}),D=i({brush:v,acceptsInputTypes:r(()=>g.value&&(!o.drawings.presenterOnly||m.value)?void 0:[`pen`]),coordinateTransform:!1}),O=a(oe(D));function k(){O.clear(),w.value&&f(l.value,``)}function A(){x.value=O.canRedo(),b.value=O.canUndo(),S.value=!!O.el?.children.length}function j(e){T=!0;let t=p[e||l.value];t==null?O.clear():O.load(t),A(),T=!1}return O.on(`changed`,()=>{if(A(),!T){let e=O.dump(),t=l.value;(p[t]||``)!==e&&w.value&&f(t,O.dump())}}),d(e=>{T=!0,e[l.value]!=null&&O.load(e[l.value]||``),T=!1,A()}),e(()=>{t(l,()=>{O.mounted&&j()},{immediate:!0})}),O.on(`start`,()=>y.value=!0),O.on(`end`,()=>y.value=!1),window.addEventListener(`keydown`,e=>{if(!g.value||s.value)return;let t=!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey,n=!0;e.code===`KeyZ`&&(e.ctrlKey||e.metaKey)?e.shiftKey?O.redo():O.undo():e.code===`Escape`?g.value=!1:e.code===`KeyL`&&t?E.value=`line`:e.code===`KeyA`&&t?E.value=`arrow`:e.code===`KeyS`&&t?E.value=`stylus`:e.code===`KeyR`&&t?E.value=`rectangle`:e.code===`KeyE`&&t?E.value=`ellipse`:e.code===`KeyC`&&t?k():e.code.startsWith(`Digit`)&&t&&+e.code[5]<=h.length?v.value.color=h[e.code[5]-1]:n=!1,n&&(e.preventDefault(),e.stopPropagation())},!1),{brush:v,brushColors:h,canClear:S,canRedo:x,canUndo:b,clear:k,drauu:O,drauuOptions:D,drawingEnabled:g,drawingMode:E,drawingPinned:_,drawingState:p,isDrawing:y,loadCanvas:j}});export{se as t}; \ No newline at end of file diff --git a/lecture-01/assets/useNav-CGjBnVA8.js b/lecture-01/assets/useNav-CGjBnVA8.js new file mode 100644 index 0000000000000000000000000000000000000000..2a15a2e4f5337c7c79c419ea5688c27398ca9746 --- /dev/null +++ b/lecture-01/assets/useNav-CGjBnVA8.js @@ -0,0 +1,81 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/md-bAEnFVLa.js","assets/modules/shiki-CJZsCeMT.js","assets/rolldown-runtime-hePW80VL.js","assets/modules/shiki-BrmBd2_v.css","assets/_plugin-vue_export-helper-BDNMzG2s.js","assets/slidev/context-C6dxaFaS.js","assets/modules/vue-ClnAKIA7.js","assets/md-CYXxUBJM.css","assets/md-DAoD5lJx.js","assets/section-B0St524Y.js","assets/section-BZ9Dfv_4.css","assets/md-G7taWeXP2.js","assets/default-cZapvzLK.js","assets/DeckFooter-BcBH6IgO.js","assets/syncState-3Tc2ZArb.js","assets/index-DOePylYH.js","assets/preload-helper-DpA04vUI.js","assets/index-DCPWAYn_.css","assets/useDrawings-aZNIHmMQ.js","assets/DeckFooter-B6vKMo6W.css","assets/default-DFJXHcku.css","assets/md-btiQZx8e2.js","assets/slidev/VClicks-XVjwUv_k.js","assets/md-C7CHIzYm.css","assets/md-CHMR2MgZ2.js","assets/md-Bvp7L6DM2.js","assets/md-DGLCzXy3.js","assets/md-9H7zUQWd.js","assets/md-BjXl9HiE.js","assets/md-DZVackxx.js","assets/md-OYY3MJ1x.css","assets/md-qdiBjKc9.js","assets/md-DDa8FB96.js","assets/md-DMz-2E6M.js","assets/Citation-BrOphNXC.js","assets/Citation-rca7ok54.css","assets/md-Nkx2rUY6.js","assets/figure--eqXHWiv.js","assets/figure-BX47ygGP.css","assets/md-FdUKh9Do.js","assets/LinkCard-DOp_LlnV.js","assets/LinkCard-DhZ23yU-.css","assets/interactive-CJ_TWtJM.js","assets/interactive-BvK9MKgy.css","assets/md-n9dEvYLT.js","assets/md-DmIhJbjq.js","assets/md-DMeVCRE5.css","assets/md-ClhQEZCo.js","assets/md-CAs7vte4.css","assets/md-CSfW34LT.js","assets/md-BP2UdqZk.js","assets/md-DUx--DCW.js","assets/md-CwuBcLyR.css","assets/md-tewnPWLf.js","assets/md-4D29UAGC.js","assets/md-C8WrJmkC.js","assets/md-z49Gc1Nu2.js","assets/chunk-PTVI3W5X-DVfdoxm6.js","assets/chunk-FO5PYUIK-CPzj2963.js","assets/chunk-NEZ6ONQZ-CuHA0Ldj.js","assets/chunk-BPTLHSDI-QRS_xuYz.js","assets/chunk-PWCFYZI5-Dz1excih.js","assets/chunk-PLCLPJVV-BfMyJHbe.js","assets/chunk-XXV7AQMY-qeLKYxsH.js","assets/chunk-IPM4HZQ6-CQmHNgJe.js","assets/chunk-OX6ZKUVE-roiHi12N.js","assets/chunk-YV36FAQU-CkTVkoM6.js","assets/chunk-AQ2D6KKF-AxjphkEe.js","assets/chunk-2V3FENDJ-B1mkZICr.js","assets/chunk-DKH7L6O3-pKUB4f-O.js","assets/chunk-RTI7CJYH-CrTK6TD7.js","assets/chunk-MPM6TOF7-5cxd71sq.js","assets/chunk-STSWKLMO-1NGmNrHs.js","assets/md-De-g-ePC2.js","assets/md-BTbgIS6C.css","assets/md-Dduj8eLb2.js","assets/md-Bz-5PEV42.js","assets/md-Ba1Ho0R6.js","assets/md-wnEqLP9Q2.js","assets/md-DE2QGCpb.css"])))=>i.map(i=>d[i]); +import{B as e,Ct as t,P as n,R as r,T as i,Z as a,_ as o,at as s,b as c,dt as l,ft as u,g as d,ht as ee,k as f,lt as p,m as te,mt as m,vt as ne,w as h,y as re,yt as ie,z as ae}from"./modules/shiki-CJZsCeMT.js";import{t as g}from"./preload-helper-DpA04vUI.js";import{t as oe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{A as se,B as ce,E as le,I as ue,T as de,a as fe,c as pe,g as me,h as _,k as he,l as ge,m as _e,z as ve}from"./modules/vue-ClnAKIA7.js";import{l as ye,y as be}from"./slidev/context-C6dxaFaS.js";function xe(e,t,n){return Math.min(n,Math.max(t,e))}function Se(...e){return we(e).reduce((e,t)=>e+t,0)}function Ce(e){return e??=[],Array.isArray(e)?e:[e]}function we(e){return Ce(e).flat(1)}function Te(e){return Array.from(new Set(e))}function Ee(...e){let t,n,r;e.length===1?(t=0,r=1,[n]=e):[t,n,r=1]=e;let i=[],a=t;for(;at(e,n)).filter(De))}function ke(e){return Object.keys(e).forEach(t=>e[t]===void 0?delete e[t]:{}),e}function Ae(e){let t;function n(){return t||=e(),t}return n.reset=async()=>{let e=t;t=void 0,e&&await e},n}var v={theme:`dl2026`,title:`Introduction to Deep Learning`,titleTemplate:`%s - Slidev`,addons:[`dl2026`],remoteAssets:!1,monaco:!0,monacoTypesSource:`local`,monacoTypesAdditionalPackages:[],monacoTypesIgnorePackages:[],monacoRunAdditionalDeps:[],monacoRunUseStrict:!0,download:`./slides.pdf`,export:{},info:`

    PGR207 Deep Learning 2026 — Lecture 01

    +`,highlighter:`shiki`,twoslash:!0,lineNumbers:!1,colorSchema:`auto`,routerMode:`hash`,aspectRatio:1.7777777777777777,canvasWidth:980,exportFilename:``,selectable:!1,themeConfig:{courseCode:`PGR207`,lecture:`01`,lectureTitle:`Introduction to Deep Learning`},fonts:{sans:[`"Inter"`,`ui-sans-serif`,`system-ui`,`-apple-system`,`BlinkMacSystemFont`,`"Segoe UI"`,`Roboto`,`"Helvetica Neue"`,`Arial`,`"Noto Sans"`,`sans-serif`,`"Apple Color Emoji"`,`"Segoe UI Emoji"`,`"Segoe UI Symbol"`,`"Noto Color Emoji"`],serif:[`"Source Serif 4"`,`ui-serif`,`Georgia`,`Cambria`,`"Times New Roman"`,`Times`,`serif`],mono:[`"JetBrains Mono"`,`ui-monospace`,`SFMono-Regular`,`Menlo`,`Monaco`,`Consolas`,`"Liberation Mono"`,`"Courier New"`,`monospace`],webfonts:[`Inter`,`Source Serif 4`,`JetBrains Mono`],provider:`google`,local:[],italic:!1,weights:[`200`,`400`,`600`]},favicon:`https://cdn.jsdelivr.net/gh/slidevjs/slidev/assets/favicon.png`,drawings:{enabled:!0,persist:!1,presenterOnly:!1,syncAll:!0},plantUmlServer:`https://www.plantuml.com/plantuml`,codeCopy:!0,magicMoveCopy:!0,author:`Vajira Thambawita`,record:`dev`,css:`unocss`,presenter:!0,browserExporter:`dev`,htmlAttrs:{},transition:`slide-left`,editor:!0,mcp:!0,contextMenu:null,wakeLock:!0,pwa:!1,mdc:!0,comark:!1,seoMeta:{},notesAutoRuby:{},duration:`30min`,timer:`stopwatch`,magicMoveDuration:800,preloadImages:!0,clickAnimation:``,layout:`title`,courseCode:`PGR207`,lecture:`01`,email:`vajira@simula.no`,slidesTitle:`Introduction to Deep Learning - Slidev`},je=`build`,Me=d(()=>v.aspectRatio),Ne=d(()=>v.canvasWidth),Pe=d(()=>Math.ceil(Ne.value/Me.value)),Fe=d(()=>Oe(v.themeConfig||{},(e,t)=>[`--slidev-theme-${e}`,t])),Ie=v.slidesTitle,Le=`/lecture-01/#/`;function Re(e){if(e===!1||e===`false`)return null;if(e==null||e===!0||e===`true`)return`+1`;if(typeof e==`string`&&`+-`.includes(e[0]))return e;let t=+e;return Number.isNaN(t)?(console.error(`Invalid "at" prop value: ${e}`),null):t<=0?(console.warn(`[Slidev] "at" prop value must be greater than 0, but got ${e}, has been set to 1`),1):t}function ze(e){return Array.isArray(e)?[Re(e[0]),Re(e[1])]:null}function Be(e,t=0,n){let i=l(!1),a=new Map,o=new Map,c={get current(){return xe(+e.value,t,c.total)},set current(n){e.value=i.value?xe(n,t,c.total):n},clicksStart:t,get relativeSizeMap(){return a},get maxMap(){return o},get isMounted(){return i.value},setup(){r(()=>{i.value=!0,o=u(o),s(e)||(c.current=e.value)}),ae(()=>{i.value=!1,a=new Map,o=new Map})},calculateSince(e,t=1){let n=Re(e);if(n==null)return null;let r,i,a;if(typeof n==`string`){let e=c.currentOffset,o=+n;r=e+o,i=e+o+t-1,a=o+t-1}else r=n,i=n+t-1,a=0;return{start:r,end:1/0,max:i,delta:a,currentOffset:d(()=>c.current-r),isCurrent:d(()=>c.current===r),isActive:d(()=>c.current>=r)}},calculateRange(e){let t=ze(e);if(t==null)return null;let[n,r]=t,i,a,o;return typeof n==`string`?(i=c.currentOffset+ +n,o=+n):(i=n,o=0),typeof r==`string`?(a=i+ +r,o+=+r):a=r,{start:i,end:a,max:a,delta:o,currentOffset:d(()=>c.current-i),isCurrent:d(()=>c.current===i),isActive:d(()=>i<=c.current&&c.currentne(t),e=>{r.value=Math.max(e,n)}),Be(r,n,e?.meta?.clicks)}var He=/[a-z]/i;function Ue(e){if(typeof e==`number`)return{seconds:e,relative:!1};let t=e.startsWith(`+`);t&&(e=e.slice(1));let n=0;if(e.includes(`:`)){let t=e.split(`:`).map(Number),r=0,i=0,a=0;if(t.length===3)r=t[0],i=t[1],a=t[2];else if(t.length===2)i=t[0],a=t[1];else if(t.length===1)a=t[0];else throw TypeError(`Invalid timestamp format`);if(Number.isNaN(r)||Number.isNaN(i)||Number.isNaN(a))throw TypeError(`Invalid timestamp format`);n=(r||0)*3600+(i||0)*60+(a||0)}else if(!He.test(e))n=Number(e);else{let t={s:1,sec:1,secs:1,m:60,min:60,mins:60,h:3600,hr:3600,hrs:3600,hour:3600,hours:3600,day:86400,days:86400,week:604800,weeks:604800,month:2629746,months:2629746,year:31556952,years:31556952},r=/([\d.]+)([a-z]+)/gi,i=e.matchAll(r);if(i)for(let e of i){let r=Number(e[1]);if(Number.isNaN(r))throw TypeError(`Invalid timestamp value: ${e[1]}`);let i=e[2].toLowerCase();if(!(i in t))throw TypeError(`Invalid timestamp unit: ${i}`);n+=r*t[i]}let a=e.replace(r,``).trim();if(a)throw TypeError(`Unknown timestamp remaining: ${a}`)}return{seconds:n,relative:t}}function We(e,t){if(!t||t===`all`||t===`*`)return Ee(1,e+1);if(t===`none`)return[];let n=[];for(let r of t.split(/[,;]/g))if(!r.includes(`-`))n.push(+r);else{let[t,i]=r.split(`-`,2);n.push(...Ee(+t,i?+i+1:e+1))}return Te(n).filter(t=>t<=e).sort((e,t)=>e-t)}var Ge={},Ke={class:`px-4 py-10 text-center text-red-700 dark:text-red-500 font-bold font-mono`};function qe(n,r){return e(),c(`div`,Ke,t(`Failed to fetch this slide. Please check your network connection.`))}var y=oe(Ge,[[`render`,qe]]),Je={class:`h-full w-full flex items-center justify-center gap-2 slidev-slide-loading`},Ye=i({__name:`SlideLoading`,setup(t){let n=l(!1);return r(()=>{setTimeout(()=>{n.value=!0},200)}),(t,r)=>(e(),c(`div`,Je,[n.value?(e(),c(te,{key:0},[r[0]||=o(`div`,{class:`i-svg-spinners-90-ring-with-bg text-xl`},null,-1),r[1]||=o(`div`,null,`Loading slide...`,-1)],64)):re(`v-if`,!0)]))}}),b=p({theme:`dl2026`,addons:[`dl2026`],title:`Introduction to Deep Learning`,info:`PGR207 Deep Learning 2026 — Lecture 01`,author:`Vajira Thambawita`,routerMode:`hash`,transition:`slide-left`,mdc:!0,themeConfig:{courseCode:`PGR207`,lecture:`01`,lectureTitle:`Introduction to Deep Learning`},layout:`title`,courseCode:`PGR207`,lecture:`01`,email:`vajira@simula.no`}),Xe=u({get layout(){return b.layout},get transition(){return b.transition},get class(){return b.class},get clicks(){return b.clicks},get name(){return b.name},get preload(){return b.preload},slide:{content:``,revision:`p0yvez`,frontmatterRaw:`theme: dl2026 +addons: + - dl2026 +title: Introduction to Deep Learning +info: PGR207 Deep Learning 2026 — Lecture 01 +author: Vajira Thambawita +routerMode: hash +transition: slide-left +mdc: true +themeConfig: + courseCode: PGR207 + lecture: "01" + lectureTitle: Introduction to Deep Learning +layout: title +courseCode: PGR207 +lecture: "01" +email: vajira@simula.no +`,note:``,title:`Introduction to Deep Learning`,index:0,noteHTML:``,images:[],raw:``,frontmatter:b,filepath:``,start:0,sourceIndex:0,id:0,no:1},__clicksContext:null,__preloaded:!1}),x=p({layout:`section`,index:`01`}),Ze=u({get layout(){return x.layout},get transition(){return x.transition},get class(){return x.class},get clicks(){return x.clicks},get name(){return x.name},get preload(){return x.preload},slide:{content:``,revision:`9nb4ha`,frontmatterRaw:`layout: section +index: "01" +`,note:``,title:`Introduction to Deep Learning`,level:1,index:1,noteHTML:``,images:[],raw:``,frontmatter:x,filepath:``,start:30,sourceIndex:1,id:1,no:2},__clicksContext:null,__preloaded:!1}),S=p({layout:`default`,title:`Who am I?`}),Qe=u({get layout(){return S.layout},get transition(){return S.transition},get class(){return S.class},get clicks(){return S.clicks},get name(){return S.name},get preload(){return S.preload},slide:{content:``,revision:`vjtjk6`,frontmatterRaw:`layout: default +title: Who am I? +`,note:``,title:`Who am I?`,index:2,noteHTML:``,images:[`./figures/home-globe.jpeg`,`./figures/home-train.jpeg`,`./figures/simulamet.jpeg`,`./figures/gan-schematic.jpeg`,`./figures/research-polyps.jpeg`,`./figures/research-ecg.jpeg`],raw:``,frontmatter:S,filepath:``,start:37,sourceIndex:2,id:2,no:3},__clicksContext:null,__preloaded:!1}),C=p({}),$e=u({get layout(){return C.layout},get transition(){return C.transition},get class(){return C.class},get clicks(){return C.clicks},get name(){return C.name},get preload(){return C.preload},slide:{content:``,revision:`xfcqee`,note:``,index:3,noteHTML:``,images:[],raw:``,frontmatter:C,filepath:``,start:77,sourceIndex:3,id:3,no:4},__clicksContext:null,__preloaded:!1}),w=p({layout:`default`,title:`Class representatives`}),et=u({get layout(){return w.layout},get transition(){return w.transition},get class(){return w.class},get clicks(){return w.clicks},get name(){return w.name},get preload(){return w.preload},slide:{content:``,revision:`aqt78v`,frontmatterRaw:`layout: default +title: Class representatives +`,note:``,title:`Class representatives`,index:4,noteHTML:``,images:[],raw:``,frontmatter:w,filepath:``,start:93,sourceIndex:4,id:4,no:5},__clicksContext:null,__preloaded:!1}),T=p({layout:`default`,title:`Outline`}),tt=u({get layout(){return T.layout},get transition(){return T.transition},get class(){return T.class},get clicks(){return T.clicks},get name(){return T.name},get preload(){return T.preload},slide:{content:``,revision:`-k6nzqo`,frontmatterRaw:`layout: default +title: Outline +`,note:``,title:`Outline`,index:5,noteHTML:``,images:[],raw:``,frontmatter:T,filepath:``,start:114,sourceIndex:5,id:5,no:6},__clicksContext:null,__preloaded:!1}),E=p({layout:`section`,index:`02`}),nt=u({get layout(){return E.layout},get transition(){return E.transition},get class(){return E.class},get clicks(){return E.clicks},get name(){return E.name},get preload(){return E.preload},slide:{content:``,revision:`-4c9djd`,frontmatterRaw:`layout: section +index: "02" +`,note:``,title:`Introduction to course content`,level:1,index:6,noteHTML:``,images:[],raw:``,frontmatter:E,filepath:``,start:148,sourceIndex:6,id:6,no:7},__clicksContext:null,__preloaded:!1}),D=p({layout:`default`,title:`Workload`}),rt=u({get layout(){return D.layout},get transition(){return D.transition},get class(){return D.class},get clicks(){return D.clicks},get name(){return D.name},get preload(){return D.preload},slide:{content:``,revision:`jcdftc`,frontmatterRaw:`layout: default +title: Workload +`,note:``,title:`Workload`,index:7,noteHTML:``,images:[],raw:``,frontmatter:D,filepath:``,start:155,sourceIndex:7,id:7,no:8},__clicksContext:null,__preloaded:!1}),O=p({layout:`default`,title:`References`}),it=u({get layout(){return O.layout},get transition(){return O.transition},get class(){return O.class},get clicks(){return O.clicks},get name(){return O.name},get preload(){return O.preload},slide:{content:``,revision:`wo487e`,frontmatterRaw:`layout: default +title: References +`,note:``,title:`References`,index:8,noteHTML:``,images:[`./figures/book-raschka.jpeg`],raw:``,frontmatter:O,filepath:``,start:198,sourceIndex:8,id:8,no:9},__clicksContext:null,__preloaded:!1}),k=p({layout:`default`,title:`What we will learn`}),at=u({get layout(){return k.layout},get transition(){return k.transition},get class(){return k.class},get clicks(){return k.clicks},get name(){return k.name},get preload(){return k.preload},slide:{content:``,revision:`1ki2j9`,frontmatterRaw:`layout: default +title: What we will learn +`,note:``,title:`What we will learn`,index:9,noteHTML:``,images:[],raw:``,frontmatter:k,filepath:``,start:221,sourceIndex:9,id:9,no:10},__clicksContext:null,__preloaded:!1}),A=p({layout:`section`,index:`03`}),ot=u({get layout(){return A.layout},get transition(){return A.transition},get class(){return A.class},get clicks(){return A.clicks},get name(){return A.name},get preload(){return A.preload},slide:{content:``,revision:`eac2ju`,frontmatterRaw:`layout: section +index: "03" +`,note:``,title:`What is deep learning?`,level:1,index:10,noteHTML:``,images:[],raw:``,frontmatter:A,filepath:``,start:235,sourceIndex:10,id:10,no:11},__clicksContext:null,__preloaded:!1}),j=p({layout:`default`,title:`What do you think about these photos?`}),st=u({get layout(){return j.layout},get transition(){return j.transition},get class(){return j.class},get clicks(){return j.clicks},get name(){return j.name},get preload(){return j.preload},slide:{content:``,revision:`u9xqkn`,frontmatterRaw:`layout: default +title: What do you think about these photos? +`,note:``,title:`What do you think about these photos?`,index:11,noteHTML:``,images:[`./figures/generated-faces.jpeg`],raw:``,frontmatter:j,filepath:``,start:242,sourceIndex:11,id:11,no:12},__clicksContext:null,__preloaded:!1}),M=p({layout:`default`,title:`From a sentence to an image`}),ct=u({get layout(){return M.layout},get transition(){return M.transition},get class(){return M.class},get clicks(){return M.clicks},get name(){return M.name},get preload(){return M.preload},slide:{content:``,revision:`p7xrnu`,frontmatterRaw:`layout: default +title: From a sentence to an image +`,note:``,title:`From a sentence to an image`,index:12,noteHTML:``,images:[`./figures/dalle-brain-rocket.jpeg`,`./figures/dalle-dragonfruit.jpeg`],raw:``,frontmatter:M,filepath:``,start:264,sourceIndex:12,id:12,no:13},__clicksContext:null,__preloaded:!1}),N=p({layout:`figure`,title:`Large language models`}),lt=u({get layout(){return N.layout},get transition(){return N.transition},get class(){return N.class},get clicks(){return N.clicks},get name(){return N.name},get preload(){return N.preload},slide:{content:``,revision:`wtfzzh`,frontmatterRaw:`layout: figure +title: Large language models +`,note:``,title:`Large language models`,index:13,noteHTML:``,images:[`./figures/llm-evolutionary-tree.jpeg`],raw:``,frontmatter:N,filepath:``,start:291,sourceIndex:13,id:13,no:14},__clicksContext:null,__preloaded:!1}),P=p({layout:`interactive`,title:`Try them yourself`}),ut=u({get layout(){return P.layout},get transition(){return P.transition},get class(){return P.class},get clicks(){return P.clicks},get name(){return P.name},get preload(){return P.preload},slide:{content:``,revision:`m92p9n`,frontmatterRaw:`layout: interactive +title: Try them yourself +`,note:``,title:`Try them yourself`,index:14,noteHTML:``,images:[],raw:``,frontmatter:P,filepath:``,start:306,sourceIndex:14,id:14,no:15},__clicksContext:null,__preloaded:!1}),F=p({layout:`default`,title:`Can we use DL knowledge to earn money?`}),dt=u({get layout(){return F.layout},get transition(){return F.transition},get class(){return F.class},get clicks(){return F.clicks},get name(){return F.name},get preload(){return F.preload},slide:{content:``,revision:`-tlibeq`,frontmatterRaw:`layout: default +title: Can we use DL knowledge to earn money? +`,note:``,title:`Can we use DL knowledge to earn money?`,index:15,noteHTML:``,images:[],raw:``,frontmatter:F,filepath:``,start:321,sourceIndex:15,id:15,no:16},__clicksContext:null,__preloaded:!1}),I=p({layout:`interactive`,title:`Definition of deep learning`,"aside-width":`20rem`}),ft=u({get layout(){return I.layout},get transition(){return I.transition},get class(){return I.class},get clicks(){return I.clicks},get name(){return I.name},get preload(){return I.preload},slide:{content:``,revision:`-o7emvc`,frontmatterRaw:`layout: interactive +title: Definition of deep learning +aside-width: 20rem +`,note:``,title:`Definition of deep learning`,index:16,noteHTML:``,images:[],raw:``,frontmatter:I,filepath:``,start:342,sourceIndex:16,id:16,no:17},__clicksContext:null,__preloaded:!1}),L=p({layout:`interactive`,title:`Three different types of machine learning`,"aside-width":`15rem`}),pt=u({get layout(){return L.layout},get transition(){return L.transition},get class(){return L.class},get clicks(){return L.clicks},get name(){return L.name},get preload(){return L.preload},slide:{content:``,revision:`-mdotul`,frontmatterRaw:`layout: interactive +title: Three different types of machine learning +aside-width: 15rem +`,note:``,title:`Three different types of machine learning`,index:17,noteHTML:``,images:[],raw:``,frontmatter:L,filepath:``,start:359,sourceIndex:17,id:17,no:18},__clicksContext:null,__preloaded:!1}),R=p({layout:`section`,index:`04`}),mt=u({get layout(){return R.layout},get transition(){return R.transition},get class(){return R.class},get clicks(){return R.clicks},get name(){return R.name},get preload(){return R.preload},slide:{content:``,revision:`-h9qm5h`,frontmatterRaw:`layout: section +index: "04" +`,note:``,title:`Application of deep learning`,level:1,index:18,noteHTML:``,images:[],raw:``,frontmatter:R,filepath:``,start:374,sourceIndex:18,id:18,no:19},__clicksContext:null,__preloaded:!1}),z=p({layout:`default`,title:`Some applications of DL`}),ht=u({get layout(){return z.layout},get transition(){return z.transition},get class(){return z.class},get clicks(){return z.clicks},get name(){return z.name},get preload(){return z.preload},slide:{content:``,revision:`-niob8v`,frontmatterRaw:`layout: default +title: Some applications of DL +`,note:``,title:`Some applications of DL`,index:19,noteHTML:``,images:[`./figures/application-1.jpeg`,`./figures/application-2.jpeg`,`./figures/application-3.jpeg`,`./figures/application-4.jpeg`],raw:``,frontmatter:z,filepath:``,start:381,sourceIndex:19,id:19,no:20},__clicksContext:null,__preloaded:!1}),B=p({layout:`interactive`,title:`Computer vision categories`,"aside-width":`14rem`}),gt=u({get layout(){return B.layout},get transition(){return B.transition},get class(){return B.class},get clicks(){return B.clicks},get name(){return B.name},get preload(){return B.preload},slide:{content:``,revision:`-dt83s3`,frontmatterRaw:`layout: interactive +title: Computer vision categories +aside-width: 14rem +`,note:``,title:`Computer vision categories`,index:20,noteHTML:``,images:[`./figures/cv-task-categories.jpeg`],raw:``,frontmatter:B,filepath:``,start:414,sourceIndex:20,id:20,no:21},__clicksContext:null,__preloaded:!1}),V=p({layout:`section`,index:`05`}),_t=u({get layout(){return V.layout},get transition(){return V.transition},get class(){return V.class},get clicks(){return V.clicks},get name(){return V.name},get preload(){return V.preload},slide:{content:``,revision:`5cjtf3`,frontmatterRaw:`layout: section +index: "05" +`,note:``,title:`Our projects`,level:1,index:21,noteHTML:``,images:[],raw:``,frontmatter:V,filepath:``,start:438,sourceIndex:21,id:21,no:22},__clicksContext:null,__preloaded:!1}),H=p({layout:`figure`,title:`Synthetic polyp generation`}),vt=u({get layout(){return H.layout},get transition(){return H.transition},get class(){return H.class},get clicks(){return H.clicks},get name(){return H.name},get preload(){return H.preload},slide:{content:``,revision:`-zdve10`,frontmatterRaw:`layout: figure +title: Synthetic polyp generation +`,note:``,title:`Synthetic polyp generation`,index:22,noteHTML:``,images:[`./figures/synthetic-polyp.jpeg`],raw:``,frontmatter:H,filepath:``,start:445,sourceIndex:22,id:22,no:23},__clicksContext:null,__preloaded:!1}),U=p({layout:`figure`,title:`Synthetic ECG`}),yt=u({get layout(){return U.layout},get transition(){return U.transition},get class(){return U.class},get clicks(){return U.clicks},get name(){return U.name},get preload(){return U.preload},slide:{content:``,revision:`-uu4hhx`,frontmatterRaw:`layout: figure +title: Synthetic ECG +`,note:``,title:`Synthetic ECG`,index:23,noteHTML:``,images:[`./figures/synthetic-ecg.jpeg`],raw:``,frontmatter:U,filepath:``,start:456,sourceIndex:23,id:23,no:24},__clicksContext:null,__preloaded:!1}),W=p({layout:`default`,title:`The main pipeline`}),bt=u({get layout(){return W.layout},get transition(){return W.transition},get class(){return W.class},get clicks(){return W.clicks},get name(){return W.name},get preload(){return W.preload},slide:{content:``,revision:`-crcy9f`,frontmatterRaw:`layout: default +title: The main pipeline +`,note:``,title:`The main pipeline`,index:24,noteHTML:``,images:[],raw:``,frontmatter:W,filepath:``,start:467,sourceIndex:24,id:24,no:25},__clicksContext:null,__preloaded:!1}),G=p({layout:`interactive`,title:`Collecting data is its own pipeline`,"aside-width":`0rem`}),xt=u({get layout(){return G.layout},get transition(){return G.transition},get class(){return G.class},get clicks(){return G.clicks},get name(){return G.name},get preload(){return G.preload},slide:{content:``,revision:`nk7sfz`,frontmatterRaw:`layout: interactive +title: Collecting data is its own pipeline +aside-width: 0rem +`,note:``,title:`Collecting data is its own pipeline`,index:25,noteHTML:``,images:[],raw:``,frontmatter:G,filepath:``,start:487,sourceIndex:25,id:25,no:26},__clicksContext:null,__preloaded:!1}),K=p({layout:`section`,index:`06`}),St=u({get layout(){return K.layout},get transition(){return K.transition},get class(){return K.class},get clicks(){return K.clicks},get name(){return K.name},get preload(){return K.preload},slide:{content:``,revision:`hilc5f`,frontmatterRaw:`layout: section +index: "06" +`,note:``,title:`Deep learning frameworks`,level:1,index:26,noteHTML:``,images:[],raw:``,frontmatter:K,filepath:``,start:500,sourceIndex:26,id:26,no:27},__clicksContext:null,__preloaded:!1}),q=p({layout:`default`,title:`Frameworks`}),Ct=u({get layout(){return q.layout},get transition(){return q.transition},get class(){return q.class},get clicks(){return q.clicks},get name(){return q.name},get preload(){return q.preload},slide:{content:``,revision:`-q0lgzg`,frontmatterRaw:`layout: default +title: Frameworks +`,note:``,title:`Frameworks`,index:27,noteHTML:``,images:[],raw:``,frontmatter:q,filepath:``,start:507,sourceIndex:27,id:27,no:28},__clicksContext:null,__preloaded:!1}),J=p({layout:`default`,title:`Hardware`}),wt=u({get layout(){return J.layout},get transition(){return J.transition},get class(){return J.class},get clicks(){return J.clicks},get name(){return J.name},get preload(){return J.preload},slide:{content:``,revision:`mmdh03`,frontmatterRaw:`layout: default +title: Hardware +`,note:``,title:`Hardware`,index:28,noteHTML:``,images:[],raw:``,frontmatter:J,filepath:``,start:527,sourceIndex:28,id:28,no:29},__clicksContext:null,__preloaded:!1}),Y=p({layout:`end`,email:`vajira@simula.no`,next:`Basics of Neural Networks`}),Tt=u({get layout(){return Y.layout},get transition(){return Y.transition},get class(){return Y.class},get clicks(){return Y.clicks},get name(){return Y.name},get preload(){return Y.preload},slide:{content:``,revision:`-kpz6iy`,frontmatterRaw:`layout: end +email: vajira@simula.no +next: Basics of Neural Networks +`,note:``,title:`Practical session — Week 1`,level:1,index:29,noteHTML:``,images:[],raw:``,frontmatter:Y,filepath:``,start:557,sourceIndex:29,id:29,no:30},__clicksContext:null,__preloaded:!1}),X=Array(30),Z=(e,t)=>h({loader:t,delay:300,loadingComponent:Ye,errorComponent:y,onError:t=>console.error(`Failed to load slide `+(e+1),t)}),Et=async()=>{try{return X[0]??=await g(()=>import(`./md-bAEnFVLa.js`),__vite__mapDeps([0,1,2,3,4,5,6,7]))}catch(e){return console.error(`slide failed to load`,e),y}},Dt=async()=>{try{return X[1]??=await g(()=>import(`./md-DAoD5lJx.js`),__vite__mapDeps([8,1,2,3,5,6,9,4,10]))}catch(e){return console.error(`slide failed to load`,e),y}},Ot=async()=>{try{return X[2]??=await g(()=>import(`./md-G7taWeXP2.js`),__vite__mapDeps([11,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]))}catch(e){return console.error(`slide failed to load`,e),y}},kt=async()=>{try{return X[3]??=await g(()=>import(`./md-btiQZx8e2.js`),__vite__mapDeps([21,1,2,3,4,5,6,12,13,14,15,16,17,18,19,20,22,23]))}catch(e){return console.error(`slide failed to load`,e),y}},At=async()=>{try{return X[4]??=await g(()=>import(`./md-CHMR2MgZ2.js`),__vite__mapDeps([24,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,22]))}catch(e){return console.error(`slide failed to load`,e),y}},jt=async()=>{try{return X[5]??=await g(()=>import(`./md-Bvp7L6DM2.js`),__vite__mapDeps([25,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,22]))}catch(e){return console.error(`slide failed to load`,e),y}},Mt=async()=>{try{return X[6]??=await g(()=>import(`./md-DGLCzXy3.js`),__vite__mapDeps([26,1,2,3,5,6,9,4,10]))}catch(e){return console.error(`slide failed to load`,e),y}},Nt=async()=>{try{return X[7]??=await g(()=>import(`./md-9H7zUQWd.js`),__vite__mapDeps([27,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,22]))}catch(e){return console.error(`slide failed to load`,e),y}},Pt=async()=>{try{return X[8]??=await g(()=>import(`./md-BjXl9HiE.js`),__vite__mapDeps([28,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,22]))}catch(e){return console.error(`slide failed to load`,e),y}},Ft=async()=>{try{return X[9]??=await g(()=>import(`./md-DZVackxx.js`),__vite__mapDeps([29,1,2,3,4,5,6,12,13,14,15,16,17,18,19,20,30]))}catch(e){return console.error(`slide failed to load`,e),y}},It=async()=>{try{return X[10]??=await g(()=>import(`./md-qdiBjKc9.js`),__vite__mapDeps([31,1,2,3,5,6,9,4,10]))}catch(e){return console.error(`slide failed to load`,e),y}},Lt=async()=>{try{return X[11]??=await g(()=>import(`./md-DDa8FB96.js`),__vite__mapDeps([32,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]))}catch(e){return console.error(`slide failed to load`,e),y}},Rt=async()=>{try{return X[12]??=await g(()=>import(`./md-DMz-2E6M.js`),__vite__mapDeps([33,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,34,35]))}catch(e){return console.error(`slide failed to load`,e),y}},zt=async()=>{try{return X[13]??=await g(()=>import(`./md-Nkx2rUY6.js`),__vite__mapDeps([36,1,2,3,5,6,34,4,35,37,13,14,15,16,17,18,19,38]))}catch(e){return console.error(`slide failed to load`,e),y}},Bt=async()=>{try{return X[14]??=await g(()=>import(`./md-FdUKh9Do.js`),__vite__mapDeps([39,1,2,3,5,6,40,4,41,42,13,14,15,16,17,18,19,43]))}catch(e){return console.error(`slide failed to load`,e),y}},Vt=async()=>{try{return X[15]??=await g(()=>import(`./md-n9dEvYLT.js`),__vite__mapDeps([44,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,40,41]))}catch(e){return console.error(`slide failed to load`,e),y}},Ht=async()=>{try{return X[16]??=await g(()=>import(`./md-DmIhJbjq.js`),__vite__mapDeps([45,1,2,3,4,5,6,34,35,42,13,14,15,16,17,18,19,43,46]))}catch(e){return console.error(`slide failed to load`,e),y}},Ut=async()=>{try{return X[17]??=await g(()=>import(`./md-ClhQEZCo.js`),__vite__mapDeps([47,1,2,3,4,5,6,34,35,42,13,14,15,16,17,18,19,43,48]))}catch(e){return console.error(`slide failed to load`,e),y}},Wt=async()=>{try{return X[18]??=await g(()=>import(`./md-CSfW34LT.js`),__vite__mapDeps([49,1,2,3,5,6,9,4,10]))}catch(e){return console.error(`slide failed to load`,e),y}},Gt=async()=>{try{return X[19]??=await g(()=>import(`./md-BP2UdqZk.js`),__vite__mapDeps([50,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,22]))}catch(e){return console.error(`slide failed to load`,e),y}},Kt=async()=>{try{return X[20]??=await g(()=>import(`./md-DUx--DCW.js`),__vite__mapDeps([51,1,2,3,4,5,6,34,35,42,13,14,15,16,17,18,19,43,52]))}catch(e){return console.error(`slide failed to load`,e),y}},qt=async()=>{try{return X[21]??=await g(()=>import(`./md-tewnPWLf.js`),__vite__mapDeps([53,1,2,3,5,6,9,4,10]))}catch(e){return console.error(`slide failed to load`,e),y}},Jt=async()=>{try{return X[22]??=await g(()=>import(`./md-4D29UAGC.js`),__vite__mapDeps([54,1,2,3,5,6,37,4,13,14,15,16,17,18,19,38]))}catch(e){return console.error(`slide failed to load`,e),y}},Yt=async()=>{try{return X[23]??=await g(()=>import(`./md-C8WrJmkC.js`),__vite__mapDeps([55,1,2,3,5,6,37,4,13,14,15,16,17,18,19,38]))}catch(e){return console.error(`slide failed to load`,e),y}},Xt=async()=>{try{return X[24]??=await g(()=>import(`./md-z49Gc1Nu2.js`),__vite__mapDeps([56,2,1,3,16,5,6,15,14,17,12,4,13,18,19,20,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72]))}catch(e){return console.error(`slide failed to load`,e),y}},Zt=async()=>{try{return X[25]??=await g(()=>import(`./md-De-g-ePC2.js`),__vite__mapDeps([73,1,2,3,4,5,6,42,13,14,15,16,17,18,19,43,74]))}catch(e){return console.error(`slide failed to load`,e),y}},Qt=async()=>{try{return X[26]??=await g(()=>import(`./md-Dduj8eLb2.js`),__vite__mapDeps([75,1,2,3,5,6,9,4,10]))}catch(e){return console.error(`slide failed to load`,e),y}},$t=async()=>{try{return X[27]??=await g(()=>import(`./md-Bz-5PEV42.js`),__vite__mapDeps([76,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,40,41]))}catch(e){return console.error(`slide failed to load`,e),y}},en=async()=>{try{return X[28]??=await g(()=>import(`./md-Ba1Ho0R6.js`),__vite__mapDeps([77,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]))}catch(e){return console.error(`slide failed to load`,e),y}},tn=async()=>{try{return X[29]??=await g(()=>import(`./md-wnEqLP9Q2.js`),__vite__mapDeps([78,1,2,3,4,5,6,79]))}catch(e){return console.error(`slide failed to load`,e),y}},nn=[{no:1,meta:Xe,load:Et,component:Z(0,Et)},{no:2,meta:Ze,load:Dt,component:Z(1,Dt)},{no:3,meta:Qe,load:Ot,component:Z(2,Ot)},{no:4,meta:$e,load:kt,component:Z(3,kt)},{no:5,meta:et,load:At,component:Z(4,At)},{no:6,meta:tt,load:jt,component:Z(5,jt)},{no:7,meta:nt,load:Mt,component:Z(6,Mt)},{no:8,meta:rt,load:Nt,component:Z(7,Nt)},{no:9,meta:it,load:Pt,component:Z(8,Pt)},{no:10,meta:at,load:Ft,component:Z(9,Ft)},{no:11,meta:ot,load:It,component:Z(10,It)},{no:12,meta:st,load:Lt,component:Z(11,Lt)},{no:13,meta:ct,load:Rt,component:Z(12,Rt)},{no:14,meta:lt,load:zt,component:Z(13,zt)},{no:15,meta:ut,load:Bt,component:Z(14,Bt)},{no:16,meta:dt,load:Vt,component:Z(15,Vt)},{no:17,meta:ft,load:Ht,component:Z(16,Ht)},{no:18,meta:pt,load:Ut,component:Z(17,Ut)},{no:19,meta:mt,load:Wt,component:Z(18,Wt)},{no:20,meta:ht,load:Gt,component:Z(19,Gt)},{no:21,meta:gt,load:Kt,component:Z(20,Kt)},{no:22,meta:_t,load:qt,component:Z(21,qt)},{no:23,meta:vt,load:Jt,component:Z(22,Jt)},{no:24,meta:yt,load:Yt,component:Z(23,Yt)},{no:25,meta:bt,load:Xt,component:Z(24,Xt)},{no:26,meta:xt,load:Zt,component:Z(25,Zt)},{no:27,meta:St,load:Qt,component:Z(26,Qt)},{no:28,meta:Ct,load:$t,component:Z(27,$t)},{no:29,meta:wt,load:en,component:Z(28,en)},{no:30,meta:Tt,load:tn,component:Z(29,tn)}],Q=m(nn);function rn(e,t,{mode:r=`replace`}={}){let i=ce();return d({get(){let n=i.currentRoute.value.query[e];return n==null?t??null:Array.isArray(n)?n.filter(Boolean):n},set(a){n(()=>{(i.currentRoute.value.query[e]??t?.toString())!==a.toString()&&i[ie(r)]({query:{...i.currentRoute.value.query,[e]:`${a}`===t?void 0:a}})})}})}function an(e,t,n=!1){let r=e.meta.slide?.frontmatter.routeAlias??e.no;return n?`/export/${r}`:t?`/presenter/${r}`:`/${r}`}function on(e){return Q.value.find(t=>t.no===+e||t.meta.slide?.frontmatter.routeAlias===e)}function $(e,t,n=!1){return(typeof e==`number`||typeof e==`string`)&&(e=on(e)),an(e,t,n)}var sn={"slide-left":`slide-left | slide-right`,"slide-right":`slide-right | slide-left`,"slide-up":`slide-up | slide-down`,"slide-down":`slide-down | slide-up`};function cn(e,t=!1){if(!e||(typeof e==`string`&&(e={name:e}),!e.name))return;let n=e.name.includes(`|`)?e.name:sn[e.name]||e.name;if(n.includes(`|`)){let[e,r]=n.split(`|`).map(e=>e.trim());n=t?r:e}if(n)return{...e,name:n}}function ln(e,t,n){let r=e>0?n?.meta?.transition:t?.meta?.transition;return r||=v.transition||void 0,cn(r,e<0)}var un=l(!1),dn=l(!1),fn=l(!1),pn=l(!1),mn=l(!1),hn=l(!1),gn=l(!0),_n=p(new Set),vn=d(()=>_n.size>0),yn=ge({xs:460,...fe}),bn=de(),xn=me(),Sn=d(()=>bn.height.value-bn.width.value/Me.value>120),Cn=_e(se?document.body:null),wn=pe(),Tn=d(()=>[`INPUT`,`TEXTAREA`].includes(wn.value?.tagName||``)),En=d(()=>[`BUTTON`,`A`].includes(wn.value?.tagName||``));_(`slidev-camera`,`default`,{listenToStorageChanges:!1}),_(`slidev-mic`,`default`,{listenToStorageChanges:!1});var Dn=_(`slidev-scale`,0),On=_(`slidev-wake-lock`,!0),kn=_(`slidev-hide-cursor-idle`,!0);_(`slidev-skip-export-pdf-tip`,!1),_(`slidev-export-capture-delay`,400,{listenToStorageChanges:!1});var An=_(`slidev-presenter-cursor`,!0,{listenToStorageChanges:!1}),jn=_(`slidev-cursor-style`,`cursor`,{listenToStorageChanges:!1});function Mn(){An.value=!An.value}var Nn=_(`slidev-show-editor`,!1,{listenToStorageChanges:!1}),Pn=_(`slidev-editor-vertical`,!1,{listenToStorageChanges:!1}),Fn=_(`slidev-editor-width`,se?window.innerWidth*.4:318,{listenToStorageChanges:!1}),In=_(`slidev-editor-height`,se?window.innerHeight*.4:300,{listenToStorageChanges:!1}),Ln=m(null),Rn=_(`slidev-presenter-font-size`,1,{listenToStorageChanges:!1}),zn=_(`slidev-presenter-layout`,1,{listenToStorageChanges:!1}),Bn={invert:!1,contrast:1,brightness:1,hueRotate:0,saturate:1,sepia:0},Vn=_(`slidev-viewer-css-filter`,Bn,{listenToStorageChanges:!1,mergeDefaults:!0,deep:!0}),Hn=d(()=>Object.keys(Bn).some(e=>Vn.value[e]!==Bn[e]));function Un(){zn.value+=1,zn.value>3&&(zn.value=1)}function Wn(){Rn.value=Math.min(2,Rn.value+.1)}function Gn(){Rn.value=Math.max(.5,Rn.value-.1)}var Kn=ue(pn),qn=_(`slidev-sync-directions`,{viewerSend:!0,viewerReceive:!0,presenterSend:!0,presenterReceive:!0},{listenToStorageChanges:!1,mergeDefaults:!0});function Jn(e,t,n=1){let r=t.meta.slide.level??n;r&&r>n&&e.length>0?Jn(e[e.length-1].children,t,n+1):e.push({no:t.no,children:[],level:n,titleLevel:r,path:$(t.meta.slide?.frontmatter?.routeAlias??t.no,!1),hideInToc:!!t.meta?.slide?.frontmatter?.hideInToc,title:t.meta?.slide?.title})}function Yn(e,t,n=!1,r,i){return e.map(e=>{let a={...e,active:e.no===i?.value,hasActiveParent:n};return a.children.length>0&&(a.children=Yn(a.children,t,a.active||a.hasActiveParent,a,i)),r&&(a.active||a.activeParent)&&(r.activeParent=!0),a})}function Xn(e,t=1){return e.filter(e=>!e.hideInToc).map(e=>({...e,children:Xn(e.children,t+1)}))}function Zn(e,t,n){let r=d(()=>e.value.filter(e=>e.meta?.slide?.title).reduce((e,t)=>(Jn(e,t),e),[])),i=d(()=>Yn(r.value,n.value,void 0,void 0,t));return d(()=>Xn(i.value))}function Qn(e,t,n=l(0),r,i,o){let s=d(()=>Q.value.length),c=l(0),u=l(0),ee=d(()=>$(e.value,r.value)),f=d(()=>e.value.no),p=d(()=>e.value.meta?.layout||(f.value===1?`cover`:`default`)),te=d(()=>e.value.meta.slide.frontmatter),m=d(()=>t.value.current),ne=d(()=>t.value.clicksStart),h=d(()=>t.value.total),re=d(()=>Q.value[Math.min(Q.value.length,f.value+1)-1]),ie=d(()=>Q.value[Math.max(1,f.value-1)-1]),ae=d(()=>f.valuef.value>1||m.value>0),oe=d(()=>i.value?void 0:ln(c.value,e.value,ie.value));a(e,(e,t)=>{c.value=e.no-t.no});async function se(e){return!1}let ce=Zn(Q,f,e);async function le(){u.value=1,h.value<=n.value?await de():n.value+=1}async function ue(){u.value=-1,n.value<=ne.value?await fe(!0):--n.value}async function de(e=!1){u.value=1,f.value1&&await _(f.value-1,e&&!i.value?ye:void 0)}function pe(){return _(1)}function me(){return _(s.value)}async function _(e,t=0,i=!1){mn.value=!1;let a=f.value!==e,s=t!==n.value,c=on(e)?.meta,l=c?.slide?.frontmatter.clicksStart??0;t=xe(t,l,c?.__clicksContext?.total??999999),(i||a||s)&&await o?.push({path:$(e,r.value,o.currentRoute.value.name===`export`),query:{...o.currentRoute.value.query,clicks:t===0?void 0:t.toString(),embedded:location.search.includes(`embedded`)?`true`:void 0}})}function he(){o?.push({path:$(f.value,!0),query:{...o.currentRoute.value.query}})}function ge(){o?.push({path:$(f.value,!1),query:{...o.currentRoute.value.query}})}return{slides:Q,total:s,currentPath:ee,currentSlideNo:f,currentPage:f,currentSlideRoute:e,currentLayout:p,currentFrontmatter:te,currentTransition:oe,clicksDirection:u,nextRoute:re,prevRoute:ie,clicksContext:t,clicks:m,clicksStart:ne,clicksTotal:h,hasNext:ae,hasPrev:g,tocTree:ce,navDirection:c,openInEditor:se,next:le,prev:ue,go:_,goLast:me,goFirst:pe,nextSlide:de,prevSlide:fe,enterPresenter:he,exitPresenter:ge}}var $n=le(()=>{let e=ce(),t=ve(),n=d(()=>(e?.currentRoute?.value?.query,new URLSearchParams(location.search))),r=d(()=>n.value.has(`print`)||t.name===`export`),i=l(n.value.get(`print`)===`clicks`),a=d(()=>n.value.has(`embedded`)),o=d(()=>t.name===`play`),s=d(()=>t.name===`presenter`),c=d(()=>t.name===`notes`),u=d(()=>!s.value&&(!v.remote||n.value.get(`password`)===v.remote)),ee=d(()=>!!t.params.no),f=d(()=>ee.value?on(t.params.no)?.no??1:1),p=d(()=>Q.value[f.value-1]),te=l(We(Q.value.length,t?.query?.range)),m=rn(`clicks`,`0`),ne=d(()=>re(p.value)),h=d({get(){let e=+(m.value||0);return Number.isNaN(e)&&(e=0),e},set(e){mn.value=!1,m.value=e.toString()}});function re(e){if(e?.meta?.__clicksContext)return e.meta.__clicksContext;let t=e.no,n=Be(d({get(){return f.value===t?Math.max(+(m.value??0),n.clicksStart):f.value>t?ye:n.clicksStart},set(e){f.value===t&&(m.value=e.toString())}}),e?.meta.slide?.frontmatter.clicksStart??0,e?.meta.clicks);return e?.meta&&(e.meta.__clicksContext=n),n}return{router:e,currentRoute:d(()=>t),isPrintMode:r,isPrintWithClicks:i,isEmbedded:a,isPlaying:o,isPresenter:s,isNotesViewer:c,isPresenterAvailable:u,hasPrimarySlide:ee,currentSlideNo:f,currentSlideRoute:p,clicksContext:ne,queryClicksRaw:m,queryClicks:h,printRange:te,getPrimaryClicks:re}}),er=le(()=>{let e=$n(),t=ce(),n=Qn(e.currentSlideRoute,e.clicksContext,e.queryClicks,e.isPresenter,e.isPrintMode,t);return a([n.total,e.currentRoute],async()=>{let t=e.currentRoute.value.params.no;e.hasPrimarySlide.value&&!on(t)&&(t&&t!==`index.html`?await n.go(n.total.value,0,!0):await n.go(1,0,!0))},{flush:`pre`,immediate:!0}),{...n,...e}});function tr(){let e=er(),t=f()?he(be,void 0):void 0;if(!t)return e;let n=ee(t).nav;return{...e,...n}}export{v as $,Dn as A,$ as B,vn as C,pn as D,dn as E,Vn as F,Re as G,Ue as H,Bn as I,Me as J,je as K,On as L,Kn as M,Mn as N,An as O,Un as P,Fe as Q,bn as R,gn as S,fn as T,Be as U,Q as V,Ve as W,Ne as X,Pe as Y,Ie as Z,En as _,jn as a,zn as b,In as c,Hn as d,xe as et,kn as f,Tn as g,Pn as h,yn as i,Ce as it,qn as j,un as k,Fn as l,Wn as m,Ln as n,Ae as nt,Gn as o,mn as p,Le as q,wn as r,Ee as rt,hn as s,tr as t,ke as tt,Cn as u,Sn as v,Nn as w,Rn as x,xn as y,on as z}; \ No newline at end of file diff --git a/lecture-01/assets/vennDiagram-GBZDLF5N-B1SVEUjn.js b/lecture-01/assets/vennDiagram-GBZDLF5N-B1SVEUjn.js new file mode 100644 index 0000000000000000000000000000000000000000..096a9d5a4da2fef28ed12d47a3072b677ef523b9 --- /dev/null +++ b/lecture-01/assets/vennDiagram-GBZDLF5N-B1SVEUjn.js @@ -0,0 +1,34 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{I as t}from"./chunk-FO5PYUIK-CPzj2963.js";import{E as n,J as r,N as i,P as a,Q as o,S as s,Y as c,b as l,d as u,it as d,l as f,m as p,o as m,x as h}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as g}from"./chunk-BPTLHSDI-QRS_xuYz.js";import{t as _}from"./chunk-PLCLPJVV-BfMyJHbe.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{i as v}from"./chunk-OX6ZKUVE-roiHi12N.js";var y=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[5,8],r=[7,8,11,12,17,19,22,24],i=[1,17],a=[1,18],o=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],s=[1,31],c=[1,39],l=[7,8,11,12,17,19,22,24,27],u=[1,57],d=[1,56],f=[1,58],p=[1,59],m=[1,60],h=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],g={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:`error`,5:`VENN`,7:`EOF`,8:`NEWLINE`,11:`TITLE`,12:`SET`,14:`BRACKET_LABEL`,15:`COLON`,16:`NUMERIC`,17:`UNION`,19:`TEXT`,20:`IDENTIFIER`,21:`STRING`,22:`INDENT_TEXT`,24:`STYLE`,27:`COMMA`,31:`HEXCOLOR`,32:`RGBCOLOR`,33:`RGBACOLOR`},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:case 3:case 4:this.$=[];break;case 5:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=a[s];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:r.addSubsetData([a[s]],void 0,void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 10:r.addSubsetData([a[s-1]],a[s],void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 11:r.addSubsetData([a[s-2]],void 0,parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 12:r.addSubsetData([a[s-3]],a[s-2],parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 13:if(a[s].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s]),r.addSubsetData(a[s],void 0,void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 14:if(a[s-1].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-1]),r.addSubsetData(a[s-1],a[s],void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 15:if(a[s-2].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-2]),r.addSubsetData(a[s-2],void 0,parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 16:if(a[s-3].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-3]),r.addSubsetData(a[s-3],a[s-2],parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 17:case 18:case 19:r.addTextData(a[s-1],a[s],void 0);break;case 20:case 21:r.addTextData(a[s-2],a[s-1],a[s]);break;case 23:r.addStyleData(a[s-1],a[s]);break;case 24:case 25:case 26:var c=r.getCurrentSets();if(!c)throw Error(`text requires set`);r.addTextData(c,a[s],void 0);break;case 27:case 28:var c=r.getCurrentSets();if(!c)throw Error(`text requires set`);r.addTextData(c,a[s-1],a[s]);break;case 29:case 41:this.$=[a[s]];break;case 30:case 42:this.$=[...a[s-2],a[s]];break;case 31:this.$=[a[s-2],a[s]];break;case 33:this.$=a[s].join(` `);break;case 34:this.$=[a[s]];break;case 35:a[s-1].push(a[s]),this.$=a[s-1];break;case 43:case 44:this.$=a[s]}},`anonymous`),table:[t(n,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(r,[2,4],{6:5}),t(n,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(r,[2,5]),t(r,[2,6]),t(r,[2,7]),t(r,[2,8]),{13:16,20:i,21:a},{13:20,18:19,20:i,21:a},{13:20,18:21,20:i,21:a},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:i,21:a},t(r,[2,9],{14:[1,27],15:[1,28]}),t(o,[2,43]),t(o,[2,44]),t(r,[2,13],{14:[1,29],15:[1,30],27:s}),t(o,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:s},t(r,[2,22]),t(r,[2,24],{14:[1,35]}),t(r,[2,25],{14:[1,36]}),t(r,[2,26]),{20:c,25:37,26:38,27:s},t(r,[2,10],{15:[1,40]}),{16:[1,41]},t(r,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:i,21:a},t(r,[2,17],{14:[1,45]}),t(r,[2,18],{14:[1,46]}),t(r,[2,19]),t(r,[2,27]),t(r,[2,28]),t(r,[2,23],{27:[1,47]}),t(l,[2,29]),{15:[1,48]},{16:[1,49]},t(r,[2,11]),{16:[1,50]},t(r,[2,15]),t(o,[2,42]),t(r,[2,20]),t(r,[2,21]),{20:c,26:51},{16:u,20:d,21:[1,53],28:52,29:54,30:55,31:f,32:p,33:m},t(r,[2,12]),t(r,[2,16]),t(l,[2,30]),t(l,[2,31]),t(l,[2,32]),t(l,[2,33],{30:61,16:u,20:d,31:f,32:p,33:m}),t(h,[2,34]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),t(h,[2,39]),t(h,[2,40]),t(h,[2,35])],defaultActions:{6:[2,1]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};g.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:break;case 3:if(e.getIndentMode&&e.getIndentMode())return e.consumeIndentText=!0,this.begin(`INITIAL`),22;break;case 4:break;case 5:e.setIndentMode&&e.setIndentMode(!1),this.begin(`INITIAL`),this.unput(t.yytext);break;case 6:return this.begin(`bol`),8;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(e.consumeIndentText)e.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return t.yytext=t.yytext.slice(2,-2),14;case 17:return t.yytext=t.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}}})();function _(){this.yy={}}return e(_,`Parser`),_.prototype=g,g.Parser=_,new _})();y.parser=y;var b=y,x=[],S=[],C=[],w=new Set,T,E=!1,D=e((e,t,n)=>{let r=P(e).sort(),i=n??10/e.length**2;T=r,r.length===1&&w.add(r[0]),x.push({sets:r,size:i,label:t?k(t):void 0})},`addSubsetData`),O=e(()=>x,`getSubsetData`),k=e(e=>{let t=e.trim();return t.length>=2&&t.startsWith(`"`)&&t.endsWith(`"`)?t.slice(1,-1):t},`normalizeText`),A=e(e=>e&&k(e),`normalizeStyleValue`),j=e((e,t,n)=>{let r=k(t);S.push({sets:P(e).sort(),id:r,label:n?k(n):void 0})},`addTextData`),M=e((e,t)=>{let n=P(e).sort(),r={};for(let[e,n]of t)r[e]=A(n)??n;C.push({targets:n,styles:r})},`addStyleData`),N=e(()=>C,`getStyleData`),P=e(e=>e.map(e=>k(e)),`normalizeIdentifierList`),F=e(e=>{let t=P(e).filter(e=>!w.has(e));if(t.length>0)throw Error(`unknown set identifier: ${t.join(`, `)}`)},`validateUnionIdentifiers`),I=e(()=>S,`getTextData`),L=e(()=>T,`getCurrentSets`),R=e(()=>E,`getIndentMode`),ee=e(e=>{E=e},`setIndentMode`),te=p.venn;function ne(){return v(te,s().venn)}e(ne,`getConfig`);var re={getConfig:ne,clear:e(()=>{m(),x.length=0,S.length=0,C.length=0,w.clear(),T=void 0,E=!1},`customClear`),setAccTitle:c,getAccTitle:h,setDiagramTitle:o,getDiagramTitle:n,getAccDescription:l,setAccDescription:r,addSubsetData:D,getSubsetData:O,addTextData:j,addStyleData:M,validateUnionIdentifiers:F,getTextData:I,getStyleData:N,getCurrentSets:L,getIndentMode:R,setIndentMode:ee},ie=e(e=>` + .venn-title { + font-size: 32px; + fill: ${e.vennTitleTextColor}; + font-family: ${e.fontFamily}; + } + + .venn-circle text { + font-size: 48px; + font-family: ${e.fontFamily}; + } + + .venn-intersection text { + font-size: 48px; + fill: ${e.vennSetTextColor}; + font-family: ${e.fontFamily}; + } + + .venn-text-node { + font-family: ${e.fontFamily}; + color: ${e.vennSetTextColor}; + } +`,`getStyles`),ae=1e-10;function z(e,t){let n=se(e),r=n.filter(t=>oe(t,e)),i=0,a=0,o=[];if(r.length>1){let t=le(r);for(let e=0;et.angle-e.angle);let n=r[r.length-1];for(let t=0;tr.radius*2&&(d=r.radius*2),(l==null||l.width>d)&&(l={circle:r,width:d,p1:s,p2:n,large:d>r.radius,sweep:!0})}l!=null&&(o.push(l),i+=B(l.circle.radius,l.width),n=s)}}else{let t=e[0];for(let n=1;nMath.abs(t.radius-e[r].radius)){n=!0;break}n?i=a=0:(i=t.radius*t.radius*Math.PI,o.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-ae,y:t.y+t.radius},width:t.radius*2,large:!0,sweep:!0}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=o,t.innerPoints=r,t.intersectionPoints=n),i+a}e(z,`intersectionArea`);function oe(e,t){return t.every(t=>V(e,t)=e+t)return 0;if(n<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let r=e-(n*n-t*t+e*e)/(2*n),i=t-(n*n-e*e+t*t)/(2*n);return B(e,r)+B(t,i)}e(H,`circleOverlap`);function ce(e,t){let n=V(e,t),r=e.radius,i=t.radius;if(n>=r+i||n<=Math.abs(r-i))return[];let a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),s=e.x+a*(t.x-e.x)/n,c=e.y+a*(t.y-e.y)/n,l=-(t.y-e.y)*(o/n),u=-(t.x-e.x)*(o/n);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}e(ce,`circleCircleIntersection`);function le(e){let t={x:0,y:0};for(let n of e)t.x+=n.x,t.y+=n.y;return t.x/=e.length,t.y/=e.length,t}e(le,`getCenter`);function ue(e,t,n,r){r||={};let i=r.maxIterations||100,a=r.tolerance||1e-10,o=e(t),s=e(n),c=n-t;if(o*s>0)throw`Initial bisect points must have opposite signs`;if(o===0)return t;if(s===0)return n;for(let n=0;n=0&&(t=n),Math.abs(c)U(t))}e(de,`zerosM`);function W(e,t){let n=0;for(let r=0;re.fx-t.fx,`sortOrder`),v=n.slice(),y=n.slice(),b=n.slice(),x=n.slice();for(let e=0;e{let t=e.slice();return t.fx=e.fx,t.id=e.id,t});e.sort((e,t)=>e.id-t.id),r.history.push({x:h[0].slice(),fx:h[0].fx,simplex:e})}p=0;for(let e=0;e=h[m-1].fx){let n=!1;if(y.fx>e.fx?(q(b,1+d,v,-d,e),b.fx=t(b),b.fx=1)break;for(let e=1;ec+o*a*l||u>=p)d=a;else{if(Math.abs(f)<=-s*l)return a;f*(d-e)>=0&&(d=e),e=a,p=u}return 0}e(m,`zoom`);for(let e=0;e<10;++e){if(q(i.x,1,r.x,a,n),u=i.fx=t(i.x,i.fxprime),f=W(i.fxprime,n),u>c+o*a*l||e&&u>=d)return m(p,a,d);if(Math.abs(f)<=-s*l)return a;if(f>=0)return m(a,p,u);d=u,p=a,a*=2}return a}e(pe,`wolfeLineSearch`);function me(e,t,n){let r={x:t.slice(),fx:0,fxprime:t.slice()},i={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),o,s,c=1,l;n||={},l=n.maxIterations||t.length*20,r.fx=e(r.x,r.fxprime),o=r.fxprime.slice(),K(o,r.fxprime,-1);for(let t=0;t{let t={};for(let n=0;nH(e,t,r)-n,0,e+t)}e(J,`distanceFromIntersectArea`);function _e(t,n={}){let r=n.distinct,i=t.map(e=>Object.assign({},e));function a(e){return e.join(`;`)}if(e(a,`toKey`),r){let e=new Map;for(let t of i)for(let n=0;ne===t?0:ee.sets.length===2).forEach(e=>{let a=n[e.sets[0]],o=n[e.sets[1]],s=J(Math.sqrt(t[a].size/Math.PI),Math.sqrt(t[o].size/Math.PI),e.size);r[a][o]=r[o][a]=s;let c=0;e.size+1e-10>=Math.min(t[a].size,t[o].size)?c=1:e.size<=1e-10&&(c=-1),i[a][o]=i[o][a]=c}),{distances:r,constraints:i}}e(ve,`getDistanceMatrices`);function ye(e,t,n,r){for(let e=0;e0&&m<=d||f<0&&m>=d||(i+=2*h*h,t[2*a]+=4*h*(o-l),t[2*a+1]+=4*h*(s-u),t[2*c]+=4*h*(l-o),t[2*c+1]+=4*h*(u-s))}}return i}e(ye,`constrainedMDSGradient`);function be(e,t={}){let n=Se(e,t),r=t.lossFunction||Y;if(e.length>=8){let i=xe(e,t),a=r(i,e),o=r(n,e);a+1e-8e.map(e=>e/c));let l=e((e,t)=>ye(e,t,o,s),`obj`),u=null;for(let e=0;ee.sets.length===2);for(let e of t){let t=e.weight==null?1:e.weight,n=e.sets[0],r=e.sets[1];e.size+ge>=Math.min(i[n].size,i[r].size)&&(t=0),a[n].push({set:r,size:e.size,weight:t}),a[r].push({set:n,size:e.size,weight:t})}let o=[];Object.keys(a).forEach(e=>{let t=0;for(let n=0;ne[t]));let i=r.weight==null?1:r.weight;n+=i*(t-r.size)*(t-r.size)}return n}e(Y,`lossFunction`);function Ce(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=H(n.radius,i.radius,V(n,i))}else t=z(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight,a=Math.log((t+1)/(r.size+1));n+=i*a*a}return n}e(Ce,`logRatioLossFunction`);function we(e,t,n){if(n==null?e.sort((e,t)=>t.radius-e.radius):e.sort(n),e.length>0){let t=e[0].x,n=e[0].y;for(let r of e)r.x-=t,r.y-=n}if(e.length===2&&V(e[0],e[1])1){let n=Math.atan2(e[1].x,e[1].y)-t,r=Math.cos(n),i=Math.sin(n);for(let t of e){let e=t.x,n=t.y;t.x=r*e-i*n,t.y=i*e+r*n}}if(e.length>2){let n=Math.atan2(e[2].x,e[2].y)-t;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){let t=e[1].y/(1e-10+e[1].x);for(let n of e){var r=(n.x+t*n.y)/(1+t*t);n.x=2*r-n.x,n.y=2*r*t-n.y}}}}e(we,`orientateCircles`);function Te(t){t.forEach(e=>{e.parent=e});function n(e){return e.parent!==e&&(e.parent=n(e.parent)),e.parent}e(n,`find`);function r(e,t){let r=n(e);r.parent=n(t)}e(r,`union`);for(let e=0;e{delete e.parent}),Array.from(i.values())}e(Te,`disjointCluster`);function X(t){let n=e(e=>({max:t.reduce((t,n)=>Math.max(t,n[e]+n.radius),-1/0),min:t.reduce((t,n)=>Math.min(t,n[e]-n.radius),1/0)}),`minMax`);return{xRange:n(`x`),yRange:n(`y`)}}e(X,`getBoundingBox`);function Ee(t,n,r){n??=Math.PI/2;let i=ke(t).map(e=>Object.assign({},e)),a=Te(i);for(let e of a){we(e,n,r);let t=X(e);e.size=(t.xRange.max-t.xRange.min)*(t.yRange.max-t.yRange.min),e.bounds=t}a.sort((e,t)=>t.size-e.size),i=a[0];let o=i.bounds,s=(o.xRange.max-o.xRange.min)/50;function c(e,t,n){if(!e)return;let r=e.bounds,a,c;if(t)a=o.xRange.max-r.xRange.min+s;else{a=o.xRange.max-r.xRange.max;let e=(r.xRange.max-r.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;e<0&&(a+=e)}if(n)c=o.yRange.max-r.yRange.min+s;else{c=o.yRange.max-r.yRange.max;let e=(r.yRange.max-r.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;e<0&&(c+=e)}for(let t of e)t.x+=a,t.y+=c,i.push(t)}e(c,`addCluster`);let l=1;for(;l({radius:u*e.radius,x:r+d+(e.x-o.min)*u,y:r+f+(e.y-s.min)*u,setid:e.setid})))}e(De,`scaleSolution`);function Oe(e){let t={};for(let n of e)t[n.setid]=n;return t}e(Oe,`toObjectNotation`);function ke(e){return Object.keys(e).map(t=>Object.assign(e[t],{setid:t}))}e(ke,`fromObjectNotation`);function Ae(t={}){let n=!1,r=600,i=350,a=15,o=1e3,s=Math.PI/2,c=!0,l=null,u=!0,d=!0,f=null,p=null,m=!1,h=null,g=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,_={},v=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:[`#1f77b4`,`#ff7f0e`,`#2ca02c`,`#d62728`,`#9467bd`,`#8c564b`,`#e377c2`,`#7f7f7f`,`#bcbd22`,`#17becf`],y=0,b=e(function(e){if(e in _)return _[e];var t=_[e]=v[y];return y+=1,y>=v.length&&(y=0),t},`colours`),x=he,S=Y;function C(_){let v=_.datum(),y=new Set;v.forEach(e=>{e.size==0&&e.sets.length==1&&y.add(e.sets[0])}),v=v.filter(e=>!e.sets.some(e=>y.has(e)));let C={},w={};if(v.length>0){let e=x(v,{lossFunction:S,distinct:m});c&&(e=Ee(e,s,p)),C=De(e,r,i,a,l),w=Ne(C,v,g)}let T={};v.forEach(e=>{e.label&&(T[e.sets]=e.label)});function E(e){if(e.sets in T)return T[e.sets];if(e.sets.length==1)return``+e.sets[0]}e(E,`label`),_.selectAll(`svg`).data([C]).enter().append(`svg`);let D=_.select(`svg`);n?D.attr(`viewBox`,`0 0 ${r} ${i}`):D.attr(`width`,r).attr(`height`,i);let O={},k=!1;D.selectAll(`.venn-area path`).each(function(e){let t=this.getAttribute(`d`);e.sets.length==1&&t&&!m&&(k=!0,O[e.sets[0]]=Fe(t))});function A(e){return t=>Re(e.sets.map(e=>{let n=O[e],a=C[e];return n||={x:r/2,y:i/2,radius:1},a||={x:r/2,y:i/2,radius:1},{x:n.x*(1-t)+a.x*t,y:n.y*(1-t)+a.y*t,radius:n.radius*(1-t)+a.radius*t}}),h)}e(A,`pathTween`);let j=D.selectAll(`.venn-area`).data(v,e=>e.sets),M=j.enter().append(`g`).attr(`class`,e=>`venn-area venn-${e.sets.length==1?`circle`:`intersection`}${e.colour||e.color?` venn-coloured`:``}`).attr(`data-venn-sets`,e=>e.sets.join(`_`)),N=M.append(`path`),P=M.append(`text`).attr(`class`,`label`).text(e=>E(e)).attr(`text-anchor`,`middle`).attr(`dy`,`.35em`).attr(`x`,r/2).attr(`y`,i/2);d&&(N.style(`fill-opacity`,`0`).filter(e=>e.sets.length==1).style(`fill`,e=>e.colour?e.colour:e.color?e.color:b(e.sets)).style(`fill-opacity`,`.25`),P.style(`fill`,e=>e.colour||e.color?`#FFF`:t.textFill?t.textFill:e.sets.length==1?b(e.sets):`#444`));function F(e){return typeof e.transition==`function`?e.transition(`venn`).duration(o):e}e(F,`asTransition`);let I=_;k&&typeof I.transition==`function`?(I=F(_),I.selectAll(`path`).attrTween(`d`,A)):I.selectAll(`path`).attr(`d`,e=>Re(e.sets.map(e=>C[e])),h);let L=I.selectAll(`text`).filter(e=>e.sets in w).text(e=>E(e)).attr(`x`,e=>Math.floor(w[e.sets].x)).attr(`y`,e=>Math.floor(w[e.sets].y));u&&(k?`on`in L?L.on(`end`,Z(C,E)):L.each(`end`,Z(C,E)):L.each(Z(C,E)));let R=F(j.exit()).remove();typeof j.transition==`function`&&R.selectAll(`path`).attrTween(`d`,A);let ee=R.selectAll(`text`).attr(`x`,r/2).attr(`y`,i/2);return f!==null&&(P.style(`font-size`,`0px`),L.style(`font-size`,f),ee.style(`font-size`,`0px`)),{circles:C,textCentres:w,nodes:j,enter:M,update:I,exit:R}}return e(C,`chart`),C.wrap=function(e){return arguments.length?(u=e,C):u},C.useViewBox=function(){return n=!0,C},C.width=function(e){return arguments.length?(r=e,C):r},C.height=function(e){return arguments.length?(i=e,C):i},C.padding=function(e){return arguments.length?(a=e,C):a},C.distinct=function(e){return arguments.length?(m=e,C):m},C.colours=function(e){return arguments.length?(b=e,C):b},C.colors=function(e){return arguments.length?(b=e,C):b},C.fontSize=function(e){return arguments.length?(f=e,C):f},C.round=function(e){return arguments.length?(h=e,C):h},C.duration=function(e){return arguments.length?(o=e,C):o},C.layoutFunction=function(e){return arguments.length?(x=e,C):x},C.normalize=function(e){return arguments.length?(c=e,C):c},C.scaleToFit=function(e){return arguments.length?(l=e,C):l},C.styled=function(e){return arguments.length?(d=e,C):d},C.orientation=function(e){return arguments.length?(s=e,C):s},C.orientationOrder=function(e){return arguments.length?(p=e,C):p},C.lossFunction=function(e){return arguments.length?(S=e==="default"?Y:e===`logRatio`?Ce:e,C):S},C}e(Ae,`VennDiagram`);function Z(t,n){return function(r){let i=this,a=t[r.sets[0]].radius||50,o=n(r)||``,s=o.split(/\s+/).reverse(),c=(o.length+s.length)/3,l=s.pop(),u=[l],d=0,f=1.1;i.textContent=null;let p=[];function m(e){let t=i.ownerDocument.createElementNS(i.namespaceURI,`tspan`);return t.textContent=e,p.push(t),i.append(t),t}e(m,`append`);let h=m(l);for(;l=s.pop(),l;){u.push(l);let e=u.join(` `);h.textContent=e,e.length>c&&h.getComputedTextLength()>a&&(u.pop(),h.textContent=u.join(` `),u=[l],h=m(l),d++)}let g=.35-d*f/2,_=i.getAttribute(`x`),v=i.getAttribute(`y`);p.forEach((e,t)=>{e.setAttribute(`x`,_),e.setAttribute(`y`,v),e.setAttribute(`dy`,`${g+t*f}em`)})}}e(Z,`wrapText`);function Q(e,t,n){let r=t[0].radius-V(t[0],e);for(let n=1;n=a&&(i=r[n],a=o)}let o=fe(n=>-1*Q({x:n[0],y:n[1]},e,t),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,s={x:n?0:o[0],y:o[1]},c=!0;for(let t of e)if(V(s,t)>t.radius){c=!1;break}for(let e of t)if(V(s,e)e.p1))}e(je,`computeTextCentre`);function Me(e){let t={},n=Object.keys(e);for(let e of n)t[e]=[];for(let r=0;r0&&console.log(`WARNING: area `+o+` not represented on screen`)}return r}e(Ne,`computeTextCentres`);function Pe(e,t,n){let r=[];return r.push(` +M`,e,t),r.push(` +m`,-n,0),r.push(` +a`,n,n,0,1,0,n*2,0),r.push(` +a`,n,n,0,1,0,-n*2,0),r.join(` `)}e(Pe,`circlePath`);function Fe(e){let t=e.split(` `);return{x:Number.parseFloat(t[1]),y:Number.parseFloat(t[2]),radius:-Number.parseFloat(t[4])}}e(Fe,`circleFromPath`);function Ie(e){if(e.length===0)return[];let t={};return z(e,t),t.arcs}e(Ie,`intersectionAreaArcs`);function Le(e,t){if(e.length===0)return`M 0 0`;let n=10**(t||0),r=t==null?e=>e:e=>Math.round(e*n)/n;if(e.length==1){let t=e[0].circle;return Pe(r(t.x),r(t.y),r(t.radius))}let i=[` +M`,r(e[0].p2.x),r(e[0].p2.y)];for(let t of e){let e=r(t.circle.radius);i.push(` +A`,e,e,0,+!!t.large,+!!t.sweep,r(t.p1.x),r(t.p1.y))}return i.join(` `)}e(Le,`arcsToPath`);function Re(e,t){return Le(Ie(e),t)}e(Re,`intersectionAreaPath`);function ze(t,n={}){let{lossFunction:r,layoutFunction:i=he,normalize:a=!0,orientation:o=Math.PI/2,orientationOrder:s,width:c=600,height:l=350,padding:u=15,scaleToFit:d=!1,symmetricalTextCentre:f=!1,distinct:p,round:m=2}=n,h=i(t,{lossFunction:r==="default"||!r?Y:r===`logRatio`?Ce:r,distinct:p});a&&(h=Ee(h,o,s));let g=De(h,c,l,u,d),_=Ne(g,t,f),v=new Map(Object.keys(g).map(e=>[e,{set:e,x:g[e].x,y:g[e].y,radius:g[e].radius}])),y=t.map(e=>{let t=e.sets.map(e=>v.get(e)),n=Ie(t);return{circles:t,arcs:n,path:Le(n,m),area:e,has:new Set(e.sets)}});function b(e){let t=``;for(let n of y)n.has.size>e.length&&e.every(e=>n.has.has(e))&&(t+=` `+n.path);return t}return e(b,`genDistinctPath`),y.map(({circles:e,arcs:t,path:n,area:r})=>({data:r,text:_[r.sets],circles:e,arcs:t,path:n,distinctPath:n+b(r.sets)}))}e(ze,`layout`);function Be(e){let t=new Map;for(let n of e){let e=n.targets.join(`|`),r=t.get(e);r?Object.assign(r,n.styles):t.set(e,{...n.styles})}return t}e(Be,`buildStyleByKey`);var Ve=e((e,n,r,o)=>{let c=o.db,l=c.getConfig?.(),{themeVariables:p,look:m,handDrawnSeed:h}=s(),v=m===`handDrawn`,y=[p.venn1,p.venn2,p.venn3,p.venn4,p.venn5,p.venn6,p.venn7,p.venn8].filter(Boolean),b=c.getDiagramTitle?.(),x=c.getSubsetData(),S=c.getTextData(),C=Be(c.getStyleData()),w=Ue(x),T=l?.width??800,E=l?.height??450,D=T/1600,O=b?48*D:0,k=p.primaryTextColor??p.textColor,A=g(n);A.attr(`viewBox`,`0 0 ${T} ${E}`),b&&A.append(`text`).text(b).attr(`class`,`venn-title`).attr(`font-size`,`${32*D}px`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`x`,`50%`).attr(`y`,32*D).style(`fill`,p.vennTitleTextColor||p.titleColor);let j=t(document.createElement(`div`)),M=Ae().width(T).height(E-O);j.datum(w).call(M);let N=v?_.svg(j.select(`svg`).node()):void 0,P=ze(w,{width:T,height:E-O,padding:l?.padding??15}),F=new Map;for(let e of P){let t=$([...e.data.sets].sort());F.set(t,e)}S.length>0&&He(l,F,j,S,D,C);let I=i(p.background||`#f4f4f4`);j.selectAll(`.venn-circle`).each(function(e,n){let r=t(this),i=$([...e.sets].sort()),o=C.get(i),s=o?.fill||y[n%y.length]||p.primaryColor;r.classed(`venn-set-${n%8}`,!0);let c=o?.[`fill-opacity`]??.1,l=o?.stroke||s,f=o?.[`stroke-width`]||`${5*D}`;if(v&&N){let e=F.get(i);if(e&&e.circles.length>0){let t=e.circles[0],i=N.circle(t.x,t.y,t.radius*2,{roughness:.7,seed:h,fill:d(s,.7),fillStyle:`hachure`,fillWeight:2,hachureGap:8,hachureAngle:-41+n*60,stroke:l,strokeWidth:parseFloat(String(f))});r.select(`path`).remove(),r.node()?.insertBefore(i,r.select(`text`).node())}}else r.select(`path`).style(`fill`,s).style(`fill-opacity`,c).style(`stroke`,l).style(`stroke-width`,f).style(`stroke-opacity`,.95);let m=o?.color||(I?a(s,30):u(s,30));r.select(`text`).style(`font-size`,`${48*D}px`).style(`fill`,m)}),v&&N?j.selectAll(`.venn-intersection`).each(function(e){let n=t(this),r=$([...e.sets].sort()),i=C.get(r),a=i?.fill;if(a){let e=n.select(`path`),t=e.attr(`d`);if(t){let n=N.path(t,{roughness:.7,seed:h,fill:d(a,.3),fillStyle:`cross-hatch`,fillWeight:2,hachureGap:6,hachureAngle:60,stroke:`none`}),r=e.node();r?.parentNode?.insertBefore(n,r),e.remove()}}else n.select(`path`).style(`fill-opacity`,0);n.select(`text`).style(`font-size`,`${48*D}px`).style(`fill`,i?.color??p.vennSetTextColor??k)}):(j.selectAll(`.venn-intersection text`).style(`font-size`,`${48*D}px`).style(`fill`,e=>{let t=$([...e.sets].sort());return C.get(t)?.color??p.vennSetTextColor??k}),j.selectAll(`.venn-intersection path`).style(`fill-opacity`,e=>{let t=$([...e.sets].sort());return+!!C.get(t)?.fill}).style(`fill`,e=>{let t=$([...e.sets].sort());return C.get(t)?.fill??`transparent`}));let L=A.append(`g`).attr(`transform`,`translate(0, ${O})`),R=j.select(`svg`).node();if(R&&`childNodes`in R)for(let e of[...R.childNodes])L.node()?.appendChild(e);f(A,E,T,l?.useMaxWidth??!0)},`draw`);function $(e){return e.join(`|`)}e($,`stableSetsKey`);function He(e,t,n,r,i,a){let o=e?.useDebugLayout??!1,s=n.select(`svg`).append(`g`).attr(`class`,`venn-text-nodes`),c=new Map;for(let e of r){let t=$(e.sets),n=c.get(t);n?n.push(e):c.set(t,[e])}for(let[e,n]of c.entries()){let r=t.get(e);if(!r?.text)continue;let c=r.text.x,l=r.text.y,u=Math.min(...r.circles.map(e=>e.radius)),d=Math.min(...r.circles.map(e=>e.radius-Math.hypot(c-e.x,l-e.y))),f=Number.isFinite(d)?Math.max(0,d):0;f===0&&Number.isFinite(u)&&(f=u*.6);let p=s.append(`g`).attr(`class`,`venn-text-area`).attr(`font-size`,`${40*i}px`);o&&p.append(`circle`).attr(`class`,`venn-text-debug-circle`).attr(`cx`,c).attr(`cy`,l).attr(`r`,f).attr(`fill`,`none`).attr(`stroke`,`purple`).attr(`stroke-width`,1.5*i).attr(`stroke-dasharray`,`${6*i} ${4*i}`);let m=Math.max(80*i,f*2*.95),h=Math.max(60*i,f*2*.95),g=(r.data.label&&r.data.label.length>0?Math.min(32*i,f*.25):0)+(n.length<=2?30*i:0),_=c-m/2,v=l-h/2+g,y=Math.max(1,Math.ceil(Math.sqrt(n.length))),b=Math.max(1,Math.ceil(n.length/y)),x=m/y,S=h/b;for(let[e,t]of n.entries()){let n=e%y,r=Math.floor(e/y),s=_+x*(n+.5),c=v+S*(r+.5);o&&p.append(`rect`).attr(`class`,`venn-text-debug-cell`).attr(`x`,_+x*n).attr(`y`,v+S*r).attr(`width`,x).attr(`height`,S).attr(`fill`,`none`).attr(`stroke`,`teal`).attr(`stroke-width`,1*i).attr(`stroke-dasharray`,`${4*i} ${3*i}`);let l=x*.9,u=S*.9,d=p.append(`foreignObject`).attr(`class`,`venn-text-node-fo`).attr(`width`,l).attr(`height`,u).attr(`x`,s-l/2).attr(`y`,c-u/2).attr(`overflow`,`visible`),f=a.get(t.id)?.color,m=d.append(`xhtml:span`).attr(`class`,`venn-text-node`).style(`display`,`flex`).style(`width`,`100%`).style(`height`,`100%`).style(`white-space`,`normal`).style(`align-items`,`center`).style(`justify-content`,`center`).style(`text-align`,`center`).style(`overflow-wrap`,`normal`).style(`word-break`,`normal`).text(t.label??t.id);f&&m.style(`color`,f)}}}e(He,`renderTextNodes`);function Ue(e){let t=new Set(e.map(e=>[...e.sets].sort().join(`|`))),n=new Map(e.filter(e=>e.sets.length===1&&e.size!==void 0).map(e=>[e.sets[0],e.size])),r=[];for(let i of e){if(i.sets.length<3)continue;let e=[...i.sets].sort();for(let i=0;i0?[...e,...r]:e}e(Ue,`ensurePairwiseSubsets`);var We={parser:b,db:re,renderer:{draw:Ve},styles:ie};export{We as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/wardley-OPB4EBWU-NNLCSONB-Eduvm1r0.js b/lecture-01/assets/wardley-OPB4EBWU-NNLCSONB-Eduvm1r0.js new file mode 100644 index 0000000000000000000000000000000000000000..eef9a59aeaa37f794edaaec023f80dbda7d344ee --- /dev/null +++ b/lecture-01/assets/wardley-OPB4EBWU-NNLCSONB-Eduvm1r0.js @@ -0,0 +1 @@ +import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as e}from"./chunk-ODPFZSHR-BUzFQ4Zq.js";export{e as createWardleyServices}; \ No newline at end of file diff --git a/lecture-01/assets/wardleyDiagram-OEKRJB5D-BvVI10W5.js b/lecture-01/assets/wardleyDiagram-OEKRJB5D-BvVI10W5.js new file mode 100644 index 0000000000000000000000000000000000000000..fb55202aa6a8d21ae27f8716df8caf3ef9e55815 --- /dev/null +++ b/lecture-01/assets/wardleyDiagram-OEKRJB5D-BvVI10W5.js @@ -0,0 +1,78 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{T as t}from"./chunk-FO5PYUIK-CPzj2963.js";import{C as n,E as r,J as i,Q as a,S as o,Y as s,b as c,k as l,l as u,o as d,x as f}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as p}from"./chunk-BPTLHSDI-QRS_xuYz.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{i as m}from"./chunk-OX6ZKUVE-roiHi12N.js";import{t as h}from"./chunk-6ZKBGPIT-B4RTUexp.js";import"./chunk-A7G5T7E5-C2HISlqa.js";import{n as g}from"./chunk-BQKPLVCE-CH-bQZj9.js";import"./chunk-NYCIP5HP-BZs_nZUU.js";import"./chunk-6QIBY7DQ-xR0SR3RB.js";import"./chunk-SLCUJWJ3-Bzf1BoPP.js";import"./chunk-43ACQNTO-CVHKukau.js";import"./chunk-FXRKSSP6-BDxrggHz.js";import"./chunk-RRYK4PFG-DZMcopsb.js";import"./chunk-IT6C5QXO-BI6Sf-cR.js";import"./chunk-GMJQP6DO-gEw8rKqu.js";import"./chunk-ODPFZSHR-BUzFQ4Zq.js";import"./chunk-6OZ7KPF7-CpRlDBGl.js";import"./chunk-LJTN6OYE-BTsXVLFU.js";import"./chunk-Z6Q54H3S-B8XyqzVF.js";import"./chunk-4KMQCWFH-ClzK3uec.js";import"./chunk-S7Q6ZHN2-CSIi0_Nw.js";import"./chunk-IIWGMRJM-k15frrBU.js";var _=e((e,t)=>{let n=e<=1?e*100:e;if(n<0||n>100)throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return n},`toPercent`),v=e((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=e(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=e(e=>{if(!e?.startsWith(`+`))return{};let t=/^\+'([^']*)'/.exec(e)?.[1];return e.includes(`<>`)?{flow:`bidirectional`,label:t}:e.includes(`<`)?{flow:`backward`,label:t}:e.includes(`>`)?{flow:`forward`,label:t}:{label:t}},`extractFlowFromArrow`),x=e((e,t)=>{if(h(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let n=e.evolution.stages.map(e=>e.secondName?`${e.name.trim()} / ${e.secondName.trim()}`:e.name.trim()),r=e.evolution.stages.filter(e=>e.boundary!==void 0).map(e=>e.boundary);t.updateAxes({stages:n,stageBoundaries:r})}if(e.anchors.forEach(e=>{let n=v(e.visibility,e.evolution,`Anchor "${e.name}"`);t.addNode(e.name,e.name,n.x,n.y,`anchor`)}),e.components.forEach(e=>{let n=v(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,a=e.decorator?.strategy;t.addNode(e.name,e.name,n.x,n.y,`component`,r,i,e.inertia,a)}),e.notes.forEach(e=>{let n=v(e.visibility,e.evolution,`Note "${e.text}"`);t.addNote(e.text,n.x,n.y)}),e.pipelines.forEach(e=>{let n=t.getNode(e.parent);if(!n||typeof n.y!=`number`)throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);let r=n.y;t.startPipeline(e.parent),e.components.forEach(n=>{let i=`${e.parent}_${n.name}`,a=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,o=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,s=_(n.evolution,`Pipeline component "${n.name}" evolution`);t.addNode(i,n.name,s,r,`pipeline-component`,a,o),t.addPipelineComponent(e.parent,i)})}),e.links.forEach(e=>{let n=!!e.arrow&&(e.arrow.includes(`-.->`)||e.arrow.includes(`.-.`)),r=y(e.fromPort)??y(e.toPort),{flow:i,label:a}=b(e.arrow);!r&&i&&(r=i);let o=e.linkLabel,s=a??o;t.addLink(t.resolveNodeId(e.from),t.resolveNodeId(e.to),n,s,r)}),e.evolves.forEach(e=>{let n=t.getNode(e.component);if(n?.y!==void 0){let r=_(e.target,`Evolve target for "${e.component}"`);t.addTrend(e.component,r,n.y)}}),e.annotations.length>0){let n=e.annotations[0],r=v(n.x,n.y,`Annotations box`);t.setAnnotationsBox(r.x,r.y)}e.annotation.forEach(e=>{let n=v(e.x,e.y,`Annotation ${e.number}`);t.addAnnotation(e.number,[{x:n.x,y:n.y}],e.text)}),e.accelerators.forEach(e=>{let n=v(e.x,e.y,`Accelerator "${e.name}"`);t.addAccelerator(e.name,n.x,n.y)}),e.deaccelerators.forEach(e=>{let n=v(e.x,e.y,`Deaccelerator "${e.name}"`);t.addDeaccelerator(e.name,n.x,n.y)})},`populateDb`),S={parser:{yy:void 0},parse:e(async e=>{let n=await g(`wardley`,e);t.debug(n);let r=S.parser?.yy;if(!r||typeof r.addNode!=`function`)throw Error(`parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);x(n,r)},`parse`)},C=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{e(this,`WardleyBuilder`)}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},n={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,n)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let n=this.pipelines.get(e);n&&n.componentIds.push(t);let r=this.nodes.get(t);r&&(r.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,n]of this.nodes)if(n.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!=`number`||typeof t.y!=`number`)throw Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function w(){return n()[`wardley-beta`]}e(w,`getConfig`);function T(e,t,n,r,i,a,o,s,c){C.addNode({id:e,label:t,x:n,y:r,className:i,labelOffsetX:a,labelOffsetY:o,inertia:s,sourceStrategy:c})}e(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}e(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}e(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}e(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}e(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}e(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}e(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}e(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}e(N,`setSize`);function P(e){C.startPipeline(e)}e(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}e(F,`addPipelineComponent`);function I(e){C.setAxes(e)}e(I,`updateAxes`);function L(e){return C.getNode(e)}e(L,`getNode`);function R(e){return C.resolveNodeId(e)}e(R,`resolveNodeId`);function z(){return C.build()}e(z,`getWardleyData`);function B(){C.clear(),d()}e(B,`clear`);var V={getConfig:w,addNode:T,addLink:E,addTrend:D,addAnnotation:O,addNote:k,addAccelerator:A,addDeaccelerator:j,setAnnotationsBox:M,setSize:N,startPipeline:P,addPipelineComponent:F,updateAxes:I,getNode:L,resolveNodeId:R,getWardleyData:z,clear:B,setAccTitle:s,getAccTitle:f,setDiagramTitle:a,getDiagramTitle:r,getAccDescription:c,setAccDescription:i},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=e(()=>{let{themeVariables:e}=n();return{backgroundColor:e.wardley?.backgroundColor??e.background??`#fff`,axisColor:e.wardley?.axisColor??`#000`,axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??`#222`,gridColor:e.wardley?.gridColor??`rgba(100, 100, 100, 0.2)`,componentFill:e.wardley?.componentFill??`#fff`,componentStroke:e.wardley?.componentStroke??`#000`,componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??`#222`,linkStroke:e.wardley?.linkStroke??`#000`,evolutionStroke:e.wardley?.evolutionStroke??`#dc3545`,annotationStroke:e.wardley?.annotationStroke??`#000`,annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??`#222`,annotationFill:e.wardley?.annotationFill??e.background??`#fff`}},`getTheme`),W=e(()=>{let e=n()[`wardley-beta`];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},`getConfigValues`),G={parser:S,db:V,renderer:{draw:e((n,r,i,a)=>{t.debug(`Rendering Wardley map +`+n);let o=W(),s=U(),c=o.nodeRadius*1.6,l=a.db,d=l.getWardleyData(),f=l.getDiagramTitle(),m=d.size?.width??o.width,h=d.size?.height??o.height,g=p(r);g.selectAll(`*`).remove(),u(g,h,m,o.useMaxWidth),g.attr(`viewBox`,`0 0 ${m} ${h}`);let _=g.append(`g`).attr(`class`,`wardley-map`),v=g.append(`defs`);v.append(`marker`).attr(`id`,`arrow-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.evolutionStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-end-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-start-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,1).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),_.append(`rect`).attr(`class`,`wardley-background`).attr(`width`,m).attr(`height`,h).attr(`fill`,s.backgroundColor);let y=m-o.padding*2,b=h-o.padding*2;f&&_.append(`text`).attr(`class`,`wardley-title`).attr(`x`,m/2).attr(`y`,o.padding/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize*1.05).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let x=e(e=>o.padding+e/100*y,`projectX`),S=e(e=>h-o.padding-e/100*b,`projectY`),C=_.append(`g`).attr(`class`,`wardley-axes`);C.append(`line`).attr(`x1`,o.padding).attr(`x2`,m-o.padding).attr(`y1`,h-o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1),C.append(`line`).attr(`x1`,o.padding).attr(`x2`,o.padding).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1);let w=d.axes.xLabel??`Evolution`,T=d.axes.yLabel??`Visibility`;C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-x`).attr(`x`,o.padding+y/2).attr(`y`,h-o.padding/4).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).text(w),C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-y`).attr(`x`,o.padding/3).attr(`y`,o.padding+b/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`transform`,`rotate(-90 ${o.padding/3} ${o.padding+b/2})`).text(T);let E=d.axes.stages&&d.axes.stages.length>0?d.axes.stages:H;if(E.length>0){let e=_.append(`g`).attr(`class`,`wardley-stages`),t=d.axes.stageBoundaries,n=[];if(t&&t.length===E.length){let e=0;t.forEach(t=>{n.push({start:e,end:t}),e=t})}else{let e=1/E.length;E.forEach((t,r)=>{n.push({start:r*e,end:(r+1)*e})})}E.forEach((t,r)=>{let i=n[r],a=o.padding+i.start*y,c=(a+(o.padding+i.end*y))/2;r>0&&e.append(`line`).attr(`x1`,a).attr(`x2`,a).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,`#000`).attr(`stroke-width`,1).attr(`stroke-dasharray`,`5 5`).attr(`opacity`,.8),e.append(`text`).attr(`class`,`wardley-stage-label`).attr(`x`,c).attr(`y`,h-o.padding/1.5).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize-2).attr(`text-anchor`,`middle`).text(t)})}if(o.showGrid){let e=_.append(`g`).attr(`class`,`wardley-grid`);for(let t=1;t<4;t++){let n=t/4,r=o.padding+y*n;e.append(`line`).attr(`x1`,r).attr(`x2`,r).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`),e.append(`line`).attr(`x1`,o.padding).attr(`x2`,m-o.padding).attr(`y1`,h-o.padding-b*n).attr(`y2`,h-o.padding-b*n).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`)}}let D=new Map;if(d.nodes.forEach(e=>{D.set(e.id,{x:x(e.x),y:S(e.y),node:e})}),d.pipelines.length>0){let e=_.append(`g`).attr(`class`,`wardley-pipelines`),t=_.append(`g`).attr(`class`,`wardley-pipeline-links`);d.pipelines.forEach(n=>{if(n.componentIds.length===0)return;let r=n.componentIds.map(e=>({id:e,pos:D.get(e),node:d.nodes.find(t=>t.id===e)})).filter(e=>e.pos&&e.node).sort((e,t)=>e.node.x-t.node.x);for(let e=0;e{let t=D.get(e);t&&(i=Math.min(i,t.x),a=Math.max(a,t.x),l=t.y)}),i!==1/0&&a!==-1/0){let t=o.nodeRadius*4,r=l-t/2,u=D.get(n.nodeId);u&&(u.x=(i+a)/2,u.y=r-c/6),e.append(`rect`).attr(`class`,`wardley-pipeline-box`).attr(`x`,i-15).attr(`y`,r).attr(`width`,a-i+30).attr(`height`,t).attr(`fill`,`none`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}})}let O=_.append(`g`).attr(`class`,`wardley-links`),k=new Map;d.pipelines.forEach(e=>{k.set(e.nodeId,new Set(e.componentIds))});let A=d.links.filter(e=>!(!D.has(e.source)||!D.has(e.target)||k.get(e.target)?.has(e.source)));O.selectAll(`line`).data(A).enter().append(`line`).attr(`class`,e=>`wardley-link${e.dashed?` wardley-link--dashed`:``}`).attr(`x1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.x+i/s*r}).attr(`y1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.y+a/s*r}).attr(`x2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.x+i/s*r}).attr(`y2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.y+a/s*r}).attr(`stroke`,s.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,e=>e.dashed?`6 6`:null).attr(`marker-end`,e=>e.flow===`forward`||e.flow===`bidirectional`?`url(#link-arrow-end-${r})`:null).attr(`marker-start`,e=>e.flow===`backward`||e.flow===`bidirectional`?`url(#link-arrow-start-${r})`:null),O.selectAll(`text`).data(A.filter(e=>e.label)).enter().append(`text`).attr(`class`,`wardley-link-label`).attr(`x`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=n.y-t.y,a=n.x-t.x;return r+i/Math.sqrt(a*a+i*i)*8}).attr(`y`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.y+n.y)/2,i=n.x-t.x,a=n.y-t.y,o=Math.sqrt(i*i+a*a);return r+-i/o*8}).attr(`fill`,s.axisTextColor).attr(`font-size`,o.labelFontSize).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`transform`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=(t.y+n.y)/2,a=n.x-t.x,o=n.y-t.y,s=Math.sqrt(a*a+o*o),c=o/s,l=-a/s,u=r+c*8,d=i+l*8,f=Math.atan2(o,a)*180/Math.PI;return(f>90||f<-90)&&(f+=180),`rotate(${f} ${u} ${d})`}).text(e=>e.label);let j=_.append(`g`).attr(`class`,`wardley-trends`),M=d.trends.map(e=>{let t=D.get(e.nodeId);if(!t)return null;let n=x(e.targetX),r=S(e.targetY),i=n-t.x,a=r-t.y,s=Math.sqrt(i*i+a*a),c=o.nodeRadius+2;return{origin:t,targetX:n,targetY:r,adjustedX2:s>c?n-i/s*c:n,adjustedY2:s>c?r-a/s*c:r}}).filter(e=>e!==null);j.selectAll(`line`).data(M).enter().append(`line`).attr(`class`,`wardley-trend`).attr(`x1`,e=>e.origin.x).attr(`y1`,e=>e.origin.y).attr(`x2`,e=>e.adjustedX2).attr(`y2`,e=>e.adjustedY2).attr(`stroke`,s.evolutionStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`).attr(`marker-end`,`url(#arrow-${r})`);let N=_.append(`g`).attr(`class`,`wardley-nodes`).selectAll(`g`).data(d.nodes).enter().append(`g`).attr(`class`,e=>[`wardley-node`,e.className?`wardley-node--${e.className}`:``].filter(Boolean).join(` `));N.filter(e=>e.sourceStrategy===`outsource`).append(`circle`).attr(`class`,`wardley-outsource-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#666`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`buy`).append(`circle`).attr(`class`,`wardley-buy-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#ccc`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`build`).append(`circle`).attr(`class`,`wardley-build-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#eee`).attr(`stroke`,`#000`).attr(`stroke-width`,1);let P=N.filter(e=>e.sourceStrategy===`market`);P.append(`circle`).attr(`class`,`wardley-market-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>!e.isPipelineParent&&e.sourceStrategy!==`market`&&e.className!==`anchor`).append(`circle`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1);let F=o.nodeRadius*.7,I=o.nodeRadius*1.2;if(P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x).attr(`y1`,e=>D.get(e.id).y-I).attr(`x2`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x).attr(`y2`,e=>D.get(e.id).y-I).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y-I).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),N.filter(e=>e.isPipelineParent===!0).append(`rect`).attr(`x`,e=>D.get(e.id).x-c/2).attr(`y`,e=>D.get(e.id).y-c/2).attr(`width`,c).attr(`height`,c).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.inertia===!0).append(`line`).attr(`class`,`wardley-inertia`).attr(`x1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?c/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?c:o.nodeRadius*2;return t.y-n/2}).attr(`x2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?c/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?c:o.nodeRadius*2;return t.y+n/2}).attr(`stroke`,s.componentStroke).attr(`stroke-width`,6),N.append(`text`).attr(`x`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetX===void 0?t.x:t.x+e.labelOffsetX;let n=o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetX===void 0&&(n+=10);let r=e.labelOffsetX??n;return t.x+r}).attr(`y`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetY===void 0?t.y-3:t.y+e.labelOffsetY;let n=-o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetY===void 0&&(n-=10);let r=e.labelOffsetY??n;return t.y+r}).attr(`class`,`wardley-node-label`).attr(`fill`,e=>e.className===`evolved`?s.evolutionStroke:e.className===`anchor`?`#000`:s.componentLabelColor).attr(`font-size`,o.labelFontSize).attr(`font-weight`,e=>e.className===`anchor`?`bold`:`normal`).attr(`text-anchor`,e=>e.className===`anchor`?`middle`:`start`).attr(`dominant-baseline`,e=>e.className===`anchor`?`middle`:`auto`).text(e=>e.label),d.annotations.length>0){let e=_.append(`g`).attr(`class`,`wardley-annotations`);if(d.annotations.forEach(t=>{let n=t.coordinates.map(e=>({x:x(e.x),y:S(e.y)}));if(n.length>1)for(let t=0;t{let r=e.append(`g`).attr(`class`,`wardley-annotation`);r.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5),r.append(`text`).attr(`x`,n.x).attr(`y`,n.y).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.number)})}),d.annotationsBox){let t=x(d.annotationsBox.x),n=S(d.annotationsBox.y),r=e.append(`g`).attr(`class`,`wardley-annotations-box`),i=[...d.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),a=[];if(i.forEach((e,i)=>{let o=r.append(`text`).attr(`x`,t+10).attr(`y`,n+10+(i+1)*16).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`text-anchor`,`start`).attr(`dominant-baseline`,`middle`).text(`${e.number}. ${e.text}`);a.push(o)}),a.length>0){let e=0,c=0;a.forEach(t=>{let n=t.node(),r=n.getComputedTextLength();e=Math.max(e,r);let i=n.getBBox();c=Math.max(c,i.height)});let l=e+20+105,u=i.length*16+20+c/2,d=o.padding,f=m-o.padding-l,p=o.padding,g=h-o.padding-u;t=Math.max(d,Math.min(t,f)),n=Math.max(p,Math.min(n,g)),a.forEach((e,r)=>{e.attr(`x`,t+10).attr(`y`,n+10+(r+1)*16)}),r.insert(`rect`,`text`).attr(`x`,t).attr(`y`,n).attr(`width`,l).attr(`height`,u).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}}}if(d.notes.length>0){let e=_.append(`g`).attr(`class`,`wardley-notes`);d.notes.forEach(t=>{let n=x(t.x),r=S(t.y);e.append(`text`).attr(`x`,n).attr(`y`,r).attr(`text-anchor`,`start`).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.text)})}if(d.accelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-accelerators`);d.accelerators.forEach(t=>{let n=x(t.x),r=S(t.y),i=` + M ${n} ${r-15} + L ${n+60-20} ${r-15} + L ${n+60-20} ${r-15-8} + L ${n+60} ${r} + L ${n+60-20} ${r+15+8} + L ${n+60-20} ${r+15} + L ${n} ${r+15} + Z + `;e.append(`path`).attr(`d`,i).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),e.append(`text`).attr(`x`,n+30).attr(`y`,r+15+15).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}if(d.deaccelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-deaccelerators`);d.deaccelerators.forEach(t=>{let n=x(t.x),r=S(t.y),i=` + M ${n+60} ${r-15} + L ${n+20} ${r-15} + L ${n+20} ${r-15-8} + L ${n} ${r} + L ${n+20} ${r+15+8} + L ${n+20} ${r+15} + L ${n+60} ${r+15} + Z + `;e.append(`path`).attr(`d`,i).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),e.append(`text`).attr(`x`,n+30).attr(`y`,r+15+15).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}},`draw`)},styles:e(({wardley:e}={})=>{let t=l(),n=o(),r=m(t,n.themeVariables),i=m(r.wardley,e);return` + .wardley-background { + fill: ${i.backgroundColor}; + } + .wardley-axes line, .wardley-axes path { + stroke: ${i.axisColor}; + } + .wardley-axis-label { + fill: ${i.axisTextColor}; + } + .wardley-stage-label { + fill: ${i.axisTextColor}; + } + .wardley-grid line { + stroke: ${i.gridColor}; + } + .wardley-node circle { + fill: ${i.componentFill}; + stroke: ${i.componentStroke}; + } + .wardley-node-label { + fill: ${i.componentLabelColor}; + } + .wardley-link { + stroke: ${i.linkStroke}; + } + .wardley-link--dashed { + stroke-dasharray: 4 4; + } + .wardley-link-label { + fill: ${i.axisTextColor}; + } + .wardley-trend line { + stroke: ${i.evolutionStroke}; + } + .wardley-annotation-line { + stroke: ${i.annotationStroke}; + } + .wardley-annotation circle { + fill: ${i.annotationFill}; + stroke: ${i.annotationStroke}; + } + .wardley-annotation text { + fill: ${i.annotationTextColor}; + } + .wardley-annotations-box rect { + fill: ${i.annotationFill}; + stroke: ${i.annotationStroke}; + } + .wardley-annotations-box text { + fill: ${i.annotationTextColor}; + } + .wardley-pipeline-box { + stroke: ${i.componentStroke}; + } + .wardley-notes text { + fill: ${i.axisTextColor}; + } + `},`styles`)};export{G as diagram}; \ No newline at end of file diff --git a/lecture-01/assets/xychartDiagram-ZHPTVI7R-CnI219k3.js b/lecture-01/assets/xychartDiagram-ZHPTVI7R-CnI219k3.js new file mode 100644 index 0000000000000000000000000000000000000000..c2a2d3987bc6babaf2c2b4ef6ba4d950fc25ee6e --- /dev/null +++ b/lecture-01/assets/xychartDiagram-ZHPTVI7R-CnI219k3.js @@ -0,0 +1,7 @@ +import{r as e}from"./chunk-PTVI3W5X-DVfdoxm6.js";import{S as t,T as n,a as r,x as i}from"./chunk-FO5PYUIK-CPzj2963.js";import{E as a,G as o,J as s,Q as c,S as l,Y as u,b as d,k as f,l as p,m,o as h,x as g}from"./chunk-NEZ6ONQZ-CuHA0Ldj.js";import{t as _}from"./chunk-BPTLHSDI-QRS_xuYz.js";import"./chunk-IPM4HZQ6-CQmHNgJe.js";import{i as v}from"./chunk-OX6ZKUVE-roiHi12N.js";import"./chunk-AQ2D6KKF-AxjphkEe.js";import{t as y}from"./chunk-2V3FENDJ-B1mkZICr.js";var b=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,10,12,14,16,18,19,21,23],r=[2,6],i=[1,3],a=[1,5],o=[1,6],s=[1,7],c=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],u=[1,26],d=[1,28],f=[1,29],p=[1,30],m=[1,31],h=[1,32],g=[1,33],_=[1,34],v=[1,35],y=[1,36],b=[1,37],x=[1,43],S=[1,42],C=[1,47],w=[1,50],T=[1,10,12,14,16,18,19,21,23,36,37,38],E=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],D=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],O=[1,65],k=[26,28],A={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:`error`,5:`XYCHART`,8:`CHART_ORIENTATION`,10:`title`,12:`X_AXIS`,14:`Y_AXIS`,16:`LINE`,18:`BAR`,19:`acc_title`,20:`acc_title_value`,21:`acc_descr`,22:`acc_descr_value`,23:`acc_descr_multiline_value`,24:`SQUARE_BRACES_START`,26:`SQUARE_BRACES_END`,28:`COMMA`,29:`NUMBER_WITH_DECIMAL`,30:`STR`,33:`ARROW_DELIMITER`,36:`NEWLINE`,37:`SEMI`,38:`EOF`,40:`MD_STR`,42:`AMP`,43:`NUM`,44:`ALPHA`,45:`PLUS`,46:`EQUALS`,47:`MULT`,48:`DOT`,49:`BRKT`,50:`MINUS`,51:`UNDERSCORE`},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setOrientation(a[s]);break;case 9:r.setDiagramTitle(a[s].text.trim());break;case 12:r.setLineData({text:``,type:`text`},a[s]);break;case 13:r.setLineData(a[s-1],a[s]);break;case 14:r.setBarData({text:``,type:`text`},a[s]);break;case 15:r.setBarData(a[s-1],a[s]);break;case 16:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:this.$=a[s-1];break;case 20:case 30:this.$=[a[s-2],...a[s]];break;case 21:case 31:this.$=[a[s]];break;case 22:this.$={value:Number(a[s-1]),label:a[s]};break;case 23:this.$={value:Number(a[s]),label:``};break;case 24:r.setXAxisTitle(a[s]);break;case 25:r.setXAxisTitle(a[s-1]);break;case 26:r.setXAxisTitle({type:`text`,text:``});break;case 27:r.setXAxisBand(a[s]);break;case 28:r.setXAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 29:this.$=a[s-1];break;case 32:r.setYAxisTitle(a[s]);break;case 33:r.setYAxisTitle(a[s-1]);break;case 34:r.setYAxisTitle({type:`text`,text:``});break;case 35:r.setYAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 39:this.$={text:a[s],type:`text`};break;case 40:this.$={text:a[s],type:`text`};break;case 41:this.$={text:a[s],type:`markdown`};break;case 42:this.$=a[s];break;case 43:this.$=a[s-1]+``+a[s]}},`anonymous`),table:[t(n,r,{3:1,4:2,7:4,5:i,36:a,37:o,38:s}),{1:[3]},t(n,r,{4:2,7:4,3:8,5:i,36:a,37:o,38:s}),t(n,r,{4:2,7:4,6:9,3:10,5:i,8:[1,11],36:a,37:o,38:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(c,[2,36]),t(c,[2,37]),t(c,[2,38]),{1:[2,1]},t(n,r,{4:2,7:4,3:21,5:i,36:a,37:o,38:s}),{1:[2,3]},t(c,[2,5]),t(n,[2,7],{4:22,36:a,37:o,38:s}),{11:23,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:39,13:38,24:x,29:S,30:l,31:40,32:41,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:45,15:44,29:C,30:l,35:46,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:49,17:48,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:52,17:51,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{20:[1,53]},{22:[1,54]},t(T,[2,18]),{1:[2,2]},t(T,[2,8]),t(T,[2,9]),t(E,[2,39],{41:55,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b}),t(E,[2,40]),t(E,[2,41]),t(D,[2,42]),t(D,[2,44]),t(D,[2,45]),t(D,[2,46]),t(D,[2,47]),t(D,[2,48]),t(D,[2,49]),t(D,[2,50]),t(D,[2,51]),t(D,[2,52]),t(D,[2,53]),t(T,[2,10]),t(T,[2,24],{32:41,31:56,24:x,29:S}),t(T,[2,26]),t(T,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},t(T,[2,11]),t(T,[2,32],{35:60,29:C}),t(T,[2,34]),{33:[1,61]},t(T,[2,12]),{17:62,24:w},{25:63,27:64,29:O},t(T,[2,14]),{17:66,24:w},t(T,[2,16]),t(T,[2,17]),t(D,[2,43]),t(T,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(T,[2,33]),{29:[1,70]},t(T,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(k,[2,23],{30:[1,73]}),t(T,[2,15]),t(T,[2,28]),t(T,[2,29]),{11:59,30:l,34:74,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},t(T,[2,35]),t(T,[2,19]),{25:75,27:64,29:O},t(k,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +`+h.showPosition()+` +Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};A.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` +`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return this.popState(),36;case 3:return this.popState(),36;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState(`acc_title`),19;case 8:return this.popState(),`acc_title_value`;case 9:return this.pushState(`acc_descr`),21;case 10:return this.popState(),`acc_descr_value`;case 11:this.pushState(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState(`axis_data`),`X_AXIS`;case 18:return this.pushState(`axis_data`),`Y_AXIS`;case 19:return this.pushState(`axis_band_data`),24;case 20:return 33;case 21:return this.pushState(`data`),16;case 22:return this.pushState(`data`),18;case 23:return this.pushState(`data_inner`),24;case 24:return 29;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState(`string`);break;case 28:this.popState();break;case 29:return`STR`;case 30:return 24;case 31:return 26;case 32:return 44;case 33:return`COLON`;case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}})();function j(){this.yy={}}return e(j,`Parser`),j.prototype=A,A.Parser=j,new j})();b.parser=b;var x=b;function S(e){return e.type===`bar`}e(S,`isBarPlot`);function C(e){return e.type===`band`}e(C,`isBandAxisData`);function w(e){return e.type===`linear`}e(w,`isLinearAxisData`);var T=class{constructor(e){this.parentGroup=e}static{e(this,`TextDimensionCalculatorWithFont`)}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};let n={width:0,height:0},r=this.parentGroup.append(`g`).attr(`visibility`,`hidden`).attr(`font-size`,t);for(let i of e){let e=y(r,1,i),a=e?e.width:i.length*t,o=e?e.height:t;n.width=Math.max(n.width,a),n.height=Math.max(n.height,o)}return r.remove(),n}},E=.7,D=.2,O=class{constructor(e,t,n,r){this.axisConfig=e,this.title=t,this.textDimensionCalculator=n,this.axisThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{e(this,`BaseAxis`)}setRange(e){this.range=e,this.axisPosition===`left`||this.axisPosition===`right`?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){E*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(E*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=D*e.width;this.outerPadding=Math.min(n.width/2,r);let i=n.height;this.axisPosition===`bottom`&&this.normalizedLabelRotationInRad!==0&&(i=Math.max(i,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*n.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*n.height))),i+=this.axisConfig.labelPadding*2,this.labelTextHeight=n.height,i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=D*e.height;this.outerPadding=Math.min(n.height/2,r);let i=n.width+this.axisConfig.labelPadding*2;i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition===`left`||this.axisPosition===`right`?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let t=this.normalizedLabelRotationInRad;return t===0?0:Math.sin(t)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`left-axis`,`axisl-line`],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`left-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`middle`,horizontalPos:`right`}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`left-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`left-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`bottom-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`bottom-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e)+this.calculateOffsetByRotation(`height`),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation(`width`)),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`bottom-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},${t+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`bottom-axis`,`title`],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`top-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`top-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y;e.push({type:`path`,groupTexts:[`top-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`top-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElements(){if(this.axisPosition===`left`)return this.getDrawableElementsForLeftAxis();if(this.axisPosition===`right`)throw Error(`Drawing of right axis is not implemented`);return this.axisPosition===`bottom`?this.getDrawableElementsForBottomAxis():this.axisPosition===`top`?this.getDrawableElementsForTopAxis():[]}},k=class extends O{static{e(this,`BandAxis`)}constructor(e,t,n,i,a){super(e,i,a,t),this.categories=n,this.scale=r().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=r().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),n.trace(`BandAxis axis final categories, range: `,this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},A=class extends O{static{e(this,`LinearAxis`)}constructor(e,n,r,i,a){super(e,i,a,n),this.domain=r,this.scale=t().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition===`left`&&e.reverse(),this.scale=t().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function j(e,t,n,r){let i=new T(r);return C(e)?new k(t,n,e.categories,e.title,i):new A(t,n,[e.min,e.max],e.title,i)}e(j,`getAxis`);var M=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{e(this,`ChartTitle`)}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=n&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:[`chart-title`],type:`text`,data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:`middle`,horizontalPos:`center`,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}};function N(e,t,n,r){return new M(new T(r),e,t,n)}e(N,`getChartTitleComponent`);var ee=class{constructor(e,t,n,r,i){this.plotData=e,this.xAxis=t,this.yAxis=n,this.orientation=r,this.plotIndex=i}static{e(this,`LinePlot`)}getDrawableElement(){let e=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t;if(t=this.orientation===`horizontal`?i().y(e=>e[0]).x(e=>e[1])(e):i().x(e=>e[0]).y(e=>e[1])(e),!t)return[];let n=[{groupTexts:[`plot`,`line-plot-${this.plotIndex}`],type:`path`,data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let t=[];for(let[n,[r,i]]of e.entries()){let e=this.plotData.pointLabels[n];e&&(this.orientation===`horizontal`?t.push({x:i+10,y:r,text:e,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`left`,fontSize:12,rotation:0}):t.push({x:r,y:i-10,text:e,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`center`,fontSize:12,rotation:0}))}t.length>0&&n.push({groupTexts:[`plot`,`line-plot-${this.plotIndex}`,`labels`],type:`text`,data:t})}return n}},te=class{constructor(e,t,n,r,i,a){this.barData=e,this.boundingRect=t,this.xAxis=n,this.yAxis=r,this.orientation=i,this.plotIndex=a}static{e(this,`BarPlot`)}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*.95,n=t/2;return this.orientation===`horizontal`?[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:this.boundingRect.x,y:e[0]-n,height:t,width:e[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:e[0]-n,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},ne=class{constructor(e,t,n){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{e(this,`BasePlot`)}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error(`Axes must be passed to render Plots`);let e=[];for(let[t,n]of this.chartData.plots.entries())switch(n.type){case`line`:{let r=new ee(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break;case`bar`:{let r=new te(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}}return e}};function re(e,t,n){return new ne(e,t,n)}e(re,`getPlotComponent`);var ie=class{constructor(e,t,n,r){this.chartConfig=e,this.chartData=t,this.componentStore={title:N(e,t,n,r),plot:re(e,t,n),xAxis:j(t.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},r),yAxis:j(t.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},r)}}static{e(this,`Orchestrator`)}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:i,height:a});e-=o.width,t-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),r=o.height,t-=o.height,this.componentStore.xAxis.setAxisPosition(`bottom`),o=this.componentStore.xAxis.calculateSpace({width:e,height:t}),t-=o.height,this.componentStore.yAxis.setAxisPosition(`left`),o=this.componentStore.yAxis.calculateSpace({width:e,height:t}),n=o.width,e-=o.width,e>0&&(i+=e,e=0),t>0&&(a+=t,t=0),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([n,n+i]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:r+a}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some(e=>S(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=0,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:a,height:o});e-=s.width,t-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),n=s.height,t-=s.height,this.componentStore.xAxis.setAxisPosition(`left`),s=this.componentStore.xAxis.calculateSpace({width:e,height:t}),e-=s.width,r=s.width,this.componentStore.yAxis.setAxisPosition(`top`),s=this.componentStore.yAxis.calculateSpace({width:e,height:t}),t-=s.height,i=n+s.height,e>0&&(a+=e,e=0),t>0&&(o+=t,t=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([i,i+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(e=>S(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation===`horizontal`?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}},ae=class{static{e(this,`XYChartBuilder`)}static build(e,t,n,r){return new ie(e,t,n,r).getDrawableElement()}},P=0,F,I=U(),L=H(),R=W(),z=L.plotColorPalette.split(`,`).map(e=>e.trim()),B=!1,V=!1;function H(){let e=f(),t=l();return v(e.xyChart,t.themeVariables.xyChart)}e(H,`getChartDefaultThemeConfig`);function U(){let e=l();return v(m.xyChart,e.xyChart)}e(U,`getChartDefaultConfig`);function W(){return{yAxis:{type:`linear`,title:``,min:1/0,max:-1/0},xAxis:{type:`band`,title:``,categories:[]},title:``,plots:[]}}e(W,`getChartDefaultData`);function G(e){let t=l();return o(e.trim(),t)}e(G,`textSanitizer`);function K(e){F=e}e(K,`setTmpSVGG`);function q(e){e===`horizontal`?I.chartOrientation=`horizontal`:I.chartOrientation=`vertical`}e(q,`setOrientation`);function J(e){R.xAxis.title=G(e.text)}e(J,`setXAxisTitle`);function Y(e,t){R.xAxis={type:`linear`,title:R.xAxis.title,min:e,max:t},B=!0}e(Y,`setXAxisRangeData`);function X(e){R.xAxis={type:`band`,title:R.xAxis.title,categories:e.map(e=>G(e.text))},B=!0}e(X,`setXAxisBand`);function oe(e){R.yAxis.title=G(e.text)}e(oe,`setYAxisTitle`);function se(e,t){R.yAxis={type:`linear`,title:R.yAxis.title,min:e,max:t},V=!0}e(se,`setYAxisRangeData`);function ce(e){let t=Math.min(...e),n=Math.max(...e),r=w(R.yAxis)?R.yAxis.min:1/0,i=w(R.yAxis)?R.yAxis.max:-1/0;R.yAxis={type:`linear`,title:R.yAxis.title,min:Math.min(r,t),max:Math.max(i,n)}}e(ce,`setYAxisRangeFromPlotData`);function Z(e){let t=[];if(e.length===0)return t;if(!B){let t=w(R.xAxis)?R.xAxis.min:1/0,n=w(R.xAxis)?R.xAxis.max:-1/0;Y(Math.min(t,1),Math.max(n,e.length))}if(C(R.xAxis)&&e.length>R.xAxis.categories.length&&(e=e.slice(0,R.xAxis.categories.length)),V||ce(e),C(R.xAxis)&&(t=R.xAxis.categories.map((t,n)=>[t,e[n]])),w(R.xAxis)){let n=R.xAxis.min,r=R.xAxis.max;if(e.length===1)t=[[`${n}`,e[0]]];else{let i=(r-n)/(e.length-1);t=e.map((e,t)=>[`${n+t*i}`,e])}}return t}e(Z,`transformDataWithoutCategory`);function Q(e){return z[e===0?0:e%z.length]}e(Q,`getPlotColorFromPalette`);function le(e,t){let n=t.map(e=>e.value),r=t.map(e=>e.label?G(e.label):``),i=Z(n),a=r.some(e=>e!==``);R.plots.push({type:`line`,strokeFill:Q(P),strokeWidth:2,data:i,...a?{pointLabels:r}:{}}),P++}e(le,`setLineData`);function $(e,t){let n=Z(t.map(e=>e.value));R.plots.push({type:`bar`,fill:Q(P),data:n}),P++}e($,`setBarData`);function ue(){if(R.plots.length===0)throw Error(`No Plot to render, please provide a plot with some data`);return R.title=a(),ae.build(I,R,L,F)}e(ue,`getDrawableElem`);function de(){return L}e(de,`getChartThemeConfig`);function fe(){return I}e(fe,`getChartConfig`);function pe(){return R}e(pe,`getXYChartData`);var me={parser:x,db:{getDrawableElem:ue,clear:e(function(){h(),P=0,I=U(),R=W(),L=H(),z=L.plotColorPalette.split(`,`).map(e=>e.trim()),B=!1,V=!1},`clear`),setAccTitle:u,getAccTitle:g,setDiagramTitle:c,getDiagramTitle:a,getAccDescription:d,setAccDescription:s,setOrientation:q,setXAxisTitle:J,setXAxisRangeData:Y,setXAxisBand:X,setYAxisTitle:oe,setYAxisRangeData:se,setLineData:le,setBarData:$,setTmpSVGG:K,getChartThemeConfig:de,getChartConfig:fe,getXYChartData:pe},renderer:{draw:e((t,r,i,a)=>{let o=a.db,s=o.getChartThemeConfig(),c=o.getChartConfig(),l=o.getXYChartData().plots[0].data.map(e=>e[1]);function u(e){return e===`top`?`text-before-edge`:`middle`}e(u,`getDominantBaseLine`);function d(e){return e===`left`?`start`:e===`right`?`end`:`middle`}e(d,`getTextAnchor`);function f(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}e(f,`getTextTransformation`),n.debug(`Rendering xychart chart +`+t);let m=_(r),h=m.append(`g`).attr(`class`,`main`),g=h.append(`rect`).attr(`width`,c.width).attr(`height`,c.height).attr(`class`,`background`);p(m,c.height,c.width,!0),m.attr(`viewBox`,`0 0 ${c.width} ${c.height}`),g.attr(`fill`,s.backgroundColor),o.setTmpSVGG(m.append(`g`).attr(`class`,`mermaid-tmp-group`));let v=o.getDrawableElem(),y={};function b(e){let t=h,n=``;for(let[r]of e.entries()){let i=h;r>0&&y[n]&&(i=y[n]),n+=e[r],t=y[n],t||=y[n]=i.append(`g`).attr(`class`,e[r])}return t}e(b,`getGroup`);for(let t of v){if(t.data.length===0)continue;let n=b(t.groupTexts);switch(t.type){case`rect`:if(n.selectAll(`rect`).data(t.data).enter().append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth),c.showDataLabel){let r=c.showDataLabelOutsideBar;if(c.chartOrientation===`horizontal`){let i=function(e,t){let{data:n,label:r}=e;return t*r.length*a<=n.width-o};e(i,`fitsHorizontally`);let a=.7,o=10,c=t.data.map((e,t)=>({data:e,label:l[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),u=c.map(e=>{let{data:t}=e,n=t.height*.7;for(;!i(e,n)&&n>0;)--n;return n}),d=Math.floor(Math.min(...u)),f=e(e=>r?e.data.x+e.data.width+10:e.data.x+e.data.width-10,`determineLabelXPosition`);n.selectAll(`text`).data(c).enter().append(`text`).attr(`x`,f).attr(`y`,e=>e.data.y+e.data.height/2).attr(`text-anchor`,r?`start`:`end`).attr(`dominant-baseline`,`middle`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${d}px`).text(e=>e.label)}else{let i=function(e,t,n){let{data:r,label:i}=e,a=t*i.length*.7,o=r.x+r.width/2,s=o-a/2,c=o+a/2,l=s>=r.x&&c<=r.x+r.width,u=r.y+n+t<=r.y+r.height;return l&&u};e(i,`fitsInBar`);let a=t.data.map((e,t)=>({data:e,label:l[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),o=a.map(e=>{let{data:t,label:n}=e,r=t.width/(n.length*.7);for(;!i(e,r,10)&&r>0;)--r;return r}),c=Math.floor(Math.min(...o)),u=e(e=>r?e.data.y-10:e.data.y+10,`determineLabelYPosition`);n.selectAll(`text`).data(a).enter().append(`text`).attr(`x`,e=>e.data.x+e.data.width/2).attr(`y`,u).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,r?`auto`:`hanging`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${c}px`).text(e=>e.label)}}break;case`text`:n.selectAll(`text`).data(t.data).enter().append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>u(e.verticalPos)).attr(`text-anchor`,e=>d(e.horizontalPos)).attr(`transform`,e=>f(e)).text(e=>e.text);break;case`path`:n.selectAll(`path`).data(t.data).enter().append(`path`).attr(`d`,e=>e.path).attr(`fill`,e=>e.fill?e.fill:`none`).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth)}}},`draw`)}};export{me as diagram}; \ No newline at end of file diff --git a/lecture-01/index.html b/lecture-01/index.html index 95c273e35e2b986c2dfeb550906cf7929bc5979e..5b4a847f121260d892ce76ee12c54bd477aa54a1 100644 --- a/lecture-01/index.html +++ b/lecture-01/index.html @@ -5,22 +5,41 @@ Introduction to Deep Learning - Slidev + + + + + + + + + + + + + + + + + + - + - + + - - - - + + + + - +
    diff --git a/lecture-01/slides.pdf b/lecture-01/slides.pdf index ef592b3e33f605fd516664a71b9254ee3b8e42e8..97a2a9ac7e5859fff3d8f7e3ffc32bc3e87143ce 100644 --- a/lecture-01/slides.pdf +++ b/lecture-01/slides.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c3cf95cb1f2bd9f6a9628af65c299ac0c10db1781c5b8058b79ff11242d878b -size 177812 +oid sha256:6c70fdf9c8b868ca6f524420fd76db602d25abac4efba65297e0b4f51b523aa0 +size 3368876