PageSourceSearch

https://bytical.ai/assets/ConsultantPage-BKHUtPoC.js

js bytical.ai collected 2026-10-05 15:29:13 UTC 1,049,780 bytes, 500 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-INFHLROL-BhufiikL.js","assets/motion-Cj3iODHr.js","assets/react-BRgkvuuS.js","assets/index-Dmosp5jH.js","assets/redux-BPGFuQZw.js","assets/index-CO98ie0Z.css","assets/consultant-CBqgK7pg.js","assets/purify.es-DedTAGkB.js","assets/rotate-ccw-DF4veGAp.js","assets/x-DuUYEEQL.js","assets/shield-check-DOf7ZY-l.js","assets/chevron-up-bYNgzf9o.js","assets/square-8ieqUkHW.js","assets/save-CjZkFFAw.js","assets/arrow-left-B5NM3SOG.js","assets/dagre-GXQ25YYZ-CMj7oEME.js","assets/layout-sFQndVRP.js","assets/swimlanes-42K2YHIH-D6ga7nIT.js","assets/cose-bilkent-JH36ORCC-i-qFadrx.js","assets/cytoscape.esm-Ix0LnXOy.js","assets/c4Diagram-7LVT6UL2-CHj2MK7X.js","assets/chunk-F27PBJKO-DhMatKpA.js","assets/flowDiagram-HODETNUW-Dvyh0QaM.js","assets/chunk-5VM5RSS4-t3s97V4d.js","assets/chunk-XXDRQBXY-ngsdKa6E.js","assets/chunk-POPQ4Y6H-BUwZ7M6Z.js","assets/channel-B7uMm_et.js","assets/swimlanesDiagram-VR7AAH4N-DmF-FRZY.js","assets/erDiagram-RLTQ6QDP-BMTgS9w0.js","assets/gitGraphDiagram-WWUBYQGX-BgTS5-fg.js","assets/chunk-2Q5K7J3B-D8QpLQo1.js","assets/chunk-JWPE2WC7-NVKcVYzZ.js","assets/cynefin-OW5HDTMX-BCD2LBBp.js","assets/ganttDiagram-EL5Y4UJY-BPjW2Fou.js","assets/linear-UBLWngqJ.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-27XIBGKW-r_DSiNTy.js","assets/pieDiagram-E7YTZNPT-f3huImdv.js","assets/arc-C72b0nC0.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AXDQQJYC-BlcaDpsQ.js","assets/xychartDiagram-S5SC5T6Z-HIt6ptGt.js","assets/requirementDiagram-BXWQKSXE-CXbjO2iH.js","assets/sequenceDiagram-WJ2MYXX4-BOhHs5BS.js","assets/classDiagram-ZZMXUADV-Bs0Yc1kf.js","assets/chunk-TICWLB2K-O_ecDqhK.js","assets/classDiagram-v2-VYDZK3BY-Bs0Yc1kf.js","assets/stateDiagram-D77RDMKH-CNV9xDFJ.js","assets/chunk-IMKFNOWR-BvZ3p3Li.js","assets/stateDiagram-v2-MP3YSRHH-DRtxD2YT.js","assets/journeyDiagram-3NMN7TZE-BF-_2nZm.js","assets/timeline-definition-24CTP7MA-PBPdIe_j.js","assets/mindmap-definition-YA3MSWOX-Dcb7vEEt.js","assets/kanban-definition-UXKFOSKX-C1gp3C8U.js","assets/sankeyDiagram-P5KCCOFB-BVMxolk0.js","assets/diagram-Z3DM3KII-CanI1eOF.js","assets/diagram-UQ7AKVKN-Bv9lAcl_.js","assets/blockDiagram-I7D4REHJ-BIdrt5T2.js","assets/diagram-S7CK7UJ4-Co_7-KH9.js","assets/architectureDiagram-5GKGNRK7-BRyPdtcz.js","assets/diagram-VSXAHHWV-B2gs0iL-.js","assets/ishikawaDiagram-5VMMS53U-DGAsis7l.js","assets/vennDiagram-4TSXK5OY-VHzRGwQl.js","assets/diagram-VX7I27RA-DD0TAdAz.js","assets/wardleyDiagram-VM6X3IG4-CwOTY0u2.js","assets/cynefinDiagram-5FMLGOSQ-DTPVYJfM.js","assets/railroadDiagram-O6MQD6OU-FywakiTA.js","assets/chunk-SVP7TREG-GHWB0v6J.js","assets/ebnfDiagram-PWID7BFC-my-utOx0.js","assets/abnfDiagram-VCTEODGH-BaiZdJzG.js","assets/pegDiagram-XKGWAZYB-BLzUt_v7.js"])))=>i.map(i=>d[i]);
2var w2=Object.defineProperty;var v2=(e,t,r)=>t in e?w2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var le=(e,t,r)=>v2(e,typeof t!="symbol"?t+"":t,r);import{j as f,A as S2,m as xd}from"./motion-Cj3iODHr.js";import{g as zs,a as V,u as Ch,f as T2,e as _2}from"./react-BRgkvuuS.js";import{r as ae,_ as Vt,E as Y,t as B2,al as Da,cO as mm,cP as ym,cQ as xm,cR as bm,cS as ms,h as L2,b as A2,cT as F2,cU as E2,k as N2,cV as bd,cW as Cd,cX as kd,cY as M2,cZ as $2,c_ as j2,c$ as wd,d0 as el,d1 as I2,d2 as D2,d3 as P2,d4 as O2,d5 as R2,d6 as q2,d7 as z2,d8 as W2,d9 as H2,da as U2,db as Y2}from"./index-Dmosp5jH.js";import{u as ee,a as kh}from"./redux-BPGFuQZw.js";import{r as vd,a as Cm,b as V2,t as G2,f as X2,g as Q2,e as K2,h as Z2,u as J2,i as tw,j as ew,s as rw,k as wh,m as iw,n as km,p as wm,o as nw,q as sw,v as aw,c as ow,w as lw,x as cw,y as hw,z as uw,A as dw,B as pw}from"./consultant-CBqgK7pg.js";import Sn from"./purify.es-DedTAGkB.js";import{R as mc,d as je,C as fw,P as li,c as Co,a as rl,b as vm,M as gw}from"./rotate-ccw-DF4veGAp.js";import{L as de,T as mr,c as ko,C as Sm,U as Tm,R as _m,S as wo,A as Pa,F as mw,X as pi,P as yw,B as xw,G as bw,b as Bm,a as Cw}from"./x-DuUYEEQL.js";import{S as Ri}from"./shield-check-DOf7ZY-l.js";import{C as Oa}from"./chevron-up-bYNgzf9o.js";import{C as ys,S as kw,a as ww}from"./square-8ieqUkHW.js";import{S as vw}from"./save-CjZkFFAw.js";import{A as Sw}from"./arrow-left-B5NM3SOG.js";/**
3 * @license lucide-react v0.513.0 - ISC
4 *
5 * This source code is licensed under the ISC license.
6 * See the LICENSE file in the root directory of this source tree.
7 */const Tw=[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2",key:"1ksdt3"}],["path",{d:"M22 13a18.15 18.15 0 0 1-20 0",key:"12hx5q"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],Ra=ae("briefcase-business",Tw);/**
8 * @license lucide-react v0.513.0 - ISC
9 *
10 * This source code is licensed under the ISC license.
11 * See the LICENSE file in the root directory of this source tree.
12 */const _w=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]],Bw=ae("calculator",_w);/**
13 * @license lucide-react v0.513.0 - ISC
14 *
15 * This source code is licensed under the ISC license.
16 * See the LICENSE file in the root directory of this source tree.
17 */const Lw=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Lm=ae("calendar",Lw);/**
18 * @license lucide-react v0.513.0 - ISC
19 *
20 * This source code is licensed under the ISC license.
21 * See the LICENSE file in the root directory of this source tree.
22 */const Aw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}
22]],Fw=ae("circle-dollar-sign",Aw);/**
23 * @license lucide-react v0.513.0 - ISC
24 *
25 * This source code is licensed under the ISC license.
26 * See the LICENSE file in the root directory of this source tree.
27 */const Ew=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],Nw=ae("circle-stop",Ew);/**
28 * @license lucide-react v0.513.0 - ISC
29 *
30 * This source code is licensed under the ISC license.
31 * See the LICENSE file in the root directory of this source tree.
32 */const Mw=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],Am=ae("clipboard-list",Mw);/**
33 * @license lucide-react v0.513.0 - ISC
34 *
35 * This source code is licensed under the ISC license.
36 * See the LICENSE file in the root directory of this source tree.
37 */const $w=[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]],jw=ae("cog",$w);/**
38 * @license lucide-react v0.513.0 - ISC
39 *
40 * This source code is licensed under the ISC license.
41 * See the LICENSE file in the root directory of this source tree.
42 */const Iw=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],Dw=ae("coins",Iw);/**
43 * @license lucide-react v0.513.0 - ISC
44 *
45 * This source code is licensed under the ISC license.
46 * See the LICENSE file in the root directory of this source tree.
47 */const Pw=[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ow=ae("compass",Pw);/**
48 * @license lucide-react v0.513.0 - ISC
49 *
50 * This source code is licensed under the ISC license.
51 * See the LICENSE file in the root directory of this source tree.
52 */const Rw=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m3 15 2 2 4-4",key:"1lhrkk"}]],qw=ae("file-check-2",Rw);/**
53 * @license lucide-react v0.513.0 - ISC
54 *
55 * This source code is licensed under the ISC license.
56 * See the LICENSE file in the root directory of this source tree.
57 */const zw=[["path",{d:"M21 7h-3a2 2 0 0 1-2-2V2",key:"9rb54x"}],["path",{d:"M21 6v6.5c0 .8-.7 1.5-1.5 1.5h-7c-.8 0-1.5-.7-1.5-1.5v-9c0-.8.7-1.5 1.5-1.5H17Z",key:"1059l0"}],["path",{d:"M7 8v8.8c0 .3.2.6.4.8.2.2.5.4.8.4H15",key:"16874u"}],["path",{d:"M3 12v8.8c0 .3.2.6.4.8.2.2.5.4.8.4H11",key:"k2ox98"}]],Ww=ae("file-stack",zw);/**
58 * @license lucide-react v0.513.0 - ISC
59 *
60 * This source code is licensed under the ISC license.
61 * See the LICENSE file in the root directory of this source tree.
62 */const Hw=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],Uw=ae("flag",Hw);/**
63 * @license lucide-react v0.513.0 - ISC
64 *
65 * This source code is licensed under the ISC license.
66 * See the LICENSE file in the root directory of this source tree.
67 */const Yw=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],vh=ae("git-branch",Yw);/**
68 * @license lucide-react v0.513.0 - ISC
69 *
70 * This source code is licensed under the ISC license.
71 * See the LICENSE file in the root directory of this source tree.
72 */const Vw=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],Sh=ae("mail",Vw);/**
73 * @license lucide-react v0.513.0 - ISC
74 *
75 * This source code is licensed under the ISC license.
76 * See the LICENSE file in the root directory of this source tree.
77 */const Gw=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],Xw=ae("maximize-2",Gw);/**
78 * @license lucide-react v0.513.0 - ISC
79 *
80 * This source code is licensed under the ISC license.
81 * See the LICENSE file in the root directory of this source tree.
82 */const Qw=[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]],Kw=ae("mic",Qw);/**
83 * @license lucide-react v0.513.0 - ISC
84 *
85 * This source code is licensed under the ISC license.
86 * See the LICENSE file in the root directory of this source tree.
87 */const Zw=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],Jw=ae("minimize-2",Zw);/**
88 * @license lucide-react v0.513.0 - ISC
89 *
90 * This source code is licensed under the ISC license.
91 * See the LICENSE file in the root directory of this source tree.
92 */const tv=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],Fm=ae("network",tv);/**
93 * @license lucide-react v0.513.0 - ISC
94 *
95 * This source code is licensed under the ISC license.
96 * See the LICENSE file in the root directory of this source tree.
97 */const ev=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],rv=ae("paperclip",ev);/**
98 * @license lucide-react v0.513.0 - ISC
99 *
100 * This source code is licensed under the ISC license.
101 * See the LICENSE file in the root directory of this source tree.
102 */const iv=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],Em=ae("pen-line",iv);/**
103 * @license lucide-react v0.513.0 - ISC
104 *
105 * This source code is licensed under the ISC license.
106 * See the LICENSE file in the root directory of this source tree.
107 */const nv=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 
1070 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],sv=ae("phone",nv);/**
108 * @license lucide-react v0.513.0 - ISC
109 *
110 * This source code is licensed under the ISC license.
111 * See the LICENSE file in the root directory of this source tree.
112 */const av=[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]],ov=ae("receipt",av);/**
113 * @license lucide-react v0.513.0 - ISC
114 *
115 * This source code is licensed under the ISC license.
116 * See the LICENSE file in the root directory of this source tree.
117 */const lv=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],cv=ae("send-horizontal",lv);/**
118 * @license lucide-react v0.513.0 - ISC
119 *
120 * This source code is licensed under the ISC license.
121 * See the LICENSE file in the root directory of this source tree.
122 */const hv=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],qa=ae("send",hv);/**
123 * @license lucide-react v0.513.0 - ISC
124 *
125 * This source code is licensed under the ISC license.
126 * See the LICENSE file in the root directory of this source tree.
127 */const uv=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],dv=ae("shield-alert",uv);/**
128 * @license lucide-react v0.513.0 - ISC
129 *
130 * This source code is licensed under the ISC license.
131 * See the LICENSE file in the root directory of this source tree.
132 */const pv=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],fv=ae("workflow",pv);/**
133 * @license lucide-react v0.513.0 - ISC
134 *
135 * This source code is licensed under the ISC license.
136 * See the LICENSE file in the root directory of this source tree.
137 */const gv=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],mv=ae("zap",gv);/**
138 * @license lucide-react v0.513.0 - ISC
139 *
140 * This source code is licensed under the ISC license.
141 * See the LICENSE file in the root directory of this source tree.
142 */const yv=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],xv=ae("zoom-in",yv);/**
143 * @license lucide-react v0.513.0 - ISC
144 *
145 * This source code is licensed under the ISC license.
146 * See the LICENSE file in the root directory of this source tree.
147 */const bv=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],Cv=ae("zoom-out",bv),Nm=e=>{if(!e||typeof e!="string")return null;try{return JSON.parse(e)}catch{}const t=[];let r=!1,i=!1;for(let s=0;s<e.length;s+=1){const a=e[s];if(r){i?i=!1:a==="\\"?i=!0:a==='"'&&(r=!1);continue}a==='"'?r=!0:a==="{"||a==="["?t.push(a):(a==="}"||a==="]")&&t.pop()}let n=e;for(r&&(n+='"'),n=n.replace(/,\s*$/,"");t.length;){const s=t.pop();n+=s==="{"?"}":"]"}try{return JSON.parse(n)}catch{return null}},kv=(e,t)=>{const r=Nm(e);if(r&&typeof r=="object"&&typeof r[t]=="string")return r[t];const n=new RegExp(`"${t}"\\s*:\\s*"((?:[^"\\\\]|\\\\.)*)`).exec(e);return n?n[1]:null};function wv(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const vv=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Sv=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Tv={};function Sd(e,t){return(Tv.jsx?Sv:vv).test(e)}const _v=/[ \t\n\f\r]/g;function Bv(e){return typeof e=="object"?e.type==="text"?Td(e.value):!1:Td(e)}function Td(e){return e.replace(_v,"")===""}let Ws=class{constructor(t,r,i){this.normal=r,this.property=t,i&&
vendor: 5,370 bytes, line 147
147(this.space=i)}};Ws.prototype.normal={};Ws.prototype.property={};Ws.prototype.space=void 0;function Mm(e,t){const r={},i={};for(const n of e)Object.assign(r,n.property),Object.assign(i,n.normal);return new Ws(r,i,t)}function yc(e){return e.toLowerCase()}class Qe{constructor(t,r){this.attribute=r,this.property=t}}Qe.prototype.attribute="";Qe.prototype.booleanish=!1;Qe.prototype.boolean=!1;Qe.prototype.commaOrSpaceSeparated=!1;Qe.prototype.commaSeparated=!1;Qe.prototype.defined=!1;Qe.prototype.mustUseProperty=!1;Qe.prototype.number=!1;Qe.prototype.overloadedBoolean=!1;Qe.prototype.property="";Qe.prototype.spaceSeparated=!1;Qe.prototype.space=void 0;let Lv=0;const Ut=qi(),ke=qi(),xc=qi(),Ct=qi(),ce=qi(),Li=qi(),Ze=qi();function qi(){return 2**++Lv}const bc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ut,booleanish:ke,commaOrSpaceSeparated:Ze,commaSeparated:Li,number:Ct,overloadedBoolean:xc,spaceSeparated:ce},Symbol.toStringTag,{value:"Module"})),il=Object.keys(bc);class Th extends Qe{constructor(t,r,i,n){let s=-1;if(super(t,r),_d(this,"space",n),typeof i=="number")for(;++s<il.length;){const a=il[s];_d(this,il[s],(i&bc[a])===bc[a])}}}Th.prototype.defined=!0;function _d(e,t,r){r&&(e[t]=r)}function Nn(e){const t={},r={};for(const[i,n]of Object.entries(e.properties)){const s=new Th(i,e.transform(e.attributes||{},i),n,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),t[i]=s,r[yc(i)]=i,r[yc(s.attribute)]=i}return new Ws(t,r,e.space)}const $m=Nn({properties:{ariaActiveDescendant:null,ariaAtomic:ke,ariaAutoComplete:null,ariaBusy:ke,ariaChecked:ke,ariaColCount:Ct,ariaColIndex:Ct,ariaColSpan:Ct,ariaControls:ce,ariaCurrent:null,ariaDescribedBy:ce,ariaDetails:null,ariaDisabled:ke,ariaDropEffect:ce,ariaErrorMessage:null,ariaExpanded:ke,ariaFlowTo:ce,ariaGrabbed:ke,ariaHasPopup:null,ariaHidden:ke,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ce,ariaLevel:Ct,ariaLive:null,ariaModal:ke,ariaMultiLine:ke,ariaMultiSelectable:ke,ariaOrientation:null,ariaOwns:ce,ariaPlaceholder:null,ariaPosInSet:Ct,ariaPressed:ke,ariaReadOnly:ke,ariaRelevant:null,ariaRequired:ke,ariaRoleDescription:ce,ariaRowCount:Ct,ariaRowIndex:Ct,ariaRowSpan:Ct,ariaSelected:ke,ariaSetSize:Ct,ariaSort:null,ariaValueMax:Ct,ariaValueMin:Ct,ariaValueNow:Ct,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function jm(e,t){return t in e?e[t]:t}function Im(e,t){return jm(e,t.toLowerCase())}const Av=Nn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Li,acceptCharset:ce,accessKey:ce,action:null,allow:null,allowFullScreen:Ut,allowPaymentRequest:Ut,allowUserMedia:Ut,alpha:Ut,alt:null,as:null,async:Ut,autoCapitalize:null,autoComplete:ce,autoFocus:Ut,autoPlay:Ut,blocking:ce,capture:null,charSet:null,checked:Ut,cite:null,className:ce,closedBy:null,colorSpace:null,cols:Ct,colSpan:Ct,command:null,commandFor:null,content:null,contentEditable:ke,controls:Ut,controlsList:ce,coords:Ct|Li,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ut,defer:Ut,dir:null,dirName:null,disabled:Ut,download:xc,draggable:ke,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ut,formTarget:null,headers:ce,height:Ct,hidden:xc,high:Ct,href:null,hrefLang:null,htmlFor:ce,httpEquiv:ce,id:null,imageSizes:null,imageSrcSet:null,inert:Ut,inputMode:null,integrity:null,is:null,isMap:Ut,itemId:null,itemProp:ce,itemRef:ce,itemScope:Ut,itemType:ce,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ut,low:Ct,manifest:null,max:null,maxLength:Ct,media:null,method:null,min:null,minLength:Ct,multiple:Ut,muted:Ut,name:null,nonce:null,noModule:Ut,noValidate:Ut,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ut,optimum:Ct,pattern:null,ping:ce,placeholder:null,playsInl
147ine:Ut,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ut,referrerPolicy:null,rel:ce,required:Ut,reversed:Ut,rows:Ct,rowSpan:Ct,sandbox:ce,scope:null,scoped:Ut,seamless:Ut,selected:Ut,shadowRootClonable:Ut,shadowRootCustomElementRegistry:Ut,shadowRootDelegatesFocus:Ut,shadowRootMode:null,shadowRootSerializable:Ut,shape:null,size:Ct,sizes:null,slot:null,span:Ct,spellCheck:ke,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ct,step:null,style:null,tabIndex:Ct,target:null,title:null,translate:null,type:null,typeMustMatch:Ut,useMap:null,value:ke,width:Ct,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ce,axis:null,background:null,bgColor:null,border:Ct,borderColor:null,bottomMargin:Ct,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ut,declare:Ut,event:null,face:null,frame:null,frameBorder:null,hSpace:Ct,leftMargin:Ct,link:null,longDesc:null,lowSrc:null,marginHeight:Ct,marginWidth:Ct,noResize:Ut,noHref:Ut,noShade:Ut,noWrap:Ut,object:null,profile:null,prompt:null,rev:null,rightMargin:Ct,rules:null,scheme:null,scrolling:ke,standby:null,summary:null,text:null,topMargin:Ct,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ct,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ut,disablePictureInPicture:Ut,disableRemotePlayback:Ut,exportParts:Li,part:ce,prefix:null,property:null,results:Ct,security:null,unselectable:null},space:"html",transform:Im}),Fv=Nn({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav
147-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ze,accentHeight:Ct,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ct,amplitude:Ct,arabicForm:null,ascent:Ct,attributeName:null,attributeType:null,azimuth:Ct,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ct,by:null,calcMode:null,capHeight:Ct,className:ce,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ct,diffuseConstant:Ct,direction:null,display:null,dur:null,divisor:Ct,dominantBaseline:null,download:Ut,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ct,enableBackground:null,end:null,event:null,exponent:Ct,externalResourcesRequired:null,fill:null,fillOpacity:Ct,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Li,g2:Li,glyphName:Li,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ct,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ct,horizOriginX:Ct,horizOriginY:Ct,id:null,ideographic:Ct,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ct,k:Ct,k1:Ct,k2:Ct,k3:Ct,k4:Ct,kernelMatrix:Ze,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ct,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ct,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
vendor: 5,482 bytes, lines 147-148
147Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ct,overlineThickness:Ct,paintOrder:null,panose1:null,path:null,pathLength:Ct,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ce,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ct,pointsAtY:Ct,pointsAtZ:Ct,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ze,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ze,rev:Ze,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ze,requiredFeatures:Ze,requiredFonts:Ze,requiredFormats:Ze,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ct,specularExponent:Ct,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ct,strikethroughThickness:Ct,string:null,stroke:null,strokeDashArray:Ze,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ct,strokeOpacity:Ct,strokeWidth:null,style:null,surfaceScale:Ct,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ze,tabIndex:Ct,tableValues:null,target:null,targetX:Ct,targetY:Ct,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ze,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ct,underlineThickness:Ct,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ct,values:null,vAlphabetic:Ct,vMathematical:Ct,vectorEffect:null,vHanging:Ct,vIdeographic:Ct,version:null,vertAdvY:Ct,vertOriginX:Ct,vertOriginY:Ct,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ct,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:jm}),Dm=Nn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Pm=Nn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Im}),Om=Nn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ev={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Nv=/[A-Z]/g,Bd=/-[a-z]/g,Mv=/^data[-\w.:]+$/i;function $v(e,t){const r=yc(t);let i=t,n=Qe;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&Mv.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Bd,Iv);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Bd.test(s)){let a=s.replace(Nv,jv);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}n=Th}return new n(i,t)}function jv(e){return"-"+e.toLowerCase()}function Iv(e){return e.charAt(1).toUpperCase()}const Dv=Mm([$m,Av,Dm,Pm,Om],"html"),_h=Mm([$m,Fv,Dm,Pm,Om],"svg");function Pv(e){return e.join(" ").trim()}var Vi={},nl,Ld;function Ov(){if(Ld)return nl;Ld=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,n=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,l=`
148`,c="/",h="*",u="",p="comment",d="declaration";function g(C,x){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];x=x||{};var w=1,k=1;function v(I){var j=I.match(t);j&&(w+=j.length);var A=I.lastIndexOf(l);k=~A?I.length-A:k+I.length}function T(){var I={line:w,column:k};return function(j){return j.position=new L(I),W(),j}}function L(I){this.start=I,this.end={line:w,column:k},this.source=x.source}L.prototype.content=C;function D(I){var j=new Error(x.source+":"+w+":"+k+": "+I);if(j.reason=I,j.filename=x.source,j.line=w,j.column=k,j.source=C,!x.silent)throw j}function M(I){var j=I.exec(C);if(j){var A=j[0];return v(A),C=C.slice(A.length),j}}function W(){M(r)}function E(I){var j;for(I=I||[];j=N();)j!==!1&&I.push(j);return I}function N(){var I=T();if(!(c!=C.charAt(0)||h!=C.charAt(1))){for(var j=2;u!=C.charAt(j)&&(h!=C.charAt(j)||c!=C.charAt(j+1));)++j;if(j+=2,u===C.charAt(j-1))return D("End of comment missing");var A=C.slice(2,j-2);return k+=2,v(A),C=C.slice(j),k+=2,I({type:p,comment:A})}}function z(){var I=T(),j=M(i);if(j){if(N(),!M(n))return D("property missing ':'");var A=M(s),R=I({type:d,property:y(j[0].replace(e,u)),value:A?y(A[0].replace(e,u)):u});return M(a),R}}function O(){var I=[];E(I);for(var j;j=z();)j!==!1&&(I.push(j),E(I));return I}return W(),O()}function y(C){return C?C.replace(o,u):u}return nl=g,nl}var Ad;function Rv(){if(Ad)return Vi;Ad=1;var e=Vi&&Vi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.default=r;const t=e(Ov());function r(i,n){let s=null;
vendor: 3,608 bytes, line 148
148if(!i||typeof i!="string")return s;const a=(0,t.default)(i),o=typeof n=="function";return a.forEach(l=>{if(l.type!=="declaration")return;const{property:c,value:h}=l;o?n(c,h,l):h&&(s=s||{},s[c]=h)}),s}return Vi}var qn={},Fd;function qv(){if(Fd)return qn;Fd=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,n=/^-(ms)-/,s=function(c){return!c||r.test(c)||e.test(c)},a=function(c,h){return h.toUpperCase()},o=function(c,h){return"".concat(h,"-")},l=function(c,h){return h===void 0&&(h={}),s(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(n,o):c=c.replace(i,o),c.replace(t,a))};return qn.camelCase=l,qn}var zn,Ed;function zv(){if(Ed)return zn;Ed=1;var e=zn&&zn.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},t=e(Rv()),r=qv();function i(n,s){var a={};return!n||typeof n!="string"||(0,t.default)(n,function(o,l){o&&l&&(a[(0,r.camelCase)(o,s)]=l)}),a}return i.default=i,zn=i,zn}var Wv=zv();const Hv=zs(Wv),Rm=qm("end"),Bh=qm("start");function qm(e){return t;function t(r){const i=r&&r.position&&r.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function Uv(e){const t=Bh(e),r=Rm(e);if(t&&r)return{start:t,end:r}}function xs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Nd(e.position):"start"in e||"end"in e?Nd(e):"line"in e||"column"in e?Cc(e):""}function Cc(e){return Md(e&&e.line)+":"+Md(e&&e.column)}function Nd(e){return Cc(e&&e.start)+"-"+Cc(e&&e.end)}function Md(e){return e&&typeof e=="number"?e:1}class De extends Error{constructor(t,r,i){super(),typeof r=="string"&&(i=r,r=void 0);let n="",s={},a=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof t=="string"?n=t:!s.cause&&t&&(a=!0,n=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof i=="string"){const l=i.indexOf(":");l===-1?s.ruleId=i:(s.source=i.slice(0,l),s.ruleId=i.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=n,this.line=o?o.line:void 0,this.name=xs(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}De.prototype.file="";De.prototype.name="";De.prototype.reason="";De.prototype.message="";De.prototype.stack="";De.prototype.column=void 0;De.prototype.line=void 0;De.prototype.ancestors=void 0;De.prototype.cause=void 0;De.prototype.fatal=void 0;De.prototype.place=void 0;De.prototype.ruleId=void 0;De.prototype.source=void 0;const Lh={}.hasOwnProperty,Yv=new Map,Vv=/[A-Z]/g,Gv=new Set(["table","tbody","thead","tfoot","tr"]),Xv=new Set(["td","th"]),zm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Qv(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=nS(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 10,529 bytes, line 148
148if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=iS(r,t.jsx,t.jsxs)}const n={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?_h:Dv,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Wm(n,e,void 0);return s&&typeof s!="string"?s:n.create(e,n.Fragment,{children:s||void 0},void 0)}function Wm(e,t,r){if(t.type==="element")return Kv(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Zv(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return tS(e,t,r);if(t.type==="mdxjsEsm")return Jv(e,t);if(t.type==="root")return eS(e,t,r);if(t.type==="text")return rS(e,t)}function Kv(e,t,r){const i=e.schema;let n=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(n=_h,e.schema=n),e.ancestors.push(t);const s=Um(e,t.tagName,!1),a=sS(e,t);let o=Fh(e,t);return Gv.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!Bv(l):!0})),Hm(e,a,s,t),Ah(a,o),e.ancestors.pop(),e.schema=i,e.create(t,s,a,r)}function Zv(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}As(e,t.position)}function Jv(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);As(e,t.position)}function tS(e,t,r){const i=e.schema;let n=i;t.name==="svg"&&i.space==="html"&&(n=_h,e.schema=n),e.ancestors.push(t);const s=t.name===null?e.Fragment:Um(e,t.name,!0),a=aS(e,t),o=Fh(e,t);return Hm(e,a,s,t),Ah(a,o),e.ancestors.pop(),e.schema=i,e.create(t,s,a,r)}function eS(e,t,r){const i={};return Ah(i,Fh(e,t)),e.create(t,e.Fragment,i,r)}function rS(e,t){return t.value}function Hm(e,t,r,i){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=i)}function Ah(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function iS(e,t,r){return i;function i(n,s,a,o){const c=Array.isArray(a.children)?r:t;return o?c(s,a,o):c(s,a)}}function nS(e,t){return r;function r(i,n,s,a){const o=Array.isArray(s.children),l=Bh(i);return t(n,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function sS(e,t){const r={};let i,n;for(n in t.properties)if(n!=="children"&&Lh.call(t.properties,n)){const s=oS(e,n,t.properties[n]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&Xv.has(t.tagName)?i=o:r[a]=o}}if(i){const s=r.style||(r.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return r}function aS(e,t){const r={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const s=i.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(r,e.evaluater.evaluateExpression(o.argument))}else As(e,t.position);else{const n=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const o=i.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else As(e,t.position);else s=i.value===null?!0:i.value;r[n]=s}return r}function Fh(e,t){const r=[];let i=-1;const n=e.passKeys?new Map:Yv;for(;++i<t.children.length;){const s=t.children[i];let a;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=n.get(l)||0;a=l+"-"+c,n.set(l,c+1)}}const o=Wm(e,s,a);o!==void 0&&r.push(o)}return r}function oS(e,t,r){const i=$v(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=i.commaSeparated?wv(r):Pv(r)),i.property==="style"){let n=typeof r=="object"?r:lS(e,String(r));return e.stylePropertyNameCase==="css"&&(n=cS(n)),["style",n]}return[e.elementAttributeNameCase==="react"&&i.space?Ev[i.property]||i.property:i.attribute,r]}}function lS(e,t){try{return Hv(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,n=new De("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=zm+"#cannot-parse-style-attribute",n}}function Um(e,t,r){let i;if(!r)i={type:"Literal",value:t};else if(t.includes(".")){const n=t.split(".");let s=-1,a;for(;++s<n.length;){const o=Sd(n[s])?{type:"Identifier",name:n[s]}:{type:"Literal",value:n[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}i=a}else i=Sd(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const n=i.value;return Lh.call(e.components,n)?e.components[n]:n}if(e.evaluater)return e.evaluater.evaluateExpression(i);As(e)}function As(e,t){const r=new De("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=zm+"#cannot-handle-mdx-estrees-without-createevaluater",r}function cS(e){const t={};let r;for(r in e)Lh.call(e,r)&&(t[hS(r)]=e[r]);return t}function hS(e){let t=e.replace(Vv,uS);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function uS(e){return"-"+e.toLowerCase()}const sl={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},dS={};function Eh(e,t){const r=dS,i=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,n=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Ym(e,i,n)}function Ym(e,t,r){if(pS(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return $d(e.children,t,r)}return Array.isArray(e)?$d(e,t,r):""}function $d(e,t,r){const i=[];let n=-1;for(;++n<e.length;)i[n]=Ym(e[n],t,r);return i.join("")}function pS(e){return!!(e&&typeof e=="object")}const jd=document.createElement("i");function Nh(e){const t="&"+e+";";jd.innerHTML=t;const r=jd.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Je(e,t,r,i){const n=e.length;let s=0,a;if(t<0?t=-t>n?0:n+t:t=t>n?n:t,r=r>0?r:0,i.length<1e4)a=Array.from(i),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);s<i.length;)a=i.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function ir(e,t){return e.length>0?(Je(e,e.length,0,t),e):t}const Id={}.hasOwnProperty;function Vm(e){const t={};let r=-1;for(;++r<e.length;)fS(t,e[r]);return t}function fS(e,t){let r;for(r in t){const n=(Id.call(e,r)?e[r]:void 0)||(e[r]={}),s=t[r];let a;if(s)for(a in s){Id.call(n,a)||(n[a]=[]);const o=s[a];gS(n[a],Array.isArray(o)?o:o?[o]:[])}}}function gS(e,t){let r=-1;const i=[];for(;++r<t.length;)(t[r].add==="after"?e:i).push(t[r]);Je(e,0,0,i)}function Gm(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function fr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ze=fi(/[A-Za-z]/),$e=fi(/[\dA-Za-z]/),mS=fi(/[#-'*+\--9=?A-Z^-~]/);function za(e){return e!==null&&(e<32||e===127)}const kc=fi(/\d/),yS=fi(/[\dA-Fa-f]/),xS=fi(/[!-/:-@[-`{-~]/);function Rt(e){return e!==null&&e<-2}function he(e){return e!==null&&(e<0||e===32)}function Xt(e){return e===-2||e===-1||e===32}const vo=fi(new RegExp("\\p{P}|\\p{S}","u")),Ei=fi(/\s/);function fi(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Mn(e){const t=[];let r=-1,i=0,n=0;for(;++r<e.length;){const s=e.charCodeAt(r);let a="";if(s===37&&$e(e.charCodeAt(r+1))&&$e(e.charCodeAt(r+2)))n=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(r+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),n=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(i,r),encodeURIComponent(a)),i=r+n+1,a=""),n&&(r+=n,n=0)}return t.join("")+e.slice(i)}function Jt(e,t,r,i){const n=i?i-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return Xt(l)?(e.enter(r),o(l)):t(l)}function o(l){return Xt(l)&&s++<n?(e.consume(l),o):(e.exit(r),t(l))}}const bS={tokenize:CS};function CS(e){const t=e.attempt(this.parser.constructs.contentInitial,i,n);let r;return t;function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Jt(e,t,"linePrefix")}function n(o){return e.enter("paragraph"),s(o)}function s(o){const l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return Rt(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const kS={tokenize:wS},Dd={tokenize:vS};function wS(e){const t=this,r=[];let i=0,n,s,a;return o;function o(k){if(i<r.length){const v=r[i];return t.containerState=v[1],e.attempt(v[0].continuation,l,c)(k)}return c(k)}function l(k){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&w();const v=t.events.length;let T=v,L;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){L=t.events[T][1].end;break}x(i);let D=v;for(;D<t.events.length;)t.events[D][1].end={...L},D++;return Je(t.events,T+1,0,t.events.slice(v)),t.events.length=D,c(k)}return o(k)}function c(k){if(i===r.length){if(!n)return p(k);if(n.currentConstruct&&n.currentConstruct.concrete)return g(k);t.interrupt=!!(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Dd,h,u)(k)}function h(k){return n&&w(),x(i),p(k)}function u(k){return t.parser.lazy[t.now().line]=i!==r.length,a=t.now().offset,g(k)}function p(k){return t.containerState={},e.attempt(Dd,d,g)(k)}function d(k){return i++,r.push([t.currentConstruct,t.containerState]),p(k)}function g(k){if(k===null){n&&w(),x(0),e.consume(k);return}return n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:n,contentType:"flow",previous:s}),y(k)}function y(k){if(k===null){C(e.exit("chunkFlow"),!0),x(0),e.consume(k);return}return Rt(k)?(e.consume(k),C(e.exit("chunkFlow")),i=0,t.interrupt=void 0,o):(e.consume(k),y)}function C(k,v){const T=t.sliceStream(k);
vendor: 6,563 bytes, line 148
148if(v&&T.push(null),k.previous=s,s&&(s.next=k),s=k,n.defineSkip(k.start),n.write(T),t.parser.lazy[k.start.line]){let L=n.events.length;for(;L--;)if(n.events[L][1].start.offset<a&&(!n.events[L][1].end||n.events[L][1].end.offset>a))return;const D=t.events.length;let M=D,W,E;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){if(W){E=t.events[M][1].end;break}W=!0}for(x(i),L=D;L<t.events.length;)t.events[L][1].end={...E},L++;Je(t.events,M+1,0,t.events.slice(D)),t.events.length=L}}function x(k){let v=r.length;for(;v-- >k;){const T=r[v];t.containerState=T[1],T[0].exit.call(t,e)}r.length=k}function w(){n.write([null]),s=void 0,n=void 0,t.containerState._closeFlow=void 0}}function vS(e,t,r){return Jt(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Tn(e){if(e===null||he(e)||Ei(e))return 1;if(vo(e))return 2}function So(e,t,r){const i=[];let n=-1;for(;++n<e.length;){const s=e[n].resolveAll;s&&!i.includes(s)&&(t=s(t,r),i.push(s))}return t}const wc={name:"attention",resolveAll:SS,tokenize:TS};function SS(e,t){let r=-1,i,n,s,a,o,l,c,h;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(i=r;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[i][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[i][1].end.offset-e[i][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const u={...e[i][1].end},p={...e[r][1].start};Pd(u,-l),Pd(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:u,end:{...e[i][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:p},s={type:l>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[r][1].start}},n={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[i][1].end={...a.start},e[r][1].start={...o.end},c=[],e[i][1].end.offset-e[i][1].start.offset&&(c=ir(c,[["enter",e[i][1],t],["exit",e[i][1],t]])),c=ir(c,[["enter",n,t],["enter",a,t],["exit",a,t],["enter",s,t]]),c=ir(c,So(t.parser.constructs.insideSpan.null,e.slice(i+1,r),t)),c=ir(c,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",n,t]]),e[r][1].end.offset-e[r][1].start.offset?(h=2,c=ir(c,[["enter",e[r][1],t],["exit",e[r][1],t]])):h=0,Je(e,i-1,r-i+3,c),r=i+c.length-h-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function TS(e,t){const r=this.parser.constructs.attentionMarkers.null,i=this.previous,n=Tn(i);let s;return a;function a(l){return s=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===s)return e.consume(l),o;const c=e.exit("attentionSequence"),h=Tn(l),u=!h||h===2&&n||r.includes(l),p=!n||n===2&&h||r.includes(i);return c._open=!!(s===42?u:u&&(n||!p)),c._close=!!(s===42?p:p&&(h||!u)),t(l)}}function Pd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const _S={name:"autolink",tokenize:BS};function BS(e,t,r){let i=0;return n;function n(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(d){return ze(d)?(e.consume(d),a):d===64?r(d):c(d)}function a(d){return d===43||d===45||d===46||$e(d)?(i=1,o(d)):c(d)}function o(d){return d===58?(e.consume(d),i=0,l):(d===43||d===45||d===46||$e(d))&&i++<32?(e.consume(d),o):(i=0,c(d))}function l(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||za(d)?r(d):(e.consume(d),l)}function c(d){return d===64?(e.consume(d),h):mS(d)?(e.consume(d),c):r(d)}function h(d){return $e(d)?u(d):r(d)}function u(d){return d===46?(e.consume(d),i=0,h):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||$e(d))&&i++<63){const g=d===45?p:u;return e.consume(d),g}return r(d)}}const Hs={partial:!0,tokenize:LS};function LS(e,t,r){return i;function i(s){return Xt(s)?Jt(e,n,"linePrefix")(s):n(s)}function n(s){return s===null||Rt(s)?t(s):r(s)}}const Xm={continuation:{tokenize:FS},exit:ES,name:"blockQuote",tokenize:AS};function AS(e,t,r){const i=this;return n;function n(a){if(a===62){const o=i.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return r(a)}function s(a){return Xt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function FS(e,t,r){const i=this;return n;function n(a){return Xt(a)?Jt(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(Xm,t,r)(a)}}function ES(e){e.exit("blockQuote")}const Qm={name:"characterEscape",tokenize:NS};function NS(e,t,r){return i;function i(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),n}function n(s){return xS(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(s)}}const Km={name:"characterReference",tokenize:MS};function MS(e,t,r){const i=this;let n=0,s,a;return o;function o(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),l}function l(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,a=$e,h(u))}function c(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=yS,h):(e.enter("characterReferenceValue"),s=7,a=kc,h(u))}function h(u){if(u===59&&n){const p=e.exit("characterReferenceValue");return a===$e&&!Nh(i.sliceSerialize(p))?r(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(u)&&n++<s?(e.consume(u),h):r(u)}}const Od={partial:!0,tokenize:jS},Rd={concrete:!0,name:"codeFenced",tokenize:$S};function $S(e,t,r){const i=this,n={partial:!0,tokenize:T};let s=0,a=0,o;return l;function l(L){return c(L)}function c(L){const D=i.events[i.events.length-1];
vendor: 12,032 bytes, line 148
148return s=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,o=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(L)}function h(L){return L===o?(a++,e.consume(L),h):a<3?r(L):(e.exit("codeFencedFenceSequence"),Xt(L)?Jt(e,u,"whitespace")(L):u(L))}function u(L){return L===null||Rt(L)?(e.exit("codeFencedFence"),i.interrupt?t(L):e.check(Od,y,v)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(L))}function p(L){return L===null||Rt(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(L)):Xt(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Jt(e,d,"whitespace")(L)):L===96&&L===o?r(L):(e.consume(L),p)}function d(L){return L===null||Rt(L)?u(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(L))}function g(L){return L===null||Rt(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(L)):L===96&&L===o?r(L):(e.consume(L),g)}function y(L){return e.attempt(n,v,C)(L)}function C(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),x}function x(L){return s>0&&Xt(L)?Jt(e,w,"linePrefix",s+1)(L):w(L)}function w(L){return L===null||Rt(L)?e.check(Od,y,v)(L):(e.enter("codeFlowValue"),k(L))}function k(L){return L===null||Rt(L)?(e.exit("codeFlowValue"),w(L)):(e.consume(L),k)}function v(L){return e.exit("codeFenced"),t(L)}function T(L,D,M){let W=0;return E;function E(j){return L.enter("lineEnding"),L.consume(j),L.exit("lineEnding"),N}function N(j){return L.enter("codeFencedFence"),Xt(j)?Jt(L,z,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):z(j)}function z(j){return j===o?(L.enter("codeFencedFenceSequence"),O(j)):M(j)}function O(j){return j===o?(W++,L.consume(j),O):W>=a?(L.exit("codeFencedFenceSequence"),Xt(j)?Jt(L,I,"whitespace")(j):I(j)):M(j)}function I(j){return j===null||Rt(j)?(L.exit("codeFencedFence"),D(j)):M(j)}}}function jS(e,t,r){const i=this;return n;function n(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return i.parser.lazy[i.now().line]?r(a):t(a)}}const al={name:"codeIndented",tokenize:DS},IS={partial:!0,tokenize:PS};function DS(e,t,r){const i=this;return n;function n(c){return e.enter("codeIndented"),Jt(e,s,"linePrefix",5)(c)}function s(c){const h=i.events[i.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(c):r(c)}function a(c){return c===null?l(c):Rt(c)?e.attempt(IS,a,l)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||Rt(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),o)}function l(c){return e.exit("codeIndented"),t(c)}}function PS(e,t,r){const i=this;return n;function n(a){return i.parser.lazy[i.now().line]?r(a):Rt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n):Jt(e,s,"linePrefix",5)(a)}function s(a){const o=i.events[i.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):Rt(a)?n(a):r(a)}}const OS={name:"codeText",previous:qS,resolve:RS,tokenize:zS};function RS(e){let t=e.length-4,r=3,i,n;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=r;++i<t;)if(e[i][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(i=r-1,t++;++i<=t;)n===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(n=i):(i===t||e[i][1].type==="lineEnding")&&(e[n][1].type="codeTextData",i!==n+2&&(e[n][1].end=e[i-1][1].end,e.splice(n+2,i-n-2),t-=i-n-2,i=n+2),n=void 0);return e}function qS(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function zS(e,t,r){let i=0,n,s;return a;function a(u){return e.enter("codeText"),e.enter("codeTextSequence"),o(u)}function o(u){return u===96?(e.consume(u),i++,o):(e.exit("codeTextSequence"),l(u))}function l(u){return u===null?r(u):u===32?(e.enter("space"),e.consume(u),e.exit("space"),l):u===96?(s=e.enter("codeTextSequence"),n=0,h(u)):Rt(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(u))}function c(u){return u===null||u===32||u===96||Rt(u)?(e.exit("codeTextData"),l(u)):(e.consume(u),c)}function h(u){return u===96?(e.consume(u),n++,h):n===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(u)):(s.type="codeTextData",c(u))}}class WS{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const i=r??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,r,i){const n=r||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return i&&Wn(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Wn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Wn(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);Wn(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Wn(this.left,r.reverse())}}}function Wn(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function Zm(e){const t={};let r=-1,i,n,s,a,o,l,c;const h=new WS(e);for(;++r<h.length;){for(;r in t;)r=t[r];if(i=h.get(r),r&&i[1].type==="chunkFlow"&&h.get(r-1)[1].type==="listItemPrefix"&&(l=i[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,HS(h,r)),r=t[r],c=!0);else if(i[1]._container){for(s=r,n=void 0;s--;)if(a=h.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(n&&(h.get(n)[1].type="lineEndingBlank"),a[1].type="lineEnding",n=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;n&&(i[1].end={...h.get(n)[1].start},o=h.slice(n,r),o.unshift(i),h.splice(n,r-n+1,o))}}return Je(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function HS(e,t){const r=e.get(t)[1],i=e.get(t)[2];let n=t-1;const s=[];let a=r._tokenizer;a||(a=i.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,l=[],c={};let h,u,p=-1,d=r,g=0,y=0;const C=[y];for(;d;){for(;e.get(++n)[1]!==d;);s.push(n),d._tokenizer||(h=i.sliceStream(d),d.next||h.push(null),u&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(h),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),u=d,d=d.next}for(d=r;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(y=p+1,C.push(y),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):C.pop(),p=C.length;p--;){const x=o.slice(C[p],C[p+1]),w=s.pop();l.push([w,w+x.length-1]),e.splice(w,2,x)}for(l.reverse(),p=-1;++p<l.length;)c[g+l[p][0]]=g+l[p][1],g+=l[p][1]-l[p][0]-1;return c}const US={resolve:VS,tokenize:GS},YS={partial:!0,tokenize:XS};function VS(e){return Zm(e),e}function GS(e,t){let r;return i;function i(o){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(o)}function n(o){return o===null?s(o):Rt(o)?e.check(YS,a,s)(o):(e.consume(o),n)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}function XS(e,t,r){const i=this;return n;function n(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Jt(e,s,"linePrefix")}function s(a){if(a===null||Rt(a))return r(a);const o=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(i.parser.constructs.flow,r,t)(a)}}function Jm(e,t,r,i,n,s,a,o,l){const c=l||Number.POSITIVE_INFINITY;let h=0;return u;function u(x){return x===60?(e.enter(i),e.enter(n),e.enter(s),e.consume(x),e.exit(s),p):x===null||x===32||x===41||za(x)?r(x):(e.enter(i),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),y(x))}function p(x){return x===62?(e.enter(s),e.consume(x),e.exit(s),e.exit(n),e.exit(i),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),d(x))}function d(x){return x===62?(e.exit("chunkString"),e.exit(o),p(x)):x===null||x===60||Rt(x)?r(x):(e.consume(x),x===92?g:d)}function g(x){return x===60||x===62||x===92?(e.consume(x),d):d(x)}function y(x){return!h&&(x===null||x===41||he(x))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(i),t(x)):h<c&&x===40?(e.consume(x),h++,y):x===41?(e.consume(x),h--,y):x===null||x===32||x===40||za(x)?r(x):(e.consume(x),x===92?C:y)}function C(x){return x===40||x===41||x===92?(e.consume(x),y):y(x)}}function ty(e,t,r,i,n,s){const a=this;let o=0,l;return c;function c(d){return e.enter(i),e.enter(n),e.consume(d),e.exit(n),e.enter(s),h}function h(d){return o>999||d===null||d===91||d===93&&!l||d===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?r(d):d===93?(e.exit(s),e.enter(n),e.consume(d),e.exit(n),e.exit(i),t):Rt(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===null||d===91||d===93||Rt(d)||o++>999?(e.exit("chunkString"),h(d)):(e.consume(d),l||(l=!Xt(d)),d===92?p:u)}function p(d){return d===91||d===92||d===93?(e.consume(d),o++,u):u(d)}}function ey(e,t,r,i,n,s){let a;return o;function o(p){return p===34||p===39||p===40?(e.enter(i),e.enter(n),e.consume(p),e.exit(n),a=p===40?41:p,l):r(p)}function l(p){return p===a?(e.enter(n),e.consume(p),e.exit(n),e.exit(i),t):(e.enter(s),c(p))}function c(p){return p===a?(e.exit(s),l(a)):p===null?r(p):Rt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Jt(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===a||p===null||Rt(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?u:h)}function u(p){return p===a||p===92?(e.consume(p),h):h(p)}}function bs(e,t){let r;return i;function i(n){return Rt(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r=!0,i):Xt(n)?Jt(e,i,r?"linePrefix":"lineSuffix")(n):t(n)}}const QS={name:"definition",tokenize:ZS},KS={partial:!0,tokenize:JS};function ZS(e,t,r){const i=this;let n;return s;function s(d){return e.enter("definition"),a(d)}function a(d){return ty.call(i,e,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function o(d){return n=fr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):r(d)}function l(d){return he(d)?bs(e,c)(d):c(d)}function c(d){return Jm(e,h,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function h(d){return e.attempt(KS,u,u)(d)}function u(d){return Xt(d)?Jt(e,p,"whitespace")(d):p(d)}function p(d){return d===null||Rt(d)?(e.exit("definition"),i.parser.defined.push(n),t(d
vendor: 18,035 bytes, line 148
148)):r(d)}}function JS(e,t,r){return i;function i(o){return he(o)?bs(e,n)(o):r(o)}function n(o){return ey(e,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return Xt(o)?Jt(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Rt(o)?t(o):r(o)}}const tT={name:"hardBreakEscape",tokenize:eT};function eT(e,t,r){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),n}function n(s){return Rt(s)?(e.exit("hardBreakEscape"),t(s)):r(s)}}const rT={name:"headingAtx",resolve:iT,tokenize:nT};function iT(e,t){let r=e.length-2,i=3,n,s;return e[i][1].type==="whitespace"&&(i+=2),r-2>i&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(i===r-1||r-4>i&&e[r-2][1].type==="whitespace")&&(r-=i+1===r?2:4),r>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[r][1].end},s={type:"chunkText",start:e[i][1].start,end:e[r][1].end,contentType:"text"},Je(e,i,r-i+1,[["enter",n,t],["enter",s,t],["exit",s,t],["exit",n,t]])),e}function nT(e,t,r){let i=0;return n;function n(h){return e.enter("atxHeading"),s(h)}function s(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&i++<6?(e.consume(h),a):h===null||he(h)?(e.exit("atxHeadingSequence"),o(h)):r(h)}function o(h){return h===35?(e.enter("atxHeadingSequence"),l(h)):h===null||Rt(h)?(e.exit("atxHeading"),t(h)):Xt(h)?Jt(e,o,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function l(h){return h===35?(e.consume(h),l):(e.exit("atxHeadingSequence"),o(h))}function c(h){return h===null||h===35||he(h)?(e.exit("atxHeadingText"),o(h)):(e.consume(h),c)}}const sT=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],qd=["pre","script","style","textarea"],aT={concrete:!0,name:"htmlFlow",resolveTo:cT,tokenize:hT},oT={partial:!0,tokenize:dT},lT={partial:!0,tokenize:uT};function cT(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function hT(e,t,r){const i=this;let n,s,a,o,l;return c;function c(F){return h(F)}function h(F){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(F),u}function u(F){return F===33?(e.consume(F),p):F===47?(e.consume(F),s=!0,y):F===63?(e.consume(F),n=3,i.interrupt?t:_):ze(F)?(e.consume(F),a=String.fromCharCode(F),C):r(F)}function p(F){return F===45?(e.consume(F),n=2,d):F===91?(e.consume(F),n=5,o=0,g):ze(F)?(e.consume(F),n=4,i.interrupt?t:_):r(F)}function d(F){return F===45?(e.consume(F),i.interrupt?t:_):r(F)}function g(F){const ht="CDATA[";return F===ht.charCodeAt(o++)?(e.consume(F),o===ht.length?i.interrupt?t:z:g):r(F)}function y(F){return ze(F)?(e.consume(F),a=String.fromCharCode(F),C):r(F)}function C(F){if(F===null||F===47||F===62||he(F)){const ht=F===47,pt=a.toLowerCase();return!ht&&!s&&qd.includes(pt)?(n=1,i.interrupt?t(F):z(F)):sT.includes(a.toLowerCase())?(n=6,ht?(e.consume(F),x):i.interrupt?t(F):z(F)):(n=7,i.interrupt&&!i.parser.lazy[i.now().line]?r(F):s?w(F):k(F))}return F===45||$e(F)?(e.consume(F),a+=String.fromCharCode(F),C):r(F)}function x(F){return F===62?(e.consume(F),i.interrupt?t:z):r(F)}function w(F){return Xt(F)?(e.consume(F),w):E(F)}function k(F){return F===47?(e.consume(F),E):F===58||F===95||ze(F)?(e.consume(F),v):Xt(F)?(e.consume(F),k):E(F)}function v(F){return F===45||F===46||F===58||F===95||$e(F)?(e.consume(F),v):T(F)}function T(F){return F===61?(e.consume(F),L):Xt(F)?(e.consume(F),T):k(F)}function L(F){return F===null||F===60||F===61||F===62||F===96?r(F):F===34||F===39?(e.consume(F),l=F,D):Xt(F)?(e.consume(F),L):M(F)}function D(F){return F===l?(e.consume(F),l=null,W):F===null||Rt(F)?r(F):(e.consume(F),D)}function M(F){return F===null||F===34||F===39||F===47||F===60||F===61||F===62||F===96||he(F)?T(F):(e.consume(F),M)}function W(F){return F===47||F===62||Xt(F)?k(F):r(F)}function E(F){return F===62?(e.consume(F),N):r(F)}function N(F){return F===null||Rt(F)?z(F):Xt(F)?(e.consume(F),N):r(F)}function z(F){return F===45&&n===2?(e.consume(F),A):F===60&&n===1?(e.consume(F),R):F===62&&n===4?(e.consume(F),ct):F===63&&n===3?(e.consume(F),_):F===93&&n===5?(e.consume(F),q):Rt(F)&&(n===6||n===7)?(e.exit("htmlFlowData"),e.check(oT,X,O)(F)):F===null||Rt(F)?(e.exit("htmlFlowData"),O(F)):(e.consume(F),z)}function O(F){return e.check(lT,I,X)(F)}function I(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),j}function j(F){return F===null||Rt(F)?O(F):(e.enter("htmlFlowData"),z(F))}function A(F){return F===45?(e.consume(F),_):z(F)}function R(F){return F===47?(e.consume(F),a="",H):z(F)}function H(F){if(F===62){const ht=a.toLowerCase();return qd.includes(ht)?(e.consume(F),ct):z(F)}return ze(F)&&a.length<8?(e.consume(F),a+=String.fromCharCode(F),H):z(F)}function q(F){return F===93?(e.consume(F),_):z(F)}function _(F){return F===62?(e.consume(F),ct):F===45&&n===2?(e.consume(F),_):z(F)}function ct(F){return F===null||Rt(F)?(e.exit("htmlFlowData"),X(F)):(e.consume(F),ct)}function X(F){return e.exit("htmlFlow"),t(F)}}function uT(e,t,r){const i=this;return n;function n(a){return Rt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):r(a)}function s(a){return i.parser.lazy[i.now().line]?r(a):t(a)}}function dT(e,t,r){return i;function i(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(Hs,t,r)}}const pT={name:"htmlText",tokenize:fT};function fT(e,t,r){const i=this;let n,s,a;return o;function o(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),l}function l(_){return _===33?(e.consume(_),c):_===47?(e.consume(_),T):_===63?(e.consume(_),k):ze(_)?(e.consume(_),M):r(_)}function c(_){return _===45?(e.consume(_),h):_===91?(e.consume(_),s=0,g):ze(_)?(e.consume(_),w):r(_)}function h(_){return _===45?(e.consume(_),d):r(_)}function u(_){return _===null?r(_):_===45?(e.consume(_),p):Rt(_)?(a=u,R(_)):(e.consume(_),u)}function p(_){return _===45?(e.consume(_),d):u(_)}function d(_){return _===62?A(_):_===45?p(_):u(_)}function g(_){const ct="CDATA[";return _===ct.charCodeAt(s++)?(e.consume(_),s===ct.length?y:g):r(_)}function y(_){return _===null?r(_):_===93?(e.consume(_),C):Rt(_)?(a=y,R(_)):(e.consume(_),y)}function C(_){return _===93?(e.consume(_),x):y(_)}function x(_){return _===62?A(_):_===93?(e.consume(_),x):y(_)}function w(_){return _===null||_===62?A(_):Rt(_)?(a=w,R(_)):(e.consume(_),w)}function k(_){return _===null?r(_):_===63?(e.consume(_),v):Rt(_)?(a=k,R(_)):(e.consume(_),k)}function v(_){return _===62?A(_):k(_)}function T(_){return ze(_)?(e.consume(_),L):r(_)}function L(_){return _===45||$e(_)?(e.consume(_),L):D(_)}function D(_){return Rt(_)?(a=D,R(_)):Xt(_)?(e.consume(_),D):A(_)}function M(_){return _===45||$e(_)?(e.consume(_),M):_===47||_===62||he(_)?W(_):r(_)}function W(_){return _===47?(e.consume(_),A):_===58||_===95||ze(_)?(e.consume(_),E):Rt(_)?(a=W,R(_)):Xt(_)?(e.consume(_),W):A(_)}function E(_){return _===45||_===46||_===58||_===95||$e(_)?(e.consume(_),E):N(_)}function N(_){return _===61?(e.consume(_),z):Rt(_)?(a=N,R(_)):Xt(_)?(e.consume(_),N):W(_)}function z(_){return _===null||_===60||_===61||_===62||_===96?r(_):_===34||_===39?(e.consume(_),n=_,O):Rt(_)?(a=z,R(_)):Xt(_)?(e.consume(_),z):(e.consume(_),I)}function O(_){return _===n?(e.consume(_),n=void 0,j):_===null?r(_):Rt(_)?(a=O,R(_)):(e.consume(_),O)}function I(_){return _===null||_===34||_===39||_===60||_===61||_===96?r(_):_===47||_===62||he(_)?W(_):(e.consume(_),I)}function j(_){return _===47||_===62||he(_)?W(_):r(_)}function A(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),t):r(_)}function R(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),H}function H(_){return Xt(_)?Jt(e,q,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):q(_)}function q(_){return e.enter("htmlTextData"),a(_)}}const Mh={name:"labelEnd",resolveAll:xT,resolveTo:bT,tokenize:CT},gT={tokenize:kT},mT={tokenize:wT},yT={tokenize:vT};function xT(e){let t=-1;const r=[];for(;++t<e.length;){const i=e[t][1];if(r.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const n=i.type==="labelImage"?4:2;i.type="data",t+=n}}return e.length!==r.length&&Je(e,0,e.length,r),e}function bT(e,t){let r=e.length,i=0,n,s,a,o;for(;r--;)if(n=e[r][1],s){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;e[r][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(a){if(e[r][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(s=r,n.type!=="labelLink")){i=2;break}}else n.type==="labelEnd"&&(a=r);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},h={type:"labelText",start:{...e[s+i+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=ir(o,e.slice(s+1,s+i+3)),o=ir(o,[["enter",h,t]]),o=ir(o,So(t.parser.constructs.insideSpan.null,e.slice(s+i+4,a-3),t)),o=ir(o,[["exit",h,t],e[a-2],e[a-1],["exit",c,t]]),o=ir(o,e.slice(a+1)),o=ir(o,[["exit",l,t]]),Je(e,s,e.length,o),e}function CT(e,t,r){const i=this;let n=i.events.length,s,a;for(;n--;)if((i.events[n][1].type==="labelImage"||i.events[n][1].type==="labelLink")&&!i.events[n][1]._balanced){s=i.events[n][1];break}return o;function o(p){return s?s._inactive?u(p):(a=i.parser.defined.includes(fr(i.sliceSerialize({start:s.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):r(p)}function l(p){return p===40?e.attempt(gT,h,a?h:u)(p):p===91?e.attempt(mT,h,a?c:u)(p):a?h(p):u(p)}function c(p){return e.attempt(yT,h,u)(p)}function h(p){return t(p)}function u(p){return s._balanced=!0,r(p)}}function kT(e,t,r){return i;function i(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),n}function n(u){return he(u)?bs(e,s)(u):s(u)}function s(u){return u===41?h(u):Jm(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function a(u){return he(u)?bs(e,l)(u):h(u)}function o(u){return r(u)}function l(u){return u===34||u===39||u===40?ey(e,c,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):h(u)}function c(u){return he(u)?bs(e,h)(u):h(u)}function h(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):r(u)}}function wT(e,t,r){const i=this;return n;function n(o){return ty.call(i,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return i.parser.defined.includes(fr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(o):r(o)}function a(o){return r(o)}}function vT(e,t,r){return i;function i(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),n}function n(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):r(s)}}const ST={name:"labelStartImage",resolveAll:Mh.resolveAll,tokenize:TT};function TT(e,t,r){const i=this;return n;function n(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):r(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(o):t(o)}}const _T={name:"labelStartLink",resolveAll:Mh.resolveAll,tokenize:BT};function BT(e,t,r){const i=this;return n;function n(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(a):t(a)}}const ol={name:"lineEnding",tokenize:LT};function LT(e,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Jt(e,t,"linePrefix")}}const ka={name:"thematicBreak",tokenize:AT};function AT(e,t,r){let i=0,n;return s;function s(c){return e.enter("thematicBreak"),a(c)}function a(c){return n=c,o(c)}function o(c){return c===n?(e.enter("thematicBreakSequence"),l(c)):i>=3&&(c===null||Rt(c))?(e.exit("thematicBreak"),t(c)):r(c)}function l(c){return c===n?(e.consume(c),i++,l):(e.exit("thematicBreakSequence"),Xt(c)?Jt(e,o,"whitespace")(c):o(c))}}const Ye={continuation:{tokenize:MT},exit:jT,name:"list",tokenize:NT},FT={partial:!0,tokenize:IT},ET={partial:!0,tokenize:$T};function NT(e,t,r){const i=this,n=i.events[i.events.length-1];let s=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,a=0;return o;function o(d){const g=i.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!i.containerState.marker||d===i.containerState.marker:kc(d)){if(i.containerState.type||(i.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(ka,r,c)(d):c(d);if(!i.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return r(d)}function l(d){return kc(d)&&++a<10?(e.consume(d),l):(!i.interrupt||a<2)&&(i.containerState.marker?d===i.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),c(d)):r(d)}function c(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||d,e.check(Hs,i.interrupt?r:h,e.attempt(FT,p,u))}function h(d){return i.containerState.initialBlankLine=!0,s++,p(d)}function u(d){return Xt(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):r(d)}function p(d){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function MT(e,t,r){const i=this;return i.containerState._closeFlow=void 0,e.check(Hs,n,s);function n(o){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Jt(e,t,"listItemIndent",i.containerState.size+1)(o)}function s(o){return i.containerState.furtherBlankLines||!Xt(o)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,a(o)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(ET,t,a)(o))}function a(o){return i.containerState._closeFlow=!0,i.interrupt=void 0,Jt(e,e.attempt(Ye,t,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function $T(e,t,r){const i=this;return Jt(e,n,"listItemIndent",i.containerState.size+1);function n(s){const a=i.events[i.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===i.containerState.size?t(s):r(s)}}function jT(e){e.exit(this.containerState.type)}function IT(e,t,r){const i=this;return Jt(e,n,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function n(s){const a=i.events[i.events.length-1];return!Xt(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):r(s)}}const zd={name:"setextUnderline",resolveTo:DT,tokenize:PT};function DT(e,t){let r=e.length,i,n,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(n=r)}else e[r][1].type==="content"&&e.splice(r,1),!s&&e[r][1].type==="definition"&&(s=r);const a={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[n][1].type="setextHeadingText",s?(e.splice(n,0,["enter",a,t]),e.splice(s+1,0,["exit",e[i][1],t]),e[i][1].end={...e[s][1].end}):e[i][1]=a,e.push(["exit",a,t]),e}function PT(e,t,r){const i=this;let n;return s;function s(c){let h=i.events.length,u;for(;h--;)if(i.events[h][1].type!=="lineEnding"&&i.events[h][1].type!=="linePrefix"&&i.events[h][1].type!=="content"){u=i.events[h][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||u)?(e.enter("setextHeadingLine"),n=c,a(c)):r(c)}function a(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===n?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),Xt(c)?Jt(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Rt(c)?(e.exit("setextHeadingLine"),t(c)):r(c)}}const OT={tokenize:RT};function RT(e){const t=this,r=e.attempt(Hs,i,e.attempt(this.parser.constructs.flowInitial,n,Jt(e,e.attempt(this.parser.constructs.flow,n,e.attempt(US,n)),"linePrefix")));return r;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const qT={resolveAll:iy()},zT=ry("string"),WT=ry("text");function ry(e){return{resolveAll:iy(e==="text"?HT:void 0),tokenize:t};function t(r){const i=this,n=this.parser.constructs[e],s=r.attempt(n,a,o);return a;function a(h){return c(h)?s(h):o(h)}function o(h){if(h===null){r.consume(h);return}return r.enter("data"),r.consume(h),l}function l(h){return c(h)?(r.exit("data"),s(h)):(r.consume(h),l)}function c(h){if(h===null)return!0;const u=n[h];let p=-1;if(u)for(;++p<u.length;){const d=u[p];if(!d.previous||d.previous.call(i,i.previous))return!0}return!1}}}function iy(e){return t;function t(r,i){let n=-1,s;for(;++n<=r.length;)s===void 0?r[n]&&r[n][1].type==="data"&&(s=n,n++):(!r[n]||r[n][1].type!=="data")&&(n!==s+2&&(r[s][1].end=r[n-1][1].end,r.splice(s+2,n-s-2),n=s+2),s=void 0);return e?e(r,i):r}}function HT(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],n=t.sliceStream(i);let s=n.length,a=-1,o=0,l;for(;s--;){const c=n[s];if(typeof c=="string"){for(a=c.length;
vendor: 5,555 bytes, lines 148-150
148c.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(c===-2)l=!0,o++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(o=0),o){const c={type:r===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:i.start._bufferIndex+a,_index:i.start._index+s,line:i.end.line,column:i.end.column-o,offset:i.end.offset-o},end:{...i.end}};i.end={...c.start},i.start.offset===i.end.offset?Object.assign(i,c):(e.splice(r,0,["enter",c,t],["exit",c,t]),r+=2)}r++}return e}const UT={42:Ye,43:Ye,45:Ye,48:Ye,49:Ye,50:Ye,51:Ye,52:Ye,53:Ye,54:Ye,55:Ye,56:Ye,57:Ye,62:Xm},YT={91:QS},VT={[-2]:al,[-1]:al,32:al},GT={35:rT,42:ka,45:[zd,ka],60:aT,61:zd,95:ka,96:Rd,126:Rd},XT={38:Km,92:Qm},QT={[-5]:ol,[-4]:ol,[-3]:ol,33:ST,38:Km,42:wc,60:[_S,pT],91:_T,92:[tT,Qm],93:Mh,95:wc,96:OS},KT={null:[wc,qT]},ZT={null:[42,95]},JT={null:[]},t_=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ZT,contentInitial:YT,disable:JT,document:UT,flow:GT,flowInitial:VT,insideSpan:KT,string:XT,text:QT},Symbol.toStringTag,{value:"Module"}));function e_(e,t,r){let i={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const n={},s=[];let a=[],o=[];const l={attempt:D(T),check:D(L),consume:w,enter:k,exit:v,interrupt:D(L,{interrupt:!0})},c={code:null,containerState:{},defineSkip:y,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:d,write:u};let h=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function u(N){return a=ir(a,N),C(),a[a.length-1]!==null?[]:(M(t,0),c.events=So(s,c.events,c),c.events)}function p(N,z){return i_(d(N),z)}function d(N){return r_(a,N)}function g(){const{_bufferIndex:N,_index:z,line:O,column:I,offset:j}=i;return{_bufferIndex:N,_index:z,line:O,column:I,offset:j}}function y(N){n[N.line]=N.column,E()}function C(){let N;for(;i._index<a.length;){const z=a[i._index];if(typeof z=="string")for(N=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===N&&i._bufferIndex<z.length;)x(z.charCodeAt(i._bufferIndex));else x(z)}}function x(N){h=h(N)}function w(N){Rt(N)?(i.line++,i.column=1,i.offset+=N===-3?2:1,E()):N!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===a[i._index].length&&(i._bufferIndex=-1,i._index++)),c.previous=N}function k(N,z){const O=z||{};return O.type=N,O.start=g(),c.events.push(["enter",O,c]),o.push(O),O}function v(N){const z=o.pop();return z.end=g(),c.events.push(["exit",z,c]),z}function T(N,z){M(N,z.from)}function L(N,z){z.restore()}function D(N,z){return O;function O(I,j,A){let R,H,q,_;return Array.isArray(I)?X(I):"tokenize"in I?X([I]):ct(I);function ct(wt){return P;function P(mt){const st=mt!==null&&wt[mt],at=mt!==null&&wt.null,dt=[...Array.isArray(st)?st:st?[st]:[],...Array.isArray(at)?at:at?[at]:[]];return X(dt)(mt)}}function X(wt){return R=wt,H=0,wt.length===0?A:F(wt[H])}function F(wt){return P;function P(mt){return _=W(),q=wt,wt.partial||(c.currentConstruct=wt),wt.name&&c.parser.constructs.disable.null.includes(wt.name)?pt():wt.tokenize.call(z?Object.assign(Object.create(c),z):c,l,ht,pt)(mt)}}function ht(wt){return N(q,_),j}function pt(wt){return _.restore(),++H<R.length?F(R[H]):A}}}function M(N,z){N.resolveAll&&!s.includes(N)&&s.push(N),N.resolve&&Je(c.events,z,c.events.length-z,N.resolve(c.events.slice(z),c)),N.resolveTo&&(c.events=N.resolveTo(c.events,c))}function W(){const N=g(),z=c.previous,O=c.currentConstruct,I=c.events.length,j=Array.from(o);return{from:I,restore:A};function A(){i=N,c.previous=z,c.currentConstruct=O,c.events.length=I,o=j,E()}}function E(){i.line in n&&i.column<2&&(i.column=n[i.line],i.offset+=n[i.line]-1)}}function r_(e,t){const r=t.start._index,i=t.start._bufferIndex,n=t.end._index,s=t.end._bufferIndex;let a;if(r===n)a=[e[r].slice(i,s)];else{if(a=e.slice(r,n),i>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(i):a.shift()}s>0&&a.push(e[n].slice(0,s))}return a}function i_(e,t){let r=-1;const i=[];let n;for(;++r<e.length;){const s=e[r];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
149`;break}case-3:{a=`\r
150`;break}case-2:{a=t?" ":"	";break}case-1:{if(!t&&n)continue;a=" ";break}default:a=String.fromCharCode(s)}n=s===-2,i.push(a)}return i.join("")}function n_(e){const i={constructs:Vm([t_,...(e||{}).extensions||[]]),content:n(bS),defined:[],document:n(kS),flow:n(OT),lazy:{},string:n(zT),text:n(WT)};return i;function n(s){return a;function a(o){return e_(i,s,o)}}}function s_(e){for(;!Zm(e););return e}const Wd=/[\0\t\n\r]/g;function a_(){let e=1,t="",r=!0,i;return n;function n(s,a,o){const l=[];let c,h,u,p,d;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),u=0,t="",r&&(s.charCodeAt(0)===65279&&u++,r=void 0);u<s.length;){if(Wd.lastIndex=u,c=Wd.exec(s),p=c&&c.index!==void 0?c.index:s.length,d=s.charCodeAt(p),!c){t=s.slice(u);break}if(d===10&&u===p&&i)l.push(-3),i=void 0;else switch(i&&(l.push(-5),i=void 0),u<p&&(l.push(s.slice(u,p)),e+=p-u),d){case 0:{l.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,l.push(-2);e++<h;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:i=!0,e=1}u=p+1}return o&&(i&&l.push(-5),t&&l.push(t),l.push(null)),l}}const o_=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function l_(e){return e.replace(o_,c_)}function c_(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const n=r.charCodeAt(1),s=n===120||n===88;return Gm(r.slice(s?2:1),s?16:10)}return Nh(r)||e}const ny={}.hasOwnProperty;function h_(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),u_(r)(s_(n_(r).document().write(a_()(e,t,!0))
vendor: 9,826 bytes, line 150
150))}function u_(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Oe),autolinkProtocol:W,autolinkEmail:W,atxHeading:s(Q),blockQuote:s(at),characterEscape:W,characterReference:W,codeFenced:s(dt),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(dt,a),codeText:s(bt,a),codeTextData:W,data:W,codeFlowValue:W,definition:s(vt),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Bt),hardBreakEscape:s($t),hardBreakTrailing:s($t),htmlFlow:s(te,a),htmlFlowData:W,htmlText:s(te,a),htmlTextData:W,image:s(pe),label:a,link:s(Oe),listItem:s(Re),listItemValue:p,listOrdered:s(Ae,u),listUnordered:s(Ae),paragraph:s(gt),reference:F,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(Q),strong:s(St),thematicBreak:s(At)},exit:{atxHeading:l(),atxHeadingSequence:T,autolink:l(),autolinkEmail:st,autolinkProtocol:mt,blockQuote:l(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:pt,characterReferenceMarkerNumeric:pt,characterReferenceValue:wt,characterReference:P,codeFenced:l(C),codeFencedFence:y,codeFencedFenceInfo:d,codeFencedFenceMeta:g,codeFlowValue:E,codeIndented:l(x),codeText:l(j),codeTextData:E,data:E,definition:l(),definitionDestinationString:v,definitionLabelString:w,definitionTitleString:k,emphasis:l(),hardBreakEscape:l(z),hardBreakTrailing:l(z),htmlFlow:l(O),htmlFlowData:E,htmlText:l(I),htmlTextData:E,image:l(R),label:q,labelText:H,lineEnding:N,link:l(A),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ht,resourceDestinationString:_,resourceTitleString:ct,resource:X,setextHeading:l(M),setextHeadingLineSequence:D,setextHeadingText:L,strong:l(),thematicBreak:l()}};sy(t,(e||{}).mdastExtensions||[]);const r={};return i;function i(G){let nt={type:"root",children:[]};const m={stack:[nt],tokenStack:[],config:t,enter:o,exit:c,buffer:a,resume:h,data:r},$=[];let U=-1;for(;++U<G.length;)if(G[U][1].type==="listOrdered"||G[U][1].type==="listUnordered")if(G[U][0]==="enter")$.push(U);else{const tt=$.pop();U=n(G,tt,U)}for(U=-1;++U<G.length;){const tt=t[G[U][0]];ny.call(tt,G[U][1].type)&&tt[G[U][1].type].call(Object.assign({sliceSerialize:G[U][2].sliceSerialize},m),G[U][1])}if(m.tokenStack.length>0){const tt=m.tokenStack[m.tokenStack.length-1];(tt[1]||Hd).call(m,void 0,tt[0])}for(nt.position={start:Kr(G.length>0?G[0][1].start:{line:1,column:1,offset:0}),end:Kr(G.length>0?G[G.length-2][1].end:{line:1,column:1,offset:0})},U=-1;++U<t.transforms.length;)nt=t.transforms[U](nt)||nt;return nt}function n(G,nt,m){let $=nt-1,U=-1,tt=!1,J,ft,B,Z;for(;++$<=m;){const ut=G[$];switch(ut[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ut[0]==="enter"?U++:U--,Z=void 0;break}case"lineEndingBlank":{ut[0]==="enter"&&(J&&!Z&&!U&&!B&&(B=$),Z=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Z=void 0}if(!U&&ut[0]==="enter"&&ut[1].type==="listItemPrefix"||U===-1&&ut[0]==="exit"&&(ut[1].type==="listUnordered"||ut[1].type==="listOrdered")){if(J){let lt=$;for(ft=void 0;lt--;){const ot=G[lt];if(ot[1].type==="lineEnding"||ot[1].type==="lineEndingBlank"){if(ot[0]==="exit")continue;ft&&(G[ft][1].type="lineEndingBlank",tt=!0),ot[1].type="lineEnding",ft=lt}else if(!(ot[1].type==="linePrefix"||ot[1].type==="blockQuotePrefix"||ot[1].type==="blockQuotePrefixWhitespace"||ot[1].type==="blockQuoteMarker"||ot[1].type==="listItemIndent"))break}B&&(!ft||B<ft)&&(J._spread=!0),J.end=Object.assign({},ft?G[ft][1].start:ut[1].end),G.splice(ft||$,0,["exit",J,ut[2]]),$++,m++}if(ut[1].type==="listItemPrefix"){const lt={type:"listItem",_spread:!1,start:Object.assign({},ut[1].start),end:void 0};J=lt,G.splice($,0,["enter",lt,ut[2]]),$++,m++,B=void 0,Z=!0}}}return G[nt][1]._spread=tt,m}function s(G,nt){return m;function m($){o.call(this,G($),$),nt&&nt.call(this,$)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(G,nt,m){this.stack[this.stack.length-1].children.push(G),this.stack.push(G),this.tokenStack.push([nt,m||void 0]),G.position={start:Kr(nt.start),end:void 0}}function l(G){return nt;function nt(m){G&&G.call(this,m),c.call(this,m)}}function c(G,nt){const m=this.stack.pop(),$=this.tokenStack.pop();if($)$[0].type!==G.type&&(nt?nt.call(this,G,$[0]):($[1]||Hd).call(this,G,$[0]));else throw new Error("Cannot close `"+G.type+"` ("+xs({start:G.start,end:G.end})+"): it’s not open");m.position.end=Kr(G.end)}function h(){return Eh(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function p(G){if(this.data.expectingFirstListItemValue){const nt=this.stack[this.stack.length-2];nt.start=Number.parseInt(this.sliceSerialize(G),10),this.data.expectingFirstListItemValue=void 0}}function d(){const G=this.resume(),nt=this.stack[this.stack.length-1];nt.lang=G}function g(){const G=this.resume(),nt=this.stack[this.stack.length-1];nt.meta=G}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const G=this.resume(),nt=this.stack[this.stack.length-1];nt.value=G.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const G=this.resume(),nt=this.stack[this.stack.length-1];nt.value=G.replace(/(\r?\n|\r)$/g,"")}function w(G){const nt=this.resume(),m=this.stack[this.stack.length-1];m.label=nt,m.identifier=fr(this.sliceSerialize(G)).toLowerCase()}function k(){const G=this.resume(),nt=this.stack[this.stack.length-1];nt.title=G}function v(){const G=this.resume(),nt=this.stack[this.stack.length-1];nt.url=G}function T(G){const nt=this.stack[this.stack.length-1];if(!nt.depth){const m=this.sliceSerialize(G).length;nt.depth=m}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function D(G){const nt=this.stack[this.stack.length-1];nt.depth=this.sliceSerialize(G).codePointAt(0)===61?1:2}function M(){this.data.setextHeadingSlurpLineEnding=void 0}function W(G){const m=this.stack[this.stack.length-1].children;let $=m[m.length-1];(!$||$.type!=="text")&&($=kt(),$.position={start:Kr(G.start),end:void 0},m.push($)),this.stack.push($)}function E(G){const nt=this.stack.pop();nt.value+=this.sliceSerialize(G),nt.position.end=Kr(G.end)}function N(G){const nt=this.stack[this.stack.length-1];if(this.data.atHardBreak){const m=nt.children[nt.children.length-1];m.position.end=Kr(G.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(nt.type)&&(W.call(this,G),E.call(this,G))}function z(){this.data.atHardBreak=!0}function O(){const G=this.resume(),nt=this.stack[this.stack.length-1];nt.value=G}function I(){const G=this.resume(),nt=this.stack[this.stack.length-1];nt.value=G}function j(){const G=this.resume(),nt=this.stack[this.stack.length-1];nt.value=G}function A(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const nt=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=nt,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function R(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const nt=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=nt,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function H(G){const nt=this.sliceSerialize(G),m=this.stack[this.stack.length-2];m.label=l_(nt),m.identifier=fr(nt).toLowerCase()}function q(){const G=this.stack[this.stack.length-1],nt=this.resume(),m=this.stack[this.stack.length-1];if(this.data.inReference=!0,m.type==="link"){const $=G.children;m.children=$}else m.alt=nt}function _(){const G=this.resume(),nt=this.stack[this.stack.length-1];nt.url=G}function ct(){const G=this.resume(),nt=this.stack[this.stack.length-1];nt.title=G}function X(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function ht(G){const nt=this.resume(),m=this.stack[this.stack.length-1];m.label=nt,m.identifier=fr(this.sliceSerialize(G)).toLowerCase(),this.data.referenceType="full"}function pt(G){this.data.characterReferenceType=G.type}function wt(G){const nt=this.sliceSerialize(G),m=this.data.characterReferenceType;let $;m?($=Gm(nt,m==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$=Nh(nt);const U=this.stack[this.stack.length-1];U.value+=$}function P(G){const nt=this.stack.pop();nt.position.end=Kr(G.end)}function mt(G){E.call(this,G);const nt=this.stack[this.stack.length-1];nt.url=this.sliceSerialize(G)}function st(G){E.call(this,G);const nt=this.stack[this.stack.length-1];nt.url="mailto:"+this.sliceSerialize(G)}function at(){return{type:"blockquote",children:[]}}function dt(){return{type:"code",lang:null,meta:null,value:""}}function bt(){return{type:"inlineCode",value:""}}function vt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Bt(){return{type:"emphasis",children:[]}}function Q(){return{type:"heading",depth:0,children:[]}}function $t(){return{type:"break"}}function te(){return{type:"html",value:""}}function pe(){return{type:"image",title:null,url:"",alt:null}}function Oe(){return{type:"link",title:null,url:"",children:[]}}function Ae(G){return{type:"list",ordered:G.type==="listOrdered",start:null,spread:G._spread,children:[]}}function Re(G){return{type:"listItem",spread:G._spread,checked:null,children:[]}}function gt(){return{type:"paragraph",children:[]}}function St(){return{type:"strong",children:[]}}function kt(){return{type:"text",value:""}}function At(){return{type:"thematicBreak"}}}function Kr(e){return{line:e.line,column:e.column,offset:e.offset}}function sy(e,t){let r=-1;for(;++r<t.length;){const i=t[r];Array.isArray(i)?sy(e,i):d_(e,i)}}function d_(e,t){let r;for(r in t)if(ny.call(t,r))switch(r){case"canContainEols":{const i=t[r];
vendor: 4,594 bytes, lines 150-153
150i&&e[r].push(...i);break}case"transforms":{const i=t[r];i&&e[r].push(...i);break}case"enter":case"exit":{const i=t[r];i&&Object.assign(e[r],i);break}}}function Hd(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+xs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+xs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+xs({start:t.start,end:t.end})+") is still open")}function p_(e){const t=this;t.parser=r;function r(i){return h_(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function f_(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function g_(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
151`}]}function m_(e,t){const r=t.value?t.value+`
152`:"",i={},n=t.lang?t.lang.split(/\s+/):[];n.length>0&&(i.className=["language-"+n[0]]);let s={type:"element",tagName:"code",properties:i,children:[{type:"text",value:r}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function y_(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function x_(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function b_(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),n=Mn(i.toLowerCase()),s=e.footnoteOrder.indexOf(i);let a,o=e.footnoteCounts.get(i);o===void 0?(o=0,e.footnoteOrder.push(i),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(i,o);const l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+n,id:r+"fnref-"+n+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function C_(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function k_(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function ay(e,t){const r=t.referenceType;let i="]";if(r==="collapsed"?i+="[]":r==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const n=e.all(t),s=n[0];s&&s.type==="text"?s.value="["+s.value:n.unshift({type:"text",value:"["});const a=n[n.length-1];return a&&a.type==="text"?a.value+=i:n.push({type:"text",value:i}),n}function w_(e,t){const r=String(t.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return ay(e,t);const n={src:Mn(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(n.title=i.title);const s={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,s),e.applyData(t,s)}function v_(e,t){const r={src:Mn(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}function S_(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const i={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,i),e.applyData(t,i)}function T_(e,t){const r=String(t.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return ay(e,t);const n={href:Mn(i.url||"")};i.title!==null&&i.title!==void 0&&(n.title=i.title);const s={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function __(e,t){const r={href:Mn(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function B_(e,t,r){const i=e.all(t),n=r?L_(r):oy(t),s={},a=[];if(typeof t.checked=="boolean"){const h=i[0];let u;h&&h.type==="element"&&h.tagName==="p"?u=h:(u={type:"element",tagName:"p",properties:{},children:[]},i.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<i.length;){const h=i[o];(n||o!==0||h.type!=="element"||h.tagName!=="p")&&a.push({type:"text",value:`
153`}
vendor: 3,492 bytes, lines 153-154
153),h.type==="element"&&h.tagName==="p"&&!n?a.push(...h.children):a.push(h)}const l=i[i.length-1];l&&(n||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
154`});const c={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,c),e.applyData(t,c)}function L_(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let i=-1;for(;!t&&++i<r.length;)t=oy(r[i])}return t}function oy(e){const t=e.spread;return t??e.children.length>1}function A_(e,t){const r={},i=e.all(t);let n=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++n<i.length;){const a=i[n];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function F_(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function E_(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function N_(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function M_(e,t){const r=e.all(t),i=r.shift(),n=[];if(i){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],a),n.push(a)}if(r.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},o=Bh(t.children[1]),l=Rm(t.children[t.children.length-1]);o&&l&&(a.position={start:o,end:l}),n.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(n,!0)};return e.patch(t,s),e.applyData(t,s)}function $_(e,t,r){const i=r?r.children:void 0,s=(i?i.indexOf(t):1)===0?"th":"td",a=r&&r.type==="table"?r.align:void 0,o=a?a.length:t.children.length;let l=-1;const c=[];for(;++l<o;){const u=t.children[l],p={},d=a?a[l]:void 0;d&&(p.align=d);let g={type:"element",tagName:s,properties:p,children:[]};u&&(g.children=e.all(u),e.patch(u,g),g=e.applyData(u,g)),c.push(g)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,h),e.applyData(t,h)}function j_(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const Ud=9,Yd=32;function I_(e){const t=String(e),r=/\r?\n|\r/g;let i=r.exec(t),n=0;const s=[];for(;i;)s.push(Vd(t.slice(n,i.index),n>0,!0),i[0]),n=i.index+i[0].length,i=r.exec(t);return s.push(Vd(t.slice(n),n>0,!1)),s.join("")}function Vd(e,t,r){let i=0,n=e.length;if(t){let s=e.codePointAt(i);for(;s===Ud||s===Yd;)i++,s=e.codePointAt(i)}if(r){let s=e.codePointAt(n-1);for(;s===Ud||s===Yd;)n--,s=e.codePointAt(n-1)}return n>i?e.slice(i,n):""}function D_(e,t){const r={type:"text",value:I_(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function P_(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const O_={blockquote:f_,break:g_,code:m_,delete:y_,emphasis:x_,footnoteReference:b_,heading:C_,html:k_,imageReference:w_,image:v_,inlineCode:S_,linkReference:T_,link:__,listItem:B_,list:A_,paragraph:F_,root:E_,strong:N_,table:M_,tableCell:j_,tableRow:$_,text:D_,thematicBreak:P_,toml:ea,yaml:ea,definition:ea,footnoteDefinition:ea};function ea(){}const ly=-1,To=0,Cs=1,Wa=2,$h=3,jh=4,Ih=5,Dh=6,cy=7,hy=8,{defineProperty:R_}=Object,uy=typeof self=="object"?self:globalThis,Gd=(e,t)=>
154{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new uy[e](t)},q_=(e,t)=>{const r=(n,s)=>(e.set(s,n),n),i=n=>{if(e.has(n))return e.get(n);const[s,a]=t[n];switch(s){case To:case ly:return r(a,n);case Cs:{const o=r([],n);for(const l of a)o.push(i(l));return o}case Wa:{const o=r({},n);for(const[l,c]of a){const h=i(l),u=i(c);h==="__proto__"?R_(o,h,{value:u,configurable:!0,enumerable:!0,writable:!0}):o[h]=u}return o}case $h:return r(new Date(a),n);case jh:{const{source:o,flags:l}=a;return r(new RegExp(o,l),n)}case Ih:{const o=r(new Map,n);for(const[l,c]of a)o.set(i(l),i(c));return o}case Dh:{const o=r(new Set,n);for(const l of a)o.add(i(l));return o}case cy:{const{name:o,message:l}=a;return r(typeof uy[o]=="function"?Gd(o,l):new Error(l),n)}case hy:return r(BigInt(a),n);case"BigInt":return r(Object(BigInt(a)),n);case"ArrayBuffer":return r(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return r(new DataView(o),a)}case"-0":return-0}return r(Gd(s,a),n)};return i},Xd=e=>q_(new Map,e)(0),Ci="",{toString:z_}={},{keys:W_,is:H_}=Object,Hn=e=>{const t=typeof e;if(t!=="object"||!e)return[To,t];const r=z_.call(e).slice(8,-1);switch(r){case"Array":return[Cs,Ci];case"Object":return[Wa,Ci];case"Date":return[$h,Ci];case"RegExp":return[jh,Ci];case"Map":return[Ih,Ci];case"Set":return[Dh,Ci];case"DataView":return[Cs,r]}return r.includes("Array")?[Cs,r]:e instanceof Error?[cy,e.name||"Error"]:[Wa,r]},ra=([e,t])=>e===To&&(t==="function"||t==="symbol"),U_=(e,t,r,i)=>{const n=(a,o)=>{const l=i.push(a)-1;return r.set(o,l),l},s=a=>{if(r.has(a))return r.get(a);let[o,l]=Hn(a);switch(o){case To:{let h=a;switch(l){case"bigint":o=hy,h=a.toString();break;case"number":if(!a&&H_(a,-0))return i.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);h=null;break;case"undefined":return n([ly],a)}return n([o,h],a)}case Cs:{if(l){let p=a;return l==="DataView"?p=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(p=new Uint8Array(a)),n([l,[...p]],a)}const h=[],u=n([o,h],a);for(const p of a)h.push(s(p));return u}case Wa:{if(l)switch(l){case"BigInt":return n([l,a.toString()],a);case"Boolean":case"Number":case"String":return n([l,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const h=[],u=n([o,h],a);for(const p of W_(a))(e||!ra(Hn(a[p])))&&h.push([s(p),s(a[p])]);return u}case $h:return n([o,isNaN(a.getTime())?Ci:a.toISOString()],a);case jh:{const{source:h,flags:u}=a;return n([o,{source:h,flags:u}],a)}case Ih:{const h=[],u=n([o,h],a);for(const[p,d]of a)(e||!(ra(Hn(p))||ra(Hn(d))))&&h.push([s(p),s(d)]);return u}case Dh:{const h=[],u=n([o,h],a);for(const p of a)(e||!ra(Hn(p)))&&h.push(s(p));return u}}const{message:c}=a;return n([o,{name:l,message:c}],a)};return s},Qd=(e,{json:t,lossy:r}={})=>{const i=[];return U_(!(t||r),!!t,new Map,i)(e),i},Ha=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Xd(Qd(e,t)):structuredClone(e):(e,t)=>Xd(Qd(e,t));function Y_(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function V_(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function G_(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||Y_,i=e.options.footnoteBackLabel||V_,n=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const h=e.all(c),u=String(c.identifier).toUpperCase(),p=Mn(u.toLowerCase());let d=0;const g=[],y=e.footnoteCounts.get(u);for(;y!==void 0&&++d<=y;){g.length>0&&g.push({type:"text",value:" "});let w=typeof r=="string"?r:r(l,d);typeof w=="string"&&(w={type:"text",value:w}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(l,d),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const C=h[h.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const w=C.children[C.children.length-1];w&&w.type==="text"?w.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...g)}else h.push(...g);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(h,!0)};e.patch(c,x),o.push(x)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Ha(a),id:"footnote-label"},children:[{type:"text",value:n}]},{type:"text",value:`
155`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)}
vendor: 5,561 bytes, lines 155-160
155,{type:"text",value:`
156`}]}}const _o=(function(e){if(e==null)return Z_;if(typeof e=="function")return Bo(e);if(typeof e=="object")return Array.isArray(e)?X_(e):Q_(e);if(typeof e=="string")return K_(e);throw new Error("Expected function, string, or object as test")});function X_(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=_o(e[r]);return Bo(i);function i(...n){let s=-1;for(;++s<t.length;)if(t[s].apply(this,n))return!0;return!1}}function Q_(e){const t=e;return Bo(r);function r(i){const n=i;let s;for(s in e)if(n[s]!==t[s])return!1;return!0}}function K_(e){return Bo(t);function t(r){return r&&r.type===e}}function Bo(e){return t;function t(r,i,n){return!!(J_(r)&&e.call(this,r,typeof i=="number"?i:void 0,n||void 0))}}function Z_(){return!0}function J_(e){return e!==null&&typeof e=="object"&&"type"in e}const dy=[],tB=!0,vc=!1,eB="skip";function py(e,t,r,i){let n;typeof t=="function"&&typeof r!="function"?(i=r,r=t):n=t;const s=_o(n),a=i?-1:1;o(e,void 0,[])();function o(l,c,h){const u=l&&typeof l=="object"?l:{};if(typeof u.type=="string"){const d=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=dy,g,y,C;if((!t||s(l,c,h[h.length-1]||void 0))&&(d=rB(r(l,h)),d[0]===vc))return d;if("children"in l&&l.children){const x=l;if(x.children&&d[0]!==eB)for(y=(i?x.children.length:-1)+a,C=h.concat(x);y>-1&&y<x.children.length;){const w=x.children[y];if(g=o(w,y,C)(),g[0]===vc)return g;y=typeof g[1]=="number"?g[1]:y+a}}return d}}}function rB(e){return Array.isArray(e)?e:typeof e=="number"?[tB,e]:e==null?dy:[e]}function Ph(e,t,r,i){let n,s,a;typeof t=="function"&&typeof r!="function"?(s=void 0,a=t,n=r):(s=t,a=r,n=i),py(e,s,o,n);function o(l,c){const h=c[c.length-1],u=h?h.children.indexOf(l):void 0;return a(l,u,h)}}const Sc={}.hasOwnProperty,iB={};function nB(e,t){const r=t||iB,i=new Map,n=new Map,s=new Map,a={...O_,...r.handlers},o={all:c,applyData:aB,definitionById:i,footnoteById:n,footnoteCounts:s,footnoteOrder:[],handlers:a,one:l,options:r,patch:sB,wrap:lB};return Ph(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const u=h.type==="definition"?i:n,p=String(h.identifier).toUpperCase();u.has(p)||u.set(p,h)}}),o;function l(h,u){const p=h.type,d=o.handlers[p];if(Sc.call(o.handlers,p)&&d)return d(o,h,u);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in h){const{children:y,...C}=h,x=Ha(C);return x.children=o.all(h),x}return Ha(h)}return(o.options.unknownHandler||oB)(o,h,u)}function c(h){const u=[];if("children"in h){const p=h.children;let d=-1;for(;++d<p.length;){const g=o.one(p[d],h);if(g){if(d&&p[d-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Kd(g.value)),!Array.isArray(g)&&g.type==="element")){const y=g.children[0];y&&y.type==="text"&&(y.value=Kd(y.value))}Array.isArray(g)?u.push(...g):u.push(g)}}}return u}}function sB(e,t){e.position&&(t.position=Uv(e))}function aB(e,t){let r=t;if(e&&e.data){const i=e.data.hName,n=e.data.hChildren,s=e.data.hProperties;if(typeof i=="string")if(r.type==="element")r.tagName=i;else{const a="children"in r?r.children:[r];r={type:"element",tagName:i,properties:{},children:a}}r.type==="element"&&s&&Object.assign(r.properties,Ha(s)),"children"in r&&r.children&&n!==null&&n!==void 0&&(r.children=n)}return r}function oB(e,t){const r=t.data||{},i="value"in t&&!(Sc.call(r,"hProperties")||Sc.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function lB(e,t){const r=[];let i=-1;for(t&&r.push({type:"text",value:`
157`});++i<e.length;)i&&r.push({type:"text",value:`
158`}),r.push(e[i]);return t&&e.length>0&&r.push({type:"text",value:`
159`}),r}function Kd(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Zd(e,t){const r=nB(e,t),i=r.one(e,void 0),n=G_(r),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return n&&s.children.push({type:"text",value:`
160`},n),s}function cB(e,t){return e&&"run"in e?async function(r,i){const n=Zd(r,{file:i,...t});await e.run(n,i)}:function(r,i){return Zd(r,{file:i,...e||t})}}function Jd(e){if(e)throw e}var ll,tp;function hB(){if(tp)return ll;tp=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,n=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},s=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),u=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!u)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},a=function(c,h){r&&h.name==="__proto__"?r(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},o=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(i)return i(c,h).value}else return;return c[h]};return ll=function l(){var c,h,u,p,d,g,y=arguments[0],C=1,x=arguments.length,w=!1;for(typeof y=="boolean"&&(w=y,y=arguments[1]||{},C=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});C<x;++C)if(c=arguments[C],c!=null)for(h in c)u=o(y,h),p=o(c,h),y!==p&&(w&&p&&(s(p)||(d=n(p)))?(d?(d=!1,g=u&&n(u)?u:[]):g=u&&s(u)?u:{},a(y,{name:h,newValue:l(w,g,p)})):typeof p<"u"&&a(y,{name:h,newValue:p}));return y},ll}var uB=hB();const cl=zs(uB);function Tc(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);
vendor: 4,451 bytes, line 160
160return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function dB(){const e=[],t={run:r,use:i};return t;function r(...n){let s=-1;const a=n.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...n);function o(l,...c){const h=e[++s];let u=-1;if(l){a(l);return}for(;++u<n.length;)(c[u]===null||c[u]===void 0)&&(c[u]=n[u]);n=c,h?pB(h,o)(...c):a(null,...c)}}function i(n){if(typeof n!="function")throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function pB(e,t){let r;return i;function i(...a){const o=e.length>a.length;let l;o&&a.push(n);try{l=e.apply(this,a)}catch(c){const h=c;if(o&&r)throw h;return n(h)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,n):l instanceof Error?n(l):s(l))}function n(a,...o){r||(r=!0,t(a,...o))}function s(a){n(null,a)}}const vr={basename:fB,dirname:gB,extname:mB,join:yB,sep:"/"};function fB(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Us(e);let r=0,i=-1,n=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;n--;)if(e.codePointAt(n)===47){if(s){r=n+1;break}}else i<0&&(s=!0,i=n+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let a=-1,o=t.length-1;for(;n--;)if(e.codePointAt(n)===47){if(s){r=n+1;break}}else a<0&&(s=!0,a=n+1),o>-1&&(e.codePointAt(n)===t.codePointAt(o--)?o<0&&(i=n):(o=-1,i=a));return r===i?i=a:i<0&&(i=e.length),e.slice(r,i)}function gB(e){if(Us(e),e.length===0)return".";let t=-1,r=e.length,i;for(;--r;)if(e.codePointAt(r)===47){if(i){t=r;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function mB(e){Us(e);let t=e.length,r=-1,i=0,n=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){i=t+1;break}continue}r<0&&(a=!0,r=t+1),o===46?n<0?n=t:s!==1&&(s=1):n>-1&&(s=-1)}return n<0||r<0||s===0||s===1&&n===r-1&&n===i+1?"":e.slice(n,r)}function yB(...e){let t=-1,r;for(;++t<e.length;)Us(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":xB(r)}function xB(e){Us(e);const t=e.codePointAt(0)===47;let r=bB(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function bB(e,t){let r="",i=0,n=-1,s=0,a=-1,o,l;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(n===a-1||s===1))if(n!==a-1&&s===2){if(r.length<2||i!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",i=0):(r=r.slice(0,l),i=r.length-1-r.lastIndexOf("/")),n=a,s=0;continue}}else if(r.length>0){r="",i=0,n=a,s=0;continue}}t&&(r=r.length>0?r+"/..":"..",i=2)}else r.length>0?r+="/"+e.slice(n+1,a):r=e.slice(n+1,a),i=a-n-1;n=a,s=0}else o===46&&s>-1?s++:s=-1}return r}function Us(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const CB={cwd:kB};function kB(){return"/"}function _c(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function wB(e){if(typeof e=="string")e=new URL(e);else if(!_c(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return vB(e)}function vB(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const i=t.codePointAt(r+2);if(i===70||i===102){const n=new TypeError("File URL path must not include encoded / characters");throw n.code="ERR_INVALID_FILE_URL_PATH",n}}return decodeURIComponent(t)}const hl=["history","path","basename","stem","extname","dirname"];class fy{constructor(t){let r;t?_c(t)?r={path:t}:typeof t=="string"||SB(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":CB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<hl.length;){const s=hl[i];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let n;for(n in r)hl.includes(n)||(this[n]=r[n])}get basename(){return typeof this.path=="string"?vr.basename(this.path):void 0}
vendor: 11,278 bytes, line 160
160set basename(t){dl(t,"basename"),ul(t,"basename"),this.path=vr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?vr.dirname(this.path):void 0}set dirname(t){ep(this.basename,"dirname"),this.path=vr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?vr.extname(this.path):void 0}set extname(t){if(ul(t,"extname"),ep(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=vr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){_c(t)&&(t=wB(t)),dl(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?vr.basename(this.path,this.extname):void 0}set stem(t){dl(t,"stem"),ul(t,"stem"),this.path=vr.join(this.dirname||"",t+(this.extname||""))}fail(t,r,i){const n=this.message(t,r,i);throw n.fatal=!0,n}info(t,r,i){const n=this.message(t,r,i);return n.fatal=void 0,n}message(t,r,i){const n=new De(t,r,i);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ul(e,t){if(e&&e.includes(vr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+vr.sep+"`")}function dl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ep(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function SB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const TB=(function(e){const i=this.constructor.prototype,n=i[e],s=function(){return n.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),_B={}.hasOwnProperty;class Oh extends TB{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=dB()}copy(){const t=new Oh;let r=-1;for(;++r<this.attachers.length;){const i=this.attachers[r];t.use(...i)}return t.data(cl(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(gl("data",this.frozen),this.namespace[t]=r,this):_B.call(this.namespace,t)&&this.namespace[t]||void 0:t?(gl("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const n=r.call(t,...i);typeof n=="function"&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=ia(t),i=this.parser||this.Parser;return pl("parse",i),i(String(r),r)}process(t,r){const i=this;return this.freeze(),pl("process",this.parser||this.Parser),fl("process",this.compiler||this.Compiler),r?n(void 0,r):new Promise(n);function n(s,a){const o=ia(t),l=i.parse(o);i.run(l,o,function(h,u,p){if(h||!u||!p)return c(h);const d=u,g=i.stringify(d,p);AB(g)?p.value=g:p.result=g,c(h,p)});function c(h,u){h||!u?a(h):s?s(u):r(void 0,u)}}}processSync(t){let r=!1,i;return this.freeze(),pl("processSync",this.parser||this.Parser),fl("processSync",this.compiler||this.Compiler),this.process(t,n),ip("processSync","process",r),i;function n(s,a){r=!0,Jd(s),i=a}}run(t,r,i){rp(t),this.freeze();const n=this.transformers;return!i&&typeof r=="function"&&(i=r,r=void 0),i?s(void 0,i):new Promise(s);function s(a,o){const l=ia(r);n.run(t,l,c);function c(h,u,p){const d=u||t;h?o(h):a?a(d):i(void 0,d,p)}}}runSync(t,r){let i=!1,n;return this.run(t,r,s),ip("runSync","run",i),n;function s(a,o){Jd(a),n=o,i=!0}}stringify(t,r){this.freeze();const i=ia(r),n=this.compiler||this.Compiler;return fl("stringify",n),rp(t),n(t,i)}use(t,...r){const i=this.attachers,n=this.namespace;if(gl("use",this.frozen),t!=null)if(typeof t=="function")l(t,r);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...u]=c;l(h,u)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(c.plugins),c.settings&&(n.settings=cl(!0,n.settings,c.settings))}function o(c){let h=-1;if(c!=null)if(Array.isArray(c))for(;++h<c.length;){const u=c[h];s(u)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,h){let u=-1,p=-1;for(;++u<i.length;)if(i[u][0]===c){p=u;break}if(p===-1)i.push([c,...h]);else if(h.length>0){let[d,...g]=h;const y=i[p][1];Tc(y)&&Tc(d)&&(d=cl(!0,y,d)),i[p]=[c,d,...g]}}}}const BB=new Oh().freeze();function pl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function fl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function gl(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function rp(e){if(!Tc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ip(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ia(e){return LB(e)?e:new fy(e)}function LB(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function AB(e){return typeof e=="string"||FB(e)}function FB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const EB="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",np=[],sp={allowDangerousHtml:!0},NB=/^(https?|ircs?|mailto|xmpp)$/i,MB=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function $B(e){const t=jB(e),r=IB(e);return DB(t.runSync(t.parse(r),r),e)}function jB(e){const t=e.rehypePlugins||np,r=e.remarkPlugins||np,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...sp}:sp;return BB().use(p_).use(r).use(cB,i).use(t)}function IB(e){const t=e.children||"",r=new fy;return typeof t=="string"&&(r.value=t),r}function DB(e,t){const r=t.allowedElements,i=t.allowElement,n=t.components,s=t.disallowedElements,a=t.skipHtml,o=t.unwrapDisallowed,l=t.urlTransform||PB;for(const h of MB)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+EB+h.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Ph(e,c),Qv(e,{Fragment:f.Fragment,components:n,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function c(h,u,p){if(h.type==="raw"&&p&&typeof u=="number")return a?p.children.splice(u,1):p.children[u]={type:"text",value:h.value},u;if(h.type==="element"){let d;for(d in sl)if(Object.hasOwn(sl,d)&&Object.hasOwn(h.properties,d)){const g=h.properties[d],y=sl[d];(y===null||y.includes(h.tagName))&&(h.properties[d]=l(String(g||""),d,h))}}if(h.type==="element"){let d=r?!r.includes(h.tagName):s?s.includes(h.tagName):!1;if(!d&&i&&typeof u=="number"&&(d=!i(h,u,p)),d&&p&&typeof u=="number")return o&&h.children?p.children.splice(u,1,...h.children):p.children.splice(u,1),u}}}function PB(e){const t=e.indexOf(":"),r=e.indexOf("?"),i=e.indexOf("#"),n=e.indexOf("/");return t===-1||n!==-1&&t>n||r!==-1&&t>r||i!==-1&&t>i||NB.test(e.slice(0,t))?e:""}function ap(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,n=r.indexOf(t);for(;n!==-1;)i++,n=r.indexOf(t,n+t.length);return i}function OB(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function RB(e,t,r){const n=_o((r||{}).ignore||[]),s=qB(t);let a=-1;for(;++a<s.length;)py(e,"text",o);function o(c,h){let u=-1,p;for(;++u<h.length;){const d=h[u],g=p?p.children:void 0;if(n(d,g?g.indexOf(d):void 0,p))return;p=d}if(p)return l(c,h)}function l(c,h){const u=h[h.length-1],p=s[a][0],d=s[a][1];let g=0;const C=u.children.indexOf(c);let x=!1,w=[];p.lastIndex=0;let k=p.exec(c.value);for(;k;){const v=k.index,T={index:k.index,input:k.input,stack:[...h,c]};let L=d(...k,T);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?p.lastIndex=v+1:(g!==v&&w.push({type:"text",value:c.value.slice(g,v)}),Array.isArray(L)?w.push(...L):L&&w.push(L),g=v+k[0].length,x=!0),!p.global)break;k=p.exec(c.value)}return x?(g<c.value.length&&w.push({type:"text",value:c.value.slice(g)}),u.children.splice(C,1,...w)):w=[c],C+w.length}}function qB(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<r.length;){const n=r[i];t.push([zB(n[0]),WB(n[1])])}return t}function zB(e){return typeof e=="string"?new RegExp(OB(e),"g"):e}function WB(e){return typeof e=="function"?e:function(){return e}}const ml="phrasing",yl=["autolink","link","image","label"];function HB(){return{transforms:[KB],enter:{literalAutolink:YB,literalAutolinkEmail:xl,literalAutolinkHttp:xl,literalAutolinkWww:xl},exit:{literalAutolink:QB,literalAutolinkEmail:XB,literalAutolinkHttp:VB,literalAutolinkWww:GB}}}function UB(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ml,notInConstruct:yl},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ml,notInConstruct:yl},{character:":",before:"[ps]",after:"\\/",inConstruct:ml,notInConstruct:yl}]}}function YB(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function xl(e){this.config.enter.autolinkProtocol.call(this,e)}function VB(e){this.config.exit.autolinkProtocol.call(this,e)}function GB(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function XB(e){this.config.exit.autolinkEmail.call(this,e)}function QB(e){this.exit(e)}function KB(e){RB(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ZB],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S}
160)([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),JB]],{ignore:["link","linkReference"]})}function ZB(e,t,r,i,n){let s="";if(!gy(n)||(/^w/i.test(t)&&(r=t+r,t="",s="http://"),!t5(r)))return!1;const a=e5(r+i);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function JB(e,t,r,i){return!gy(i,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function t5(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function e5(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],i=r.indexOf(")");const n=ap(e,"(");let s=ap(e,")");for(;i!==-1&&n>s;)e+=r.slice(0,i+1),r=r.slice(i+1),i=r.indexOf(")"),s++;return[e,r]}function gy(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Ei(r)||vo(r))&&(!t||r!==47)}my.peek=h5;function r5(){this.buffer()}function i5(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function n5(){this.buffer()}function s5(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function a5(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=fr(this.sliceSerialize(e)).toLowerCase(),r.label=t}function o5(e){this.exit(e)}function l5(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=fr(this.sliceSerialize(e)).toLowerCase(),r.label=t}function c5(e){this.exit(e)}function h5(){return"["}function my(e,t,r,i){const n=r.createTracker(i);let s=n.move("[^");const a=r.enter("footnoteReference"),o=r.enter("reference");return s+=n.move(r.safe(r.associationId(e),{after:"]",before:s})),o(),a(),s+=n.move("]"),s}function u5(){return{enter:{gfmFootnoteCallString:r5,gfmFootnoteCall:i5,gfmFootnoteDefinitionLabelString:n5,gfmFootnoteDefinition:s5},exit:{gfmFootnoteCallString:a5,gfmFootnoteCall:o5,gfmFootnoteDefinitionLabelString:l5,gfmFootnoteDefinition:c5}}}function d5(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:my},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(i,n,s,a){const o=s.createTracker(a);let l=o.move("[^");const c=s.enter("footnoteDefinition"),h=s.enter("label");return l+=o.move(s.safe(s.associationId(i),{before:l,after:"]"})),h(),l+=o.move("]:"),i.children&&i.children.length>0&&(o.shift(4),l+=o.move((t?`
161`:" ")+s.indentLines(s.containerFlow(i,o.current()),t?yy:p5))),c(),l}}function p5(e,t,r){return t===0?e:yy(e,t,r)}function yy(e,t,r){return(r?"":"    ")+e}const f5=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];xy.peek=b5;function g5(){return{canContainEols:["delete"],enter:{strikethrough:y5},exit:{strikethrough:x5}}}function m5(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:f5}],handlers:{delete:xy}}}function y5(e){this.enter({type:"delete",children:[]},e)}function x5(e){this.exit(e)}function xy(e,t,r,i){const n=r.createTracker(i),s=r.enter("strikethrough");let a=n.move("~~");return a+=r.containerPhrasing(e,{...n.current(),before:a,after:"~"}),a+=n.move("~~"),s(),a}function b5(){return"~"}function C5(e){return e.length}function k5(e,t){const r=t||{},i=(r.align||[]).concat(),n=r.stringLength||C5,s=[],a=[],o=[],l=[];let c=0,h=-1;for(;++h<e.length;){const y=[],C=[];let x=-1;for(e[h].length>c&&(c=e[h].length);++x<e[h].length;){const w=w5(e[h][x]);if(r.alignDelimiters!==!1){const k=n(w);C[x]=k,(l[x]===void 0||k>l[x])&&(l[x]=k)}y.push(w)}a[h]=y,o[h]=C}let u=-1;if(typeof i=="object"&&"length"in i)for(;++u<c;)s[u]=op(i[u]);else{const y=op(i);for(;++u<c;)s[u]=y}u=-1;const p=[],d=[];for(;++u<c;){const y=s[u];let C="",x="";y===99?(C=":",x=":"):y===108?C=":":y===114&&(x=":");let w=r.alignDelimiters===!1?1:Math.max(1,l[u]-C.length-x.length);const k=C+"-".repeat(w)+x;r.alignDelimiters!==!1&&(w=C.length+w+x.length,w>l[u]&&(l[u]=w),d[u]=w),p[u]=k}a.splice(1,0,p),o.splice(1,0,d),h=-1;const g=[];for(;++h<a.length;){const y=a[h],C=o[h];u=-1;const x=[];for(;++u<c;){const w=y[u]||"";let k="",v="";if(r.alignDelimiters!==!1){const T=l[u]-(C[u]||0),L=s[u];L===114?k=" ".repeat(T):L===99?T%2?(k=" ".repeat(T/2+.5),v=" ".repeat(T/2-.5)):(k=" ".repeat(T/2),v=k):v=" ".repeat(T)}r.delimiterStart!==!1&&!u&&x.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&w==="")&&(r.delimiterStart!==!1||u)&&x.push(" "),r.alignDelimiters!==!1&&x.push(k),x.push(w),r.alignDelimiters!==!1&&x.push(v),r.padding!==!1&&x.push(" "),(r.delimiterEnd!==!1||u!==c-1)&&x.push("|")}g.push(r.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return g.join(`
162`)}function w5(e){return e==null?"":String(e)}function op(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function v5(e,t,r,i){const n=r.enter("blockquote"),s=r.createTracker(i);s.move("> "),s.shift(2);const a=r.indentLines(r.containerFlow(e,s.current()),S5);return n(),a}function S5(e,t,r){return">"+(r?"":" ")+e}function T5(e,t){return lp(e,t.inConstruct,!0)&&!lp(e,t.notInConstruct,!1)}function lp(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function cp(e,t,r,i){let n=-1;for(;++n<r.unsafe.length;)if(r.unsafe[n].character===`
163`&&T5(r.stack,r.unsafe[n]))return/[ \t]/.test(i.before)?"":" ";return`\\
164`}function _5(e,t){const r=String(e);let i=r.indexOf(t),n=i,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===n?++s>
vendor: 10,795 bytes, lines 164-173
164a&&(a=s):s=1,n=i+t.length,i=r.indexOf(t,n);return a}function B5(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function L5(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function A5(e,t,r,i){const n=L5(r),s=e.value||"",a=n==="`"?"GraveAccent":"Tilde";if(B5(e,r)){const u=r.enter("codeIndented"),p=r.indentLines(s,F5);return u(),p}const o=r.createTracker(i),l=n.repeat(Math.max(_5(s,n)+1,3)),c=r.enter("codeFenced");let h=o.move(l);if(e.lang){const u=r.enter(`codeFencedLang${a}`);h+=o.move(r.safe(e.lang,{before:h,after:" ",encode:["`"],...o.current()})),u()}if(e.lang&&e.meta){const u=r.enter(`codeFencedMeta${a}`);h+=o.move(" "),h+=o.move(r.safe(e.meta,{before:h,after:`
165`,encode:["`"],...o.current()})),u()}return h+=o.move(`
166`),s&&(h+=o.move(s+`
167`)),h+=o.move(l),c(),h}function F5(e,t,r){return(r?"":"    ")+e}function Rh(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function E5(e,t,r,i){const n=Rh(r),s=n==='"'?"Quote":"Apostrophe",a=r.enter("definition");let o=r.enter("label");const l=r.createTracker(i);let c=l.move("[");return c+=l.move(r.safe(r.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=r.enter("destinationRaw"),c+=l.move(r.safe(e.url,{before:c,after:e.title?" ":`
168`,...l.current()}))),o(),e.title&&(o=r.enter(`title${s}`),c+=l.move(" "+n),c+=l.move(r.safe(e.title,{before:c,after:n,...l.current()})),c+=l.move(n),o()),a(),c}function N5(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Fs(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ua(e,t,r){const i=Tn(e),n=Tn(t);return i===void 0?n===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:n===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?n===void 0?{inside:!1,outside:!1}:n===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:n===void 0?{inside:!1,outside:!1}:n===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}by.peek=M5;function by(e,t,r,i){const n=N5(r),s=r.enter("emphasis"),a=r.createTracker(i),o=a.move(n);let l=a.move(r.containerPhrasing(e,{after:n,before:o,...a.current()}));const c=l.charCodeAt(0),h=Ua(i.before.charCodeAt(i.before.length-1),c,n);h.inside&&(l=Fs(c)+l.slice(1));const u=l.charCodeAt(l.length-1),p=Ua(i.after.charCodeAt(0),u,n);p.inside&&(l=l.slice(0,-1)+Fs(u));const d=a.move(n);return s(),r.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+l+d}function M5(e,t,r){return r.options.emphasis||"*"}function $5(e,t){let r=!1;return Ph(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return r=!0,vc}),!!((!e.depth||e.depth<3)&&Eh(e)&&(t.options.setext||r))}function j5(e,t,r,i){const n=Math.max(Math.min(6,e.depth||1),1),s=r.createTracker(i);if($5(e,r)){const h=r.enter("headingSetext"),u=r.enter("phrasing"),p=r.containerPhrasing(e,{...s.current(),before:`
169`,after:`
170`});return u(),h(),p+`
171`+(n===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
172`))+1))}const a="#".repeat(n),o=r.enter("headingAtx"),l=r.enter("phrasing");s.move(a+" ");let c=r.containerPhrasing(e,{before:"# ",after:`
173`,...s.current()});return/^[\t ]/.test(c)&&(c=Fs(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,r.options.closeAtx&&(c+=" "+a),l(),o(),c}Cy.peek=I5;function Cy(e){return e.value||""}function I5(){return"<"}ky.peek=D5;function ky(e,t,r,i){const n=Rh(r),s=n==='"'?"Quote":"Apostrophe",a=r.enter("image");let o=r.enter("label");const l=r.createTracker(i);let c=l.move("![");return c+=l.move(r.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=r.enter("destinationRaw"),c+=l.move(r.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=r.enter(`title${s}`),c+=l.move(" "+n),c+=l.move(r.safe(e.title,{before:c,after:n,...l.current()})),c+=l.move(n),o()),c+=l.move(")"),a(),c}function D5(){return"!"}wy.peek=P5;function wy(e,t,r,i){const n=e.referenceType,s=r.enter("imageReference");let a=r.enter("label");const o=r.createTracker(i);let l=o.move("![");const c=r.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),a();const h=r.stack;r.stack=[],a=r.enter("reference");const u=r.safe(r.associationId(e),{before:l,after:"]",...o.current()});return a(),r.stack=h,s(),n==="full"||!c||c!==u?l+=o.move(u+"]"):n==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function P5(){return"!"}vy.peek=O5;function vy(e,t,r){let i=e.value||"",n="`",s=-1;for(;new RegExp("(^|[^`])"+n+"([^`]|$)").test(i);)n+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s<r.unsafe.length;){const a=r.unsafe[s],o=r.compilePattern(a);let l;if(a.atBreak)for(;l=o.exec(i);){let c=l.index;i.charCodeAt(c)===10&&i.charCodeAt(c-1)===13&&c--,i=i.slice(0,c)+" "+i.slice(l.index+1)}}return n+i+n}function O5(){return"`"}function Sy(e,t){const r=Eh(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ty.peek=R5;function Ty(e,t,r,i){const n=Rh(r),s=n==='"'?"Quote":"Apostrophe",a=r.createTracker(i);let o,l;if(Sy(e,r)){const h=r.stack;r.stack=[],o=r.enter("autolink");let u=a.move("<");return u+=a.move(r.containerPhrasing(e,{before:u,after:">",...a.current()})),u+=a.move(">"),o(),r.stack=h,u}o=r.enter("link"),l=r.enter("label");let c=a.move("[");return c+=a.move(r.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(r.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=r.enter("destinationRaw"),c+=a.move(r.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=r.enter(`title${s}`),c+=a.move(" "+n),c+=a.move(r.safe(e.title,{before:c,after:n,...a.current()})),c+=a.move(n),l()),c+=a.move(")"),o(),c}function R5(e,t,r){return Sy(e,r)?"<":"["}_y.peek=q5;function _y(e,t,r,i){const n=e.referenceType,s=r.enter("linkReference");let a=r.enter("label");const o=r.createTracker(i);let l=o.move("[");const c=r.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),a();const h=r.stack;r.stack=[],a=r.enter("reference");const u=r.safe(r.associationId(e),{before:l,after:"]",...o.current()});return a(),r.stack=h,s(),n==="full"||!c||c!==u?l+=o.move(u+"]"):n==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function q5(){return"["}function qh(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function z5(e){const t=qh(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function W5(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function By(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function H5(e,t,r,i){const n=r.enter("list"),s=r.bulletCurrent;let a=e.ordered?W5(r):qh(r);const o=e.ordered?a==="."?")":".":z5(r);let l=t&&r.bulletLastUsed?a===r.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(l=!0),By(r)===a&&h){let u=-1;for(;++u<e.children.length;){const p=e.children[u];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=o),r.bulletCurrent=a;const c=r.containerFlow(e,i);return r.bulletLastUsed=a,r.bulletCurrent=s,n(),c}function U5(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Y5(e,t,r,i){const n=U5(r);let s=r.bulletCurrent||qh(r);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(n==="tab"||n==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=r.createTracker(i);o.move(s+" ".repeat(a-s.length)),o.shift(a);const l=r.enter("listItem"),c=r.indentLines(r.containerFlow(e,o.current()),h);return l(),c;function h(u,p,d){return p?(d?"":" ".repeat(a))+u:(d?s:s+" ".repeat(a-s.length))+u}}function V5(e,t,r,i){const n=r.enter("paragraph"),s=r.enter("phrasing"),a=r.containerPhrasing(e,i);return s(),n(),a}const G5=_o(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function X5(e,t,r,i){return(e.children.some(function(a){return G5(a)})?r.containerPhrasing:r.containerFlow).call(r,e,i)}function Q5(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ly.peek=K5;function Ly(e,t,r,i){const n=Q5(r),s=r.enter("strong"),a=r.createTracker(i),o=a.move(n+n);let l=a.move(r.containerPhrasing(e,{after:n,before:o,...a.current()}));const c=l.charCodeAt(0),h=Ua(i.before.charCodeAt(i.before.length-1),c,n);h.inside&&(l=Fs(c)+l.slice(1));const u=l.charCodeAt(l.length-1),p=Ua(i.after.charCodeAt(0),u,n);p.inside&&(l=l.slice(0,-1)+Fs(u));const d=a.move(n+n);return s(),r.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+l+d}function K5(e,t,r){return r.options.strong||"*"}
vendor: 5,796 bytes, lines 173-175
173function Z5(e,t,r,i){return r.safe(e.value,i)}function J5(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function tL(e,t,r){const i=(By(r)+(r.options.ruleSpaces?" ":"")).repeat(J5(r));return r.options.ruleSpaces?i.slice(0,-1):i}const Ay={blockquote:v5,break:cp,code:A5,definition:E5,emphasis:by,hardBreak:cp,heading:j5,html:Cy,image:ky,imageReference:wy,inlineCode:vy,link:Ty,linkReference:_y,list:H5,listItem:Y5,paragraph:V5,root:X5,strong:Ly,text:Z5,thematicBreak:tL};function eL(){return{enter:{table:rL,tableData:hp,tableHeader:hp,tableRow:nL},exit:{codeText:sL,table:iL,tableData:bl,tableHeader:bl,tableRow:bl}}}function rL(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function iL(e){this.exit(e),this.data.inTable=void 0}function nL(e){this.enter({type:"tableRow",children:[]},e)}function bl(e){this.exit(e)}function hp(e){this.enter({type:"tableCell",children:[]},e)}function sL(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,aL));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function aL(e,t){return t==="|"?t:e}function oL(e){const t=e||{},r=t.tableCellPadding,i=t.tablePipeAlign,n=t.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
174`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:l,tableRow:o}};function a(d,g,y,C){return c(h(d,y,C),d.align)}function o(d,g,y,C){const x=u(d,y,C),w=c([x]);return w.slice(0,w.indexOf(`
175`))}function l(d,g,y,C){const x=y.enter("tableCell"),w=y.enter("phrasing"),k=y.containerPhrasing(d,{...C,before:s,after:s});return w(),x(),k}function c(d,g){return k5(d,{align:g,alignDelimiters:i,padding:r,stringLength:n})}function h(d,g,y){const C=d.children;let x=-1;const w=[],k=g.enter("table");for(;++x<C.length;)w[x]=u(C[x],g,y);return k(),w}function u(d,g,y){const C=d.children;let x=-1;const w=[],k=g.enter("tableRow");for(;++x<C.length;)w[x]=l(C[x],d,g,y);return k(),w}function p(d,g,y){let C=Ay.inlineCode(d,g,y);return y.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function lL(){return{exit:{taskListCheckValueChecked:up,taskListCheckValueUnchecked:up,paragraph:hL}}}function cL(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:uL}}}function up(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function hL(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const i=r.children[0];if(i&&i.type==="text"){const n=t.children;let s=-1,a;for(;++s<n.length;){const o=n[s];if(o.type==="paragraph"){a=o;break}}a===r&&(i.value=i.value.slice(1),i.value.length===0?r.children.shift():r.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function uL(e,t,r,i){const n=e.children[0],s=typeof e.checked=="boolean"&&n&&n.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=r.createTracker(i);s&&o.move(a);let l=Ay.listItem(e,t,r,{...i,...o.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(h){return h+a}}function dL(){return[HB(),u5(),g5(),eL(),lL()]}function pL(e){return{extensions:[UB(),d5(e),m5(),oL(e),cL()]}}const fL={tokenize:CL,partial:!0},Fy={tokenize:kL,partial:!0},Ey={tokenize:wL,partial:!0},Ny={tokenize:vL,partial:!0},gL={tokenize:SL,partial:!0},My={name:"wwwAutolink",tokenize:xL,previous:jy},$y={name:"protocolAutolink",tokenize:bL,previous:Iy},Yr={name:"emailAutolink",tokenize:yL,previous:Dy},Fr={};function mL(){return{text:Fr}}let gi=48;for(;gi<123;)Fr[gi]=Yr,gi++,gi===58?gi=65:gi===91&&(gi=97);Fr[43]=Yr;Fr[45]=Yr;Fr[46]=Yr;Fr[95]=Yr;Fr[72]=[Yr,$y];Fr[104]=[Yr,$y];Fr[87]=[Yr,My];Fr[119]=[Yr,My];function yL(e,t,r){const i=this;let n,s;return a;function a(u){return!Bc(u)||!Dy.call(i,i.previous)||zh(i.events)?r(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(u))}function o(u){return Bc(u)?(e.consume(u),o):u===64?(e.consume(u),l):r(u)}function l(u){return u===46?e.check(gL,h,c)(u):u===45||u===95||$e(u)?(s=!0,e.consume(u),l):h(u)}function c(u){return e.consume(u),n=!0,l}function h(u){return s&&n&&ze(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):r(u)}}function xL(e,t,r){const i=this;return n;function n(a){return a!==87&&a!==119||!jy.call(i,i.previous)||zh(i.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(fL,e.attempt(Fy,e.attempt(Ey,s),r),r)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function bL(e,t,r){const i=this;let n="",s=!1;return a;function a(u){return(u===72||u===104)&&Iy.call(i,i.previous)&&!zh(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),n+=String.fromCodePoint(u),e.consume(u),o):r(u)}function o(u){if(ze(u)&&n.length<5)return n+=String.fromCodePoint(u),e.consume(u),o;if(u===58){const p=n.toLowerCase();if(p==="http"||p==="https")return e.consume(u),l}return r(u)}function l(u){return u===47?(e.consume(u),s?c:(s=!0,l)):r(u)}function c(u){return u===null||za(u)||he(u)||Ei(u)||vo(u)?r(u):e.attempt(Fy,e.attempt(Ey,h),r)(u)}function h(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function CL(e,t,r){let i=0;return n;function n(a){return(a===87||a===119)&&i<3?(i++,e.consume(a),n):a===46&&i===3?(e.consume(a),s):r(a)}
vendor: 8,036 bytes, line 175
175function s(a){return a===null?r(a):t(a)}}function kL(e,t,r){let i,n,s;return a;function a(c){return c===46||c===95?e.check(Ny,l,o)(c):c===null||he(c)||Ei(c)||c!==45&&vo(c)?l(c):(s=!0,e.consume(c),a)}function o(c){return c===95?i=!0:(n=i,i=void 0),e.consume(c),a}function l(c){return n||i||!s?r(c):t(c)}}function wL(e,t){let r=0,i=0;return n;function n(a){return a===40?(r++,e.consume(a),n):a===41&&i<r?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Ny,t,s)(a):a===null||he(a)||Ei(a)?t(a):(e.consume(a),n)}function s(a){return a===41&&i++,e.consume(a),n}}function vL(e,t,r){return i;function i(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),i):o===38?(e.consume(o),s):o===93?(e.consume(o),n):o===60||o===null||he(o)||Ei(o)?t(o):r(o)}function n(o){return o===null||o===40||o===91||he(o)||Ei(o)?t(o):i(o)}function s(o){return ze(o)?a(o):r(o)}function a(o){return o===59?(e.consume(o),i):ze(o)?(e.consume(o),a):r(o)}}function SL(e,t,r){return i;function i(s){return e.consume(s),n}function n(s){return $e(s)?r(s):t(s)}}function jy(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||he(e)}function Iy(e){return!ze(e)}function Dy(e){return!(e===47||Bc(e))}function Bc(e){return e===43||e===45||e===46||e===95||$e(e)}function zh(e){let t=e.length,r=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){r=!0;break}if(i._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const TL={tokenize:ML,partial:!0};function _L(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:FL,continuation:{tokenize:EL},exit:NL}},text:{91:{name:"gfmFootnoteCall",tokenize:AL},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:BL,resolveTo:LL}}}}function BL(e,t,r){const i=this;let n=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a;for(;n--;){const l=i.events[n][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return r(l);const c=fr(i.sliceSerialize({start:a.end,end:i.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?r(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function LL(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},n={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};n.end.column++,n.end.offset++,n.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},n.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[r+1],e[r+2],["enter",i,t],e[r+3],e[r+4],["enter",n,t],["exit",n,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(r,e.length-r+1,...o),e}function AL(e,t,r){const i=this,n=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,a;return o;function o(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?r(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(u){if(s>999||u===93&&!a||u===null||u===91||he(u))return r(u);if(u===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return n.includes(fr(i.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(u)}return he(u)||(a=!0),s++,e.consume(u),u===92?h:c}function h(u){return u===91||u===92||u===93?(e.consume(u),s++,c):c(u)}}function FL(e,t,r){const i=this,n=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):r(g)}function h(g){if(a>999||g===93&&!o||g===null||g===91||he(g))return r(g);if(g===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return s=fr(i.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return he(g)||(o=!0),a++,e.consume(g),g===92?u:h}function u(g){return g===91||g===92||g===93?(e.consume(g),a++,h):h(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),n.includes(s)||n.push(s),Jt(e,d,"gfmFootnoteDefinitionWhitespace")):r(g)}function d(g){return t(g)}}function EL(e,t,r){return e.check(Hs,t,e.attempt(TL,t,r))}function NL(e){e.exit("gfmFootnoteDefinition")}function ML(e,t,r){const i=this;return Jt(e,n,"gfmFootnoteDefinitionIndent",5);function n(s){const a=i.events[i.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):r(s)}}function $L(e){let r=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:s,resolveAll:n};return r==null&&(r=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function n(a,o){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},u={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",h,o],["enter",a[c][1],o],["exit",a[c][1],o],["enter",u,o]],d=o.parser.constructs.insideSpan.null;d&&Je(p,p.length,0,So(d,a.slice(c+1,l),o)),Je(p,p.length,0,[["exit",u,o],["enter",a[l][1],o],["exit",a[l][1],o],["exit",h,o]]),Je(a,c-1,l-c+3,p),l=c+p.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function s(a,o,l){const c=this.previous,h=this.events;let u=0;return p;function p(g){return c===126&&h[h.length-1][1].type!=="characterEscape"?l(g):(a.enter("strikethroughSequenceTemporary"),d(g))}function d(g){const y=Tn(c);if(g===126)return u>1?l(g):(a.consume(g),u++,d);if(u<2&&!r)return l(g);const C=a.exit("strikethroughSequenceTemporary"),x=Tn(g);return C._open=!x||x===2&&!!y,C._close=!y||y===2&&!!x,o(g)}}}class jL{constructor(){this.map=[]}add(t,r,i){IL(this,t,r,i)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let r=this.map.length;const i=[];for(;r>0;)r-=1,i.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];i.push(t.slice()),t.length=0;let n=i.pop();for(;n;){for(const s of n)t.push(s);n=i.pop()}this.map.length=0}}function IL(e,t,r,i){let n=0;if(!(r===0&&i.length===0)){for(;n<e.map.length;){if(e.map[n][0]===t){e.map[n][1]+=r,e.map[n][2].push(...i);return}n+=1}e.map.push([t,r,i])}}function DL(e,t){let r=!1;const i=[];for(;t<e.length;){const n=e[t];if(r){if(n[0]==="enter")n[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left"
vendor: 4,353 bytes, line 175
175:"none");else if(n[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=i.length-1;i[s]=i[s]==="left"?"center":"right"}}else if(n[1].type==="tableDelimiterRow")break}else n[0]==="enter"&&n[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return i}function PL(){return{flow:{null:{name:"table",tokenize:OL,resolveAll:RL}}}}function OL(e,t,r){const i=this;let n=0,s=0,a;return o;function o(E){let N=i.events.length-1;for(;N>-1;){const I=i.events[N][1].type;if(I==="lineEnding"||I==="linePrefix")N--;else break}const z=N>-1?i.events[N][1].type:null,O=z==="tableHead"||z==="tableRow"?L:l;return O===L&&i.parser.lazy[i.now().line]?r(E):O(E)}function l(E){return e.enter("tableHead"),e.enter("tableRow"),c(E)}function c(E){return E===124||(a=!0,s+=1),h(E)}function h(E){return E===null?r(E):Rt(E)?s>1?(s=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),d):r(E):Xt(E)?Jt(e,h,"whitespace")(E):(s+=1,a&&(a=!1,n+=1),E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),u(E)))}function u(E){return E===null||E===124||he(E)?(e.exit("data"),h(E)):(e.consume(E),E===92?p:u)}function p(E){return E===92||E===124?(e.consume(E),u):u(E)}function d(E){return i.interrupt=!1,i.parser.lazy[i.now().line]?r(E):(e.enter("tableDelimiterRow"),a=!1,Xt(E)?Jt(e,g,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):g(E))}function g(E){return E===45||E===58?C(E):E===124?(a=!0,e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),y):T(E)}function y(E){return Xt(E)?Jt(e,C,"whitespace")(E):C(E)}function C(E){return E===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),x):E===45?(s+=1,x(E)):E===null||Rt(E)?v(E):T(E)}function x(E){return E===45?(e.enter("tableDelimiterFiller"),w(E)):T(E)}function w(E){return E===45?(e.consume(E),w):E===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(E))}function k(E){return Xt(E)?Jt(e,v,"whitespace")(E):v(E)}function v(E){return E===124?g(E):E===null||Rt(E)?!a||n!==s?T(E):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(E)):T(E)}function T(E){return r(E)}function L(E){return e.enter("tableRow"),D(E)}function D(E){return E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),D):E===null||Rt(E)?(e.exit("tableRow"),t(E)):Xt(E)?Jt(e,D,"whitespace")(E):(e.enter("data"),M(E))}function M(E){return E===null||E===124||he(E)?(e.exit("data"),D(E)):(e.consume(E),E===92?W:M)}function W(E){return E===92||E===124?(e.consume(E),M):M(E)}}function RL(e,t){let r=-1,i=!0,n=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,c,h,u;const p=new jL;for(;++r<e.length;){const d=e[r],g=d[1];d[0]==="enter"?g.type==="tableHead"?(o=!1,l!==0&&(dp(p,t,l,c,h),h=void 0,l=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(r,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(i=!0,u=void 0,s=[0,0,0,0],a=[0,r+1,0,0],o&&(o=!1,h={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(r,0,[["enter",h,t]])),n=g.type==="tableDelimiterRow"?2:h?3:1):n&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(i=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],u=na(p,t,s,n,void 0,u),s=[0,0,0,0]),a[2]=r)):g.type==="tableCellDivider"&&(i?i=!1:(s[1]!==0&&(a[0]=a[1],u=na(p,t,s,n,void 0,u)),s=a,a=[s[1],r,0,0])):g.type==="tableHead"?(o=!0,l=r):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=r,s[1]!==0?(a[0]=a[1],u=na(p,t,s,n,r,u)):a[1]!==0&&(u=na(p,t,a,n,r,u)),n=0):n&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=r)}for(l!==0&&dp(p,t,l,c,h),p.consume(t.events),r=-1;++r<t.events.length;){const d=t.events[r];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=DL(t.events,r))}return e}function na(e,t,r,i,n,s){const a=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",o="tableContent";r[0]!==0&&(s.end=Object.assign({},Ji(t.events,r[0])),e.add(r[0],0,[["exit",s,t]]));const l=Ji(t.events,r[1]);if(s={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(r[1],0,[["enter",s,t]]),r[2]!==0){const c=Ji(t.events,r[2]),h=Ji(t.events,r[3]),u={type:o,start:Object.assign({},c),end:Object.assign({},h)};
vendor: 6,845 bytes, line 175
175if(e.add(r[2],0,[["enter",u,t]]),i!==2){const p=t.events[r[2]],d=t.events[r[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){const g=r[2]+1,y=r[3]-r[2]-1;e.add(g,y,[])}}e.add(r[3]+1,0,[["exit",u,t]])}return n!==void 0&&(s.end=Object.assign({},Ji(t.events,n)),e.add(n,0,[["exit",s,t]]),s=void 0),s}function dp(e,t,r,i,n){const s=[],a=Ji(t.events,r);n&&(n.end=Object.assign({},a),s.push(["exit",n,t])),i.end=Object.assign({},a),s.push(["exit",i,t]),e.add(r+1,0,s)}function Ji(e,t){const r=e[t],i=r[0]==="enter"?"start":"end";return r[1][i]}const qL={name:"tasklistCheck",tokenize:WL};function zL(){return{text:{91:qL}}}function WL(e,t,r){const i=this;return n;function n(l){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?r(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return he(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):r(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):r(l)}function o(l){return Rt(l)?t(l):Xt(l)?e.check({tokenize:HL},t,r)(l):r(l)}}function HL(e,t,r){return Jt(e,i,"whitespace");function i(n){return n===null?r(n):t(n)}}function UL(e){return Vm([mL(),_L(),$L(e),PL(),zL()])}const YL={};function VL(e){const t=this,r=e||YL,i=t.data(),n=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),a=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);n.push(UL(r)),s.push(dL()),a.push(pL(r))}var Py=Object.defineProperty,b=(e,t)=>Py(e,"name",{value:t,configurable:!0}),GL=(e,t)=>{for(var r in t)Py(e,r,{get:t[r],enumerable:!0})},wa={exports:{}},XL=wa.exports,pp;function QL(){return pp||(pp=1,(function(e,t){(function(r,i){e.exports=i()})(XL,(function(){var r=1e3,i=6e4,n=36e5,s="millisecond",a="second",o="minute",l="hour",c="day",h="week",u="month",p="quarter",d="year",g="date",y="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|YYYY|YY|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,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var j=["th","st","nd","rd"],A=I%100;return"["+I+(j[(A-20)%10]||j[A]||j[0])+"]"}},k=function(I,j,A){var R=String(I);return!R||R.length>=j?I:""+Array(j+1-R.length).join(A)+I},v={s:k,z:function(I){var j=-I.utcOffset(),A=Math.abs(j),R=Math.floor(A/60),H=A%60;return(j<=0?"+":"-")+k(R,2,"0")+":"+k(H,2,"0")},m:function I(j,A){if(j.date()<A.date())return-I(A,j);var R=12*(A.year()-j.year())+(A.month()-j.month()),H=j.clone().add(R,u),q=A-H<0,_=j.clone().add(R+(q?-1:1),u);return+(-(R+(A-H)/(q?H-_:_-H))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:u,y:d,w:h,d:c,D:g,h:l,m:o,s:a,ms:s,Q:p}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},T="en",L={};L[T]=w;var D="$isDayjsObject",M=function(I){return I instanceof z||!(!I||!I[D])},W=function I(j,A,R){var H;if(!j)return T;if(typeof j=="string"){var q=j.toLowerCase();L[q]&&(H=q),A&&(L[q]=A,H=q);var _=j.split("-");if(!H&&_.length>1)return I(_[0])}else{var ct=j.name;L[ct]=j,H=ct}return!R&&H&&(T=H),H||!R&&T},E=function(I,j){if(M(I))return I.clone();var A=typeof j=="object"?j:{};return A.date=I,A.args=arguments,new z(A)},N=v;N.l=W,N.i=M,N.w=function(I,j){return E(I,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var z=(function(){function I(A){this.$L=W(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[D]=!0}var j=I.prototype;return j.parse=function(A){this.$d=(function(R){var H=R.date,q=R.utc;if(H===null)return new Date(NaN);if(N.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var _=H.match(C);if(_){var ct=_[2]-1||0,X=(_[7]||"0").substring(0,3);return q?new Date(Date.UTC(_[1],ct,_[3]||1,_[4]||0,_[5]||0,_[6]||0,X)):new Date(_[1],ct,_[3]||1,_[4]||0,_[5]||0,_[6]||0,X)}}return new Date(H)})(A),this.init()},j.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},j.$utils=function(){return N},j.isValid=function(){return this.$d.toString()!==y},j.isSame=function(A,R){var H=E(A);return this.startOf(R)<=H&&H<=this.endOf(R)},j.isAfter=function(A,R){return E(A)<this.startOf(R)},j.isBefore=function(A,R){return this.endOf(R)<E(A)},j.$g=function(A,R,H){return N.u(A)?this[R]:this.set(H,A)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(A,R){var H=this,q=!!N.u(R)||R,_=N.p(A),ct=function(st,at){var dt=N.w(H.$u?Date.UTC(H.$y,at,st):new Date(H.$y,at,st),H);return q?dt:dt.endOf(c)},X=function(st,at){return N.w(H.toDate()[st].apply(H.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(at)),H)},F=this.$W,ht=this.$M,pt=this.$D,wt="set"+(this.$u?"UTC":"");switch(_){case d:return q?ct(1,0):ct(31,11);case u:return q?ct(1,ht):ct(0,ht+1);case h:var P=this.$locale().weekStart||0,mt=(F<P?F+7:F)-P;return ct(q?pt-mt:pt+(6-mt),ht);case c:case g:return X(wt+"Hours",0);case l:return X(wt+"Minutes",1);case o:return X(wt+"Seconds",2);case a:return X(wt+"Milliseconds",3);default:return this.clone()}},j.endOf=function(A){return this.startOf(A,!1)},j.$set=function(A,R){var H,q=N.p(A),_="set"+(this.$u?"UTC":""),ct=(H={},H[c]=_+"Date",H[g]=_+"Date",H[u]=_+"Month",H[d]=_+"FullYear",H[l]=_+"Hours",H[o]=_+"Minutes",H[a]=_+"Seconds",H[s]=_+"Milliseconds",H)[q],X=q===c?this.$D+(R-this.$W):R;if(q===u||q===d){var F=this.clone().set(g,1);F.$d[ct](X),F.init(),this.$d=F.set(g,Math.min(this.$D,F.daysInMonth())).$d}else ct&&this.$d[ct](X);return this.init(),this},j.set=function(A,R){return this.clone().$set(A,R)},j.get=function(A){return this[N.p(A)]()},j.add=function(A,R){var H,q=this;A=Number(A);var _=N.p(R),ct=function(ht){var pt=E(q);return N.w(pt.date(pt.date()+Math.round(ht*A)),q)};if(_===u)return this.set(u,this.$M+A);if(_===d)return this.set(d,this.$y+A);if(_===c)return ct(1);if(_===h)return ct(7);var X=(H={},H[o]=i,H[l]=n,H[a]=r,H)[_]||1,F=this.$d.getTime()+A*X;return N.w(F,this)},j.subtract=function(A,R){return this.add(-1*A,R)},j.format=function(A){var R=this,H=this.$locale();if(!this.isValid())return H.invalidDate||y;var q=A||"YYYY-MM-DDTHH:mm:ssZ",_=N.z(this),ct=this.$H,X=this.$m,F=this.$M,ht=H.weekdays,pt=H.months,wt=H.meridiem,P=function(at,dt,bt,vt){return at&&(
vendor: 11,016 bytes, line 175
175at[dt]||at(R,q))||bt[dt].slice(0,vt)},mt=function(at){return N.s(ct%12||12,at,"0")},st=wt||function(at,dt,bt){var vt=at<12?"AM":"PM";return bt?vt.toLowerCase():vt};return q.replace(x,(function(at,dt){return dt||(function(bt){switch(bt){case"YY":return String(R.$y).slice(-2);case"YYYY":return N.s(R.$y,4,"0");case"M":return F+1;case"MM":return N.s(F+1,2,"0");case"MMM":return P(H.monthsShort,F,pt,3);case"MMMM":return P(pt,F);case"D":return R.$D;case"DD":return N.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return P(H.weekdaysMin,R.$W,ht,2);case"ddd":return P(H.weekdaysShort,R.$W,ht,3);case"dddd":return ht[R.$W];case"H":return String(ct);case"HH":return N.s(ct,2,"0");case"h":return mt(1);case"hh":return mt(2);case"a":return st(ct,X,!0);case"A":return st(ct,X,!1);case"m":return String(X);case"mm":return N.s(X,2,"0");case"s":return String(R.$s);case"ss":return N.s(R.$s,2,"0");case"SSS":return N.s(R.$ms,3,"0");case"Z":return _}return null})(at)||_.replace(":","")}))},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(A,R,H){var q,_=this,ct=N.p(R),X=E(A),F=(X.utcOffset()-this.utcOffset())*i,ht=this-X,pt=function(){return N.m(_,X)};switch(ct){case d:q=pt()/12;break;case u:q=pt();break;case p:q=pt()/3;break;case h:q=(ht-F)/6048e5;break;case c:q=(ht-F)/864e5;break;case l:q=ht/n;break;case o:q=ht/i;break;case a:q=ht/r;break;default:q=ht}return H?q:N.a(q)},j.daysInMonth=function(){return this.endOf(u).$D},j.$locale=function(){return L[this.$L]},j.locale=function(A,R){if(!A)return this.$L;var H=this.clone(),q=W(A,R,!0);return q&&(H.$L=q),H},j.clone=function(){return N.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},I})(),O=z.prototype;return E.prototype=O,[["$ms",s],["$s",a],["$m",o],["$H",l],["$W",c],["$M",u],["$y",d],["$D",g]].forEach((function(I){O[I[1]]=function(j){return this.$g(j,I[0],I[1])}})),E.extend=function(I,j){return I.$i||(I(j,z,E),I.$i=!0),E},E.locale=W,E.isDayjs=M,E.unix=function(I){return E(1e3*I)},E.en=L[T],E.Ls=L,E.p={},E}))})(wa)),wa.exports}var KL=QL();const ZL=zs(KL);var Dr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},et={trace:b((...e)=>{},"trace"),debug:b((...e)=>{},"debug"),info:b((...e)=>{},"info"),warn:b((...e)=>{},"warn"),error:b((...e)=>{},"error"),fatal:b((...e)=>{},"fatal")},Wh=b(function(e="fatal"){let t=Dr.fatal;typeof e=="string"?e.toLowerCase()in Dr&&(t=Dr[e]):typeof e=="number"&&(t=e),et.trace=()=>{},et.debug=()=>{},et.info=()=>{},et.warn=()=>{},et.error=()=>{},et.fatal=()=>{},t<=Dr.fatal&&(et.fatal=console.error?console.error.bind(console,rr("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",rr("FATAL"))),t<=Dr.error&&(et.error=console.error?console.error.bind(console,rr("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",rr("ERROR"))),t<=Dr.warn&&(et.warn=console.warn?console.warn.bind(console,rr("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",rr("WARN"))),t<=Dr.info&&(et.info=console.info?console.info.bind(console,rr("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",rr("INFO"))),t<=Dr.debug&&(et.debug=console.debug?console.debug.bind(console,rr("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",rr("DEBUG"))),t<=Dr.trace&&(et.trace=console.debug?console.debug.bind(console,rr("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",rr("TRACE")))},"setLogLevel"),rr=b(e=>`%c${ZL().format("ss.SSS")} : ${e} : `,"format");const va={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:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,s=2*r-n;switch(i){case"r":return va.hue2rgb(s,n,e+1/3)*255;case"g":return va.hue2rgb(s,n,e)*255;case"b":return va.hue2rgb(s,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),s=Math.min(e,t,r),a=(n+s)/2;if(i==="l")return a*100;if(n===s)return 0;const o=n-s,l=a>.5?o/(2-n-s):o/(n+s);if(i==="s")return l*100;switch(n){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},JL={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},tA={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Ht={channel:va,lang:JL,unit:tA},ti={};for(let e=0;e<=255;e++)ti[e]=Ht.unit.dec2hex(e);const Ee={ALL:0,RGB:1,HSL:2};let eA=class{constructor(){this.type=Ee.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Ee.ALL}is(t){return this.type===t}};class rA{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new eA}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ee.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=Ht.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Ht.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=Ht.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=Ht.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Ht.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=Ht.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Ee.HSL)&&r!==void 0?r:(this._ensureHSL(),Ht.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Ee.HSL)&&r!==void 0?r:(this._ensureHSL(),Ht.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Ee.HSL)&&r!==void 0?r:(this._ensureHSL(),Ht.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Ee.RGB)&&r!==void 0?r:(this._ensureRGB(),Ht.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Ee.RGB)&&r!==void 0?r:(this._ensureRGB(),Ht.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Ee.RGB)&&r!==void 0?r:(this._ensureRGB(),Ht.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ee.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ee.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ee.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ee.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ee.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ee.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Lo=new rA({r:0,g:0,b:0,a:0},"transparent"),sn={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(sn.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,s=n%4===0,a=n>4,o=a?1:17,l=a?8:4,c=s?0:-1,h=a?255:15;return Lo.set({r:(i>>l*(c+3)&h)*o,g:(i>>l*(c+2)&h)*o,b:(i>>l*(c+1)&h)*o,a:s?(i&h)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${ti[Math.round(t)]}${ti[Math.round(r)]}${ti[Math.round(i)]}${ti[Math.round(n*255)]}`:`#${ti[Math.round(t)]}${ti[Math.round(r)]}${ti[Math.round(i)]}`}},Ti={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:e=>{const t=e.match(Ti.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return Ht.channel.clamp.h(parseFloat(r)*.9);case"rad":return Ht.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Ht.channel.clamp.h(parseFloat(r)*360)}}return Ht.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Ti.re);if(!r)return;const[,i,n,s,a,o]=r;return Lo.set({h:Ti._hue2deg(i),s:Ht.channel.clamp.s(parseFloat(n)),l:Ht.channel.clamp.l(parseFloat(s)),a:a?Ht.channel.clamp.a(o?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${Ht.lang.round(t)}, ${Ht.lang.round(r)}%, ${Ht.lang.round(i)}%, ${n})`:`hsl(${Ht.lang.round(t)}, ${Ht.lang.round(r)}%, ${Ht.lang.round(i)}%)`}},ks={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",s
175almon:"#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:e=>{e=e.toLowerCase();const t=ks.colors[e];if(t)return sn.parse(t)},stringify:e=>{const t=sn.stringify(e);for(const r in ks.colors)if(ks.colors[r]===t)return r}},es={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:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(es.re);if(!r)return;const[,i,n,s,a,o,l,c,h]=r;return Lo.set({r:Ht.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:Ht.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:Ht.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:c?Ht.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${Ht.lang.round(t)}, ${Ht.lang.round(r)}, ${Ht.lang.round(i)}, ${Ht.lang.round(n)})`:`rgb(${Ht.lang.round(t)}, ${Ht.lang.round(r)}, ${Ht.lang.round(i)})`}},Lr={format:{keyword:ks,hex:sn,rgb:es,rgba:es,hsl:Ti,hsla:Ti},parse:e=>{if(typeof e!="string")return e;const t=sn.parse(e)||es.parse(e)||Ti.parse(e)||ks.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ee.HSL)||e.data.r===void 0?Ti.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?es.stringify(e):sn.stringify(e)},Oy=(e,t)=>{const r=Lr.parse(e);for(const i in t)r[i]=Ht.channel.clamp[i](t[i]);return Lr.stringify(r)},oi=(e,t,r=0,i=1)=>{if(typeof e!="number")return Oy(e,{a:t});const n=Lo.set({r:Ht.channel.clamp.r(e),g:Ht.channel.clamp.g(t),b:Ht.channel.clamp.b(r),a:Ht.channel.clamp.a(i)});return Lr.stringify(n)},iA=e=>{const{r:t,g:r,b:i}=Lr.parse(e),n=.2126*Ht.channel.toLinear(t)+.7152*Ht.channel.toLinear(r)+.0722*Ht.channel.toLinear(i);return Ht.lang.round(n)},nA=e=>iA(e)>=.5,yr=e=>!nA(e),Ry=(e,t,r)=>{const i=Lr.parse(e),n=i[t],s=Ht.channel.clamp[t](n+r);return n!==s&&(i[t]=s),Lr.stringify(i)},rt=(e,t)=>Ry(e,"l",t),it=(e,t)=>Ry(e,"l",-t),S=(e,t)=>{const r=Lr.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return Oy(e,i)},sA=(e,t,r=50)=>{const{r:i,g:n,b:s,a}=Lr.parse(e),{r:o,g:l,b:c,a:h}=Lr.parse(t),u=r/100,p=u*2-1,d=a-h,y=((p*d===-1?p:(p+d)/(1+p*d))+1)/2,C=1-y,x=i*y+o*C,w=n*y+l*C,k=s*y+c*C,v=a*u+h*(1-u);return oi(x,w,k,v)},K=(e,t=100)=>{const r=Lr.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,sA(r,e,t)};var Lc=b((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(n=>Lc(e,n,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(n=>{e.includes(n)||e.push(n)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const n=e;Object.entries(t).forEach(([s,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,s)||Object.defineProperty(e,s,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),n[s]===void 0&&(n[s]=Array.isArray(a)?[]:{}),typeof n[s]=="object"&&(n[s]=Lc(n[s],a,{depth:r-1}))}else typeof n[s]!="object"&&(Object.hasOwn(e,s)?n[s]=a:Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),Te=Lc,Er="#ffffff",Nr="#f2f2f2",Wt=b((e,t)=>t?S(e,{s:-40,l:10}):S(e,{s:-40,l:-10}),"mkBorder"),cn,aA=(cn=class{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(){var r,i,n,s,a,o,l,c,h,u,p,d,g,y,C,x,w,k,v,T,L,D,M,W,E,N,z,O,I,j,A,R,H,q,_,ct,X,F,ht,pt,wt,P,mt,st,at,dt,bt,vt,Bt,Q;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||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(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.edgeLabelBackgroun
vendor: 26,184 bytes, line 175
175d=this.edgeLabelBackground||(this.darkMode?it(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||it(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(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||rt(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||it(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||it(this.mainBkg,10)):(this.rowOdd=this.rowOdd||rt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||rt(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 $t=0;$t<this.THEME_COLOR_LIMIT;$t++)this["cScale"+$t]=it(this["cScale"+$t],75);else for(let $t=0;$t<this.THEME_COLOR_LIMIT;$t++)this["cScale"+$t]=it(this["cScale"+$t],25);for(let $t=0;$t<this.THEME_COLOR_LIMIT;$t++)this["cScaleInv"+$t]=this["cScaleInv"+$t]||K(this["cScale"+$t]);for(let $t=0;$t<this.THEME_COLOR_LIMIT;$t++)this.darkMode?this["cScalePeer"+$t]=this["cScalePeer"+$t]||rt(this["cScale"+$t],10):this["cScalePeer"+$t]=this["cScalePeer"+$t]||it(this["cScale"+$t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let $t=0;$t<this.THEME_COLOR_LIMIT;$t++)this["cScaleLabel"+$t]=this["cScaleLabel"+$t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let $t=0;$t<5;$t++)this["surface"+$t]=this["surface"+$t]||S(this.mainBkg,{h:180,s:-15,l:t*(5+$t*3)}),this["surfacePeer"+$t]=this["surfacePeer"+$t]||S(this.mainBkg,{h:180,s:-15,l:t*(8+$t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||S(this.primaryColor,{h:64}),this.fillType3=this.fillType3||S(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||S(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||S(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||S(this.primaryColor,{h:128}),this.fillType7=this.fillType7||S(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||S(this.primaryColor,{l:-10}),this.pie5=this.pie5||S(this.secondaryColor,{l:-10}),this.pie6=this.pie6||S(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||S(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||S(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??S(this.primaryColor,{l:-30}),this.venn2=this.venn2??S(this.secondaryColor,{l:-30}),this.venn3=this.venn3??S(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??S(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??S(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??S(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??S(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??S(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((n=this.cynefin)==null?void 0:n.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((l=this.cynefin)==null?void 0:l.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#E3F2FD",chaoticBg:((p=this.cynefin)==null?void 0:p.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((g=this.cynefin)==null?void 0:g.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((C=this.cynefin)==null?void 0:C.labelColor)||this.primaryTextColor},this.radar={axisColor:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((w=this.radar)==null?void 0:w.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((v=this.radar)==null?void 0:v.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((L=this.radar)==null?void 0:L.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((D=this.radar)==null?void 0:D.graticuleStrokeWidth)||1,graticuleOpacity:((M=this.radar)==null?void 0:M.graticuleOpacity)||.3,legendBoxSize:((W=this.radar)==null?void 0:W.legendBoxSize)||12,legendFontSize:((E=this.radar)==null?void 0:E.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((N=this.wardley)==null?void 0:N.backgroundColor)||this.background,axisColor:((z=this.wardley)==null?void 0:z.axisColor)||this.lineColor,axisTextColor:((O=this.wardley)==null?void 0:O.axisTextColor)||this.primaryTextColor,gridColor:((I=this.wardley)==null?void 0:I.gridColor)||this.gridColor,componentFill:((j=this.wardley)==null?void 0:j.componentFill)||this.background,componentStroke:((A=this.wardley)==null?void 0:A.componentStroke)||this.lineColor,componentLabelColor:((R=this.wardley)==null?void 0:R.componentLabelColor)||this.primaryTextColor,linkStroke:((H=this.wardley)==null?void 0:H.linkStroke)||this.lineColor,evolutionStroke:((q=this.wardley)==null?void 0:q.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((_=this.wardley)==null?void 0:_.annotationStroke)||this.lineColor,annotationTextColor:((ct=this.wardley)==null?void 0:ct.annotationTextColor)||this.primaryTextColor,annotationFill:((X=this.wardley)==null?void 0:X.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||yr(this.quadrant1Fill)?rt(this.quadrant1Fill):it(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((F=this.xyChart)==null?void 0:F.backgroundColor)||this.background,titleColor:((ht=this.xyChart)==null?void 0:ht.titleColor)||this.primaryTextColor,dataLabelColor:((pt=this.xyChart)==null?void 0:pt.dataLabelColor)||this.primaryTextColor,legendTextColor:((wt=this.xyChart)==null?void 0:wt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((P=this.xyChart)==null?void 0:P.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((mt=this.xyChart)==null?void 0:mt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((st=this.xyChart)==null?void 0:st.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((at=this.xyChart)==null?void 0:at.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((dt=this.xyChart)==null?void 0:dt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((bt=this.xyChart)==null?void 0:bt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((vt=this.xyChart)==null?void 0:vt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Bt=this.xyChart)==null?void 0:Bt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Q=this.xyChart)==null?void 0:Q.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?it(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=it(this.git0,25),this.git1=it(this.git1,25),this.git2=it(this.git2,25),this.git3=it(this.git3,25),this.git4=it(this.git4,25),this.git5=it(this.git5,25),this.git6=it(this.git6,25),this.git7=it(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Er,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Nr,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},b(cn,"Theme"),cn),oA=b(e=>{const t=new aA;return t.calculate(e),t},"getThemeVariables"),hn,lA=(hn=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=rt(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=K(this.background),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.lineColor=K(this.background),this.textColor=K(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=rt(K("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=oi(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=it("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=it(this.sectionBkgColor,10),this.taskBorderColor=oi(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=oi(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||rt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||it(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(){var t,r,i,n,s,a,o,l,c,h,u,p,d,g,y,C,x,w,k,v,T,L,D,M,W,E,N,z,O,I,j,A,R,H,q,_,ct,X,F,ht,pt,wt,P,mt,st,at,dt,bt,vt,Bt;this.secondBkg=rt(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=rt(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=rt(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=K(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 Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleInv"+Q]=this["cScaleInv"+Q]||K(this["cScale"+Q]);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScalePeer"+Q]=this["cScalePeer"+Q]||rt(this["cScale"+Q],10);for(let Q=0;Q<5;Q++)this["surface"+Q]=this["surface"+Q]||S(this.mainBkg,{h:30,s:-30,l:-(-10+Q*4)}),this["surfacePeer"+Q]=this["surfacePeer"+Q]||S(this.mainBkg,{h:30,s:-30,l:-(-7+Q*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleLabel"+Q]=this["cScaleLabel"+Q]||this.scaleLabelColor;for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["pie"+Q]=this["cScale"+Q];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let Q=0;Q<8;Q++)this["venn"+(Q+1)]=this["venn"+(Q+1)]??rt(this["cScale"+Q],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((n=this.cynefin)==null?void 0:n.boundaryWidth)||2,cliffColor:((s=this.cynefin)==null?void 0:s.cliffColor)||"#FF6B6B",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#1B5E20",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#0D47A1",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#BF360C",clearBg:((p=this.cynefin)==null?void 0:p.clearBg)||"#F57F17",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#4A148
175C",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||yr(this.quadrant1Fill)?rt(this.quadrant1Fill):it(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((C=this.xyChart)==null?void 0:C.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((w=this.xyChart)==null?void 0:w.dataLabelColor)||this.primaryTextColor,legendTextColor:((k=this.xyChart)==null?void 0:k.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((v=this.xyChart)==null?void 0:v.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((T=this.xyChart)==null?void 0:T.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((L=this.xyChart)==null?void 0:L.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((D=this.xyChart)==null?void 0:D.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((M=this.xyChart)==null?void 0:M.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((W=this.xyChart)==null?void 0:W.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((N=this.xyChart)==null?void 0:N.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((z=this.xyChart)==null?void 0:z.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((O=this.radar)==null?void 0:O.axisColor)||this.lineColor,axisStrokeWidth:((I=this.radar)==null?void 0:I.axisStrokeWidth)||2,axisLabelFontSize:((j=this.radar)==null?void 0:j.axisLabelFontSize)||12,curveOpacity:((A=this.radar)==null?void 0:A.curveOpacity)||.5,curveStrokeWidth:((R=this.radar)==null?void 0:R.curveStrokeWidth)||2,graticuleColor:((H=this.radar)==null?void 0:H.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((q=this.radar)==null?void 0:q.graticuleStrokeWidth)||1,graticuleOpacity:((_=this.radar)==null?void 0:_.graticuleOpacity)||.3,legendBoxSize:((ct=this.radar)==null?void 0:ct.legendBoxSize)||12,legendFontSize:((X=this.radar)==null?void 0:X.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((F=this.wardley)==null?void 0:F.backgroundColor)||this.background,axisColor:((ht=this.wardley)==null?void 0:ht.axisColor)||this.lineColor,axisTextColor:((pt=this.wardley)==null?void 0:pt.axisTextColor)||this.primaryTextColor,gridColor:((wt=this.wardley)==null?void 0:wt.gridColor)||this.gridColor,componentFill:((P=this.wardley)==null?void 0:P.componentFill)||this.mainBkg,componentStroke:((mt=this.wardley)==null?void 0:mt.componentStroke)||this.lineColor,componentLabelColor:((st=this.wardley)==null?void 0:st.componentLabelColor)||this.primaryTextColor,linkStroke:((at=this.wardley)==null?void 0:at.linkStroke)||this.lineColor,evolutionStroke:((dt=this.wardley)==null?void 0:dt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((bt=this.wardley)==null?void 0:bt.annotationStroke)||this.lineColor,annotationTextColor:((vt=this.wardley)==null?void 0:vt.annotationTextColor)||this.primaryTextColor,annotationFill:((Bt=this.wardley)==null?void 0:Bt.annotationFill)||this.mainBkg}
vendor: 4,176 bytes, line 175
175,this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?it(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=rt(this.secondaryColor,20),this.git1=rt(this.pie2||this.secondaryColor,20),this.git2=rt(this.pie3||this.tertiaryColor,20),this.git3=rt(this.pie4||S(this.primaryColor,{h:-30}),20),this.git4=rt(this.pie5||S(this.primaryColor,{h:-60}),20),this.git5=rt(this.pie6||S(this.primaryColor,{h:-90}),10),this.git6=rt(this.pie7||S(this.primaryColor,{h:60}),10),this.git7=rt(this.pie8||S(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||K(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||K(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||rt("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||rt("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||rt("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||rt("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||rt(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||rt(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||rt(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},b(hn,"Theme"),hn),cA=b(e=>{const t=new lA;return t.calculate(e),t},"getThemeVariables"),un,hA=(un=class{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=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.lineColor=K(this.background),this.textColor=K(this.background),this.background="white",this.mainBkg="#
175ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Wt(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=oi(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(){var t,r,i,n,s,a,o,l,c,h,u,p,d,g,y,C,x,w,k,v,T,L,D,M,W,E,N,z,O,I,j,A,R,H,q,_,ct,X,F,ht,pt,wt,P,mt,st,at,dt,bt,vt,Bt;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||it(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||it(this.tertiaryColor,40);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScale"+Q]=it(this["cScale"+Q],10),this["cScalePeer"+Q]=this["cScalePeer"+Q]||it(this["cScale"+Q],25);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleInv"+Q]=this["cScaleInv"+Q]||S(this["cScale"+Q],{h:180});for(let Q=0;Q<5;Q++)this["surface"+Q]=this["surface"+Q]||S(this.mainBkg,{h:30,l:-(5+Q*5)}),this["surfacePeer"+Q]=this["surfacePeer"+Q]||S(this.mainBkg,{h:30,l:-(7+Q*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||K(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||K(this.labelTextColor);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleLabel"+Q]=this["cScaleLabel"+Q]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackgroun
vendor: 48,827 bytes, line 175
175d=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,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.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||rt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||rt(this.primaryColor,1),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.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,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.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||S(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||S(this.primaryColor,{l:-10}),this.pie5=this.pie5||S(this.secondaryColor,{l:-30}),this.pie6=this.pie6||S(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||S(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||S(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??S(this.primaryColor,{l:-30}),this.venn2=this.venn2??S(this.secondaryColor,{l:-30}),this.venn3=this.venn3??S(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??S(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??S(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??S(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??S(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??S(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((n=this.cynefin)==null?void 0:n.boundaryWidth)||2,cliffColor:((s=this.cynefin)==null?void 0:s.cliffColor)||"#8B0000",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((p=this.cynefin)==null?void 0:p.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||yr(this.quadrant1Fill)?rt(this.quadrant1Fill):it(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((w=this.radar)==null?void 0:w.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((v=this.radar)==null?void 0:v.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((D=this.radar)==null?void 0:D.graticuleOpacity)||.3,legendBoxSize:((M=this.radar)==null?void 0:M.legendBoxSize)||12,legendFontSize:((W=this.radar)==null?void 0:W.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((E=this.wardley)==null?void 0:E.backgroundColor)||this.background,axisColor:((N=this.wardley)==null?void 0:N.axisColor)||this.lineColor,axisTextColor:((z=this.wardley)==null?void 0:z.axisTextColor)||this.primaryTextColor,gridColor:((O=this.wardley)==null?void 0:O.gridColor)||this.gridColor,componentFill:((I=this.wardley)==null?void 0:I.componentFill)||this.background,componentStroke:((j=this.wardley)==null?void 0:j.componentStroke)||this.lineColor,componentLabelColor:((A=this.wardley)==null?void 0:A.componentLabelColor)||this.primaryTextColor,linkStroke:((R=this.wardley)==null?void 0:R.linkStroke)||this.lineColor,evolutionStroke:((H=this.wardley)==null?void 0:H.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((q=this.wardley)==null?void 0:q.annotationStroke)||this.lineColor,annotationTextColor:((_=this.wardley)==null?void 0:_.annotationTextColor)||this.primaryTextColor,annotationFill:((ct=this.wardley)==null?void 0:ct.annotationFill)||this.background},this.xyChart={backgroundColor:((X=this.xyChart)==null?void 0:X.backgroundColor)||this.background,titleColor:((F=this.xyChart)==null?void 0:F.titleColor)||this.primaryTextColor,dataLabelColor:((ht=this.xyChart)==null?void 0:ht.dataLabelColor)||this.primaryTextColor,legendTextColor:((pt=this.xyChart)==null?void 0:pt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((wt=this.xyChart)==null?void 0:wt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((P=this.xyChart)==null?void 0:P.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((mt=this.xyChart)==null?void 0:mt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((st=this.xyChart)==null?void 0:st.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((at=this.xyChart)==null?void 0:at.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((dt=this.xyChart)==null?void 0:dt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((bt=this.xyChart)==null?void 0:bt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((vt=this.xyChart)==null?void 0:vt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Bt=this.xyChart)==null?void 0:Bt.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=it(this.git0,25),this.git1=it(this.git1,25),this.git2=it(this.git2,25),this.git3=it(this.git3,25),this.git4=it(this.git4,25),this.git5=it(this.git5,25),this.git6=it(this.git6,25),this.git7=it(this.git7,25)),this.gitInv0=this.gitInv0||it(K(this.git0),25),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||K(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||K(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Er,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Nr}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},b(un,"Theme"),un),uA=b(e=>{const t=new hA;return t.calculate(e),t},"getThemeVariables"),dn,dA=(dn=class{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=rt("#cde498",10),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.primaryColor),this.lineColor=K(this.background),this.textColor=K(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(){var t,r,i,n,s,a,o,l,c,h,u,p,d,g,y,C,x,w,k,v,T,L,D,M,W,E,N,z,O,I,j,A,R,H,q,_,ct,X,F,ht,pt,wt,P,mt,st,at,dt,bt,vt,Bt;this.actorBorder=it(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||it(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||it(this.tertiaryColor,40);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScale"+Q]=it(this["cScale"+Q],10),this["cScalePeer"+Q]=this["cScalePeer"+Q]||it(this["cScale"+Q],25);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleInv"+Q]=this["cScaleInv"+Q]||S(this["cScale"+Q],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleLabel"+Q]=this["cScaleLabel"+Q]||this.scaleLabelColor;for(let Q=0;Q<5;Q++)this["surface"+Q]=this["surface"+Q]||S(this.mainBkg,{h:30,s:-30,l:-(5+Q*5)}),this["surfacePeer"+Q]=this["surfacePeer"+Q]||S(this.mainBkg,{h:30,s:-30,l:-(8+Q*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||rt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||rt(this.mainBkg,20),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.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,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.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||S(this.primaryColor,{l:-30}),this.pie5=this.pie5||S(this.secondaryColor,{l:-30}),this.pie6=this.pie6||S(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||S(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||S(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??S(this.primaryColor,{l:-30}),this.venn2=this.venn2??S(this.secondaryColor,{l:-30}),this.venn3=this.venn3??S(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??S(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??S(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??S(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??S(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??S(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((n=this.cynefin)==null?void 0:n.boundaryWidth)||2,cliffColor:((s=this.cynefin)==null?void 0:s.cliffColor)||"#8B4513",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#C8E6C9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#DCEDC8",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FFE0B2",clearBg:((p=this.cynefin)==null?void 0:p.clearBg)||"#FFF9C4",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#D7CCC8",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||yr(this.quadrant1Fill)?rt(this.quadrant1Fill):it(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((w=this.radar)==null?void 0:w.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((v=this.radar)==null?void 0:v.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((D=this.radar)==null?void 0:D.graticuleOpacity)||.3,legendBoxSize:((M=this.radar)==null?void 0:M.legendBoxSize)||12,legendFontSize:((W=this.radar)==null?void 0:W.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((E=this.wardley)==null?void 0:E.backgroundColor)||this.background,axisColor:((N=this.wardley)==null?void 0:N.axisColor)||this.lineColor,axisTextColor:((z=this.wardley)==null?void 0:z.axisTextColor)||this.primaryTextColor,gridColor:((O=this.wardley)==null?void 0:O.gridColor)||this.gridColor,componentFill:((I=this.wardley)==null?void 0:I.componentFill)||this.background,componentStroke:((j=this.wardley)==null?void 0:j.componentStroke)||this.lineColor,componentLabelColor:((A=this.wardley)==null?void 0:A.componentLabelColor)||this.primaryTextColor,linkStroke:((R=this.wardley)==null?void 0:R.linkStroke)||this.lineColor,evolutionStroke:((H=this.wardley)==null?void 0:H.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((q=this.wardley)==null?void 0:q.annotationStroke)||this.lineColor,annotationTextColor:((_=this.wardley)==null?void 0:_.annotationTextColor)||this.primaryTextColor,annotationFill:((ct=this.wardley)==null?void 0:ct.annotationFill)||this.background},this.xyChart={backgroundColor:((X=this.xyChart)==null?void 0:X.backgroundColor)||this.background,titleColor:((F=this.xyChart)==null?void 0:F.titleColor)||this.primaryTextColor,dataLabelColor:((ht=this.xyChart)==null?void 0:ht.dataLabelColor)||this.primaryTextColor,legendTextColor:((pt=this.xyChart)==null?void 0:pt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((wt=this.xyChart)==null?void 0:wt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((P=this.xyChart)==null?void 0:P.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((mt=this.xyChart)==null?void 0:mt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((st=this.xyChart)==null?void 0:st.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((at=this.xyChart)==null?void 0:at.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((dt=this.xyChart)==null?void 0:dt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((bt=this.xyChart)==null?void 0:bt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((vt=this.xyChart)==null?void 0:vt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Bt=this.xyChart)==null?void 0:Bt.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=it(this.git0,25),this.git1=it(this.git1,25),this.git2=it(this.git2,25),this.git3=it(this.git3,25),this.git4=it(this.git4,25),this.git5=it(this.git5,25),this.git6=it(this.git6,25),this.git7=it(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||K(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||K(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Er,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},b(dn,"Theme"),dn),pA=b(e=>{const t=new dA;return t.calculate(e),t},"getThemeVariables"),pn,fA=(pn=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=rt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.lineColor=K(this.background),this.textColor=K(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||rt(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(){var t,r,i,n,s,a,o,l,c,h,u,p,d,g,y,C,x,w,k,v,T,L,D,M,W,E,N,z,O,I,j,A,R,H,q,_,ct,X,F,ht,pt,wt,P,mt,st,at,dt,bt,vt,Bt;this.secondBkg=rt(this.contrast,55),this.border2=this.contrast,this.actorBorder=rt(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 Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleInv"+Q]=this["cScaleInv"+Q]||K(this["cScale"+Q]);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this.darkMode?this["cScalePeer"+Q]=this["cScalePeer"+Q]||rt(this["cScale"+Q],10):this["cScalePeer"+Q]=this["cScalePeer"+Q]||it(this["cScale"+Q],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleLabel"+Q]=this["cScaleLabel"+Q]||this.scaleLabelColor;for(let Q=0;Q<5;Q++)this["surface"+Q]=this["surface"+Q]||S(this.mainBkg,{l:-(5+Q*5)}),this["surfacePeer"+Q]=this["surfacePeer"+Q]||S(this.mainBkg,{l:-(8+Q*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=rt(this.contrast,30),this.sectionBkgColor2=rt(this.contrast,30),this.taskBorderColor=it(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=rt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=it(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",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||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,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});for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["pie"+Q]=this["cScale"+Q];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let Q=0;Q<8;Q++)this["venn"+(Q+1)]=this["venn"+(Q+1)]??this["cScale"+Q];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((n=this.cynefin)==null?void 0:n.boundaryWidth)||2,cliffColor:((s=this.cynefin)==null?void 0:s.cliffColor)||"#8B0000",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((p=this.cynefin)==null?void 0:p.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||yr(this.quadrant1Fill)?rt(this.quadrant1Fill):it(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((C=this.xyChart)==null?void 0:C.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((w=this.xyChart)==null?void 0:w.dataLabelColor)||this.primaryTextColor,legendTextColor:((k=this.xyChart)==null?void 0:k.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((v=this.xyChart)==null?void 0:v.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((T=this.xyChart)==null?void 0:T.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((L=this.xyChart)==null?void 0:L.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((D=this.xyChart)==null?void 0:D.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((M=this.xyChart)==null?void 0:M.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((W=this.xyChart)==null?void 0:W.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((N=this.xyChart)==null?void 0:N.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((z=this.xyChart)==null?void 0:z.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((O=this.radar)==null?void 0:O.axisColor)||this.lineColor,axisStrokeWidth:((I=this.radar)==null?void 0:I.axisStrokeWidth)||2,axisLabelFontSize:((j=this.radar)==null?void 0:j.axisLabelFontSize)||12,curveOpacity:((A=this.radar)==null?void 0:A.curveOpacity)||.5,curveStrokeWidth:((R=this.radar)==null?void 0:R.curveStrokeWidth)||2,graticuleColor:((H=this.radar)==null?void 0:H.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((q=this.radar)==null?void 0:q.graticuleStrokeWidth)||1,graticuleOpacity:((_=this.radar)==null?void 0:_.graticuleOpacity)||.3,legendBoxSize:((ct=this.radar)==null?void 0:ct.legendBoxSize)||12,legendFontSize:((X=this.radar)==null?void 0:X.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((F=this.wardley)==null?void 0:F.backgroundColor)||this.background,axisColor:((ht=this.wardley)==null?void 0:ht.axisColor)||this.lineColor,axisTextColor:((pt=this.wardley)==null?void 0:pt.axisTextColor)||this.primaryTextColor,gridColor:((wt=this.wardley)==null?void 0:wt.gridColor)||this.gridColor,componentFill:((P=this.wardley)==null?void 0:P.componentFill)||this.background,componentStroke:((mt=this.wardley)==null?void 0:mt.componentStroke)||this.lineColor,componentLabelColor:((st=this.wardley)==null?void 0:st.componentLabelColor)||this.primaryTextColor,linkStroke:((at=this.wardley)==null?void 0:at.linkStroke)||this.lineColor,evolutionStroke:((dt=this.wardley)==null?void 0:dt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((bt=this.wardley)==null?void 0:bt.annotationStroke)||this.lineColor,annotationTextColor:((vt=this.wardley)==null?void 0:vt.annotationTextColor)||this.primaryTextColor,annotationFill:((Bt=this.wardley)==null?void 0:Bt.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=it(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||S(this.primaryColor,{h:-30}),this.git4=this.pie5||S(this.primaryColor,{h:-60}),this.git5=this.pie6||S(this.primaryColor,{h:-90}),this.git6=this.pie7||S(this.primaryColor,{h:60}),this.git7=this.pie8||S(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Er,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},b(pn,"Theme"),pn),gA=b(e=>{const t=new fA;return t.calculate(e),t},"getThemeVariables"),fn,mA=(fn=class{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=Wt(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(){var s,a,o,l,c,h,u,p,d,g,y,C;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||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(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.edgeLabelBackgroun
vendor: 7,159 bytes, line 175
175d=this.edgeLabelBackground||(this.darkMode?it(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||it(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=S(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||rt(t,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||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||S(t,{h:30}),this.cScale4=this.cScale4||S(t,{h:60}),this.cScale5=this.cScale5||S(t,{h:90}),this.cScale6=this.cScale6||S(t,{h:120}),this.cScale7=this.cScale7||S(t,{h:150}),this.cScale8=this.cScale8||S(t,{h:210,l:150}),this.cScale9=this.cScale9||S(t,{h:270}),this.cScale10=this.cScale10||S(t,{h:300}),this.cScale11=this.cScale11||S(t,{h:330}),this.darkMode)for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=it(this["cScale"+x],75);else for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=it(this["cScale"+x],25);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||K(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||rt(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||it(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||S(this.mainBkg,{h:180,s:-15,l:n*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||S(this.mainBkg,{h:180,s:-15,l:n*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||S(t,{h:64}),this.fillType3=this.fillType3||S(r,{h:64}),this.fillType4=this.fillType4||S(t,{h:-64}),this.fillType5=this.fillType5||S(r,{h:-64}),this.fillType6=this.fillType6||S(t,{h:128}),this.fillType7=this.fillType7||S(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||S(t,{l:-10}),this.pie5=this.pie5||S(r,{l:-10}),this.pie6=this.pie6||S(i,{l:-10}),this.pie7=this.pie7||S(t,{h:60,l:-10}),this.pie8=this.pie8||S(t,{h:-60,l:-10}),this.pie9=this.pie9||S(t,{h:120,l:0}),this.pie10=this.pie10||S(t,{h:60,l:-20}),this.pie11=this.pie11||S(t,{h:-60,l:-20}),this.pie12=this.pie12||S(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||S(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||yr(this.quadrant1Fill)?rt(this.quadrant1Fill):it(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExter
vendor: 19,003 bytes, line 175
175nalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((p=this.xyChart)==null?void 0:p.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((g=this.xyChart)==null?void 0:g.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?it(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||S(t,{h:-30}),this.git4=this.git4||S(t,{h:-60}),this.git5=this.git5||S(t,{h:-90}),this.git6=this.git6||S(t,{h:60}),this.git7=this.git7||S(t,{h:120}),this.darkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=it(this.git0,25),this.git1=it(this.git1,25),this.git2=it(this.git2,25),this.git3=it(this.git3,25),this.git4=it(this.git4,25),this.git5=it(this.git5,25),this.git6=it(this.git6,25),this.git7=it(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Er,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},b(fn,"Theme"),fn),yA=b(e=>{const t=new mA;return t.calculate(e),t},"getThemeVariables"),gn,xA=(gn=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=rt(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=K(this.background),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=rt(K("#323D47"),10),this.border1="#ccc",this.border2=oi(255,255,255,.25),this.arrowheadColor=K(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(){var r,i,n,s,a,o,l,c,h,u,p,d;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||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(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?it(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||it(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(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||rt(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 g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScale"+g]=it(this["cScale"+g],75);else for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScale"+g]=it(this["cScale"+g],25);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleInv"+g]=this["cScaleInv"+g]||K(this["cScale"+g]);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this.darkMode?this["cScalePeer"+g]=this["cScalePeer"+g]||rt(this["cScale"+g],10):this["cScalePeer"+g]=this["cScalePeer"+g]||it(this["cScale"+g],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleLabel"+g]=this["cScaleLabel"+g]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let g=0;g<5;g++)this["surface"+g]=this["surface"+g]||S(this.mainBkg,{h:180,s:-15,l:t*(5+g*3)}),this["surfacePeer"+g]=this["surfacePeer"+g]||S(this.mainBkg,{h:180,s:-15,l:t*(8+g*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||S(this.primaryColor,{h:64}),this.fillType3=this.fillType3||S(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||S(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||S(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||S(this.primaryColor,{h:128}),this.fillType7=this.fillType7||S(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||S(this.primaryColor,{l:-10}),this.pie5=this.pie5||S(this.secondaryColor,{l:-10}),this.pie6=this.pie6||S(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||S(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||S(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||yr(this.quadrant1Fill)?rt(this.quadrant1Fill):it(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?it(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=it(this.git0,25),this.git1=it(this.git1,25),this.git2=it(this.git2,25),this.git3=it(this.git3,25),this.git4=it(this.git4,25),this.git5=it(this.git5,25),this.git6=it(this.git6,25),this.git7=it(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Er,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>
175{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},b(gn,"Theme"),gn),bA=b(e=>{const t=new xA;return t.calculate(e),t},"getThemeVariables"),mn,CA=(mn=class{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=Wt("#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(){var s,a,o,l,c,h,u,p,d,g,y,C;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||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(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?it(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||it(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=S(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||rt(t,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.compositeTitleBackgroun
vendor: 4,231 bytes, line 175
175d="#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 x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=this.mainBkg;if(this.darkMode)for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=it(this["cScale"+x],75);else for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=it(this["cScale"+x],25);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||K(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||rt(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||it(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||S(this.mainBkg,{h:180,s:-15,l:n*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||S(this.mainBkg,{h:180,s:-15,l:n*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||S(t,{h:64}),this.fillType3=this.fillType3||S(r,{h:64}),this.fillType4=this.fillType4||S(t,{h:-64}),this.fillType5=this.fillType5||S(r,{h:-64}),this.fillType6=this.fillType6||S(t,{h:128}),this.fillType7=this.fillType7||S(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||S(t,{l:-10}),this.pie5=this.pie5||S(r,{l:-10}),this.pie6=this.pie6||S(i,{l:-10}),this.pie7=this.pie7||S(t,{h:60,l:-10}),this.pie8=this.pie8||S(t,{h:-60,l:-10}),this.pie9=this.pie9||S(t,{h:120,l:0}),this.pie10=this.pie10||S(t,{h:60,l:-20}),this.pie11=this.pie11||S(t,{h:-60,l:-20}),this.pie12=this.pie12||S(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||S(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||yr(this.quadrant1Fill)?rt(this.quadrant1Fill):it(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExter
175nalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((p=this.xyChart)==null?void 0:p.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((g=this.xyChart)==null?void 0:g.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?it(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||S(t,{h:-30}),this.git4=this.git4||S(t,{h:-60}),this.git5=this.git5||S(t,{h:-90}),this.git6=this.git6||S(t,{h:60}),this.git7=this.git7||S(t,{h:120}),this.darkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=it(this.git0,25),this.git1=it(this.git1,25),this.git2=it(this.git2,25),this.git3=it(this.git3,25),this.git4=it(this.git4,25),this.git5=it(this.git5,25),this.git6=it(this.git6,25),this.git7=it(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Er,this.attributeBackgroundColorEven=this.attributeBackgroun
vendor: 15,479 bytes, line 175
175dColorEven||Nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},b(mn,"Theme"),mn),kA=b(e=>{const t=new CA;return t.calculate(e),t},"getThemeVariables"),yn,wA=(yn=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=rt(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=K(this.background),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=rt(K("#323D47"),10),this.border1="#ccc",this.border2=oi(255,255,255,.25),this.arrowheadColor=K(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(){var r,i,n,s,a,o,l,c,h,u,p,d;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||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(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?it(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||it(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(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||rt(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 g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScale"+g]=it(this["cScale"+g],75);else for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScale"+g]=it(this["cScale"+g],25);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleInv"+g]=this["cScaleInv"+g]||K(this["cScale"+g]);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this.darkMode?this["cScalePeer"+g]=this["cScalePeer"+g]||rt(this["cScale"+g],10):this["cScalePeer"+g]=this["cScalePeer"+g]||it(this["cScale"+g],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleLabel"+g]=this["cScaleLabel"+g]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let g=0;g<5;g++)this["surface"+g]=this["surface"+g]||S(this.mainBkg,{h:180,s:-15,l:t*(5+g*3)}),this["surfacePeer"+g]=this["surfacePeer"+g]||S(this.mainBkg,{h:180,s:-15,l:t*(8+g*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||S(this.primaryColor,{h:64}),this.fillType3=this.fillType3||S(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||S(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||S(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||S(this.primaryColor,{h:128}),this.fillType7=this.fillType7||S(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||S(this.primaryColor,{l:-10}),this.pie5=this.pie5||S(this.secondaryColor,{l:-10}),this.pie6=this.pie6||S(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||S(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||S(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||yr(this.quadrant1Fill)?rt(this.quadrant1Fill):it(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?it(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=it(this.git0,25),this.git1=it(this.git1,25),this.git2=it(this.git2,25),this.git3=it(this.git3,25),this.git4=it(this.git4,25),this.git5=it(this.git5,25),this.git6=it(this.git6,25),this.git7=it(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackgroun
175d="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Er,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},b(yn,"Theme"),yn),vA=b(e=>{const t=new wA;return t.calculate(e),t},"getThemeVariables"),xn,SA=(xn=class{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=Wt(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(){var s,a,o,l,c,h,u,p,d,g,y,C;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||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(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?it(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||it(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=S(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||rt(t,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.labelBackgroun
vendor: 4,260 bytes, line 175
175dColor=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 x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||K(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||rt(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||it(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||S(this.mainBkg,{h:180,s:-15,l:n*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||S(this.mainBkg,{h:180,s:-15,l:n*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||S(t,{h:64}),this.fillType3=this.fillType3||S(r,{h:64}),this.fillType4=this.fillType4||S(t,{h:-64}),this.fillType5=this.fillType5||S(r,{h:-64}),this.fillType6=this.fillType6||S(t,{h:128}),this.fillType7=this.fillType7||S(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||S(t,{l:-10}),this.pie5=this.pie5||S(r,{l:-10}),this.pie6=this.pie6||S(i,{l:-10}),this.pie7=this.pie7||S(t,{h:60,l:-10}),this.pie8=this.pie8||S(t,{h:-60,l:-10}),this.pie9=this.pie9||S(t,{h:120,l:0}),this.pie10=this.pie10||S(t,{h:60,l:-20}),this.pie11=this.pie11||S(t,{h:-60,l:-20}),this.pie12=this.pie12||S(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||S(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||yr(this.quadrant1Fill)?rt(this.quadrant1Fill):it(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExter
175nalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((p=this.xyChart)==null?void 0:p.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((g=this.xyChart)==null?void 0:g.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?it(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||S(t,{h:-30}),this.git4=this.git4||S(t,{h:-60}),this.git5=this.git5||S(t,{h:-90}),this.git6=this.git6||S(t,{h:60}),this.git7=this.git7||S(t,{h:120}),this.darkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=it(this.git0,25),this.git1=it(this.git1,25),this.git2=it(this.git2,25),this.git3=it(this.git3,25),this.git4=it(this.git4,25),this.git5=it(this.git5,25),this.git6=it(this.git6,25),this.git7=it(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Er,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>
vendor: 6,233 bytes, line 175
175{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},b(xn,"Theme"),xn),TA=b(e=>{const t=new SA;return t.calculate(e),t},"getThemeVariables"),bn,_A=(bn=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=rt(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=K(this.background),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=rt(K("#323D47"),10),this.border1="#ccc",this.border2=oi(255,255,255,.25),this.arrowheadColor=K(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(){var r,i,n,s,a,o,l,c,h,u,p,d;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||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(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?it(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||it(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(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||rt(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.labelBackgroun
vendor: 4,638 bytes, line 175
175dColor=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 g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleInv"+g]=this["cScaleInv"+g]||K(this["cScale"+g]);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this.darkMode?this["cScalePeer"+g]=this["cScalePeer"+g]||rt(this["cScale"+g],10):this["cScalePeer"+g]=this["cScalePeer"+g]||it(this["cScale"+g],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleLabel"+g]=it(this["cScale"+g],75);const t=this.darkMode?-4:-1;for(let g=0;g<5;g++)this["surface"+g]=this["surface"+g]||S(this.mainBkg,{h:180,s:-15,l:t*(5+g*3)}),this["surfacePeer"+g]=this["surfacePeer"+g]||S(this.mainBkg,{h:180,s:-15,l:t*(8+g*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||S(this.primaryColor,{h:64}),this.fillType3=this.fillType3||S(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||S(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||S(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||S(this.primaryColor,{h:128}),this.fillType7=this.fillType7||S(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||S(this.primaryColor,{l:-10}),this.pie5=this.pie5||S(this.secondaryColor,{l:-10}),this.pie6=this.pie6||S(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||S(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||S(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||yr(this.quadrant1Fill)?rt(this.quadrant1Fill):it(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExter
vendor: 4,129 bytes, line 175
175nalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?it(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=it(this.git0,25),this.git1=it(this.git1,25),this.git2=it(this.git2,25),this.git3=it(this.git3,25),this.git4=it(this.git4,25),this.git5=it(this.git5,25),this.git6=it(this.git6,25),this.git7=it(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroun
175dColorOdd=this.attributeBackgroundColorOdd||Er,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},b(bn,"Theme"),bn),BA=b(e=>{const t=new _A;return t.calculate(e),t},"getThemeVariables"),zr={base:{getThemeVariables:oA},dark:{getThemeVariables:cA},default:{getThemeVariables:uA},forest:{getThemeVariables:pA},neutral:{getThemeVariables:gA},neo:{getThemeVariables:yA},"neo-dark":{getThemeVariables:bA},redux:{getThemeVariables:kA},"redux-dark":{getThemeVariables:vA},"redux-color":{getThemeVariables:TA},"redux-dark-color":{getThemeVariables:BA}},Be={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,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWi
175dth: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:.
vendor: 5,626 bytes, line 175
17517},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},qy={...Be,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:zr.default.getThemeVariables(),sequence:{...Be.sequence,messageFont:b(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:b(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:b(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Be.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Be.c4,useWidth:void 0,personFont:b(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Be.flowchart,inheritDir:!1},external_personFont:b(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:b(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:b(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:b(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:b(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:b(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:b(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:b(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:b(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:b(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:b(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:b(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:b(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:b(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:b(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:b(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:b(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:b(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:b(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:b(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:b(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Be.pie,useWidth:984}
175,xyChart:{...Be.xyChart,useWidth:void 0},requirement:{...Be.requirement,useWidth:void 0},packet:{...Be.packet},eventmodeling:{...Be.eventmodeling},treeView:{...Be.treeView,useWidth:void 0},radar:{...Be.radar},railroad:{...Be.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:{...Be.ishikawa},sankey:{...Be.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:{...Be.venn},cynefin:{...Be.cynefin}},zy=b((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...zy(e[i],"")]:[...r,t+i],[]),"keyify"),LA=new Set(zy(qy,"")),Wy=qy,AA={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},FA=b((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(et.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Ya=b(e=>{if(et.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ya(t));return}for(const t of Object.keys(e)){if(et.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!LA.has(t)||e[t]==null){et.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=AA[t];i?FA(e[t],i):(et.debug("sanitizing object",t),Ya(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(et.debug("sanitizing css option",t),e[t]=Hy(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}et.debug("After sanitization",e)}},"sanitizeDirective"),Hy=b(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),_n=Object.freeze(Wy),Mr=b(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Ve=Te({},_n),Va,Ni=[],ws=Te({},_n),Ys=b((e,t)=>{let r=Te({},e),i={};for(const n of t)Vy(n),i=Te(i,n);if(r=Te(r,i),i.theme&&i.theme in zr){const n=Te({},Va),s=Te(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in zr&&(r.themeVariables=zr[r.theme].getThemeVariables(s))}return ws=r,IA(ws),ws},"updateCurrentConfig"),EA=b(e=>(Ve=Te({},_n),Ve=Te(Ve,e),e.theme&&zr[e.theme]&&(Ve.themeVariables=zr[e.theme].getThemeVariables(e.themeVariables)),Ys(Ve,Ni),Ve),"setSiteConfig"),NA=b(e=>{Va=Te({},e)},"saveConfigFromInitialize"),MA=b(e=>(Ve=Te(Ve,e),Ys(Ve,Ni),Ve),"updateSiteConfig"),Uy=b(()=>Te({},Ve),"getSiteConfig"),Yy=b(e=>(Ys(ws,[e]),me()),"setConfig"),me=b(()=>Te({},ws),"getConfig"),Vy=b(e=>{e&&(["secure",...Ve.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(et.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"&&Vy(e[t])}))},"sanitize"),$A=b(e=>{var t;Ya(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ni.push(e),Ys(Ve,Ni)},"addDirective"),Ga=b((e=Ve)=>{Ni=[],Ys(e,Ni)},"reset"),jA={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."},fp={},Gy=b(e=>{fp[e]||(et.warn(jA[e]),fp[e]=!0)},"issueWarning"),IA=b(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Gy("LAZY_LOAD_DEPRECATED")},"checkConfig"),k7=b(()=>{let e={};Va&&(e=Te(e,Va));for(const t of Ni)e=Te(e,t);return e},"getUserDefinedConfig"),Ie=b(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Gy("FLOWCHART_HTML_LABELS_DEPRECATED"),Mr(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Xy=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,vs=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2}
vendor: 13,728 bytes, lines 175-299
175)?/gi,DA=/\s*%%.*\n/gm,Cn,Qy=(Cn=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},b(Cn,"UnknownDiagramError"),Cn),Mi={},Hh=b(function(e,t){e=e.replace(Xy,"").replace(vs,"").replace(DA,`
176`);for(const[r,{detector:i}]of Object.entries(Mi))if(i(e,t))return r;throw new Qy(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ac=b((...e)=>{for(const{id:t,detector:r,loader:i}of e)Ky(t,r,i)},"registerLazyLoadedDiagrams"),Ky=b((e,t,r)=>{Mi[e]&&et.warn(`Detector with key ${e} already exists. Overwriting.`),Mi[e]={detector:t,loader:r},et.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),PA=b(e=>Mi[e].loader,"getDiagramLoader"),Vs=/<br\s*\/?>/gi,OA=b(e=>e?tx(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),RA=(()=>{let e=!1;return()=>{e||(Zy(),e=!0)}})();function Zy(){const e="data-temp-href-target";Sn.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Sn.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"))})}b(Zy,"setupDompurifyHooks");var Jy=b(e=>(RA(),Sn.sanitize(e)),"removeScript"),gp=b((e,t)=>{if(Ie(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Jy(e):r!=="loose"&&(e=tx(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=HA(e))}return e},"sanitizeMore"),nr=b((e,t)=>e&&(t.dompurifyConfig?e=Sn.sanitize(gp(e,t),t.dompurifyConfig).toString():e=Sn.sanitize(gp(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),qA=b((e,t)=>typeof e=="string"?nr(e,t):e.flat().map(r=>nr(r,t)),"sanitizeTextOrArray"),zA=b(e=>Vs.test(e),"hasBreaks"),WA=b(e=>e.split(Vs),"splitBreaks"),HA=b(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),tx=b(e=>e.replace(Vs,"#br#"),"breakToPlaceholder"),UA=b(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),YA=b(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),VA=b(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),mp=b(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const s=t[i-1],a=t[i+1];GA(s,a)&&(n=s+","+a,i++,r.pop())}r.push(XA(n))}return r.join("")},"parseGenericTypes"),Fc=b((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),GA=b((e,t)=>{const r=Fc(e,"~"),i=Fc(t,"~");return r===1&&i===1},"shouldCombineSets"),XA=b(e=>{const t=Fc(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),s=i.lastIndexOf("~");for(;n!==-1&&s!==-1&&n!==s;)i[n]="<",i[s]=">",n=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),yp=b(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ec=/\$\$(.*?)\$\$/g,Es=b(e=>{var t;return(((t=e.match(Ec))==null?void 0:t.length)??0)>0},"hasKatex"),w7=b(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await ex(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),QA=b(async(e,t)=>{if(!Es(e))return e;if(!(yp()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Ec,"MathML is unsupported in this environment.");{const{default:r}=await Vt(async()=>{const{default:n}=await import("./katex-C5jXJg4s.js");return{default:n}},[]),i=t.forceLegacyMathML||!yp()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Vs).map(n=>Es(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(Ec,(n,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),ex=b(async(e,t)=>nr(await QA(e,t),t),"renderKatexSanitized"),Gs={getRows:OA,sanitizeText:nr,sanitizeTextOrArray:qA,hasBreaks:zA,splitBreaks:WA,lineBreakRegex:Vs,removeScript:Jy,getUrl:UA,evaluate:Mr,getMax:YA,getMin:VA},KA=b(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),ZA=b(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),rx=b(function(e,t,r,i){const n=ZA(t,r,i);KA(e,n)},"configureSvgSize"),JA=b(function(e,t,r,i){const n=t.node().getBBox(),s=n.width,a=n.height;et.info(`SVG bounds: ${s}x${a}`,n);let o=0,l=0;et.info(`Graph bounds: ${o}x${l}`,e),o=s+r*2,l=a+r*2,et.info(`Calculated bounds: ${o}x${l}`),rx(t,l,o,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Sa={};function Nc(e){return[...e.cssRules].map(t=>t.cssText).join(`
177`)}b(Nc,"cssStyleSheetToString");var tF=b((e,t,r,i)=>{let n="";return e in Sa&&Sa[e]?n=Sa[e]({...r,svgId:i}):et.warn(`No theme found for ${e}`),`& {
178    font-family: ${r.fontFamily};
179    font-size: ${r.fontSize};
180    fill: ${r.textColor}
181  }
182  @keyframes edge-animation-frame {
183    from {
184      stroke-dashoffset: 0;
185    }
186  }
187  @keyframes dash {
188    to {
189      stroke-dashoffset: 0;
190    }
191  }
192  & .edge-animation-slow {
193    stroke-dasharray: 9,5 !important;
194    stroke-dashoffset: 900;
195    animation: dash 50s linear infinite;
196    stroke-linecap: round;
197  }
198  & .edge-animation-fast {
199    stroke-dasharray: 9,5 !important;
200    stroke-dashoffset: 900;
201    animation: dash 20s linear infinite;
202    stroke-linecap: round;
203  }
204  /* Classes common for multiple diagrams */
205
206  & .error-icon {
207    fill: ${r.errorBkgColor};
208  }
209  & .error-text {
210    fill: ${r.errorTextColor};
211    stroke: ${r.errorTextColor};
212  }
213
214  & .edge-thickness-normal {
215    stroke-width: ${r.strokeWidth??1}px;
216  }
217  & .edge-thickness-thick {
218    stroke-width: 3.5px
219  }
220  & .edge-pattern-solid {
221    stroke-dasharray: 0;
222  }
223  & .edge-thickness-invisible {
224    stroke-width: 0;
225    fill: none;
226  }
227  & .edge-pattern-dashed{
228    stroke-dasharray: 3;
229  }
230  .edge-pattern-dotted {
231    stroke-dasharray: 2;
232  }
233
234  & .marker {
235    fill: ${r.lineColor};
236    stroke: ${r.lineColor};
237  }
238  & .marker.cross {
239    stroke: ${r.lineColor};
240  }
241
242  & svg {
243    font-family: ${r.fontFamily};
244    font-size: ${r.fontSize};
245  }
246   & p {
247    margin: 0
248   }
249
250  ${n}
251  .node .neo-node {
252    stroke: ${r.nodeBorder};
253  }
254
255  [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
256    stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
257    filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
258  }
259  [data-look="neo"].swimlane.cluster rect {
260    filter: none;
261  }
262
263
264  [data-look="neo"].node path {
265    stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
266    stroke-width: ${r.strokeWidth??1}px;
267  }
268
269  [data-look="neo"].node .outer-path {
270    filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
271  }
272
273  [data-look="neo"].node .neo-line path {
274    stroke: ${r.nodeBorder};
275    filter: none;
276  }
277
278  [data-look="neo"].node circle{
279    stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
280    filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
281  }
282
283  [data-look="neo"].node circle .state-start{
284    fill: #000000;
285  }
286
287  [data-look="neo"].icon-shape .icon {
288    fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
289    filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
290  }
291
292    [data-look="neo"].icon-shape .icon-neo path {
293    stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
294    filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
295  }
296
297  ${t}
298`},"getStyles"),eF=b((e,t)=>{t!==void 0&&(Sa[e]=t)},"addStylesForDiagram"),rF=tF,ix={};GL(ix,{clear:()=>iF,getAccDescription:()=>oF,getAccTitle:()=>sF,getDiagramTitle:()=>cF,setAccDescription:()=>aF,setAccTitle:()=>nF,setDiagramTitle:()=>lF});var Uh="",Yh="",Vh="",Gh=b(e=>nr(e,me()),"sanitizeText"),iF=b(()=>{Uh="",Vh="",Yh=""},"clear"),nF=b(e=>{Uh=Gh(e).replace(/^\s+/g,"")},"setAccTitle"),sF=b(()=>Uh,"getAccTitle"),aF=b(e=>{Vh=Gh(e).replace(/\n\s+/g,`
299`)},"setAccDescription"),oF=b(()=>Vh,"getAccDescription"),lF=b(e=>{Yh=Gh(e)},"setDiagramTitle"),cF=b(()=>Yh,"getDiagramTitle"),xp=et,hF=Wh,Gt=me,v7=Yy,S7=_n,Xh=b(e=>nr(e,Gt()),"sanitizeText"),uF=JA,dF=b(()=>ix,"getCommonDb"),Xa={},Qa=b((e,t,r)=>{var i;Xa[e]&&xp.warn(`Diagram with id ${e} already registered. Overwriting.`),Xa[e]=t,r&&Ky(e,r),eF(e,t.styles),(i=t.injectUtils)==null||i.call(t,xp,hF,Gt,Xh,uF,dF(),()=>{})},"registerDiagram"),Mc=b(e=>{if(e in Xa)return Xa[e];throw new pF(e)},"getDiagram"),kn,pF=(kn=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},b(kn,"DiagramNotFoundError"),kn),fF={value:()=>{}};function nx(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Ta(r)}function Ta(e){this._=e}function gF(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ta.prototype=nx.prototype={constructor:Ta,on:function(e,t){var r=this._,i=gF(e+"",r),n,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((n=(e=i[s]).type)&&(n=mF(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(n=(e=i[s]).type)r[n]=bp(r[n],e.name,t);else if(t==null)for(n in r)r[n]=bp(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Ta(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,s;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,n=s.length;i<n;++i)s[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,s=i.length;n<s;++n)i[n].value.apply(t,r)}};function mF(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function bp(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=fF,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var $c="http://www.w3.org/1999/xhtml";const Cp={svg:"http://www.w3.org/2000/svg",xhtml:$c,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ao(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Cp.hasOwnProperty(t)?{space:Cp[t],local:e}:e}function yF(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===$c&&t.documentElement.namespaceURI===$c?t.createElement(e):t.createElementNS(r,e)}}function xF(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function sx(e){var t=Ao(e);return(t.local?xF:yF)(t)}function bF(){}function Qh(e){return e==null?bF:function(){return this.querySelector(e)}}function CF(e){typeof e!="function"&&(e=Qh(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var s=t[n],a=s.length,o=i[n]=new Array(a),l,c,h=0;h<a;++h)(l=s[h])&&(c=e.call(l,l.__data__,h,s))&&("__data__"in l&&(c.__data__=l.__data__),o[h]=c);return new er(i,this._parents)}function kF(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function wF(){return[]}function ax(e){return e==null?wF:function(){return this.querySelectorAll(e)}}function vF(e){return function(){return kF(e.apply(this,arguments))}}function SF(e){typeof e=="function"?e=vF(e):e=ax(e);for(var t=this._groups,r=t.length,i=[],n=[],s=0;s<r;++s)for(var a=t[s],o=a.length,l,c=0;c<o;++c)(l=a[c])&&(i.push(e.call(l,l.__data__,c,a)),n.push(l));return new er(i,n)}function ox(e){return function(){return this.matches(e)}}function lx(e){return function(t){return t.matches(e)}}var TF=Array.prototype.find;function _F(e){return function(){return TF.call(this.children,e)}}function BF(){return this.firstElementChild}function LF(e){return this.select(e==null?BF:_F(typeof e=="function"?e:lx(e)))}var AF=Array.prototype.filter;function FF(){return Array.from(this.children)}function EF(e){return function(){return AF.call(this.children,e)}}function NF(e){return this.selectAll(e==null?FF:EF(typeof e=="function"?e:lx(e)))}function MF(e){typeof e!="function"&&(e=ox(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var s=t[n],a=s.length,o=i[n]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&o.push(l);return new er(i,this._parents)}function cx(e){return new Array(e.length)}function $F(){return new er(this._enter||this._groups.map(cx),this._parents)}function Ka(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ka.prototype={constructor:Ka,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function jF(e){return function(){return e}}function IF(e,t,r,i,n,s){for(var a=0,o,l=t.length,c=s.length;a<c;++a)(o=t[a])?(o.__data__=s[a],i[a]=o):r[a]=new Ka(e,s[a]);for(;a<l;
vendor: 13,638 bytes, line 299
299++a)(o=t[a])&&(n[a]=o)}function DF(e,t,r,i,n,s,a){var o,l,c=new Map,h=t.length,u=s.length,p=new Array(h),d;for(o=0;o<h;++o)(l=t[o])&&(p[o]=d=a.call(l,l.__data__,o,t)+"",c.has(d)?n[o]=l:c.set(d,l));for(o=0;o<u;++o)d=a.call(e,s[o],o,s)+"",(l=c.get(d))?(i[o]=l,l.__data__=s[o],c.delete(d)):r[o]=new Ka(e,s[o]);for(o=0;o<h;++o)(l=t[o])&&c.get(p[o])===l&&(n[o]=l)}function PF(e){return e.__data__}function OF(e,t){if(!arguments.length)return Array.from(this,PF);var r=t?DF:IF,i=this._parents,n=this._groups;typeof e!="function"&&(e=jF(e));for(var s=n.length,a=new Array(s),o=new Array(s),l=new Array(s),c=0;c<s;++c){var h=i[c],u=n[c],p=u.length,d=RF(e.call(h,h&&h.__data__,c,i)),g=d.length,y=o[c]=new Array(g),C=a[c]=new Array(g),x=l[c]=new Array(p);r(h,u,y,C,x,d,t);for(var w=0,k=0,v,T;w<g;++w)if(v=y[w]){for(w>=k&&(k=w+1);!(T=C[k])&&++k<g;);v._next=T||null}}return a=new er(a,i),a._enter=o,a._exit=l,a}function RF(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function qF(){return new er(this._exit||this._groups.map(cx),this._parents)}function zF(e,t,r){var i=this.enter(),n=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?s.remove():r(s),i&&n?i.merge(n).order():n}function WF(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,s=i.length,a=Math.min(n,s),o=new Array(n),l=0;l<a;++l)for(var c=r[l],h=i[l],u=c.length,p=o[l]=new Array(u),d,g=0;g<u;++g)(d=c[g]||h[g])&&(p[g]=d);for(;l<n;++l)o[l]=r[l];return new er(o,this._parents)}function HF(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,s=i[n],a;--n>=0;)(a=i[n])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function UF(e){e||(e=YF);function t(u,p){return u&&p?e(u.__data__,p.__data__):!u-!p}for(var r=this._groups,i=r.length,n=new Array(i),s=0;s<i;++s){for(var a=r[s],o=a.length,l=n[s]=new Array(o),c,h=0;h<o;++h)(c=a[h])&&(l[h]=c);l.sort(t)}return new er(n,this._parents).order()}function YF(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function VF(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function GF(){return Array.from(this)}function XF(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,s=i.length;n<s;++n){var a=i[n];if(a)return a}return null}function QF(){let e=0;for(const t of this)++e;return e}function KF(){return!this.node()}function ZF(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],s=0,a=n.length,o;s<a;++s)(o=n[s])&&e.call(o,o.__data__,s,n);return this}function JF(e){return function(){this.removeAttribute(e)}}function tE(e){return function(){this.removeAttributeNS(e.space,e.local)}}function eE(e,t){return function(){this.setAttribute(e,t)}}function rE(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function iE(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function nE(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function sE(e,t){var r=Ao(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?tE:JF:typeof t=="function"?r.local?nE:iE:r.local?rE:eE)(r,t))}function hx(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function aE(e){return function(){this.style.removeProperty(e)}}function oE(e,t,r){return function(){this.style.setProperty(e,t,r)}}function lE(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function cE(e,t,r){return arguments.length>1?this.each((t==null?aE:typeof t=="function"?lE:oE)(e,t,r??"")):Bn(this.node(),e)}function Bn(e,t){return e.style.getPropertyValue(t)||hx(e).getComputedStyle(e,null).getPropertyValue(t)}function hE(e){return function(){delete this[e]}}function uE(e,t){return function(){this[e]=t}}function dE(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function pE(e,t){return arguments.length>1?this.each((t==null?hE:typeof t=="function"?dE:uE)(e,t)):this.node()[e]}function ux(e){return e.trim().split(/^|\s+/)}function Kh(e){return e.classList||new dx(e)}function dx(e){this._node=e,this._names=ux(e.getAttribute("class")||"")}dx.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function px(e,t){for(var r=Kh(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function fx(e,t){for(var r=Kh(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function fE(e){return function(){px(this,e)}}function gE(e){return function(){fx(this,e)}}function mE(e,t){return function(){(t.apply(this,arguments)?px:fx)(this,e)}}function yE(e,t){var r=ux(e+"");if(arguments.length<2){for(var i=Kh(this.node()),n=-1,s=r.length;++n<s;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?mE:t?fE:gE)(r,t))}function xE(){this.textContent=""}function bE(e){return function(){this.textContent=e}}function CE(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function kE(e){return arguments.length?this.each(e==null?xE:(typeof e=="function"?CE:bE)(e)):this.node().textContent}function wE(){this.innerHTML=""}function vE(e){return function(){this.innerHTML=e}}function SE(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function TE(e){return arguments.length?this.each(e==null?wE:(typeof e=="function"?SE:vE)(e)):this.node().innerHTML}function _E(){this.nextSibling&&this.parentNode.appendChild(this)}function BE(){return this.each(_E)}function LE(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function AE(){return this.each(LE)}function FE(e){var t=typeof e=="function"?e:sx(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function EE(){return null}function NE(e,t){var r=typeof e=="function"?e:sx(e),i=t==null?EE:typeof t=="function"?t:Qh(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function ME(){var e=this.parentNode;e&&e.removeChild(this)}function $E(){return this.each(ME)}function jE(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function IE(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function DE(e){return this.select(e?IE:jE)}function PE(e){return arguments.length?this.property("__data__",e):this.node().__data__}function OE(e){return function(t){e.call(this,t,this.__data__)}}function RE(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function qE(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,s;r<n;++r)s=t[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++i]=s;++i?t.length=i:delete this.__on}}}function zE(e,t,r){return function(){var i=this.__on,n,s=OE(t);if(i){for(var a=0,o=i.length;a<o;++a)if((n=i[a]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=s,n.options=r),n.value=t;return}}this.addEventListener(e.type,s,r),n={type:e.type,name:e.name,value:t,listener:s,options:r},i?i.push(n):this.__on=[n]}}function WE(e,t,r){var i=RE(e+""),n,s=i.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,h;l<c;++l)for(n=0,h=o[l];n<s;++n)if((a=i[n]).type===h.type&&a.name===h.name)return h.value}return}for(o=t?zE:qE,n=0;n<s;++n)this.each(o(i[n],t,r));return this}function gx(e,t,r){var i=hx(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function HE(e,t){return function(){return gx(this,e,t)}}function UE(e,t){return function(){return gx(this,e,t.apply(this,arguments))}}function YE(e,t){return this.each((typeof t=="function"?UE:HE)(e,t))}function*VE(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,s=i.length,a;n<s;++n)(a=i[n])&&(yield a)}var mx=[null];function er(e,t){this._groups=e,this._parents=t}function Xs(){return new er([[document.documentElement]],mx)}function GE(){return this}er.prototype=Xs.prototype={constructor:er,select:CF,selectAll:SF,selectChild:LF,selectChildren:NF,filter:MF,data:OF,enter:$F,exit:qF,join:zF,merge:WF,selection:GE,order:HF,sort:UF,call:VF,nodes:GF,node:XF,size:QF,empty:KF,each:ZF,attr:sE,style:cE,property:pE,classed:yE,text:kE,html:TE,raise:BE,lower:AE,append:FE,insert:NE,remove:$E,clone:DE,datum:PE,on:WE,dispatch:YE,[Symbol.iterator]:VE};function Yt(e){return typeof e=="string"?new er([[document.querySelector(e)]],[document.documentElement]):new er([[e]],mx)}function Zh(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function yx(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Qs(){}var Ns=.7,Za=1/Ns,an="\\s*([+-]?\\d+)\\s*",Ms="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Br="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",XE=/^#([0-9a-f]{3,8})$/,QE=new RegExp(`^rgb\\(${an},${an},${an}\\)$`),KE=new RegExp(`^rgb\\(${Br},${Br},${Br}\\)$`),ZE=new RegExp(`^rgba\\(${an},${an},${an},${Ms}\\)$`),JE=new RegExp(`^rgba\\(${Br},${Br},${Br},${Ms}\\)$`),t3=new RegExp(`^hsl\\(${Ms},${Br},${Br}\\)$`),e3=new RegExp(`^hsla\\(${Ms},${Br},${Br},${Ms}\\)$`),kp={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Zh(Qs,$s,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:wp,formatHex:wp,formatHex8:r3,formatHsl:i3,formatRgb:vp,toString:vp});function wp(){return this.rgb().formatHex()}function r3(){return this.rgb().formatHex8()}function i3(){return xx(this).formatHsl()}function vp(){return this.rgb().formatRgb()}function $s(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=XE.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Sp(t):r===3?new Ge(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?sa(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?sa(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=QE.exec(e))?new Ge(t[1],t[2],t[3],1):(t=KE.exec(e))?new Ge(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ZE.exec(e))?sa(t[1],t[2],t[3],t[4]):(t=JE.exec(e))?sa(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=t3.exec(e))?Bp(t[1],t[2]/100,t[3]/100,1):(t=e3.exec(e))?Bp(t[1],t[2]/100,t[3]/100,t[4]):kp.hasOwnProperty(e)?Sp(kp[e]):e==="transparent"?new Ge(NaN,NaN,NaN,0):null}function Sp(e){return new Ge(e>>16&255,e>>8&255,e&255,1)}
vendor: 1,833 bytes, line 299
299function sa(e,t,r,i){return i<=0&&(e=t=r=NaN),new Ge(e,t,r,i)}function n3(e){return e instanceof Qs||(e=$s(e)),e?(e=e.rgb(),new Ge(e.r,e.g,e.b,e.opacity)):new Ge}function jc(e,t,r,i){return arguments.length===1?n3(e):new Ge(e,t,r,i??1)}function Ge(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Zh(Ge,jc,yx(Qs,{brighter(e){return e=e==null?Za:Math.pow(Za,e),new Ge(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ns:Math.pow(Ns,e),new Ge(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ge(Ai(this.r),Ai(this.g),Ai(this.b),Ja(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:Tp,formatHex:Tp,formatHex8:s3,formatRgb:_p,toString:_p}));function Tp(){return`#${_i(this.r)}${_i(this.g)}${_i(this.b)}`}function s3(){return`#${_i(this.r)}${_i(this.g)}${_i(this.b)}${_i((isNaN(this.opacity)?1:this.opacity)*255)}`}function _p(){const e=Ja(this.opacity);return`${e===1?"rgb(":"rgba("}${Ai(this.r)}, ${Ai(this.g)}, ${Ai(this.b)}${e===1?")":`, ${e})`}`}function Ja(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ai(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _i(e){return e=Ai(e),(e<16?"0":"")+e.toString(16)}function Bp(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new pr(e,t,r,i)}function xx(e){if(e instanceof pr)return new pr(e.h,e.s,e.l,e.opacity);if(e instanceof Qs||(e=$s(e)),!e)return new pr;if(e instanceof pr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),s=Math.max(t,r,i),a=NaN,o=s-n,l=(s+n)/2;return o?(t===s?a=(r-i)/o+(r<i)*6:r===s?a=(i-t)/o+2:a=(t-r)/o+4,o/=l<.5?s+n:2-s-n,a*=60):o=l>0&&l<1?0:a,new pr(a,o,l,e.opacity)}function a3(e,t,r,i){return arguments.length===1?xx(e):new pr(e,t,r,i??1)}
vendor: 11,602 bytes, line 299
299function pr(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Zh(pr,a3,yx(Qs,{brighter(e){return e=e==null?Za:Math.pow(Za,e),new pr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ns:Math.pow(Ns,e),new pr(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,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Ge(Cl(e>=240?e-240:e+120,n,i),Cl(e,n,i),Cl(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new pr(Lp(this.h),aa(this.s),aa(this.l),Ja(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(){const e=Ja(this.opacity);return`${e===1?"hsl(":"hsla("}${Lp(this.h)}, ${aa(this.s)*100}%, ${aa(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Lp(e){return e=(e||0)%360,e<0?e+360:e}function aa(e){return Math.max(0,Math.min(1,e||0))}function Cl(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Jh=e=>()=>e;function bx(e,t){return function(r){return e+r*t}}function o3(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function T7(e,t){var r=t-e;return r?bx(e,r>180||r<-180?r-360*Math.round(r/360):r):Jh(isNaN(e)?t:e)}function l3(e){return(e=+e)==1?Cx:function(t,r){return r-t?o3(t,r,e):Jh(isNaN(t)?r:t)}}function Cx(e,t){var r=t-e;return r?bx(e,r):Jh(isNaN(e)?t:e)}const Ap=(function e(t){var r=l3(t);function i(n,s){var a=r((n=jc(n)).r,(s=jc(s)).r),o=r(n.g,s.g),l=r(n.b,s.b),c=Cx(n.opacity,s.opacity);return function(h){return n.r=a(h),n.g=o(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i})(1);function ri(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Ic=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,kl=new RegExp(Ic.source,"g");function c3(e){return function(){return e}}function h3(e){return function(t){return e(t)+""}}function u3(e,t){var r=Ic.lastIndex=kl.lastIndex=0,i,n,s,a=-1,o=[],l=[];for(e=e+"",t=t+"";(i=Ic.exec(e))&&(n=kl.exec(t));)(s=n.index)>r&&(s=t.slice(r,s),o[a]?o[a]+=s:o[++a]=s),(i=i[0])===(n=n[0])?o[a]?o[a]+=n:o[++a]=n:(o[++a]=null,l.push({i:a,x:ri(i,n)})),r=kl.lastIndex;return r<t.length&&(s=t.slice(r),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?h3(l[0].x):c3(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)o[(u=l[h]).i]=u.x(c);return o.join("")})}var Fp=180/Math.PI,Dc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function kx(e,t,r,i,n,s){var a,o,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),e*i<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:n,translateY:s,rotate:Math.atan2(t,e)*Fp,skewX:Math.atan(l)*Fp,scaleX:a,scaleY:o}}var oa;function d3(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Dc:kx(t.a,t.b,t.c,t.d,t.e,t.f)}function p3(e){return e==null||(oa||(oa=document.createElementNS("http://www.w3.org/2000/svg","g")),oa.setAttribute("transform",e),!(e=oa.transform.baseVal.consolidate()))?Dc:(e=e.matrix,kx(e.a,e.b,e.c,e.d,e.e,e.f))}function wx(e,t,r,i){function n(c){return c.length?c.pop()+" ":""}function s(c,h,u,p,d,g){if(c!==u||h!==p){var y=d.push("translate(",null,t,null,r);g.push({i:y-4,x:ri(c,u)},{i:y-2,x:ri(h,p)})}else(u||p)&&d.push("translate("+u+t+p+r)}function a(c,h,u,p){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),p.push({i:u.push(n(u)+"rotate(",null,i)-2,x:ri(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function o(c,h,u,p){c!==h?p.push({i:u.push(n(u)+"skewX(",null,i)-2,x:ri(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,p,d,g){if(c!==u||h!==p){var y=d.push(n(d)+"scale(",null,",",null,")");g.push({i:y-4,x:ri(c,u)},{i:y-2,x:ri(h,p)})}else(u!==1||p!==1)&&d.push(n(d)+"scale("+u+","+p+")")}return function(c,h){var u=[],p=[];return c=e(c),h=e(h),s(c.translateX,c.translateY,h.translateX,h.translateY,u,p),a(c.rotate,h.rotate,u,p),o(c.skewX,h.skewX,u,p),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,p),c=h=null,function(d){for(var g=-1,y=p.length,C;++g<y;)u[(C=p[g]).i]=C.x(d);return u.join("")}}}var f3=wx(d3,"px, ","px)","deg)"),g3=wx(p3,", ",")",")"),Ln=0,rs=0,Un=0,vx=1e3,to,is,eo=0,$i=0,Fo=0,js=typeof performance=="object"&&performance.now?performance:Date,Sx=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function tu(){return $i||(Sx(m3),$i=js.now()+Fo)}function m3(){$i=0}function ro(){this._call=this._time=this._next=null}ro.prototype=Tx.prototype={constructor:ro,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?tu():+r)+(t==null?0:+t),!this._next&&is!==this&&(is?is._next=this:to=this,is=this),this._call=e,this._time=r,Pc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Pc())}};function Tx(e,t,r){var i=new ro;return i.restart(e,t,r),i}function y3(){tu(),++Ln;for(var e=to,t;e;)(t=$i-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ln}function Ep(){$i=(eo=js.now())+Fo,Ln=rs=0;try{y3()}finally{Ln=0,b3(),$i=0}}function x3(){var e=js.now(),t=e-eo;t>vx&&(Fo-=t,eo=e)}function b3(){for(var e,t=to,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:to=r);is=e,Pc(i)}function Pc(e){if(!Ln){rs&&(rs=clearTimeout(rs));var t=e-$i;t>24?(e<1/0&&(rs=setTimeout(Ep,e-js.now()-Fo)),Un&&(Un=clearInterval(Un))):(Un||(eo=js.now(),Un=setInterval(x3,vx)),Ln=1,Sx(Ep))}}function Np(e,t,r){var i=new ro;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var C3=nx("start","end","cancel","interrupt"),k3=[],_x=0,Mp=1,Oc=2,_a=3,$p=4,Rc=5,Ba=6;function Eo(e,t,r,i,n,s){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;w3(e,r,{name:t,index:i,group:n,on:C3,tween:k3,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:_x})}function eu(e,t){var r=xr(e,t);if(r.state>_x)throw new Error("too late; already scheduled");return r}function $r(e,t){var r=xr(e,t);if(r.state>_a)throw new Error("too late; already running");return r}function xr(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function w3(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=Tx(s,0,r.time);function s(c){r.state=Mp,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var h,u,p,d;if(r.state!==Mp)return l();for(h in i)if(d=i[h],d.name===r.name){if(d.state===_a)return Np(a);d.state===$p?(d.state=Ba,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+h<t&&(d.state=Ba,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[h])}if(Np(function(){r.state===_a&&(r.state=$p,r.timer.restart(o,r.delay,r.time),o(c))}),r.state=Oc,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Oc){for(r.state=_a,n=new Array(p=r.tween.length),h=0,u=-1;h<p;++h)(d=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(n[++u]=d);n.length=u+1}}function o(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=Rc,1),u=-1,p=n.length;++u<p;)n[u].call(e,h);r.state===Rc&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Ba,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function v3(e,t){var r=e.__transition,i,n,s=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((i=r[a]).name!==t){s=!1;continue}n=i.state>Oc&&i.state<Rc,i.state=Ba,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}s&&delete e.__transition}}function S3(e){return this.each(function(){v3(this,e)})}function T3(e,t){var r,i;return function(){var n=$r(this,e),s=n.tween;if(s!==r){i=r=s;for(var a=0,o=i.length;a<o;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}n.tween=i}}function _3(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var s=$r(this,e),a=s.tween;if(a!==i){n=(i=a).slice();for(var o={name:t,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=o;break}l===c&&n.push(o)}s.tween=n}}function B3(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=xr(this.node(),r).tween,n=0,s=i.length,a;n<s;++n)if((a=i[n]).name===e)return a.value;return null}return this.each((t==null?T3:_3)(r,e,t))}function ru(e,t,r){var i=e._id;return e.each(function(){var n=$r(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return xr(n,i).value[t]}}function Bx(e,t){var r;return(typeof t=="number"?ri:t instanceof $s?Ap:(r=$s(t))?(t=r,Ap):u3)(e,t)}function L3(e){return function(){this.removeAttribute(e)}}function A3(e){return function(){this.removeAttributeNS(e.space,e.local)}}function F3(e,t,r){var i,n=r+"",s;return function(){var a=this.getAttribute(e);return a===n?null:a===i?s:s=t(i=a,r)}}function E3(e,t,r){var i,n=r+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===n?null:a===i?s:s=t(i=a,r)}}function N3(e,t,r){var i,n,s;return function(){var a,o=r(this),l;return o==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=o+"",a===l?null:a===i&&l===n?s:(n=l,s=t(i=a,o)))}}function M3(e,t,r){var i,n,s;return function(){var a,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=o+"",a===l?null:a===i&&l===n?s:(n=l,s=t(i=a,o)))}}function $3(e,t){var r=Ao(e),i=r==="transform"?g3:Bx;return this.attrTween(e,typeof t=="function"?(r.local?M3:N3)(r,i,ru(this,"attr."+e,t)):t==null?(r.local?A3:L3)(r):(r.local?E3:F3)(r,i,t))}function j3(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function I3(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function D3(e,t){var r,i;function n(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&I3(e,s)),r}return n._value=t,n}function P3(e,t){var r,i;function n(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&j3(e,s)),r}return n._value=t,n}function O3(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Ao(e);return this.tween(r,(i.local?D3:P3)(i,t))}function R3(e,t){return function(){eu(this,e).delay=+t.apply(this,arguments)}}function q3(e,t){return t=+t,function(){eu(this,e).delay=t}}function z3(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?R3:q3)(t,e)):xr(this.node(),t).delay}function W3(e,t){return function(){$r(this,e).duration=+t.apply(this,arguments)}}function H3(e,t){return t=+t,function(){$r(this,e).duration=t}}function U3(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?W3:H3)(t,e)):xr(this.node(),t).duration}function Y3(e,t){if(typeof t!="function")throw new Error;return function(){$r(this,e).ease=t}}function V3(e){var t=this._id;return arguments.length?this.each(Y3(t,e)):xr(this.node(),t).ease}function G3(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;$r(this,e).ease=r}}function X3(e){if(typeof e!="function")throw new Error;return this.each(G3(this._id,e))}function Q3(e){typeof e!="function"&&(e=ox(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var s=t[n],a=s.length,o=i[n]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&o.push(l);return new Hr(i,this._parents,this._name,this._id)}function K3(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,s=Math.min(i,n),a=new Array(i),o=0;o<s;++o)for(var l=t[o],c=r[o],h=l.length,u=a[o]=new Array(h),p,d=0;d<h;++d)(p=l[d]||c[d])&&(u[d]=p);for(;o<i;++o)a[o]=t[o];return new Hr(a,this._parents,this._name,this._id)}function Z3(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>
vendor: 3,189 bytes, line 299
299=0&&(t=t.slice(0,r)),!t||t==="start"})}function J3(e,t,r){var i,n,s=Z3(t)?eu:$r;return function(){var a=s(this,e),o=a.on;o!==i&&(n=(i=o).copy()).on(t,r),a.on=n}}function tN(e,t){var r=this._id;return arguments.length<2?xr(this.node(),r).on.on(e):this.each(J3(r,e,t))}function eN(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function rN(){return this.on("end.remove",eN(this._id))}function iN(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Qh(e));for(var i=this._groups,n=i.length,s=new Array(n),a=0;a<n;++a)for(var o=i[a],l=o.length,c=s[a]=new Array(l),h,u,p=0;p<l;++p)(h=o[p])&&(u=e.call(h,h.__data__,p,o))&&("__data__"in h&&(u.__data__=h.__data__),c[p]=u,Eo(c[p],t,r,p,c,xr(h,r)));return new Hr(s,this._parents,t,r)}function nN(e){var t=this._name,r=this._id;typeof e!="function"&&(e=ax(e));for(var i=this._groups,n=i.length,s=[],a=[],o=0;o<n;++o)for(var l=i[o],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var p=e.call(h,h.__data__,u,l),d,g=xr(h,r),y=0,C=p.length;y<C;++y)(d=p[y])&&Eo(d,t,r,y,p,g);s.push(p),a.push(h)}return new Hr(s,a,t,r)}var sN=Xs.prototype.constructor;function aN(){return new sN(this._groups,this._parents)}function oN(e,t){var r,i,n;return function(){var s=Bn(this,e),a=(this.style.removeProperty(e),Bn(this,e));return s===a?null:s===r&&a===i?n:n=t(r=s,i=a)}}function Lx(e){return function(){this.style.removeProperty(e)}}function lN(e,t,r){var i,n=r+"",s;return function(){var a=Bn(this,e);return a===n?null:a===i?s:s=t(i=a,r)}}function cN(e,t,r){var i,n,s;return function(){var a=Bn(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),Bn(this,e))),a===l?null:a===i&&l===n?s:(n=l,s=t(i=a,o))}}function hN(e,t){var r,i,n,s="style."+t,a="end."+s,o;return function(){var l=$r(this,e),c=l.on,h=l.value[s]==null?o||(o=Lx(t)):void 0;(c!==r||n!==h)&&(i=(r=c).copy()).on(a,n=h),l.on=i}}function uN(e,t,r){var i=(e+="")=="transform"?f3:Bx;return t==null?this.styleTween(e,oN(e,i)).on("end.style."+e,Lx(e)):typeof t=="function"?this.styleTween(e,cN(e,i,ru(this,"style."+e,t))).each(hN(this._id,e)):this.styleTween(e,lN(e,i,t),r).on("end.style."+e,null)}function dN(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function pN(e,t,r){var i,n;function s(){var a=t.apply(this,arguments);return a!==n&&(i=(n=a)&&dN(e,a,r)),i}return s._value=t,s}function fN(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,pN(e,t,r??""))}function gN(e){return function(){this.textContent=e}}function mN(e){return function(){var t=e(this);this.textContent=t??""}}function yN(e){return this.tween("text",typeof e=="function"?mN(ru(this,"text",e)):gN(e==null?"":e+""))}function xN(e){return function(t){this.textContent=e.call(this,t)}}function bN(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&xN(n)),t}return i._value=e,i}function CN(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,bN(e))}
vendor: 21,536 bytes, line 299
299function kN(){for(var e=this._name,t=this._id,r=Ax(),i=this._groups,n=i.length,s=0;s<n;++s)for(var a=i[s],o=a.length,l,c=0;c<o;++c)if(l=a[c]){var h=xr(l,t);Eo(l,e,r,c,a,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Hr(i,this._parents,e,r)}function wN(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(s,a){var o={value:a},l={value:function(){--n===0&&s()}};r.each(function(){var c=$r(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),n===0&&s()})}var vN=0;function Hr(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Ax(){return++vN}var Pr=Xs.prototype;Hr.prototype={constructor:Hr,select:iN,selectAll:nN,selectChild:Pr.selectChild,selectChildren:Pr.selectChildren,filter:Q3,merge:K3,selection:aN,transition:kN,call:Pr.call,nodes:Pr.nodes,node:Pr.node,size:Pr.size,empty:Pr.empty,each:Pr.each,on:tN,attr:$3,attrTween:O3,style:uN,styleTween:fN,text:yN,textTween:CN,remove:rN,tween:B3,delay:z3,duration:U3,ease:V3,easeVarying:X3,end:wN,[Symbol.iterator]:Pr[Symbol.iterator]};function SN(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var TN={time:null,delay:0,duration:250,ease:SN};function _N(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function BN(e){var t,r;e instanceof Hr?(t=e._id,e=e._name):(t=Ax(),(r=TN).time=tu(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,s=0;s<n;++s)for(var a=i[s],o=a.length,l,c=0;c<o;++c)(l=a[c])&&Eo(l,e,t,c,a,r||_N(l,t));return new Hr(i,this._parents,e,t)}Xs.prototype.interrupt=S3;Xs.prototype.transition=BN;const qc=Math.PI,zc=2*qc,ki=1e-6,LN=zc-ki;function Fx(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function AN(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Fx;const r=10**t;return function(i){this._+=i[0];for(let n=1,s=i.length;n<s;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class FN{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Fx:AN(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,s,a){this._append`C${+t},${+r},${+i},${+n},${this._x1=+s},${this._y1=+a}`}arcTo(t,r,i,n,s){if(t=+t,r=+r,i=+i,n=+n,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,l=i-t,c=n-r,h=a-t,u=o-r,p=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>ki)if(!(Math.abs(u*l-c*h)>ki)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-a,g=n-o,y=l*l+c*c,C=d*d+g*g,x=Math.sqrt(y),w=Math.sqrt(p),k=s*Math.tan((qc-Math.acos((y+p-C)/(2*x*w)))/2),v=k/w,T=k/x;Math.abs(v-1)>ki&&this._append`L${t+v*h},${r+v*u}`,this._append`A${s},${s},0,0,${+(u*d>h*g)},${this._x1=t+T*l},${this._y1=r+T*c}`}}arc(t,r,i,n,s,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(n),l=i*Math.sin(n),c=t+o,h=r+l,u=1^a,p=a?n-s:s-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>ki||Math.abs(this._y1-h)>ki)&&this._append`L${c},${h}`,i&&(p<0&&(p=p%zc+zc),p>LN?this._append`A${i},${i},0,1,${u},${t-o},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:p>ki&&this._append`A${i},${i},0,${+(p>=qc)},${u},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function Gi(e){return function(){return e}}const _7=Math.abs,B7=Math.atan2,L7=Math.cos,A7=Math.max,F7=Math.min,E7=Math.sin,N7=Math.sqrt,jp=1e-12,iu=Math.PI,Ip=iu/2,M7=2*iu;function $7(e){return e>1?0:e<-1?iu:Math.acos(e)}function j7(e){return e>=1?Ip:e<=-1?-Ip:Math.asin(e)}function EN(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new FN(t)}function NN(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ex(e){this._context=e}Ex.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point: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:this._context.lineTo(e,t);break}}};function Ss(e){return new Ex(e)}function MN(e){return e[0]}function $N(e){return e[1]}function jN(e,t){var r=Gi(!0),i=null,n=Ss,s=null,a=EN(o);e=typeof e=="function"?e:e===void 0?MN:Gi(e),t=typeof t=="function"?t:t===void 0?$N:Gi(t);function o(l){var c,h=(l=NN(l)).length,u,p=!1,d;for(i==null&&(s=n(d=a())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===p&&((p=!p)?s.lineStart():s.lineEnd()),p&&s.point(+e(u,c,l),+t(u,c,l));if(d)return s=null,d+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:Gi(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:Gi(+l),o):t},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Gi(!!l),o):r},o.curve=function(l){return arguments.length?(n=l,i!=null&&(s=n(i)),o):n},o.context=function(l){return arguments.length?(l==null?i=s=null:s=n(i=l),o):i},o}class Nx{constructor(t,r){this._context=t,this._x=r}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(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Mx(e){return new Nx(e,!0)}function $x(e){return new Nx(e,!1)}function ci(){}function io(e,t,r){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+r)/6)}function No(e){this._context=e}No.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:io(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point: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:io(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Wc(e){return new No(e)}function jx(e){this._context=e}jx.prototype={areaStart:ci,areaEnd:ci,lineStart: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},lineEnd: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);break}}},point: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:io(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function IN(e){return new jx(e)}function Ix(e){this._context=e}Ix.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point: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 r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:io(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function DN(e){return new Ix(e)}function Dx(e,t){this._basis=new No(e),this._beta=t}Dx.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],s=e[r]-i,a=t[r]-n,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+l*s),this._beta*t[o]+(1-this._beta)*(n+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const PN=(function e(t){function r(i){return t===1?new No(i):new Dx(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function no(e,t,r){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-r),e._x2,e._y2)}function nu(e,t){this._context=e,this._k=(1-t)/6}nu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:no(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point: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:no(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Px=(function e(t){function r(i){return new nu(i,t)}return r.tension=function(i){return e(+i)},r})(0);function su(e,t){this._context=e,this._k=(1-t)/6}su.prototype={areaStart:ci,areaEnd:ci,lineStart: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},lineEnd: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);break}}},point: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:no(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ON=(function e(t){function r(i){return new su(i,t)}return r.tension=function(i){return e(+i)},r})(0);function au(e,t){this._context=e,this._k=(1-t)/6}au.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point: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:no(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const RN=(function e(t){function r(i){return new au(i,t)}return r.tension=function(i){return e(+i)},r})(0);function ou(e,t,r){var i=e._x1,n=e._y1,s=e._x2,a=e._y2;if(e._l01_a>jp){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>jp){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,s,a,e._x2,e._y2)}function Ox(e,t){this._context=e,this._alpha=t}Ox.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart: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},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,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:ou(this,e,t);break}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}};const Rx=(function e(t){function r(i){return t?new Ox(i,t):new nu(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function qx(e,t){this._context=e,this._alpha=t}qx.prototype={areaStart:ci,areaEnd:ci,lineStart: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},lineEnd: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);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,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:ou(this,e,t);break}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}};const qN=(function e(t){function r(i){return t?new qx(i,t):new su(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function zx(e,t){this._context=e,this._alpha=t}zx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart: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},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,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:ou(this,e,t);break}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}};const zN=(function e(t){function r(i){return t?new zx(i,t):new au(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Wx(e){this._context=e}Wx.prototype={areaStart:ci,areaEnd:ci,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function WN(e){return new Wx(e)}function Dp(e){return e<0?-1:1}function Pp(e,t,r){var i=e._x1-e._x0,n=t-e._x1,s=(e._y1-e._y0)/(i||n<0&&-0),a=(r-e._y1)/(n||i<0&&-0),o=(s*n+a*i)/(i+n);return(Dp(s)+Dp(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function Op(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function wl(e,t,r){var i=e._x0,n=e._y0,s=e._x1,a=e._y1,o=(s-i)/3;e._context.bezierCurveTo(i+o,n+o*t,s-o,a-o*r,s,a)}function so(e){this._context=e}so.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:wl(this,this._t0,Op(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=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,wl(this,Op(this,r=Pp(this,e,t)),r);break;default:wl(this,this._t0,r=Pp(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Hx(e){this._context=new Ux(e)}(Hx.prototype=Object.create(so.prototype)).point=function(e,t){so.prototype.point.call(this,t,e)};function Ux(e){this._context=e}Ux.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,s){this._context.bezierCurveTo(t,e,i,r,s,n)}};function Yx(e){return new so(e)}function Vx(e){return new Hx(e)}function Gx(e){this._context=e}Gx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Rp(e),n=Rp(t),s=0,a=1;a<r;++s,++a)this._context.bezierCurveTo(i[0][s],n[0][s],i[1][s],n[1][s],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Rp(e){var t,r=e.length-1,i,n=new Array(r),s=new Array(r),a=new Array(r);for(n[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,s[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/s[t-1],s[t]-=i,a[t]-=i*a[t-1];for(n[r-1]=a[r-1]/s[r-1],t=r-2;t>=0;--t)n[t]=(a[t]-n[t+1])/s[t];for(s[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-n[t+1];return[n,s]}function Xx(e){return new Gx(e)}function Mo(e,t){this._context=e,this._t=t}Mo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point: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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Qx(e){return new Mo(e,.5)}function Kx(e){return new Mo(e,0)}function Zx(e){return new Mo(e,1)}function ns(e,t,r){this.k=e,this.x=t,this.y=r}ns.prototype={constructor:ns,scale:function(e){return e===1?this:new ns(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ns(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};ns.prototype;var HN=b(e=>{var n;const{securityLevel:t}=Gt();let r=Yt("body");if(t==="sandbox"){const a=((n=Yt(`#i${e}`).node())==null?void 0:n.contentDocument)??document;r=Yt(a.body)}return r.select(`#${e}`)},"selectSvgElement"),UN=b(e=>{const{handDrawnSeed:t}=Gt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),YN=b(e=>Array.isArray(e)?e:e?e.split(";").map(t=>
vendor: 9,603 bytes, line 299
299t.trim()).filter(Boolean):[],"normalizeStyleList"),$n=b(e=>{const t=VN([...e.cssCompiledStyles||[],...e.cssStyles||[],...YN(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),VN=b(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n==null?void 0:n.trim())}),t},"styles2Map"),Jx=b(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"),Mt=b(e=>{const{stylesArray:t}=$n(e),r=[],i=[],n=[],s=[];return t.forEach(a=>{const o=a[0];Jx(o)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),o.includes("stroke")&&n.push(a.join(":")+" !important"),o==="fill"&&s.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:s}},"styles2String"),Ft=b((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=Gt(),{nodeBorder:n,mainBkg:s}=r,{stylesMap:a}=$n(e);return Object.assign({roughness:.7,fill:a.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||n,seed:i,strokeWidth:((l=a.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:GN(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),GN=b(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const n=isNaN(t[0])?0:t[0];return[n,n]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const XN=Object.freeze({left:0,top:0,width:16,height:16}),ao=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),t0=Object.freeze({...XN,...ao}),QN=Object.freeze({...t0,body:"",hidden:!1}),KN=Object.freeze({width:null,height:null}),ZN=Object.freeze({...KN,...ao}),JN=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const o=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:o};return vl(c)?c:null}const s=n[0],a=s.split("-");if(a.length>1){const o={provider:i,prefix:a.shift(),name:a.join("-")};return vl(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:s};return vl(o,r)?o:null}return null},vl=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function tM(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function qp(e,t){const r=tM(e,t);for(const i in QN)i in ao?i in e&&!(i in r)&&(r[i]=ao[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function eM(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function s(a){if(r[a])return n[a]=[];if(!(a in n)){n[a]=null;const o=i[a]&&i[a].parent,l=o&&s(o);l&&(n[a]=[o].concat(l))}return n[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),n}function zp(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let s={};function a(o){s=qp(i[o]||n[o],s)}return a(t),r.forEach(a),qp(e,s)}function rM(e,t){if(e.icons[t])return zp(e,t,[]);const r=eM(e,[t])[t];return r?zp(e,t,r):null}const iM=/(-?[0-9.]*[0-9]+[0-9.]*)/g,nM=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Wp(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(iM);if(i===null||!i.length)return e;const n=[];let s=i.shift(),a=nM.test(s);for(;;){if(a){const o=parseFloat(s);isNaN(o)?n.push(s):n.push(Math.ceil(o*t*r)/r)}else n.push(s);if(s=i.shift(),s===void 0)return n.join("");a=!a}}function sM(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),s=e.indexOf("</"+t);if(n===-1||s===-1)break;const a=e.indexOf(">",s);if(a===-1)break;r+=e.slice(n+1,s).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function aM(e,t){return e?"<defs>"+e+"</defs>"+t:t}function oM(e,t,r){const i=sM(e);return aM(i.defs,t+i.content+r)}const lM=e=>e==="unset"||e==="undefined"||e==="none";function cM(e,t){const r={...t0,...e},i={...ZN,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(y=>{const C=[],x=y.hFlip,w=y.vFlip;let k=y.rotate;x?w?k+=2:(C.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),C.push("scale(-1 1)"),n.top=n.left=0):w&&(C.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),C.push("scale(1 -1)"),n.top=n.left=0);let v;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:v=n.height/2+n.top,C.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:C.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:v=n.width/2+n.left,C.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")")}k%2===1&&(n.left!==n.top&&(v=n.left,n.left=n.top,n.top=v),n.width!==n.height&&(v=n.width,n.width=n.height,n.height=v)),C.length&&(s=oM(s,'<g transform="'+C.join(" ")+'">',"</g>"))});const a=i.width,o=i.height,l=n.width,c=n.height;let h,u;a===null?(u=o===null?"1em":o==="auto"?c:o,h=Wp(u,l/c)):(h=a==="auto"?l:a,u=o===null?Wp(h,c/l):o==="auto"?c:o);const p={},d=(y,C)=>{lM(C)||(p[y]=C.toString())};d("width",h),d("height",u);const g=[n.left,n.top,l,c];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:s}}const hM=/\sid="(\S+)"/g,Hp=new Map;function uM(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Hp.get(e)||0;return Hp.set(e,t+1),t?`${e}${t}`:e}function dM(e){const t=[];let r;for(;r=hM.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(n=>{const s=uM(n),a=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function pM(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var fM={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Hc=new Map,e0=new Map,gM=b(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(et.debug("Registering icon pack:",t.name),"loader"in t)e0.set(t.name,t.loader);else if("icons"in t)Hc.set(t.name,t.icons);else throw et.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),r0=b(async(e,t)=>{const r=JN(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=Hc.get(i);if(!n){const a=e0.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await a(),prefix:i},Hc.set(i,n)}catch(o){throw et.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=rM(n,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),mM=b(async e=>{try{return await r0(e),!0}catch{return!1}},"isIconAvailable"),Ks=b(async(e,t,r)=>{let i;try{i=await r0(e,t==null?void 0:t.fallbackPrefix)}catch(a){et.error(a),i=fM}const n=cM(i,t),s=pM(dM(n.body),{...n.attributes,...r});return nr(s,me())},"getIconSVG"),la={},Se={},Up;function yM(){return Up||(Up=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.BLANK_URL=Se.relativeFirstCharacters=Se.whitespaceEscapeCharsRegex=Se.urlSchemeRegex=Se.ctrlCharactersRegex=Se.htmlCtrlEntityRegex=Se.htmlEntitiesRegex=Se.invalidProtocolRegex=void 0,Se.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Se.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Se.htmlCtrlEntityRegex=/&(newline|tab);/gi,Se.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Se.urlSchemeRegex=/^.+(:|&colon;)/gim,Se.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Se.relativeFirstCharacters=[".","/"],Se.BLANK_URL="about:blank"),Se}var Yp;function xM(){if(Yp)return la;Yp=1,Object.defineProperty(la,"__esModule",{value:!0}),la.sanitizeUrl=s;var e=yM();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var o=a.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function n(a){try{return decodeURIComponent(a)}catch{return a}}function s(a){if(!a)return e.BLANK_URL;var o,l=n(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=n(l),o=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var p=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(p))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(p==="mailto:"||p.includes("://"))return d;if(p==="http:"||p==="https:"){if(!i(d))return e.BLANK_URL;var g=new URL(d);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return d}return la}var bM=xM();function Sl(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;
299if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function CM(){}function i0(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function lu(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const kM="[object RegExp]",n0="[object String]",s0="[object Number]",a0="[object Boolean]",o0="[object Arguments]",wM="[object Symbol]",vM="[object Date]",SM="[object Map]",TM="[object Set]",_M="[object Array]",BM="[object ArrayBuffer]",LM="[object Object]",AM="[object DataView]",FM="[object Uint8Array]",EM="[object Uint8ClampedArray]",NM="[object Uint16Array]",MM="[object Uint32Array]",$M="[object Int8Array]",jM="[object Int16Array]",IM="[object Int32Array]",DM="[object Float32Array]",PM="[object Float64Array]",Vp=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function cu(e){return typeof Vp.Buffer<"u"&&Vp.Buffer.isBuffer(e)}function OM(e){return Number.isSafeInteger(e)&&e>=0}function l0(e){return e!=null&&typeof e!="function"&&OM(e.length)}function RM(e){return e==="__proto__"}function hu(e){return e==null||typeof e!="object"&&typeof e!="function"}function uu(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function qM(e,t){return nn(e,void 0,e,new Map,t)}function nn(e,t,r,i=new Map,n=void 0){const s=n==null?void 0:n(e,t,r,i);if(s!==void 0)return s;if(hu(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let o=0;o<e.length;o++)a[o]=nn(e[o],o,r,i,n);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[o,l]of e)a.set(o,nn(l,o,r,i,n));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const o of e)a.add(nn(o,void 0,r,i,n));return a}if(cu(e))return e.subarray();if(uu(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let o=0;o<e.length;o++)a[o]=nn(e[o],o,r,i,n);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),hr(a,e,r,i,n),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),hr(a,e,r,i,n),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),hr(a,e,r,i,n),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,hr(a,e,r,i,n),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),hr(a,e,r,i,n),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),hr(a,e,r,i,n),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),hr(a,e,r,i,n),a}if(typeof e=="object"&&zM(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),hr(a,e,r,i,n),a}return e}function hr(e,t,r=e,i,n){const s=[...Object.keys(t),...i0(t)];for(let a=0;a<s.length;a++){const o=s[a],l=Object.getOwnPropertyDescriptor(e,o);(l==null||l.writable)&&(e[o]=nn(t[o],o,r,i,n))}}function zM(e){switch(lu(e)){case o0:case _M:case BM:case AM:case a0:case vM:case DM:case PM:case $M:case jM:case IM:case SM:case s0:case LM:case kM:case TM:case n0:case wM:case FM:case EM:case NM:case MM:return!0;default:return!1}}function WM(e,t){return qM(e,(r,i,n,s)=>{if(typeof e=="object"){if(lu(e)==="[object Object]"&&typeof e.constructor!="function"){const a={};return s.set(e,a),hr(a,e,n,s),a}switch(Object.prototype.toString.call(e)){case s0:case n0:case a0:{const a=new e.constructor(e==null?void 0:e.valueOf());return hr(a,e),a}case o0:{const a={};return hr(a,e),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}default:return}}})}function Gp(e){return WM(e)}function Uc(e){return e!==null&&typeof e=="object"&&lu(e)==="[object Arguments]"}function Yc(e){return typeof e=="object"&&e!==null}function HM(e){return Yc(e)&&l0(e)}function La(e){return uu(e)}function UM(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function Zs(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const n=t?t.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);const a=e.apply(this,i);return r.cache=s.set(n,a)||s,a};return r.cache=new(Zs.Cache||Map),r}Zs.Cache=Map;function YM(e){if(hu(e))return e;if(Array.isArray(e)||uu(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}
299function VM(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let n=e;for(let s=0;s<r.length;s++){const a=r[s];n=Aa(n,a,i,new Map)}return n}function Aa(e,t,r,i){if(hu(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return YM(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let s=0;s<t.length;s++)s in t||(t[s]=void 0)}const n=[...Object.keys(t),...i0(t)];for(let s=0;s<n.length;s++){const a=n[s];if(RM(a))continue;let o=t[a],l=e[a];if(Uc(o)&&(o={...o}),Uc(l)&&(l={...l}),cu(o)&&(o=Gp(o)),Array.isArray(o))if(Array.isArray(l)){const h=[],u=Reflect.ownKeys(l);for(let p=0;p<u.length;p++){const d=u[p];h[d]=l[d]}l=h}else if(HM(l)){const h=[];for(let u=0;u<l.length;u++)h[u]=l[u];l=h}else l=[];const c=r(l,o,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(o)||Yc(l)&&Yc(o)&&(Sl(l)||Sl(o)||La(l)||La(o))?e[a]=Aa(l,o,r,i):l==null&&Sl(o)?e[a]=Aa({},o,r,i):l==null&&La(o)?e[a]=Gp(o):(l===void 0||o!==void 0)&&(e[a]=o)}return e}function GM(e,...t){return VM(e,...t,CM)}function Xp(e){if(e==null)return!0;if(l0(e))return typeof e.splice!="function"&&typeof e!="string"&&!cu(e)&&!La(e)&&!Uc(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return UM(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var XM="​",QM={curveBasis:Wc,curveBasisClosed:IN,curveBasisOpen:DN,curveBumpX:Mx,curveBumpY:$x,curveBundle:PN,curveCardinalClosed:ON,curveCardinalOpen:RN,curveCardinal:Px,curveCatmullRomClosed:qN,curveCatmullRomOpen:zN,curveCatmullRom:Rx,curveLinear:Ss,curveLinearClosed:WN,curveMonotoneX:Yx,curveMonotoneY:Vx,curveNatural:Xx,curveStep:Qx,curveStepAfter:Zx,curveStepBefore:Kx},KM=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ZM=b(function(e,t){const r=c0(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(o=>o.args);Ya(a),i=Te(i,[...a])}else i=r.args;if(!i)return;let n=Hh(e,t);const s="config";return i[s]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[s],delete i[s]),i},"detectInit"),c0=b(function(e,t=null){var r,i;try{const n=new RegExp(`[%]{2}(?![{]${KM.source})(?=[}][%]{2}).*
300`,"ig");e=e.trim().replace(n,"").replace(/'/gm,'"'),et.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let s;const a=[];for(;(s=vs.exec(e))!==null;)if(s.index===vs.lastIndex&&vs.lastIndex++,s&&!t||t&&((r=s[1])!=null&&r.match(t))||t&&((i=s[2])!=null&&i.match(t))){const o=s[1]?s[1]:s[2],l=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;a.push({type:o,args:l})}return a.length===0?{type:e,args:null}:a.length===1?a[0]:a}catch(n){return et.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),JM=b(function(e){return e.replace(vs,"")},"removeDirectives"),t$=b(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function du(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return QM[r]??t}b(du,"interpolateToCurve");function h0(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?bM.sanitizeUrl(r):r}b(h0,"formatUrl");var e$=b((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let s=window;for(let a=0;a<i;a++)if(s=s[r[a]],!s){et.error(`Function name: ${e} not found in window`);return}s[n](...t)},"runFunc");function pu(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}b(pu,"distance");function u0(e){let t,r=0;e.forEach(n=>{r+=pu(n,t),t=n});const i=r/2;return fu(e,i)}b(u0,"traverseEdge");function d0(e){return e.length===1?e[0]:u0(e)}b(d0,"calcLabelPosition");var Qp=b((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),fu=b((e,t)=>{let r,i=t;for(const n of e){if(r){const s=pu(n,r);if(s===0)return r;if(s<i)i-=s;else{const a=i/s;if(a<=0)return r;if(a>=1)return{x:n.x,y:n.y};if(a>0&&a<1)return{x:Qp((1-a)*r.x+a*n.x,5),y:Qp((1-a)*r.y+a*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),r$=b((e,t,r)=>{et.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=fu(t,25),s=e?10:5,a=Math.atan2(t[0].y-n.y,t[0].x-n.x),o={x:0,y:0};return o.x=Math.sin(a)*s+(t[0].x+n.x)/2,o.y=-Math.cos(a)*s+(t[0].y+n.y)/2,o},"calcCardinalityPosition");function p0(e,t,r){const i=structuredClone(r);et.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,s=fu(i,n),a=10+e*.5,o=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*a+(i[0].x+s.x)/2,l.y=-Math.cos(o+Math.PI)*a+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(o-Math.PI)*a+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(o)*a+(i[0].y+s.y)/2-5):(l.x=Math.sin(o)*a+(i[0].x+s.x)/2,l.y=-Math.cos(o)*a+(i[0].y+s.y)/2),l}b(p0,"calcTerminalLabelPosition");function f0(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}b(f0,"getStylesFromArray");var Kp=0,i$=b(()=>(Kp++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Kp),"generateId");function g0(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}b(g0,"makeRandomHex");var n$=b(e=>g0(e.length),"random"),s$=b(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:""}}
vendor: 4,564 bytes, line 300
300,"getTextObj"),a$=b(function(e,t){const r=t.text.replace(Gs.lineBreakRegex," "),[,i]=$o(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const s=n.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),n},"drawSimpleText"),o$=Zs((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Gs.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let s="";return i.forEach((a,o)=>{const l=Ur(`${a} `,r),c=Ur(s,r);if(l>t){const{hyphenatedStrings:p,remainingWord:d}=l$(a,t,"-",r);n.push(s,...p),s=d}else c+l>=t?(n.push(s),s=a):s=[s,a].filter(Boolean).join(" ");o+1===i.length&&n.push(s)}),n.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),l$=Zs((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],s=[];let a="";return n.forEach((o,l)=>{const c=`${a}${o}`;if(Ur(c,i)>=t){const u=l+1,p=n.length===u,d=`${c}${r}`;s.push(p?c:d),a=""}else a=c}),{hyphenatedStrings:s,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function m0(e,t){return gu(e,t).height}b(m0,"calculateTextHeight");function Ur(e,t){return gu(e,t).width}b(Ur,"calculateTextWidth");var gu=Zs((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,s]=$o(r),a=["sans-serif",i],o=e.split(Gs.lineBreakRegex),l=[],c=Yt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const p of a){let d=0;const g={width:0,height:0,lineHeight:0};for(const y of o){const C=s$();C.text=y||XM;const x=a$(h,C).style("font-size",s).style("font-weight",n).style("font-family",p),w=(x._groups||x)[0][0].getBBox();if(w.width===0&&w.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,w.width)),d=Math.round(w.height),g.height+=d,g.lineHeight=Math.round(Math.max(g.lineHeight,d))}l.push(g)}h.remove();const u=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;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),wn,c$=(wn=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},b(wn,"InitIDGenerator"),wn),ca,h$=b(function(e){return ca=ca||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ca.innerHTML=e,unescape(ca.textContent)},"entityDecode");function mu(e){return"str"in e}b(mu,"isDetailedError");var u$=b((e,t,r,i)=>{var s;if(!i)return;const n=(s=e.node())==null?void 0:s.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),$o=b(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function yu(e,t){return GM({},e,t)}b(yu,"cleanAndMerge");var Me={assignWithDepth:Te,wrapLabel:o$,calculateTextHeight:m0,calculateTextWidth:Ur,calculateTextDimensions:gu,cleanAndMerge:yu,detectInit:ZM,detectDirective:c0,isSubstringInArray:t$,interpolateToCurve:du,calcLabelPosition:d0,calcCardinalityPosition:r$,calcTerminalLabelPosition:p0,formatUrl:h0,getStylesFromArray:f0,generateId:i$,random:n$,runFunc:e$,entityDecode:h$,insertTitle:u$,isLabelCoordinateInPath:y0,parseFontSize:$o,InitIDGenerator:c$},d$=b(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),hi=b(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),I7=b((e,t,{counter:r=0,prefix:i,suffix:n},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function ve(e){return e??null}b(ve,"handleUndefinedAttr");function y0(e,t){const r=Math.round(e.x),i=Math.round(e.y),n=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return n.includes(r.toString())||n.includes(i.toString())}b(y0,"isLabelCoordinateInPath");
300var Fa={exports:{}},Zp=Fa.exports,Jp;function p$(){return Jp||(Jp=1,(function(e){(function(t){var r=function(){},i=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function n(){var h=this;h.reads=[],h.writes=[],h.raf=i.bind(t)}n.prototype={constructor:n,runTasks:function(h){for(var u;u=h.shift();)u()},measure:function(h,u){var p=u?h.bind(u):h;return this.reads.push(p),s(this),p},mutate:function(h,u){var p=u?h.bind(u):h;return this.writes.push(p),s(this),p},clear:function(h){return o(this.reads,h)||o(this.writes,h)},extend:function(h){if(typeof h!="object")throw new Error("expected object");var u=Object.create(this);return l(u,h),u.fastdom=this,u.initialize&&u.initialize(),u},catch:null};function s(h){h.scheduled||(h.scheduled=!0,h.raf(a.bind(null,h)))}function a(h){var u=h.writes,p=h.reads,d;try{r("flushing reads",p.length),h.runTasks(p),r("flushing writes",u.length),h.runTasks(u)}catch(g){d=g}if(h.scheduled=!1,(p.length||u.length)&&s(h),d)if(r("task errored",d.message),h.catch)h.catch(d);else throw d}function o(h,u){var p=h.indexOf(u);return!!~p&&!!h.splice(p,1)}function l(h,u){for(var p in u)u.hasOwnProperty(p)&&(h[p]=u[p])}var c=t.fastdom=t.fastdom||new n;e.exports=c})(typeof window<"u"?window:typeof Zp<"u"?Zp:globalThis)})(Fa)),Fa.exports}var f$=p$();const g$=zs(f$);var Tl={exports:{}},tf;function m$(){return tf||(tf=1,(function(e){(function(){var t={initialize:function(){this._tasks=new Map},mutate:function(i,n){return r(this,"mutate",i,n)},measure:function(i,n){return r(this,"measure",i,n)},clear:function(i){var n=this._tasks,s=n.get(i);this.fastdom.clear(s),n.delete(i)}};function r(i,n,s,a){var o=i._tasks,l=i.fastdom,c,h=new Promise(function(u,p){c=l[n](function(){o.delete(h);try{u(a?s.call(a):s())}catch(d){p(d)}},a)});return o.set(h,c),h}e.exports=t})()})(Tl)),Tl.exports}var y$=m$();const x$=zs(y$);function xu(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var zi=xu();function x0(e){zi=e}var Ts={exec:()=>null};function ie(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(We.caret,"$1"),r=r.replace(n,a),i},getRegex:()=>new RegExp(r,t)};return i}var b$=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),We={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:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[	 ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},C$=/^(?:[ \t]*(?:\n|$))+/,k$=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,w$=/^ {0,3}(`{3,}
vendor: 5,241 bytes, lines 300-301
300(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Js=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,v$=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bu=/(?:[*+-]|\d{1,9}[.)])/,b0=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,C0=ie(b0).replace(/bull/g,bu).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(),S$=ie(b0).replace(/bull/g,bu).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(),Cu=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,T$=/^[^\n]+/,ku=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,_$=ie(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ku).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),B$=ie(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bu).getRegex(),jo="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",wu=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,L$=ie("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$))","i").replace("comment",wu).replace("tag",jo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),k0=ie(Cu).replace("hr",Js).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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",jo).getRegex(),A$=ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",k0).getRegex(),vu={blockquote:A$,code:k$,def:_$,fences:w$,heading:v$,hr:Js,html:L$,lheading:C0,list:B$,newline:C$,paragraph:k0,table:Ts,text:T$},ef=ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Js).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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",jo).getRegex(),F$={...vu,lheading:S$,table:ef,paragraph:ie(Cu).replace("hr",Js).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ef).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",jo).getRegex()},E$={...vu,html:ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",wu).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ts,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ie(Cu).replace("hr",Js).replace("heading",` *#{1,6} *[^
301]`).replace("lheading",C0).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},N$=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,M$=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,w0=/^( {2,}|\\)\n(?!\s*$)/,$$=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Io=/[\p{P}\p{S}]/u,Su=/[\s\p{P}\p{S}]/u,v0=/[^\s\p{P}\p{S}]/u,j$=ie(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Su).getRegex(),S0=/(?!~)[\p{P}\p{S}]/u,I$=/(?!~)[\s\p{P}\p{S}]/u,D$=/(?:[^\s\p{P}\p{S}]|~)/u,P$=ie(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("prec
301ode-",b$?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),T0=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,O$=ie(T0,"u").replace(/punct/g,Io).getRegex(),R$=ie(T0,"u").replace(/punct/g,S0).getRegex(),_0="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",q$=ie(_0,"gu").replace(/notPunctSpace/g,v0).replace(/punctSpace/g,Su).replace(/punct/g,Io).getRegex(),z$=ie(_0,"gu").replace(/notPunctSpace/g,D$).replace(/punctSpace/g,I$).replace(/punct/g,S0).getRegex(),W$=ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,v0).replace(/punctSpace/g,Su).replace(/punct/g,Io).getRegex(),H$=ie(/\\(punct)/,"gu").replace(/punct/g,Io).getRegex(),U$=ie(/^<(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(),Y$=ie(wu).replace("(?:-->|$)","-->").getRegex(),V$=ie("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Y$).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),oo=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,G$=ie(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",oo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),B0=ie(/^!?\[(label)\]\[(ref)\]/).replace("label",oo).replace("ref",ku).getRegex(),L0=ie(/^!?\[(ref)\](?:\[\])?/).replace("ref",ku).getRegex(),X$=ie("reflink|nolink(?!\\()","g").replace("reflink",B0).replace("nolink",L0).getRegex(),rf=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Tu={_backpedal:Ts,anyPunctuation:H$,autolink:U$,blockSkip:P$,br:w0,code:M$,del:Ts,emStrongLDelim:O$,emStrongRDelimAst:q$,emStrongRDelimUnd:W$,escape:N$,link:G$,nolink:L0,punctuation:j$,reflink:B0,reflinkSearch:X$,tag:V$,text:$$,url:Ts},Q$={...Tu,link:ie(/^!?\[(label)\]\((.*?)\)/).replace("label",oo).getRegex(),reflink:ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",oo).getRegex()},Vc={...Tu,emStrongRDelimAst:z$,emStrongLDelim:R$,url:ie(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",rf).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:ie(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",rf).getRegex()},K$={...Vc,br:ie(w0).replace("{2,}","*").getRegex(),text:ie(Vc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ha={normal:vu,gfm:F$,pedantic:E$},Yn={normal:Tu,gfm:Vc,breaks:K$,pedantic:Q$},Z$={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},nf=e=>Z$[e];function kr(e,t){if(t){if(We.escapeTest.test(e))return e.replace(We.escapeReplace,nf)}else if(We.escapeTestNoEncode.test(e))return e.replace(We.escapeReplaceNoEncode,nf);return e}function sf(e){try{e=encodeURI(e).replace(We.percentDecode,"%")}catch{return null}return e}function af(e,t){var s;let r=e.replace(We.findPipe,(a,o,l)=>{let c=!1,h=o;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(We.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!((s=i.at(-1))!=null&&s.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(We.slashPipe,"|");return i}function Vn(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function J$(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function of(e,t,r,i,n){let s=t.href,a=t.title||null,o=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:a,text:o,tokens:i.inl
vendor: 28,545 bytes, lines 301-361
301ineTokens(o)};return i.state.inLink=!1,l}function t4(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
302`).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[o]=a;return o.length>=n.length?s.slice(n.length):s}).join(`
303`)}var lo=class{constructor(t){le(this,"options");le(this,"rules");le(this,"lexer");this.options=t||zi}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Vn(i,`
304`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=t4(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:n}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let n=Vn(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Vn(r[0],`
305`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Vn(r[0],`
306`).split(`
307`),n="",s="",a=[];for(;i.length>0;){let o=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),o=!0;else if(!o)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
308`),u=h.replace(this.rules.other.blockquoteSetextReplace,`
309    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
310${h}`:h,s=s?`${s}
311${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,a,!0),this.lexer.state.top=p,i.length===0)break;let d=a.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let g=d,y=g.raw+`
312`+i.join(`
313`),C=this.blockquote(y);a[a.length-1]=C,n=n.substring(0,n.length-g.raw.length)+C.raw,s=s.substring(0,s.length-g.text.length)+C.text;break}else if((d==null?void 0:d.type)==="list"){let g=d,y=g.raw+`
314`+i.join(`
315`),C=this.list(y);a[a.length-1]=C,n=n.substring(0,n.length-d.raw.length)+C.raw,s=s.substring(0,s.length-g.raw.length)+C.raw,i=y.substring(a.at(-1).raw.length).split(`
316`);continue}}return{type:"blockquote",raw:n,tokens:a,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),n=i.length>1,s={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let a=this.rules.other.listItemRegex(i),o=!1;for(;t;){let c=!1,h="",u="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let p=r[2].split(`
317`,1)[0].replace(this.rules.other.listReplaceTabs,w=>" ".repeat(3*w.length)),d=t.split(`
318`,1)[0],g=!p.trim(),y=0;if(this.options.pedantic?(y=2,u=p.trimStart()):g?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,u=p.slice(y),y+=r[1].length),g&&this.rules.other.blankLine.test(d)&&(h+=d+`
319`,t=t.substring(d.length+1),c=!0),!c){let w=this.rules.other.nextBulletRegex(y),k=this.rules.other.hrRegex(y),v=this.rules.other.fencesBeginRegex(y),T=this.rules.other.headingBeginRegex(y),L=this.rules.other.htmlBeginRegex(y);for(;t;){let D=t.split(`
320`,1)[0],M;if(d=D,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting,"  "),M=d):M=d.replace(this.rules.other.tabCharGlobal,"    "),v.test(d)||T.test(d)||L.test(d)||w.test(d)||k.test(d))break;if(M.search(this.rules.other.nonSpaceChar)>=y||!d.trim())u+=`
321`+M.slice(y);else{if(g||p.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||v.test(p)||T.test(p)||k.test(p))break;u+=`
322`+d}!g&&!d.trim()&&(g=!0),h+=D+`
323`,t=t.substring(D.length+1),p=M.slice(y)}}s.loose||(o?s.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(o=!0));let C=null,x;this.options.gfm&&(C=this.rules.other.listIsTask.exec(u),C&&(x=C[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:h,task:!!C,checked:x,loose:!1,text:u,tokens:[]}),s.raw+=h}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let h=s.items[c].tokens.filter(p=>p.type==="space"),u=h.length>0&&h.some(p=>this.rules.other.anyLine.test(p.raw));s.loose=u}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:s}}}table(t){var o;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=af(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(o=r[3])!=null&&o.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
324`):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let l of n)this.rules.other.tableAlignRight.test(l)?a.align.push("right"):this.rules.other.tableAlignCenter.test(l)?a.align.push("center"):this.rules.other.tableAlignLeft.test(l)?a.align.push("left"):a.align.push(null);for(let l=0;l<i.length;l++)a.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:a.align[l]});for(let l of s)a.rows.push(af(l,a.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:a.align[h]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
325`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=Vn(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=J$(r[2],"()");if(a===-2)return;if(a>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let n=r[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],s=a[3])}else s=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),of(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[n.toLowerCase()];if(!s){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return of(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...n[0]].length-1,a,o,l=s,c=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+s);(n=h.exec(r))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(o=[...a].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&s%3&&!((s+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);let u=[...n[0]][0].length,p=t.slice(0,s+n.index+u+o);if(Math.min(s,o)%2){let g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}let d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&s&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let n,s;if(r[2]==="@")n=r[0],s="mailto:"+n;else{let a;do a=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(a!==r[0]);n=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},ur=class Gc{constructor(t){le(this,"tokens");le(this,"options");le(this,"state");le(this,"tokenizer");le(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||zi,this.options.tokenizer=this.options.tokenizer||new lo,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 r={other:We,block:ha.normal,inline:Yn.normal};this.options.pedantic?(r.block=ha.pedantic,r.inline=Yn.pedantic):this.options.gfm&&(r.block=ha.gfm,this.options.breaks?r.inline=Yn.breaks:r.inline=Yn.gfm),this.tokenizer.rules=r}static get rules(){return{block:ha,inline:Yn}}static lex(t,r){return new Gc(r).lex(t)}static lexInline(t,r){return new Gc(r).inlineTokens(t)}lex(t){t=t.replace(We.carriageReturn,`
326`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var n,s,a;for(this.options.pedantic&&(t=t.replace(We.tabCharGlobal,"    ").replace(We.spaceLine,""));t;){let o;if((s=(n=this.options.extensions)==null?void 0:n.block)!=null&&s.some(c=>(o=c.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let c=r.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
327`:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
328`)?"":`
329`)+o.raw,c.text+=`
330`+o.text,this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
331`)?"":`
332`)+o.raw,c.text+=`
333`+o.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let l=t;if((a=this.options.extensions)!=null&&a.startBlock){let c=1/0,h=t.slice(1),u;this.options.extensions.startBlock.forEach(p=>{u=p.call({lexer:this},h),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(o=this.tokenizer.paragraph(l))){let c=r.at(-1);i&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
334`)?"":`
335`)+o.raw,c.text+=`
336`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o),i=l.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
337`)?"":`
338`)+o.raw,c.text+=`
339`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,c,h,u,p;let i=t,n=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=n[2]?n[2].length:0,i=i.slice(0,n.index+s)+"["+"a".repeat(n[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((c=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:c.call({lexer:this},i))??i;let a=!1,o="";for(;t;){a||(o=""),a=!1;let d;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(y=>(d=y.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let y=r.at(-1);d.type==="text"&&(y==null?void 0:y.type)==="text"?(y.raw+=d.raw,y.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,o)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let g=t;if((p=this.options.extensions)!=null&&p.startInline){let y=1/0,C=t.slice(1),x;this.options.extensions.startInline.forEach(w=>{x=w.call({lexer:this},C),typeof x=="number"&&x>=0&&(y=Math.min(y,x))}),y<1/0&&y>=0&&(g=t.substring(0,y+1))}if(d=this.tokenizer.inlineText(g)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(o=d.raw.slice(-1)),a=!0;let y=r.at(-1);(y==null?void 0:y.type)==="text"?(y.raw+=d.raw,y.text+=d.text):r.push(d);continue}if(t){let y="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(y);break}else throw new Error(y)}}return r}},co=class{constructor(t){le(this,"options");le(this,"parser");this.options=t||zi}space(t){return""}code({text:t,lang:r,escaped:i}){var a;let n=(a=(r||"").match(We.notSpaceStart))==null?void 0:a[0],s=t.replace(We.endingNewline,"")+`
340`;return n?'<pre><code class="language-'+kr(n)+'">'+(i?s:kr(s,!0))+`</code></pre>
341`:"<pre><code>"+(i?s:kr(s,!0))+`</code></pre>
342`}blockquote({tokens:t}){return`<blockquote>
343${this.parser.parse(t)}</blockquote>
344`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
345`}hr(t){return`<hr>
346`}list(t){let r=t.ordered,i=t.start,n="";for(let o=0;o<t.items.length;o++){let l=t.items[o];n+=this.listitem(l)}let s=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+s+a+`>
347`+n+"</"+s+`>
348`}listitem(t){var i;let r="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+kr(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
349`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
350`}table(t){let r="",i="";for(let s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let n="";for(let s=0;s<t.rows.length;s++){let a=t.rows[s];i="";for(let o=0;o<a.length;o++)i+=this.tablecell(a[o]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
351<thead>
352`+r+`</thead>
353`+n+`</table>
354`}tablerow({text:t}){return`<tr>
355${t}</tr>
356`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
357`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${kr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let n=this.parser.parseInline(i),s=sf(t);if(s===null)return n;t=s;let a='<a href="'+t+'"';return r&&(a+=' title="'+kr(r)+'"'),a+=">"+n+"</a>",a}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let s=sf(t);if(s===null)return kr(i);t=s;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${kr(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:kr(t.text)}},_u=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},dr=class Xc{constructor(t){le(this,"options");le(this,"renderer");le(this,"textRenderer");this.options=t||zi,this.options.renderer=this.options.renderer||new co,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _u}static parse(t,r){return new Xc(r).parse(t)}static parseInline(t,r){return new Xc(r).parseInline(t)}parse(t,r=!0){var n,s;let i="";for(let a=0;a<t.length;a++){let o=t[a];if((s=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&s[o.type]){let c=o,h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){i+=h||"";continue}}let l=o;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let c=l,h=this.renderer.text(c);for(;a+1<t.length&&t[a+1].type==="text";)c=t[++a],h+=`
358`+this.renderer.text(c);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}parseInline(t,r=this.renderer){var n,s;let i="";for(let a=0;a<t.length;a++){let o=t[a];if((s=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&s[o.type]){let c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=c||"";continue}}let l=o;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}},Ca,ss=(Ca=class{constructor(t){le(this,"options");le(this,"block");this.options=t||zi}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ur.lex:ur.lexInline}provideParser(){return this.block?dr.parse:dr.parseInline}},le(Ca,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),le(Ca,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ca),e4=class{constructor(...t){le(this,"defaults",xu());le(this,"options",this.setOptions);le(this,"parse",this.parseMarkdown(!0));le(this,"parseInline",this.parseMarkdown(!1));le(this,"Parser",dr);le(this,"Renderer",co);le(this,"TextRenderer",_u);le(this,"Lexer",ur);le(this,"Tokenizer",lo);le(this,"Hooks",ss);this.use(...t)}walkTokens(t,r){var n,s;let i=[];for(let a of t)switch(i=i.concat(r.call(this,a)),a.type){case"table":{let o=a;for(let l of o.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of o.rows)for(let c of l)i=i.concat(this.walkTokens(c.tokens,r));break}case"list":{let o=a;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=a;(s=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&s[o.type]?this.defaults.extensions.childTokens[o.type].forEach(l=>{let c=o[l].flat(1/0);i=i.concat(this.walkTokens(c,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=r.renderers[s.name];a?r.renderers[s.name]=function(...o){let l=s.renderer.apply(this,o);return l===!1&&(l=a.apply(this,o)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[s.level];a?a.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),n.extensions=r),i.renderer){let s=this.defaults.renderer||new co(this.defaults);for(let a in i.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let o=a,l=i.renderer[o],c=s[o];s[o]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u||""}}n.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new lo(this.defaults);for(let a in i.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let o=a,l=i.tokenizer[o],c=s[o];s[o]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u}}n.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new ss;for(let a in i.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let o=a,l=i.hooks[o],c=s[o];ss.passThroughHooks.has(a)?s[o]=h=>{if(this.defaults.async&&ss.passThroughHooksRespectAsync.has(a))return(async()=>{let p=await l.call(s,h);return c.call(s,p)})();let u=l.call(s,h);return c.call(s,u)}:s[o]=(...h)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(s,h);return p===!1&&(p=await c.apply(s,h)),p})();let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u}}n.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,a=i.walkTokens;n.walkTokens=function(o){let l=[];return l.push(a.call(this,o)),s&&(l=l.concat(s.call(this,o))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ur.lex(t,r??this.defaults)}parser(t,r){return dr.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},s={...this.defaults,...n},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&n.async===!1)return a(new 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 r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let o=s.hooks?await s.hooks.preprocess(r):r,l=await(s.hooks?await s.hooks.provideLexer():t?ur.lex:ur.lexInline)(o,s),c=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let h=await(s.hooks?await s.hooks.provideParser():t?dr.parse:dr.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(h):h})().catch(a);try{s.hooks&&(r=s.hooks.preprocess(r));let o=(s.hooks?s.hooks.provideLexer():t?ur.lex:ur.lexInline)(r,s);s.hooks&&(o=s.hooks.processAllTokens(o)),s.walkTokens&&this.walkTokens(o,s.walkTokens);let l=(s.hooks?s.hooks.provideParser():t?dr.parse:dr.parseInline)(o,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(o){return a(o)}}}onError(t,r){return i=>{if(i.message+=`
359Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+kr(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},ji=new e4;function se(e,t){return ji.parse(e,t)}se.options=se.setOptions=function(e){return ji.setOptions(e),se.defaults=ji.defaults,x0(se.defaults),se};se.getDefaults=xu;se.defaults=zi;se.use=function(...e){return ji.use(...e),se.defaults=ji.defaults,x0(se.defaults),se};se.walkTokens=function(e,t){return ji.walkTokens(e,t)};se.parseInline=ji.parseInline;se.Parser=dr;se.parser=dr.parse;se.Renderer=co;se.TextRenderer=_u;se.Lexer=ur;se.lexer=ur.lex;se.Tokenizer=lo;se.Hooks=ss;se.parse=se;se.options;se.setOptions;se.use;se.walkTokens;se.parseInline;dr.parse;ur.lex;function A0(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(o,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?o.concat(c.map(function(h){var u,p;return(p=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&p!==void 0?p:0})):o},[]);if(n.length){var s=new RegExp(`
360[	 ]{`.concat(Math.min.apply(Math,n),"}"),"g");i=i.map(function(o){return o.replace(s,`
361`)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(o,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=o;
361typeof o=="string"&&o.includes(`
362`)&&(u=String(o).split(`
363`).map(function(p,d){return d===0?p:"".concat(h).concat(p)}).join(`
364`)),a+=u+i[l+1]}),a}var Qc=typeof performance<"u"&&typeof performance.now=="function",Xi=b(()=>Qc?performance.now():0,"now"),_l="🧜 ",r4="Mermaid render",i4="Mermaid",n4={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},vn;vn=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,r){if(!this.enabled)return r();const i=Xi();try{return r()}finally{this.buckets[t]=(this.buckets[t]??0)+(Xi()-i)}}async tick(t,r){if(!this.enabled)return r();const i=Xi();try{return await r()}finally{this.buckets[t]=(this.buckets[t]??0)+(Xi()-i)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),r=this.runLabel??(t==null?void 0:t.name);return t&&(this.records.push({label:r??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,r)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const r={name:t,start:Xi(),duration:-1,children:[]},i=this.stack.at(-1);if(i?i.children.push(r):this.roots.push(r),this.stack.push(r),Qc&&typeof performance.mark=="function")try{performance.mark(`${_l}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=Xi();if(t.duration=r-t.start,Qc&&typeof performance.measure=="function")try{performance.measure(`${_l}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:r4,trackGroup:i4,color:n4[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,r){if(!this.enabled)return r();this.begin(t);try{return await r()}finally{this.end()}}report(){var t;return((t=this.records.at(-1))==null?void 0:t.tree)??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),r){if(!t)return;const i=t.duration,n=r&&r!==t.name?`${t.name} [${r}]`:t.name,s=["ms        %    phase"],a=b((l,c)=>{const h="  ".repeat(c),u=l.duration.toFixed(1).padStart(8),p=i>0?`${(l.duration/i*100).toFixed(0).padStart(3)}%`:"   -";s.push(`${u}  ${p}  ${h}${l.name}`);for(const d of l.children)a(d,c+1);if(l.children.length>0){const d=l.children.reduce((y,C)=>y+C.duration,0),g=l.duration-d;if(g>.5){const y=g.toFixed(1).padStart(8);s.push(`${y}       ${h}  (self)`)}}},"walk");a(t,0);const o=Object.keys(this.buckets);if(o.length>0){s.push("—— buckets (summed) ——");for(const l of o)s.push(`${this.buckets[l].toFixed(1).padStart(8)}       ${l}`)}console.log(`${_l}mermaid render profile · ${n}
365${s.join(`
366`)}`)}},b(vn,"Profiler");globalThis.injected??(globalThis.injected={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"});var s4=g$.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(x$),Ii=s4;function F0(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
367`).replace(/\n{2,}/g,`
368`);return A0(i)}b(F0,"preprocessMarkdown");function E0(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}b(E0,"nonMarkdownToLines");function N0(e,t={}){const r=F0(e,t),i=se.lexer(r),n=[[]];let s=0;function a(o,l="normal"){o.type==="text"?o.text.split(`
369`).forEach((h,u)=>{u!==0&&(s++,n.push([])),h.split(" ").forEach(p=>{p=p.replace(/&#39;/g,"'"),p&&n[s].push({content:p,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(c=>{a(c,o.type)}):o.type==="html"&&n[s].push({content:o.text,type:"normal"})}return b(a,"processNode"),i.forEach(o=>{var l;o.type==="paragraph"?(l=o.tokens)==null||l.forEach(c=>{a(c)}):o.type==="html"?n[s].push({content:o.text,type:"normal"}):n[s].push({content:o.raw,type:"normal"})}),n}b(N0,"markdownToLines");function M0(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}b(M0,"nonMarkdownToHTML");function $0(e,{markdownAutoWrap:t}={}){const r=se.lexer(e);function i(n){var s,a,o;return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${(s=n.tokens)==null?void 0:s.map(i).join("")}</strong>`:n.type==="em"?`<em>${(a=n.tokens)==null?void 0:a.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${(o=n.tokens)==null?void 0:o.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(et.warn(`Unsupported markdown: ${n.type}`),n.raw)}return b(i,"output"),r.map(i).join("")}b($0,"markdownToHTML");function j0(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}b(j0,"splitTextToChars");function I0(e,t){const r=j0(t.content);return Bu(e,[],r,t.type)}b(I0,"splitWordToFitWidth");
vendor: 33,422 bytes, lines 369-371
369function Bu(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...s]=r,a=[...t,n];return e([{content:a.join(""),type:i}])?Bu(e,a,s,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}b(Bu,"splitWordToFitWidthRecursion");function D0(e,t){if(e.some(({content:r})=>r.includes(`
370`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ho(e,t)}b(D0,"splitLineToFitWidth");function ho(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},a=[...i];if(n!==""&&a.push({content:n,type:"normal"}),a.push(s),t(a))return ho(e,t,r,a);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[o,l]=I0(t,s);r.push([o]),l.content&&e.unshift(l)}return ho(e,t,r)}b(ho,"splitLineToFitWidthRecursion");function Kc(e,t){t&&e.attr("style",t)}b(Kc,"applyStyle");var lf=16384;async function P0(e,t,r,i,n=!1,s=me()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,lf)}px`),a.attr("height",`${Math.min(10*r,lf)}px`);const o=a.append("xhtml:div"),l=Es(t.label)?await ex(t.label.replace(Gs.lineBreakRegex,`
371`),s):nr(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",h=o.append("span");return h.html(l),Kc(h,t.labelStyle),h.attr("class",`${c} ${i}`),Kc(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(o.style("max-width",r+"px"),o.style("text-align","center")),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg"),(await Ii.measure(()=>o.node().getBoundingClientRect())).width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px")),a.node()}b(P0,"addHtmlSpan");function Do(e,t,r,i=!1){const n=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&n.attr("text-anchor","middle"),n}b(Do,"createTspan");function O0(e,t,r){const i=e.append("text"),n=Do(i,1,t);Po(n,r);const s=n.node().getComputedTextLength();return i.remove(),s}b(O0,"computeWidthOfText");function a4(e,t,r){var a;const i=e.append("text"),n=Do(i,1,t);Po(n,[{content:r,type:"normal"}]);const s=(a=n.node())==null?void 0:a.getBoundingClientRect();return s&&i.remove(),s}b(a4,"computeDimensionOfText");function R0(e,t,r,i=!1,n=!1){const a=t.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");n&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=b(d=>O0(a,1.1,d)<=e,"checkWidth"),p=u(h)?[h]:D0(h,u);for(const d of p){const g=Do(l,c,1.1,n);Po(g,d),c++}}if(i){const h=l.node().getBBox(),u=2;return o.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),a.node()}else return l.node()}b(R0,"createFormattedText");function Zc(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}b(Zc,"decodeHTMLEntities");function Po(e,t){e.text(""),t.forEach((r,i)=>{const n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(Zc(r.content)):n.text(" "+Zc(r.content))})}b(Po,"updateTextContentAndStyles");async function q0(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,s,a)=>(r.push((async()=>{const o=`${s}:${a}`;return await mM(o)?await Ks(o,void 0,{class:"label-icon"}):`<i class='${nr(n,t).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}b(q0,"replaceIconSubstring");var br=b(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:s=!0,markdown:a=!0,isNode:o=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(et.debug("XYZ createText",t,r,i,n,s,o,"addSvgBackground: ",c),s){const u=a?$0(t,h):M0(t),p=await q0(hi(u),h),d=t.replace(/\\\\/g,"\\"),g={isNode:o,label:Es(t)?d:p,labelStyle:r.replace("fill:","color:")};return await P0(e,g,l,n,c,h)}else{const u=hi(t.replace(/<br\s*\/?>/g,"<br/>")),p=a?N0(u.replace("<br>","<br/>"),h):E0(u),d=R0(l,e,p,t?c:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Yt(d).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Yt(d).select("rect").attr("style",g.replace(/background:/g,"fill:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Yt(d).select("text").attr("style",y)}return i?Yt(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Yt(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function Bl(e,t,r){if(e&&e.length){const[i,n]=t,s=Math.PI/180*r,a=Math.cos(s),o=Math.sin(s);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-n)*o+i,l[1]=(c-i)*o+(h-n)*a+n}}}function o4(e,t){return e[0]===t[0]&&e[1]===t[1]}function l4(e,t,r,i=1){const n=r,s=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(n)for(const c of a)Bl(c,o,n);const l=(function(c,h,u){const p=[];for(const w of c){const k=[...w];o4(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}const d=[];h=Math.max(h,.1);const g=[];for(const w of p)for(let k=0;k<w.length-1;k++){const v=w[k],T=w[k+1];if(v[1]!==T[1]){const L=Math.min(v[1],T[1]);g.push({ymin:L,ymax:Math.max(v[1],T[1]),x:L===v[1]?v[0]:T[0],islope:(T[0]-v[0])/(T[1]-v[1])})}}if(g.sort(((w,k)=>w.ymin<k.ymin?-1:w.ymin>k.ymin?1:w.x<k.x?-1:w.x>k.x?1:w.ymax===k.ymax?0:(w.ymax-k.ymax)/Math.abs(w.ymax-k.ymax))),!g.length)return d;let y=[],C=g[0].ymin,x=0;for(;y.length||g.length;){if(g.length){let w=-1;for(let k=0;k<g.length&&!(g[k].ymin>C);k++)w=k;g.splice(0,w+1).forEach((k=>{y.push({s:C,edge:k})}))}if(y=y.filter((w=>!(w.edge.ymax<=C))),y.sort(((w,k)=>w.edge.x===k.edge.x?0:(w.edge.x-k.edge.x)/Math.abs(w.edge.x-k.edge.x))),(u!==1||x%h==0)&&y.length>1)for(let w=0;w<y.length;w+=2){const k=w+1;if(k>=y.length)break;const v=y[w].edge,T=y[k].edge;d.push([[Math.round(v.x),C],[Math.round(T.x),C]])}C+=u,y.forEach((w=>{w.edge.x=w.edge.x+u*w.edge.islope})),x++}return d})(a,s,i);if(n){for(const c of a)Bl(c,o,-n);(function(c,h,u){const p=[];c.forEach((d=>p.push(...d))),Bl(p,h,u)})(l,o,-n)}return l}function ta(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=n),l4(e,n,i,s||1)}class Lu{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=ta(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function Oo(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class c4 extends Lu{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=ta(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,a=[],o=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[c,h]of n)Oo([c,h])&&a.push([[c[0]-o,c[1]+l],[...h]],[[c[0]+o,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class h4 extends Lu{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,n);return i.ops=i.ops.concat(s.ops),i}}class u4{constructor(t){this.helper=t}fillPolygons(t,r){const i=ta(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const a=n/4;for(const o of t){const l=Oo(o),c=l/n,h=Math.ceil(c)-1,u=l-h*n,p=(o[0][0]+o[1][0])/2-n/4,d=Math.min(o[0][1],o[1][1]);for(let g=0;g<h;g++){const y=d+u+g*n,C=p-a+2*Math.random()*a,x=y-a+2*Math.random()*a,w=this.helper.ellipse(C,x,s,s,r);i.push(...w.ops)}}return{type:"fillSketch",ops:i}}}class d4{constructor(t){this.helper=t}fillPolygons(t,r){const i=ta(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach((a=>{const o=Oo(a),l=Math.floor(o/(i+n)),c=(o+n-l*(i+n))/2;let h=a[0],u=a[1];h[0]>u[0]&&(h=a[1],u=a[0]);const p=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const g=d*(i+n),y=g+i,C=[h[0]+g*Math.cos(p)+c*Math.cos(p),h[1]+g*Math.sin(p)+c*Math.sin(p)],x=[h[0]+y*Math.cos(p)+c*Math.cos(p),h[1]+y*Math.sin(p)+c*Math.sin(p)];s.push(...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],r))}})),s}}class p4{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,s=ta(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(s,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach((s=>{const a=Oo(s),o=Math.round(a/(2*r));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<o;u++){const p=2*u*r,d=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),y=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],C=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],x=[y[0]+g*Math.cos(h+Math.PI/4),y[1]+g*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],i))}})),n}}const Ue={};class f4{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const g4=0,Ll=1,cf=2,ua={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Al(e,t){return e.type===t}function Au(e){const t=[],r=(function(a){const o=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:g4,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:Ll,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return o[o.length]={type:cf,text:""},o})(e);let i="BOD",n=0,s=r[n];for(;!Al(s,cf);){let a=0;const o=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return Au("M0,0"+e);n++,a=ua[s.text],i=s.text}else Al(s,Ll)?a=ua[i]:(n++,a=ua[s.text],i=s.text);if(!(n+a<r.length))throw new Error("Path data ended short");for(let l=n;l<n+a;l++){const c=r[l];if(!Al(c,Ll))throw new Error("Param not a number: "+i+","+c.text);o[o.length]=+c.text}if(typeof ua[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:o};t.push(l),n+=a,s=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function z0(e){let t=0,r=0,i=0,n=0;const s=[];for(const{key:a,data:o}of e)switch(a){case"M":s.push({key:"M",data:[...o]}),[t,r]=o,[i,n]=o;break;case"m":t+=o[0],r+=o[1],s.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":s.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const l=o.map(((c,h)=>h%2?c+r:c+t));s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const l=o.map(((c,h)=>h%2?c+r:c+t));s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],s.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":s.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const l=o.map(((c,h)=>h%2?c+r:c+t));s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=n}return s}function W0(e){const t=[];let r="",i=0,n=0,s=0,a=0,o=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[s,a]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],o=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,p=0;r==="C"||r==="S"?(u=i+(i-o),p=n+(n-l)):(u=i,p=n),t.push({key:"C",data:[u,p,...h]}),o=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,p]=h;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-o),g=n+(n-l)):(d=i,g=n);const y=i+2*(d-i)/3,C=n+2*(g-n)/3,x=u+2*(d-u)/3,w=p+2*(g-p)/3;t.push({key:"C",data:[y,C,x,w,u,p]}),o=d,l=g,i=u,n=p;break}case"Q":{const[u,p,d,g]=h,y=i+2*(u-i)/3,C=n+2*(p-n)/3,x=d+2*(u-d)/3,w=g+2*(p-g)/3;t.push({key:"C",data:[y,C,x,w,d,g]}),o=u,l=p,i=d,n=g;break}case"A":{const u=Math.abs(h[0]),p=Math.abs(h[1]),d=h[2],g=h[3],y=h[4],C=h[5],x=h[6];u===0||p===0?(t.push({key:"C",data:[i,n,C,x,C,x]}),i=C,n=x):(i!==C||n!==x)&&(H0(i,n,C,x,u,p,d,g,y).forEach((function(w){t.push({key:"C",data:w})})),i=C,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=s,n=a}r=c}return t}function Gn(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function H0(e,t,r,i,n,s,a,o,l,c){const h=(u=a,Math.PI*u/180);var u;let p=[],d=0,g=0,y=0,C=0;if(c)[d,g,y,C]=c;else{[e,t]=Gn(e,t,-h),[r,i]=Gn(r,i,-h);const O=(e-r)/2,I=(t-i)/2;let j=O*O/(n*n)+I*I/(s*s);j>1&&(j=Math.sqrt(j),n*=j,s*=j);const A=n*n,R=s*s,H=A*R-A*I*I-R*O*O,q=A*I*I+R*O*O,_=(o===l?-1:1)*Math.sqrt(Math.abs(H/q));y=_*n*I/s+(e+r)/2,C=_*-s*O/n+(t+i)/2,d=Math.asin(parseFloat(((t-C)/s).toFixed(9))),g=Math.asin(parseFloat(((i-C)/s).toFixed(9))),e<y&&(d=Math.PI-d),r<y&&(g=Math.PI-g),d<0&&(d=2*Math.PI+d),g<0&&(g=2*Math.PI+g),l&&d>g&&(d-=2*Math.PI),!l&&g>d&&(g-=2*Math.PI)}let x=g-d;if(Math.abs(x)>120*Math.PI/180){const O=g,I=r,j=i;g=l&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,p=H0(r=y+n*Math.cos(g),i=C+s*Math.sin(g),I,j,n,s,a,0,l,[g,O,y,C])}x=g-d;const w=Math.cos(d),k=Math.sin(d),v=Math.cos(g),T=Math.sin(g),L=Math.tan(x/4),D=4/3*n*L,M=4/3*s*L,W=[e,t],E=[e+D*k,t-M*w],N=[r+D*T,i-M*v],z=[r,i];if(E[0]=2*W[0]-E[0],E[1]=2*W[1]-E[1],c)return[E,N,z].concat(p);{p=[E,N,z].concat(p);const O=[];for(let I=0;I<p.length;I+=3){const j=Gn(p[I][0],p[I][1],h),A=Gn(p[I+1][0],p[I+1][1],h),R=Gn(p[I+2][0],p[I+2][1],h);O.push([j[0],j[1],A[0],A[1],R[0],R[1]])}return O}}const m4={randOffset:function(e,t){return zt(e,t)},randOffsetWithRange:function(e,t,r){return uo(e,t,r)},ellipse:function(e,t,r,i,n){const s=Y0(r,i,n);return Jc(e,t,n,s).opset},doubleLineOps:function(e,t,r,i,n){return ui(e,t,r,i,n,!0)}};function U0(e,t,r,i,n){return{type:"path",ops:ui(e,t,r,i,n)}}function Ea(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let s=0;s<i-1;s++)n.push(...ui(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&n.push(...ui(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?U0(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function y4(e,t,r,i,n){return(function(s,a){return Ea(s,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function hf(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=da(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:da(r[0],1.5*(1+.22*t.roughness),pf(t));for(let s=1;s<r.length;s++){const a=r[s];if(a.length){const o=da(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:da(a,1.5*(1+.22*t.roughness),pf(t));for(const c of o)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&n.push(c)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function Y0(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/n;let a=Math.abs(e/2),o=Math.abs(t/2);const l=1-r.curveFitting;return a+=zt(a*l,r),o+=zt(o*l,r),{increment:s,rx:a,ry:o}}function Jc(e,t,r,i){const[n,s]=ff(i.increment,e,t,i.rx,i.ry,1,i.increment*uo(.1,uo(.4,1,r),r),r);let a=po(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=ff(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=po(o,null,r);a=a.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:a}}}function uf(e,t,r,i,n,s,a,o,l){const c=e,h=t;let u=Math.abs(r/2),p=Math.abs(i/2);u+=zt(.01*u,l),p+=zt(.01*p,l);let d=n,g=s;for(;d<0;)d+=2*Math.PI,g+=2*Math.PI;g-d>2*Math.PI&&(d=0,g=2*Math.PI);const y=2*Math.PI/l.curveStepCount,C=Math.min(y/2,(g-d)/2),x=gf(C,c,h,u,p,d,g,1,l);if(!l.disableMultiStroke){const w=gf(C,c,h,u,p,d,g,1.5,l);x.push(...w)}return a&&(o?x.push(...ui(c,h,c+u*Math.cos(d),h+p*Math.sin(d),l),...ui(c,h,c+u*Math.cos(g),h+p*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+p*Math.sin(d)]})),{type:"path",ops:x}}function df(e,t){const r=W0(z0(Au(e))),i=[];let n=[0,0],s=[0,0];for(const{key:a,data:o}of r)switch(a){case"M":s=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...ui(s[0],s[1],o[0],o[1],t)),s=[o[0],o[1]];break;case"C":{const[l,c,h,u,p,d]=o;i.push(...x4(l,c,h,u,p,d,s,t)),s=[p,d];break}case"Z":i.push(...ui(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]]}return{type:"path",ops:i}}function Fl(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+zt(n,t),i[0][1]+zt(n,t)]});for(let a=1;a<s;a++)r.push({op:"lineTo",data:[i[a][0]+zt(n,t),i[a][1]+zt(n,t)]})}}return{type:"fillPath",ops:r}}function Qi(e,t){return(function(r,i){let n=r.fillStyle||"hachure";if(!Ue[n])switch(n){case"zigzag":Ue[n]||(Ue[n]=new c4(i));break;case"cross-hatch":Ue[n]||(Ue[n]=new h4(i));break;case"dots":Ue[n]||(Ue[n]=new u4(i));break;case"dashed":Ue[n]||(Ue[n]=new d4(i));break;case"zigzag-line":Ue[n]||(Ue[n]=new p4(i));break;default:n="hachure",Ue[n]||(Ue[n]=new Lu(i))}return Ue[n]})(t,m4).fillPolygons(e,t)}function pf(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function V0(e){return e.randomizer||(e.randomizer=new f4(e.seed||0)),e.randomizer.next()}function uo(e,t,r,i=1){return r.roughness*i*(V0(r)*(t-e)+e)}function zt(e,t,r=1){return uo(-e,e,t,r)}function ui(e,t,r,i,n,s=!1){const a=s?n.disableMultiStrokeFill:n.disableMultiStroke,o=th(e,t,r,i,n,!0,!1);if(a)return o;const l=th(e,t,r,i,n,!0,!0);return o.concat(l)}function th(e,t,r,i,n,s,a){const o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);const u=h/2,p=.2+.2*V0(n);let d=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;d=zt(d,n,c),g=zt(g,n,c);const y=[],C=()=>zt(u,n,c),x=()=>zt(h,n,c),w=n.preserveVertices;return a?y.push({op:"move",data:[e+(w?0:C()),t+(w?0:C())]}):y.push({op:"move",data:[e+(w?0:zt(h,n,c)),t+(w?0:zt(h,n,c))]}),a?y.push({op:"bcurveTo",data:[d+e+(r-e)*p+C(),g+t+(i-t)*p+C(),d+e+2*(r-e)*p+C(),g+t+2*(i-t)*p+C(),r+(w?0:C()),i+(w?0:C())]}):y.push({op:"bcurveTo",data:[d+e+(r-e)*p+x(),g+t+(i-t)*p+x(),d+e+2*(r-e)*p+x(),g+t+2*(i-t)*p+x(),r+(w?0:x()),i+(w?0:x())]}),y}function da(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+zt(t,r),e[0][1]+zt(t,r)]),i.push([e[0][0]+zt(t,r),e[0][1]+zt(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+zt(t,r),e[n][1]+zt(t,r)]),n===e.length-1&&i.push([e[n][0]+zt(t,r),e[n][1]+zt(t,r)]);return po(i,null,r)}function po(e,t,r){const i=e.length,n=[];if(i>3){const s=[],a=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const l=e[o];s[0]=[l[0],l[1]],s[1]=[l[0]+(a*e[o+1][0]-a*e[o-1][0])/6,l[1]+(a*e[o+1][1]-a*e[o-1][1])/6],s[2]=[e[o+1][0]+(a*e[o][0]-a*e[o+2][0])/6,e[o+1][1]+(a*e[o][1]-a*e[o+2][1])/6],s[3]=[e[o+1][0],e[o+1][1]],n.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...th(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function ff(e,t,r,i,n,s,a,o){const l=[],c=[];if(o.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+n*Math.sin(0)]),c.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=zt(.5,o)-Math.PI/2;c.push([zt(s,o)+t+.9*i*Math.cos(h-e),zt(s,o)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let p=h;p<u;p+=e){const d=[zt(s,o)+t+i*Math.cos(p),zt(s,o)+r+n*Math.sin(p)];l.push(d),c.push(d)}c.push([zt(s,o)+t+i*Math.cos(h+2*Math.PI+.5*a),zt(s,o)+r+n*Math.sin(h+2*Math.PI+.5*a)]),c.push([zt(s,o)+t+.98*i*Math.cos(h+a),zt(s,o)+r+.98*n*Math.sin(h+a)]),c.push([zt(s,o)+t+.9*i*Math.cos(h+.5*a),zt(s,o)+r+.9*n*Math.sin(h+.5*a)])}return[c,l]}function gf(e,t,r,i,n,s,a,o,l){const c=s+zt(.1,l),h=[];h.push([zt(o,l)+t+.9*i*Math.cos(c-e),zt(o,l)+r+.9*n*Math.sin(c-e)]);for(let u=c;u<=a;u+=e)h.push([zt(o,l)+t+i*Math.cos(u),zt(o,l)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(a),r+n*Math.sin(a)]),h.push([t+i*Math.cos(a),r+n*Math.sin(a)]),po(h,null,l)}function x4(e,t,r,i,n,s,a,o){const l=[],c=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let h=[0,0];const u=o.disableMultiStroke?1:2,p=o.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(p?0:zt(c[0],o)),a[1]+(p?0:zt(c[0],o))]}),h=p?[n,s]:[n+zt(c[d],o),s+zt(c[d],o)],l.push({op:"bcurveTo",data:[e+zt(c[d],o),t+zt(c[d],o),r+zt(c[d],o),i+zt(c[d],o),h[0],h[1]]});return l}function Xn(e){return[...e]}function mf(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Xn(e[0]),Xn(e[1]),Xn(e[2]),Xn(e[2]));else{const n=[];n.push(e[0],e[0]);for(let o=1;o<e.length;o++)n.push(e[o]),o===e.length-1&&n.push(e[o]);const s=[],a=1-t;i.push(Xn(n[0]));for(let o=1;o+2<n.length;o++){const l=n[o];s[0]=[l[0],l[1]],s[1]=[l[0]+(a*n[o+1][0]-a*n[o-1][0])/6,l[1]+(a*n[o+1][1]-a*n[o-1][1])/6],s[2]=[n[o+1][0]+(a*n[o][0]-a*n[o+2][0])/6,n[o+1][1]+(a*n[o][1]-a*n[o+2][1])/6],s[3]=[n[o+1][0],n[o+1][1]],i.push(s[1],s[2],s[3])}}return i}function Na(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function b4(e,t,r){const i=Na(t,r);if(i===0)return Na(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),Na(e,wi(t,r,n))}function wi(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function eh(e,t,r,i){const n=i||[];if((function(o,l){const c=o[l+0],h=o[l+1],u=o[l+2],p=o[l+3];let d=3*h[0]-2*c[0]-p[0];d*=d;let g=3*h[1]-2*c[1]-p[1];g*=g;let y=3*u[0]-2*p[0]-c[0];y*=y;let C=3*u[1]-2*p[1]-c[1];return C*=C,d<y&&(d=y),g<C&&(g=C),d+g})(e,t)<r){const o=e[t+0];n.length?(s=n[n.length-1],a=o,Math.sqrt(Na(s,a))>1&&n.push(o)):n.push(o),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],p=wi(l,c,.5),d=wi(c,h,.5),g=wi(h,u,.5),y=wi(p,d,.5),C=wi(d,g,.5),x=wi(y,C,.5);eh([l,p,y,x],0,r,n),eh([x,C,g,u],0,r,n)}var s,a;return n}function C4(e,t){return fo(e,0,e.length,t)}function fo(e,t,r,i,n){const s=n||[],a=e[t],o=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=b4(e[h],a,o);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(fo(e,t,c+1,i,s),fo(e,c,r,i,s)):(s.length||s.push(a),s.push(o)),s}function El(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let s=0;s<n;s++)eh(e,3*s,t,i);return r&&r>0?fo(i,0,i.length,r):i}const Ke="none";class go{constructor(t){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=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,n,s){const a=this._o(s);return this._d("line",[U0(t,r,i,n,a)],a)}rectangle(t,r,i,n,s){const a=this._o(s),o=[],l=y4(t,r,i,n,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];a.fillStyle==="solid"?o.push(Fl([c],a)):o.push(Qi([c],a))}return a.stroke!==Ke&&o.push(l),this._d("rectangle",o,a)}ellipse(t,r,i,n,s){const a=this._o(s),o=[],l=Y0(i,n,a),c=Jc(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=Jc(t,r,a,l).opset;h.type="fillPath",o.push(h)}else o.push(Qi([c.estimatedPoints],a));return a.stroke!==Ke&&o.push(c.opset),this._d("ellipse",o,a)}circle(t,r,i,n){const s=this.ellipse(t,r,i,i,n);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ea(t,!1,i)],i)}arc(t,r,i,n,s,a,o=!1,l){const c=this._o(l),h=[],u=uf(t,r,i,n,s,a,o,!0,c);if(o&&c.fill)if(c.fillStyle==="solid"){const p=Object.assign({},c);p.disableMultiStroke=!0;const d=uf(t,r,i,n,s,a,!0,!1,p);d.type="fillPath",h.push(d)}else h.push((function(p,d,g,y,C,x,w){const k=p,v=d;let T=Math.abs(g/2),L=Math.abs(y/2);T+=zt(.01*T,w),L+=zt(.01*L,w);let D=C,M=x;for(;D<0;)D+=2*Math.PI,M+=2*Math.PI;M-D>2*Math.PI&&(D=0,M=2*Math.PI);const W=(M-D)/w.curveStepCount,E=[];for(let N=D;N<=M;N+=W)E.push([k+T*Math.cos(N),v+L*Math.sin(N)]);return E.push([k+T*Math.cos(M),v+L*Math.sin(M)]),E.push([k,v]),Qi([E],w)})(t,r,i,n,s,a,c));return c.stroke!==Ke&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],s=hf(t,i);if(i.fill&&i.fill!==Ke)if(i.fillStyle==="solid"){const a=hf(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],o=t;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...El(mf([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...El(mf(c),10,(1+i.roughness)/2))}a.length&&n.push(Qi([a],i))}return i.stroke!==Ke&&n.push(s),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],s=Ea(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(Fl([t],i)):n.push(Qi([t],i))),i.stroke!==Ke&&n.push(s),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==Ke,a=i.stroke!==Ke,o=!!(i.simplification&&i.simplification<1),l=(function(h,u,p){const d=W0(z0(Au(h))),g=[];let y=[],C=[0,0],x=[];const w=()=>{x.length>=4&&y.push(...El(x,u)),x=[]},k=()=>{w(),y.length&&(g.push(y),y=[])};for(const{key:T,data:L}of d)switch(T){case"M":k(),C=[L[0],L[1]],y.push(C);break;case"L":w(),y.push([L[0],L[1]]);break;case"C":if(!x.length){const D=y.length?y[y.length-1]:C;x.push([D[0],D[1]])}x.push([L[0],L[1]]),x.push([L[2],L[3]]),x.push([L[4],L[5]]);break;case"Z":w(),y.push([C[0],C[1]])}if(k(),!p)return g;const v=[];for(const T of g){const L=C4(T,p);L.length&&v.push(L)}return v})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),c=df(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const h=df(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(Fl(l,i));else n.push(Qi(l,i));return a&&(o?l.forEach((h=>{n.push(Ea(h,!1,i))})):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const s=typeof r=="number"&&r>=0?n.data.map((a=>+a.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const s of r){let a=null;switch(s.type){case"path":a={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ke};break;case"fillPath":a={d:this.opsToPath(s),stroke:Ke,strokeWidth:0,fill:i.fill||Ke};break;case"fillSketch":a=this.fillSketch(s,i)}a&&n.push(a)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Ke,strokeWidth:i,fill:Ke}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class k4{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new go(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,a,s),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,a,s,o),n.restore();break}case"fillSketch":this.fillSketch(n,a,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const s of r.ops){const a=typeof i=="number"&&i>=0?s.data.map((o=>+o.toFixed(i))):s.data;switch(s.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,s){const a=this.gen.line(t,r,i,n,s);return this.draw(a),a}rectangle(t,r,i,n,s){const a=this.gen.rectangle(t,r,i,n,s);return this.draw(a),a}ellipse(t,r,i,n,s){const a=this.gen.ellipse(t,r,i,n,s);return this.draw(a),a}circle(t,r,i,n){const s=this.gen.circle(t,r,i,n);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,s,a,o=!1,l){const c=this.gen.arc(t,r,i,n,s,a,o,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const pa="http://www.w3.org/2000/svg";class w4{constructor(t,r){this.svg=t,this.gen=new go(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,s=n.createElementNS(pa,"g"),a=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=n.createElementNS(pa,"path"),l.setAttribute("d",this.opsToPath(o,a)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=n.createElementNS(pa,"path"),l.setAttribute("d",this.opsToPath(o,a)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(n,o,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const s=t.createElementNS(pa,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",n+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,s){const a=this.gen.line(t,r,i,n,s);return this.draw(a)}rectangle(t,r,i,n,s){const a=this.gen.rectangle(t,r,i,n,s);return this.draw(a)}ellipse(t,r,i,n,s){const a=this.gen.ellipse(t,r,i,n,s);return this.draw(a)}circle(t,r,i,n){const s=this.gen.circle(t,r,i,n);return this.draw(s)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,s,a,o=!1,l){const c=this.gen.arc(t,r,i,n,s,a,o,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var Et={canvas:(e,t)=>new k4(e,t),svg:(e,t)=>new w4(e,t),generator:e=>new go(e),newSeed:()=>go.newSeed()},v4=1,S4=3;async function Fu(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!Eu(e);await Promise.all([...t].map(i=>new Promise(n=>{function s(){if(i.style.display="flex",i.style.flexDirection="column",r){const a=Gt().fontSize?Gt().fontSize:window.getComputedStyle(document.body).fontSize,o=5,[l=Wy.fontSize]=$o(a),c=l*o+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";n(i)}b(s,"setupImage"),setTimeout(()=>{i.complete&&s()}),i.addEventListener("error",s),i.addEventListener("load",s)}
371)))}b(Fu,"configureLabelImages");function Eu(e){var r;return e.nodeType===S4?((r=e.textContent)==null?void 0:r.trim())!=="":e.nodeType!==v4||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(Eu)}b(Eu,"hasTextBesidesImages");var yf=3,T4=32,_4=b(async(e,t,r)=>{var x,w,k;const i=Gt(),n=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),s=n.insert("g").attr("class","label").attr("style",ve(t.labelStyle)),o=[{text:typeof t.label=="string"?t.label:((x=t.label)==null?void 0:x[0])??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(v=>({text:v,cssClass:"c4-descr"}))].filter(v=>v.text),l=t.width?Math.max(t.width-2*(t.padding??0),T4):((w=Gt().flowchart)==null?void 0:w.wrappingWidth)??200,h=((k=i.c4)==null?void 0:k.wrap)??!0?l:Number.POSITIVE_INFINITY,u=await Promise.all(o.map(async v=>{const T=s.append("g").attr("class",v.cssClass),L=await br(T,nr(hi(v.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:h,style:t.labelStyle},i);return Yt(L).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),Yt(L).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:T,box:T.node().getBBox()}})),p=Math.max(...u.map(({box:v})=>v.width),0);let d=0;for(const{el:v,box:T}of u)v.attr("transform",`translate(${p/2-T.x-T.width/2}, ${d-T.y}
371)`),d+=T.height+yf;const g=u.length>0?d-yf:0;s.insert("rect",":first-child"),s.attr("transform",`translate(${-p/2}, ${-g/2})`);const y=s.node().getBBox(),C=(t.padding??0)/2;return{shapeSvg:n,bbox:y,halfPadding:C,label:s}},"c4LabelHelper"),It=b(async(e,t,r)=>{var d,g;if(t.stereotype!==void 0)return _4(e,t,r);let i;const n=t.useHtmlLabels||Mr((d=Gt())==null?void 0:d.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",ve(t.labelStyle));let o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await br(a,nr(hi(o),Gt()),{useHtmlLabels:n,width:t.width||t.wrappingWidth||((g=Gt().flowchart)==null?void 0:g.wrappingWidth),classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},Gt()),u=((t==null?void 0:t.padding)??0)/2;let p;if(n){const y=h.children[0],C=Yt(h);await Fu(y),p=await Ii.measure(()=>y.getBoundingClientRect()),C.attr("width",p.width),C.attr("height",p.height)}else p=await Ii.measure(()=>h.getBBox());return n?a.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):a.attr("transform","translate(0, "+-p.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:s,bbox:p,halfPadding:u,label:a}},"labelHelper"),Nl=b(async(e,t,r)=>{var l,c;const i=r.useHtmlLabels??Ie(Gt()),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await br(n,nr(hi(t),Gt()),{useHtmlLabels:i,width:r.width||((c=(l=Gt())==null?void 0:l.flowchart)==null?void 0:c.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),a=r.padding/2;let o;if(Ie(Gt())){const h=s.children[0],u=Yt(s);o=await Ii.measure(()=>h.getBoundingClientRect()),u.attr("width",o.width),u.attr("height",o.height)}else o=await Ii.measure(()=>s.getBBox());return i?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:a,label:n}},"insertLabel"),Nt=b((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),Dt=b((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Zt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}b(Zt,"createPathFromPoints");function di(e,t,r,i,n,s){const a=[],l=r-e,c=i-t,h=l/s,u=2*Math.PI/h,p=t+c/2;for(let d=0;d<=50;d++){const g=d/50,y=e+g*l,C=p+n*Math.sin(u*(y-e));a.push({x:y,y:C})}return a}b(di,"generateFullSineWavePoints");function _r(e,t,r,i,n,s){const a=[],o=n*Math.PI/180,h=(s*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const p=o+u*h,d=e+r*Math.cos(p),g=t+r*Math.sin(p);a.push({x:-d,y:-g})}return a}b(_r,"generateCirclePoints");function rh(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const n=t.find(l=>l.getAttribute("fill")!=="none"),s=t.find(l=>l.getAttribute("stroke")!=="none"),a=b((l,c)=>(l==null?void 0:l.getAttribute(c))??void 0,"getAttr");if(n){const l={fill:a(n,"fill"),"fill-opacity":a(n,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(s){const l={stroke:a(s,"stroke"),"stroke-width":a(s,"stroke-width")??"1","stroke-opacity":a(s,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const o=document.createElementNS("http://www.w3.org/2000/svg","g");return o.appendChild(r),o}b(rh,"mergePaths");var B4=b((e,t)=>{var r=e.x,i=e.y,n=t.x-r,s=t.y-i,a=e.width/2,o=e.height/2,l,c;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=s===0?0:o*n/s,c=o):(n<0&&(a=-a),l=a,c=n===0?0:a*s/n),{x:r+l,y:i+c}},"intersectRect"),Wi=B4,ar=b((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),L4=b(async(e,t,r,i=!1,n=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const a=Gt(),o=Ie(a);return await br(e,s,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},a)},"createLabel"),ni=L4;function G0(e,t){return e.intersect(t)}b(G0,"intersectNode");var A4=G0;function X0(e,t,r,i){var n=e.x,s=e.y,a=n-i.x,o=s-i.y,l=Math.sqrt(t*t*o*o+r*r*a*a),c=Math.abs(t*r*a/l);i.x<n&&(c=-c);var h=Math.abs(t*r*o/l);return i.y<s&&(h=-h),{x:n+c,y:s+h}}b(X0,"intersectEllipse");var Q0=X0;function K0(e,t,r){return Q0(e,t,t,r)}b(K0,"intersectCircle");var F4=K0;function Z0(e,t,r,i){{const n=t.y-e.y,s=e.x-t.x,a=t.x*e.y-e.x*t.y,o=n*r.x+s*r.y+a,l=n*i.x+s*i.y+a,c=1e-6;if(o!==0&&l!==0&&ih(o,l))return;
371const h=i.y-r.y,u=r.x-i.x,p=i.x*r.y-r.x*i.y,d=h*e.x+u*e.y+p,g=h*t.x+u*t.y+p;if(Math.abs(d)<c&&Math.abs(g)<c&&ih(d,g))return;const y=n*u-h*s;if(y===0)return;const C=Math.abs(y/2);let x=s*p-u*a;const w=x<0?(x-C)/y:(x+C)/y;x=h*a-n*p;const k=x<0?(x-C)/y:(x+C)/y;return{x:w,y:k}}}b(Z0,"intersectLine");function ih(e,t){return e*t>0}b(ih,"sameSign");var E4=Z0;function J0(e,t,r){let i=e.x,n=e.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){a=Math.min(a,h.x),o=Math.min(o,h.y)}):(a=Math.min(a,t.x),o=Math.min(o,t.y));let l=i-e.width/2-a,c=n-e.height/2-o;for(let h=0;h<t.length;h++){let u=t[h],p=t[h<t.length-1?h+1:0],d=E4(e,r,{x:l+u.x,y:c+u.y},{x:l+p.x,y:c+p.y});d&&s.push(d)}return s.length?(s.length>1&&s.sort(function(h,u){let p=h.x-r.x,d=h.y-r.y,g=Math.sqrt(p*p+d*d),y=u.x-r.x,C=u.y-r.y,x=Math.sqrt(y*y+C*C);return g<x?-1:g===x?0:1}),s[0]):e}b(J0,"intersectPolygon");var N4=J0,Tt={node:A4,circle:F4,ellipse:Q0,polygon:N4,rect:Wi};function tb(e,t){const{labelStyles:r}=Mt(t);t.labelStyle=r;const i=Dt(t);let n=i;i||(n="anchor");const s=e.insert("g").attr("class",n).attr("id",t.domId||t.id),a=1,{cssStyles:o}=t,l=Et.svg(s),c=Ft(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),u=s.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",ve(o)),Nt(t,u),t.intersect=function(p){return et.info("Circle intersect",t,a,p),Tt.circle(t,a,p)},s}b(tb,"anchor");function nh(e,t,r,i,n,s,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,p=(i-t)/2,d=u/n,g=p/s,y=Math.sqrt(d**2+g**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const C=Math.sqrt(1-y**2),x=l+C*s*Math.sin(h)*(a?-1:1),w=c-C*n*Math.cos(h)*(a?-1:1),k=Math.atan2((t-w)/s,(e-x)/n);let T=Math.atan2((i-w)/s,(r-x)/n)-k;a&&T<0&&(T+=2*Math.PI),!a&&T>0&&(T-=2*Math.PI);const L=[];for(let D=0;D<20;D++){const M=D/19,W=k+M*T,E=x+n*Math.cos(W),N=w+s*Math.sin(W);L.push({x:E,y:N})}return L}b(nh,"generateArcPoints");function eb(e,t,r){const[i,n]=[t,r].sort((s,a)=>a-s);return n*(1-Math.sqrt(1-(e/i/2)**2))}b(eb,"calculateArcSagitta");async function rb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n,o=b(W=>W+a,"calcTotalHeight"),l=b(W=>{const E=W/2;return[E/(2.5+W/50),E]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await It(e,t,Dt(t)),u=o(t!=null&&t.height?t==null?void 0:t.height:h.height),[p,d]=l(u),g=eb(u,p,d),C=(t!=null&&t.width?t==null?void 0:t.width:h.width)+s*2+g-g,x=u,{cssStyles:w}=t,k=[{x:C/2,y:-x/2},{x:-C/2,y:-x/2},...nh(-C/2,-x/2,-C/2,x/2,p,d,!1),{x:C/2,y:x/2},...nh(C/2,x/2,C/2,-x/2,p,d,!0)],v=Et.svg(c),T=Ft(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const L=Zt(k),D=v.path(L,T),M=c.insert(()=>D,":first-child");return M.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",w),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(${p/2}, 0)`),Nt(t,M),t.intersect=function(W){return Tt.polygon(t,k,W)},c}b(rb,"bowTieRect");async function ib(e,t,{config:{themeVariables:r}}){var D;const{labelStyles:i,nodeStyles:n}=Mt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,label:o}=await It(e,t,Dt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=Math.max(a.width+c*2,t.width??0,80),u=Math.max(Math.min(h*.08,12),5),p=Math.max(a.height+c*2+u,t.height??0),d=-p/2+u,g=p/2,y=h*.72,C=[`M${-h/2},${d}`,`L${-y/2},${g}`,`A${y/2},${u} 0 0 0 ${y/2},${g}`,`L${h/2},${d}`,`A${h/2},${u} 0 0 0 ${-h/2},${d}`,"Z"].join(" "),{cssStyles:x}=t,w=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const W=Et.svg(s).path(C,Ft(t,{}));(D=w.node())==null||D.appendChild(W),x&&w.attr("style",x)}else w.append("path").attr("d",C).attr("style",n);w.append("ellipse").attr("cx",0).attr("cy",d).attr("rx",h/2).attr("ry",u).attr("style",`fill:none;stroke:${l};stroke-width:1px`),Nt(t,w);
371const k=d+(g-d)/2;o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${k-a.height/2-(a.y-(a.top??0))})`);const v=12,T=b((M,W,E)=>Array.from({length:v+1},(N,z)=>{const O=Math.PI-z*Math.PI/v;return{x:M*Math.cos(O),y:W+E*u*Math.sin(O)}}),"arc"),L=[...T(h/2,d,-1),...T(y/2,g,1).reverse()];return t.intersect=function(M){return Tt.polygon(t,L,M)},s}b(ib,"bucket");var xf=20,bf=8,M4=80,Ml=8;async function nb(e,t){const{themeVariables:r}=Gt(),i=r.clusterBkg,n=r.clusterBorder,{nodeStyles:s}=Mt(t),{shapeSvg:a,bbox:o}=await It(e,t,Dt(t)),l=t.padding??8,c=o.height,h=Math.max(o.width+l*2,M4,(t==null?void 0:t.width)??0),u=Math.max(c+bf+xf+l*2,(t==null?void 0:t.height)??0),p=-h/2,d=-u/2,g=-28/2,y=a.select(".label");y&&(t.useHtmlLabels??Ie(Gt())?y.attr("transform",`translate(${-o.width/2}, ${-o.height/2+g})`):y.attr("transform",`translate(0, ${-o.height/2+g})`));let C;if(t.look==="handDrawn"){const T=Et.svg(a),L=Ft(t,{fill:i,stroke:n,fillStyle:"solid"}),D=T.path(ar(p,d,h,u,Ml),L);C=a.insert(()=>D,":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",ve(t.cssStyles))}else C=a.insert("rect",":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",s).attr("rx",Ml).attr("ry",Ml).attr("x",p).attr("y",d).attr("width",h).attr("height",u).attr("fill",i).attr("stroke",n);const x=d+l+c+bf;a.append("line").attr("class","collapsed-separator").attr("x1",p+8).attr("y1",x).attr("x2",p+h-8).attr("y2",x).attr("stroke",n).attr("stroke-dasharray","3, 3");const w=x+xf/2,k=2.5,v=10;for(let T=-1;T<=1;T++)a.append("circle").attr("class","collapsed-indicator").attr("cx",T*v).attr("cy",w).attr("r",k).attr("fill",n);return Nt(t,C),t.calcIntersect=function(T,L){return Tt.rect(T,L)},t.intersect=function(T){return Tt.rect(t,T)},a}b(nb,"collapsedGroup");function jr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}b(jr,"insertPolygonShape");var $4=["right","left","up","down"],Nu="point",j4=b(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),I4=b(e=>$4.filter(t=>e.has(t)).join("|")||Nu,"getDirectionKey"),Cf={"right|left|up|down":b(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":b(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":b(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":b(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":b(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":b(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":b(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":b(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":b(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":b(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":b(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:b(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:b(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:b(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:b(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[Nu]:()=>[{x:0,y:0}]},D4=b((e,t,r,i)=>
371{const n=j4(e),s=(r.padding??0)/2,a=t.height+4*s,o=a/2,l=i??t.width+2*o+2*s,c=I4(n);return(Cf[c]??Cf[Nu])({height:a,midpoint:o,padding:s,width:l})},"getArrowPoints");async function sb(e,t){const r=t,{shapeSvg:i,bbox:n}=await It(e,r,Dt(r)),s=r.padding??0,a=n.height+2*s,o=a/2,l=n.width+2*o+s,c=r.width??0,u=r.positioned&&(r.widthInColumns??1)>1&&c>l?c:l,p=D4(r.directions??[],n,r,u),d=jr(i,u,a,p);return d.attr("style",r.style??null),Nt(r,d),r.intersect=function(g){return Tt.polygon(r,p,g)},i}b(sb,"block_arrow");async function ab(e,t,{config:{themeVariables:r}}){var w;const{labelStyles:i,nodeStyles:n}=Mt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,label:o}=await It(e,t,Dt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=18,u=12,p=Math.max(a.width+c*2,t.width??0,90),d=Math.max(a.height+c*2+h,t.height??0),g=-d/2,{cssStyles:y}=t,C=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const v=Et.svg(s).path(ar(-p/2,g,p,d,u),Ft(t,{}));(w=C.node())==null||w.appendChild(v),y&&C.attr("style",y)}else C.append("rect").attr("x",-p/2).attr("y",g).attr("width",p).attr("height",d).attr("rx",u).attr("ry",u).attr("style",n);C.append("line").attr("x1",-p/2).attr("y1",g+h).attr("x2",p/2).attr("y2",g+h).attr("style",`stroke:${l};stroke-width:1px`);for(let k=0;k<3;k++)C.append("circle").attr("cx",-p/2+12+k*9).attr("cy",g+h/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);C.append("rect").attr("class","browser-address-bar").attr("x",-p/2+44).attr("y",g+4).attr("width",Math.max(p-56,10)).attr("height",h-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),Nt(t,C);
371const x=g+h+(d-h)/2;return o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(k){return Tt.rect(t,k)},s}b(ab,"browser");var fa=12;async function ob(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?28:n,a=t.look==="neo"?24:n,{shapeSvg:o,bbox:l}=await It(e,t,Dt(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?s*2:s+fa),h=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?a*2:a),u=0,p=c,d=-h,g=0,y=[{x:u+fa,y:d},{x:p,y:d},{x:p,y:g},{x:u,y:g},{x:u,y:d+fa},{x:u+fa,y:d}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const w=Et.svg(o),k=Ft(t,{}),v=Zt(y),T=w.path(v,k);C=o.insert(()=>T,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),x&&C.attr("style",x)}else C=jr(o,c,h,y);return i&&C.attr("style",i),Nt(t,C),t.intersect=function(w){return Tt.polygon(t,y,w)},o}b(ob,"card");function lb(e,t){const{nodeStyles:r}=Mt(t);t.label="";const i=e.insert("g").attr("class",Dt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,s=Math.max(28,t.width??0),a=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],o=Et.svg(i),l=Ft(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=Zt(a),h=o.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return Tt.polygon(t,a,p)},i}b(lb,"choice");async function Mu(e,t,r){const{labelStyles:i,nodeStyles:n}=Mt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,halfPadding:o}=await It(e,t,Dt(t)),l=16,c=(r==null?void 0:r.padding)??o,h=t.look==="neo"?a.width/2+l*2:a.width/2+c;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=Et.svg(s),g=Ft(t,{}),y=d.circle(0,0,h*2,g);u=s.insert(()=>y,":first-child"),u.attr("class","basic label-container").attr("style",ve(p))}else u=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0);return Nt(t,u),t.calcIntersect=function(d,g){const y=d.width/2;return Tt.circle(d,y,g)},t.intersect=function(d){return et.info("Circle intersect",t,h,d),Tt.circle(t,h,d)},s}b(Mu,"circle");async function cb(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:n,bbox:s,halfPadding:a}=await It(e,r,i),o=n.insert("rect",":first-child"),l=r.padding??0,c=r.positioned?r.width??0:s.width+l,h=r.positioned?r.height??0:s.height+l,u=r.positioned?-c/2:-s.width/2-a,p=r.positioned?-h/2:-s.height/2-a;return o.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",u).attr("y",p).attr("width",c).attr("height",h),Nt(r,o),r.intersect=function(d){return Tt.rect(r,d)},n}b(cb,"composite");async function hb(e,t,{config:{themeVariables:r}}){var w;const{labelStyles:i,nodeStyles:n}=Mt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,label:o}=await It(e,t,Dt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=20,u=12,p=Math.max(a.width+c*2,t.width??0,90),d=Math.max(a.height+c*2+h,t.height??0),g=-d/2,{cssStyles:y}=t,C=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const v=Et.svg(s).path(ar(-p/2,g,p,d,u),Ft(t,{}));(w=C.node())==null||w.appendChild(v),y&&C.attr("style",y)}else C.append("rect").attr("x",-p/2).attr("y",g).attr("width",p).attr("height",d).attr("rx",u).attr("ry",u).attr("style",n);C.append("text").attr("x",-p/2+12).attr("y",g+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),Nt(t,C);
vendor: 4,095 bytes, lines 371-372
371const x=g+h+(d-h)/2;return o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(k){return Tt.rect(t,k)},s}b(hb,"consoleWindow");function ub(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${o.x},${o.y}
372                   M ${n.x},${n.y} L ${a.x},${a.y}`}b(ub,"createLine");function db(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",Dt(t)).attr("id",t.domId??t.id),s=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:a}=t,o=Et.svg(n),l=Ft(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,s*2,l),h=ub(s),u=o.path(h,l),p=n.insert(()=>c,":first-child");return p.insert(()=>u),p.attr("class","outer-path"),a&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),Nt(t,p),t.intersect=function(d){return et.info("crossedCircle intersect",t,{radius:s,point:d}),Tt.circle(t,s,d)},n}b(db,"crossedCircle");function Or(e,t,r,i=100,n=0,s=180){const a=[],o=n*Math.PI/180,h=(s*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const p=o+u*h,d=e+r*Math.cos(p),g=t+r*Math.sin(p);a.push({x:-d,y:-g})}return a}b(Or,"generateCirclePoints");async function pb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await It(e,t,Dt(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+o,h=s.height+l,u=Math.max(5,h*.1),{cssStyles:p}=t,d=[...Or(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...Or(c/2+u*2,-u,u,20,-180,-270),...Or(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...Or(c/2,h/2,u,20,0,90)],g=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...Or(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...Or(c/2+c*.1,-u,u,20,-180,-270),...Or(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...Or(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2,y:h/2+u}],y=Et.svg(n),C=Ft(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=Zt(d).replace("Z",""),k=y.path(w,C),v=Zt(g),T=y.path(v,{...C}),L=n.insert("g",":first-child");return L.insert(()=>T,":first-child").attr("stroke-opacity",0),L.insert(()=>k,":first-child"),L.attr("class","text"),p&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${u}, 0)`),a.attr("transform",`translate(${-c/2+u-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Nt(t,L),t.intersect=function(D){return Tt.polygon(t,g,D)},n}b(pb,"curlyBraceLeft");function Rr(e,t,r,i=100,n=0,s=180){const a=[],o=n*Math.PI/180,h=(s*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const p=o+u*h,d=e+r*Math.cos(p),g=t+r*Math.sin(p);a.push({x:d,y:g})}return a}b(Rr,"generateCirclePoints");async function fb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await It(e,t,Dt(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?o*2:o),h=s.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:p}=t,d=[...Rr(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...Rr(c/2+u*2,-u,u,20,-180,-270),...Rr(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...Rr(c/2,h/2,u,20,0,90)],g=[{x:-c/2,y:-h/2-u},{x:c/2,y:-h/2-u},...Rr(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...Rr(c/2+u*2,-u,u,20,-180,-270),...Rr(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...Rr(c/2,h/2,u,20,0,90),{x:c/2,y:h/2+u},{x:-c/2,y:h/2+u}],y=Et.svg(n),C=Ft(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=Zt(d).replace("Z",""),k=y.path(w,C),v=Zt(g),T=y.path(v,{...C}),L=n.insert("g",":first-child");return L.insert(()=>T,":first-child").attr("stroke-opacity",0),L.insert(()=>k,":first-child"),L.attr("class","text"),p&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-u}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))}
372,${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Nt(t,L),t.intersect=function(D){return Tt.polygon(t,g,D)},n}b(fb,"curlyBraceRight");function Le(e,t,r,i=100,n=0,s=180){const a=[],o=n*Math.PI/180,h=(s*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const p=o+u*h,d=e+r*Math.cos(p),g=t+r*Math.sin(p);a.push({x:-d,y:-g})}return a}b(Le,"generateCirclePoints");async function gb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await It(e,t,Dt(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?o*2:o),h=s.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:p}=t,d=[...Le(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...Le(c/2+u*2,-u,u,20,-180,-270),...Le(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...Le(c/2,h/2,u,20,0,90)],g=[...Le(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Le(-c/2-u/2,-u,u,20,0,90),...Le(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Le(-c/2+u+u/2,h/2,u,30,-180,-270)],y=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...Le(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...Le(c/2+u*2,-u,u,20,-180,-270),...Le(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...Le(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2-u-u/2,y:h/2+u},...Le(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Le(-c/2-u/2,-u,u,20,0,90),...Le(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Le(-c/2+u+u/2,h/2,u,30,-180,-270)],C=Et.svg(n),x=Ft(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=Zt(d).replace("Z",""),v=C.path(k,x),L=Zt(g).replace("Z",""),D=C.path(L,x),M=Zt(y),W=C.path(M,{...x}),E=n.insert("g",":first-child");return E.insert(()=>W,":first-child").attr("stroke-opacity",0),E.insert(()=>v,":first-child"),E.insert(()=>D,":first-child"),E.attr("class","text"),p&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(${u-u/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Nt(t,E),t.intersect=function(N){return Tt.polygon(t,y,N)},n}b(gb,"curlyBraces");async function mb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n,o=20,l=5,{shapeSvg:c,bbox:h}=await It(e,t,Dt(t)),u=Math.max(o,(h.width+s*2)*1.25,(t==null?void 0:t.width)??0),p=Math.max(l,h.height+a*2,(t==null?void 0:t.height)??0),d=p/2,{cssStyles:g}=t,y=Et.svg(c),C=Ft(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=u,w=p,k=x-d,v=w/4,T=[{x:k,y:0},{x:v,y:0},{x:0,y:w/2},{x:v,y:w},{x:k,y:w},..._r(-k,-w/2,d,50,270,90)],L=Zt(T),D=y.path(L,C),M=c.insert(()=>D,":first-child");return M.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&M.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&M.selectChildren("path").attr("style",i),M.attr("transform",`translate(${-u/2}, ${-p/2})`),Nt(t,M),t.intersect=function(W){return Tt.polygon(t,T,W)},c}b(mb,"curvedTrapezoid");async function yb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await It(e,t,Dt(t)),o=t.padding??20,l=Math.max(s.width+o*2,t.width??0,100),c=Math.min(Math.max(l*.23,16),56),h=c*.27,u=Math.max(s.height+o*2,t.height?t.height-(2*c-h):0),p=Math.min(l*.177,u*.45),d=u+2*c-h,g=-d/2,y=g+2*c-h,C=n.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:x}=t;if(t.look==="handDrawn"){const M=Et.svg(n),W=Ft(t,{}),E=M.path(ar(-l/2,y,l,u,p),W),N=M.circle(0,g+c,c*2,W);C.insert(()=>N,":first-child"),C.insert(()=>E,":first-child"),x&&C.attr("style",x)}else C.append("rect").attr("x",-l/2).attr("y",y).attr("width",l).attr("height",u).attr("rx",p).attr("ry",p).attr("style",i),C.append("circle").attr("cx",0).attr("cy",g+c).attr("r",c).attr("style",i);Nt(t,C);const w=y+u/2;a.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${w-s.height/2-(s.y-(s.top??0))})`);const k=g+c,v=Math.asin(Math.min(1,(y-k)/c))*180/Math.PI,D=[..._r(0,-k,c,24,180+v,-v),..._r(-(-l/2+p),-(y+p),p,12,90,0),..._r(-(-l/2+p),-(d/2-p),p,12,360,270),..._r(-(l/2-p),-(d/2-p),p,12,270,180),..._r(-(l/2-p),-(y+p),p,12,180,90)];return t.intersect=function(M){return Tt.polygon(t,D,M)},n}b(yb,"person");var P4=b((e,t,r,i,n,s)=>[`M${e},${t+s}`,`a${n},${s} 0,0,0 ${r},0`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),O4=b((e,t,r,i,n,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),R4=b((e,t,r,i,n,s)=>[`M${e-r/2},${-i/2}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),kf=8,wf=8;async function xb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?24:n,a=t.look==="neo"?24:n,o=t.width??0;if(t.width&&(t.width=t.width-a,t.width<wf&&(t.width=wf)),t.height){const w=o/2/(2.5+o/50);t.height=t.height-s-w*3,t.height<kf&&(t.height=kf)}const{shapeSvg:l,bbox:c,label:h}=await It(e,t,Dt(t)),u=Math.max(t.width??0,c.width)+a,p=u/2,d=p/(2.5+u/50),g=Math.max(t.height??0,c.height)+s+d;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=Et.svg(l),w=O4(0,0,u,g,p,d),k=R4(0,d,u,g,p,d),v=Ft(t,{}),T=x.path(w,v),L=x.path(k,Ft(t,{fill:"none"}));y=l.insert(()=>L,":first-child"),y=l.insert(()=>T,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=P4(0,0,u,g,p,d);y=l.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",ve(C)).attr("style",i)}return y.attr("label-offset-y",d),y.attr("transform",`translate(${-u/2}, ${-(g/2+d)}
372)`),Nt(t,y),h.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(x){const w=Tt.rect(t,x),k=w.x-(t.x??0);if(p!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(w.y-(t.y??0))>(t.height??0)/2-d)){let v=d*d*(1-k*k/(p*p));v>0&&(v=Math.sqrt(v)),v=d-v,x.y-(t.y??0)>0&&(v=-v),w.y+=v}return w},l}b(xb,"cylinder");async function jn(e,t,r){const{labelStyles:i,nodeStyles:n}=Mt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a}=await It(e,t,Dt(t)),o=Math.max(a.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(a.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-o/2,h=-l/2;let u,{rx:p,ry:d}=t;const{cssStyles:g}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,d=r.ry),t.look==="handDrawn"){const y=Et.svg(s),C=Ft(t,{}),x=p||d?y.path(ar(c,h,o,l,p||0),C):y.rectangle(c,h,o,l,C);u=s.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",ve(g))}else u=s.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",ve(p)).attr("ry",ve(d)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return Nt(t,u,t.look==="handDrawn"?void 0:{width:o,height:l}),t.calcIntersect=function(y,C){return Tt.rect(y,C)},t.intersect=function(y){return Tt.rect(t,y)},s}b(jn,"drawRect");async function bb(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:n,padding:s,width:a,height:o}=t,l={rx:0,ry:0,labelPaddingX:i??(s??0)*2,labelPaddingY:n??s??0},c=await jn(e,t,l);if(t.look==="handDrawn"){const d=Et.svg(c),g=Ft(t,{}),y=c.select(".basic.label-container > path:nth-child(2)"),C=y.node();if(!C)return c;let x=null;if(C instanceof SVGGraphicsElement)x=C.getBBox();else return c;return c.insert(()=>d.line(x.x,x.y,x.x+x.width,x.y,g),".basic.label-container g.label"),c.insert(()=>d.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,g),".basic.label-container g.label"),y.remove(),c}const h=c.select(".basic.label-container"),u=(Number(h.attr("width"))||a)??0,p=(Number(h.attr("height"))||o)??0;return u>0&&p>0&&h.attr("stroke-dasharray",`${u} ${p}`),c}b(bb,"datastore");async function Cb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:o,label:l}=await It(e,t,Dt(t)),c=o.width+n,h=o.height+s,u=h*.2,p=-c/2,d=-h/2-u/2,{cssStyles:g}=t,y=Et.svg(a),C=Ft(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:p,y:d+u},{x:-p,y:d+u},{x:-p,y:-d},{x:p,y:-d},{x:p,y:d},{x:-p,y:d},{x:-p,y:d+u}],w=y.polygon(x.map(v=>[v.x,v.y]),C),k=a.insert(()=>w,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${p+(t.padding??0)/2-(o.x-(o.left??0))}, ${d+u+(t.padding??0)/2-(o.y-(o.top??0))})`),Nt(t,k),t.intersect=function(v){return Tt.rect(t,v)},a}b(Cb,"dividedRectangle");async function kb(e,t){var d,g;const{labelStyles:r,nodeStyles:i}=Mt(t),n=t.look==="neo"?12:5;t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,{shapeSvg:o,bbox:l}=await It(e,t,Dt(t)),c=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(a??0),h=c-n;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const y=Et.svg(o),C=Ft(t,{roughness:.2,strokeWidth:2.5}),x=Ft(t,{roughness:.2,strokeWidth:1.5}),w=y.circle(0,0,c*2,C),k=y.circle(0,0,h*2,x);u=o.insert("g",":first-child"),u.attr("class",ve(t.cssClasses)).attr("style",ve(p)),(d=u.node())==null||d.appendChild(w),(g=u.node())==null||g.appendChild(k)}else{u=o.insert("g",":first-child");const y=u.insert("circle",":first-child"),C=u.insert("circle");u.attr("class","basic label-container").attr("style",i),y.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),C.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return Nt(t,u),t.intersect=function(y){return et.info("DoubleCircle intersect",t,c,y),Tt.circle(t,c,y)},o}b(kb,"doublecircle");function wb(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=Mt(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",Dt(t)).attr("id",t.domId??t.id),a=7,{cssStyles:o}=t,l=Et.svg(s),{nodeBorder:c}=r,h=Ft(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,a*2,h),p=s.insert(()=>u,":first-child");return p.selectAll("path").attr("style",`fill: ${c} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),Nt(t,p),t.intersect=function(d){return et.info("filledCircle intersect",t,{radius:a,point:d}
372),Tt.circle(t,a,d)},s}b(wb,"filledCircle");var vf=10,Sf=10;async function vb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?n*2:n;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<vf&&(t.height=vf),t.width=((t==null?void 0:t.width)??0)-s-s/2,t.width<Sf&&(t.width=Sf));const{shapeSvg:a,bbox:o,label:l}=await It(e,t,Dt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:o.width)+(s??0),h=t!=null&&t.height?t==null?void 0:t.height:c+o.height,u=h,p=[{x:0,y:-h},{x:u,y:-h},{x:u/2,y:0}],{cssStyles:d}=t,g=Et.svg(a),y=Ft(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Zt(p),x=g.path(C,y),w=a.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),t.width=c,t.height=h,Nt(t,w),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-h/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(k){return et.info("Triangle intersect",t,p,k),Tt.polygon(t,p,k)},a}b(vb,"flippedTriangle");async function Sb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await It(e,t,Dt(t)),o=t.padding??12,l=Math.max(s.width+o*2,t.width??0,90),c=s.height+o*2,h=Math.max(Math.min(c*.16,14),8),u=Math.max(c+h,t.height??0),p=u-h,d=Math.max(l*.38,28),g=-u/2,y=[{x:-l/2,y:g},{x:-l/2+d,y:g},{x:-l/2+d,y:g+h},{x:l/2,y:g+h},{x:l/2,y:u/2},{x:-l/2,y:u/2}],C=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(v=>`L${v.x},${v.y}`),"Z"].join(" "),{cssStyles:x}=t;let w;if(t.look==="handDrawn"){const T=Et.svg(n).path(C,Ft(t,{}));w=n.insert(()=>T,":first-child").attr("class","basic label-container"),x&&w.attr("style",x)}else w=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?Nt(t,w):Nt(t,w,{width:l,height:u});const k=g+h+p/2;return a.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${k-s.height/2-(s.y-(s.top??0))})`),t.intersect=function(v){return Tt.polygon(t,y,v)},n}b(Sb,"folder");function Tb(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:s}=Mt(t);t.label="";const a=e.insert("g").attr("class",Dt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*l/2,u=-1*c/2,p=Et.svg(a),d=Ft(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=p.rectangle(h,u,l,c,d),y=a.insert(()=>g,":first-child");o&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",o),s&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",s),Nt(t,y);const C=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=C/2||0,t.height+=C/2||0),t.intersect=function(x){return Tt.rect(t,x)},a}b(Tb,"forkJoin");async function _b(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=15,s=10,a=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-o*2,t.height<s&&(t.height=s),t.width=((t==null?void 0:t.width)??0)-a*2,t.width<n&&(t.width=n));const{shapeSvg:l,bbox:c}=await It(e,t,Dt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:Math.max(n,c.width))+a*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(s,c.height))+o*2,p=u/2,{cssStyles:d}=t,g=Et.svg(l),y=Ft(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-h/2,y:-u/2},{x:h/2-p,y:-u/2},..._r(-h/2+p,0,p,50,90,270),{x:h/2-p,y:u/2},{x:-h/2,y:u/2}],x=Zt(C),w=g.path(x,y),k=l.insert(()=>w,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Nt(t,k),t.intersect=function(v){return et.info("Pill intersect",t,{radius:p,point:v}),Tt.polygon(t,C,v)},l}b(_b,"halfRoundedRectangle");var q4=b((e,t,r,i,n)=>[`M${e+n}
372,${t}`,`L${e+r-n},${t}`,`L${e+r},${t-i/2}`,`L${e+r-n},${t-i}`,`L${e+n},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Bb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t),n=t.look==="neo"?3.5:4;t.labelStyle=r;const s=t.padding??0,a=70,o=32,l=t.look==="neo"?a:s,c=t.look==="neo"?o:s;if(t.width||t.height){const k=(t.height??0)/n;t.width=((t==null?void 0:t.width)??0)-2*k-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:u}=await It(e,t,Dt(t)),p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=p/n,g=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+c,y=[{x:d,y:0},{x:g-d,y:0},{x:g,y:-p/2},{x:g-d,y:-p},{x:d,y:-p},{x:0,y:-p/2}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const w=Et.svg(h),k=Ft(t,{}),v=q4(0,0,g,p,d),T=w.path(v,k);C=h.insert(()=>T,":first-child").attr("transform",`translate(${-g/2}, ${p/2})`),x&&C.attr("style",x)}else C=jr(h,g,p,y);return i&&C.attr("style",i),t.width=g,t.height=p,Nt(t,C),t.intersect=function(w){return Tt.polygon(t,y,w)},h}b(Bb,"hexagon");async function Lb
vendor: 12,329 bytes, line 372
372(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await It(e,t,Dt(t)),s=Math.max(30,(t==null?void 0:t.width)??0),a=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:o}=t,l=Et.svg(n),c=Ft(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:s,y:0},{x:0,y:a},{x:s,y:a}],u=Zt(h),p=l.path(u,c),d=n.insert(()=>p,":first-child");return d.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-s/2}, ${-a/2})`),Nt(t,d),t.intersect=function(g){return et.info("Pill intersect",t,{points:h}),Tt.polygon(t,h,g)},n}b(Lb,"hourglass");async function Ab(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=Mt(t);t.labelStyle=n;const s=t.assetHeight??48,a=t.assetWidth??48,o=Math.max(s,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await It(e,t,"icon-shape default"),p=t.pos==="t",d=o,g=o,{nodeBorder:y}=r,{stylesMap:C}=$n(t),x=-g/2,w=-d/2,k=t.label?8:0,v=Et.svg(c),T=Ft(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const L=v.rectangle(x,w,g,d,T),D=Math.max(g,h.width),M=d+h.height+k,W=v.rectangle(-D/2,-M/2,D,M,{...T,fill:"transparent",stroke:"none"}),E=c.insert(()=>L,":first-child"),N=c.insert(()=>W);if(t.icon){const z=c.append("g");z.html(`<g>${await Ks(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const O=z.node().getBBox(),I=O.width,j=O.height,A=O.x,R=O.y;z.attr("transform",`translate(${-I/2-A},${p?h.height/2+k/2-j/2-R:-h.height/2-k/2-j/2-R})`),z.attr("style",`color: ${C.get("stroke")??y};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-M/2:M/2-h.height})`),E.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),Nt(t,N),t.intersect=function(z){if(et.info("iconSquare intersect",t,z),!t.label)return Tt.rect(t,z);const O=t.x??0,I=t.y??0,j=t.height??0;let A=[];return p?A=[{x:O-h.width/2,y:I-j/2},{x:O+h.width/2,y:I-j/2},{x:O+h.width/2,y:I-j/2+h.height+k},{x:O+g/2,y:I-j/2+h.height+k},{x:O+g/2,y:I+j/2},{x:O-g/2,y:I+j/2},{x:O-g/2,y:I-j/2+h.height+k},{x:O-h.width/2,y:I-j/2+h.height+k}]:A=[{x:O-g/2,y:I-j/2},{x:O+g/2,y:I-j/2},{x:O+g/2,y:I-j/2+d},{x:O+h.width/2,y:I-j/2+d},{x:O+h.width/2/2,y:I+j/2},{x:O-h.width/2,y:I+j/2},{x:O-h.width/2,y:I-j/2+d},{x:O-g/2,y:I-j/2+d}],Tt.polygon(t,A,z)},c}b(Ab,"icon");async function Fb(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=Mt(t);t.labelStyle=n;const s=t.assetHeight??48,a=t.assetWidth??48,o=Math.max(s,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await It(e,t,"icon-shape default"),p=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:y,mainBkg:C}=r,{stylesMap:x}=$n(t),w=Et.svg(c),k=Ft(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=x.get("fill");k.stroke=v??C;const T=c.append("g");t.icon&&T.html(`<g>${await Ks(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const L=T.node().getBBox(),D=L.width,M=L.height,W=L.x,E=L.y,N=Math.max(D,M)*Math.SQRT2+p*2,z=w.circle(0,0,N,k),O=Math.max(N,h.width),I=N+h.height+d,j=w.rectangle(-O/2,-I/2,O,I,{...k,fill:"transparent",stroke:"none"}),A=c.insert(()=>z,":first-child"),R=c.insert(()=>j);return T.attr("transform",`translate(${-D/2-W},${g?h.height/2+d/2-M/2-E:-h.height/2-d/2-M/2-E})`),T.attr("style",`color: ${x.get("stroke")??y};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-I/2:I/2-h.height})`),A.attr("transform",`translate(0,${g?h.height/2+d/2:-h.height/2-d/2})`),Nt(t,R),t.intersect=function(H){return et.info("iconSquare intersect",t,H),Tt.rect(t,H)},c}b(Fb,"iconCircle");async function Eb(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=Mt(t);t.labelStyle=n;const s=t.assetHeight??48,a=t.assetWidth??48,o=Math.max(s,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:p}=await It(e,t,"icon-shape default"),d=t.pos==="t",g=o+u*2,y=o+u*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:w}=$n(t),k=-y/2,v=-g/2,T=t.label?8:0,L=Et.svg(c),D=Ft(t,{});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");const M=w.get("fill");D.stroke=M??x;const W=L.path(ar(k,v,y,g,5),D),E=Math.max(y,h.width),N=g+h.height+T,z=L.rectangle(-E/2,-N/2,E,N,{...D,fill:"transparent",stroke:"none"}),O=c.insert(()=>W,":first-child").attr("class","icon-shape2"),I=c.insert(()=>z);if(t.icon){const j=c.append("g");j.html(`<g>${await Ks(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const A=j.node().getBBox(),R=A.width,H=A.height,q=A.x,_=A.y;j.attr("transform",`translate(${-R/2-q},${d?h.height/2+T/2-H/2-_:-h.height/2-T/2-H/2-_})`),j.attr("style",`color: ${w.get("stroke")??C};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-N/2:N/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+T/2:-h.height/2-T/2})`),Nt(t,I),t.intersect=function(j){if(et.info("iconSquare intersect",t,j),!t.label)return Tt.rect(t,j);const A=t.x??0,R=t.y??0,H=t.height??0;let q=[];return d?q=[{x:A-h.width/2,y:R-H/2},{x:A+h.width/2,y:R-H/2},{x:A+h.width/2,y:R-H/2+h.height+T},{x:A+y/2,y:R-H/2+h.height+T},{x:A+y/2,y:R+H/2},{x:A-y/2,y:R+H/2},{x:A-y/2,y:R-H/2+h.height+T},{x:A-h.width/2,y:R-H/2+h.height+T}]:q=[{x:A-y/2,y:R-H/2},{x:A+y/2,y:R-H/2},{x:A+y/2,y:R-H/2+g},{x:A+h.width/2,y:R-H/2+g},{x:A+h.width/2/2,y:R+H/2},{x:A-h.width/2,y:R+H/2},{x:A-h.width/2,y:R-H/2+g},{x:A-y/2,y:R-H/2+g}],Tt.polygon(t,q,j)},c}b(Eb,"iconRounded");async function Nb(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=Mt(t);t.labelStyle=n;const s=t.assetHeight??48,a=t.assetWidth??48,o=Math.max(s,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:p}=await It(e,t,"icon-shape default"),d=t.pos==="t",g=o+u*2,y=o+u*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:w}=$n(t),k=-y/2,v=-g/2,T=t.label?8:0,L=Et.svg(c),D=Ft(t,{});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");const M=w.get("fill");D.stroke=M??x;const W=L.path(ar(k,v,y,g,.1),D),E=Math.max(y,h.width),N=g+h.height+T,z=L.rectangle(-E/2,-N/2,E,N,{...D,fill:"transparent",stroke:"none"}),O=c.insert(()=>W,":first-child"),I=c.insert(()=>z);if(t.icon){const j=c.append("g");j.html(`<g>${await Ks(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const A=j.node().getBBox(),R=A.width,H=A.height,q=A.x,_=A.y;j.attr("transform",`translate(${-R/2-q},${d?h.height/2+T/2-H/2-_:-h.height/2-T/2-H/2-_})`),j.attr("style",`color: ${w.get("stroke")??C};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-N/2:N/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+T/2:-h.height/2-T/2})`),Nt(t,I),t.intersect=function(j){if(et.info("iconSquare intersect",t,j),!t.label)return Tt.rect(t,j);const A=t.x??0,R=t.y??0,H=t.height??0;let q=[];return d?q=[{x:A-h.width/2,y:R-H/2},{x:A+h.width/2,y:R-H/2},{x:A+h.width/2,y:R-H/2+h.height+T},{x:A+y/2,y:R-H/2+h.height+T},{x:A+y/2,y:R+H/2},{x:A-y/2,y:R+H/2},{x:A-y/2,y:R-H/2+h.height+T},{x:A-h.width/2,y:R-H/2+h.height+T}]:q=[{x:A-y/2,y:R-H/2},{x:A+y/2,y:R-H/2},{x:A+y/2,y:R-H/2+g},{x:A+h.width/2,y:R-H/2+g},{x:A+h.width/2/2,y:R+H/2},{x:A-h.width/2,y:R+H/2},{x:A-h.width/2,y:R-H/2+g},{x:A-y/2,y:R-H/2+g}],Tt.polygon(t,q,j)},c}b(Nb,"iconSquare");async function Mb(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/s;const{labelStyles:a}=Mt(t);t.labelStyle=a;const o=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?o??0:0,(t==null?void 0:t.assetWidth)??n),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??s;t.width=Math.max(c,o??0);const{shapeSvg:u,bbox:p,label:d}=await It(e,t,"image-shape default"),g=t.pos==="t",y=-c/2,C=-h/2,x=t.label?8:0,w=Et.svg(u),k=Ft(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=w.rectangle(y,C,c,h,k),T=Math.max(c,p.width),L=h+p.height+x,D=w.rectangle(-T/2,-L/2,T,L,{...k,fill:"none",stroke:"none"}),M=u.insert(()=>v,":first-child"),W=u.insert(()=>D);if(t.img){const E=u.append("image");E.attr("href",t.img),E.attr("width",c),E.attr("height",h),E.attr("preserveAspectRatio","none"),E.attr("transform",`translate(${-c/2},${g?L/2-h:-L/2})`)}return d.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${g?-h/2-p.height/2-x/2:h/2-p.height/2+x/2})`),M.attr("transform",`translate(0,${g?p.height/2+x/2:-p.height/2-x/2})`),Nt(t,W),t.intersect=function(E){if(et.info("iconSquare intersect",t,E),!t.label)return Tt.rect(t,E);const N=t.x??0,z=t.y??0,O=t.height??0;let I=[];return g?I=[{x:N-p.width/2,y:z-O/2},{x:N+p.width/2,y:z-O/2},{x:N+p.width/2,y:z-O/2+p.height+x},{x:N+c/2,y:z-O/2+p.height+x},{x:N+c/2,y:z+O/2},{x:N-c/2,y:z+O/2},{x:N-c/2,y:z-O/2+p.height+x},{x:N-p.width/2,y:z-O/2+p.height+x}]:I=[{x:N-c/2,y:z-O/2},{x:N+c/2,y:z-O/2},{x:N+c/2,y:z-O/2+h},{x:N+p.width/2,y:z-O/2+h},{x:N+p.width/2/2,y:z+O/2},{x:N-p.width/2,y:z+O/2},{x:N-p.width/2,y:z-O/2+h},{x:N-c/2,y:z-O/2+h}],Tt.polygon(t,I,E)},u}b(Mb,"imageSquare");async function $b(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=n,a=t.look==="neo"?n*2:n,{shapeSvg:o,bbox:l}=await It(e,t,Dt(t)),c=Math.max(l.height+s*2,t.height??0),h=Math.max(l.width+a*2,(t.width??0)-c),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=Et.svg(o),y=Ft(t,{}),C=Zt(u),x=g.path(C,y);p=o.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=jr(o,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,Nt(t,p),t.intersect=function(g){return Tt.polygon(t,u,g)},o}b($b,"inv_trapezoid");async function jb(e,t){const{shapeSvg:r,bbox:i,label:n}=await It(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Nt(t,s),t.intersect=function(l){return Tt.rect(t,l)},r}b(jb,"labelRect");async function Ib(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=n,a=t.look==="neo"?n*2:n,{shapeSvg:o,bbox:l}=await It(e,t,Dt(t)),c=Math.max(l.height+s,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),u=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=Et.svg(o),y=Ft(t,{}),C=Zt(u),x=g.path(C,y);p=o.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=jr(o,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,Nt(t,p),t.intersect=function(g){return Tt.polygon(t,u,g)},o}b(Ib,"lean_left");async function Db(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=n,a=t.look==="neo"?n*2:n,{shapeSvg:o,bbox:l}=await It(e,t,Dt(t)),c=Math.max(l.height+s,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=Et.svg(o),y=Ft(t,{}),C=Zt(u),x=g.path(C,y);p=o.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=jr(o,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,Nt(t,p),t.intersect=function(g){return Tt.polygon(t,u,g)},o}b(Db,"lean_right");function Pb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",Dt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(35,(t==null?void 0:t.width)??0),o=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:a,y:0},{x:0,y:o+l/2},{x:a-2*l,y:o+l/2},{x:0,y:2*o},{x:a,y:o-l/2},{x:2*l,y:o-l/2}],h=Et.svg(n),u=Ft(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=Zt(c),d=h.path(p,u),g=n.insert(()=>d,":first-child");return 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),g.attr("transform",`translate(-${a/2},${-o}
372)`),Nt(t,g),t.intersect=function(y){return et.info("lightningBolt intersect",t,y),Tt.polygon(t,c,y)},n}b(Pb,"lightningBolt");var z4=b((e,t,r,i,n,s,a)=>[`M${e},${t+s}`,`a${n},${s} 0,0,0 ${r},0`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),W4=b((e,t,r,i,n,s,a)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),H4=b((e,t,r,i,n,s)=>[`M${e-r/2},${-i/2}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Tf=10,_f=10;async function Ob(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?24:n;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-s,t.width<_f&&(t.width=_f);const k=x/2/(2.5+x/50);t.height=(t.height??0)-a-k*3,t.height<Tf&&(t.height=Tf)}const{shapeSvg:o,bbox:l,label:c}=await It(e,t,Dt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,u=h/2,p=u/(2.5+h/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+p+a*2,g=d*.1;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=Et.svg(o),w=W4(0,0,h,d,u,p,g),k=H4(0,p,h,d,u,p),v=Ft(t,{}),T=x.path(w,v),L=x.path(k,v);o.insert(()=>L,":first-child").attr("class","line"),y=o.insert(()=>T,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=z4(0,0,h,d,u,p,g);y=o.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",ve(C)).attr("style",i)}return y.attr("label-offset-y",p),y.attr("transform",`translate(${-h/2}, ${-(d/2+p)})`),Nt(t,y),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(x){const w=Tt.rect(t,x),k=w.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(w.y-(t.y??0))>(t.height??0)/2-p)){let v=p*p*(1-k*k/(u*u));v>0&&(v=Math.sqrt(v)),v=p-v,x.y-(t.y??0)>0&&(v=-v),w.y+=v}return w},o}b(Ob,"linedCylinder");async function Rb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n;if(t.width||t.height){const v=t.width;t.width=(v??0)*10/11-s*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:o,bbox:l,label:c}=await It(e,t,Dt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(s??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(a??0)*2,p=t.look==="neo"?u/4:u/8,d=u+p,{cssStyles:g}=t,y=Et.svg(o),C=Ft(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-h/2-h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:d/2},...di(-h/2-h/2*.1,d/2,h/2+h/2*.1,d/2,p,.8),{x:h/2+h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:-d/2},{x:-h/2,y:-d/2},{x:-h/2,y:d/2*1.1},{x:-h/2,y:-d/2}],w=y.polygon(x.map(v=>[v.x,v.y]),C),k=o.insert(()=>w,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-p/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),Nt(t,k),t.intersect=function(v){return Tt.polygon(t,x,v)},o}b(Rb,"linedWaveEdgedRect");async function qb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n,o=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-2*o,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-2*o,10));const{shapeSvg:l,bbox:c,label:h}=await It(e,t,Dt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+s*2+2*o,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+a*2+2*o,d=u-2*o,g=p-2*o,y=-d/2,C=-g/2,{cssStyles:x}=t,w=Et.svg(l),k=Ft(t,{}),v=[{x:y-o,y:C+o},{x:y-o,y:C+g+o},{x:y+d-o,y:C+g+o},{x:y+d-o,y:C+g},{x:y+d,y:C+g},{x:y+d,y:C+g-o},{x:y+d+o,y:C+g-o},{x:y+d+o,y:C-o},{x:y+o,y:C-o},{x:y+o,y:C},{x:y,y:C},{x:y,y:C+o}],T=[{x:y,y:C+o},{x:y+d-o,y:C+o},{x:y+d-o,y:C+g},{x:y+d,y:C+g},{x:y+d,y:C},{x:y,y:C}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const L=Zt(v);let D=w.path(L,k);const M=Zt(T);let W=w.path(M,k);t.look!=="handDrawn"&&(D=rh(D),W=rh(W));const E=l.insert("g",":first-child");return E.insert(()=>D),E.insert(()=>W),E.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-o-(c.x-(c.left??0))}, ${-(c.height/2)+o-(c.y-(c.top??0))}
372)`),Nt(t,E),t.intersect=function(N){return Tt.polygon(t,v,N)},l}b(qb,"multiRect");async function zb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await It(e,t,Dt(t)),o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o;let h=!0;(t.width||t.height)&&(h=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-c*3);const u=Math.max(s.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(s.height,(t==null?void 0:t.height)??0)+c*3,d=t.look==="neo"?p/4:p/8,g=p+(h?d/2:-d/2),y=-u/2,C=-g/2,x=10,{cssStyles:w}=t,k=di(y-x,C+g+x,y+u-x,C+g+x,d,.8),v=k==null?void 0:k[k.length-1],T=[{x:y-x,y:C+x},{x:y-x,y:C+g+x},...k,{x:y+u-x,y:v.y-x},{x:y+u,y:v.y-x},{x:y+u,y:v.y-2*x},{x:y+u+x,y:v.y-2*x},{x:y+u+x,y:C-x},{x:y+x,y:C-x},{x:y+x,y:C},{x:y,y:C},{x:y,y:C+x}],L=[{x:y,y:C+x},{x:y+u-x,y:C+x},{x:y+u-x,y:v.y-x},{x:y+u,y:v.y-x},{x:y+u,y:C},{x:y,y:C}],D=Et.svg(n),M=Ft(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const W=Zt(T),E=D.path(W,M),N=Zt(L),z=D.path(N,M),O=n.insert(()=>E,":first-child");return O.insert(()=>z),O.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",w),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(0,${-d/2})`),a.attr("transform",`translate(${-(s.width/2)-x-(s.x-(s.left??0))}, ${-(s.height/2)+x-d/2-(s.y-(s.top??0))})`),Nt(t,O),t.intersect=function(I){return Tt.polygon(t,T,I)},n}b(zb,"multiWaveEdgedRectangle");async function Wb(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=Mt(t);t.labelStyle=i,t.useHtmlLabels||Ie(me())||(t.centerLabel=!0);const{shapeSvg:a,bbox:o,label:l}=await It(e,t,Dt(t)),c=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-c/2,p=-h/2,{cssStyles:d}=t,g=Et.svg(a),y=Ft(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=g.rectangle(u,p,c,h,y),x=a.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Nt(t,x),t.intersect=function(w){return Tt.rect(t,w)},a}b(Wb,"note");var U4=b((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Hb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await It(e,t,Dt(t)),a=s.width+(t.padding??0),o=s.height+(t.padding??0),l=a+o,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=Et.svg(n),g=Ft(t,{}),y=U4(0,0,l),C=d.path(y,g);u=n.insert(()=>C,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),p&&u.attr("style",p)}else u=jr(n,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),Nt(t,u),t.calcIntersect=function(d,g){const y=d.width,C=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],x=Tt.polygon(d,C,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},n}b(Hb,"question");async function Ub(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?21:n??0,a=t.look==="neo"?12:n??0,{shapeSvg:o,bbox:l,label:c}=await It(e,t,Dt(t)),h=l.width+(t.look==="neo"?s*2:s),u=Math.max(l.height+(t.look==="neo"?a*2:a),t.height??0),p=u/4,g=-Math.max(h,(t.width??0)-p)/2,y=-u/2,C=y/2,x=[{x:g+C,y},{x:g,y:0},{x:g+C,y:-y},{x:-g,y:-y},{x:-g,y}],{cssStyles:w}=t,k=Et.svg(o),v=Ft(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const T=Zt(x),L=k.path(T,v),D=o.insert(()=>L,":first-child");return D.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",w),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${-C/2},0)`),c.attr("transform",`translate(${-C/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))}
372)`),Nt(t,D),t.intersect=function(M){return Tt.polygon(t,x,M)},o}b(Ub,"rect_left_inv_arrow");async function Yb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const s=e.insert("g").attr("class",n).attr("id",t.domId||t.id),a=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await ni(o,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(Ie(Gt())){const M=h.children[0],W=Yt(h);u=M.getBoundingClientRect(),W.attr("width",u.width),W.attr("height",u.height)}et.info("Text 2",l);const p=l||[],d=h.getBBox(),g=await ni(o,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),y=g.children[0],C=Yt(g);u=y.getBoundingClientRect(),C.attr("width",u.width),C.attr("height",u.height);const x=(t.padding||0)/2;Yt(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),Yt(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const w=u.width+(t.padding||0),k=u.height+(t.padding||0),v=-u.width/2-x,T=-u.height/2-x;let L,D;if(t.look==="handDrawn"){const M=Et.svg(s),W=Ft(t,{}
372),E=M.path(ar(v,T,w,k,t.rx||0),W),N=M.line(-u.width/2-x,-u.height/2-x+d.height+x,u.width/2+x,-u.height/2-x+d.height+x,W);D=s.insert(()=>(et.debug("Rough node insert CXC",E),N),":first-child"),L=s.insert(()=>(et.debug("Rough node insert CXC",E),E),":first-child")}else L=a.insert("rect",":first-child"),D=a.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),D.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+d.height+x).attr("y2",-u.height/2-x+d.height+x);return Nt(t,L),t.intersect=function(M){return Tt.rect(t,M)},s}b(Yb,"rectWithTitle");async function Vb(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,n={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return jn(e,t,n)}b(Vb,"roundedRect");var mi=8;async function Gb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:o,label:l}=await It(e,t,Dt(t)),c=((t==null?void 0:t.width)??o.width)+n*2+(t.look==="neo"?mi:mi*2),h=((t==null?void 0:t.height)??o.height)+s*2,u=c-mi,p=h,d=mi-c/2,g=-h/2,{cssStyles:y}=t,C=Et.svg(a),x=Ft(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const w=[{x:d,y:g},{x:d+u,y:g},{x:d+u,y:g+p},{x:d-mi,y:g+p},{x:d-mi,y:g},{x:d,y:g},{x:d,y:g+p}],k=C.polygon(w.map(T=>[T.x,T.y]),x),v=a.insert(()=>k,":first-child");return v.attr("class","basic label-container outer-path").attr("style",ve(y)),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),l.attr("transform",`translate(${mi/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Nt(t,v),t.intersect=function(T){return Tt.rect(t,T)},a}b(Gb,"shadedProcess");async function Xb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-a*2,10));const{shapeSvg:o,bbox:l,label:c}=await It(e,t,Dt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+a*2)*1.5,p=h,d=u/1.5,g=-p/2,y=-d/2,{cssStyles:C}=t,x=Et.svg(o),w=Ft(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const k=[{x:g,y},{x:g,y:y+d},{x:g+p,y:y+d},{x:g+p,y:y-d/2}],v=Zt(k),T=x.path(v,w),L=o.insert(()=>T,":first-child");return L.attr("class","basic label-container  outer-path"),C&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",C),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(0, ${d/4})`),c.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),Nt(t,L),t.intersect=function(D){return Tt.polygon(t,k,D)},o}b(Xb,"slopedRect");async function Qb(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,n=t.look==="neo"?12:r,s={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:n};return jn(e,t,s)}b(Qb,"squareRect");async function Kb(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?20:n,a=t.look==="neo"?12:n,{shapeSvg:o,bbox:l}=await It(e,t,Dt(t)),c=l.height+(t.look==="neo"?a*2:a),h=l.width+c/4+(t.look==="neo"?s*2:s),u=c/2,{cssStyles:p}=t,d=Et.svg(o),g=Ft(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-h/2+u,y:-c/2},{x:h/2-u,y:-c/2},..._r(-h/2+u,0,u,50,90,270),{x:h/2-u,y:c/2},..._r(h/2-u,0,u,50,270,450)],C=Zt(y),x=d.path(C,g),w=o.insert(()=>x,":first-child");return w.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),Nt(t,w),t.intersect=function(k){return Tt.polygon(t,y,k)},o}b(Kb,"stadium");async function Zb(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return jn(e,t,r)}b(Zb,"state");function Jb(e,t,{config:{themeVariables:r}}){var w,k;const{labelStyles:i,nodeStyles:n}=Mt(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:a,stateBorder:o,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=Et.svg(h),p=Ft(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=u.circle(0,0,t.width,{...p,stroke:a,strokeWidth:2}
372),g=o??l,y=(t.width??0)*5/14,C=u.circle(0,0,y,{...p,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),x=h.insert(()=>d,":first-child");if(x.insert(()=>C),t.look!=="handDrawn"&&x.attr("class","outer-path"),s&&x.selectAll("path").attr("style",s),n&&x.selectAll("path").attr("style",n),t.width<25&&c&&t.look!=="handDrawn"){const v=((k=(w=e.node())==null?void 0:w.ownerSVGElement)==null?void 0:k.id)??"",T=v?`${v}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${T})`)}return Nt(t,x),t.intersect=function(v){return Tt.circle(t,(t.width??0)/2,v)},h}b(Jb,"stateEnd");function t1(e,t,{config:{themeVariables:r}}){var o,l;const{lineColor:i,nodeShadow:n}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const h=Et.svg(s).circle(0,0,t.width,UN(i));a=s.insert(()=>h),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=s.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&n&&t.look!=="handDrawn"){const c=((l=(o=e.node())==null?void 0:o.ownerSVGElement)==null?void 0:l.id)??"",h=c?`${c}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${h})`)}return Nt(t,a),t.intersect=function(c){return Tt.circle(t,(t.width??7)/2,c)},s}b(t1,"stateStart");var Ki=8;async function e1(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=(t==null?void 0:t.padding)??8,s=t.look==="neo"?28:n,a=t.look==="neo"?12:n,{shapeSvg:o,bbox:l}=await It(e,t,Dt(t)),c=Math.max(l.width+2*Ki+s,t.width??0),h=Math.max(l.height+a,t.height??0),u=c-2*Ki,p=h,d=-c/2,g=-h/2,y=[{x:0,y:0},{x:u,y:0},{x:u,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){const C=Et.svg(o),x=Ft(t,{}),w=C.rectangle(d,g,u+16,p,x),k=C.line(d+Ki,g,d+Ki,g+p,x),v=C.line(d+Ki+u,g,d+Ki+u,g+p,x);o.insert(()=>k,":first-child"),o.insert(()=>v,":first-child");const T=o.insert(()=>w,":first-child"),{cssStyles:L}=t;T.attr("class","basic label-container").attr("style",ve(L)),Nt(t,T)}else{const C=jr(o,u,p,y);i&&C.attr("style",i),Nt(t,C)}return t.intersect=function(C){return Tt.polygon(t,y,C)},o}b(e1,"subroutine");var $l=.2;async function r1(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-a*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-$l*(t.height+a*2),10));const{shapeSvg:o,bbox:l}=await It(e,t,Dt(t)),c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+a*2,h=$l*c,u=$l*c,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2+h-h,g=c,y=-d/2,C=-g/2,{cssStyles:x}=t,w=Et.svg(o),k=Ft(t,{}),v=[{x:y-h/2,y:C},{x:y+d+h/2,y:C},{x:y+d+h/2,y:C+g},{x:y-h/2,y:C+g}],T=[{x:y+d-h/2,y:C+g},{x:y+d+h/2,y:C+g},{x:y+d+h/2,y:C+g-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const L=Zt(v),D=w.path(L,k),M=Zt(T),W=w.path(M,{...k,fillStyle:"solid"}),E=o.insert(()=>W,":first-child");return E.insert(()=>D,":first-child"),E.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),Nt(t,E),t.intersect=function(N){return Tt.polygon(t,v,N)},o}
372b(r1,"taggedRect");async function i1(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await It(e,t,Dt(t)),o=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=.2*o,u=.2*l,p=l+c,{cssStyles:d}=t,g=Et.svg(n),y=Ft(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-o/2-o/2*.1,y:p/2},...di(-o/2-o/2*.1,p/2,o/2+o/2*.1,p/2,c,.8),{x:o/2+o/2*.1,y:-p/2},{x:-o/2-o/2*.1,y:-p/2}],x=-o/2+o/2*.1,w=-p/2-u*.4,k=[{x:x+o-h,y:(w+l)*1.3},{x:x+o,y:w+l-u},{x:x+o,y:(w+l)*.9},...di(x+o,(w+l)*1.25,x+o-h,(w+l)*1.3,-l*.02,.5)],v=Zt(C),T=g.path(v,y),L=Zt(k),D=g.path(L,{...y,fillStyle:"solid"}),M=n.insert(()=>D,":first-child");return M.insert(()=>T,":first-child"),M.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-o/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),Nt(t,M),t.intersect=function(W){return Tt.polygon(t,C,W)},n}b(i1,"taggedWaveEdgedRectangle");async function n1(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await It(e,t,Dt(t)),a=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)||0),o=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-a/2,c=-o/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",o),Nt(t,h),t.intersect=function(u){return Tt.rect(t,u)},n}b(n1,"text");var Y4=b((e,t,r,i,n,s)=>`M${e},${t}
373    a${n},${s} 0,0,1 0,${-i}
374    l${r},0
375    a${n},${s} 0,0,1 0,${i}
376    M${r},${-i}
377    a${n},${s} 0,0,0 0,${i}
378    l${-r},0`,"createCylinderPathD"),V4=b((e,t,r,i,n,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),G4=b((e,t,r,i,n,s)=>[`M${e+r/2},${-i/2}`,`a${n},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Bf=5,Lf=10;async function s1(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?12:n/2,a=t.height??0;if(t.height&&(t.height=t.height-s,t.height<Bf&&(t.height=Bf)),t.width){const x=a/2/(2.5+a/50);t.width=t.width-s-x*3,t.width<Lf&&(t.width=Lf)}const{shapeSvg:o,bbox:l,label:c}=await It(e,t,Dt(t)),h=Math.max(t.height??0,l.height)+s,u=h/2,p=u/(2.5+h/50),d=Math.max(t.width??0,l.width)+p+s,{cssStyles:g}=t;let y;if(t.look==="handDrawn"){const C=Et.svg(o),x=V4(0,0,d,h,p,u),w=G4(0,0,d,h,p,u),k=C.path(x,Ft(t,{})),v=C.path(w,Ft(t,{fill:"none"}));y=o.insert(()=>v,":first-child"),y=o.insert(()=>k,":first-child"),y.attr("class","basic label-container"),g&&y.attr("style",g)}else{const C=Y4(0,0,d,h,p,u);y=o.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",ve(g)).attr("style",i),y.attr("class","basic label-container outer-path"),g&&y.selectAll("path").attr("style",g),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",p),y.attr("transform",`translate(${-d/2}, ${h/2} )`),c.attr("transform",`translate(${-(l.width/2)-p-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Nt(t,y),t.intersect=function(C){const x=Tt.rect(t,C),w=x.y-(t.y??0);if(u!=0&&(Math.abs(w)<(t.height??0)/2||Math.abs(w)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-p)){let k=p*p*(1-w*w/(u*u));k!=0&&(k=Math.sqrt(Math.abs(k))),k=p-k,C.x-(t.x??0)>0&&(k=-k),x.x+=k}return x},o}b(s1,"tiltedCylinder");async function a1(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=(t.look==="neo",n),a=t.look==="neo"?n*2:n,{shapeSvg:o,bbox:l}=await It(e,t,Dt(t)),c=Math.max(l.height+s,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=Et.svg(o),y=Ft(t,{}),C=Zt(u),x=g.path(C,y);p=o.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=jr(o,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,Nt(t,p),t.intersect=function(g){return Tt.polygon(t,u,g)},o}b(a1,"trapezoid");async function o1(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n,o=15,l=5;
378(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-s*2,t.width<o&&(t.width=o));const{shapeSvg:c,bbox:h}=await It(e,t,Dt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+s*2,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+a*2,{cssStyles:d}=t,g=Et.svg(c),y=Ft(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-u/2*.8,y:-p/2},{x:u/2*.8,y:-p/2},{x:u/2,y:-p/2*.6},{x:u/2,y:p/2},{x:-u/2,y:p/2},{x:-u/2,y:-p/2*.6}],x=Zt(C),w=g.path(x,y),k=c.insert(()=>w,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Nt(t,k),t.intersect=function(v){return Tt.polygon(t,C,v)},c}b(o1,"trapezoidalPentagon");var Af=10,Ff=10;async function l1(e,t){var v;const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?n*2:n;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-s)/2,t.width<Ff&&(t.width=Ff),t.height=(t==null?void 0:t.height)??0,t.height<Af&&(t.height=Af));const{shapeSvg:a,bbox:o,label:l}=await It(e,t,Dt(t)),c=Mr((v=Gt().flowchart)==null?void 0:v.htmlLabels),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+s,u=t!=null&&t.height?t==null?void 0:t.height:h+o.height,p=u,d=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-u}],{cssStyles:g}=t,y=Et.svg(a),C=Ft(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Zt(d),w=y.path(x,C),k=a.insert(()=>w,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=h,t.height=u,Nt(t,k),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${u/2-(o.height+(t.padding??0)/(c?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(T){return et.info("Triangle intersect",t,d,T),Tt.polygon(t,d,T)},a}b(l1,"triangle");async function c1(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n;let o=!0;(t.width||t.height)&&(o=!1,t.width=((t==null?void 0:t.width)??0)-s*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await It(e,t,Dt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(s??0)*2,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(a??0)*2,d=t.look==="neo"?p/4:p/8,g=p+(o?d:-d),{cssStyles:y}=t,x=14-u,w=x>0?x/2:0,k=Et.svg(l),v=Ft(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const T=[{x:-u/2-w,y:g/2},...di(-u/2-w,g/2,u/2+w,g/2,d,.8),{x:u/2+w,y:-g/2},{x:-u/2-w,y:-g/2}],L=Zt(T),D=k.path(L,v),M=l.insert(()=>D,":first-child");return M.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(0,${-d/2})`),h.attr("transform",`translate(${-u/2+(t.padding??0)-(c.x-(c.left??0))},${-p/2+(t.padding??0)-d-(c.y-(c.top??0))})`),Nt(t,M),t.intersect=function(W){return Tt.polygon(t,T,W)},l}b(c1,"waveEdgedRectangle");async function h1(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?20:n;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const v=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-v*(20/9)),t.width=t.width-s*2}const{shapeSvg:o,bbox:l}=await It(e,t,Dt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+a,u=h/8,p=h+u*2,{cssStyles:d}=t,g=Et.svg(o),y=Ft(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2,y:p/2},...di(-c/2,p/2,c/2,p/2,u,1),{x:c/2,y:-p/2},...di(c/2,-p/2,-c/2,-p/2,u,-1)],x=Zt(C),w=g.path(x,y),k=o.insert(()=>w,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),Nt(t,k),t.intersect=function(v){return Tt.polygon(t,C,v)},o}b(h1,"waveRectangle");var ye=10;async function u1(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-n*2-ye,10),t.height=Math.max(((t==null?void 0:t.height)??0)-s*2-ye,10));const{shapeSvg:a,bbox:o,label:l}=await It(e,t,Dt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:o.width)+n*2+ye,h=(t!=null&&t.height?t==null?void 0:t.height:o.height)+s*2+ye,u=c-ye,p=h-ye,d=-u/2,g=-p/2,{cssStyles:y}=t,C=Et.svg(a),x=Ft(t,{}),w=[{x:d-ye,y:g-ye},{x:d-ye,y:g+p},{x:d+u,y:g+p},{x:d+u,y:g-ye}],k=`M${d-ye},${g-ye} L${d+u},${g-ye} L${d+u},${g+p} L${d-ye},${g+p} L${d-ye},${g-ye}
379                M${d-ye},${g} L${d+u},${g}
380                M${d},${g-ye} L${d},${g+p}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const v=C.path(k,x),T=a.insert(()=>v,":first-child");return T.attr("transform",`translate(${ye/2}, ${ye/2})`),T.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(o.width/2)+ye/2-(o.x-(o.left??0))}, ${-(o.height/2)+ye/2-(o.y-(o.top??0))}
380)`),Nt(t,T),t.intersect=function(L){return Tt.polygon(t,w,L)},a}b(u1,"windowPane");var Ef=new Set(["redux-color","redux-dark-color"]),X4=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function $u(e,t){var wt,P,mt,st;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:n}=me(),{rowEven:s,rowOdd:a,nodeBorder:o,borderColorArray:l}=n;if(t.look==="handDrawn"){const{themeVariables:at}=me(),{background:dt}=at,bt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${dt}`]};await $u(e,bt)}const c=me();t.useHtmlLabels=c.htmlLabels;let h=((wt=c.er)==null?void 0:wt.diagramPadding)??10,u=((P=c.er)==null?void 0:P.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:d,nodeStyles:g}=Mt(t);if(r.attributes.length===0&&t.label){const at={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};Ur(t.label,c)+at.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const dt=await jn(e,t,at);if(i!=null&&Ef.has(i)){const bt=r.colorIndex??0;dt.attr("data-color-id",`color-${bt%l.length}`)}if(!Mr(c.htmlLabels)){const bt=dt.select("text"),vt=(mt=bt.node())==null?void 0:mt.getBBox();bt.attr("transform",`translate(${-vt.width/2}, 0)`)}return dt}c.htmlLabels||(h*=1.25,u*=1.25);let y=Dt(t);y||(y="node default");const C=e.insert("g").attr("class",y).attr("id",t.domId||t.id),x=await tn(C,t.label??"",c,0,0,["name"],d);x.height+=u;let w=0;const k=[],v=[];let T=0,L=0,D=0,M=0,W=!0,E=!0;for(const at of r.attributes){const dt=await tn(C,at.type,c,0,w,["attribute-type"],d);T=Math.max(T,dt.width+h);const bt=await tn(C,at.name,c,0,w,["attribute-name"],d);L=Math.max(L,bt.width+h);const vt=await tn(C,at.keys.join(),c,0,w,["attribute-keys"],d);D=Math.max(D,vt.width+h);const Bt=await tn(C,at.comment,c,0,w,["attribute-comment"],d);M=Math.max(M,Bt.width+h);const Q=Math.max(dt.height,bt.height,vt.height,Bt.height)+u;v.push({yOffset:w,rowHeight:Q}),w+=Q}let N=4;D<=h&&(W=!1,D=0,N--),M<=h&&(E=!1,M=0,N--);const z=C.node().getBBox();if(x.width+h*2-(T+L+D+M)>0){const at=x.width+h*2-(T+L+D+M);T+=at/N,L+=at/N,D>0&&(D+=at/N),M>0&&(M+=at/N)}const O=T+L+D+M,I=Et.svg(C),j=Ft(t,{});t.look!=="handDrawn"&&(j.roughness=0,j.fillStyle="solid");let A=0;v.length>0&&(A=v.reduce((at,dt)=>at+((dt==null?void 0:dt.rowHeight)??0),0));const R=Math.max(z.width+h*2,(t==null?void 0:t.width)||0,O),H=Math.max((A??0)+x.height,(t==null?void 0:t.height)||0),q=-R/2,_=-H/2;if(C.selectAll("g:not(:first-child)").each((at,dt,bt)=>{const vt=Yt(bt[dt]),Bt=vt.attr("transform");let Q=0,$t=0;if(Bt){const pe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Bt);pe&&(Q=parseFloat(pe[1]),$t=parseFloat(pe[2]),vt.attr("class").includes("attribute-name")?Q+=T:vt.attr("class").includes("attribute-keys")?Q+=T+L:vt.attr("class").includes("attribute-comment")&&(Q+=T+L+D))}vt.attr("transform",`translate(${q+h/2+Q}, ${$t+_+x.height+u/2})`)}),C.select(".name").attr("transform","translate("+-x.width/2+", "+(_+u/2)+")"),i!=null&&Ef.has(i)){const at=r.colorIndex??0;C.attr("data-color-id",`color-${at%l.length}`)}const ct=I.rectangle(q,_,R,H,j),X=C.insert(()=>ct,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[at,dt]of v.entries()){const vt=(at+1)%2===0&&dt.yOffset!==0,Bt=I.rectangle(q,x.height+_+(dt==null?void 0:dt.yOffset),R,dt==null?void 0:dt.rowHeight,{...j,fill:vt?s:a,stroke:o});C.insert(()=>Bt,"g.label").attr("style",p.join("")).attr("class",`row-rect-${vt?"even":"odd"}`)}const F=1e-4;let ht=en(q,x.height+_,R+q,x.height+_,F),pt=I.polygon(ht.map(at=>[at.x,at.y]),j);if(C.insert(()=>pt).attr("class","divider"),ht=en(T+q,x.height+_,T+q,H+_,F),pt=I.polygon(ht.map(at=>[at.x,at.y]),j),C.insert(()=>pt).attr("class","divider"),W){const at=T+L+q;ht=en(at,x.height+_,at,H+_,F),pt=I.polygon(ht.map(dt=>[dt.x,dt.y]),j),C.insert(()=>pt).attr("class","divider")}if(E){const at=T+L+D+q;ht=en(at,x.height+_,at,H+_,F),pt=I.polygon(ht.map(dt=>[dt.x,dt.y]),j),C.insert(()=>pt).attr("class","divider")}for(const at of k){const dt=x.height+_+at;ht=en(q,dt,R+q,dt,F),pt=I.polygon(ht.map(bt=>[bt.x,bt.y]),j),C.insert(()=>pt).attr("class","divider")}if(Nt(t,X),g&&t.look!=="handDrawn")if(i!=null&&X4.has(i))C.selectAll("path").attr("style",g);else{const at=g.split(";"),dt=(st=at==null?void 0:at.filter(bt=>bt.includes("stroke")))==null?void 0:st.map(bt=>`${bt}`).join("; ");C.selectAll("path").attr("style",dt??""),C.selectAll(".row-rect-even path").attr("style",g)}return t.intersect=function(at){return Tt.rect(t,at)},C}b($u,"erBox");async function tn(e,t,r,i=0,n=0,s=[],a=""){const o=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",a);t!==mp(t)&&(t=mp(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=o.node().appendChild(await br(o,t,{width:Ur(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();
380if(Mr(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=Yt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}b(tn,"addText");function en(e,t,r,i,n){return e===r?[{x:e-n/2,y:t},{x:e+n/2,y:t},{x:r+n/2,y:i},{x:r-n/2,y:i}]:[{x:e,y:t-n/2},{x:e,y:t+n/2},{x:r,y:i+n/2},{x:r,y:i-n/2}]}b(en,"lineToPolygon");async function d1(e,t,r,i,n=r.class.padding??12){const s=i?0:3,a=e.insert("g").attr("class",Dt(t)).attr("id",t.domId||t.id);let o=null,l=null,c=null,h=null,u=0,p=0,d=0;if(o=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const w=t.annotations[0];await as(o,{text:`«${w}»`},0),u=o.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await as(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();p=g.height,c=a.insert("g").attr("class","members-group text");let y=0;for(const w of t.members){const k=await as(c,w,y,[w.parseClassifier()]);y+=k+s}d=c.node().getBBox().height,d<=0&&(d=n/2),h=a.insert("g").attr("class","methods-group text");let C=0;for(const w of t.methods){const k=await as(h,w,C,[w.parseClassifier()]);C+=k+s}let x=a.node().getBBox();if(o!==null){const w=o.node().getBBox();o.attr("transform",`translate(${-w.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=a.node().getBBox(),c.attr("transform",`translate(0, ${u+p+n*2})`),x=a.node().getBBox(),h.attr("transform",`translate(0, ${u+p+(d?d+n*4:n*2)})`),x=a.node().getBBox(),{shapeSvg:a,bbox:x}}b(d1,"textHelper");async function as(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=me();let a="useHtmlLabels"in t?t.useHtmlLabels:Mr(s.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!a&&o.startsWith("\\")&&(o=o.substring(1)),Es(o)&&(a=!0);const l=await br(n,Xh(hi(o)),{width:Ur(o,s)+50,classes:"markdown-node-label",useHtmlLabels:a},s);let c,h=1;if(a){const u=l.children[0],p=Yt(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1),await Fu(u),c=u.getBoundingClientRect(),p.attr("width",c.width),p.attr("height",c.height)}else{i.includes("font-weight: bolder")&&Yt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(u.textContent=o[0]+o.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),o[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}b(as,"addText");async function p1(e,t){var I,j;const r=Gt(),{themeVariables:i}=r,{useGradient:n}=i,s=r.class.padding??12,a=s,o=t.useHtmlLabels??Mr(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await d1(e,t,r,o,a),{labelStyles:u,nodeStyles:p}=Mt(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((I=l.styles)==null?void 0:I.join(";"))||p||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const g=l.members.length===0&&l.methods.length===0&&!((j=r.class)!=null&&j.hideEmptyMembersBox),y=Et.svg(c),C=Ft(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Math.max(t.width??0,h.width);let w=Math.max(t.height??0,h.height);const k=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?w+=a:l.members.length>0&&l.methods.length===0&&(w+=a*2);const v=-x/2,T=-w/2;let L=g?s*2:l.members.length===0&&l.methods.length===0?-s:0;k&&(L=s*2);const D=y.rectangle(v-s,T-s-(g?s:l.members.length===0&&l.methods.length===0?-s/2:0),x+2*s,w+2*s+L,C),M=c.insert(()=>D,":first-child");M.attr("class","basic label-container outer-path");const W=M.node().getBBox(),E=c.select(".annotation-group").node().getBBox().height-(g?s/2:0)||0,N=c.select(".label-group").node().getBBox().height-(g?s/2:0)||0,z=c.select(".members-group").node().getBBox().height-(g?s/2:0)||0,O=(E+N+T+s-(T-s-(g?s:l.members.length===0&&l.methods.length===0?-s/2:0)))/2;if(c.selectAll(".text").each((A,R,H)=>{var ht,pt;const q=Yt(H[R]),_=q.attr("transform");let ct=0;
380if(_){const P=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(_);P&&(ct=parseFloat(P[2]))}let X=ct+T+s-(g?s:l.members.length===0&&l.methods.length===0?-s/2:0);if(q.attr("class").includes("methods-group")){const wt=Math.max(z,a/2);k?X=Math.max(O,E+N+wt+T+a*2+s)+a*2:X=E+N+wt+T+a*4+s}l.members.length===0&&l.methods.length===0&&((ht=r.class)!=null&&ht.hideEmptyMembersBox)&&(l.annotations.length>0?X=ct-a:X=ct),o||(X-=4);let F=v;(q.attr("class").includes("label-group")||q.attr("class").includes("annotation-group"))&&(F=-((pt=q.node())==null?void 0:pt.getBBox().width)/2||0,c.selectAll("text").each(function(wt,P,mt){window.getComputedStyle(mt[P]).textAnchor==="middle"&&(F=0)})),q.attr("transform",`translate(${F}, ${X})`)}),l.members.length>0||l.methods.length>0||g){const A=E+N+T+s,R=y.line(W.x,A,W.x+W.width,A+.001,C);c.insert(()=>R).attr("class",`divider${t.look==="neo"&&!n?" neo-line":""}`).attr("style",d)}if(g||l.members.length>0||l.methods.length>0){const A=E+N+z+T+a*2+s,R=y.line(W.x,k?Math.max(O,A):A,W.x+W.width,(k?Math.max(O,A):A)+.001,C);c.insert(()=>R).attr("class",`divider${t.look==="neo"&&!n?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",d),M.select(":nth-child(2)").attr("style",d),c.selectAll(".divider").select("path").attr("style",d),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",d),!o){const A=RegExp(/color\s*:\s*([^;]*)/),R=A.exec(d);if(R){const H=R[0].replace("color","fill");c.selectAll("tspan").attr("style",H)}else if(u){const H=A.exec(u);if(H){const q=H[0].replace("color","fill");c.selectAll("tspan").attr("style",q)}}}return Nt(t,M),t.intersect=function(A){return Tt.rect(t,A)},c}b(p1,"classBox");async function f1(e,t){var N,z;const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const n=t,s=t,a=20,o=20,l="verifyMethod"in t,c=Dt(t),h=Gt(),{themeVariables:u}=h,{borderColorArray:p,requirementEdgeLabelBackground:d}=u,g=h.layout==="elk"?"start":"center",y=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let C;l?C=await wr(y,`&lt;&lt;${n.type}&gt;&gt;`,0,t.labelStyle):C=await wr(y,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let x=C;const w=await wr(y,n.name,x,t.labelStyle+"; font-weight: bold;");if(x+=w+o,l){const O=await wr(y,`${n.requirementId?`ID: ${n.requirementId}`:""}`,x,t.labelStyle,g);x+=O;const I=await wr(y,`${n.text?`Text: ${n.text}`:""}`,x,t.labelStyle,g);x+=I;const j=await wr(y,`${n.risk?`Risk: ${n.risk}`:""}`,x,t.labelStyle,g);x+=j,await wr(y,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,x,t.labelStyle,g)}else{const O=await wr(y,`${s.type?`Type: ${s.type}`:""}`,x,t.labelStyle,g);x+=O,await wr(y,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,x,t.labelStyle,g)}const k=(((N=y.node())==null?void 0:N.getBBox().width)??200)+a,v=(((z=y.node())==null?void 0:z.getBBox().height)??200)+a,T=-k/2,L=-v/2,D=Et.svg(y),M=Ft(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const W=D.rectangle(T,L,k,v,M),E=y.insert(()=>W,":first-child");if(E.attr("class","basic label-container outer-path").attr("style",i),p!=null&&p.length){const O=t.colorIndex??0;y.attr("data-color-id",`color-${O%p.length}`)}if(y.selectAll(".label").each((O,I,j)=>{const A=Yt(j[I]),R=A.attr("transform");let H=0,q=0;if(R){const F=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);F&&(H=parseFloat(F[1]),q=parseFloat(F[2]))}const _=q-v/2;let ct=T+a/2;(I===0||I===1)&&(ct=H),A.attr("transform",`translate(${ct}, ${_+a})`)}),x>C+w+o){const O=L+C+w+o;let I;if(t.look==="neo"){const R=[[T,O],[T+k,O],[T+k,O+.001],[T,O+.001]];I=D.polygon(R,M)}else I=D.line(T,O,T+k,O,M);y.insert(()=>I).attr("class","divider")}return Nt(t,E),t.intersect=function(O){return Tt.rect(t,O)},i&&t.look!=="handDrawn"&&(d||p!=null&&p.length)&&y.selectAll("path").attr("style",i),y}b(f1,"requirementBox");async function wr(e,t,r,i="",n="center"){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=Gt(),o=a.htmlLabels??!0,l=await br(s,Xh(hi(t)),{width:Ur(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let c;if(o){const h=l.children[0],u=Yt(l);n==="start"&&Yt(h).style("text-align","left"),c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}else{const h=l.children[0];for(const u of h.children)i&&u.setAttribute("style",i);if(n==="start"){h.setAttribute("text-anchor","start");for(const u of h.children)u.setAttribute("text-anchor","start")}c=l.getBBox(),c.height+=6}return s.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}b(wr,"addText");var Q4=b(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 g1(e,t,{config:r}){var z,O;const{labelStyles:i,nodeStyles:n}=Mt(t);t.labelStyle=i||"";const s=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:c}=await It(e,t,Dt(t)),h=t.padding||10;let u="",p;"ticket"in t&&t.ticket&&((z=r==null?void 0:r.kanban)!=null&&z.ticketBaseUrl)&&(u=(O=r==null?void 0:r.kanban)==null?void 0:O.ticketBaseUrl.replace("#TICKET#",t.ticket),p=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,y;p?{label:g,bbox:y}=await Nl(p,"ticket"in t&&t.ticket||"",d):{label:g,bbox:y}=await Nl(o,"ticket"in t&&t.ticket||"",d);const{label:C,bbox:x}=await Nl(o,"assigned"in t&&t.assigned||"",d);t.width=a;const w=10,k=(t==null?void 0:t.width)||0,v=Math.max(y.height,x.height)/2,T=Math.max(l.height+w*2,(t==null?void 0:t.height)||0)+v,L=-k/2,D=-T/2;c.attr("transform","translate("+(h-k/2)+", "+(-v-l.height/2)+")"),g.attr("transform","translate("+(h-k/2)+", "+(-v+l.height/2)+")"),C.attr("transform","translate("+(h+k/2-x.width-2*s)+", "+(-v+l.height/2)+")");let M;const{rx:W,ry:E}=t,{cssStyles:N}=t;if(t.look==="handDrawn"){const I=Et.svg(o),j=Ft(t,{}),A=W||E?I.path(ar(L,D,k,T,W||0),j):I.rectangle(L,D,k,T,j);M=o.insert(()=>A,":first-child"),M.attr("class","basic label-container").attr("style",N||null)}else{M=o.insert("rect",":first-child"),M.attr("class","basic label-container __APA__").attr("style",n).attr("rx",W??5).attr("ry",E??5).attr("x",L).attr("y",D).attr("width",k).attr("height",T);const I="priority"in t&&t.priority;if(I){const j=o.append("line"),A=L+2,R=D+Math.floor((W??0)/2),H=D+T-Math.floor((W??0)/2);j.attr("x1",A).attr("y1",R).attr("x2",A).attr("y2",H).attr("stroke-width","4").attr("stroke",Q4(I
vendor: 4,449 bytes, lines 380-432
380))}}return Nt(t,M),t.height=T,t.intersect=function(I){return Tt.rect(t,I)},o}b(g1,"kanbanItem");async function m1(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:a,label:o}=await It(e,t,Dt(t)),l=s.width+10*a,c=s.height+8*a,h=.15*l,{cssStyles:u}=t,p=s.width+20,d=s.height+20,g=Math.max(l,p),y=Math.max(c,d);o.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let C;const x=`M0 0 
381    a${h},${h} 1 0,0 ${g*.25},${-1*y*.1}
382    a${h},${h} 1 0,0 ${g*.25},0
383    a${h},${h} 1 0,0 ${g*.25},0
384    a${h},${h} 1 0,0 ${g*.25},${y*.1}
385
386    a${h},${h} 1 0,0 ${g*.15},${y*.33}
387    a${h*.8},${h*.8} 1 0,0 0,${y*.34}
388    a${h},${h} 1 0,0 ${-1*g*.15},${y*.33}
389
390    a${h},${h} 1 0,0 ${-1*g*.25},${y*.15}
391    a${h},${h} 1 0,0 ${-1*g*.25},0
392    a${h},${h} 1 0,0 ${-1*g*.25},0
393    a${h},${h} 1 0,0 ${-1*g*.25},${-1*y*.15}
394
395    a${h},${h} 1 0,0 ${-1*g*.1},${-1*y*.33}
396    a${h*.8},${h*.8} 1 0,0 0,${-1*y*.34}
397    a${h},${h} 1 0,0 ${g*.1},${-1*y*.33}
398  H0 V0 Z`;if(t.look==="handDrawn"){const w=Et.svg(n),k=Ft(t,{}),v=w.path(x,k);C=n.insert(()=>v,":first-child"),C.attr("class","basic label-container").attr("style",ve(u))}else C=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return C.attr("transform",`translate(${-g/2}, ${-y/2})`),Nt(t,C),t.calcIntersect=function(w,k){return Tt.rect(w,k)},t.intersect=function(w){return et.info("Bang intersect",t,w),Tt.rect(t,w)},n}b(m1,"bang");async function y1(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:a,label:o}=await It(e,t,Dt(t)),l=s.width+2*a,c=s.height+2*a,h=.15*l,u=.25*l,p=.35*l,d=.2*l,{cssStyles:g}=t;let y;const C=`M0 0 
399    a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
400    a${p},${p} 1 0,1 ${l*.4},${-1*l*.1}
401    a${u},${u} 1 0,1 ${l*.35},${l*.2}
402
403    a${h},${h} 1 0,1 ${l*.15},${c*.35}
404    a${d},${d} 1 0,1 ${-1*l*.15},${c*.65}
405
406    a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
407    a${p},${p} 1 0,1 ${-1*l*.5},0
408    a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
409
410    a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
411    a${d},${d} 1 0,1 ${l*.1},${-1*c*.65}
412  H0 V0 Z`;if(t.look==="handDrawn"){const x=Et.svg(n),w=Ft(t,{}),k=x.path(C,w);y=n.insert(()=>k,":first-child"),y.attr("class","basic label-container").attr("style",ve(g))}else y=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return o.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),y.attr("transform",`translate(${-l/2}, ${-c/2})`),Nt(t,y),t.calcIntersect=function(x,w){return Tt.rect(x,w)},t.intersect=function(x){return et.info("Cloud intersect",t,x),Tt.rect(t,x)},n}b(y1,"cloud");async function x1(e,t){const{labelStyles:r,nodeStyles:i}=Mt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:a,label:o}=await It(e,t,Dt(t)),l=s.width+8*a,c=s.height+2*a,h=5,u=t.look==="neo"?`
413    M${-l/2} ${c/2-h}
414    v${-c+2*h}
415    q0,-${h} ${h},-${h}
416    h${l-2*h}
417    q${h},0 ${h},${h}
418    v${c-h}
419    H${-l/2}
420    Z
421  `:`
422    M${-l/2} ${c/2-h}
423    v${-c+2*h}
424    q0,-${h} ${h},-${h}
425    h${l-2*h}
426    q${h},0 ${h},${h}
427    v${c-2*h}
428    q0,${h} ${-h},${h}
429    h${-(l-2*h)}
430    q${-h},0 ${-h},${-h}
431    Z
432  `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=n.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),n.append(()=>o.node()),Nt(t,p),t.calcIntersect=function(d,g){return Tt.rect(d,g)},t.intersect=function(d){return Tt.rect(t,d)},n}b(x1,"defaultMindmapNode");async function b1(e,t){const r={padding:t.padding??0};return Mu(e,t,r)}b(b1,"mindmapCircle");var K4=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Qb},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Vb},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Kb},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","
432subproc","framed-rectangle","subroutine"],handler:e1},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:xb},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:bb},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:Sb},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:ib},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:hb},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:ab},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:yb},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Mu},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:m1},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:y1}
432,{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Hb},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Bb},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Db},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Ib},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:a1},{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:$b},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:kb},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:n1}
432,{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ob},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Gb},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:t1},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Jb},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Tb},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Lb},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:pb},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:fb},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:gb},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Pb}
vendor: 4,650 bytes, line 432
432,{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:c1},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:_b},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:s1},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Ob},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:mb},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Cb},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:l1},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:u1},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:wb},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:o1},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:vb},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Xb},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:zb},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:qb},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:rb},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:db},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:i1},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:r1},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:h1},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Ub},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Rb}],Z4=b(()=>{const t=[...Object.entries({state:Zb,choice:lb,note:Wb,composite:cb,rectWithTitle:Yb,labelRect:jb,block_arrow:sb,collapsedGroup:nb,iconSquare:Nb,iconCircle:Fb,icon:Ab,iconRounded:Eb,imageSquare:Mb,anchor:tb,kanbanItem:g1,mindmapCircle:b1,defaultMindmapNode:x1,classBox:p1,erBox:$u,requirementBox:f1}),...K4.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),C1=Z4();function J4(e){return e in C1}b(J4,"isValidShape");var Ro=b(({flowchart:e})=>{var n,s;const t=((n=e==null?void 0:e.subGraphTitleMargin)==null?void 0:n.top)??0,r=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),qo=new Map;async function ju(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?C1[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),n=await s(i,t,r)}else n=await s(e,t,r),i=n;return i.attr("data-look",ve(t.look)),t.tooltip&&n.attr("title",t.tooltip),qo.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}
432b(ju,"insertNode");var z7=b((e,t)=>{qo.set(t.id,e)},"setNodeElem"),tj=b(()=>{qo.clear()},"clear"),Nf=b(e=>{const t=qo.get(e.id);et.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),ej=b(async(e,t)=>{const r=Gt(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:s,clusterBorder:a}=i,o=a,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:u}=Mt(t),p=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),d=Mr(r.flowchart.htmlLabels),g=t.direction==="LR",y=p.insert("g").attr("class","cluster-label swimlane-label"),C=await br(y,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let x=C.getBBox();if(d){const O=C.children[0],I=Yt(C);x=O.getBoundingClientRect(),I.attr("width",x.width),I.attr("height",x.height)}const w=t.padding??0,k=t.width<=x.width+w?x.width+w:t.width;t.width<=x.width+w?t.diff=(k-t.width)/2-w:t.diff=-w;const v=t.height,T=t.y-v/2,L=t.y+v/2,D=t.x-k/2,M=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:T+v/3,W=g?4:0,E=x.height+2*W;let N,z;if(g){const O=Math.max(E,x.height+2*W),I=D+O,j=Math.max(0,k-O);if(t.look==="handDrawn"){const H=Et.svg(p),q=Ft(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:n}),_=Ft(t,{roughness:.7,fill:"none",stroke:o,seed:n}),ct=H.rectangle(D,T,O,v,q);N=p.insert(()=>ct,":first-child");const X=H.rectangle(I,T,j,v,_);z=p.insert(()=>X,":first-child"),N.select("path:nth-child(2)").attr("style",h.join(";")),N.select("path").attr("style",u.join(";").replace("fill","stroke"))}else N=p.insert("rect",":first-child"),z=p.insert("rect",":first-child"),N.attr("class","swimlane-title").attr("style",c).attr("x",D).attr("y",T).attr("width",O).attr("height",v).attr("fill",s).attr("stroke",o),z.attr("class","swimlane-body").attr("style",c).attr("x",I).attr("y",T).attr("width",j).attr("height",v).attr("fill","none").attr("stroke",o);const A=D+O/2,R=t.y;y.attr("transform",`translate(${A}, ${R}) rotate(-90) translate(${-x.width/2}, ${-x.height/2})`)}else{const O=Math.max(0,M-T),I=Math.min(E,O),j=T+I,A=Math.max(0,L-j),R=t.x-k/2;if(t.look==="handDrawn"){const _=Et.svg(p),ct=Ft(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:n}),X=Ft(t,{roughness:.7,fill:"none",stroke:o,seed:n}),F=_.rectangle(R,T,k,I,ct);N=p.insert(()=>F,":first-child");const ht=_.rectangle(R,j,k,A,X);z=p.insert(()=>ht,":first-child"),N.select("path:nth-child(2)").attr("style",h.join(";")),N.select("path").attr("style",u.join(";").replace("fill","stroke"))}else N=p.insert("rect",":first-child"),z=p.insert("rect",":first-child"),N.attr("class","swimlane-title").attr("style",c).attr("x",R).attr("y",T).attr("width",k).attr("height",I).attr("fill",s).attr("stroke",o),z.attr("class","swimlane-body").attr("style",c).attr("x",R).attr("y",j).attr("width",k).attr("height",A).attr("fill","none").attr("stroke",o);const H=t.x-x.width/2,q=T+(I-x.height)/2;y.attr("transform",`translate(${H}, ${q})`)}if(et.trace("Swimlane data ",t,JSON.stringify(t)),l){const O=y.select("span");O&&O.attr("style",l)}return t.offsetX=0,t.width=k,t.height=v,t.offsetY=x.height-w/2,t.intersect=function(O){return Wi(t,O)},{cluster:p,labelBBox:x}},"swimlane"),k1=b(async(e,t)=>{et.info("Creating subgraph rect for ",t.id,t);const r=Gt(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Mt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Ie(r),d=u.insert("g").attr("class","cluster-label ");let g;t.labelType==="markdown"?g=await br(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):g=await ni(d,t.label,t.labelStyle||"",!1,!0);let y=g.getBBox();if(Ie(r)){const D=g.children[0],M=Yt(g);y=D.getBoundingClientRect(),M.attr("width",y.width),M.attr("height",y.height)}const C=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,w=t.x-C/2,k=t.y-x/2;et.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const D=Et.svg(u),M=Ft(t,{roughness:.7,fill:s,stroke:a,fillWeight:3,seed:n}),W=D.path(ar(w,k,C,x,0),M);v=u.insert(()=>(et.debug("Rough node insert CXC",W),W),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",w).attr("y",k).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:T}=Ro(r);if(d.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+T})`),o){const D=d.select("span");D&&D.attr("style",o)}const L=v.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(D){return Wi(t,D)},{cluster:u,labelBBox:y}},"rect"),rj=b((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),n=0*t.padding,s=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(o){return Wi(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),ij=b(async(e,t)=>
vendor: 8,177 bytes, line 432
432{const r=Gt(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:s,compositeBackground:a,compositeTitleBackground:o,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let p=c.append("rect");const d=await ni(u,t.label,t.labelStyle,void 0,!0);let g=d.getBBox();if(Ie(r)){const W=d.children[0],E=Yt(d);g=W.getBoundingClientRect(),E.attr("width",g.width),E.attr("height",g.height)}const y=0*t.padding,C=y/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+y;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const w=t.height+y,k=t.height+y-g.height-6,v=t.x-x/2,T=t.y-w/2;t.width=x;const L=t.y-t.height/2-C+g.height+2;let D;if(t.look==="handDrawn"){const W=t.cssClasses.includes("statediagram-cluster-alt"),E=Et.svg(c),N=t.rx||t.ry?E.path(ar(v,T,x,w,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:n}):E.rectangle(v,T,x,w,{seed:n});D=c.insert(()=>N,":first-child");const z=E.rectangle(v,L,x,k,{fill:W?s:a,fillStyle:W?"hachure":"solid",stroke:l,seed:n});D=c.insert(()=>N,":first-child"),p=c.insert(()=>z)}else D=h.insert("rect",":first-child"),D.attr("class","outer").attr("x",v).attr("y",T).attr("width",x).attr("height",w).attr("data-look",t.look),p.attr("class","inner").attr("x",v).attr("y",L).attr("width",x).attr("height",k);u.attr("transform",`translate(${t.x-g.width/2}, ${T+1-(Ie(r)?0:3)})`);const M=D.node().getBBox();return t.height=M.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(W){return Wi(t,W)},{cluster:c,labelBBox:g}},"roundedWithTitle"),nj=b(async(e,t)=>{et.info("Creating subgraph rect for ",t.id,t);const r=Gt(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Mt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Ie(r),d=u.insert("g").attr("class","cluster-label "),g=await br(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let y=g.getBBox();if(Ie(r)){const D=g.children[0],M=Yt(g);y=D.getBoundingClientRect(),M.attr("width",y.width),M.attr("height",y.height)}const C=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,w=t.x-C/2,k=t.y-x/2;et.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const D=Et.svg(u),M=Ft(t,{roughness:.7,fill:s,stroke:a,fillWeight:4,seed:n}),W=D.path(ar(w,k,C,x,t.rx),M);v=u.insert(()=>(et.debug("Rough node insert CXC",W),W),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",w).attr("y",k).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:T}=Ro(r);if(d.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+T})`),o){const D=d.select("span");D&&D.attr("style",o)}const L=v.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(D){return Wi(t,D)},{cluster:u,labelBBox:y}},"kanbanSection"),sj=b((e,t)=>{const r=Gt(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:s}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),o=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,p=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const C=Et.svg(a).rectangle(u,p,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:n});d=a.insert(()=>C,":first-child")}else{d=o.insert("rect",":first-child");let y="outer";t.look,y="divider",d.attr("class",y).attr("x",u).attr("y",p).attr("width",c).attr("height",h).attr("data-look",t.look)}const g=d.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return Wi(t,y)},{cluster:a,labelBBox:{}}},"divider"),aj=k1,oj={rect:k1,squareRect:aj,roundedWithTitle:ij,noteGroup:rj,divider:sj,kanbanSection:nj,swimlane:ej},w1=new Map,v1=b(async(e,t)=>{const r=t.shape||"rect",i=await oj[r](e,t);return w1.set(t.id,i),i},"insertCluster"),lj=b(()=>{w1=new Map},"clear"),Qn=b((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Ne={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},Mf={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function os(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=ge(e),t=ge(t);const[r,i]=[e.x,e.y],[n,s]=[t.x,t.y],a=n-r,o=s-i;return{angle:Math.atan(o/a),deltaX:a,deltaY:o}}b(os,"calculateDeltaAndAngle");var ge=b(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),cj=b(e=>({x:b(function(t,r,i){let n=0;const s=ge(i[0]).x<ge(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ne,e.arrowTypeStart)){const{angle:d,deltaX:g}=os(i[0],i[1]);n=Ne[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ne,e.arrowTypeEnd)){const{angle:d,deltaX:g}=os(i[i.length-1],i[i.length-2]);n=Ne[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const a=Math.abs(ge(t).x-ge(i[i.length-1]).x),o=Math.abs(ge(t).y-ge(i[i.length-1]).y),l=Math.abs(ge(t).x-ge(i[0]).x),c=Math.abs(ge(t).y-ge(i[0]).y),h=Ne[e.arrowTypeStart],u=Ne[e.arrowTypeEnd],p=1;if(a<u&&a>0&&o<u){let d=u+p-a;d*=s==="right"?-1:1,n-=d}if(l<h&&l>0&&c<h){let d=h+p-l;d*=s==="right"?-1:1,n+=d}return ge(t).x+n},"x"),y:b(function(t,r,i){let n=0;const s=ge(i[0]).y<ge(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ne,e.arrowTypeStart)){const{angle:d,deltaY:g}=os(i[0],i[1]);n=Ne[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ne,e.arrowTypeEnd)){const{angle:d,deltaY:g}=os(i[i.length-1],i[i.length-2]);n=Ne[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const a=Math.abs(ge(t).y-ge(i[i.length-1]).y),o=Math.abs(ge(t).x-ge(i[i.length-1]).x),l=Math.abs(ge(t).y-ge(i[0]).y),c=Math.abs(ge(t).x-ge(i[0]).x),h=Ne[e.arrowTypeStart],u=Ne[e.arrowTypeEnd],p=1;if(a<u&&a>0&&o<u){let d=u+p-a;d*=s==="up"?-1:1,n-=d}if(l<h&&l>0&&c<h){let d=h+p-l;d*=s==="up"?-1:1,n+=d}return ge(t).y+n},"y")}),"getLineFunctionsWithOffset"),hj=b((e,t,r,i,n,s=!1,a)=>{t.arrowTypeStart&&$f(e,"start",t.arrowTypeStart,r,i,n,s,a),t.arrowTypeEnd&&$f(e,"end",t.arrowTypeEnd,r,i,n,s,a)},"addEdgeMarkers"),uj={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}},dj=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],$f=b((e,t,r,i,n,s,a=!1,o)=>{var g;if(!r||r==="none")return;const l=uj[r],c=l&&dj.includes(l.type);if(!l){et.warn(`Unknown arrow type: ${r}`);return}const h=l.type,d=`${n}_${s}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(o&&o.trim()!==""){const y=o.replace(/[^\dA-Za-z]/g,"_"),C=`${d}_${y}`;if(!document.getElementById(C)){const x=document.getElementById(d);if(x){const w=x.cloneNode(!0);w.id=C,w.querySelectorAll("path, circle, line").forEach(v=>{v.setAttribute("stroke",o),l.fill&&v.setAttribute("fill",o)}),(g=x.parentNode)==null||g.appendChild(w)}}e.attr(`marker-${t}`,`url(${i}#${C})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),pj=b(e=>{var t,r;return typeof e=="string"?e:(r=(t=Gt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),An=new Map,Ce=new Map,fj=b(()=>
432{An.clear(),Ce.clear()},"clear"),S1=b(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),Kn=b(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Iu=b(async(e,t)=>{const r=Gt();let i=Ie(r);const{labelStyles:n}=Mt(t);t.labelStyle=n;const s=e.insert("g").attr("class","edgeLabel"),a=s.insert("g").attr("class","label").attr("data-id",t.id),o=t.labelType==="markdown",c=await br(e,t.label,{style:Kn(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:o,width:o?void 0:void 0},r);a.node().appendChild(c),et.info("abc82",t,t.labelType);let h,u;if(i){const d=c.children[0],g=Yt(c);h=await Ii.measure(()=>d.getBoundingClientRect()),u=h,g.attr("width",h.width),g.attr("height",h.height)}else{const d=Yt(c).select("text").node();await Ii.measure(()=>{h=c.getBBox(),d&&typeof d.getBBox=="function"?u=d.getBBox():u=h})}a.attr("transform",Qn(u,i)),An.set(t.id,s),t.width=h.width,t.height=h.height;let p;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),y=await ni(g,t.startLabelLeft,Kn(t.labelStyle)||"",!1,!1);p=y;let C=y.getBBox();if(i){const x=y.children[0],w=Yt(y);C=x.getBoundingClientRect(),w.attr("width",C.width),w.attr("height",C.height)}
vendor: 1,227 bytes, line 432
432g.attr("transform",Qn(C,i)),Ce.get(t.id)||Ce.set(t.id,{}),Ce.get(t.id).startLeft=d,ls(p,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),y=await ni(g,t.startLabelRight,Kn(t.labelStyle)||"",!1,!1);p=y;let C=y.getBBox();if(i){const x=y.children[0],w=Yt(y);C=x.getBoundingClientRect(),w.attr("width",C.width),w.attr("height",C.height)}g.attr("transform",Qn(C,i)),Ce.get(t.id)||Ce.set(t.id,{}),Ce.get(t.id).startRight=d,ls(p,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),y=await ni(d,t.endLabelLeft,Kn(t.labelStyle)||"",!1,!1);p=y;let C=y.getBBox();if(i){const x=y.children[0],w=Yt(y);C=x.getBoundingClientRect(),w.attr("width",C.width),w.attr("height",C.height)}g.attr("transform",Qn(C,i)),Ce.get(t.id)||Ce.set(t.id,{}),Ce.get(t.id).endLeft=d,ls(p,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),y=await ni(d,t.endLabelRight,Kn(t.labelStyle)||"",!1,!1);p=y;let C=y.getBBox();if(i){const x=y.children[0],w=Yt(y);C=x.getBoundingClientRect(),w.attr("width",C.width),w.attr("height",C.height)}
432g.attr("transform",Qn(C,i)),Ce.get(t.id)||Ce.set(t.id,{}),Ce.get(t.id).endRight=d,ls(p,t.endLabelRight)}return c},"insertEdgeLabel");function ls(e,t){Ie(Gt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}b(ls,"setTerminalWidth");var gj=b((e,t)=>{et.debug("Moving label abc88 ",e.id,e.label,An.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=Gt(),{subGraphTitleTotalMargin:n}=Ro(i);if(e.label){const s=An.get(e.id);let a=e.x,o=e.y;if(r){const l=Me.calcLabelPosition(r);et.debug("Moving label "+e.label+" from (",a,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,o=l.y)}s.attr("transform",`translate(${a}, ${o+n/2})`)}if(e.startLabelLeft){const s=Ce.get(e.id).startLeft;let a=e.x,o=e.y;if(r){const l=Me.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}if(e.startLabelRight){const s=Ce.get(e.id).startRight;let a=e.x,o=e.y;if(r){const l=Me.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}if(e.endLabelLeft){const s=Ce.get(e.id).endLeft;let a=e.x,o=e.y;if(r){const l=Me.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}if(e.endLabelRight){const s=Ce.get(e.id).endRight;let a=e.x,o=e.y;if(r){const l=Me.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}},"positionEdgeLabel"),mj=b((e,t)=>{var a;if(!(e!=null&&e.isLabelEdge)||!((a=e==null?void 0:e.id)!=null&&a.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,n=Math.abs(i.x-r.x),s=Math.abs(i.y-r.y);return n<.001||s<.001?t:s>=n?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),yj=b((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),s=Math.abs(t.y-i),a=e.width/2,o=e.height/2;return n>=a||s>=o},"outsideNode"),xj=b((e,t,r)=>{et.debug(`intersection calc abc89:
433  outsidePoint: ${JSON.stringify(t)}
434  insidePoint : ${JSON.stringify(r)}
435  node        : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,s=Math.abs(i-r.x),a=e.width/2;let o=r.x<t.x?a-s:a+s;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*a>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-n:n-l-t.y;o=h*u/c;const p={x:r.x<t.x?r.x+o:r.x-h+o,y:r.y<t.y?r.y+c-u:r.y-c+u};return o===0&&(p.x=t.x,p.y=t.y),h===0&&(p.x=t.x),c===0&&(p.y=t.y),et.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${o}`,p),p}else{r.x<t.x?o=t.x-a-i:o=i-a-t.x;let u=c*o/h,p=r.x<t.x?r.x+h-o:r.x-h+o,d=r.y<t.y?r.y+u:r.y-u;return et.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${o}`,{_x:p,_y:d}),o===0&&(p=t.x,d=t.y),h===0&&(p=t.x),c===0&&(d=t.y),{x:p,y:d}}},"intersection"),jf=b((e,t)=>{et.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(s=>{if(et.info("abc88 checking point",s,t),!yj(t,s)&&!n){const a=xj(t,i,s);et.debug("abc88 inside",s,i,a),et.debug("abc88 intersection",a,t);let o=!1;r.forEach(l=>{o=o||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?et.warn("abc88 no intersect",a,r):r.push(a),n=!0}else et.warn("abc88 outside",s,i),i=s,n||r.push(s)}),et.debug("returning points",r),r},"cutPathAtIntersect");function T1(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],s=e[i],a=e[i+1];(n.x===s.x&&s.y===a.y&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-n.y)>5||n.y===s.y&&s.x===a.x&&Math.abs(s.x-n.x)>5&&Math.abs(s.y-a.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}b(T1,"extractCornerPoints");var If=b(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,s=Math.sqrt(i*i+n*n),a=r/s;return{x:t.x-a*i,y:t.y-a*n}},"findAdjacentPoint"),bj=b(function(e){const{cornerPointPositions:t}=T1(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],s=e[i+1],a=e[i],o=If(n,a,5),l=If(s,a,5),c=l.x-o.x,h=l.y-o.y;r.push(o);const u=Math.sqrt(2)*2;let p={x:a.x,y:a.y};if(Math.abs(s.x-n.x)>10&&Math.abs(s.y-n.y)>=10){et.debug("Corner point fixing",Math.abs(s.x-n.x),Math.abs(s.y-n.y));const d=5;a.x===o.x?p={x:c<0?o.x-d+u:o.x+d-u,y:h<0?o.y-u:o.y+u}:p={x:c<0?o.x-u:o.x+u,y:h<0?o.y-d+u:o.y+d-u}}else et.debug("Corner point skipping fixing",Math.abs(s.x-n.x),Math.abs(s.y-n.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),Cj=b((e,t,r)=>{const i=e-t-r,n=2,s=2,a=n+s,o=Math.floor(i/a),l=Number.isFinite(o)?Math.max(0,o):0,c=Array(l).fill(`${n} ${s}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),_1=b(function(e,t,r,i,n,s,a,o=!1){var H;if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=Gt();let h=t.points,u=!1;const p=n;var d=s;const g=[];for(const q in t.cssCompiledStyles)Jx(q)||g.push(t.cssCompiledStyles[q]);if(c==="swimlane"){if(d.intersect&&p.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[p.intersect(h[0]),d.intersect(h[1])];else{const q=h.slice(1,-1),_=q[0],ct=q[q.length-1],X=.5,F=Math.abs(h[h.length-1].x-ct.x)<X&&Math.abs(h[h.length-1].y-ct.y)<X,ht=p.intersect(_),pt=F?ct:d.intersect(ct),wt=Math.abs(pt.x-ct.x)<X&&Math.abs(pt.y-ct.y)<X,mt=Math.abs(ht.x-_.x)<X&&Math.abs(ht.y-_.y)<X?[]:[ht],st=wt?[]:[pt];h=[...mt,...q,...st]}h=mj(t,h)}else d.intersect&&p.intersect&&!o&&(h=h.slice(1,t.points.length-1),h.unshift(p.intersect(h[0])),h.push(d.intersect(h[h.length-1])));const y=btoa(JSON.stringify(h));t.toCluster&&(et.info("to cluster abc88",r.get(t.toCluster)),h=jf(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(et.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=jf(h.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let C=h.filter(q=>!Number.isNaN(q.y));const x=pj(t.curve);x!=="rounded"&&(C=bj(C));let w=Ss;switch(x){case"linear":w=Ss;break;case"basis":w=Wc;break;case"cardinal":w=Px;break;case"bumpX":w=Mx;break;case"bumpY":w=$x;break;case"catmullRom":w=Rx;break;case"monotoneX":w=Yx;break;case"monotoneY":w=Vx;break;case"natural":w=Xx;break;case"step":w=Qx;break;case"stepAfter":w=Zx;break;case"stepBefore":w=Kx;break;case"rounded":w=Ss;break;default:w=Wc}const{x:k,y:v}=cj(t),T=jN().x(k).y(v).curve(w);let L;switch(t.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-invisible";break;default:L="edge-thickness-normal"}switch(t.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break;default:L+=" edge-pattern-solid"}let D,M=x==="rounded"?B1(L1(C,t),5):T(C);const W=Array.isArray(t.style)?t.style:[t.style];let E=W.find(q=>q==null?void 0:q.startsWith("stroke:")),N="";t.animate&&(N="edge-animation-fast"),t.animation&&(N="edge-animation-"+t.animation);let z=!1;if(t.look==="handDrawn"){const q=Et.svg(e);Object.assign([],C);const _=q.path(M,{roughness:.3,seed:l});L+=" transition",D=Yt(_).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(N?" "+N:"")).attr("style",W?W.reduce((X,F)=>X+";"+F,""):"");let ct=D.attr("d");D.attr("d",ct),e.node().appendChild(D.node())}else{const q=g.join(";"),_=W?W.reduce((wt,P)=>wt+P+";",""):"",ct=(q?q+";"+_+";":_)+";"+(W?W.reduce((wt,P)=>wt+";"+P,""):"");D=e.append("path").attr("d",M).attr("id",`${a}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(N?" "+N:"")).attr("style",ct),E=(H=ct.match(/stroke:([^;
vendor: 10,577 bytes, line 435
435]+)/))==null?void 0:H[1],z=t.animate===!0||!!t.animation||q.includes("animation");const X=D.node(),F=typeof X.getTotalLength=="function"?X.getTotalLength():0,ht=Mf[t.arrowTypeStart]||0,pt=Mf[t.arrowTypeEnd]||0;if(t.look==="neo"&&!z){const P=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Cj(F,ht,pt):`0 ${ht} ${F-ht-pt} ${pt}`}; stroke-dashoffset: 0;`;D.attr("style",P+D.attr("style"))}}D.attr("data-edge",!0),D.attr("data-et","edge"),D.attr("data-id",t.id),D.attr("data-points",y),D.attr("data-look",ve(t.look)),t.showPoints&&C.forEach(q=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",q.x).attr("cy",q.y)});let O="";(Gt().flowchart.arrowMarkerAbsolute||Gt().state.arrowMarkerAbsolute)&&(O=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,O=O.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),et.info("arrowTypeStart",t.arrowTypeStart),et.info("arrowTypeEnd",t.arrowTypeEnd);const I=!z&&(t==null?void 0:t.look)==="neo";hj(D,t,O,a,i,I,E);const j=Math.floor(h.length/2),A=h[j];Me.isLabelCoordinateInPath(A,D.attr("d"))||(u=!0);let R={};return u&&(R.updatedPath=h),R.originalPath=t.points,R},"insertEdge");function B1(e,t){if(e.length<2)return"";let r="";const i=e.length,n=1e-5;for(let s=0;s<i;s++){const a=e[s],o=e[s-1],l=e[s+1];if(s===0)r+=`M${a.x},${a.y}`;else if(s===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-o.x,h=a.y-o.y,u=l.x-a.x,p=l.y-a.y,d=Math.hypot(c,h),g=Math.hypot(u,p);if(d<n||g<n){r+=`L${a.x},${a.y}`;continue}const y=c/d,C=h/d,x=u/g,w=p/g,k=y*x+C*w,v=Math.max(-1,Math.min(1,k)),T=Math.acos(v);if(T<n||Math.abs(Math.PI-T)<n){r+=`L${a.x},${a.y}`;continue}const L=Math.min(t/Math.sin(T/2),d/2,g/2),D=a.x-y*L,M=a.y-C*L,W=a.x+x*L,E=a.y+w*L;r+=`L${D},${M}`,r+=`Q${a.x},${a.y} ${W},${E}`}}return r}b(B1,"generateRoundedPath");function sh(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}b(sh,"calculateDeltaAndAngle");function L1(e,t){const r=e.map(n=>({...n}));if(e.length>=2&&Ne[t.arrowTypeStart]){const n=Ne[t.arrowTypeStart],s=e[0],a=e[1],{angle:o}=sh(s,a),l=n*Math.cos(o),c=n*Math.sin(o);r[0].x=s.x+l,r[0].y=s.y+c}const i=e.length;if(i>=2&&Ne[t.arrowTypeEnd]){const n=Ne[t.arrowTypeEnd],s=e[i-1],a=e[i-2],{angle:o}=sh(a,s),l=n*Math.cos(o),c=n*Math.sin(o);r[i-1].x=s.x-l,r[i-1].y=s.y-c}return r}b(L1,"applyMarkerOffsetsToPoints");var kj=b((e,t,r,i)=>{t.forEach(n=>{Hj[n](e,r,i)})},"insertMarkers"),wj=b((e,t,r)=>{et.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",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",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+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",r+"_"+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"),vj=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),Sj=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").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").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),Tj=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),_j=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").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),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").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),e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),Bj=b((e,t,r)=>{e.append("marker").attr("id",r+"_"+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",r+"_"+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",r+"_"+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",r+"_"+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("pol
435ygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Lj=b((e,t,r)=>{e.append("marker").attr("id",r+"_"+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",r+"_"+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",r+"_"+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",r+"_"+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"),Aj=b((e,t,r)=>{e.append("marker").attr("id",r+"_"+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",r+"_"+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",r+"_"+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",r+"_"+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"),Fj=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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"),Ej=b((e,t,r)=>{const i=me(),{themeVariables:n}=i,{transitionColor:s}=n;e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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",`${s}`)},"barbNeo"),Nj=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),Mj=b((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),$j=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),jj=b((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Ij=b((e,t,r)=>{const i=me(),{themeVariables:n}=i,{strokeWidth:s}=n;e.append("defs").append("marker").attr("id",r+"_"+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",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+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",`${s}`)},"only_one_neo"),Dj=b((e,t,r)=>{const i=me(),{themeVariables:n}=i,{strokeWidth:s,mainBkg:a}=n,o=e.append("defs").append("marker").attr("id",r+"_"+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",`${s}`).attr("r",6),o.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);const l=e.append("defs").append("marker").attr("id",r+"_"+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");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),Pj=b((e,t,r)=>{const i=me(),{themeVariables:n}=i,{strokeWidth:s}=n;e.append("defs").append("marker").attr("id",r+"_"+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",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+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",`${s}`)},"one_or_more_neo"),Oj=b((e,t,r)=>{const i=me(),{themeVariables:n}=i,{strokeWidth:s,mainBkg:a}=n,o=e.append("defs").append("marker").attr("id",r+"_"+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",`${s}`),o.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);const l=e.append("defs").append("marker").attr("id",r+"_"+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");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),Rj=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
436      L20,10
437      M20,10
438      L0,20`)},"requirement_arrow"),qj=b((e,t,r)=>{const i=me(),{themeVariables:n}=i,{strokeWidth:s}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
439      L20,10
440      M20,10
441      L0,20`).attr("stroke-linejoin","miter")}
vendor: 6,248 bytes, line 441
441,"requirement_arrow_neo"),zj=b((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Wj=b((e,t,r)=>{const i=me(),{themeVariables:n}=i,{strokeWidth:s}=n,a=e.append("defs").append("marker").attr("id",r+"_"+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",`${s}`)},"requirement_contains_neo"),Hj={extension:wj,composition:vj,aggregation:Sj,dependency:Tj,lollipop:_j,point:Bj,circle:Lj,cross:Aj,barb:Fj,barbNeo:Ej,only_one:Nj,zero_or_one:Mj,one_or_more:$j,zero_or_more:jj,only_one_neo:Ij,zero_or_one_neo:Dj,one_or_more_neo:Pj,zero_or_more_neo:Oj,requirement_arrow:Rj,requirement_contains:zj,requirement_arrow_neo:qj,requirement_contains_neo:Wj},A1=kj,F1=typeof global=="object"&&global&&global.Object===Object&&global,Uj=typeof self=="object"&&self&&self.Object===Object&&self,Vr=F1||Uj||Function("return this")(),Ar=Vr.Symbol,E1=Object.prototype,Yj=E1.hasOwnProperty,Vj=E1.toString,Zn=Ar?Ar.toStringTag:void 0;function Gj(e){var t=Yj.call(e,Zn),r=e[Zn];try{e[Zn]=void 0;var i=!0}catch{}var n=Vj.call(e);return i&&(t?e[Zn]=r:delete e[Zn]),n}var Xj=Object.prototype,Qj=Xj.toString;function Kj(e){return Qj.call(e)}var Zj="[object Null]",Jj="[object Undefined]",Df=Ar?Ar.toStringTag:void 0;function In(e){return e==null?e===void 0?Jj:Zj:Df&&Df in Object(e)?Gj(e):Kj(e)}function Di(e){return e!=null&&typeof e=="object"}var tI="[object Symbol]";function Du(e){return typeof e=="symbol"||Di(e)&&In(e)==tI}function N1(e,t){for(var r=-1,i=e==null?0:e.length,n=Array(i);++r<i;)n[r]=t(e[r],r,e);return n}var Xe=Array.isArray,Pf=Ar?Ar.prototype:void 0,Of=Pf?Pf.toString:void 0;function M1(e){if(typeof e=="string")return e;if(Xe(e))return N1(e,M1)+"";if(Du(e))return Of?Of.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Pu(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function zo(e){return e}var eI="[object AsyncFunction]",rI="[object Function]",iI="[object GeneratorFunction]",nI="[object Proxy]";function mo(e){if(!Pu(e))return!1;var t=In(e);return t==rI||t==iI||t==eI||t==nI}var jl=Vr["__core-js_shared__"],Rf=(function(){var e=/[^.]+$/.exec(jl&&jl.keys&&jl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function sI(e){return!!Rf&&Rf in e}var aI=Function.prototype,oI=aI.toString;function Hi(e){if(e!=null){try{return oI.call(e)}catch{}try{return e+""}catch{}}return""}var lI=/[\\^$.*+?()[\]{}|]/g,cI=/^\[object .+?Constructor\]$/,hI=Function.prototype,uI=Object.prototype,dI=hI.toString,pI=uI.hasOwnProperty,fI=RegExp("^"+dI.call(pI).replace(lI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function gI(e){if(!Pu(e)||sI(e))return!1;var t=mo(e)?fI:cI;return t.test(Hi(e))}function mI(e,t){return e==null?void 0:e[t]}function Ui(e,t){var r=mI(e,t);return gI(r)?r:void 0}var ah=Ui(Vr,"WeakMap");function yI(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function xI(){}var bI=800,CI=16,kI=Date.now;function wI(e){var t=0,r=0;return function(){var i=kI(),n=CI-(i-r);if(r=i,n>0){if(++t>=bI)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function cs(e){return function(){return e}}var qf=(function(){try{var e=Ui(Object,"defineProperty");return e({},"",{}),e}catch{}})(),vI=qf?function(e,t){return qf(e,"toString",{configurable:!0,enumerable:!1,value:cs(t),writable:!0})}:zo,SI=wI(vI);function TI(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function _I(e,t,r,i){for(var n=e.length,s=r+-1;++s<n;)if(t(e[s],s,e))return s;return-1}function BI(e){return e!==e}function LI(e,t,r){for(var i=r-1,n=e.length;++i<n;)if(e[i]===t)return i;return-1}function AI(e,t,r){return t===t?LI(e,t,r):_I(e,BI,r)}function FI(e,t){var r=e==null?0:e.length;return!!r&&AI(e,t,0)>-1}var EI=9007199254740991,NI=/^(?:0|[1-9]\d*)$/;function $1(e,t){var r=typeof e;return t=t??EI,!!t&&(r=="number"||r!="symbol"&&NI.test(e))&&e>-1&&e%1==0&&e<t}function j1(e,t){return e===t||e!==e&&t!==t}var zf=Math.max;function MI(e,t,r){return t=zf(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,s=zf(i.length-t,0),a=Array(s);++n<s;)a[n]=i[t+n];n=-1;for(var o=Array(t+1);++n<t;)o[n]=i[n];return o[t]=r(a),yI(e,this,o)}}function $I(e,t){return SI(MI(e,t,zo),e+"")}var jI=9007199254740991;function Ou(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=jI}function Wo(e){return e!=null&&Ou(e.length)&&!mo(e)}var II=Object.prototype;function I1(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||II;return e===r}function DI(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var PI="[object Arguments]";function Wf(e){return Di(e)&&In(e)==PI}var D1=Object.prototype,OI=D1.hasOwnProperty,RI=D1.propertyIsEnumerable,Ho=Wf((function(){return arguments})())?Wf:function(e){return Di(e)&&OI.call(e,"callee")&&!RI.call(e,"callee")};function qI(){return!1}var P1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hf=P1&&typeof module=="object"&&module&&!module.nodeType&&module,zI=Hf&&Hf.exports===P1,Uf=zI?Vr.Buffer:void 0,WI=Uf?Uf.isBuffer:void 0,yo=WI||qI,HI="[object Arguments]",UI="[object Array]",YI="[object Boolean]",VI="[object Date]",GI="[object Error]",XI="[object Function]",QI="[object Map]",KI="[object Number]",ZI="[object Object]",JI="[object RegExp]",tD="[object Set]",eD="[object String]",rD="[object WeakMap]",iD="[object ArrayBuffer]",nD="[object DataView]",sD="[object Float32Array]",aD="[object Float64Array
441]",oD="[object Int8Array]",lD="[object Int16Array]",cD="[object Int32Array]",hD="[object Uint8Array]",uD="[object Uint8ClampedArray]",dD="[object Uint16Array]",pD="[object Uint32Array]",ue={};ue[sD]=ue[aD]=ue[oD]=ue[lD]=ue[cD]=ue[hD]=ue[uD]=ue[dD]=ue[pD]=!0;ue[HI]=ue[UI]=ue[iD]=ue[YI]=ue[nD]=ue[VI]=ue[GI]=ue[XI]=ue[QI]=ue[KI]=ue[ZI]=ue[JI]=ue[tD]=ue[eD]=ue[rD]=!1;function fD(e){return Di(e)&&Ou(e.length)&&!!ue[In(e)]}function gD(e){return function(t){return e(t)}}var O1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_s=O1&&typeof module=="object"&&module&&!module.nodeType&&module,mD=_s&&_s.exports===O1,Il=mD&&F1.process,Yf=(function(){try{var e=_s&&_s.require&&_s.require("util").types;return e||Il&&Il.binding&&Il.binding("util")}catch{}})(),Vf=Yf&&Yf.isTypedArray,Ru=Vf?gD(Vf):fD,yD=Object.prototype,xD=yD.hasOwnProperty;function bD(e,t){var r=Xe(e),i=!r&&Ho(e),n=!r&&!i&&yo(e),s=!r&&!i&&!n&&Ru(e),a=r||i||n||s,o=a?DI(e.length,String):[],l=o.length;for(var c in e)(t||xD.call(e,c))&&!(a&&(c=="length"||n&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||$1(c,l)))&&o.push(c);return o}function CD(e,t){return function(r){return e(t(r))}}var kD=CD(Object.keys,Object),wD=Object.prototype,vD=wD.hasOwnProperty;function R1(e){if(!I1(e))return kD(e);var t=[];for(var r in Object(e))vD.call(e,r)&&r!="constructor"&&t.push(r);return t}function Tr(e){return Wo(e)?bD(e):R1(e)}var SD=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,TD=/^\w*$/;function qu(e,t){if(Xe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Du(e)?!0:TD.test(e)||!SD.test(e)||t!=null&&e in Object(t)}var Is=Ui(Object,"create");function _D(){this.__data__=Is?Is(null):{},this.size=0}function BD(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var LD="__lodash_hash_undefined__",AD=Object.prototype,FD=AD.hasOwnProperty;function ED(e){var t=this.__data__;if(Is){var r=t[e];return r===LD?void 0:r}return FD.call(t,e)?t[e]:void 0}var ND=Object.prototype,MD=ND.hasOwnProperty;function $D(e){var t=this.__data__;return Is?t[e]!==void 0:MD.call(t,e)}var jD="__lodash_hash_undefined__";function ID(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Is&&t===void 0?jD:t,this}function Pi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Pi.prototype.clear=_D;Pi.prototype.delete=BD;Pi.prototype.get=ED;Pi.prototype.has=$D;Pi.prototype.set=ID;function DD(){this.__data__=[],this.size=0}function Uo(e,t){for(var r=e.length;r--;)if(j1(e[r][0],t))return r;return-1}var PD=Array.prototype,OD=PD.splice;function RD(e){var t=this.__data__,r=Uo(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():OD.call(t,r,1),--this.size,!0}function qD(e){var t=this.__data__,r=Uo(t,e);return r<0?void 0:t[r][1]}function zD(e){return Uo(this.__data__,e)>-1}function WD(e,t){var r=this.__data__,i=Uo(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Gr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Gr.prototype.clear=DD;Gr.prototype.delete=RD;Gr.prototype.get=qD;Gr.prototype.has=zD;Gr.prototype.set=WD;var Ds=Ui(Vr,"Map");function HD(){this.size=0,this.__data__={hash:new Pi,map:new(Ds||Gr),string:new Pi}}function UD(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Yo(e,t){var r=e.__data__;return UD(t)?r[typeof t=="string"?"string":"hash"]:r.map}function YD(e){var t=Yo(this,e).delete(e);return this.size-=t?1:0,t}function VD(e){return Yo(this,e).get(e)}function GD(e){return Yo(this,e).has(e)}function XD(e,t){var r=Yo(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Xr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Xr.prototype.clear=HD;Xr.prototype.delete=YD;Xr.prototype.get=VD;Xr.prototype.has=GD;Xr.prototype.set=XD;var QD="Expected a function";function zu(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(QD);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var a=e.apply(this,i);return r.cache=s.set(n,a)||s,a};return r.cache=new(zu.Cache||Xr),r}zu.Cache=Xr;var KD=500;function ZD(e){var t=zu(e,function(i){return r.size===KD&&r.clear(),i}),r=t.cache;return t}var JD=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tP=/\\(\\)?/g,eP=ZD(function(e){var t=[];
vendor: 5,457 bytes, line 441
441return e.charCodeAt(0)===46&&t.push(""),e.replace(JD,function(r,i,n,s){t.push(n?s.replace(tP,"$1"):i||r)}),t});function rP(e){return e==null?"":M1(e)}function q1(e,t){return Xe(e)?e:qu(e,t)?[e]:eP(rP(e))}function Vo(e){if(typeof e=="string"||Du(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function z1(e,t){t=q1(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Vo(t[r++])];return r&&r==i?e:void 0}function iP(e,t,r){var i=e==null?void 0:z1(e,t);return i===void 0?r:i}function W1(e,t){for(var r=-1,i=t.length,n=e.length;++r<i;)e[n+r]=t[r];return e}var Gf=Ar?Ar.isConcatSpreadable:void 0;function nP(e){return Xe(e)||Ho(e)||!!(Gf&&e&&e[Gf])}function sP(e,t,r,i,n){var s=-1,a=e.length;for(r||(r=nP),n||(n=[]);++s<a;){var o=e[s];r(o)?W1(n,o):i||(n[n.length]=o)}return n}function aP(e,t,r,i){var n=-1,s=e==null?0:e.length;for(i&&s&&(r=e[++n]);++n<s;)r=t(r,e[n],n,e);return r}function oP(){this.__data__=new Gr,this.size=0}function lP(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function cP(e){return this.__data__.get(e)}function hP(e){return this.__data__.has(e)}var uP=200;function dP(e,t){var r=this.__data__;if(r instanceof Gr){var i=r.__data__;if(!Ds||i.length<uP-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Xr(i)}return r.set(e,t),this.size=r.size,this}function Wr(e){var t=this.__data__=new Gr(e);this.size=t.size}Wr.prototype.clear=oP;Wr.prototype.delete=lP;Wr.prototype.get=cP;Wr.prototype.has=hP;Wr.prototype.set=dP;function H1(e,t){for(var r=-1,i=e==null?0:e.length,n=0,s=[];++r<i;){var a=e[r];t(a,r,e)&&(s[n++]=a)}return s}function pP(){return[]}var fP=Object.prototype,gP=fP.propertyIsEnumerable,Xf=Object.getOwnPropertySymbols,mP=Xf?function(e){return e==null?[]:(e=Object(e),H1(Xf(e),function(t){return gP.call(e,t)}))}:pP;function yP(e,t,r){var i=t(e);return Xe(e)?i:W1(i,r(e))}function Qf(e){return yP(e,Tr,mP)}var oh=Ui(Vr,"DataView"),lh=Ui(Vr,"Promise"),on=Ui(Vr,"Set"),Kf="[object Map]",xP="[object Object]",Zf="[object Promise]",Jf="[object Set]",tg="[object WeakMap]",eg="[object DataView]",bP=Hi(oh),CP=Hi(Ds),kP=Hi(lh),wP=Hi(on),vP=Hi(ah),qr=In;(oh&&qr(new oh(new ArrayBuffer(1)))!=eg||Ds&&qr(new Ds)!=Kf||lh&&qr(lh.resolve())!=Zf||on&&qr(new on)!=Jf||ah&&qr(new ah)!=tg)&&(qr=function(e){var t=In(e),r=t==xP?e.constructor:void 0,i=r?Hi(r):"";if(i)switch(i){case bP:return eg;case CP:return Kf;case kP:return Zf;case wP:return Jf;case vP:return tg}return t});var rg=Vr.Uint8Array,SP="__lodash_hash_undefined__";function TP(e){return this.__data__.set(e,SP),this}function _P(e){return this.__data__.has(e)}function Ps(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Xr;++t<r;)this.add(e[t])}Ps.prototype.add=Ps.prototype.push=TP;Ps.prototype.has=_P;function BP(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function U1(e,t){return e.has(t)}var LP=1,AP=2;function Y1(e,t,r,i,n,s){var a=r&LP,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var c=s.get(e),h=s.get(t);if(c&&h)return c==t&&h==e;var u=-1,p=!0,d=r&AP?new Ps:void 0;for(s.set(e,t),s.set(t,e);++u<o;){var g=e[u],y=t[u];if(i)var C=a?i(y,g,u,t,e,s):i(g,y,u,e,t,s);if(C!==void 0){if(C)continue;p=!1;break}if(d){if(!BP(t,function(x,w){if(!U1(d,w)&&(g===x||n(g,x,r,i,s)))return d.push(w)})){p=!1;break}}else if(!(g===y||n(g,y,r,i,s))){p=!1;break}}return s.delete(e),s.delete(t),p}function FP(e){var t=-1,r=Array(e.size);return e.forEach(function(i,n){r[++t]=[n,i]}),r}function Wu(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var EP=1,NP=2,MP="[object Boolean]",$P="[object Date]",jP="[object Error]",IP="[object Map]",DP="[object Number]",PP="[object RegExp]",OP="[object Set]",RP="[object String]",qP="[object Symbol]",zP="[object ArrayBuffer]",WP="[object DataView]",ig=Ar?Ar.prototype:void 0,Dl=ig?ig.valueOf:void 0;function HP(e,t,r,i,n,s,a){switch(r){case WP:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case zP:return!(e.byteLength!=t.byteLength||!s(new rg(e),new rg(t)));case MP:case $P:case DP:return j1(+e,+t);case jP:return e.name==t.name&&e.message==t.message;case PP:case RP:return e==t+"";case IP:var o=FP;case OP:var l=i&EP;if(o||(o=Wu),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;i|=NP,a.set(e,t);var h=Y1(o(e),o(t),i,n,s,a);return a.delete(e),h;case qP:if(Dl)return Dl.call(e)==Dl.call(t)}return!1}var UP=1,YP=Object.prototype,VP=YP.hasOwnProperty;function GP(e,t,r,i,n,s){var a=r&UP,o=Qf(e),l=o.length,c=Qf(t),h=c.length;if(l!=h&&!a)return!1;for(var u=l;u--;){var p=o[u];if(!(a?p in t:VP.call(t,p)))return!1}var d=s.get(e),g=s.get(t);if(d&&g)return d==t&&g==e;var y=!0;s.set(e,t),s.set(t,e);for(var C=a;++u<l;){p=o[u];var x=e[p],w=t[p];if(i)var k=a?i(w,x,p,t,e,s):i(x,w,p,e,t,s);if(!(k===void 0?x===w||n(x,w,r,i,s):k)){y=!1;break}C||(C=p=="constructor")}if(y&&!C){var v=e.constructor,T=t.constructor;v!=T&&"constructor"in e&&"constructor"in t&&!(typeof v=="function"&&v instanceof v&&typeof T=="function"&&T instanceof T)&&(y=!1)}return s.delete(e),s.delete(t),y}var XP=1,ng="[object Arguments]",sg="[object Array]",ga="[object Object]",QP=Object.prototype,ag=QP.hasOwnProperty;function KP(e,t,r,i,n,s){var a=Xe(e),o=Xe(t),l=a?sg:qr(e),c=o?sg:qr(t);l=l==ng?ga:l,c=c==ng?ga:c;var h=l==ga,u=c==ga,p=l==c;if(p&&yo(e)){if(!yo(t))return!1;a=!0,h=!1}if(p&&!h)return s||(s=new Wr),a||Ru(e)?Y1(e,t,r,i,n,s):HP(e,t,l,r,i,n,s);if(!(r&XP)){var d=h&&ag.call(e,"__wrapped__"),g=u&&ag.call(t,"__wrapped__");
441if(d||g){var y=d?e.value():e,C=g?t.value():t;return s||(s=new Wr),n(y,C,r,i,s)}}return p?(s||(s=new Wr),GP(e,t,r,i,n,s)):!1}function Hu(e,t,r,i,n){return e===t?!0:e==null||t==null||!Di(e)&&!Di(t)?e!==e&&t!==t:KP(e,t,r,i,Hu,n)}var ZP=1,JP=2;function tO(e,t,r,i){var n=r.length,s=n;if(e==null)return!s;for(e=Object(e);n--;){var a=r[n];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++n<s;){a=r[n];var o=a[0],l=e[o],c=a[1];if(a[2]){if(l===void 0&&!(o in e))return!1}else{var h=new Wr,u;if(!(u===void 0?Hu(c,l,ZP|JP,i,h):u))return!1}}return!0}function V1(e){return e===e&&!Pu(e)}function eO(e){for(var t=Tr(e),r=t.length;r--;){var i=t[r],n=e[i];t[r]=[i,n,V1(n)]}return t}function G1(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function rO(e){var t=eO(e);return t.length==1&&t[0][2]?G1(t[0][0],t[0][1]):function(r){return r===e||tO(r,e,t)}}function iO(e,t){return e!=null&&t in Object(e)}function nO(e,t,r){t=q1(t,e);for(var i=-1,n=t.length,s=!1;++i<n;){var a=Vo(t[i]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++i!=n?s:(n=e==null?0:e.length,!!n&&Ou(n)&&$1(a,n)&&(Xe(e)||Ho(e)))}function sO(e,t){return e!=null&&nO(e,t,iO)}var aO=1,oO=2;function lO(e,t){return qu(e)&&V1(t)?G1(Vo(e),t):function(r){var i=iP(r,e);return i===void 0&&i===t?sO(r,e):Hu(t,i,aO|oO)}}function cO(e){return function(t){return t==null?void 0:t[e]}}function hO(e){return function(t){return z1(t,e)}}function uO(e){return qu(e)?cO(Vo(e)):hO(e)}function X1(e){return typeof e=="function"?e:e==null?zo:typeof e=="object"?Xe(e)?lO(e[0],e[1]):rO(e):uO(e)}function dO(e){return function(t,r,i){for(var n=-1,s=Object(t),a=i(t),o=a.length;o--;){var l=a[++n];if(r(s[l],l,s)===!1)break}return t}}var pO=dO();function fO(e,t){return e&&pO(e,t,Tr)}function gO(e,t){return function(r,i){if(r==null)return r;if(!Wo(r))return e(r,i);for(var n=r.length,s=-1,a=Object(r);++s<n&&i(a[s],s,a)!==!1;);return r}}var Uu=gO(fO);function mO(e){return Di(e)&&Wo(e)}function yO(e){return typeof e=="function"?e:zo}function yi(e,t){var r=Xe(e)?TI:Uu;return r(e,yO(t))}function xO(e,t){var r=[];return Uu(e,function(i,n,s){t(i,n,s)&&r.push(i)}),r}function ma(e,t){var r=Xe(e)?H1:xO;return r(e,X1(t))}function bO(e,t){return N1(t,function(r){return e[r]})}function Pl(e){return e==null?[]:bO(e,Tr(e))}var CO="[object Map]",kO="[object Set]",wO=Object.prototype,vO=wO.hasOwnProperty;function og(e){if(e==null)return!0;if(Wo(e)&&(Xe(e)||typeof e=="string"||typeof e.splice=="function"||yo(e)||Ru(e)||Ho(e)))return!e.length;var t=qr(e);if(t==CO||t==kO)return!e.size;if(I1(e))return!R1(e).length;for(var r in e)if(vO.call(e,r))return!1;return!0}function rn(e){return e===void 0}function SO(e,t,r,i,n){return n(e,function(s,a,o){r=i?(i=!1,s):t(r,s,a,o)}),r}function TO(e,t,r){var i=Xe(e)?aP:SO,n=arguments.length<3;return i(e,X1(t),r,n,Uu)}var _O=1/0,BO=on&&1/Wu(new on([,-0]))[1]==_O?function(e){return new on(e)}:xI,LO=200;function AO(e,t,r){var i=-1,n=FI,s=e.length,a=!0,o=[],l=o;if(s>=LO){var c=BO(e);if(c)return Wu(c);a=!1,n=U1,l=new Ps}else l=o;t:for(;++i<s;){var h=e[i],u=h;if(h=h!==0?h:0,a&&u===u){for(var p=l.length;p--;)if(l[p]===u)continue t;o.push(h)}else n(l,u,r)||(l!==o&&l.push(u),o.push(h))}return o}var FO=$I(function(e){return AO(sP(e,1,mO,!0))}),EO="\0",xi="\0",lg="�";class Go{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=cs(void 0),this._defaultEdgeLabelFn=cs(void 0),this._nodes={}
vendor: 1,328 bytes, line 441
441,this._isCompound&&(this._parent={},this._children={},this._children[xi]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return mo(t)||(t=cs(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Tr(this._nodes)}sources(){var t=this;return ma(this.nodes(),function(r){return og(t._in[r])})}sinks(){var t=this;return ma(this.nodes(),function(r){return og(t._out[r])})}setNodes(t,r){var i=arguments,n=this;return yi(t,function(s){i.length>1?n.setNode(s,r):n.setNode(s)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=xi,this._children[t]={},this._children[xi][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);
vendor: 4,905 bytes, line 441
441delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],yi(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),yi(Tr(this._in[t]),r),delete this._in[t],delete this._preds[t],yi(Tr(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(rn(r))r=xi;else{r+="";for(var i=r;!rn(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==xi)return r}}children(t){if(rn(t)&&(t=xi),this._isCompound){var r=this._children[t];if(r)return Tr(r)}else{if(t===xi)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return Tr(r)}successors(t){var r=this._sucs[t];if(r)return Tr(r)}neighbors(t){var r=this.predecessors(t);if(r)return FO(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;yi(this._nodes,function(a,o){t(o)&&r.setNode(o,a)}),yi(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var n={};function s(a){var o=i.parent(a);return o===void 0||r.hasNode(o)?(n[a]=o,o):o in n?n[o]:s(o)}return this._isCompound&&yi(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(t){return mo(t)||(t=cs(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return Pl(this._edgeObjs)}setPath(t,r){var i=this,n=arguments;return TO(t,function(s,a){return n.length>1?i.setEdge(s,a,r):i.setEdge(s,a),a}),this}setEdge(){var t,r,i,n,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,i=a.name,arguments.length===2&&(n=arguments[1],s=!0)):(t=a,r=arguments[1],i=arguments[3],arguments.length>2&&(n=arguments[2],s=!0)),t=""+t,r=""+r,rn(i)||(i=""+i);var o=hs(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return s&&(this._edgeLabels[o]=n),this;if(!rn(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[o]=s?n:this._defaultEdgeLabelFn(t,r,i);var l=NO(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,cg(this._preds[r],t),cg(this._sucs[t],r),this._in[r][o]=l,this._out[t][o]=l,this._edgeCount++,this}edge(t,r,i){var n=arguments.length===1?Ol(this._isDirected,arguments[0]):hs(this._isDirected,t,r,i);return this._edgeLabels[n]}hasEdge(t,r,i){var n=arguments.length===1?Ol(this._isDirected,arguments[0]):hs(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,n)}removeEdge(t,r,i){var n=arguments.length===1?Ol(this._isDirected,arguments[0]):hs(this._isDirected,t,r,i),s=this._edgeObjs[n];return s&&(t=s.v,r=s.w,delete this._edgeLabels[n],delete this._edgeObjs[n],hg(this._preds[r],t),hg(this._sucs[t],r),delete this._in[r][n],delete this._out[t][n],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var n=Pl(i);return r?ma(n,function(s){return s.v===r}):n}}outEdges(t,r){var i=this._out[t];if(i){var n=Pl(i);return r?ma(n,function(s){return s.w===r}):n}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}Go.prototype._nodeCount=0;Go.prototype._edgeCount=0;function cg(e,t){e[t]?e[t]++:e[t]=1}function hg(e,t){--e[t]||delete e[t]}function hs(e,t,r,i){var n=""+t,s=""+r;if(!e&&n>s){var a=n;n=s,s=a}return n+lg+s+lg+(rn(i)?EO:i)}function NO(e,t,r,i){var n=""+t,s=""+r;if(!e&&n>s){var a=n;n=s,s=a}var o={v:n,w:s};return i&&(o.name=i),o}function Ol(e,t){return hs(e,t.v,t.w,t.name)}function Q1(e,{edgePathsClass:t="edges edgePaths"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),n=r.insert("g").attr("class",t),s=r.insert("g").attr("class","edgeLabels"),a=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:n,edgeLabels:s,nodes:a,rootGroups:r}}b(Q1,"createLayoutElementGroups");async function K1(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await It(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}b(K1,"measureGroupLabel");async function Z1(e,t,r){var s;const i=await ju(e,t,r),n=((s=i.node())==null?void 0:s.getBBox())??{width:0,height:0};return t.width=n.width,t.height=n.height,i}b(Z1,"insertMeasuredNode");async function J1(e,t){const r=new Go({multigraph:!0,compound:!0}),i=[...t.edges],n=Gt(),s=Q1(e),{edgeLabels:a,nodes:o}=s,l=new Map,c=e.node()!=null;
441await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await K1(o,h),r.setNode(h.id,{...h});else{if(c){const u=await Z1(o,h,{config:n,dir:h.dir});l.set(h.id,u)}r.setNode(h.id,{...h})}}));for(const h of i)c&&S1(h)&&await Iu(a,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(p=>p.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await Vt(async()=>{const{captureNodeSizes:u}=await import("./sizeCapture-INFHLROL-BhufiikL.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));h(e,t)}return{graph:r,groups:s,nodeElements:l}}b(J1,"createGraphWithElements");var Kt=new Map,Bi=new Map,tC=new Map,MO=b(()=>{Bi.clear(),tC.clear(),Kt.clear()},"clear"),Os=b((e,t)=>{const r=Bi.get(t)||[];return et.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),$O=b((e,t)=>{const r=Bi.get(t)||[];return et.info("Descendants of ",t," is ",r),et.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||Os(e.v,t)||Os(e.w,t)||r.includes(e.w):(et.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),eC=b((e,t,r,i)=>{et.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const n=t.children(e)||[];e!==i&&n.push(e),et.debug("Copying (nodes) clusterId",e,"nodes",n),n.forEach(s=>{if(t.children(s).length>0)eC(s,t,r,i);else{const a=t.node(s);et.info("cp ",s," to ",i," with parent ",e),r.setNode(s,a),i!==t.parent(s)&&(et.debug("Setting parent",s,t.parent(s)),r.setParent(s,t.parent(s))),e!==i&&s!==e?(et.debug("Setting parent",s,e),r.setParent(s,e)):(et.info("In copy ",e,"root",i,"data",t.node(e),i),et.debug("Not Setting parent for node=",s,"cluster!==rootId",e!==i,"node!==clusterId",s!==e));const o=t.edges(s);et.debug("Copying Edges",o),o.forEach(l=>{et.info("Edge",l);const c=t.edge(l.v,l.w,l.name);et.info("Edge data",c,i);try{$O(l,i)?(et.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),et.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):et.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){et.error(h)}})}et.debug("Removing node",s),t.removeNode(s)})},"copy"),rC=b((e,t)=>{const r=t.children(e);let i=[...r];for(const n of r)tC.set(n,e),i=[...i,...rC(n,t)];return i},"extractDescendants"),jO=b((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),n=e.edges().filter(l=>l.v===r||l.w===r),s=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),a=n.map(l=>({v:l.v,w:l.w}));return s.filter(l=>a.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),xo=b((e,t,r)=>{const i=t.children(e);if(et.trace("Searching children of id ",e,i),i.length<1)return e;let n;for(const s of i){const a=xo(s,t,r),o=jO(t,r,a);if(a)if(o.length>0)n=a;else return a}return n},"findNonClusterChild"),ug=b(e=>!Kt.has(e)||!Kt.get(e).externalConnections?e:Kt.has(e)?Kt.get(e).id:e,"getAnchorId"),W7=b((e,t)=>{var r;if(!e||t>10){et.debug("Opting out, no graph ");return}else et.debug("Opting in, graph ");e.nodes().forEach(function(i){e.children(i).length>0&&(et.debug("Cluster identified",i," Replacement id in edges: ",xo(i,e,i)),Bi.set(i,rC(i,e)),Kt.set(i,{id:xo(i,e,i),clusterData:e.node(i)}))}),e.nodes().forEach(function(i){const n=e.children(i),s=e.edges();n.length>
4410?(et.debug("Cluster identified",i,Bi),s.forEach(a=>{const o=Os(a.v,i),l=Os(a.w,i);o^l&&(et.debug("Edge: ",a," leaves cluster ",i),et.debug("Descendants of XXX ",i,": ",Bi.get(i)),Kt.get(i).externalConnections=!0)})):et.debug("Not a cluster ",i,Bi)});for(let i of Kt.keys()){const n=Kt.get(i).id,s=e.parent(n);s!==i&&Kt.has(s)&&!Kt.get(s).externalConnections&&(Kt.get(i).id=s);const a=e.edges().some(o=>o.v===i);if(n&&((r=Kt.get(i))!=null&&r.externalConnections)&&a&&sC(e,n,i)){const o=IO(e,i,e.parent(n));o&&(Kt.get(i).id=o)}}e.edges().forEach(function(i){const n=e.edge(i);et.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),et.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(e.edge(i)));let s=i.v,a=i.w;if(et.debug("Fix XXX",Kt,"ids:",i.v,i.w,"Translating: ",Kt.get(i.v)," --- ",Kt.get(i.w)),Kt.get(i.v)||Kt.get(i.w)){if(et.debug("Fixing and trying - removing XXX",i.v,i.w,i.name),s=ug(i.v),a=ug(i.w),e.removeEdge(i.v,i.w,i.name),s!==i.v){const o=e.parent(s);Kt.get(o).externalConnections=!0,n.fromCluster=i.v}if(a!==i.w){const o=e.parent(a);Kt.get(o).externalConnections=!0,n.toCluster=i.w}et.debug("Fix Replacing with XXX",s,a,i.name),e.setEdge(s,a,n,i.name)}}),iC(e,0),et.trace(Kt)},"adjustClustersAndEdges"),iC=b((e,t)=>{var n,s;if(t>10){et.error("Bailing out");return}let r=e.nodes(),i=!1;for(const a of r){const o=e.children(a);i=i||o.length>0}if(!i){et.debug("Done, no node has children",e.nodes());return}et.debug("Nodes = ",r,t);for(const a of r)if(et.debug("Extracting node",a,Kt,Kt.has(a)&&!Kt.get(a).externalConnections,!e.parent(a),e.node(a),e.children("D")," Depth ",t),!Kt.has(a))et.debug("Not a cluster",a,t);else if(!Kt.get(a).externalConnections&&e.children(a)&&e.children(a).length>0){et.debug("Cluster without external connections, without a parent and with children",a,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(s=(n=Kt.get(a))==null?void 0:n.clusterData)!=null&&s.dir&&(l=Kt.get(a).clusterData.dir,et.debug("Fixing dir",Kt.get(a).clusterData.dir,l));const c=new Go({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});eC(a,e,c,a),e.setNode(a,{clusterNode:!0,id:a,clusterData:Kt.get(a).clusterData,label:Kt.get(a).label,graph:c})}else et.debug("Cluster ** ",a," **not meeting the criteria !externalConnections:",!Kt.get(a).externalConnections," no parent: ",!e.parent(a)," children ",e.children(a)&&e.children(a).length>0,e.children("D"),t),et.debug(Kt);r=e.nodes(),et.debug("New list of nodes",r);for(const a of r){const o=e.node(a);et.debug(" Now next level",a,o),o!=null&&o.clusterNode&&iC(o.graph,t+1)}},"extractor"),nC=b((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const n=e.children(i),s=nC(e,n);r=[...r,...s]}),r},"sorter"),H7=b(e=>nC(e,e.children()),"sortNodesByHierarchy"),sC=b((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const n=Kt.get(i);if(n&&!n.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),IO=b((e,t,r)=>{const i=e.children(t)??[];for(const n of i){if(n===r||Os(n,r))continue;const s=xo(n,e,t);if(s&&!sC(e,s,t))return s}return null},"findSafeAnchorNode");function DO({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:n,paintOptions:s}){const a=t??oC;return b(async function(l,c,h,u){const p=c.select("g");((h==null?void 0:h.insertMarkers)??A1)(p,l.markers,l.type,l.diagramId),aC();const d={element:p,helpers:h,options:u};d.preparedLayout=await(e==null?void 0:e(l,d));const g=await a(l,d),y=await r(l,d),C={...d,measure:g};i?await i(l,C,y):await lC(l,C,s),await(n==null?void 0:n(l,C,y))},"render")}b(DO,"createCommonLayoutRenderer");function aC(){tj(),fj(),lj(),MO()}b(aC,"clearLayoutRenderState");async function oC(e,{element:t}){return await J1(t,e)}b(oC,"defaultMeasureLayout");async function lC(e,t,r={}){var a,o;const{measure:i}=t,{groups:n}=i;for(const l of((a=r.getNodes)==null?void 0:a.call(r,e,t))??e.nodes)(o=r.skipNode)!=null&&o.call(r,l,t)||await cC(n,l,t,r);const s=uC(e.nodes);for(const l of e.edges)dC(l,r)||await pC(n,l,s,e,r,t)}b(lC,"paintLayoutData");async function cC(e,t,r,i){t.clusterNode?Nf(t):hC(t,r,i)?await v1(e.clusters,t):Nf(t)}
441b(cC,"paintLayoutNode");function hC(e,t,r){var i;return e.isGroup===!0&&(((i=r.isCluster)==null?void 0:i.call(r,e,t))??!0)}b(hC,"shouldPaintAsCluster");function uC(e){const t=new Map;for(const r of e)r!=null&&r.id&&t.set(r.id,r);return t}b(uC,"buildNodeLookup");function dC(e,t){var r;return e.isLayoutOnly||!!((r=t.skipEdge)!=null&&r.call(t,e))}b(dC,"shouldSkipPaintEdge");async function pC(e,t,r,i,n,s){const a=_1(e.edgePaths,{...t},n.clusterDb??new Map,i.type,ch(t.start,t,r,s,n),ch(t.end,t,r,s,n),i.diagramId,fC(t,n));S1(t)&&(An.has(t.id)||await Iu(e.edgeLabels,t),gC(t,a))}b(pC,"paintLayoutEdge");function ch(e,t,r,i,n){var s;return((s=n.getEdgeNode)==null?void 0:s.call(n,e,t,i))??(e?r.get(e)??{}:{})}b(ch,"getRenderedNode");function fC(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}b(fC,"shouldSkipIntersect");function gC(e,t){const r=(t==null?void 0:t.updatedPath)??(t==null?void 0:t.originalPath),i=me(),{subGraphTitleTotalMargin:n}=Ro({flowchart:i.flowchart??{}});if(e.label){const s=An.get(e.id);let a=e.x,o=e.y;if(r){const l=Me.calcLabelPosition(r);et.debug("Moving label "+e.label+" from (",a,",",o,") to (",l.x,",",l.y,") abc88"),t!=null&&t.updatedPath&&(a=l.x,o=l.y)}s.attr("transform",`translate(${a}, ${o+n/2})`)}if(e!=null&&e.startLabelLeft){const s=Ce.get(e.id).startLeft;let a=e==null?void 0:e.x,o=e==null?void 0:e.y;if(r){const l=Me.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}if(e.startLabelRight){const s=Ce.get(e.id).startRight;let a=e.x,o=e.y;if(r){const l=Me.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}if(e.endLabelLeft){const s=Ce.get(e.id).endLeft;let a=e.x,o=e.y;if(r){const l=Me.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}if(e.endLabelRight){const s=Ce.get(e.id).endRight;let a=e.x,o=e.y;if(r){const l=Me.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}}b(gC,"positionRenderedEdgeLabel");function mC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}b(mC,"getDefaultExportFromCjs");var Fe={},ya={},Zr={},dg;function Dn(){if(dg)return Zr;dg=1;function e(a){return typeof a>"u"||a===null}b(e,"isNothing");function t(a){return typeof a=="object"&&a!==null}b(t,"isObject");function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}b(r,"toArray");function i(a,o){if(o){const l=Object.keys(o);for(let c=0,h=l.length;c<h;c+=1){const u=l[c];a[u]=o[u]}}return a}b(i,"extend");function n(a,o){let l="";for(let c=0;c<o;c+=1)l+=a;return l}b(n,"repeat");function s(a){return a===0&&Number.NEGATIVE_INFINITY===1/a}return b(s,"isNegativeZero"),Zr.isNothing=e,Zr.isObject=t,Zr.toArray=r,Zr.repeat=n,Zr.isNegativeZero=s,Zr.extend=i,Zr}b(Dn,"requireCommon");var Rl,pg;function Pn(){if(pg)return Rl;pg=1;function e(r,i){let n="";const s=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(n+='in "'+r.mark.name+'" '),n+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(n+=`
442
443`+r.mark.snippet),s+" "+n):s}b(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return b(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=b(function(i){return this.name+": "+e(this,i)},"toString"),Rl=t,Rl}b(Pn,"requireException");var ql,fg;function yC(){if(fg)return ql;fg=1;const e=Dn();function t(n,s,a,o,l){let c="",h="";const u=Math.floor(l/2)-1;return o-s>u&&(c=" ... ",s=o-u+c.length),a-o>u&&(h=" ...",a=o+u-h.length),{str:c+n.slice(s,a).replace(/\t/g,"→")+h,pos:o-s+c.length}}b(t,"getLine");function r(n,s){return e.repeat(" ",s-n.length)+n}b(r,"padStart");function i(n,s){if(s=Object.create(s||null),!n.buffer)return null;s.maxLength||(s.maxLength=79),typeof s.indent!="number"&&(s.indent=1),typeof s.linesBefore!="number"&&(s.linesBefore=3),typeof s.linesAfter!="number"&&(s.linesAfter=2);const a=/\r?\n|\r|\0/g,o=[0],l=[];let c,h=-1;for(;c=a.exec(n.buffer);)l.push(c.index),o.push(c.index+c[0].length),n.position<=c.index&&h<0&&(h=o.length-2);h<0&&(h=o.length-1);let u="";const p=Math.min(n.line+s.linesAfter,l.length).toString().length,d=s.maxLength-(s.indent+p+3);for(let y=1;y<=s.linesBefore&&!(h-y<0);y++){const C=t(n.buffer,o[h-y],l[h-y],n.position-(o[h]-o[h-y]),d);u=e.repeat(" ",s.indent)+r((n.line-y+1).toString(),p)+" | "+C.str+`
444`+u}const g=t(n.buffer,o[h],l[h],n.position,d);u+=e.repeat(" ",s.indent)+r((n.line+1).toString(),p)+" | "+g.str+`
445`,u+=e.repeat("-",s.indent+p+3+g.pos)+`^
446`;for(let y=1;y<=s.linesAfter&&!(h+y>=l.length);y++){const C=t(n.buffer,o[h+y],l[h+y],n.position-(o[h]-o[h+y]),d);u+=e.repeat(" ",s.indent)+r((n.line+y+1).toString(),p)+" | "+C.str+`
447`}return u.replace(/\n$/,"")}return b(i,"makeSnippet"),ql=i,ql}b(yC,"requireSnippet");var zl,gg;function Pe(){if(gg)return zl;gg=1;const e=Pn(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(s){const a={};
vendor: 6,448 bytes, line 447
447return s!==null&&Object.keys(s).forEach(function(o){s[o].forEach(function(l){a[String(l)]=o})}),a}b(i,"compileStyleAliases");function n(s,a){if(a=a||{},Object.keys(a).forEach(function(o){if(t.indexOf(o)===-1)throw new e('Unknown option "'+o+'" is met in definition of "'+s+'" YAML type.')}),this.options=a,this.tag=s,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(o){return o},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=i(a.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+s+'" YAML type.')}return b(n,"Type2"),zl=n,zl}b(Pe,"requireType");var Wl,mg;function Yu(){if(mg)return Wl;mg=1;const e=Pn(),t=Pe();function r(s,a){const o=[];return s[a].forEach(function(l){let c=o.length;o.forEach(function(h,u){h.tag===l.tag&&h.kind===l.kind&&h.multi===l.multi&&(c=u)}),o[c]=l}),o}b(r,"compileList");function i(){const s={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function a(o){o.multi?(s.multi[o.kind].push(o),s.multi.fallback.push(o)):s[o.kind][o.tag]=s.fallback[o.tag]=o}b(a,"collectType");for(let o=0,l=arguments.length;o<l;o+=1)arguments[o].forEach(a);return s}b(i,"compileMap");function n(s){return this.extend(s)}return b(n,"Schema2"),n.prototype.extend=b(function(a){let o=[],l=[];if(a instanceof t)l.push(a);else if(Array.isArray(a))l=l.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(o=o.concat(a.implicit)),a.explicit&&(l=l.concat(a.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");o.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(n.prototype);return c.implicit=(this.implicit||[]).concat(o),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),Wl=n,Wl}b(Yu,"requireSchema");var Hl,yg;function Vu(){if(yg)return Hl;yg=1;const e=Pe();return Hl=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:b(function(t){return t!==null?t:""},"construct")}),Hl}b(Vu,"requireStr");var Ul,xg;function Gu(){if(xg)return Ul;xg=1;const e=Pe();return Ul=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:b(function(t){return t!==null?t:[]},"construct")}),Ul}b(Gu,"requireSeq");var Yl,bg;function Xu(){if(bg)return Yl;bg=1;const e=Pe();return Yl=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:b(function(t){return t!==null?t:{}},"construct")}),Yl}b(Xu,"requireMap");var Vl,Cg;function Qu(){if(Cg)return Vl;Cg=1;const e=Yu();return Vl=new e({explicit:[Vu(),Gu(),Xu()]}),Vl}b(Qu,"requireFailsafe");var Gl,kg;function Ku(){if(kg)return Gl;kg=1;const e=Pe();function t(n){if(n===null)return!0;const s=n.length;return s===1&&n==="~"||s===4&&(n==="null"||n==="Null"||n==="NULL")}b(t,"resolveYamlNull");function r(){return null}b(r,"constructYamlNull");function i(n){return n===null}return b(i,"isNull"),Gl=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:b(function(){return"~"},"canonical"),lowercase:b(function(){return"null"},"lowercase"),uppercase:b(function(){return"NULL"},"uppercase"),camelcase:b(function(){return"Null"},"camelcase"),empty:b(function(){return""},"empty")},defaultStyle:"lowercase"}),Gl}b(Ku,"require_null");var Xl,wg;function Zu(){if(wg)return Xl;wg=1;const e=Pe();function t(n){if(n===null)return!1;const s=n.length;return s===4&&(n==="true"||n==="True"||n==="TRUE")||s===5&&(n==="false"||n==="False"||n==="FALSE")}b(t,"resolveYamlBoolean");function r(n){return n==="true"||n==="True"||n==="TRUE"}b(r,"constructYamlBoolean");function i(n){return Object.prototype.toString.call(n)==="[object Boolean]"}return b(i,"isBoolean"),Xl=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:b(function(n){return n?"true":"false"},"lowercase"),uppercase:b(function(n){return n?"TRUE":"FALSE"},"uppercase"),camelcase:b(function(n){return n?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),Xl}b(Zu,"requireBool");var Ql,vg;function Ju(){if(vg)return Ql;vg=1;const e=Dn(),t=Pe();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}b(r,"isHexCode");function i(c){return c>=48&&c<=55}b(i,"isOctCode");function n(c){return c>=48&&c<=57}b(n,"isDecCode");function s(c){if(c===null)return!1;const h=c.length;let u=0,p=!1;if(!h)return!1;let d=c[u];if((d==="-"||d==="+")&&(d=c[++u]),d==="0"){if(u+1===h)return!0;if(d=c[++u],d==="b"){for(u++;u<h;u++){if(d=c[u],d!=="0"&&d!=="1")return!1;p=!0}return p&&isFinite(a(c))}if(d==="x"){for(u++;u<h;u++){if(!r(c.charCodeAt(u)))return!1;p=!0}return p&&isFinite(a(c))}if(d==="o"){for(u++;u<h;u++){if(!i(c.charCodeAt(u)))return!1;p=!0}return p&&isFinite(a(c))}}for(;u<h;u++){if(!n(c.charCodeAt(u)))return!1;p=!0}return p?isFinite(a(c)):!1}b(s,"resolveYamlInteger");function a(c){let h=c,u=1,p=h[0];if((p==="-"||p==="+")&&(p==="-"&&(u=-1),h=h.slice(1),p=h[0]),h==="0")return 0;if(p==="0"){if(h[1]==="b")return u*parseInt(h.slice(2),2);if(h[1]==="x")return u*parseInt(h.slice(2),16);if(h[1]==="o")return u*parseInt(h.slice(2),8)}return u*parseInt(h,10)}b(a,"parseYamlInteger");function o(c){return a(c)}b(o,"constructYamlInteger");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return b(l,"isInteger"),Ql=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:s,construct:o,predicate:l,represent:{binary:b(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:b(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)}
447,"octal"),decimal:b(function(c){return c.toString(10)},"decimal"),hexadecimal:b(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ql}b(Ju,"requireInt");var Kl,Sg;function td(){if(Sg)return Kl;Sg=1;const e=Dn(),t=Pe(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function n(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}b(n,"resolveYamlFloat");function s(c){let h=c.toLowerCase();const u=h[0]==="-"?-1:1;return"+-".indexOf(h[0])>=0&&(h=h.slice(1)),h===".inf"?u===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:h===".nan"?NaN:u*parseFloat(h,10)}b(s,"constructYamlFloat");const a=/^[-+]?[0-9]+e/;function o(c,h){if(isNaN(c))switch(h){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(h){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(h){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";const u=c.toString(10);return a.test(u)?u.replace("e",".e"):u}b(o,"representYamlFloat");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return b(l,"isFloat"),Kl=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:n,construct:s,predicate:l,represent:o,defaultStyle:"lowercase"}),Kl}b(td,"requireFloat");var Zl,Tg;function ed(){return Tg||(Tg=1,Zl=Qu().extend({implicit:[Ku(),Zu(),Ju(),td()]})),Zl}b(ed,"requireJson");var Jl,_g;function rd(){return _g||(_g=1,Jl=ed()),Jl}b(rd,"requireCore");var tc,Bg;function id(){if(Bg)return tc;Bg=1;const e=Pe(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new 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 i(a){return a===null?!1:t.exec(a)!==null||r.exec(a)!==null}b(i,"resolveYamlTimestamp");function n(a){let o=0,l=null,c=t.exec(a);if(c===null&&(c=r.exec(a)),c===null)throw new Error("Date resolve error");const h=+c[1],u=+c[2]-1,p=+c[3];if(!c[4])return new Date(Date.UTC(h,u,p));const d=+c[4],g=+c[5],y=+c[6];if(c[7]){for(o=c[7].slice(0,3);o.length<3;)o+="0";o=+o}if(c[9]){const x=+c[10],w=+(c[11]||0);l=(x*60+w)*6e4,c[9]==="-"&&(l=-l)}const C=new Date(Date.UTC(h,u,p,d,g,y,o));return l&&C.setTime(C.getTime()-l),C}b(n,"constructYamlTimestamp");function s(a){return a.toISOString()}return b(s,"representYamlTimestamp"),tc=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:n,instanceOf:Date,represent:s}),tc}b(id,"requireTimestamp");var ec,Lg;
447function nd(){if(Lg)return ec;Lg=1;const e=Pe();function t(r){return r==="<<"||r===null}return b(t,"resolveYamlMerge"),ec=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),ec}b(nd,"requireMerge");var rc,Ag;function sd(){if(Ag)return rc;Ag=1;const e=Pe(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
448\r`;function r(a){if(a===null)return!1;let o=0;const l=a.length,c=t;for(let h=0;h<l;h++){const u=c.indexOf(a.charAt(h));if(!(u>64)){if(u<0)return!1;o+=6}}return o%8===0}b(r,"resolveYamlBinary");function i(a){const o=a.replace(/[\r\n=]/g,""),l=o.length,c=t;let h=0;const u=[];for(let d=0;d<l;d++)d%4===0&&d&&(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)),h=h<<6|c.indexOf(o.charAt(d));const p=l%4*6;return p===0?(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)):p===18?(u.push(h>>10&255),u.push(h>>2&255)):p===12&&u.push(h>>4&255),new Uint8Array(u)}b(i,"constructYamlBinary");function n(a){let o="",l=0;const c=a.length,h=t;for(let p=0;p<c;p++)p%3===0&&p&&(o+=h[l>>18&63],o+=h[l>>12&63],o+=h[l>>6&63],o+=h[l&63]),l=(l<<8)+a[p];const u=c%3;return u===0?(o+=h[l>>18&63],o+=h[l>>12&63],o+=h[l>>6&63],o+=h[l&63]):u===2?(o+=h[l>>10&63],o+=h[l>>4&63],o+=h[l<<2&63],o+=h[64]):u===1&&(o+=h[l>>2&63],o+=h[l<<4&63],o+=h[64],o+=h[64]),o}b(n,"representYamlBinary");function s(a){return Object.prototype.toString.call(a)==="[object Uint8Array]"}return b(s,"isBinary"),rc=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:n}),rc}b(sd,"requireBinary");var ic,Fg;function ad(){if(Fg)return ic;Fg=1;const e=Pe(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(s){if(s===null)return!0;const a=[],o=s;for(let l=0,c=o.length;l<c;l+=1){const h=o[l];let u=!1;if(r.call(h)!=="[object Object]")return!1;let p;for(p in h)if(t.call(h,p))if(!u)u=!0;else return!1;if(!u)return!1;if(a.indexOf(p)===-1)a.push(p);else return!1}return!0}b(i,"resolveYamlOmap");function n(s){return s!==null?s:[]}return b(n,"constructYamlOmap"),ic=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:n}),ic}b(ad,"requireOmap");var nc,Eg;function od(){if(Eg)return nc;Eg=1;const e=Pe(),t=Object.prototype.toString;function r(n){if(n===null)return!0;const s=n,a=new Array(s.length);for(let o=0,l=s.length;o<l;o+=1){const c=s[o];if(t.call(c)!=="[object Object]")return!1;const h=Object.keys(c);if(h.length!==1)return!1;a[o]=[h[0],c[h[0]]]}return!0}b(r,"resolveYamlPairs");function i(n){if(n===null)return[];const s=n,a=new Array(s.length);for(let o=0,l=s.length;o<l;o+=1){const c=s[o],h=Object.keys(c);a[o]=[h[0],c[h[0]]]}return a}return b(i,"constructYamlPairs"),nc=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),nc}b(od,"requirePairs");var sc,Ng;function ld(){if(Ng)return sc;Ng=1;const e=Pe(),t=Object.prototype.hasOwnProperty;function r(n){if(n===null)return!0;const s=n;for(const a in s)if(t.call(s,a)&&s[a]!==null)return!1;return!0}b(r,"resolveYamlSet");function i(n){return n!==null?n:{}}return b(i,"constructYamlSet"),sc=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),sc}b(ld,"requireSet");var ac,Mg;function Xo(){return Mg||(Mg=1,ac=rd().extend({implicit:[id(),nd()],explicit:[sd(),ad(),od(),ld()]})),ac}b(Xo,"require_default");var $g;function xC(){if($g)return ya;$g=1;const e=Dn(),t=Pn(),r=yC(),i=Xo(),n=Object.prototype.hasOwnProperty,s=1,a=2,o=3,l=4,c=1,h=2,u=3,p=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,d=/[\x85\u2028\u2029]/,g=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,C=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function x(m){return Object.prototype.toString.call(m)}b(x,"_class");function w(m){return m===10||m===13}b(w,"isEol");function k(m){return m===9||m===32}b(k,"isWhiteSpace");function v(m){return m===9||m===32||m===10||m===13}b(v,"isWsOrEol");function T(m){return m===44||m===91||m===93||m===123||m===125}b(T,"isFlowIndicator");function L(m){if(m>=48&&m<=57)return m-48;const $=m|32;return $>=97&&$<=102?$-97+10:-1}b(L,"fromHexCode");function D(m){return m===120?2:m===117?4:m===85?8:0}b(D,"escapedHexLen");function M(m){return m>=48&&m<=57?m-48:-1}b(M,"fromDecimalCode");function W(m){switch(m){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return"	";case 9:return"	";case 110:return`
449`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}b(W,"simpleEscapeSequence");function E(m){return m<=65535?String.fromCharCode(m):String.fromCharCode((m-65536>>10)+55296,(m-65536&1023)+56320)}b(E,"charFromCodepoint");function N(m,$,U){$==="__proto__"?Object.defineProperty(m,$,{configurable:!0,enumerable:!0,writable:!0,value:U}):m[$]=U}b(N,"setProperty");const z=new Array(256),O=new Array(256);for(let m=0;m<256;m++)z[m]=W(m)?1:0,O[m]=W(m);function I(m,$){this.input=m,this.filename=$.filename||null,this.schema=$.schema||i,this.onWarning=$.onWarning||null,this.legacy=$.legacy||!1,this.json=$.json||!1,this.listener=$.listener||null,this.maxDepth=typeof $.maxDepth=="number"?$.maxDepth:100,this.maxTotalMergeKeys=typeof $.maxTotalMergeKeys=="number"?$.maxTotalMergeKeys:1e4,this.impl
449icitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=m.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}b(I,"State");function j(m,$){const U={name:m.filename,buffer:m.input.slice(0,-1),position:m.position,line:m.line,column:m.position-m.lineStart};return U.snippet=r(U),new t($,U)}b(j,"generateError");function A(m,$){throw j(m,$)}b(A,"throwError");function R(m,$){m.onWarning&&m.onWarning.call(null,j(m,$))}b(R,"throwWarning");function H(m,$,U){const tt=m.anchorMapTransactions;if(tt.length!==0){const J=tt[tt.length-1];n.call(J,$)||(J[$]={existed:n.call(m.anchorMap,$),value:m.anchorMap[$]})}m.anchorMap[$]=U}b(H,"storeAnchor");function q(m){m.anchorMapTransactions.push(Object.create(null))}b(q,"beginAnchorTransaction");function _(m){const $=m.anchorMapTransactions.pop(),U=m.anchorMapTransactions;if(U.length===0)return;const tt=U[U.length-1],J=Object.keys($);for(let ft=0,B=J.length;ft<B;ft+=1){const Z=J[ft];n.call(tt,Z)||(tt[Z]=$[Z])}}b(_,"commitAnchorTransaction");function ct(m){const $=m.anchorMapTransactions.pop(),U=Object.keys($);for(let tt=U.length-1;tt>=0;tt-=1){const J=$[U[tt]];J.existed?m.anchorMap[U[tt]]=J.value:delete m.anchorMap[U[tt]]}}b(ct,"rollbackAnchorTransaction");function X(m){return{position:m.position,line:m.line,lineStart:m.lineStart,lineIndent:m.lineIndent,firstTabInLine:m.firstTabInLine,tag:m.tag,anchor:m.anchor,kind:m.kind,result:m.result}}b(X,"snapshotState");function F(m,$){m.position=$.position,m.line=$.line,m.lineStart=$.lineStart,m.lineIndent=$.lineIndent,m.firstTabInLine=$.firstTabInLine,m.tag=$.tag,m.anchor=$.anchor,m.kind=$.kind,m.result=$.result}b(F,"restoreState");const ht={YAML:b(function($,U,tt){$.version!==null&&A($,"duplication of %YAML directive"),tt.length!==1&&A($,"YAML directive accepts exactly one argument");const J=/^([0-9]+)\.([0-9]+)$/.exec(tt[0]);J===null&&A($,"ill-formed argument of the YAML directive");const ft=parseInt(J[1],10),B=parseInt(J[2],10);ft!==1&&A($,"unacceptable YAML version of the document"),$.version=tt[0],$.checkLineBreaks=B<2,B!==1&&B!==2&&R($,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:b(function($,U,tt){let J;tt.length!==2&&A($,"TAG directive accepts exactly two arguments");const ft=tt[0];J=tt[1],y.test(ft)||A($,"ill-formed tag handle (first argument) of the TAG directive"),n.call($.tagMap,ft)&&A($,'there is a previously declared suffix for "'+ft+'" tag handle'),C.test(J)||A($,"ill-formed tag prefix (second argument) of the TAG directive");try{J=decodeURIComponent(J)}catch{A($,"tag prefix is malformed: "+J)}$.tagMap[ft]=J},"handleTagDirective")};function pt(m,$,U,tt){if($<U){const J=m.input.slice($,U);if(tt)for(let ft=0,B=J.length;ft<B;ft+=1){const Z=J.charCodeAt(ft);Z===9||Z>=32&&Z<=1114111||A(m,"expected valid JSON character")}else p.test(J)&&A(m,"the stream contains non-printable characters");m.result+=J}}b(pt,"captureSegment");function wt(m,$,U,tt){e.isObject(U)||A(m,"cannot merge mappings; the provided source object is unacceptable");const J=Object.keys(U);for(let ft=0,B=J.length;ft<B;ft+=1){const Z=J[ft];m.maxTotalMergeKeys!==-1&&++m.totalMergeKeys>m.maxTotalMergeKeys&&A(m,"merge keys exceeded maxTotalMergeKeys ("+m.maxTotalMergeKeys+")"),n.call($,Z)||(N($,Z,U[Z]),tt[Z]=!0)}}b(wt,"mergeMappings");function P(m,$,U,tt,J,ft,B,Z,ut){if(Array.isArray(J)){J=Array.prototype.slice.call(J);for(let lt=0,ot=J.length;lt<ot;lt+=1)Array.isArray(J[lt])&&A(m,"nested arrays are not supported inside keys"),typeof J=="object"&&x(J[lt])==="[object Object]"&&(J[lt]="[object Object]")}if(typeof J=="object"&&x(J)==="[object Object]"&&(J="[object Object]"),J=String(J),$===null&&($={}),tt==="tag:yaml.org,2002:merge")if(Array.isArray(ft))for(let lt=0,ot=ft.length;lt<ot;lt+=1)wt(m,$,ft[lt],U);else wt(m,$,ft,U);else!m.json&&!n.call(U,J)&&n.call($,J)&&(m.line=B||m.line,m.lineStart=Z||m.lineStart,m.position=ut||m.position,A(m,"duplicated mapping key")),N($,J,ft),delete U[J];return $}b(P,"storeMappingPair");function mt(m){const $=m.input.charCodeAt(m.position);$===10?m.position++:$===13?(m.position++,m.input.charCodeAt(m.position)===10&&m.position++):A(m,"a line break is expected"),m.line+=1,m.lineStart=m.position,m.firstTabInLine=-1}
vendor: 13,171 bytes, lines 449-456
449b(mt,"readLineBreak");function st(m,$,U){let tt=0,J=m.input.charCodeAt(m.position);for(;J!==0;){for(;k(J);)J===9&&m.firstTabInLine===-1&&(m.firstTabInLine=m.position),J=m.input.charCodeAt(++m.position);if($&&J===35)do J=m.input.charCodeAt(++m.position);while(J!==10&&J!==13&&J!==0);if(w(J))for(mt(m),J=m.input.charCodeAt(m.position),tt++,m.lineIndent=0;J===32;)m.lineIndent++,J=m.input.charCodeAt(++m.position);else break}return U!==-1&&tt!==0&&m.lineIndent<U&&R(m,"deficient indentation"),tt}b(st,"skipSeparationSpace");function at(m){let $=m.position,U=m.input.charCodeAt($);return!!((U===45||U===46)&&U===m.input.charCodeAt($+1)&&U===m.input.charCodeAt($+2)&&($+=3,U=m.input.charCodeAt($),U===0||v(U)))}b(at,"testDocumentSeparator");function dt(m,$){$===1?m.result+=" ":$>1&&(m.result+=e.repeat(`
450`,$-1))}b(dt,"writeFoldedLines");function bt(m,$,U){let tt,J,ft,B,Z,ut;const lt=m.kind,ot=m.result;let xt=m.input.charCodeAt(m.position);if(v(xt)||T(xt)||xt===35||xt===38||xt===42||xt===33||xt===124||xt===62||xt===39||xt===34||xt===37||xt===64||xt===96)return!1;if(xt===63||xt===45){const yt=m.input.charCodeAt(m.position+1);if(v(yt)||U&&T(yt))return!1}for(m.kind="scalar",m.result="",tt=J=m.position,ft=!1;xt!==0;){if(xt===58){const yt=m.input.charCodeAt(m.position+1);if(v(yt)||U&&T(yt))break}else if(xt===35){const yt=m.input.charCodeAt(m.position-1);if(v(yt))break}else{if(m.position===m.lineStart&&at(m)||U&&T(xt))break;if(w(xt))if(B=m.line,Z=m.lineStart,ut=m.lineIndent,st(m,!1,-1),m.lineIndent>=$){ft=!0,xt=m.input.charCodeAt(m.position);continue}else{m.position=J,m.line=B,m.lineStart=Z,m.lineIndent=ut;break}}ft&&(pt(m,tt,J,!1),dt(m,m.line-B),tt=J=m.position,ft=!1),k(xt)||(J=m.position+1),xt=m.input.charCodeAt(++m.position)}return pt(m,tt,J,!1),m.result?!0:(m.kind=lt,m.result=ot,!1)}b(bt,"readPlainScalar");function vt(m,$){let U,tt,J=m.input.charCodeAt(m.position);if(J!==39)return!1;for(m.kind="scalar",m.result="",m.position++,U=tt=m.position;(J=m.input.charCodeAt(m.position))!==0;)if(J===39)if(pt(m,U,m.position,!0),J=m.input.charCodeAt(++m.position),J===39)U=m.position,m.position++,tt=m.position;else return!0;else w(J)?(pt(m,U,tt,!0),dt(m,st(m,!1,$)),U=tt=m.position):m.position===m.lineStart&&at(m)?A(m,"unexpected end of the document within a single quoted scalar"):(m.position++,k(J)||(tt=m.position));A(m,"unexpected end of the stream within a single quoted scalar")}b(vt,"readSingleQuotedScalar");function Bt(m,$){let U,tt,J,ft=m.input.charCodeAt(m.position);if(ft!==34)return!1;for(m.kind="scalar",m.result="",m.position++,U=tt=m.position;(ft=m.input.charCodeAt(m.position))!==0;){if(ft===34)return pt(m,U,m.position,!0),m.position++,!0;if(ft===92){if(pt(m,U,m.position,!0),ft=m.input.charCodeAt(++m.position),w(ft))st(m,!1,$);else if(ft<256&&z[ft])m.result+=O[ft],m.position++;else if((J=D(ft))>0){let B=J,Z=0;for(;B>0;B--)ft=m.input.charCodeAt(++m.position),(J=L(ft))>=0?Z=(Z<<4)+J:A(m,"expected hexadecimal character");m.result+=E(Z),m.position++}else A(m,"unknown escape sequence");U=tt=m.position}else w(ft)?(pt(m,U,tt,!0),dt(m,st(m,!1,$)),U=tt=m.position):m.position===m.lineStart&&at(m)?A(m,"unexpected end of the document within a double quoted scalar"):(m.position++,k(ft)||(tt=m.position))}A(m,"unexpected end of the stream within a double quoted scalar")}b(Bt,"readDoubleQuotedScalar");function Q(m,$){let U=!0,tt,J,ft;const B=m.tag;let Z;const ut=m.anchor;let lt,ot,xt,yt;const Lt=Object.create(null);let _t,jt,Pt,Ot=m.input.charCodeAt(m.position);if(Ot===91)lt=93,yt=!1,Z=[];else if(Ot===123)lt=125,yt=!0,Z={};else return!1;for(m.anchor!==null&&H(m,m.anchor,Z),Ot=m.input.charCodeAt(++m.position);Ot!==0;){if(st(m,!0,$),Ot=m.input.charCodeAt(m.position),Ot===lt)return m.position++,m.tag=B,m.anchor=ut,m.kind=yt?"mapping":"sequence",m.result=Z,!0;if(U?Ot===44&&A(m,"expected the node content, but found ','"):A(m,"missed comma between flow collection entries"),jt=_t=Pt=null,ot=xt=!1,Ot===63){const ne=m.input.charCodeAt(m.position+1);v(ne)&&(ot=xt=!0,m.position++,st(m,!0,$))}tt=m.line,J=m.lineStart,ft=m.position,St(m,$,s,!1,!0),jt=m.tag,_t=m.result,st(m,!0,$),Ot=m.input.charCodeAt(m.position),(xt||m.line===tt)&&Ot===58&&(ot=!0,Ot=m.input.charCodeAt(++m.position),st(m,!0,$),St(m,$,s,!1,!0),Pt=m.result),yt?P(m,Z,Lt,jt,_t,Pt,tt,J,ft):ot?Z.push(P(m,null,Lt,jt,_t,Pt,tt,J,ft)):Z.push(_t),st(m,!0,$),Ot=m.input.charCodeAt(m.position),Ot===44?(U=!0,Ot=m.input.charCodeAt(++m.position)):U=!1}A(m,"unexpected end of the stream within a flow collection")}b(Q,"readFlowCollection");function $t(m,$){let U,tt=c,J=!1,ft=!1,B=$,Z=0,ut=!1,lt,ot=m.input.charCodeAt(m.position);if(ot===124)U=!1;else if(ot===62)U=!0;else return!1;for(m.kind="scalar",m.result="";ot!==0;)if(ot=m.input.charCodeAt(++m.position),ot===43||ot===45)c===tt?tt=ot===43?u:h:A(m,"repeat of a chomping mode identifier");else if((lt=M(ot))>=0)lt===0?A(m,"bad explicit indentation width of a block scalar; it cannot be less than one"):ft?A(m,"repeat of an indentation width identifier"):(B=$+lt-1,ft=!0);else break;if(k(ot)){do ot=m.input.charCodeAt(++m.position);while(k(ot));if(ot===35)do ot=m.input.charCodeAt(++m.position);while(!w(ot)&&ot!==0)}for(;ot!==0;){for(mt(m),m.lineIndent=0,ot=m.input.charCodeAt(m.position);(!ft||m.lineIndent<B)&&ot===32;)m.lineIndent++,ot=m.input.charCodeAt(++m.position);if(!ft&&m.lineIndent>B&&(B=m.lineIndent),w(ot)){Z++;continue}if(!ft&&B===0&&A(m,"missing indentation for block scalar"),m.lineIndent<B){tt===u?m.result+=e.repeat(`
451`,J?1+Z:Z):tt===c&&J&&(m.result+=`
452`);break}U?k(ot)?(ut=!0,m.result+=e.repeat(`
453`,J?1+Z:Z)):ut?(ut=!1,m.result+=e.repeat(`
454`,Z+1)):Z===0?J&&(m.result+=" "):m.result+=e.repeat(`
455`,Z):m.result+=e.repeat(`
456`,J?1+Z:Z),J=!0,ft=!0,Z=0;const xt=m.position;for(;!w(ot)&&ot!==0;)ot=m.input.charCodeAt(++m.position);pt(m,xt,m.position,!1)}return!0}b($t,"readBlockScalar");function te(m,$){const U=m.tag,tt=m.anchor,J=[];let ft=!1;if(m.firstTabInLine!==-1)return!1;m.anchor!==null&&H(m,m.anchor,J);let B=m.input.charCodeAt(m.position);for(;B!==0&&(m.firstTabInLine!==-1&&(m.position=m.firstTabInLine,A(m,"tab characters must not be used in indentation")),B===45);){const Z=m.input.charCodeAt(m.position+1);if(!v(Z))break;if(ft=!0,m.position++,st(m,!0,-1)&&m.lineIndent<=$){J.push(null),B=m.input.charCodeAt(m.position);continue}const ut=m.line;if(St(m,$,o,!1,!0),J.push(m.result),st(m,!0,-1),B=m.input.charCodeAt(m.position),(m.line===ut||m.lineIndent>$)&&B!==0)A(m,"bad indentation of a sequence entry");else if(m.lineIndent<$)break}return ft?(m.tag=U,m.anchor=tt,m.kind="sequence",m.result=J,!0):!1}b(te,"readBlockSequence");function pe(m,$,U){let tt,J,ft,B;const Z=m.tag,ut=m.anchor,lt={},ot=Object.create(null);let xt=null,yt=null,Lt=null,_t=!1,jt=!1;if(m.firstTabInLine!==-1)return!1;m.anchor!==null&&H(m,m.anchor,lt);let Pt=m.input.charCodeAt(m.position);for(;Pt!==0;){!_t&&m.firstTabInLine!==-1&&(m.position=m.firstTabInLine,A(m,"tab characters must not be used in indentation"));const Ot=m.input.charCodeAt(m.position+1),ne=m.line;if((Pt===63||Pt===58)&&v(Ot))Pt===63?(_t&&(P(m,lt,ot,xt,yt,null,J,ft,B),xt=yt=Lt=null),jt=!0,_t=!0,tt=!0):_t?(_t=!1,tt=!0):A(m,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),m.position+=1,Pt=Ot;else{if(J=m.line,ft=m.lineStart,B=m.position,!St(m,U,a,!1,!0))break;if(m.line===ne){for(Pt=m.input.charCodeAt(m.position);k(Pt);)Pt=m.input.charCodeAt(++m.position);if(Pt===58)Pt=m.input.charCodeAt(++m.position),v(Pt)||A(m,"a whitespace character is expected after the key-value separator within a block mapping"),_t&&(P(m,lt,ot,xt,yt,null,J,ft,B),xt=yt=Lt=null),jt=!0,_t=!1,tt=!1,xt=m.tag,yt=m.result;else if(jt)A(m,"can not read an implicit mapping pair; a colon is missed");else return m.tag=Z,m.anchor=ut,!0}else if(jt)A(m,"can not read a block mapping entry; a multiline key may not be an implicit key");else return m.tag=Z,m.anchor=ut,!0}if((m.line===ne||m.lineIndent>$)&&(_t&&(J=m.line,ft=m.lineStart,B=m.position),St(m,$,l,!0,tt)&&(_t?yt=m.result:Lt=m.result),_t||(P(m,lt,ot,xt,yt,Lt,J,ft,B),xt=yt=Lt=null),st(m,!0,-1),Pt=m.input.charCodeAt(m.position)),(m.line===ne||m.lineIndent>$)&&Pt!==0)A(m,"bad indentation of a mapping entry");else if(m.lineIndent<$)break}return _t&&P(m,lt,ot,xt,yt,null,J,ft,B),jt&&(m.tag=Z,m.anchor=ut,m.kind="mapping",m.result=lt),jt}b(pe,"readBlockMapping");function Oe(m){let $=!1,U=!1,tt,J,ft=m.input.charCodeAt(m.position);if(ft!==33)return!1;m.tag!==null&&A(m,"duplication of a tag property"),ft=m.input.charCodeAt(++m.position),ft===60?($=!0,ft=m.input.charCodeAt(++m.position)):ft===33?(U=!0,tt="!!",ft=m.input.charCodeAt(++m.position)):tt="!";let B=m.position;if($){do ft=m.input.charCodeAt(++m.position);while(ft!==0&&ft!==62);m.position<m.length?(J=m.input.slice(B,m.position),ft=m.input.charCodeAt(++m.position)):A(m,"unexpected end of the stream within a verbatim tag")}else{for(;ft!==0&&!v(ft);)ft===33&&(U?A(m,"tag suffix cannot contain exclamation marks"):(tt=m.input.slice(B-1,m.position+1),y.test(tt)||A(m,"named tag handle cannot contain such characters"),U=!0,B=m.position+1)),ft=m.input.charCodeAt(++m.position);J=m.input.slice(B,m.position),g.test(J)&&A(m,"tag suffix cannot contain flow indicator characters")}J&&!C.test(J)&&A(m,"tag name cannot contain such characters: "+J);try{J=decodeURIComponent(J)}catch{A(m,"tag name is malformed: "+J)}return $?m.tag=J:n.call(m.tagMap,tt)?m.tag=m.tagMap[tt]+J:tt==="!"?m.tag="!"+J:tt==="!!"?m.tag="tag:yaml.org,2002:"+J:A(m,'undeclared tag handle "'+tt+'"'),!0}b(Oe,"readTagProperty");function Ae(m){let $=m.input.charCodeAt(m.position);if($!==38)return!1;m.anchor!==null&&A(m,"duplication of an anchor property"),$=m.input.charCodeAt(++m.position);const U=m.position;for(;$!==0&&!v($)&&!T($);)$=m.input.charCodeAt(++m.position);return m.position===U&&A(m,"name of an anchor node must contain at least one character"),m.anchor=m.input.slice(U,m.position),!0}b(Ae,"readAnchorProperty");function Re(m){let $=m.input.charCodeAt(m.position);if($!==42)return!1;$=m.input.charCodeAt(++m.position);const U=m.position;for(;$!==0&&!v($)&&!T($);)$=m.input.charCodeAt(++m.position);m.position===U&&A(m,"name of an alias node must contain at least one character");const tt=m.input.slice(U,m.position);return n.call(m.anchorMap,tt)||A(m,'unidentified alias "'+tt+'"'),m.result=m.anchorMap[tt],st(m,!0,-1),!0}b(Re,"readAlias");function gt(m,$,U,tt){const J=X(m);return q(m),F(m,$),m.tag=null,m.anchor=null,m.kind=null,m.result=null,pe(m,U,tt)&&m.kind==="mapping"?(_(m),!0):(ct(m),F(m,J),!1)}b(gt,"tryReadBlockMappingFromProperty");function St(m,$,U,tt,J){let ft,B,Z=1,ut=!1,lt=!1,ot=null,xt,yt,Lt;m.depth>=m.maxDepth&&A(m,"nesting exceeded maxDepth ("+m.maxDepth+")"),m.depth+=1,m.listener!==null&&m.listener("open",m),m.tag=null,m.anchor=null,m.kind=null,m.result=null;const _t=ft=B=l===U||o===U;if(tt&&st(m,!0,-1)&&(ut=!0,m.lineIndent>$?Z=1:m.lineIndent===$?Z=0:m.lineIndent<$&&(Z=-1)),Z===1)for(;;){const jt=m.input.charCodeAt(m.position),Pt=X(m);if(ut&&(jt===33&&m.tag!==null||jt===38&&m.anchor!==null)||!Oe(m)&&!Ae(m))break;ot===null&&(ot=Pt),st(m,!0,-1)?(ut=!0,B=_t,m.lineIndent>$?Z=1:m.lineIndent===$?Z=0:m.lineIndent<$&&(Z=-1)):B=!1}if(B&&(B=ut||J),Z===1||l===U)if(s===U||a===U?yt=$:yt=$+1,Lt=m.position-m.lineStart,Z===1)if(B&&(te(m,Lt)||pe(m,Lt,yt))||Q(m,yt))lt=!0;else{const jt=m.input.charCodeAt(m.position);ot!==null&&_t&&!B&&jt!==124&&jt!==62&&gt(m,ot,ot.position-ot.lineStart,yt)||ft&&$t(m,yt)||vt(m,yt)||Bt(m,yt)?lt=!0:Re(m)?(lt=!0,(m.tag!==null||m.anchor!==null)&&A(m,"alias node should not have any properties")):bt(m,yt,s===U)&&(lt=!0,m.tag===null&&(m.tag="?")),m.anchor!==null&&H(m,m.anchor,m.result)}else Z===0&&(lt=B&&te(m,Lt));if(m.tag===null)m.anchor!==null&&H(m,m.anchor,m.result);else if(m.tag==="?"){m.result!==null&&m.kind!=="scalar"&&A(m,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+m.kind+'"');for(let jt=0,Pt=m.implicitTypes.length;jt<Pt;jt+=1)if(xt=m.implicitTypes[jt],xt.resolve(m.result)){m.result=xt.construct(m.result),m.tag=xt.tag,m.anchor!==null&&H(m,m.anchor,m.result);break}}else if(m.tag!=="!"){if(n.call(m.typeMap[m.kind||"fallback"],m.tag))xt=m.typeMap[m.kind||"fallback"][m.tag];else{xt=null;const jt=m.typeMap.multi[m.kind||"fallback"];for(let Pt=0,Ot=jt.length;Pt<Ot;Pt+=1)if(m.tag.slice(0,jt[Pt].tag.length)===jt[Pt].tag){xt=jt[Pt];break}}xt||A(m,"unknown tag !<"+m.tag+">"),m.result!==null&&xt.kind!==m.kind&&A(m,"unacceptable node kind for !<"+m.tag+'> tag; it should be "'+xt.kind+'", not "'+m.kind+'"'),xt.resolve(m.result,m.tag)?(m.result=xt.construct(m.result,m.tag),m.anchor!==null&&H(m,m.anchor,m.result)):A(m,"cannot resolve a node with !<"+m.tag+"> explicit tag")}return m.listener!==null&&m.listener("close",m),m.depth-=1,m.tag!==null||m.anchor!==null||lt}b(St,"composeNode");function kt(m){const $=m.position;let U=!1,tt;for(m.version=null,m.checkLineBreaks=m.legacy,m.tagMap=Object.create(null),m.anchorMap=Object.create(null);(tt=m.input.charCodeAt(m.position))!==0&&(st(m,!0,-1),tt=m.input.charCodeAt(m.position),!(m.lineIndent>0||tt!==37));){U=!0,tt=m.input.charCodeAt(++m.position);let J=m.position;for(;tt!==0&&!v(tt);)tt=m.input.charCodeAt(++m.position);
456const ft=m.input.slice(J,m.position),B=[];for(ft.length<1&&A(m,"directive name must not be less than one character in length");tt!==0;){for(;k(tt);)tt=m.input.charCodeAt(++m.position);if(tt===35){do tt=m.input.charCodeAt(++m.position);while(tt!==0&&!w(tt));break}if(w(tt))break;for(J=m.position;tt!==0&&!v(tt);)tt=m.input.charCodeAt(++m.position);B.push(m.input.slice(J,m.position))}tt!==0&&mt(m),n.call(ht,ft)?ht[ft](m,ft,B):R(m,'unknown document directive "'+ft+'"')}if(st(m,!0,-1),m.lineIndent===0&&m.input.charCodeAt(m.position)===45&&m.input.charCodeAt(m.position+1)===45&&m.input.charCodeAt(m.position+2)===45?(m.position+=3,st(m,!0,-1)):U&&A(m,"directives end mark is expected"),St(m,m.lineIndent-1,l,!1,!0),st(m,!0,-1),m.checkLineBreaks&&d.test(m.input.slice($,m.position))&&R(m,"non-ASCII line breaks are interpreted as content"),m.documents.push(m.result),m.position===m.lineStart&&at(m)){m.input.charCodeAt(m.position)===46&&(m.position+=3,st(m,!0,-1));return}m.position<m.length-1&&A(m,"end of the stream or a document separator is expected")}b(kt,"readDocument");function At(m,$){m=String(m),$=$||{},m.length!==0&&(m.charCodeAt(m.length-1)!==10&&m.charCodeAt(m.length-1)!==13&&(m+=`
457`),m.charCodeAt(0)===65279&&(m=m.slice(1)));const U=new I(m,$),tt=m.indexOf("\0");for(tt!==-1&&(U.position=tt,A(U,"null byte is not allowed in input")),U.input+="\0";U.input.charCodeAt(U.position)===32;)U.lineIndent+=1,U.position+=1;for(;U.position<U.length-1;)kt(U);return U.documents}b(At,"loadDocuments");function G(m,$,U){$!==null&&typeof $=="object"&&typeof U>"u"&&(U=$,$=null);const tt=At(m,U);if(typeof $!="function")return tt;for(let J=0,ft=tt.length;J<ft;J+=1)$(tt[J])}b(G,"loadAll2");function nt(m,$){const U=At(m,$);if(U.length!==0){if(U.length===1)return U[0];throw new t("expected a single document in the stream, but found more")}}return b(nt,"load2"),ya.loadAll=G,ya.load=nt,ya}b(xC,"requireLoader");var oc={},jg;function bC(){if(jg)return oc;jg=1;const e=Dn(),t=Pn(),r=Xo(),i=Object.prototype.toString,n=Object.prototype.hasOwnProperty,s=65279,a=9,o=10,l=13,c=32,h=33,u=34,p=35,d=37,g=38,y=39,C=42,x=44,w=45,k=58,v=61,T=62,L=63,D=64,M=91,W=93,E=96,N=123,z=124,O=125,I={};I[0]="\\0",I[7]="\\a",I[8]="\\b",I[9]="\\t",I[10]="\\n",I[11]="\\v",I[12]="\\f",I[13]="\\r",I[27]="\\e",I[34]='\\"',I[92]="\\\\",I[133]="\\N",I[160]="\\_",I[8232]="\\L",I[8233]="\\P";const j=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],A=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function R(B,Z){if(Z===null)return{};const ut={},lt=Object.keys(Z);for(let ot=0,xt=lt.length;ot<xt;ot+=1){let yt=lt[ot],Lt=String(Z[yt]);yt.slice(0,2)==="!!"&&(yt="tag:yaml.org,2002:"+yt.slice(2));const _t=B.compiledTypeMap.fallback[yt];_t&&n.call(_t.styleAliases,Lt)&&(Lt=_t.styleAliases[Lt]),ut[yt]=Lt}return ut}b(R,"compileStyleMap");function H(B){let Z,ut;const lt=B.toString(16).toUpperCase();if(B<=255)Z="x",ut=2;else if(B<=65535)Z="u",ut=4;else if(B<=4294967295)Z="U",ut=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+Z+e.repeat("0",ut-lt.length)+lt}b(H,"encodeHex");const q=1,_=2;function ct(B){this.schema=B.schema||r,this.indent=Math.max(1,B.indent||2),this.noArrayIndent=B.noArrayIndent||!1,this.skipInvalid=B.skipInvalid||!1,this.flowLevel=e.isNothing(B.flowLevel)?-1:B.flowLevel,this.styleMap=R(this.schema,B.styles||null),this.sortKeys=B.sortKeys||!1,this.lineWidth=B.lineWidth||80,this.noRefs=B.noRefs||!1,this.noCompatMode=B.noCompatMode||!1,this.condenseFlow=B.condenseFlow||!1,this.quotingType=B.quotingType==='"'?_:q,this.forceQuotes=B.forceQuotes||!1,this.replacer=typeof B.replacer=="function"?B.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}b(ct,"State");function X(B,Z){const ut=e.repeat(" ",Z);let lt=0,ot="";const xt=B.length;for(;lt<xt;){let yt;const Lt=B.indexOf(`
458`,lt);Lt===-1?(yt=B.slice(lt),lt=xt):(yt=B.slice(lt,Lt+1),lt=Lt+1),yt.length&&yt!==`
459`&&(ot+=ut),ot+=yt}return ot}
vendor: 4,970 bytes, lines 459-471
459b(X,"indentString");function F(B,Z){return`
460`+e.repeat(" ",B.indent*Z)}b(F,"generateNextLine");function ht(B,Z){for(let ut=0,lt=B.implicitTypes.length;ut<lt;ut+=1)if(B.implicitTypes[ut].resolve(Z))return!0;return!1}b(ht,"testImplicitResolving");function pt(B){return B===c||B===a}b(pt,"isWhitespace");function wt(B){return B>=32&&B<=126||B>=161&&B<=55295&&B!==8232&&B!==8233||B>=57344&&B<=65533&&B!==s||B>=65536&&B<=1114111}b(wt,"isPrintable");function P(B){return wt(B)&&B!==s&&B!==l&&B!==o}b(P,"isNsCharOrWhitespace");function mt(B,Z,ut){const lt=P(B),ot=lt&&!pt(B);return(ut?lt:lt&&B!==x&&B!==M&&B!==W&&B!==N&&B!==O)&&B!==p&&!(Z===k&&!ot)||P(Z)&&!pt(Z)&&B===p||Z===k&&ot}b(mt,"isPlainSafe");function st(B){return wt(B)&&B!==s&&!pt(B)&&B!==w&&B!==L&&B!==k&&B!==x&&B!==M&&B!==W&&B!==N&&B!==O&&B!==p&&B!==g&&B!==C&&B!==h&&B!==z&&B!==v&&B!==T&&B!==y&&B!==u&&B!==d&&B!==D&&B!==E}b(st,"isPlainSafeFirst");function at(B){return!pt(B)&&B!==k}b(at,"isPlainSafeLast");function dt(B,Z){const ut=B.charCodeAt(Z);let lt;return ut>=55296&&ut<=56319&&Z+1<B.length&&(lt=B.charCodeAt(Z+1),lt>=56320&&lt<=57343)?(ut-55296)*1024+lt-56320+65536:ut}b(dt,"codePointAt");function bt(B){return/^\n* /.test(B)}b(bt,"needIndentIndicator");const vt=1,Bt=2,Q=3,$t=4,te=5;function pe(B,Z,ut,lt,ot,xt,yt,Lt){let _t,jt=0,Pt=null,Ot=!1,ne=!1;const Qr=lt!==-1;let or=-1,_e=st(dt(B,0))&&at(dt(B,B.length-1));if(Z||yt)for(_t=0;_t<B.length;jt>=65536?_t+=2:_t++){if(jt=dt(B,_t),!wt(jt))return te;_e=_e&&mt(jt,Pt,Lt),Pt=jt}else{for(_t=0;_t<B.length;jt>=65536?_t+=2:_t++){if(jt=dt(B,_t),jt===o)Ot=!0,Qr&&(ne=ne||_t-or-1>lt&&B[or+1]!==" ",or=_t);else if(!wt(jt))return te;_e=_e&&mt(jt,Pt,Lt),Pt=jt}ne=ne||Qr&&_t-or-1>lt&&B[or+1]!==" "}return!Ot&&!ne?_e&&!yt&&!ot(B)?vt:xt===_?te:Bt:ut>9&&bt(B)?te:yt?xt===_?te:Bt:ne?$t:Q}b(pe,"chooseScalarStyle");function Oe(B,Z,ut,lt,ot){B.dump=(function(){if(Z.length===0)return B.quotingType===_?'""':"''";if(!B.noCompatMode&&(j.indexOf(Z)!==-1||A.test(Z)))return B.quotingType===_?'"'+Z+'"':"'"+Z+"'";const xt=B.indent*Math.max(1,ut),yt=B.lineWidth===-1?-1:Math.max(Math.min(B.lineWidth,40),B.lineWidth-xt),Lt=lt||B.flowLevel>-1&&ut>=B.flowLevel;function _t(jt){return ht(B,jt)}switch(b(_t,"testAmbiguity"),pe(Z,Lt,B.indent,yt,_t,B.quotingType,B.forceQuotes&&!lt,ot)){case vt:return Z;case Bt:return"'"+Z.replace(/'/g,"''")+"'";case Q:return"|"+Ae(Z,B.indent)+Re(X(Z,xt));case $t:return">"+Ae(Z,B.indent)+Re(X(gt(Z,yt),xt));case te:return'"'+kt(Z)+'"';default:throw new t("impossible error: invalid scalar style")}})()}b(Oe,"writeScalar");function Ae(B,Z){const ut=bt(B)?String(Z):"",lt=B[B.length-1]===`
461`,xt=lt&&(B[B.length-2]===`
462`||B===`
463`)?"+":lt?"":"-";return ut+xt+`
464`}b(Ae,"blockHeader");function Re(B){return B[B.length-1]===`
465`?B.slice(0,-1):B}b(Re,"dropEndingNewline");function gt(B,Z){const ut=/(\n+)([^\n]*)/g;let lt=(function(){let Lt=B.indexOf(`
466`);return Lt=Lt!==-1?Lt:B.length,ut.lastIndex=Lt,St(B.slice(0,Lt),Z)})(),ot=B[0]===`
467`||B[0]===" ",xt,yt;for(;yt=ut.exec(B);){const Lt=yt[1],_t=yt[2];xt=_t[0]===" ",lt+=Lt+(!ot&&!xt&&_t!==""?`
468`:"")+St(_t,Z),ot=xt}return lt}b(gt,"foldString");function St(B,Z){if(B===""||B[0]===" ")return B;const ut=/ [^ ]/g;let lt,ot=0,xt,yt=0,Lt=0,_t="";for(;lt=ut.exec(B);)Lt=lt.index,Lt-ot>Z&&(xt=yt>ot?yt:Lt,_t+=`
469`+B.slice(ot,xt),ot=xt+1),yt=Lt;return _t+=`
470`,B.length-ot>Z&&yt>ot?_t+=B.slice(ot,yt)+`
471`+B.slice(yt+1):_t+=B.slice(ot),_t.slice(1)}b(St,"foldLine");function kt(B){let Z="",ut=0;for(let lt=0;lt<B.length;ut>=65536?lt+=2:lt++){ut=dt(B,lt);const ot=I[ut];!ot&&wt(ut)?(Z+=B[lt],ut>=65536&&(Z+=B[lt+1])):Z+=ot||H(ut)}return Z}b(kt,"escapeString");function At(B,Z,ut){let lt="";const ot=B.tag;for(let xt=0,yt=ut.length;xt<yt;xt+=1){let Lt=ut[xt];B.replacer&&(Lt=B.replacer.call(ut,String(xt),Lt)),(U(B,Z,Lt,!1,!1)||typeof Lt>"u"&&U(B,Z,null,!1,!1))&&(lt!==""&&(lt+=","+(B.condenseFlow?"":" ")),lt+=B.dump)}B.tag=ot,B.dump="["+lt+"]"}b(At,"writeFlowSequence");function G(B,Z,ut,lt){let ot="";const xt=B.tag;for(let yt=0,Lt=ut.length;yt<Lt;yt+=1){let _t=ut[yt];B.replacer&&(_t=B.replacer.call(ut,String(yt),_t)),(U(B,Z+1,_t,!0,!0,!1,!0)||typeof _t>"u"&&U(B,Z+1,null,!0,!0,!1,!0))&&((!lt||ot!=="")&&(ot+=F(B,Z)),B.dump&&o===B.dump.charCodeAt(0)?ot+="-":ot+="- ",ot+=B.dump)}B.tag=xt,B.dump=ot||"[]"}b(G,"writeBlockSequence");function nt(B,Z,ut){let lt="";const ot=B.tag,xt=Object.keys(ut);for(let yt=0,Lt=xt.length;yt<Lt;yt+=1){let _t="";lt!==""&&(_t+=", "),B.condenseFlow&&(_t+='"');const jt=xt[yt];let Pt=ut[jt];B.replacer&&(Pt=B.replacer.call(ut,jt,Pt)),U(B,Z,jt,!1,!1)&&(B.dump.length>1024&&(_t+="? "),_t+=B.dump+(B.condenseFlow?'"':"")+":"+(B.condenseFlow?"":" "),U(B,Z,Pt,!1,!1)&&(_t+=B.dump,lt+=_t))}B.tag=ot,B.dump="{"+lt+"}"}b(nt,"writeFlowMapping");function m(B,Z,ut,lt){let ot="";const xt=B.tag,yt=Object.keys(ut);if(B.sortKeys===!0)yt.sort();else if(typeof B.sortKeys=="function")yt.sort(B.sortKeys);else if(B.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let Lt=0,_t=yt.length;
471Lt<_t;Lt+=1){let jt="";(!lt||ot!=="")&&(jt+=F(B,Z));const Pt=yt[Lt];let Ot=ut[Pt];if(B.replacer&&(Ot=B.replacer.call(ut,Pt,Ot)),!U(B,Z+1,Pt,!0,!0,!0))continue;const ne=B.tag!==null&&B.tag!=="?"||B.dump&&B.dump.length>1024;ne&&(B.dump&&o===B.dump.charCodeAt(0)?jt+="?":jt+="? "),jt+=B.dump,ne&&(jt+=F(B,Z)),U(B,Z+1,Ot,!0,ne)&&(B.dump&&o===B.dump.charCodeAt(0)?jt+=":":jt+=": ",jt+=B.dump,ot+=jt)}B.tag=xt,B.dump=ot||"{}"}b(m,"writeBlockMapping");function $(B,Z,ut){const lt=ut?B.explicitTypes:B.implicitTypes;for(let ot=0,xt=lt.length;ot<xt;ot+=1){const yt=lt[ot];if((yt.instanceOf||yt.predicate)&&(!yt.instanceOf||typeof Z=="object"&&Z instanceof yt.instanceOf)&&(!yt.predicate||yt.predicate(Z))){if(ut?yt.multi&&yt.representName?B.tag=yt.representName(Z):B.tag=yt.tag:B.tag="?",yt.represent){const Lt=B.styleMap[yt.tag]||yt.defaultStyle;let _t;if(i.call(yt.represent)==="[object Function]")_t=yt.represent(Z,Lt);else if(n.call(yt.represent,Lt))_t=yt.represent[Lt](Z,Lt);else throw new t("!<"+yt.tag+'> tag resolver accepts not "'+Lt+'" style');B.dump=_t}return!0}}return!1}b($,"detectType");function U(B,Z,ut,lt,ot,xt,yt){B.tag=null,B.dump=ut,$(B,ut,!1)||$(B,ut,!0);const Lt=i.call(B.dump),_t=lt;lt&&(lt=B.flowLevel<0||B.flowLevel>Z);const jt=Lt==="[object Object]"||Lt==="[object Array]";let Pt,Ot;if(jt&&(Pt=B.duplicates.indexOf(ut),Ot=Pt!==-1),(B.tag!==null&&B.tag!=="?"||Ot||B.indent!==2&&Z>0)&&(ot=!1),Ot&&B.usedDuplicates[Pt])B.dump="*ref_"+Pt;else{if(jt&&Ot&&!B.usedDuplicates[Pt]&&(B.usedDuplicates[Pt]=!0),Lt==="[object Object]")lt&&Object.keys(B.dump).length!==0?(m(B,Z,B.dump,ot),Ot&&(B.dump="&ref_"+Pt+B.dump)):(nt(B,Z,B.dump),Ot&&(B.dump="&ref_"+Pt+" "+B.dump));else if(Lt==="[object Array]")lt&&B.dump.length!==0?(B.noArrayIndent&&!yt&&Z>0?G(B,Z-1,B.dump,ot):G(B,Z,B.dump,ot),Ot&&(B.dump="&ref_"+Pt+B.dump)):(At(B,Z,B.dump),Ot&&(B.dump="&ref_"+Pt+" "+B.dump));else if(Lt==="[object String]")B.tag!=="?"&&Oe(B,B.dump,Z,xt,_t);else{if(Lt==="[object Undefined]")return!1;if(B.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+Lt)}if(B.tag!==null&&B.tag!=="?"){let ne=encodeURI(B.tag[0]==="!"?B.tag.slice(1):B.tag).replace(/!/g,"%21");B.tag[0]==="!"?ne="!"+ne:ne.slice(0,18)==="tag:yaml.org,2002:"?ne="!!"+ne.slice(18):ne="!<"+ne+">",B.dump=ne+" "+B.dump}}return!0}b(U,"writeNode");function tt(B,Z){const ut=[],lt=[];J(B,ut,lt);const ot=lt.length;for(let xt=0;xt<ot;xt+=1)Z.duplicates.push(ut[lt[xt]]);Z.usedDuplicates=new Array(ot)}b(tt,"getDuplicateReferences");function J(B,Z,ut){if(B!==null&&typeof B=="object"){const lt=Z.indexOf(B);if(lt!==-1)ut.indexOf(lt)===-1&&ut.push(lt);else if(Z.push(B),Array.isArray(B))for(let ot=0,xt=B.length;ot<xt;ot+=1)J(B[ot],Z,ut);else{const ot=Object.keys(B);for(let xt=0,yt=ot.length;xt<yt;xt+=1)J(B[ot[xt]],Z,ut)}}}b(J,"inspectNode");function ft(B,Z){Z=Z||{};const ut=new ct(Z);ut.noRefs||tt(B,ut);let lt=B;return ut.replacer&&(lt=ut.replacer.call({"":lt},"",lt)),U(ut,0,lt,!0,!0)?ut.dump+`
472`:""}return b(ft,"dump2"),oc.dump=ft,oc}b(bC,"requireDumper");var Ig;function CC(){if(Ig)return Fe;Ig=1;const e=xC(),t=bC();function r(i,n){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}return b(r,"renamed"),Fe.Type=Pe(),Fe.Schema=Yu(),Fe.FAILSAFE_SCHEMA=Qu(),Fe.JSON_SCHEMA=ed(),Fe.CORE_SCHEMA=rd(),Fe.DEFAULT_SCHEMA=Xo(),Fe.load=e.load,Fe.loadAll=e.loadAll,Fe.dump=t.dump,Fe.YAMLException=Pn(),Fe.types={binary:sd(),float:td(),map:Xu(),null:Ku(),pairs:od(),set:ld(),timestamp:id(),bool:Zu(),int:Ju(),merge:nd(),omap:ad(),seq:Gu(),str:Vu()},Fe.safeLoad=r("safeLoad","load"),Fe.safeLoadAll=r("safeLoadAll","loadAll"),Fe.safeDump=r("safeDump","dump"),Fe}b(CC,"requireJsYaml");var PO=CC(),OO=mC(PO),{Type:U7,Schema:Y7,FAILSAFE_SCHEMA:V7,JSON_SCHEMA:RO,CORE_SCHEMA:G7,DEFAULT_SCHEMA:X7,load:qO,loadAll:Q7,dump:K7,YAMLException:Z7,types:J7,safeLoad:t9,safeLoadAll:e9,safeDump:r9}=OO,zO={common:Gs,getConfig:me,insertCluster:v1,insertEdge:_1,insertEdgeLabel:Iu,insertMarkers:A1,insertNode:ju,interpolateToCurve:du,labelHelper:It,log:et,positionEdgeLabel:gj},Rs={},kC=b(e=>{for(const t of e)Rs[t.name]=t},"registerLayoutLoaders"),WO=b(()=>{kC([{name:"dagre",loader:b(async()=>await Vt(()=>import("./dagre-GXQ25YYZ-CMj7oEME.js"),__vite__mapDeps([15,16,1,2,3,4,5,6,7,8,9,10,11,12,13,14])),"loader")},{name:"swimlane",loader:b(async()=>await Vt(()=>import("./swimlanes-42K2YHIH-D6ga7nIT.js"),__vite__mapDeps([17,1,2,3,4,5,6,7,8,9,10,11,12,13,14])),"loader")},{name:"cose-bilkent",loader:b(async()=>await Vt(()=>import("./cose-bilkent-JH36ORCC-i-qFadrx.js"),__vite__mapDeps([18,19,2,1,3,4,5,6,7,8,9,10,11,12,13,14])),"loader")}])},"registerDefaultLayoutLoaders");WO();var i9=b(async(e,t)=>{if(!(e.layoutAlgorithm in Rs))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const u=h.domId||h.id;h.domId=`${e.diagramId}-${u}`}const r=Rs[e.layoutAlgorithm],i=await r.loader(),{theme:n,themeVariables:s}=e.config,{useGradient:a,gradientStart:o,gradientStop:l}=s,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-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!=null&&n.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-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",`${n!=null&&n.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",o).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,zO,{algorithm:r.algorithm})},"render"),n9=b((e="",{fallback:t="dagre"}={})=>
vendor: 12,783 bytes, lines 472-473
472{if(e in Rs)return e;if(t in Rs)return et.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),cd="comm",wC="rule",vC="decl",HO="@media",UO="@import",YO="@supports",VO="@namespace",hh="@keyframes",SC="@layer",GO="@scope",XO=Math.abs,Bs=String.fromCharCode;function TC(e){return e.trim()}function uh(e,t,r){return e.replace(t,r)}function ln(e,t){return e.charCodeAt(t)|0}function Fn(e,t,r){return e.slice(t,r)}function Sr(e){return e.length}function _C(e){return e.length}function xa(e,t){return t.push(e),e}var Qo=1,En=1,BC=0,sr=0,we=0,On="";function hd(e,t,r,i,n,s,a,o){return{value:e,root:t,parent:r,type:i,props:n,children:s,line:Qo,column:En,length:a,return:"",siblings:o}}function QO(){return we}function KO(){return we=sr>0?ln(On,--sr):0,En--,we===10&&(En=1,Qo--),we}function gr(){return we=sr<BC?ln(On,sr++):0,En++,we===10&&(En=1,Qo++),we}function si(){return ln(On,sr)}function Ma(){return sr}function Ko(e,t){return Fn(On,e,t)}function qs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ZO(e){return Qo=En=1,BC=Sr(On=e),sr=0,[]}function JO(e){return On="",e}function lc(e){return TC(Ko(sr-1,dh(e===91?e+2:e===40?e+1:e)))}function tR(e){for(;(we=si())&&we<33;)gr();return qs(e)>2||qs(we)>3?"":" "}function eR(e,t){for(;--t&&gr()&&!(we<48||we>102||we>57&&we<65||we>70&&we<97););return Ko(e,Ma()+(t<6&&si()==32&&gr()==32))}function dh(e){for(;gr();)switch(we){case e:return sr;case 34:case 39:e!==34&&e!==39&&dh(we);break;case 40:e===41&&dh(e);break;case 92:gr();break}return sr}function rR(e,t){for(;gr()&&e+we!==57;)if(e+we===84&&si()===47)break;return"/*"+Ko(t,sr-1)+"*"+Bs(e===47?e:gr())}function iR(e){for(;!qs(si());)gr();return Ko(e,sr)}function nR(e){return JO($a("",null,null,null,[""],e=ZO(e),0,[0],e))}function $a(e,t,r,i,n,s,a,o,l){for(var c=0,h=0,u=a,p=0,d=0,g=0,y=1,C=1,x=1,w=0,k=0,v="",T=n,L=s,D=i,M=v;C;)switch(g=k,k=gr()){case 40:g!=108&&ln(M,u-1)==58?(w++,M+="("):M+=lc(k);break;case 41:w--,M+=")";break;case 34:case 39:case 91:M+=lc(k);break;case 9:case 10:case 13:case 32:if(w>0){M+=Bs(k);break}M+=tR(g);break;case 92:M+=eR(Ma()-1,7);continue;case 47:switch(si()){case 42:case 47:xa(sR(rR(gr(),Ma()),t,r,l),l),(qs(g||1)==5||qs(si()||1)==5)&&Sr(M)&&Fn(M,-1,void 0)!==" "&&(M+=" ");break;default:M+="/"}break;case 123*y:o[c++]=Sr(M)*x;case 125*y:case 59:case 0:if(w>0&&k){M+=Bs(k);break}switch(k){case 0:case 125:C=0;case 59+h:x==-1&&(M=uh(M,/\f/g,"")),d>0&&(Sr(M)-u||y===0)&&xa(d>32?Pg(M+";",i,r,u-1,l):Pg(uh(M," ","")+";",i,r,u-2,l),l);break;case 59:M+=";";default:if(xa(D=Dg(M,t,r,c,h,n,o,v,T=[],L=[],u,s),s),k===123)if(h===0)$a(M,t,D,D,T,s,u,o,L);else{switch(p){case 99:if(ln(M,3)===110)break;case 108:if(ln(M,2)===97)break;default:h=0;case 100:case 109:case 115:}h?$a(e,D,D,i&&xa(Dg(e,D,D,0,0,n,o,v,n,T=[],u,L),L),n,L,u,o,i?T:L):$a(M,D,D,D,[""],L,0,o,L)}}c=h=d=0,y=x=1,v=M="",u=a;break;case 58:u=1+Sr(M),d=g;default:if(y<1){if(k==123)--y;else if(k==125&&y++==0&&KO()==125)continue}switch(M+=Bs(k),k*y){case 38:x=h>0?1:(M+="\f",-1);break;case 44:if(w>0)break;o[c++]=(Sr(M)-1)*x,x=1;break;case 64:si()===45&&(M+=lc(gr())),p=si(),h=u=Sr(v=M+=iR(Ma())),k++;break;case 45:g===45&&Sr(M)==2&&(y=0)}}return s}function Dg(e,t,r,i,n,s,a,o,l,c,h,u){for(var p=n-1,d=n===0?s:[""],g=_C(d),y=0,C=0,x=0;y<i;++y)for(var w=0,k=Fn(e,p+1,p=XO(C=a[y])),v=e;w<g;++w)(v=TC(C>0?d[w]+" "+k:uh(k,/&\f/g,d[w])))&&(l[x++]=v);return hd(e,t,r,n===0?wC:o,l,c,h,u)}function sR(e,t,r,i){return hd(e,t,r,cd,Bs(QO()),Fn(e,2,-2),0,i)}function Pg(e,t,r,i,n){return hd(e,t,r,vC,Fn(e,0,i),Fn(e,i+1,-1),i,n)}function ph(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function aR(e,t,r,i){switch(e.type){case SC:if(e.children.length)break;case UO:case VO:case vC:return e.return=e.return||e.value;case cd:return"";case hh:return e.return=e.value+"{"+ph(e.children,i)+"}";case wC:if(!Sr(e.value=e.props.join(",")))return""}return Sr(r=ph(e.children,i))?e.return=e.value+"{"+r+"}":""}function oR(e){var t=_C(e);return function(r,i,n,s){for(var a="",o=0;o<t;o++)a+=e[o](r,i,n,s)||"";return a}}var LC="c4",lR=b(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),cR=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./c4Diagram-7LVT6UL2-CHj2MK7X.js");return{diagram:t}},__vite__mapDeps([20,21,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:LC,diagram:e}},"loader"),hR={id:LC,detector:lR,loader:cR},uR=hR,AC="flowchart",dR=b((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),pR=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-Dvyh0QaM.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([22,23,24,25,21,7,26]));return{id:AC,diagram:e}},"loader"),fR={id:AC,detector:dR,loader:pR},gR=fR,FC="flowchart-v2",mR=b((e,t)=>{var r,i,n;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((n=t==null?void 0:t.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),yR=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-Dvyh0QaM.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([22,23,24,25,21,7,26]));return{id:FC,diagram:e}},"loader"),xR={id:FC,detector:mR,loader:yR},bR=xR,EC="swimlane",CR=b(e=>/^\s*swimlane-beta\b/.test(e),"detector"),kR=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VR7AAH4N-DmF-FRZY.js");return{diagram:t}},__vite__mapDeps([27,22,23,24,25,21,7,26,1,2,3,4,5,6,8,9,10,11,12,13,14]));return{id:EC,diagram:e}},"loader"),wR={id:EC,detector:CR,loader:kR},vR=wR,NC="er",SR=b(e=>/^\s*erDiagram/.test(e),"detector"),TR=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./erDiagram-RLTQ6QDP-BMTgS9w0.js");return{diagram:t}},__vite__mapDeps([28,24,25,26,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:NC,diagram:e}},"loader"),_R={id:NC,detector:SR,loader:TR},BR=_R,MC="gitGraph",LR=b(e=>/^\s*gitGraph/.test(e),"detector"),AR=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-BgTS5-fg.js");return{diagram:t}},__vite__mapDeps([29,30,31,32,3,1,2,4,5,6,7,8,9,10,11,12,13,14]));return{id:MC,diagram:e}},"loader"),FR={id:MC,detector:LR,loader:AR},ER=FR,$C="gantt",NR=b(e=>/^\s*gantt/.test(e),"detector"),MR=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-BPjW2Fou.js");return{diagram:t}},__vite__mapDeps([33,2,34,35,36,1,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:$C,diagram:e}},"loader"),$R={id:$C,detector:NR,loader:MR},jR=$R,jC="info",IR=b(e=>/^\s*info/.test(e),"detector"),DR=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./infoDiagram-27XIBGKW-r_DSiNTy.js");return{diagram:t}},__vite__mapDeps([37,32,3,1,2,4,5,6,7,8,9,10,11,12,13,14]));return{id:jC,diagram:e}},"loader"),PR={id:jC,detector:IR,loader:DR},IC="pie",OR=b(e=>/^\s*pie/.test(e),"detector"),RR=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-f3huImdv.js");return{diagram:t}},__vite__mapDeps([38,31,32,3,1,2,4,5,39,40,35,6,7,8,9,10,11,12,13,14]));return{id:IC,diagram:e}},"loader"),qR={id:IC,detector:OR,loader:RR},DC="quadrantChart",zR=b(e=>/^\s*quadrantChart/.test(e),"detector"),WR=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-BlcaDpsQ.js");return{diagram:t}},__vite__mapDeps([41,34,35,36,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:DC,diagram:e}},"loader"),HR={id:DC,detector:zR,loader:WR},UR=HR,PC="xychart",YR=b(e=>/^\s*xychart(-beta)?/.test(e),"detector"),VR=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-HIt6ptGt.js");return{diagram:t}},__vite__mapDeps([42,35,40,34,36,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:PC,diagram:e}},"loader"),GR={id:PC,detector:YR,loader:VR},XR=GR,OC="requirement",QR=b(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),KR=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./requirementDiagram-BXWQKSXE-CXbjO2iH.js");return{diagram:t}},__vite__mapDeps([43,24,25,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:OC,diagram:e}},"loader"),ZR={id:OC,detector:QR,loader:KR},JR=ZR,RC="sequence",t6=b(e=>/^\s*sequenceDiagram/.test(e),"detector"),e6=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-BOhHs5BS.js");return{diagram:t}},__vite__mapDeps([44,30,21,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:RC,diagram:e}},"loader"),r6={id:RC,detector:t6,loader:e6},i6=r6,qC="class",n6=b((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),s6=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./classDiagram-ZZMXUADV-Bs0Yc1kf.js");return{diagram:t}},__vite__mapDeps([45,46,23,24,25,21,7,1,2,3,4,5,6,8,9,10,11,12,13,14]));return{id:qC,diagram:e}},"loader"),a6={id:qC,detector:n6,loader:s6},o6=a6,zC="classDiagram",l6=b((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),c6=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./classDiagram-v2-VYDZK3BY-Bs0Yc1kf.js");return{diagram:t}},__vite__mapDeps([47,46,23,24,25,21,7,1,2,3,4,5,6,8,9,10,11,12,13,14]));return{id:zC,diagram:e}},"loader"),h6={id:zC,detector:l6,loader:c6},u6=h6,WC="state",d6=b((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),p6=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./stateDiagram-D77RDMKH-CNV9xDFJ.js");return{diagram:t}},__vite__mapDeps([48,49,24,25,21,7,16,1,2,3,4,5,6,8,9,10,11,12,13,14]));return{id:WC,diagram:e}},"loader"),f6={id:WC,detector:d6,loader:p6},g6=f6,HC="stateDiagram",m6=b((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),y6=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-MP3YSRHH-DRtxD2YT.js");return{diagram:t}},__vite__mapDeps([50,49,24,25,21,7,1,2,3,4,5,6,8,9,10,11,12,13,14]));return{id:HC,diagram:e}},"loader"),x6={id:HC,detector:m6,loader:y6},b6=x6,UC="journey",C6=b(e=>/^\s*journey/.test(e),"detector"),k6=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./journeyDiagram-3NMN7TZE-BF-_2nZm.js");return{diagram:t}},__vite__mapDeps([51,23,21,39,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:UC,diagram:e}},"loader"),w6={id:UC,detector:C6,loader:k6},v6=w6,S6=b((e,t,r)=>{et.debug(`rendering svg for syntax error
473`);const i=HN(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),rx(i,100,512,!0),n.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"),n.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"),n.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"),n.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.
473164-16,16v32c0,8.836 7.156,16 16,16z"),n.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"),n.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"),n.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"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),YC={draw:S6},T6=YC,_6={db:{},renderer:YC,parser:{parse:b(()=>{},"parse")}},B6=_6,VC="flowchart-elk",L6=b((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),A6=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-Dvyh0QaM.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([22,23,24,25,21,7,26]));return{id:VC,diagram:e}},"loader"),F6={id:VC,detector:L6,loader:A6},E6=F6,GC="timeline",N6=b(e=>/^\s*timeline/.test(e),"detector"),M6=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-PBPdIe_j.js");return{diagram:t}},__vite__mapDeps([52,39,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:GC,diagram:e}},"loader"),$6={id:GC,detector:N6,loader:M6},j6=$6,XC="mindmap",I6=b(e=>/^\s*mindmap/.test(e),"detector"),D6=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./mindmap-definition-YA3MSWOX-Dcb7vEEt.js");return{diagram:t}},__vite__mapDeps([53,24,25,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:XC,diagram:e}},"loader"),P6={id:XC,detector:I6,loader:D6},O6=P6,QC="kanban",R6=b(e=>/^\s*kanban/.test(e),"detector"),q6=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./kanban-definition-UXKFOSKX-C1gp3C8U.js");return{diagram:t}},__vite__mapDeps([54,23,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:QC,diagram:e}},"loader"),z6={id:QC,detector:R6,loader:q6},W6=z6,KC="sankey",H6=b(e=>/^\s*sankey(-beta)?/.test(e),"detector"),U6=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-BVMxolk0.js");return{diagram:t}},__vite__mapDeps([55,40,35,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:KC,diagram:e}},"loader"),Y6={id:KC,detector:H6,loader:U6},V6=Y6,ZC="packet",G6=b(e=>/^\s*packet(-beta)?/.test(e),"detector"),X6=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-CanI1eOF.js");return{diagram:t}},__vite__mapDeps([56,31,32,3,1,2,4,5,6,7,8,9,10,11,12,13,14]));return{id:ZC,diagram:e}},"loader"),Q6={id:ZC,detector:G6,loader:X6},JC="radar",K6=b(e=>/^\s*radar-beta/.test(e),"detector"),Z6=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-Bv9lAcl_.js");return{diagram:t}},__vite__mapDeps([57,31,32,3,1,2,4,5,6,7,8,9,10,11,12,13,14]));return{id:JC,diagram:e}},"loader"),J6={id:JC,detector:K6,loader:Z6},tk="block",t8=b(e=>/^\s*block(-beta)?/.test(e),"detector"),e8=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./blockDiagram-I7D4REHJ-BIdrt5T2.js");return{diagram:t}},__vite__mapDeps([58,23,26,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:tk,diagram:e}},"loader"),r8={id:tk,detector:t8,loader:e8},i8=r8,ek="treeView",n8=b(e=>/^\s*treeView-beta/.test(e),"detector"),s8=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-Co_7-KH9.js");return{diagram:t}},__vite__mapDeps([59,30,31,32,3,1,2,4,5,6,7,8,9,10,11,12,13,14]));return{id:ek,diagram:e}},"loader"),a8={id:ek,detector:n8,loader:s8},o8=a8,rk="architecture",l8=b(e=>/^\s*architecture/.test(e),"detector"),c8=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-BRyPdtcz.js");return{diagram:t}},__vite__mapDeps([60,31,32,3,1,2,4,5,19,6,7,8,9,10,11,12,13,14]));return{id:rk,diagram:e}},"loader"),h8={id:rk,detector:l8,loader:c8},u8=h8,ik="eventmodeling",d8=b(e=>/^\s*eventmodeling/.test(e),"detector"),p8=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-B2gs0iL-.js");return{diagram:t}},__vite__mapDeps([61,31,32,3,1,2,4,5,6,7,8,9,10,11,12,13,14]));return{id:ik,diagram:e}},"loader"),f8={id:ik,detector:d8,loader:p8},g8=f8,nk="ishikawa",m8=b(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),y8=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-DGAsis7l.js");return{diagram:t}},__vite__mapDeps([62,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:nk,diagram:e}},"loader"),x8={id:nk,detector:m8,loader:y8},sk="venn",b8=b(e=>/^\s*venn-beta/.test(e),"detector"),C8=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-VHzRGwQl.js");return{diagram:t}},__vite__mapDeps([63,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:sk,diagram:e}},"loader"),k8={id:sk,detector:b8,loader:C8},w8=k8,ak="treemap",v8=b(e=>/^\s*treemap/.test(e),"detector"),S8=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-DD0TAdAz.js");return{diagram:t}},__vite__mapDeps([64,31,25,32,3,1,2,4,5,36,40,35,6,7,8,9,10,11,12,13,14]));return{id:ak,diagram:e}}
vendor: 4,381 bytes, lines 473-474
473,"loader"),T8={id:ak,detector:v8,loader:S8},ok="wardley",_8=b(e=>/^\s*wardley-beta/i.test(e),"detector"),B8=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-CwOTY0u2.js");return{diagram:t}},__vite__mapDeps([65,31,32,3,1,2,4,5,6,7,8,9,10,11,12,13,14]));return{id:ok,diagram:e}},"loader"),L8={id:ok,detector:_8,loader:B8},A8=L8,lk="cynefin",F8=b(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),E8=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-DTPVYJfM.js");return{diagram:t}},__vite__mapDeps([66,31,32,3,1,2,4,5,6,7,8,9,10,11,12,13,14]));return{id:lk,diagram:e}},"loader"),N8={id:lk,detector:F8,loader:E8},ck="railroad",M8=b(e=>/^\s*railroad-beta/i.test(e),"detector"),$8=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-FywakiTA.js");return{diagram:t}},__vite__mapDeps([67,68,31,32,3,1,2,4,5,6,7,8,9,10,11,12,13,14]));return{id:ck,diagram:e}},"loader"),j8={id:ck,detector:M8,loader:$8},hk="railroadEbnf",I8=b(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),D8=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-my-utOx0.js");return{diagram:t}},__vite__mapDeps([69,68,31,32,3,1,2,4,5,6,7,8,9,10,11,12,13,14]));return{id:hk,diagram:e}},"loader"),P8={id:hk,detector:I8,loader:D8},uk="railroadAbnf",O8=b(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),R8=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-BaiZdJzG.js");return{diagram:t}},__vite__mapDeps([70,68,31,32,3,1,2,4,5,6,7,8,9,10,11,12,13,14]));return{id:uk,diagram:e}},"loader"),q8={id:uk,detector:O8,loader:R8},dk="railroadPeg",z8=b(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),W8=b(async()=>{const{diagram:e}=await Vt(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-BLzUt_v7.js");return{diagram:t}},__vite__mapDeps([71,68,31,32,3,1,2,4,5,6,7,8,9,10,11,12,13,14]));return{id:dk,diagram:e}},"loader"),H8={id:dk,detector:z8,loader:W8},Og=!1,Zo=b(()=>{Og||(Og=!0,Qa("error",B6,e=>e.toLowerCase().trim()==="error"),Qa("---",{db:{clear:b(()=>{},"clear")},styles:{},renderer:{draw:b(()=>{},"draw")},parser:{parse:b(()=>{throw new 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:b(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ac(E6,O6,u8),Ac(uR,W6,u6,o6,BR,jR,PR,qR,JR,i6,vR,bR,gR,j6,ER,b6,g6,v6,UR,V6,Q6,XR,i8,g8,o8,J6,x8,T8,j8,P8,q8,H8,w8,A8,N8))},"addDiagrams"),U8=b(async()=>{et.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Mi).map(async([r,{detector:i,loader:n}])=>{if(n)try{Mc(r)}catch{try{const{diagram:s,id:a}=await n();Qa(a,s,i)}catch(s){throw et.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Mi[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){et.error(`Failed to load ${t.length} external diagrams`);for(const r of t)et.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Y8="graphics-document document";function pk(e,t){e.attr("role",Y8),t!==""&&e.attr("aria-roledescription",t)}b(pk,"setA11yDiagramInfo");function fk(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}b(fk,"addSVGa11yTitleDescription");var Fi,fh=(Fi=class{constructor(t,r,i,n,s){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=s}static async fromText(t,r={}){var c,h;const i=me(),n=Hh(t,i);t=d$(t)+`
474`;try{Mc(n)}catch{const u=PA(n);if(!u)throw new Qy(`Diagram ${n} not found.`);const{id:p,diagram:d}=await u();Qa(p,d)}const{db:s,parser:a,renderer:o,init:l}=Mc(n);return a.parser&&(a.parser.yy=s),(c=s.clear)==null||c.call(s),l==null||l(i),r.title&&((h=s.setDiagramTitle)==null||h.call(s,r.title)),await a.parse(t),new Fi(n,t,s,a,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},b(Fi,"Diagram"),Fi),Rg=[],V8=b(()=>
474{Rg.forEach(e=>{e()}),Rg=[]},"attachFunctions"),G8=b(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function gk(e){const t=e.match(Xy);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
475`).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
476`):t[2];let n=qO(i,{schema:RO})??{};n=typeof n=="object"&&!Array.isArray(n)?n:{};const s={};return n.displayMode&&(s.displayMode=n.displayMode.toString()),n.title&&(s.title=n.title.toString()),n.config&&(s.config=n.config),{text:e.slice(t[0].length),metadata:s}}b(gk,"extractFrontMatter");var X8=b(e=>e.replace(/\r\n?/g,`
477`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Q8=b(e=>{const{text:t,metadata:r}=gk(e),{displayMode:i,title:n,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:n,config:s,text:t}},"processFrontmatter"),K8=b(e=>{const t=Me.detectInit(e)??{},r=Me.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:JM(e),directive:t}},"processDirectives");function ud(e){const t=X8(e),r=Q8(t),i=K8(r.text),n=yu(r.config,i.directive);return e=G8(i.text),{code:e,title:r.title,config:n}}b(ud,"preprocessDiagram");function mk(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}b(mk,"toBase64");var Z8=5e4,J8="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",tq="sandbox",eq="loose",rq="http://www.w3.org/2000/svg",iq="http://www.w3.org/1999/xlink",nq="http://www.w3.org/1999/xhtml",sq="100%",aq="100%",oq="border:0;margin:0;",lq="margin:0",cq="allow-top-navigation-by-user-activation allow-popups",hq='The "iframe" tag is not supported by your browser.',uq=["foreignobject"],dq=["dominant-baseline"];function dd(e){const t=ud(e);return Ga(),$A(t.config??{}),t}b(dd,"processAndSetConfigs");async function yk(e,t){Zo();try{const{code:r,config:i}=dd(e);return{diagramType:(await bk(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}b(yk,"parse");var qg=b((e,t,r=[])=>{const i=Hy(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),pq=b((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const o=Ie(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Xp(l.styles)||o.forEach(c=>{r.insertRule(qg(l.id,c,l.styles),r.cssRules.length)}),Xp(l.textStyles)||r.insertRule(qg(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const n=new CSSStyleSheet;n.replaceSync(e.themeCSS),i=Nc(n)+`
478`}else i+=`${e.themeCSS}
479`;return i+Nc(r)},"createCssStyles"),fq=b((e,t)=>ph(nR(`${e}{${t}}`),oR([b(function(i,n,s,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===hh)return;i.props=i.props.map(o=>o===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(o.startsWith(`${e} `)||o.startsWith(`${e}>`))&&!o.startsWith(`${e} ||`)?o:`${e} ${o}`)}else i.type.startsWith("@")&&([...[HO,YO,SC,GO,"@container","@starting-style"],hh].includes(i.type)||(et.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=cd))},"addNamespace"),aR])),"compileCSS"),gq=b((e,t,r,i)=>{const n=pq(e,r),s=rF(t,n,{...e.themeVariables,theme:e.theme,look:e.look},i);return fq(i,s)},"createUserStyles"),mq=b((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=hi(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),yq=b((e="",t)=>{var n,s;const r=(s=(n=t==null?void 0:t.viewBox)==null?void 0:n.baseVal)!=null&&s.height?t.viewBox.baseVal.height+"px":aq,i=mk(`<body style="${lq}">${e}</body>`);return`<iframe style="width:${sq};height:${r};${oq}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${cq}">
480  ${hq}
481</iframe>`},"putIntoIFrame"),zg=b((e,t,r,i,n)=>{const s=e.append("div");
vendor: 5,373 bytes, line 481
481s.attr("id",r),i&&s.attr("style",i);const a=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",rq);return n&&a.attr("xmlns:xlink",n),a.append("g"),e},"appendDivSvgG");function gh(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}b(gh,"sandboxedIframe");var xq=b((e,t,r,i)=>{var n,s,a;(n=e.getElementById(t))==null||n.remove(),(s=e.getElementById(r))==null||s.remove(),(a=e.getElementById(i))==null||a.remove()},"removeExistingElements"),bq=b(async function(e,t,r){var O,I,j,A,R,H;Zo();const i=dd(t);t=i.code;const n=me();et.debug(n),t.length>((n==null?void 0:n.maxTextSize)??Z8)&&(t=J8);const s=`#${e}`,a="i"+e,o="#"+a,l="d"+e,c="#"+l,h=b(()=>{const _=Yt(p?o:c).node();_&&"remove"in _&&_.remove()},"removeTempElements");let u=Yt(document.body);const p=n.securityLevel===tq,d=n.securityLevel===eq,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const q=gh(Yt(r),a);u=Yt(q.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=Yt(r);zg(u,e,l,`font-family: ${g}`,iq)}else{if(xq(document,e,l,a),p){const q=gh(Yt(document.body),a);u=Yt(q.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=Yt("body");zg(u,e,l)}let y,C;try{y=await fh.fromText(t,{title:i.title})}catch(q){if(n.suppressErrorRendering)throw h(),q;y=await fh.fromText("error"),C=q}const x=u.select(c).node(),w=y.type,k=x.firstChild,v=k.firstChild,T=(I=(O=y.renderer).getClasses)==null?void 0:I.call(O,t,y),L=gq(n,w,T,s),D=document.createElement("style");D.innerHTML=L,k.insertBefore(D,v);try{await y.renderer.draw(t,e,"11.17.2",y)}catch(q){throw n.suppressErrorRendering?h():T6.draw(t,e,"11.17.2"),q}const M=u.select(`${c} svg`),W=(A=(j=y.db).getAccTitle)==null?void 0:A.call(j),E=(H=(R=y.db).getAccDescription)==null?void 0:H.call(R);Ck(w,M,W,E);const z=b(()=>{u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",nq);let q=u.select(c).node().innerHTML;if(et.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),q=mq(q,p,Mr(n.arrowMarkerAbsolute)),p){const _=u.select(c+" svg").node();q=yq(q,_)}else d||(q=Sn.sanitize(q,{ADD_TAGS:uq,ADD_ATTR:dq,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return V8(),q},"serializeSvg")();if(C)throw C;return h(),{diagramType:w,svg:z,bindFunctions:y.db.bindFunctions}},"render");function xk(e={}){var i;const t=Te({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),NA(t),t!=null&&t.theme&&t.theme in zr?t.themeVariables=zr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=zr.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?EA(t):Uy();Wh(r.logLevel),Zo()}b(xk,"initialize");var bk=b((e,t={})=>{const{code:r}=ud(e);return fh.fromText(r,t)},"getDiagramFromText");function Ck(e,t,r,i){pk(t,e),fk(t,r,i,t.attr("id"))}b(Ck,"addA11yInfo");var Oi=Object.freeze({render:bq,parse:yk,getDiagramFromText:bk,initialize:xk,getConfig:me,setConfig:Yy,getSiteConfig:Uy,updateSiteConfig:MA,reset:b(()=>{Ga()},"reset"),globalReset:b(()=>{Ga(_n)},"globalReset"),defaultConfig:_n});Wh(me().logLevel);Ga(me());var Cq=b((e,t,r)=>{et.warn(e),mu(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),kk=b(async function(e={querySelector:".mermaid"}){try{await kq(e)}catch(t){if(mu(t)&&et.error(t.str),tr.parseError&&tr.parseError(t),!e.suppressErrors)throw et.error("Use the suppressErrors option to suppress these errors"),t}},"run"),kq=b(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Oi.getConfig();et.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");et.debug(`Found ${n.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(et.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Oi.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const s=new Me.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const o=[];for(const l of Array.from(n)){if(et.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;a=l.innerHTML,a=A0(Me.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Me.detectInit(a);h&&et.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:p}=await Tk(c,a,l);l.innerHTML=u,e&&await e(c),p&&p(l)}catch(u){Cq(u,o,tr.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),wk=b(function(e){Oi.initialize(e)},"initialize"),wq=b(async function(e,t,r){et.warn("mermaid.init is deprecated. Please use run instead."),e&&wk(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await kk(i)},"init"),vq=b(async(e,{lazyLoad:t=!0}={})=>{Zo(),Ac(...e),t===!1&&await U8()},"registerExternalDiagrams"),vk=b(function(){if(tr.startOnLoad){const{startOnLoad:e}=Oi.getConfig();e&&tr.run().catch(t=>et.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",vk,!1);var Sq=b(function(e){tr.parseError=e},"setParseErrorHandler"),bo=[],cc=!1,Sk=b(async()=>
481{if(!cc){for(cc=!0;bo.length>0;){const e=bo.shift();if(e)try{await e()}catch(t){et.error("Error executing queue",t)}}cc=!1}},"executeQueue"),Tq=b(async(e,t)=>new Promise((r,i)=>{const n=b(()=>new Promise((s,a)=>{Oi.parse(e,t).then(o=>{s(o),r(o)},o=>{var l;et.error("Error parsing",o),(l=tr.parseError)==null||l.call(tr,o),a(o),i(o)})}),"performCall");bo.push(n),Sk().catch(i)}),"parse"),Tk=b((e,t,r)=>new Promise((i,n)=>{const s=b(()=>new Promise((a,o)=>{Oi.render(e,t,r).then(l=>{a(l),i(l)},l=>{var c;et.error("Error parsing",l),(c=tr.parseError)==null||c.call(tr,l),o(l),n(l)})}),"performCall");bo.push(s),Sk().catch(n)}),"render"),_q=b(()=>Object.keys(Mi).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),tr={startOnLoad:!0,mermaidAPI:Oi,parse:Tq,render:Tk,init:wq,run:kk,registerExternalDiagrams:vq,registerLayoutLoaders:kC,initialize:wk,parseError:void 0,contentLoaded:vk,setParseErrorHandler:Sq,detectType:Hh,registerIconPacks:gM,getRegisteredDiagramsMetadata:_q},_k=tr;/*! Check if previously processed *//*!
482 * Wait for document loaded before starting the execution
483 */function hc(e,t,r){return Math.min(r,Math.max(t,e))}const Jo=({children:e,title:t="Diagram canvas",initialZoom:r=100,minZoom:i=50,maxZoom:n=240,step:s=20,baseWidth:a=null,className:o="",viewportClassName:l="h-[420px] max-h-[65vh]"})=>{const[c,h]=V.useState(()=>hc(r,i,n)),u=a?Math.round(Math.max(1,a)*(c/100)):null,p=d=>{h(g=>hc(g+d,i,n))};return f.jsxs("div",{className:`rounded-xl border border-slate-200 bg-white overflow-hidden ${o}`,children:[f.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-slate-200 bg-slate-50 px-3 py-2.5 flex-wrap",children:[f.jsx("div",{className:"min-w-0 truncate text-[11px] font-semibold uppercase tracking-wide text-slate-600",children:t}),f.jsxs("div",{className:"flex items-center gap-2 rounded-xl border border-slate-300 bg-white px-2 py-1.5 shadow-sm",children:[f.jsxs("button",{type:"button",onClick:()=>p(-s),disabled:c<=i,title:"Zoom out","aria-label":"Zoom out",className:"inline-flex items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 py-1.5 text-[12px] font-semibold text-slate-700 hover:border-slate-300 hover:bg-slate-100 hover:text-slate-900 disabled:opacity-35 disabled:hover:bg-white disabled:hover:text-slate-700",children:[f.jsx(Cv,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:"Out"})]}),f.jsxs("span",{className:"min-w-14 rounded-lg bg-slate-100 px-2 py-1.5 text-center text-[12px] tabular-nums font-bold text-slate-700",children:[c,"%"]}),f.jsxs("button",{type:"button",onClick:()=>p(s),disabled:c>=n,title:"Zoom in","aria-label":"Zoom in",className:"inline-flex items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 py-1.5 text-[12px] font-semibold text-slate-700 hover:border-slate-300 hover:bg-slate-100 hover:text-slate-900 disabled:opacity-35 disabled:hover:bg-white disabled:hover:text-slate-700",children:[f.jsx(xv,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:"In"})]}),f.jsxs("button",{type:"button",onClick:()=>h(hc(r,i,n)),title:"Reset zoom","aria-label":"Reset zoom",className:"inline-flex items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 py-1.5 text-[12px] font-semibold text-slate-700 hover:border-slate-300 hover:bg-slate-100 hover:text-slate-900",children:[f.jsx(mc,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:"Reset"})]})]})]}),f.jsx("div",{className:`overflow-auto bg-white ${l}`,children:f.jsx("div",{className:"p-4",style:{width:u?`${u}px`:`${c}%`,minWidth:u?`${u}px`:`${c}%`,marginLeft:c<100?"auto":0,marginRight:c<100?"auto":0},children:e})})]})};Jo.propTypes={children:Y.node.isRequired,title:Y.string,initialZoom:Y.number,minZoom:Y.number,maxZoom:Y.number,step:Y.number,baseWidth:Y.number,className:Y.string,viewportClassName:Y.string};const Bq=24,vi=new Map,uc=new Map;let Wg=!1;function Lq(e,t,r){let i=0;const n=`${e||"anon"}::${t||"mermaid"}::${r||""}`;for(let s=0;s<n.length;s+=1)i=(i<<5)-i+n.charCodeAt(s)|0;return`${e||"anon"}::${t||"mermaid"}::${n.length}::${i}`}function Aq(e,t){if(!(!e||!t))for(vi.has(e)&&vi.delete(e),vi.set(e,t);vi.size>Bq;){const r=vi.keys().next().value;vi.delete(r)}}function Fq(){Wg||(_k.initialize({startOnLoad:!1,securityLevel:"strict",theme:"base",themeVariables:{background:"#ffffff",primaryColor:"#eef2ff",primaryBorderColor:"#4f46e5",primaryTextColor:"#111827",lineColor:"#64748b",clusterBkg:"#f8fafc",clusterBorder:"#cbd5e1",fontFamily:"Inter, ui-sans-serif, system-ui, sans-serif"},flowchart:{htmlLabels:!0,useMaxWidth:!0,curve:"basis"}}),Wg=!0)}function Eq(e){return!e||!e.toLowerCase().includes("<svg")?"":e.replace(/<script\b[^>]*>[\s\S]*?<\/script>
483/gi,"").replace(/\s+on[a-z]+\s*=\s*"[^"]*"/gi,"").replace(/\s+on[a-z]+\s*=\s*'[^']*'/gi,"").replace(/(href|xlink:href)\s*=\s*"javascript:[^"]*"/gi,"").replace(/(href|xlink:href)\s*=\s*'javascript:[^']*'/gi,"")}function Bk(e){return e?String(e).split(/\r?\n/).filter(t=>{const i=t.trim().match(/^style\s+(.+?)\s+(fill|stroke|color|opacity|stroke-width|stroke-dasharray|background|font-size|font-weight|rx|ry)\b/i);return i?/^[A-Za-z_][\w-]*$/.test(i[1].trim()):!0}).join(`
484`).trim():""}async function Nq(e,t){Fq(),await new Promise(s=>{typeof window<"u"&&window.requestIdleCallback?window.requestIdleCallback(s,{timeout:300}):window.setTimeout(s,0)});const r=`consultant-mermaid-${t.replace(/[^A-Za-z0-9_-]/g,"").slice(-40)}`,i=await _k.render(r,Bk(e)),n=Eq((i==null?void 0:i.svg)||"");if(!n)throw new Error("Mermaid returned an empty SVG");return n}const Hg=()=>f.jsx("div",{className:"p-4 rounded-xl border border-slate-100 bg-white",children:f.jsxs("div",{className:"space-y-3 animate-pulse",children:[f.jsx("div",{className:"h-4 w-32 rounded bg-slate-200"}),f.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[f.jsx("div",{className:"h-20 rounded-lg bg-slate-100"}),f.jsx("div",{className:"h-20 rounded-lg bg-slate-100"}),f.jsx("div",{className:"h-20 rounded-lg bg-slate-100"})]}),f.jsx("div",{className:"h-3 w-2/3 rounded bg-slate-100"})]})}),Ls=({sessionId:e,format:t="mermaid",source:r,onCapture:i})=>{const[n,s]=V.useState(null),[a,o]=V.useState(!1),[l,c]=V.useState(null),h=V.useRef(i);if(V.useEffect(()=>{h.current=i},[i]),V.useEffect(()=>{if(!r){s(null),c(null),o(!1);return}const p=(t||"mermaid").toLowerCase(),d=p==="mermaid"?Bk(r):r;if(p!=="mermaid"&&!e){c("Sign in to render this diagram");return}const g=Lq(e,p,d),y=vi.get(g);if(y){s(y),o(!1),c(null);return}let C=!1;return o(!0),c(null),(async()=>{let x=uc.get(g);x||(p==="mermaid"?x=Nq(d,g).catch(async w=>{if(!e)throw w;const k=await vd(e,d,"mermaid");if(k!=null&&k.success&&k.svg)return k.svg;throw w}):x=vd(e,d,p).then(w=>{var v;if(w!=null&&w.success&&w.svg)return w.svg;const k=((v=w==null?void 0:w.error)==null?void 0:v.detail)||`Could not render ${p} diagram`;throw new Error(k)}),uc.set(g,x));try{const w=await x.finally(()=>{uc.delete(g)});if(C)return;o(!1),Aq(g,w),s(w)}catch(w){if(C)return;o(!1),c((w==null?void 0:w.message)||"Could not render diagram")}})(),()=>{C=!0}},[e,t,r]),V.useEffect(()=>{n&&typeof h.current=="function"&&h.current(n)},[n]),!r)return null;if(a)return f.jsxs("div",{className:"space-y-2",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[f.jsx(de,{className:"w-3.5 h-3.5 animate-spin text-[var(--color-brand,#006B82)]"}),"Rendering diagram…"]}),f.jsx(Hg,{})]});if(l)return f.jsxs("div",{className:"p-3 text-xs text-red-700 bg-red-50 border border-red-100 rounded-xl",children:["Diagram render failed: ",l]});if(!n)return f.jsx(Hg,{});const u=(t||"mermaid").toLowerCase();return f.jsx(Jo,{title:u==="mermaid"?"Blueprint canvas":`${u.toUpperCase()} canvas`,initialZoom:u==="mermaid"?160:130,minZoom:80,maxZoom:280,viewportClassName:"h-[460px] max-h-[70vh]",children:f.jsx("div",{className:"bg-white [&>svg]:w-full [&>svg]:h-auto",dangerouslySetInnerHTML:{__html:n}})})};Ls.propTypes={sessionId:Y.string,format:Y.oneOf(["mermaid","plantuml","puml","c4plantuml","d2","graphviz","dot","excalidraw","structurizr","bpmn","blockdiag","seqdiag","actdiag","nwdiag"]),source:Y.string,beautify:Y.bool,onCapture:Y.func};const Zi=(e,t)=>{if(e==null)return"-";try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t||"USD",maximumFractionDigits:0}).format(e)}catch{return`${Number(e).toLocaleString()} ${t}`.trim()}},Lk=({boq:e,locked:t=!1,onUnlock:r,costConfirmed:i=!1,onConfirmCost:n})=>{var o,l,c,h,u,p;if(!e||!Array.isArray(e.rows))return f.jsx("div",{className:"p-4 text-sm text-gray-500 bg-gray-50 rounded-xl border border-gray-200",children:"No bill of quantities yet. The agent will assemble one as you confirm scope, then you’ll see a priced table here."});const s=e.currency||"USD",a=e.disclaimer||"Planning estimate only. Validate live cloud pricing, licensing, discounts, tax, partner rates, and procurement terms before approval.";return f.jsxs("div",{className:"relative rounded-2xl border border-gray-200 bg-white shadow-sm overflow-hidden",children:[f.jsxs("div",{className:t?"pointer-events-none select-none filter blur-md grayscale":"",children:[f.jsxs("div",{className:"px-4 py-3 border-b border-gray-100 bg-gradient-to-r from-indigo-50 to-white",children:[f.jsx("div",{className:"text-xs uppercase tracking-wide text-indigo-700 font-semibold",children:"Bill of Quantities"}),f.jsxs("div",{className:"text-sm text-gray-700 mt-0.5",children:[e.regi
484on?`${e.region} · `:"",s,e.industryLine||e.insuranceLine?` · ${e.industryLine||e.insuranceLine}`:""]})]}),f.jsx("div",{className:"overflow-x-auto",children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{className:"bg-gray-50 text-gray-600",children:f.jsxs("tr",{children:[f.jsx("th",{className:"text-left px-3 py-2 font-medium",children:"Category"}),f.jsx("th",{className:"text-left px-3 py-2 font-medium",children:"Item"}),f.jsx("th",{className:"text-right px-3 py-2 font-medium",children:"Qty"}),f.jsx("th",{className:"text-left px-3 py-2 font-medium",children:"Unit"}),f.jsx("th",{className:"text-right px-3 py-2 font-medium",children:"Unit price"}),f.jsx("th",{className:"text-right px-3 py-2 font-medium",children:"3-year cost"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-100",children:e.rows.map((d,g)=>f.jsxs("tr",{className:"hover:bg-gray-50",children:[f.jsx("td",{className:"px-3 py-2 text-gray-600 align-top",children:d.category||"-"}),f.jsxs("td",{className:"px-3 py-2 align-top",children:[f.jsx("div",{className:"text-gray-900",children:d.name}),f.jsx("div",{className:`text-[11px] ${d.priceSource==="live"?"text-emerald-700":d.priceSource==="listed"?"text-indigo-700":"italic text-amber-700"}`,children:d.priceSource==="live"?"live Azure price":d.priceSource==="listed"?"catalog price":"planning estimate"}),d.notes&&f.jsx("div",{className:"text-[11px] text-gray-500 mt-0.5",children:d.notes})]}),f.jsx("td",{className:"px-3 py-2 text-right align-top",children:d.quantity}),f.jsxs("td",{className:"px-3 py-2 text-gray-600 align-top",children:[f.jsx("div",{children:d.unit}),d.billingCadence&&f.jsxs("div",{className:"text-[11px] text-gray-500",children:[d.billingCadence,d.durationMonths?` · ${d.durationMonths} months`:""]})]}),f.jsx("td",{className:"px-3 py-2 text-right align-top tabular-nums",children:Zi(d.unitPrice,s)}),f.jsx("td",{className:"px-3 py-2 text-right align-top tabular-nums font-medium",children:Zi(d.tco3y??d.subtotal,s)})]},g))}),f.jsxs("tfoot",{className:"bg-gray-50 text-gray-800",children:[f.jsxs("tr",{children:[f.jsx("td",{colSpan:5,className:"px-3 py-2 text-right font-medium",children:"Monthly recurring"}),f.jsx("td",{className:"px-3 py-2 text-right tabular-nums font-semibold",children:Zi((o=e.totals)==null?void 0:o.monthly,s)})]}),f.jsxs("tr",{children:[f.jsx("td",{colSpan:5,className:"px-3 py-2 text-right font-medium",children:"Annual recurring"}),f.jsx("td",{className:"px-3 py-2 text-right tabular-nums font-semibold",children:Zi((l=e.totals)==null?void 0:l.annual,s)})]}),f.jsxs("tr",{children:[f.jsx("td",{colSpan:5,className:"px-3 py-2 text-right font-medium",children:"One-off"}),f.jsx("td",{className:"px-3 py-2 text-right tabular-nums font-semibold",children:Zi((c=e.totals)==null?void 0:c.oneOff,s)})]}),f.jsxs("tr",{className:"bg-indigo-50",children:[f.jsx("td",{colSpan:5,className:"px-3 py-2 text-right font-semibold text-indigo-900",children:"Estimated 3-year TCO"}),f.jsx("td",{className:"px-3 py-2 text-right tabular-nums font-bold text-indigo-900",children:Zi((h=e.totals)==null?void 0:h.tco3y,s)})]})]})]})}),((p=(u=e.sanity)==null?void 0:u.warnings)==null?void 0:p.length)>0&&f.jsxs("div",{className:"px-4 py-3 border-t border-amber-200 bg-amber-50 text-amber-900",children:[f.jsxs("div",{className:"flex items-center gap-1.5 text-[12px] font-semibold",children:[f.jsx(mr,{className:"w-3.5 h-3.5"}),"Review estimate assumptions"]}),f.jsx("ul",{className:"mt-1 space-y-0.5 text-[11px] list-disc pl-4",children:e.sanity.warnings.map(d=>f.jsx("li",{children:d},d))})]}),f.jsx("div",{className:"px-4 py-2 text-[11px] text-sky-800 bg-sky-50 border-t border-sky-100",children:a}),!t&&n&&f.jsx(Ak,{confirmed:i,onConfirm:n})]}),t&&f.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-white/40 backdrop-blur-[2px]",children:f.jsxs("button",{type:"button",onClick:r,className:"inline-flex items-center gap-2 px-4 py-2 bg-gray-900 text-white rounded-xl shadow-lg hover:bg-gray-700",children:[f.jsx(ko,{className:"w-4 h-4"}),"Sign up free to view full pricing"]})})]})};Lk.propTypes={boq:Y.shape({currency:Y.string,region:Y.string,insuranceLine:Y.string,industryLine:Y.string,industryPack:Y.string,rows:Y.array,totals:Y.object,sanity:Y.object,disclaimer:Y.string}),locked:Y.bool,onUnlock:Y.func,costConfirmed:Y.bool,onConfirmCost:Y.func};function Ak({confirmed:e,onConfirm:t}){const[r,i]=V.useState(!1),[n,s]=V.useState(null),a=async()=>{i(!0),s(null);try{await t(!0)===!1&&s("Could not save your confirmation. Please try again.")}finally{i(!1)}};return e?f.jsxs("div",{className:"px-4 py-2.5 border-t border-emerald-100 bg-emerald-50/70 flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"flex items-center gap-1.5 text-[12px] text-emerald-800",children:[f.jsx(je,{className:"w-3.5 h-3.5"}),"Pricing confirmed - ready to export."]}
484),f.jsx("button",{type:"button",onClick:()=>t(!1),className:"text-[11px] text-emerald-700 hover:text-emerald-900 underline",children:"Undo"})]}):f.jsxs("div",{className:"px-4 py-2.5 border-t border-gray-100 bg-gray-50 flex flex-col sm:flex-row sm:items-center justify-between gap-2",children:[f.jsx("div",{className:"text-[12px] text-gray-700",children:"Happy with this estimate? Confirm to unlock the export options."}),f.jsxs("div",{className:"flex items-center gap-2",children:[n&&f.jsx("span",{className:"text-[11px] text-red-600",children:n}),f.jsxs("button",{type:"button",onClick:a,disabled:r,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-[12px] rounded-lg bg-[var(--color-brand,#00C7FD)] text-white font-medium hover:opacity-90 disabled:opacity-50",children:[r?f.jsx(de,{className:"w-3.5 h-3.5 animate-spin"}):f.jsx(je,{className:"w-3.5 h-3.5"}),"Confirm pricing"]})]})]})}Ak.propTypes={confirmed:Y.bool,onConfirm:Y.func.isRequired};function qe(e){return Array.isArray(e)?e.filter(Boolean):[]}function Jr(e,t,r,i=void 0){return!e||typeof e!="object"?i:e[t]!==void 0?e[t]:e[r]!==void 0?e[r]:i}function be(e,t=""){return e==null?t:typeof e=="string"?e.trim()||t:typeof e=="number"||typeof e=="boolean"?String(e):typeof e=="object"?be(e.title||e.name||e.description||e.summary,t):t}function Mq(e){const t=String(e||"core").toLowerCase().replace(/[^a-z0-9]+/g,"_");return{channels:"Channels",channel:"Channels",frontend:"Channels",edge:"Edge & Identity",gateway:"Edge & Identity",core:"Core business systems",system:"Core business systems",service:"Core business systems",services:"Core business systems",integration:"Integration",data:"Data stores",database:"Data stores",analytics:"Data stores",ai:"AI & decisioning",ml:"AI & decisioning",decisioning:"AI & decisioning",security:"Security",controls:"Controls & ops",observability:"Observability",monitoring:"Observability",external:"External systems",saas:"External systems"}[t]||String(e||"Core business systems")}function $q(e){const t=be(e.source,"Source"),r=be(e.target,"Target"),i=[e.protocol,e.mode,e.data].map(n=>be(n)).filter(Boolean);return`${t} -> ${r}${i.length?` (${i.join(" / ")})`:""}`}function dc(e){return String(e||"").replace(/[_-]+/g," ").replace(/\s+/g," ").trim()}function jq(e){const t=Number(e);return Number.isFinite(t)?`${Math.round(Math.max(0,Math.min(1,t))*100)}%`:null}const ei=({title:e,children:t})=>f.jsxs("section",{className:"border-t border-gray-100 pt-3 first:border-t-0 first:pt-0",children:[f.jsx("h4",{className:"text-[11px] uppercase tracking-wide text-gray-500 font-semibold mb-2",children:e}),t]});ei.propTypes={title:Y.string.isRequired,children:Y.node};const mh=({flows:e})=>e.length?f.jsx("ul",{className:"space-y-2 text-sm text-gray-800",children:e.slice(0,10).map((t,r)=>f.jsxs("li",{children:[f.jsx("div",{className:"font-medium text-gray-900",children:$q(t)}),(t.purpose||t.name)&&f.jsx("div",{className:"text-[12px] leading-relaxed text-gray-600",children:be(t.purpose||t.name)}),qe(t.controls).length>0&&f.jsxs("div",{className:"text-[11px] text-gray-500 mt-0.5",children:["Controls: ",qe(t.controls).map(i=>be(i)).filter(Boolean).join(", ")]})]},`${t.source||"source"}-${t.target||"target"}-${r}`))}):null;mh.propTypes={flows:Y.array.isRequired};const pd=({architecture:e,compact:t=!1})=>{if(!e||typeof e!="object")return null;const r=qe(e.components),i=qe(Jr(e,"integrationFlows","integration_flows",[])),n=qe(Jr(e,"dataFlows","data_flows",[])),s=[...qe(Jr(e,"securityControls","security_controls",[])).map(k=>({...k,group:"Security"})),...qe(Jr(e,"resilienceControls","resilience_controls",[])).map(k=>({...k,group:"Resilience"})),...qe(Jr(e,"observabilityControls","observability_controls",[])).map(k=>({...k,group:"Observability"}))],a=qe(e.decisions),o=qe(e.risks),l=qe(Jr(e,"requirementTraceability","requirement_traceability",[])),c=qe(Jr(e,"openDecisions","open_decisions",[])),h=qe(e.assumptions).map(k=>be(k)).filter(Boolean),u=e.inferenceSummary||e.inference_summary||null,p=e.evidenceCoverage||e.evidence_coverage||null,d=jq(e.confidence),g=dc(e.generationMode||e.generation_mode),y=dc(e.cloudSource||e.cloud_source),C=dc(e.cloudTopology||e.cloud_topology),x=r.reduce((k,v)=>{const T=Mq(v.category);return k[T]=k[T]||[],k[T].push(v),k},{});return e.summary||r.length||i.length||n.length||s.length||a.length||o.length?f.jsxs("div",{className:`${t?"mt-3":"mt-4"} space-y-3`,children:[e.summary&&f.jsx("p",{className:"text-sm leading-relaxed text-gray-700",children:e.summary}),f.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-center text-[11px] text-gray-600",children:[f.jsxs("div",{className:"border border-gray-100 rounded-lg px-2 py-2",children:[f.jsx("div",{className:"text-lg font-semibold text-gray-900",children:r.length}),"Components"]}),f.jsxs("div",{className:"border border-gray-100 rounded-lg px-2 py-2",children:[f.jsx("div",{className:"text-lg font-semibold text-gray-900",children:i.length}),"Runtime flows"]}),f.jsxs("div",{className:"border border-gray-100 rounded-lg px-2 py-2",children:[f.jsx("div",{className:"text-lg font-semibold text-gray-900",children:n.length}),"Data flows"]}),f.jsxs("div",{className:"border border-gray-100 rounded-lg px-2 py-2",children:[f.jsx("div",{className:"text-lg font-semibold text-gray-900",children:s.length}),"Controls"]}
484)]}),(h.length>0||u||p||d||g||C)&&f.jsxs(ei,{title:"Confidence, evidence, and assumptions",children:[f.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-[11px] text-gray-600 mb-2",children:[d&&f.jsxs("div",{className:"border border-gray-100 rounded-lg px-2 py-2",children:[f.jsx("div",{className:"text-sm font-semibold text-gray-900",children:d}),"Confidence"]}),g&&f.jsxs("div",{className:"border border-gray-100 rounded-lg px-2 py-2",children:[f.jsx("div",{className:"text-sm font-semibold text-gray-900 capitalize",children:g}),"Generation mode"]}),C&&f.jsxs("div",{className:"border border-gray-100 rounded-lg px-2 py-2",children:[f.jsx("div",{className:"text-sm font-semibold text-gray-900 capitalize",children:C}),"Cloud topology"]}),p&&f.jsxs("div",{className:"border border-gray-100 rounded-lg px-2 py-2",children:[f.jsxs("div",{className:"text-sm font-semibold text-gray-900",children:[Number(p.indexedDocuments||0),"/",Number(p.uploadedDocuments||0)]}),"Indexed docs"]})]}),u&&f.jsxs("div",{className:"rounded-lg border border-sky-100 bg-sky-50 px-3 py-2 text-[12px] leading-relaxed text-slate-800 mb-2",children:["Explicit components: ",Number(u.explicitComponents||0),". Inferred production-baseline components: ",Number(u.inferredComponents||0),". Inferred flows: ",Number(u.inferredFlows||0),"."]}),(p==null?void 0:p.pendingDocuments)>0&&f.jsxs("div",{className:"rounded-lg border border-sky-100 bg-sky-50 px-3 py-2 text-[12px] leading-relaxed text-slate-800 mb-2",children:[Number(p.pendingDocuments)," uploaded document",Number(p.pendingDocuments)===1?"":"s"," still indexing: ",qe(p.pendingFilenames).map(k=>be(k)).filter(Boolean).join(", ")]}),y&&f.jsxs("div",{className:"text-[12px] text-gray-600 mb-1",children:["Cloud source: ",y]}),h.length>0&&f.jsx("ul",{className:"space-y-1 text-[12px] leading-relaxed text-gray-700",children:h.slice(0,t?4:8).map((k,v)=>f.jsxs("li",{children:["- ",k]},`${k}-${v}`))})]}),i.length>0&&f.jsx(ei,{title:"End-to-end runtime",children:f.jsx(mh,{flows:i})}),n.length>0&&f.jsx(ei,{title:"Data, AI, and residency",children:f.jsx(mh,{flows:n})}),s.length>0&&f.jsx(ei,{title:"Security, resilience, and operations",children:f.jsx("ul",{className:"space-y-1.5 text-sm text-gray-800",children:s.slice(0,12).map((k,v)=>f.jsxs("li",{children:[f.jsxs("span",{className:"font-medium text-gray-900",children:[k.group,": ",be(k.name,"Control")]}),k.implementation&&f.jsxs("span",{children:[" - ",be(k.implementation)]}),k.purpose&&f.jsx("div",{className:"text-[12px] text-gray-600 leading-relaxed",children:be(k.purpose)})]},`${k.group}-${k.name||v}`))})}),r.length>0&&f.jsx(ei,{title:"Components by layer",children:f.jsx("div",{className:"space-y-2 text-sm",children:Object.entries(x).map(([k,v])=>f.jsxs("div",{children:[f.jsx("div",{className:"text-[12px] font-semibold text-gray-500 mb-1",children:k}),f.jsx("ul",{className:"space-y-1 text-gray-800",children:v.slice(0,t?5:10).map((T,L)=>f.jsxs("li",{children:[f.jsx("span",{className:"font-medium text-gray-900",children:be(T.name||T.id,`Component ${L+1}`)}),T.provider||T.service?f.jsxs("span",{className:"text-gray-500",children:[" ","(",[T.provider,T.service].map(D=>be(D)).filter(Boolean).join(" / "),")"]}):null,T.purpose&&f.jsxs("span",{className:"text-gray-600",children:[" - ",be(T.purpose)]})]},`${T.id||T.name||k}-${L}`))})]},k))})}),(a.length>0||o.length>0||c.length>0)&&f.jsx(ei,{title:"Decisions, risks, and open items",children:f.jsxs("ul",{className:"space-y-1.5 text-sm text-gray-800",children:[a.slice(0,8).map((k,v)=>f.jsxs("li",{children:[f.jsxs("span",{className:"font-medium text-gray-900",children:["Decision: ",be(k.title||k.name,`Decision ${v+1}`)]}),(k.choice||k.rationale)&&f.jsxs("span",{className:"text-gray-600",children:[" - ",be(k.choice||k.rationale)]})]},`decision-${k.title||v}`)),o.slice(0,6).map((k,v)=>f.jsxs("li",{children:[f.jsxs("span",{className:"font-medium text-gray-900",children:["Risk: ",be(k.title,`Risk ${v+1}`)]}),(k.impact||k.mitigation)&&f.jsxs("span",{className:"text-gray-600",children:[" - ",be(k.impact||k.mitigation)]})]},`risk-${k.title||v}`)),c.slice(0,6).map((k,v)=>f.jsxs("li",{children:[f.jsx("span",{className:"font-medium text-gray-900",children:"Open item:"})," ",f.jsx("span",{className:"text-gray-600",children:be(k)})]},`open-${v}`))]})}),l.length>0&&!t&&f.jsx(ei,{title:"Requirement traceability",children:f.jsx("ul",{className:"space-y-1.5 text-sm text-gray-800",children:l.slice(0,10).map((k,v)=>{const T=qe(Jr(k,"componentIds","component_ids",[]));return f.jsxs("li",{children:[f.jsx("span",{className:"font-medium text-gray-900",children:be(k.requirementId||k.requirement,`Requirement ${v+1}`)}),T.length>0&&f.jsxs("span",{className:"text-gray-600",children:[" ","->
484"," ",T.join(", ")]}),k.note&&f.jsxs("span",{className:"text-gray-600",children:[" - ",be(k.note)]})]},`trace-${k.requirementId||k.requirement||v}`)})})})]}):null};pd.propTypes={architecture:Y.object,compact:Y.bool};function Iq(e){const t=String(e||"").trim();if(!t)return null;if(/^(data:|blob:|https?:\/\/)/i.test(t))return t;const r="https://api.bytical.ai".replace(/\/$/,"");return t.startsWith("/")&&r?`${r}${t}`:t}const fd=({url:e,dataUri:t,alt:r="Cloud architecture map",className:i="",onAllSourcesFailed:n,fallback:s=null})=>{const a=V.useMemo(()=>{const g=[t,e].map(Iq).filter(Boolean);return[...new Set(g)]},[t,e]),o=V.useMemo(()=>a.join("|"),[a]),[l,c]=V.useState(0),[h,u]=V.useState(null);V.useEffect(()=>{c(0)},[o]);const p=a[l]||null;V.useEffect(()=>{const g=new AbortController;let y=null,C=!0;return u(null),p?/^(data:|blob:)/i.test(p)?(u(p),()=>g.abort()):(B2.get(p,{responseType:"blob",signal:g.signal}).then(({data:x})=>{if(C){if(!(x instanceof Blob)||x.size===0||x.type&&!x.type.startsWith("image/"))throw new Error("Architecture image response was not an image");y=URL.createObjectURL(x),u(y)}}).catch(()=>{g.signal.aborted||c(x=>Math.min(x+1,a.length))}),()=>{C=!1,g.abort(),y&&URL.revokeObjectURL(y)}):()=>g.abort()},[p,a.length]);const d=a.length===0||l>=a.length;return V.useEffect(()=>{d&&typeof n=="function"&&n()},[d,n]),p?h?f.jsx("img",{src:h,alt:r,className:i,loading:"eager",decoding:"async",draggable:!1,onError:()=>{c(g=>Math.min(g+1,a.length))}}):null:s||null};fd.propTypes={url:Y.string,dataUri:Y.string,alt:Y.string,className:Y.string,onAllSourcesFailed:Y.func,fallback:Y.node};const Dq={strategy:{label:"Transformation strategy",Icon:Ra,accent:"from-violet-50 to-white text-violet-700",pdfKind:null},architecture:{label:"Reference architecture",Icon:fv,accent:"from-indigo-50 to-white text-indigo-700",pdfKind:null},requirements:{label:"Requirements",Icon:Am,accent:"from-emerald-50 to-white text-emerald-700",pdfKind:null},boq:{label:"Bill of Quantities",Icon:ov,accent:"from-sky-50 to-white text-sky-700",pdfKind:"boq"},compliance:{label:"Compliance check",Icon:Ri,accent:"from-rose-50 to-white text-rose-700",pdfKind:null}};function Pq(e){return String(e||"").replace(/\s+/g," ").trim()}function Oq(e){if(typeof e!="string")return null;const t=e.trim();if(!(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")))return null;try{return JSON.parse(t)}catch{return null}}function Rq(e){if(typeof e!="string")return"";const t=e.replace(/^\s*(?:[-*]\s*)?\d+[.)]\s*/,"").trim().replace(/^[*_`]+|[*_`]+$/g,"").trim(),r=t.match(/^(.+?\?)\s*\[\s*(single|multi|scale|number|text|rank)\b[^\]]*\]/i);if(r)return r[1].replace(/\s+/g," ").trim();if(!t.includes("|"))return"";const i=t.split("|").map(a=>a.trim());if(i.length<2)return"";const n=i[0].replace(/\s+/g," ").trim(),s=i[1].toLowerCase();return!n.endsWith("?")||n.length<10||!/^(single|multi|scale|number|text|rank)\b/.test(s)?"":n}function us(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean"){if(typeof e=="string"){const t=Oq(e);if(t!==null)return us(t);const r=Rq(e);if(r)return r}return Pq(e)}if(Array.isArray(e))return e.map(us).filter(Boolean).join(", ");if(typeof e=="object"){const t=e.question||e.message||e.detail||e.description||e.title||e.name||e.label||e.text||e.code;return t?us(t):Object.entries(e).filter(([r])=>!["choices","required","kind","action","actions","metadata","meta"].includes(r)).map(([,r])=>us(r)).filter(Boolean).join(" · ")}return""}const Fk=({kind:e,data:t,sessionId:r,downloadAvailable:i=!1,defaultOpen:n=!0,pending:s=!1})=>{var x,w,k;const[a,o]=V.useState(!!n),[l,c]=V.useState(!1),[h,u]=V.useState(null),[p,d]=V.useState(null),g=Dq[e],y=V.useCallback(async()=>{var v;if(!(!r||!(g!=null&&g.pdfKind))){c(!0),u(null),d(null);try{const T=await Cm(r,g.pdfKind);if(T!=null&&T.success)d({email:T.deliveryEmail||null,channel:T.deliveryChannel||"email"});else{const L=((v=T==null?void 0:T.error)==null?void 0:v.detail)||(T==null?void 0:T.error)||"Could not queue PDF";u(typeof L=="string"?L:"Could not queue PDF")}}catch(T){u(String((T==null?void 0:T.message)||T))}finally{c(!1)}}},[r,g]);if(!g)return null;if(s&&!t){const{Icon:v}=g;return f.jsxs("div",{className:"my-3 rounded-2xl border border-gray-200 bg-white shadow-sm overflow-hidden",children:[f.jsxs("div",{className:`flex items-center gap-3 px-4 py-2.5 bg-gradient-to-r ${g.accent} border-b border-gray-100`,children:[f.jsx(v,{className:"w-4 h-4 flex-shrink-0"}),f.jsxs("div",{className:"flex-1 text-left",children:[f.jsx("div",{className:"text-[11px] uppercase tracking-wide font-semibold",children:g.label}),f.jsxs("div",{className:"text-xs text-gray-600 mt-0.5 flex items-center gap-1.5",children:[f.jsx(de,{className:"w-3 h-3 animate-spin"}),f.jsx("span",{children:"Generating…"})]})]})]}),f.jsxs("div",{className:"p-3 space-y-2",children:[f.jsx("div",{className:"h-3 bg-gray-100 rounded animate-pulse w-3/4"}),f.jsx("div",{className:"h-3 bg-gray-100 rounded animate-pulse w-1/2"}),f.jsx("div",{className:"h-3 bg-gray-100 rounded animate-pulse w-2/3"})]})]})}if(!t||e==="strategy"&&!Mk(t)||e==="architecture"&&!t.mermaidSrc&&!t.brandedArchDataUri&&
484!((w=(x=t.architectureArtifact)==null?void 0:x.components)!=null&&w.length)||e==="boq"&&!Array.isArray(t.rows)||e==="requirements"&&!Array.isArray(t)&&!Array.isArray(t==null?void 0:t.functional)||e==="compliance"&&!Array.isArray(t)&&!(t!=null&&t.findings))return null;const{Icon:C}=g;return f.jsxs("div",{className:"my-3 rounded-2xl border border-gray-200 bg-white shadow-sm overflow-hidden",children:[f.jsxs("button",{type:"button",onClick:()=>o(v=>!v),className:`w-full flex items-center gap-3 px-4 py-2.5 bg-gradient-to-r ${g.accent} border-b border-gray-100`,children:[f.jsx(C,{className:"w-4 h-4 flex-shrink-0"}),f.jsxs("div",{className:"flex-1 text-left",children:[f.jsx("div",{className:"text-[11px] uppercase tracking-wide font-semibold",children:g.label}),e==="boq"&&((k=t.totals)==null?void 0:k.tco3y)!=null&&f.jsxs("div",{className:"text-xs text-gray-600 mt-0.5",children:["3y TCO ",Intl.NumberFormat(void 0,{style:"currency",currency:t.currency||"USD",maximumFractionDigits:0}).format(t.totals.tco3y)]}),e==="requirements"&&Array.isArray(t==null?void 0:t.functional)&&f.jsxs("div",{className:"text-xs text-gray-600 mt-0.5",children:[t.functional.length," functional · ",(t.nonFunctional||[]).length," non-functional"]}),e==="strategy"&&(t.scenarioType||t.buyVsBuild)&&f.jsx("div",{className:"text-xs text-gray-600 mt-0.5",children:[t.scenarioType,t.buyVsBuild].filter(Boolean).join(" · ")})]}),g.pdfKind&&i&&f.jsxs("span",{role:"button",tabIndex:0,onClick:v=>{v.stopPropagation(),y()},onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.stopPropagation(),v.preventDefault(),y())},title:"Email PDF",className:"inline-flex items-center gap-1 text-[11px] font-medium text-gray-700 hover:text-gray-900 px-2 py-1 rounded-lg hover:bg-white/60",children:[l?f.jsx(de,{className:"w-3.5 h-3.5 animate-spin"}):f.jsx(Sh,{className:"w-3.5 h-3.5"}),"Email PDF"]}),a?f.jsx(Oa,{className:"w-4 h-4 text-gray-500"}):f.jsx(Da,{className:"w-4 h-4 text-gray-500"})]}),a&&f.jsxs("div",{className:"p-3",children:[h&&f.jsxs("div",{className:"mb-2 flex items-center gap-1.5 text-xs text-red-700 bg-red-50 border border-red-200 rounded-lg px-2 py-1.5",children:[f.jsx(Sm,{className:"w-3.5 h-3.5 flex-shrink-0"}),f.jsx("span",{children:h})]}),p&&f.jsxs("div",{className:"mb-2 flex items-start gap-1.5 text-xs text-emerald-800 bg-emerald-50 border border-emerald-200 rounded-lg px-2 py-1.5",children:[f.jsx(je,{className:"w-3.5 h-3.5 flex-shrink-0 mt-0.5 text-emerald-600"}),f.jsxs("span",{children:["PDF queued. We'll email it",p.email?f.jsxs(f.Fragment,{children:[" to ",f.jsx("span",{className:"font-medium",children:p.email})]}):null," ","within a minute."]})]}),e==="architecture"&&f.jsx(Ek,{data:t,sessionId:r}),e==="strategy"&&f.jsx($k,{strategy:t}),e==="boq"&&f.jsx("div",{className:"-m-3",children:f.jsx(Lk,{boq:t})}),e==="requirements"&&f.jsx(Nk,{req:t}),e==="compliance"&&f.jsx(Ik,{comp:t})]})]})},Ek=({data:e,sessionId:t})=>{const r=!!(e.brandedArchUrl||e.brandedArchDataUri),i=!!e.mermaidSrc,[n,s]=V.useState(!1),a=`${e.brandedArchUrl||""}|${e.brandedArchDataUri||""}`;return V.useEffect(()=>{s(!1)},[a]),f.jsxs("div",{className:"space-y-3",children:[r&&!n?f.jsx(Jo,{title:"Architecture canvas",initialZoom:82,minZoom:55,maxZoom:220,step:15,baseWidth:1320,viewportClassName:"h-[360px] max-h-[65vh]",children:f.jsx(fd,{url:e.brandedArchUrl,dataUri:e.brandedArchDataUri,alt:"Architecture",className:"w-full max-w-none h-auto rounded-lg bg-white",onAllSourcesFailed:()=>s(!0)})}):i?f.jsx(Ls,{sessionId:t,format:"mermaid",source:e.mermaidSrc}):null,f.jsx(pd,{architecture:e.architectureArtifact,compact:!0})]})};Ek.propTypes={data:Y.object.isRequired,sessionId:Y.string};const Nk=({req:e})=>{if(Array.isArray(e))return f.jsx("ul",{className:"list-disc pl-5 space-y-1 text-sm text-gray-800",children:e.map((i,n)=>f.jsx("li",{children:i},n))});const t=(e==null?void 0:e.functional)||[],r=(e==null?void 0:e.nonFunctional)||[];return f.jsxs("div",{className:"space-y-3 text-sm",children:[t.length>0&&f.jsxs("section",{children:[f.jsxs("h4",{className:"text-[11px] uppercase tracking-wide text-gray-500 font-semibold mb-1",children:["Functional (",t.length,")"]}),f.jsx("ul",{className:"space-y-1.5",children:t.map((i,n)=>f.jsxs("li",{className:"flex gap-2",children:[f.jsxs("span",{className:"text-gray-400 tabular-nums",children:[n+1,"."]}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"font-medium text-gray-900",children:i.title||"-"}),i.description&&f.jsx("div",{className:"text-gray-600 text-[13px] leading-snug",children:i.description})]})]},n))})]}),r.length>0&&f.jsxs("section",{children:[f.jsxs("h4",{className:"text-[11px] uppercase tracking-wide text-gray-500 font-semibold mb-1",children:["Non-functional (",r.length,")"]}),f.jsx("ul",{className:"space-y-1.5",children:r.map((i,n)=>f.jsxs("li",{className:"flex gap-2",children:[f.jsxs("span",{className:"text-gray-400 tabular-nums",children:[n+1,"."]}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"font-medium text-gray-900",children:i.title||"-"}),i.description&&f.jsx("div",{className:"text-gray-600 text-[13px] leading-snug",children:i.description})]})]},n))})]})]})};Nk.propTypes={req:Y.any};function Mk(e){return!e||typeof e!="object"?!1:!!(e.scenarioType||e.transformationStrategy||e.buyVsBuild||e.operatingModel||e.cloudStrategy||e.integrationStrategy||e.vendorStrategy||Jn(e.modernizationPath)||Jn(e.deliverySequence)||Jn(e.economicGuardrails)||Jn(e.keyTradeOffs)||Jn(e.deliveryRisks))}function Jn(e){return Array.isArray(e)&&e.length>0}const $k=({strategy:e})=>
484{if(!Mk(e))return f.jsx("div",{className:"text-sm text-gray-500",children:"No strategy artifact yet."});const t=[["Scenario",e.scenarioType],["Buy/build",e.buyVsBuild],["Operating model",e.operatingModel]].filter(([,r])=>r);return f.jsxs("div",{className:"space-y-3 text-sm",children:[e.transformationStrategy&&f.jsx("p",{className:"text-gray-800 leading-relaxed",children:e.transformationStrategy}),t.length>0&&f.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:t.map(([r,i])=>f.jsxs("div",{className:"rounded-lg border border-violet-100 bg-violet-50/50 px-3 py-2",children:[f.jsx("div",{className:"text-[11px] uppercase tracking-wide text-violet-700 font-semibold",children:r}),f.jsx("div",{className:"text-gray-900 font-medium mt-0.5",children:i})]},r))}),f.jsx(jk,{strategy:e}),f.jsx(Si,{title:"Modernization Path",items:e.modernizationPath}),f.jsx(Si,{title:"Delivery Sequence",items:e.deliverySequence}),f.jsx(Si,{title:"Economic Guardrails",items:e.economicGuardrails}),f.jsx(Si,{title:"Key Trade-offs",items:e.keyTradeOffs}),f.jsx(Si,{title:"Delivery Risks",items:e.deliveryRisks}),f.jsx(Si,{title:"Open Questions",items:e.openQuestions})]})};$k.propTypes={strategy:Y.any};const jk=({strategy:e})=>{const t=[["Cloud strategy",e.cloudStrategy],["Integration strategy",e.integrationStrategy],["Vendor strategy",e.vendorStrategy]].filter(([,r])=>r);return t.length?f.jsx("div",{className:"space-y-2",children:t.map(([r,i])=>f.jsxs("div",{className:"rounded-lg border border-gray-100 bg-gray-50 px-3 py-2",children:[f.jsx("div",{className:"text-[11px] uppercase tracking-wide text-gray-500 font-semibold",children:r}),f.jsx("div",{className:"text-gray-800 mt-0.5 leading-snug",children:i})]},r))}):null};jk.propTypes={strategy:Y.any};const Si=({title:e,items:t})=>{if(!Array.isArray(t)||t.length===0)return null;const r=t.map(us).filter(Boolean);return r.length===0?null:f.jsxs("section",{children:[f.jsx("h4",{className:"text-[11px] uppercase tracking-wide text-gray-500 font-semibold mb-1",children:e}),f.jsx("ul",{className:"space-y-1.5",children:r.map((i,n)=>f.jsxs("li",{className:"flex gap-2 text-gray-800",children:[f.jsxs("span",{className:"text-gray-400 tabular-nums",children:[n+1,"."]}),f.jsx("span",{className:"min-w-0",children:i})]},`${e}-${n}`))})]})};Si.propTypes={title:Y.string.isRequired,items:Y.array};const Ik=({comp:e})=>{const t=Array.isArray(e)?e:(e==null?void 0:e.findings)||[];return t.length?f.jsx("ul",{className:"space-y-2 text-sm",children:t.map((r,i)=>f.jsxs("li",{className:"rounded-lg border border-gray-100 p-2",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[r.framework&&f.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-rose-700 bg-rose-50 border border-rose-100 px-1.5 py-0.5 rounded",children:r.framework}),f.jsx("span",{className:"font-medium text-gray-900",children:r.title||r.requirement||r.name||"-"})]}),(r.description||r.summary||r.details)&&f.jsx("p",{className:"text-gray-600 text-[13px] leading-snug mt-1",children:r.description||r.summary||r.details})]},i))}):f.jsx("div",{className:"text-sm text-gray-500",children:"No compliance findings."})};Ik.propTypes={comp:Y.any};Fk.propTypes={kind:Y.oneOf(["strategy","architecture","requirements","boq","compliance"]).isRequired,data:Y.any,sessionId:Y.string,downloadAvailable:Y.bool,defaultOpen:Y.bool,pending:Y.bool};function Dk({text:e,streaming:t}){const[r,i]=V.useState(!1);return e?f.jsxs("div",{className:"mt-1.5 mb-1",children:[f.jsxs("button",{type:"button",onClick:()=>i(n=>!n),className:"inline-flex items-center gap-1 text-[11px] font-medium text-gray-500 hover:text-gray-700 transition-colors",children:[f.jsx(Co,{className:`w-3 h-3 transition-transform ${r?"rotate-90":""}`}),f.jsx(wo,{className:"w-3 h-3 text-[var(--color-brand,#00C7FD)]/70"}),f.jsx("span",{children:"Reasoning"}),t&&f.jsx(de,{className:"w-2.5 h-2.5 ml-0.5 animate-spin text-gray-400"})]}),r&&f.jsx("div",{className:"mt-1 px-3 py-2 bg-gray-50 border border-gray-200 rounded-lg text-[12px] leading-relaxed text-gray-600 whitespace-pre-wrap",children:e})]}):null}Dk.propTypes={text:Y.string,streaming:Y.bool};const qq={discovery:"Discovery",strategy:"Strategy",requirements:"Requirements",architect:"Architect",boq:"BOQ & Cost",compliance:"Compliance",reviewer:"Reviewer",supervisor:"Supervisor"},Ug={discovery:{label:"Discovery",icon:Ow,tone:"from-sky-50 to-cyan-50 text-sky-700 border-sky-200"},requirements:{label:"Requirements",icon:Am,tone:"from-indigo-50 to-slate-50 text-indigo-700 border-indigo-200"},strategy:{label:"Strategy",icon:Ra,tone:"from-teal-50 to-cyan-50 text-teal-700 border-teal-200"},architect:{label:"Architect",icon:Fm,tone:"from-cyan-50 to-sky-50 text-cyan-700 border-cyan-200"},boq:{label:"BOQ & Cost",icon:Bw,tone:"from-emerald-50 to-teal-50 text-emerald-700 border-emerald-200"},compliance:{label:"Compliance",icon:Ri,tone:"from-rose-50 to-red-50 text-rose-700 border-rose-200"},reviewer:{label:"Reviewer",icon:qw,tone:"from-violet-50 to-purple-50 text-violet-700 border-violet-200"},supervisor:{label:"Supervisor",icon:Ra,tone:"from-slate-50 to-gray-50 text-slate-700 border-slate-200"}};function Pk({agentName:e,streaming:t}){const r=Ug[e]||Ug.supervisor,i=r.icon;return f.jsxs("div",{className:"relative flex-shrink-0 w-9 h-9",children:[t&&f.jsx("span",{className:"absolute inset-0 rounded-full bg-[var(--color-brand,#00C7FD)]/15 motion-safe:animate-ping"}),f.jsx("div",{className:`relative w-9 h-9 rounded-full border bg-gradient-to-br ${r.tone} shadow-sm flex items-center justify-center transition-transform duration-200 group-hover:scale-[1.03]`,title:`${r.label} consultant`,children:f.jsx(i,{className:"w-[18px] h-[18px]"})})]})}Pk.propTypes={agentName:Y.string,streaming:Y.bool};const zq=/```mermaid[\s\S]*?```/gi,Wq=/```json\s*\{[\s\S]*?"boq"[\s\S]*?\}\s*```/gi,Hq=/```json\s*\{[\s\S]*?"components"[\s\S]*?\}\s*```/gi,Uq=/^\s*(?:#{1,6}\s*)?(?:\*\*)?\s*(?:OPEN QUESTIONS|Open questions|Open for you)\s*(?:\*\*)?:?\s*\n(?:(?:\s*(?:[-*]\s*)?\d+[.)]\s*)?.+\?\s*\|\s*(?:single|multi|scale|number|text|rank)\b[^\n]*\n?)+/gim,Yq=/^\s*(?:#{1,6}\s*)?(?:\*\*)?\s*(?:OPEN QUESTIONS|Open questions|Open for you)\s*(?:\*\*)?:?\s*\n(?:(?:\s*(?:[-*]\s*)?\d+[.)]\s*)?.+\?\s*\[\s*(?:single|multi|scale|number|text|rank)\b[^\]]*\][^\n]*\n?)+/gim,Vq=/^\s*\|\s*\*?\*?\s*(?:Total|Grand\s*total|Sum)\b[^\n]*\n/gim;function Gq(e){return e?e.replace(Wq,"").replace(Hq,"").replace(zq,"").replace(Uq,"").replace(Yq,"").replace(Vq,`> _Authoritative totals shown in the priced BOQ panel →_
485`).trim():""}
485const Xq=/^\s*(Planner|Consultant) answers:\s*$/im,Qq=/^\s*-\s*([^:]+):\s*(.+?)\s*$/gm;function Kq(e){if(!e)return"";const t=e.replace(/\*\*([^*]+)\*\*/g,"$1");if(!Xq.test(t))return t;const r=[];for(const i of t.matchAll(Qq)){const n=String(i[1]||"").trim(),s=String(i[2]||"").trim();n&&s&&!/^planner node$/i.test(n)&&r.push({label:n,value:s})}if(!r.length)return"Answered consultant checkpoint";if(r.length===1){const i=r[0].label.toLowerCase(),n=r[0].value.toUpperCase()==="ALL"?"consider all suitable options":r[0].value;return`Selected ${i}: ${n}`}return["Shared planning details:",...r.map(i=>`- ${i.label}: ${i.value}`)].join(`
486`)}const Ok=({message:e,onCopy:t,onRegenerate:r,onEdit:i,canRegenerate:n,canEdit:s,inlineArtifacts:a,sessionId:o,downloadAvailable:l})=>{const c=e.role==="user",h=e.agentName?qq[e.agentName]||e.agentName:null,[u,p]=V.useState(!1),d=V.useMemo(()=>c?Kq(e.content):Gq(e.content),[c,e.content]),g=async()=>{var k;const w=d;try{if((k=navigator.clipboard)!=null&&k.writeText)await navigator.clipboard.writeText(w);else{const v=document.createElement("textarea");v.value=w,document.body.appendChild(v),v.select(),document.execCommand("copy"),document.body.removeChild(v)}p(!0),setTimeout(()=>p(!1),1400),t==null||t(e)}catch{}},y=!c&&!!d,x=!e.streaming&&(d||c)?f.jsxs("div",{className:`mt-1 flex gap-1 ${c?"justify-end":"justify-start"} opacity-0 group-hover:opacity-100 transition-opacity`,children:[f.jsx("button",{type:"button",onClick:g,title:"Copy",className:"p-1 rounded hover:bg-gray-100 text-gray-400 hover:text-gray-600",children:u?f.jsx(ys,{className:"w-3.5 h-3.5 text-emerald-500"}):f.jsx(fw,{className:"w-3.5 h-3.5"})}),!c&&n&&r&&f.jsx("button",{type:"button",onClick:()=>r(e),title:"Regenerate",className:"p-1 rounded hover:bg-gray-100 text-gray-400 hover:text-gray-600",children:f.jsx(_m,{className:"w-3.5 h-3.5"})}),c&&s&&i&&f.jsx("button",{type:"button",onClick:()=>i(e),title:"Edit",className:"p-1 rounded hover:bg-gray-100 text-gray-400 hover:text-gray-600",children:f.jsx(li,{className:"w-3.5 h-3.5"})})]}):null;return f.jsx("div",{className:`group w-full flex ${c?"justify-end":"justify-start"} mb-4`,children:f.jsxs("div",{className:`flex gap-3 max-w-[88%] ${c?"flex-row-reverse text-right":"flex-row text-left"}`,children:[c?f.jsx("div",{className:"flex-shrink-0 w-9 h-9 rounded-full flex items-center justify-center bg-gray-200 text-gray-700 border border-gray-300 shadow-sm",children:f.jsx(Tm,{className:"w-4 h-4"})}):f.jsx(Pk,{agentName:e.agentName,streaming:e.streaming}),f.jsxs("div",{className:"min-w-0",children:[h&&!c&&f.jsx("div",{className:"text-[11px] font-medium uppercase tracking-wide text-gray-500 mb-1",children:h}),!c&&e.thoughtProcess&&f.jsx(Dk,{text:e.thoughtProcess,streaming:e.streaming}),f.jsx("div",{className:`px-4 py-2.5 rounded-2xl text-[15px] leading-relaxed ${c?"bg-[var(--color-brand,#00C7FD)] text-white rounded-tr-sm":"bg-white border border-gray-200 text-gray-800 rounded-tl-sm shadow-sm"}`,children:c?f.jsx("span",{className:"whitespace-pre-wrap break-words",children:d}):!d&&e.streaming?f.jsxs("div",{className:"flex items-center gap-2 text-gray-500 text-sm",children:[f.jsx(de,{className:"w-3.5 h-3.5 animate-spin text-[var(--color-brand,#006B82)]"}),f.jsx("span",{children:h?`${h} is preparing the next step…`:"Preparing the next step…"}),f.jsxs("span",{className:"flex gap-1 ml-1",children:[f.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-300 animate-pulse",style:{animationDelay:"0ms"}}),f.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-300 animate-pulse",style:{animationDelay:"150ms"}}),f.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-300 animate-pulse",style:{animationDelay:"300ms"}})]})]}):y?f.jsxs("div",{className:"prose prose-sm max-w-none prose-p:my-1 prose-ul:my-1 prose-ol:my-1 prose-table:my-2 prose-table:text-[13px] prose-th:bg-gray-50 prose-th:font-semibold prose-th:text-left prose-td:py-1.5 prose-td:px-2 prose-th:py-1.5 prose-th:px-2 prose-table:border prose-th:border prose-td:border overflow-x-auto",children:[f.jsx($B,{remarkPlugins:[VL],children:d||""}),e.streaming&&f.jsx(de,{className:"inline-block w-3 h-3 ml-1 text-gray-400 animate-spin"})]}):f.jsx("div",{className:"text-sm text-gray-500",children:"Updated the live report."})}),!c&&Array.isArray(a)&&a.length>0&&f.jsx("div",{className:"mt-1",children:a.map(w=>f.jsx(Fk,{kind:w.kind,data:w.data,pending:w.pending,sessionId:o,downloadAvailable:l,defaultOpen:!0},w.kind))}),e.error&&f.jsxs("div",{className:"mt-1 flex items-center gap-3 text-xs text-red-600",children:[f.jsx("span",{children:e.error}),r&&!c&&f.jsx("button",{type:"button",onClick:()=>r(e),className:"rounded border border-red-200 px-2 py-0.5 font-semibold text-red-700 hover:bg-red-50",children:"Retry"})]}),x]})]})})};Ok.propTypes={message:Y.shape({id:Y.string,role:Y.string.isRequired,agentName:Y.string,content:Y.string,rawContent:Y.string,generated:Y.bool,contentType:Y.string,streaming:Y.bool,error:Y.string,thoughtProcess:Y.string}).isRequired,onCopy:Y.func,onRegenerate:Y.func,onEdit:Y.func,canRegenerate:Y.bool,canEdit:Y.bool,inlineArtifacts:Y.arrayOf(Y.shape({kind:Y.string.isRequired,data:Y.any})),sessionId:Y.string,downloadAvailable:Y.bool};function Zq(e,t){if(e.message!==t.message||e.canRegenerate!==t.canRegenerate||e.canEdit!==t.canEdit||e.sessionId!==t.sessionId||e.downloadAvailable!==t.downloadAvailable)return!1;const r=e.inlineArtifacts,i=t.inlineArtifacts;if(r===i||!r&&!i)return!0;
486if(!r||!i||r.length!==i.length)return!1;for(let n=0;n<r.length;n+=1)if(r[n].kind!==i[n].kind||r[n].pending!==i[n].pending||r[n].data!==i[n].data)return!1;return!0}const Jq=V.memo(Ok,Zq),tz={discovery:["Draft transformation strategy","Use industry baseline assumptions","Reduce to a 12-week MVP"],strategy:["Approve strategy and draft scope brief","Compare buy vs build options","Optimize for phased modernization"],requirements:[{text:"Add core functional requirements",prompt:"Draft the requirements from the current strategy. Include user journeys, integrations, acceptance criteria, constraints, assumptions, and success metrics.",kind:"missing_field"},{text:"Add SLA, security, and audit targets",prompt:"Add non-functional requirements for SLA, availability, security, privacy, auditability, data residency, observability, and integration performance.",kind:"missing_field"},{text:"Use baseline consulting scope",prompt:"Use senior Azure transformation baseline assumptions and draft a requirements scope brief for the current scenario. Do not move to architecture until functional and n
486on-functional requirements exist.",kind:"missing_field"}],architecture:["Looks good - generate the BOQ","Switch primary cloud (AWS / Azure / GCP)","Add fraud detection"],boq:[{text:"Confirm pricing and run risk review",kind:"progress",action:"confirm_cost"},"Optimise for cost","Trim to MVP-only line items"],finalise:["Generate the proposal PDF","Email me the proposal","Start a new consultation"]},ez=e=>{const t=(e||"").toLowerCase();return t.includes("discover")?"discovery":t.includes("strategy")?"strategy":t.includes("requirement")?"requirements":t.includes("architect")?"architecture":t.includes("compliance")||t.includes("risk")?"compliance":t.includes("boq")||t.includes("cost")?"boq":t.includes("final")||t.includes("proposal")||t.includes("done")?"finalise":null},Yg={missing_field:{Icon:Em,cls:"border-sky-200 bg-sky-50 hover:border-sky-400 hover:bg-sky-100 text-sky-800"},critique:{Icon:mr,cls:"border-rose-200 bg-rose-50 hover:border-rose-400 hover:bg-rose-100 text-rose-800"},progress:{Icon:Pa,cls:"border-gray-200 bg-white hover:border-indigo-300 hover:bg-indigo-50 text-gray-700 hover:text-indigo-700"}},Rk=({phase:e,onPick:t,disabled:r})=>{const i=ee(s=>{var a,o;return((o=(a=s.consultant)==null?void 0:a.artifacts)==null?void 0:o.suggestionChips)||[]}),n=i.length>0?i:(()=>{const s=ez(e);return((s?tz[s]:null)||[]).map(o=>typeof o=="string"?{text:o,kind:"progress"}:o)})();return n.length?f.jsx("div",{className:"flex flex-wrap gap-1.5 mt-2",children:n.map(({text:s,kind:a,prompt:o,action:l,disabledReason:c})=>{const h=Yg[a]||Yg.progress,u=h.Icon,p=r||!!c;return f.jsxs("button",{type:"button",disabled:p,title:c||s,onClick:()=>t(l?{action:l,text:s}:o||s),className:`group inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full border transition disabled:opacity-50 ${h.cls}`,children:[f.jsx(u,{className:"w-3 h-3 opacity-80"}),f.jsx("span",{children:s}),f.jsx(Co,{className:"w-3 h-3 opacity-0 group-hover:opacity-100 transition"})]},`${a}::${s}`)})}):null};Rk.propTypes={phase:Y.string,onPick:Y.func.isRequired,disabled:Y.bool};const rz={architect:"architecture",strategy:"strategy",requirements:"requirements",boq:"boq",compliance:"compliance"},Vg={discovery:"Discovery",strategy:"Strategy",requirements:"Requirements",architect:"Architecture",boq:"Investment case",compliance:"Risk review",reviewer:"Review"},iz=/^\s*(Planner|Consultant) answers:\s*$/im,nz=e=>(e==null?void 0:e.role)==="user"&&iz.test(String((e==null?void 0:e.content)||(e==null?void 0:e.rawContent)||"")),qk=({messages:e,emptyState:t,suggestionPhase:r,onSuggestion:i,streaming:n,onRegenerate:s,onEditUser:a,showInlineArtifacts:o=!0})=>{var W,E;const l=V.useRef(null),c=ee(N=>{var z;return(z=N.consultant)==null?void 0:z.sessionId}),h=ee(N=>{var z,O;return((O=(z=N.consultant)==null?void 0:z.artifacts)==null?void 0:O.mermaidSrc)||null}),u=ee(N=>{var z,O;return((O=(z=N.consultant)==null?void 0:z.artifacts)==null?void 0:O.d2Src)||null}),p=ee(N=>{var z,O;return((O=(z=N.consultant)==null?void 0:z.artifacts)==null?void 0:O.brandedArchDataUri)||null}),d=ee(N=>{var z,O;return((O=(z=N.consultant)==null?void 0:z.artifacts)==null?void 0:O.architectureData)||null}),g=ee(N=>{var z,O;return((O=(z=N.consultant)==null?void 0:z.artifacts)==null?void 0:O.strategyData)||null}),y=ee(N=>{var z,O;return((O=(z=N.consultant)==null?void 0:z.artifacts)==null?void 0:O.boqData)||null}),C=ee(N=>{var z,O;return((O=(z=N.consultant)==null?void 0:z.artifacts)==null?void 0:O.requirementsData)||null}),x=ee(N=>{var z,O;return((O=(z=N.consultant)==null?void 0:z.artifacts)==null?void 0:O.complianceData)||null}),w=ee(N=>{var z,O;return!!((O=(z=N.consultant)==null?void 0:z.artifacts)!=null&&O.downloadAvailable)}),k=V.useMemo(()=>e.filter(N=>!nz(N)),[e]);V.useEffect(()=>{l.current&&l.current.scrollTo({top:l.current.scrollHeight,behavior:n?"auto":"smooth"})},[k,n]);let v=-1;for(let N=k.length-1;N>=0;N-=1)if(((W=k[N])==null?void 0:W.role)==="assistant"){v=N;break}const T=!n&&i&&r&&v===k.length-1&&k.length>0,L=V.useMemo(()=>{if(!n||!k.length)return null;for(let z=k.length-1;z>=0;z-=1){const O=k[z];if((O==null?void 0:O.role)==="assistant"&&O.streaming)return Vg[O.agentName]||O.agentName||"Consultant"}const N=[...k].reverse().find(z=>(z==null?void 0:z.role)==="assistant");return Vg[N==null?void 0:N.agentName]||(N==null?void 0:N.agentName)||"Consultant"},[n,k]);let D=-1;for(let N=k.length-1;N>=0;N-=1)if(((E=k[N])==null?void 0:E.role)==="user"){D=N;break}const M=V.useMemo(()=>{const N=new Map;if(!k.length)return N;
486const z={mermaidSrc:h,d2Src:u,brandedArchDataUri:p,architectureData:d,strategyData:g,boqData:y,requirementsData:C,complianceData:x},O=new Set;for(let I=k.length-1;I>=0;I-=1){const j=k[I];if((j==null?void 0:j.role)!=="assistant"||!j.agentName)continue;const A=rz[j.agentName];if(!A||O.has(A))continue;const R=sz(A,z);if(!R){if(j.streaming){O.add(A);const q=N.get(j.id)||[];q.push({kind:A,data:null,pending:!0}),N.set(j.id,q)}continue}O.add(A);const H=N.get(j.id)||[];H.push({kind:A,data:R}),N.set(j.id,H)}return N},[k,h,u,p,d,y,g,C,x]);return f.jsx("div",{ref:l,className:"flex-1 overflow-y-auto px-4 sm:px-6 lg:px-8 py-6",children:f.jsx("div",{className:"max-w-3xl mx-auto",children:k.length===0?t||f.jsx(az,{}):f.jsxs(f.Fragment,{children:[k.map((N,z)=>f.jsxs("div",{children:[f.jsx(Jq,{message:N,onRegenerate:s,onEdit:a,canRegenerate:!n&&z===v&&z===k.length-1,canEdit:!n&&z===D,inlineArtifacts:o?M.get(N.id):void 0,sessionId:c,downloadAvailable:w}),T&&z===v&&f.jsx("div",{className:"ml-11 mt-1 mb-3",children:f.jsx(Rk,{phase:r,onPick:i,disabled:n})})]},N.id)),L&&f.jsx("div",{className:"sticky bottom-3 z-20 mt-2 flex justify-center pointer-events-none",children:f.jsxs("div",{className:"pointer-events-auto inline-flex max-w-full items-center gap-2 rounded-full border border-cyan-100 bg-white/95 px-3 py-2 text-xs font-medium text-gray-700 shadow-lg shadow-cyan-100/40 backdrop-blur",children:[f.jsx(de,{className:"h-3.5 w-3.5 shrink-0 animate-spin text-[var(--color-brand,#006B82)]"}),f.jsxs("span",{className:"truncate",children:[L," is preparing the next step..."]})]})})]})})})};qk.propTypes={messages:Y.array.isRequired,emptyState:Y.node,suggestionPhase:Y.string,onSuggestion:Y.func,streaming:Y.bool,onRegenerate:Y.func,onEditUser:Y.func,showInlineArtifacts:Y.bool};function sz(e,t){var r,i,n;if(!t)return null;switch(e){case"architecture":return t.d2Src||t.brandedArchDataUri||t.mermaidSrc?{d2Src:t.d2Src||null,mermaidSrc:t.mermaidSrc||null,brandedArchDataUri:t.brandedArchDataUri||null,architectureArtifact:t.architectureData||null}:t.architectureData&&Array.isArray((r=t.architectureData)==null?void 0:r.components)&&t.architectureData.components.length>0?{d2Src:null,mermaidSrc:null,brandedArchDataUri:null,architectureArtifact:t.architectureData}:null;case"boq":return t.boqData&&Array.isArray(t.boqData.rows)?t.boqData:null;case"strategy":return t.strategyData&&typeof t.strategyData=="object"?t.strategyData:null;case"requirements":return t.requirementsData&&(Array.isArray(t.requirementsData)||Array.isArray((i=t.requirementsData)==null?void 0:i.functional))?t.requirementsData:null;case"compliance":return t.complianceData&&(Array.isArray(t.complianceData)||Array.isArray((n=t.complianceData)==null?void 0:n.findings))?t.complianceData:null;default:return null}}const az=()=>f.jsxs("div",{className:"text-center py-12",children:[f.jsx("h2",{className:"text-2xl font-semibold text-gray-900 mb-2",children:"AI Solutions Consultant"}),f.jsx("p",{className:"text-gray-600 max-w-md mx-auto leading-relaxed",children:"Tell me about your problem or project. I’ll set the strategy, gather requirements, design an architecture, and prepare a priced investment view."})]}),oz=[".pdf",".txt",".md",".docx",".xlsx",".csv",".tsv",".png",".jpg",".jpeg",".tiff",".tif",".webp","application/pdf","text/plain","text/markdown","text/csv","text/tab-separated-values","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","image/png","image/jpeg","image/tiff","image/webp"].join(","),ts=8e3,lz=1200,cz=900,hz=7e3,uz=1300,dz=45e3,pc=.014,pz=()=>typeof window>"u"?null:window.AudioContext||window.webkitAudioContext||null,zk=({onSend:e,onCancel:t,locked:r,streaming:i,onAttach:n,onRemoveAttachment:s,sessionId:a,onEditLast:o,pendingDraft:l,onVoiceTurn:c,voiceActive:h,speaking:u})=>{const[p,d]=V.useState(""),[g,y]=V.useState([]),[C,x]=V.useState(null),[w,k]=V.useState(null),[v,T]=V.useState(!1),[L,D]=V.useState(!1),M=V.useRef(null),W=V.useRef(null),E=V.useRef(0),N=V.useRef(null),z=V.useRef(null),O=V.useRef(null),I=V.useRef([]),j=V.useRef(null),A=V.useRef(null),R=V.useRef(!1),H=V.useRef(0),q=V.useRef(0),_=V.useRef(null),ct=V.useRef(pc),X=V.useCallback(async()=>
486{if(!a)return;const gt=await V2(a);if(!(gt!=null&&gt.success))return;const St=new Map((gt.documents||[]).map(kt=>[String(kt.id||kt._id),kt]));y(kt=>kt.map(At=>{if(!At.documentId)return At;const G=St.get(String(At.documentId));return G?{...At,status:G.status||At.status,parser:G.parser??At.parser,pageCount:G.pageCount??At.pageCount,ocrUsed:G.ocrUsed??At.ocrUsed,chunkCount:G.chunkCount??At.chunkCount,chunksStored:G.chunksStored??At.chunksStored,error:G.error||At.error}:At}))},[a]);V.useEffect(()=>{const gt=g.some(kt=>["uploaded","parsing","ocr","chunking","embedding"].includes(kt.status));gt&&!N.current?(X(),N.current=setInterval(X,1500)):!gt&&N.current&&(clearInterval(N.current),N.current=null);const St=()=>{const kt=g.some(At=>["uploaded","parsing","ocr","chunking","embedding"].includes(At.status));document.hidden?N.current&&(clearInterval(N.current),N.current=null):kt&&!N.current&&(X(),N.current=setInterval(X,1500))};return document.addEventListener("visibilitychange",St),()=>{document.removeEventListener("visibilitychange",St),N.current&&(clearInterval(N.current),N.current=null)}},[g,X]),V.useEffect(()=>{const gt=M.current;gt&&(gt.style.height="auto",gt.style.height=Math.min(gt.scrollHeight,220)+"px")},[p]);const F=V.useCallback(()=>{A.current&&(cancelAnimationFrame(A.current),A.current=null);const gt=j.current;j.current=null,gt&&gt.state!=="closed"&&gt.close().catch(()=>{})},[]),ht=V.useCallback(()=>{O.current&&(O.current.getTracks().forEach(gt=>gt.stop()),O.current=null)},[]),pt=V.useCallback((gt="manual")=>{_.current=gt,F();const St=z.current;if((St==null?void 0:St.state)==="recording"){St.stop();return}ht(),x(null)},[F,ht]);V.useEffect(()=>()=>{var gt;((gt=z.current)==null?void 0:gt.state)==="recording"&&z.current.stop(),F(),ht()},[F,ht]);const wt=V.useCallback(async gt=>{if(!gt||gt.size<lz){x(null),k("I only caught a very short audio clip. Please try again.");return}x("transcribing"),k(null);const St=await G2(gt),kt=String((St==null?void 0:St.text)||"").trim();if(x(null),!(St!=null&&St.success)||!kt){k("I could not hear enough speech. Try again and speak a little closer to the mic.");return}if(r||i){d(At=>At?`${At} ${kt}`:kt);return}c==null||c(),e(kt)},[r,e,c,i]),P=V.useCallback(gt=>{const St=pz();if(St)try{const kt=new St,At=kt.createMediaStreamSource(gt),G=kt.createAnalyser();G.fftSize=2048,G.smoothingTimeConstant=.2,At.connect(G),j.current=kt;const nt=new Uint8Array(G.fftSize);H.current=performance.now(),q.current=H.current,R.current=!1,ct.current=pc;const m=()=>{G.getByteTimeDomainData(nt);let $=0;for(let Z=0;Z<nt.length;Z+=1){const ut=(nt[Z]-128)/128;$+=ut*ut}const U=Math.sqrt($/nt.length),tt=performance.now(),J=tt-H.current;J<700&&(ct.current=ct.current*.85+U*.15);const ft=Math.max(pc,ct.current*2.4);U>ft&&(R.current=!0,q.current=tt);const B=tt-q.current;if(R.current&&J>cz&&B>uz){pt("silence");return}if(!R.current&&J>hz){pt("no-speech");return}if(J>dz){pt("max-duration");return}A.current=requestAnimationFrame(m)};A.current=requestAnimationFrame(m)}catch{}},[pt]),mt=()=>typeof MediaRecorder>"u"?"":["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg;codecs=opus"].find(St=>MediaRecorder.isTypeSupported(St))||"",st=async()=>{var gt;if(!(r||i||v||u)){if(typeof navigator>"u"||!((gt=navigator.mediaDevices)!=null&&gt.getUserMedia)||typeof MediaRecorder>"u"){k("Voice input is not available in this browser.");return}try{k(null);const St=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),kt=mt(),At=kt?new MediaRecorder(St,{mimeType:kt}):new MediaRecorder(St);O.current=St,z.current=At,I.current=[],R.current=!1,_.current=null,At.ondataavailable=G=>{var nt;((nt=G.data)==null?void 0:nt.size)>0&&I.current.push(G.data)},At.onerror=()=>{k("Recording stopped unexpectedly."),x(null),F(),ht()},At.onstop=()=>{const G=new Blob(I.current,{type:At.mimeType||kt||"audio/webm"}),nt=_.current;if(z.current=null,F(),ht(),nt==="no-speech"){x(null),k("I did not catch speech. Start again and speak normally.");return}wt(G)},At.start(250),x("recording"),P(St)}catch(St){x(null),F(),ht(),k((St==null?void 0:St.name)==="NotAllowedError"?"Microphone permission was blocked.":"Could not start the microphone.")}}},at=()=>{if(C==="recording"){pt();return}st()},dt=()=>{const gt=p.trim();!gt||r||(e(gt),d(""))},bt=gt=>{if(gt.key==="Enter"&&!gt.shiftKey){gt.preventDefault(),dt();return}if(gt.key==="ArrowUp"&&!p&&!i&&!r&&o){const St=o();St&&(gt.preventDefault(),d(St),requestAnimationFrame(()=>{const kt=M.current;kt&&(kt.focus(),kt.setSelectionRange(St.length,St.length))}))}};V.useEffect(()=>{l&&l.text!=null&&(d(l.text),requestAnimationFrame(()=>{const gt=M.current;
486gt&&(gt.focus(),gt.setSelectionRange(gt.value.length,gt.value.length))}))},[l==null?void 0:l.token]);const vt=()=>{var gt;!n||r||v||(gt=W.current)==null||gt.click()},Bt=async gt=>{var At;const St=(At=gt.target.files)==null?void 0:At[0];if(gt.target.value="",!St||!n)return;const kt={name:St.name,status:"uploading"};y(G=>[...G,kt]),T(!0);try{const G=await n(St);y(nt=>nt.map(m=>{var $,U,tt,J;return m!==kt?m:G!=null&&G.success?G.duplicate?{...m,status:"duplicate",documentId:((U=G.document)==null?void 0:U.id)||G.documentId}:{...m,status:((tt=G.document)==null?void 0:tt.status)||"uploaded",documentId:((J=G.document)==null?void 0:J.id)||G.documentId}:{...m,status:"error",error:(($=G==null?void 0:G.error)==null?void 0:$.detail)||(G==null?void 0:G.error)||"Upload failed"}}))}catch(G){y(nt=>nt.map(m=>m===kt?{...m,status:"error",error:String((G==null?void 0:G.message)||G)}:m))}finally{T(!1)}},Q=async gt=>{var kt;if(!gt.documentId||!s){y(At=>At.filter(G=>G!==gt));return}const St=String(gt.documentId);y(At=>At.map(G=>String(G.documentId)===St?{...G,status:"deleting",error:null}:G));try{const At=await s(St);if(!(At!=null&&At.success))throw new Error(((kt=At==null?void 0:At.error)==null?void 0:kt.detail)||(At==null?void 0:At.error)||"Delete failed");y(G=>G.filter(nt=>String(nt.documentId)!==St))}catch(At){y(G=>G.map(nt=>String(nt.documentId)===St?{...nt,status:"error",error:String((At==null?void 0:At.message)||At)}:nt))}},$t=gt=>{if(!gt)return!1;const St=(gt.name||"").toLowerCase();if(/\.(pdf|txt|md|docx|xlsx|csv|tsv|png|jpe?g|tiff?|webp)$/.test(St))return!0;if(/\.(doc|xls)$/.test(St))return!1;const kt=(gt.type||"").toLowerCase();return kt==="application/pdf"||kt==="text/plain"||kt==="text/markdown"||kt==="text/csv"||kt==="text/tab-separated-values"||kt==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||kt==="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"||kt.startsWith("image/")},te=async gt=>{if(!gt||!n)return;if(!$t(gt)){y(kt=>[...kt,{name:gt.name||"file",status:"error",error:"Unsupported file type"}]);return}const St={name:gt.name,status:"uploading"};y(kt=>[...kt,St]),T(!0);try{const kt=await n(gt);y(At=>At.map(G=>{var nt,m,$,U;return G!==St?G:kt!=null&&kt.success?kt.duplicate?{...G,status:"duplicate",documentId:((m=kt.document)==null?void 0:m.id)||kt.documentId}:{...G,status:(($=kt.document)==null?void 0:$.status)||"uploaded",documentId:((U=kt.document)==null?void 0:U.id)||kt.documentId}:{...G,status:"error",error:((nt=kt==null?void 0:kt.error)==null?void 0:nt.detail)||(kt==null?void 0:kt.error)||"Upload failed"}}))}catch(kt){y(At=>At.map(G=>G===St?{...G,status:"error",error:String((kt==null?void 0:kt.message)||kt)}:G))}finally{T(!1)}},pe=gt=>{var St,kt;r||!n||(kt=(St=gt.dataTransfer)==null?void 0:St.types)!=null&&kt.includes("Files")&&(E.current+=1,D(!0))},Oe=()=>{E.current=Math.max(0,E.current-1),E.current===0&&D(!1)},Ae=gt=>{var St,kt;r||!n||(kt=(St=gt.dataTransfer)==null?void 0:St.types)!=null&&kt.includes("Files")&&gt.preventDefault()},Re=async gt=>{var kt;if(r||!n)return;gt.preventDefault(),E.current=0,D(!1);const St=Array.from(((kt=gt.dataTransfer)==null?void 0:kt.files)||[]);for(const At of St)await te(At)};return f.jsxs("div",{className:"relative border-t border-gray-200 bg-white/90 backdrop-blur-sm px-4 sm:px-6 py-3",onDragEnter:pe,onDragLeave:Oe,onDragOver:Ae,onDrop:Re,children:[L&&f.jsx("div",{className:"absolute inset-0 z-20 m-2 rounded-2xl border-2 border-dashed border-[var(--color-brand,#00C7FD)] bg-cyan-50/90 flex items-center justify-center pointer-events-none",children:f.jsx("div",{className:"text-sm font-medium text-[var(--color-brand,#00C7FD)]",children:"Drop a PDF, TXT or MD file to attach"})}),f.jsxs("div",{className:"max-w-3xl mx-auto",children:[g.length>0&&f.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2",children:g.map((gt,St)=>{const kt={uploading:"Uploading…",uploaded:"Queued",parsing:"Parsing",ocr:"Running OCR",chunking:"Chunking",embedding:"Indexing",deleting:"Deleting…",indexed:"Ready",parsed:"Ready (no chunks)",duplicate:"Already uploaded",error:"Failed"},At=["uploading","uploaded","parsing","ocr","chunking","embedding","deleting"].includes(gt.status),G=gt.status==="error",nt=gt.status==="indexed"||gt.status==="parsed",m=gt.status==="duplicate",$=G?"border-red-200 bg-red-50 text-red-700":nt?"border-emerald-200 bg-emerald-50 text-emerald-700":m?"border-blue-200 bg-blue-50 text-blue-700":"border-gray-200 bg-gray-50 text-gray-700",U=[gt.name];return G&&gt.error&&U.push(`Error: ${gt.error}`),gt.parser&&U.push(`Parser: ${gt.parser}`),gt.pageCount&&U.push(`${gt.pageCount} pages`),gt.ocrUsed&&U.push("OCR used"),gt.chunksStored&&U.push(`${gt.chunksStored} chunks indexed`),f.jsxs("div",{className:`inline-flex items-center gap-1.5 text-xs px-2 py-1 rounded-lg border ${$}`,title:U.join(" · "),children:[At?f.jsx(de,{className:"w-3 h-3 animate-spin"}):G?f.jsx(mr,{className:"w-3 h-3"}):nt?f.jsx(je,{className:"w-3 h-3"}):f.jsx(mw,{className:"w-3 h-3"}),f.jsx("span",{className:"max-w-[200px] truncate",children:gt.name}),f.jsxs("span",{className:"opacity-70",children:["- ",kt[gt.status]||gt.status]}),f.jsx("button",{type:"button",onClick:()=>Q(gt),disabled:gt.status==="deleting",className:"opacity-60 hover:opacity-100 disabled:cursor-wait",title:"Remove",children:f.jsx(pi,{className:"w-3 h-3"})})]},`${gt.name}-${St}`)})}),f.jsxs("div",{className:`flex items-end gap-2 rounded-2xl border px-3 py-2 transition-colors ${r?"border-gray-200 bg-gray-50":"border-gray-300 bg-white focus-within:border-[var(--color-brand,#00C7FD)]"}`,children:[f.jsx("input",{ref:W,type:"file",accept:oz,onChange:Bt,className:"hidden"}),f.jsx("button",{type:"button",onClick:vt,disabled:r||v||!n,title:n?"Attach a PDF, TXT or MD file (max 25 MB)":"Upload unavailable",className:"p-1.5 text-gray-500 hover:text-gray-800 disabled:opacity-50 disabled:cursor-not-allowed flex-shrink-0",children:v?f.jsx(de,{className:"w-5 h-5 animate-spin"}):f.jsx(rv,{className:"w-5 h-5"})}),f.jsx("button",{type:"button",onClick:at,disabled:r||v||C==="transcribing"||u,title:C==="recording"?"Listening - I will send when you pause. Click to stop now.":"Start voice input - I will send when you pause",className:`p-1.5 rounded-xl flex-shrink-0 transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${C==="recording"?"bg-red-50 text-red-600 ring-2 ring-red-100":h?"bg-emerald-50 text-emerald-700":"text-gray-500 hover:text-gray-800 hover:bg-gray-50"}`,children:C==="transcribing"?f.jsx(de,{className:"w-5 h-5 animate-spin"}):C==="recording"?f.jsx(kw,{className:"w-5 h-5 fill-current"}):f.jsx(Kw,{className:"w-5 h-5"})}),f.jsx("textarea",{ref:M,rows:1,value:p,disabled:r,maxLength:ts,onChange:gt=>d(gt.target.value.slice(0,ts)),onKeyDown:bt,placeholder:"Describe your problem, paste an RFP, or ask a question…",className:"flex-1 resize-none bg-transparent outline-none text-[15px] leading-6 placeholder:text-gray-400 max-h-[220px]"}),i?f.jsx("button",{onClick:t,type:"button",title:"Stop",className:"p-2 rounded-xl bg-gray-900 text-white hover:bg-gray-700 flex-shrink-0",children:f.jsx(Nw,{className:"w-4 h-4"})}):f.jsx("button",{onClick:dt,type:"button",disabled:!p.trim()||r,title:"Send",className:"p-2 rounded-xl bg-[var(--color-brand,#00C7FD)] text-white hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed flex-shrink-0",children:f.jsx(qa,{className:"w-4 h-4"})})]}),(C||u||w||h)&&f.jsxs("div",{className:"mt-2 flex items-center justify-center gap-2 text-[11px] text-gray-500",children:[!w&&f.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${C==="recording"?"bg-red-500 animate-pulse":u?"bg-emerald-500 animate-pulse":"bg-emerald-400"}`}),f.jsx("span",{className:w?"text-red-500":"",children:w||(C==="recording"?"Listening - I will send when you pause":C==="transcribing"?"Transcribing":u?"Speaking":"Voice replies on")})]}),f.jsxs("p",{className:"text-[11px] text-gray-400 mt-1.5 text-center",children:["AI consultant. Verify pricing & compliance details with our team via the “Book Advisor” button.",p.length>=ts-200&&f.jsxs("span",{className:"ml-2 "+(p.length>=ts?"text-red-500":"text-sky-500"),children:[p.length,"/",ts]})]})]})]})};zk.propTypes={onSend:Y.func.isRequired,onCancel:Y.func,onAttach:Y.func,onRemoveAttachment:Y.func,locked:Y.bool,streaming:Y.bool,sessionId:Y.string,onEditLast:Y.func,onVoiceTurn:Y.func,voiceActive:Y.bool,speaking:Y.bool,pendingDraft:Y.shape({text:Y.string,token:Y.number})};const Gg={discover:[{text:"Use baseline assumptions",kind:"progress"},{text:"Ask one clarifying question",kind:"question"},{text:"Draft strategy next",kind:"progress"}],strategy:[{text:"Approve strategy",kind:"progress"},{text:"Compare buy vs build",kind:"question"},{text:"Optimize for phased rollout",kind:"progress"}],requirements:[{text:"Approve scope",kind:"progress"},{text:"Add SLA and audit targets",kind:"question"},{text:"Reduce to MVP scope",kind:"progress"}],architecture:[{text:"Approve blueprint",kind:"progress"},{text:"Switch cloud provider",kind:"question"},{text:"Add AI decisioning controls",kind:"question"}],boq:[{text:"Confirm pricing and run risk review",kind:"progress",action:"confirm_cost"},{text:"Optimize for cost",kind:"question"},{text:"Trim to MVP only",kind:"progress"}],compliance:[{text:"Approve risk posture",kind:"progress"},{text:"Review data residency",kind:"question"},{text:"Add audit controls",kind:"question"}],review:[{text:"Finalize report",kind:"progress"},{text:"Request advisor quote",kind:"progress"},{text:"Revise one decision",kind:"question"}]},fz={question:rl,missing_field:rl,critique:rl,progress:Pa},gz=e=>e==="question"||e==="missing_field"?"border-sky-200 bg-sky-50 text-slate-800 hover:bg-sky-100":e==="critique"?"border-rose-200 bg-rose-50 text-rose-800 hover:bg-rose-100":"border-emerald-200 bg-emerald-50 text-emerald-800 hover:bg-emerald-100",mz=e=>{const t=String(e||"").toLowerCase();return t.includes("complete")?"complete":t.includes("discover")?"discover":t.includes("strategy")?"strategy":t.includes("requirement")?"requirements":t.includes("architect")?"architecture":t.includes("boq")||t.includes("cost")?"boq":t.includes("compliance")||t.includes("risk")?"compliance":t.includes("review")||t.includes("complete")?"review":"discover"},Wk=e=>typeof e=="string"?{text:e,kind:"progress"}:{text:(e==null?void 0:e.text)||(e==null?void 0:e.label)||"",prompt:e==null?void 0:e.prompt,action:e==null?void 0:e.action,kind:(e==null?void 0:e.kind)||"progress",disabledReason:e==null?void 0:e.disabledReason},Hk=new Set(["single","multi","scale","number","text","rank"]),gd=e=>{const t=String(e||"").trim();if(!t)return[];const r=t.includes("|")?"|":t.includes(";")?";":",";return t.split(r).map(i=>i.replace(/\s+/g," ").replace(/[.;:\-\s]+$/g,"").trim()).filter(i=>i.length>0&&i.length<=160)},yz=e=>{if(typeof e!="string")return null;const r=e.replace(/^\s*(?:[-*]\s*)?\d+[.)]\s*/,"").trim().replace(/^[*_`]+|[*_`]+$/g,"").trim().match(/^(.+?\?)\s*(?:options?|choices?)\s*:\s*(.+)$/i);if(!r)return null;const i=gd(r[2]);return i.length?{question:r[1].replace(/\s+/g," ").trim(),kind:"single",required:!0,choices:i}:null},xz=e=>{if(typeof e!="string")return null;const r=e.replace(/^\s*(?:[-*]\s*)?\d+[.)]\s*/,"").trim().replace(/^[*_`]+|[*_`]+$/g,"").trim().match(/^(.+?\?)\s*\[\s*(single|multi|scale|number|text|rank)([^\]]*)\]\s*(.*)$/i);if(!r)return null;const i=r[1].replace(/\s+/g," ").trim(),n=r[2].toLowerCase(),s=`${n}${r[3]||""}`.toLowerCase(),a=(r[4]||"").trim(),o={question:i,kind:n,required:!0};if(["single","multi","rank"].includes(n)){const l=gd(a);l.length&&(o.choices=l)}else if(n==="scale"){const l=s.match(/(-?\d+(?:\.\d+)?)\s*[-–]\s*(-?\d+(?:\.\d+)?)/);o.min=l?Number(l[1]):1,o.max=l?Number(l[2]):5,o.step=1,a&&(o.helpText=a)}else a&&(o.helpText=a);return o},bz=e=>{const t=xz(e);
486if(t)return t;if(typeof e!="string"||!e.includes("|"))return null;const i=e.replace(/^\s*(?:[-*]\s*)?\d+[.)]\s*/,"").trim().replace(/^[*_`]+|[*_`]+$/g,"").trim().split("|").map(c=>c.trim());if(i.length<2)return null;const n=i[0].replace(/\s+/g," ").trim();if(!n.endsWith("?")||n.length<10)return null;const s=i[1].toLowerCase(),a=Array.from(Hk).find(c=>s.startsWith(c));if(!a)return null;const o=i.slice(2).join(" | ").trim(),l={question:n,kind:a,required:!0};if(["single","multi","rank"].includes(a)&&o){const c=gd(o);c.length&&(l.choices=c)}else if(a==="scale"){const c=s.match(/(-?\d+(?:\.\d+)?)\s*[-–]\s*(-?\d+(?:\.\d+)?)/);l.min=c?Number(c[1]):1,l.max=c?Number(c[2]):5,l.step=1,o&&(l.helpText=o)}else o&&(l.helpText=o);return l},Cz=(e,t)=>{const r=typeof e=="string"?e:(e==null?void 0:e.question)||(e==null?void 0:e.message)||(e==null?void 0:e.text)||"",i=bz(r),n=i?null:yz(r),s=i||n,a=s?{...typeof e=="object"&&e!==null?e:{},...s}:e,o=Number.isFinite(a==null?void 0:a.maxChoices)?Math.max(1,Math.min(Number(a.maxChoices),8)):6,l=String((a==null?void 0:a.kind)||(a==null?void 0:a.inputType)||"").toLowerCase();let c=Hk.has(l)?l:"";const h=Array.isArray(a==null?void 0:a.choices)?a.choices.map(Wk).filter(d=>d.text).slice(0,o):[];c||(c=h.length?"single":"text");const u=(a==null?void 0:a.question)||(a==null?void 0:a.message)||(a==null?void 0:a.text)||"Choose an option",p=typeof u=="object"&&u!==null?u.question||u.text||u.title||u.label||"Choose an option":u;return{id:(a==null?void 0:a.id)||`question-${t}`,label:(a==null?void 0:a.label)||`Question ${t+1}`,question:String(p).replace(/\s+/g," ").trim(),helpText:(a==null?void 0:a.helpText)||(a==null?void 0:a.help)||"",required:(a==null?void 0:a.required)!==!1,kind:c,choices:h,manual:(a==null?void 0:a.manual)||{},min:Number.isFinite(a==null?void 0:a.min)?Number(a.min):c==="scale"?1:0,max:Number.isFinite(a==null?void 0:a.max)?Number(a.max):c==="scale"?5:c==="number"?1e6:10,step:Number.isFinite(a==null?void 0:a.step)?Number(a.step):1,unit:(a==null?void 0:a.unit)||""}},ja=(e,t)=>{var r;return t?t.mode==="manual"?(t.text||"").trim():t.mode==="scale"?t.value===void 0||t.value===null?"":e!=null&&e.unit?`${t.value} ${e.unit}`:String(t.value):t.mode==="number"?t.value===""||t.value===void 0||t.value===null?"":e!=null&&e.unit?`${t.value} ${e.unit}`:String(t.value):t.mode==="rank"?(t.order||[]).join(" > "):t.mode==="multi"?(t.selected||[]).join(", "):((r=t.choice)==null?void 0:r.text)||"":""},kz=(e,t,r)=>{const i=(e==null?void 0:e.source)==="planner",n=[i?"Planner answers:":"Consultant answers:"],s=[];t.forEach(o=>{const l=r[o.id],c=ja(o,l).trim();c&&(n.push(`- ${o.label}: ${c}`),s.push({label:o.label,question:o.question,text:c}))}),i&&(e!=null&&e.nodeId)&&n.push(`Planner node: ${e.nodeId}`);const a=s.length===1?[`Selected ${s[0].label.toLowerCase()}: ${s[0].text}`]:[i?"Shared planning details:":"Answered consultant checkpoint:"];return s.length>1&&s.forEach(o=>a.push(`- ${o.label}: ${o.text}`)),{content:n.join(`
487`),displayContent:a.join(`
488`),hideInChat:!0}},Uk=({phase:e,onPick:t,disabled:r})=>{const[i,n]=V.useState({}),[s,a]=V.useState({}),[o,l]=V.useState(0),[c,h]=V.useState(!1),[u,p]=V.useState(!1),d=ee(P=>{var mt,st;return((st=(mt=P.consultant)==null?void 0:mt.artifacts)==null?void 0:st.decisionPrompt)||null}),g=ee(P=>{var mt,st;return((st=(mt=P.consultant)==null?void 0:mt.artifacts)==null?void 0:st.suggestionChips)||[]}),y=(d==null?void 0:d.id)||null;V.useEffect(()=>{n({}),a({}),l(0),h(!1),p(!1)},[y]);const C=V.useMemo(()=>{const P=mz(e);if(P==="complete")return[];const mt=Array.isArray(d==null?void 0:d.choices)?d.choices:[];let st=Gg[P]||Gg.discover;return g.length&&(st=g),mt.length&&(st=mt),st.map(Wk).filter(at=>at.text).slice(0,4)},[e,d,g]),x=V.useMemo(()=>d?(Array.isArray(d.questions)&&d.questions.length?d.questions:[{id:"decision",label:"Decision",question:d.message||"What should we do next?",choices:d.choices||[],manual:d.manual||{}}]).map(Cz).filter(mt=>mt.choices.length||mt.kind!=="single"||mt.manual):[],[d]);if(!d&&!C.length)return null;const w=P=>{a(mt=>{if(!mt[P])return mt;const st={...mt};return delete st[P],st})},k=P=>{const mt=x.findIndex(st=>st.id===P.id);mt<0||mt>=x.length-1||window.setTimeout(()=>{l(st=>st===mt?mt+1:st)},120)},v=(P,mt)=>{r||(n(st=>({...st,[P.id]:{mode:"single",choice:mt}})),w(P.id),k(P))},T=(P,mt)=>{r||(n(st=>{const at=st[P.id],dt=new Set((at==null?void 0:at.mode)==="multi"?at.selected||[]:[]);return dt.has(mt.text)?dt.delete(mt.text):dt.add(mt.text),{...st,[P.id]:{mode:"multi",selected:[...dt]}}}),w(P.id))},L=(P,mt="")=>{r||(n(st=>({...st,[P.id]:{mode:"manual",text:mt}})),w(P.id))},D=(P,mt)=>{r||(n(st=>({...st,[P.id]:{mode:"scale",value:Number(mt)}})),w(P.id),k(P))},M=(P,mt)=>{r||(n(st=>({...st,[P.id]:{mode:"number",value:mt}})),w(P.id))},W=(P,mt)=>{r||(n(st=>({...st,[P.id]:{mode:"rank",order:mt}})),w(P.id))},E=P=>{a(mt=>({...mt,[P.id]:!0})),l(mt=>Math.min(mt+1,x.length-1))},N=P=>s[P.id]?!P.required:!!ja(P,i[P.id]).trim(),z=x.every(N),O=()=>{if(r||!z)return;const P=x.filter(st=>!s[st.id]),mt=kz(d,P,i);n({}),a({}),l(0),t(mt)};if(!d)return f.jsx("div",{className:"border-t border-gray-100 bg-gray-50/70 px-4 sm:px-6 lg:px-8 py-3",children:f.jsxs("div",{className:"max-w-3xl mx-auto 
488space-y-2",children:[f.jsxs("div",{className:"flex items-center gap-2 text-[11px] uppercase tracking-wide text-gray-500 font-semibold",children:[f.jsx(Pa,{className:"w-3.5 h-3.5 text-emerald-600"}),"Suggested next steps"]}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:C.map(P=>{const mt=fz[P.kind]||Pa,st=r||!!P.disabledReason;return f.jsxs("button",{type:"button",disabled:st,title:P.disabledReason||P.text,onClick:()=>t(P.action?{action:P.action,text:P.text}:P.prompt||P.text),className:`inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-xs font-medium transition disabled:opacity-50 ${gz(P.kind)}`,children:[f.jsx(mt,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:P.text})]},`${P.kind}:${P.text}`)})})]})});if(u)return null;const I=x.length,j=Math.min(o,Math.max(I-1,0)),A=x[j],R=A?i[A.id]:null,H=A?!!s[A.id]:!1,q=()=>l(P=>Math.max(P-1,0)),_=()=>l(P=>Math.min(P+1,I-1)),ct=x.filter(P=>!s[P.id]&&!!ja(P,i[P.id]).trim()).length,X=j>=I-1,F=A?ja(A,R).trim():"",ht=()=>{!A||!F||k(A)},pt=P=>{P.key!=="Enter"||P.shiftKey||(P.preventDefault(),ht())},wt=()=>{var mt,st,at,dt;if(!A)return null;const P=(R==null?void 0:R.mode)==="manual";if(A.kind==="multi"){const bt=new Set((R==null?void 0:R.mode)==="multi"?R.selected||[]:[]);return f.jsxs("div",{className:"space-y-1",children:[A.choices.map((vt,Bt)=>{const Q=bt.has(vt.text);return f.jsxs("button",{type:"button",disabled:r||!!vt.disabledReason,onClick:()=>T(A,vt),"aria-pressed":Q,className:`group w-full flex items-center gap-2.5 rounded-lg border px-3 py-2 text-left text-[13px] font-medium transition disabled:opacity-50 ${Q?"border-gray-950 bg-gray-950 text-white":"border-gray-200 bg-white text-gray-800 hover:bg-gray-50"}`,children:[f.jsx("span",{className:`flex h-5 w-5 shrink-0 items-center justify-center rounded-md border ${Q?"border-white bg-white text-gray-950":"border-gray-300 bg-white"}`,children:Q&&f.jsx(je,{className:"w-3.5 h-3.5"})}),f.jsxs("span",{className:`flex-1 ${Q?"":"text-gray-800"}`,children:[f.jsxs("span",{className:"mr-1.5 text-[11px] font-mono opacity-60",children:[Bt+1,"."]}),vt.text]})]},`${A.id}:m:${vt.text}`)}),f.jsxs("button",{type:"button",disabled:r,onClick:()=>L(A,(R==null?void 0:R.text)||""),className:`w-full flex items-center gap-2 rounded-lg border px-3 py-2 text-left text-[13px] font-medium transition ${P?"border-gray-900 bg-gray-50":"border-dashed border-gray-300 bg-white text-gray-600 hover:bg-gray-50"}`,children:[f.jsx(li,{className:"w-4 h-4"}),"Enter custom answer"]}),P&&f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("input",{autoFocus:!0,value:(R==null?void 0:R.text)||"",disabled:r,onChange:vt=>L(A,vt.target.value),onKeyDown:pt,placeholder:((mt=A.manual)==null?void 0:mt.placeholder)||"Type your answer...",className:"min-w-0 flex-1 rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm outline-none focus:border-[var(--color-brand,#00C7FD)]"}),!X&&f.jsx("button",{type:"button",disabled:r||!F,onClick:ht,className:"shrink-0 rounded-lg bg-gray-900 px-3 py-2 text-xs font-semibold text-white hover:bg-gray-700 disabled:opacity-40",children:"Save and next"})]}),!P&&!X&&F&&f.jsx("div",{className:"flex justify-end",children:f.jsx("button",{type:"button",disabled:r,onClick:ht,className:"rounded-lg bg-gray-900 px-3 py-1.5 text-xs font-semibold text-white hover:bg-gray-700 disabled:opacity-40",children:"Save and next"})})]})}if(A.kind==="scale"){const bt=(R==null?void 0:R.mode)==="scale"?R.value:Math.round((A.min+A.max)/2),vt=[];for(let Bt=A.min;Bt<=A.max;Bt+=A.step||1)vt.push(Bt);return f.jsxs("div",{className:"space-y-2",children:[f.jsx("div",{className:"flex items-center justify-between gap-2",children:vt.map(Bt=>{const Q=bt===Bt;return f.jsx("button",{type:"button",disabled:r,onClick:()=>D(A,Bt),className:`flex-1 rounded-lg border px-2 py-2 text-sm font-semibold transition ${Q?"border-gray-950 bg-gray-950 text-white":"border-gray-200 bg-white text-gray-700 hover:bg-gray-50"}`,children:Bt},Bt)})}),A.helpText&&f.jsx("div",{className:"text-xs text-gray-500",children:A.helpText})]})}if(A.kind==="number"){const bt=(R==null?void 0:R.mode)==="number"?R.value:"";return f.jsxs("div",{className:"space-y-2",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("input",{type:"number",value:bt,min:A.min,max:A.max,step:A.step,disabled:r,onChange:vt=>M(A,vt.target.value),placeholder:((st=A.manual)==null?void 0:st.placeholder)||"Enter a number...",className:"w-full rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm outline-none focus:border-[var(--color-brand,#00C7FD)]"}),A.unit&&f.jsx("span",{className:"text-xs font-medium text-gray-500 whitespace-nowrap",children:A.unit})]}),!X&&F&&f.jsx("div",{className:"flex justify-end",children:f.jsx("button",{type:"button",disabled:r,onClick:ht,className:"rounded-lg bg-gray-900 px-3 py-1.5 text-xs font-semibold text-white hover:bg-gray-700 disabled:opacity-40",children:"Save and next"})})]})}if(A.kind==="text"){const bt=(R==null?void 0:R.mode)==="manual"&&R.text||"";return f.jsxs(f.Fragment,{children:[f.jsx("textarea",{rows:2,value:bt,disabled:r,onChange:vt=>L(A,vt.target.value),placeholder:((at=A.manual)==null?void 0:at.placeholder)||"Type your answer...",className:"w-full rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm outline-none focus:border-[var(--color-brand,#00C7FD)] resize-none"}),!X&&F&&f.jsx("div",{className:"mt-2 flex justify-end",children:f.jsx("button",{type:"button",disabled:r,onClick:ht,className:"rounded-lg bg-gray-900 px-3 py-1.5 text-xs font-semibold text-white hover:bg-gray-700 disabled:opacity-40",children:"Save and next"})})]})}if(A.kind==="rank"){const bt=(R==null?void 0:R.mode)==="rank"&&Array.isArray(R.order)?R.order:A.choices.map(Bt=>Bt.text),vt=(Bt,Q)=>{const $t=Bt+Q;if($t<0||$t>=bt.length)return;const te=[...bt];[te[Bt],te[$t]]=[te[$t],te[Bt]],W(A,te)};return f.jsxs("div",{className:"space-y-1.5",children:[bt.map((Bt,Q)=>f.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-3 py-2",children:[f.jsxs("span",{className:"text-xs font-mono text-gray-400 w-5",children:[Q+1,"."]}
488),f.jsx("span",{className:"flex-1 text-sm text-gray-800",children:Bt}),f.jsx("button",{type:"button",disabled:r||Q===0,onClick:()=>vt(Q,-1),className:"p-1 text-gray-500 hover:text-gray-800 disabled:opacity-30",children:f.jsx(Oa,{className:"w-4 h-4"})}),f.jsx("button",{type:"button",disabled:r||Q===bt.length-1,onClick:()=>vt(Q,1),className:"p-1 text-gray-500 hover:text-gray-800 disabled:opacity-30",children:f.jsx(Da,{className:"w-4 h-4"})})]},Bt)),!X&&F&&f.jsx("div",{className:"flex justify-end",children:f.jsx("button",{type:"button",disabled:r,onClick:ht,className:"rounded-lg bg-gray-900 px-3 py-1.5 text-xs font-semibold text-white hover:bg-gray-700 disabled:opacity-40",children:"Save and next"})})]})}return f.jsxs("div",{className:"space-y-1",children:[A.choices.map((bt,vt)=>{var Q;const Bt=(R==null?void 0:R.mode)==="single"&&((Q=R.choice)==null?void 0:Q.text)===bt.text;return f.jsxs("button",{type:"button",disabled:r||!!bt.disabledReason,onClick:()=>v(A,bt),"aria-pressed":Bt,className:`w-full flex items-center gap-2.5 rounded-lg border px-3 py-2 text-left text-[13px] font-medium transition disabled:opacity-50 ${Bt?"border-gray-950 bg-gray-950 text-white":"border-gray-200 bg-white text-gray-800 hover:bg-gray-50"}`,children:[f.jsx("span",{className:`flex h-5 w-5 shrink-0 items-center justify-center rounded-full border ${Bt?"border-white":"border-gray-300"}`,children:Bt&&f.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-white"})}),f.jsxs("span",{className:"flex-1",children:[f.jsxs("span",{className:"mr-1.5 text-[11px] font-mono opacity-60",children:[vt+1,"."]}),bt.text]})]},`${A.id}:s:${bt.text}`)}),f.jsxs("button",{type:"button",disabled:r,onClick:()=>L(A,(R==null?void 0:R.text)||""),className:`w-full flex items-center gap-2 rounded-lg border px-3 py-2 text-left text-[13px] font-medium transition ${P?"border-gray-900 bg-gray-50":"border-dashed border-gray-300 bg-white text-gray-600 hover:bg-gray-50"}`,children:[f.jsx(li,{className:"w-4 h-4"}),"Enter custom answer"]}),P&&f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("input",{autoFocus:!0,value:(R==null?void 0:R.text)||"",disabled:r,onChange:bt=>L(A,bt.target.value),onKeyDown:pt,placeholder:((dt=A.manual)==null?void 0:dt.placeholder)||"Type your answer...",className:"min-w-0 flex-1 rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm outline-none focus:border-[var(--color-brand,#00C7FD)]"}),!X&&f.jsx("button",{type:"button",disabled:r||!F,onClick:ht,className:"shrink-0 rounded-lg bg-gray-900 px-3 py-2 text-xs font-semibold text-white hover:bg-gray-700 disabled:opacity-40",children:"Save and next"})]})]})};return f.jsx("div",{className:"shrink-0 border-t border-gray-100 bg-gray-50/70 px-3 sm:px-5 lg:px-6 py-2",children:f.jsx("div",{className:"max-w-3xl mx-auto",children:f.jsxs("div",{className:"overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-gray-100 px-3 py-2",children:[f.jsxs("div",{className:"flex items-center gap-2 text-[11px] uppercase tracking-wide text-gray-500 font-semibold",children:[f.jsx(je,{className:"w-3.5 h-3.5 text-emerald-600"}),(d==null?void 0:d.title)||"Consultant checkpoint"]}),f.jsxs("div",{className:"flex items-center gap-1 text-xs text-gray-500",children:[I>1&&f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",onClick:q,disabled:j===0,"aria-label":"Previous question",className:"p-1 rounded hover:bg-gray-100 disabled:opacity-30",children:f.jsx(vm,{className:"w-4 h-4"})}),f.jsxs("span",{className:"font-mono tabular-nums select-none",children:[j+1,"/",I]}),f.jsx("button",{type:"button",onClick:_,disabled:j>=I-1,"aria-label":"Next question",className:"p-1 rounded hover:bg-gray-100 disabled:opacity-30",children:f.jsx(Co,{className:"w-4 h-4"})}),f.jsx("span",{className:"mx-1 h-3.5 w-px bg-gray-200"})]}),f.jsx("button",{type:"button",onClick:()=>h(P=>!P),"aria-label":c?"Expand":"Collapse",className:"p-1 rounded hover:bg-gray-100",children:c?f.jsx(Oa,{className:"w-4 h-4"}):f.jsx(Da,{className:"w-4 h-4"})}),f.jsx("button",{type:"button",onClick:()=>p(!0),"aria-label":"Close",className:"p-1 rounded hover:bg-gray-100",children:f.jsx(pi,{className:"w-4 h-4"})})]})]}),!c&&A&&f.jsxs("div",{className:"max-h-[42vh] overflow-y-auto px-3 py-2.5 space-y-2",children:[(d==null?void 0:d.message)&&I>1&&f.jsx("div",{className:"line-clamp-2 text-xs text-gray-500 leading-5",children:d.message}),f.jsxs("div",{className:"flex items-start justify-between gap-2",children:[f.jsxs("div",{className:"space-y-1",children:[f.jsxs("div",{className:"text-[11px] uppercase tracking-wide text-gray-400 font-semibold",children:[A.label,A.required?" • required":" • optional"]}),f.jsx("div",{className:"text-sm font-semibold text-gray-900 leading-5",children:A.question}),A.helpText&&A.kind!=="scale"&&f.jsx("div",{className:"text-xs text-gray-500",children:A.helpText})]}),!A.required&&I>1&&!H&&f.jsx("button",{type:"button",onClick:()=>E(A),className:"shrink-0 text-xs text-gray-500 hover:text-gray-800 underline-offset-2 hover:underline",children:"Skip"}),H&&f.jsx("span",{className:"shrink-0 text-xs text-gray-400 italic",children:"skipped"})]}),!H&&wt()]}),!c&&f.jsxs("div",{className:"flex items-center justify-between gap-2 border-t border-gray-100 px-3 py-2",children:[f.jsxs("div",{className:"text-xs text-gray-500",children:[ct,"/",I," answered",Object.keys(s).length>0&&` • ${Object.keys(s).length} skipped`]}),f.jsx("div",{className:"flex items-center gap-2",children:(X||z)&&f.jsxs("button",{type:"button",onClick:O,disabled:r||!z,className:"inline-flex items-center gap-2 rounded-lg bg-gray-900 px-3 py-1.5 text-xs font-semibold text-white hover:bg-gray-700 disabled:opacity-40",children:[f.jsx(cv,{className:"w-4 h-4"}),I===1?"Send answer":"Send all answers"]})})]})]})})})};Uk.propTypes={phase:Y.string,onPick:Y.func.isRequired,disabled:Y.bool};const Yk=({url:e,minimized:t=!1})=>{const[r,i]=V.useState(!1),n=e||"https://calendly.com/sstiwari/30min?back=1";return f.jsx(S2,{children:f.jsxs(xd.a,{href:n,target:"_blank",rel:"noopener noreferrer",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),initial:!1,animate:t?{position:"fixed",bottom:24,right:24,top:"auto",left:"auto",borderRadius:999}:{position:"absolute",top:72,right:16,bottom:"auto",left:"auto",borderRadius:999},transition:{type:"spring",stiffness:260,damping:28},className:"z-40 inline-flex items-center gap-2 px-4 py-2 bg-[var(--color-brand,#00C7FD)] text-white shadow-lg hover:shadow-xl text-sm font-medium select-none","aria-label":"Book Advisor",children:[f.jsx(Lm,{className:"w-4 h-4"}),f.jsx(xd.span,{initial:!1,animate:{width:t&&!r?0:"auto",opacity:t&&!r?0:1},className:"overflow-hidden whitespace-nowrap",children:"Book Advisor"})]},t?"min":"full")})};Yk.propTypes={url:Y.string,minimized:Y.bool};const wz=(e,t="Could not record request")=>{var i;const r=(e==null?void 0:e.detail)||e;return typeof r=="string"?r:Array.isArray(r==null?void 0:r.blockers)&&r.blockers.length?((i=r.blockers[0])==null?void 0:i.message)||t:typeof(r==null?void 0:r.message)=="str
488ing"?r.message:t},Vk=({sessionId:e,defaultEmail:t,buttonClassName:r})=>{const[i,n]=V.useState(!1),[s,a]=V.useState(!1),[o,l]=V.useState(!1),[c,h]=V.useState(null),[u,p]=V.useState({name:"",email:t||"",phone:"",message:""}),d=async(y,C={})=>await X2(e,{type:y,...C}),g=async y=>{var x;if((x=y==null?void 0:y.preventDefault)==null||x.call(y),!u.email&&!u.phone){h("Please share an email or phone number so we can reach you.");return}a(!0),h(null);const C=await d("advisor",{contact:u});if(a(!1),!(C!=null&&C.success)){h(wz(C==null?void 0:C.error,"Could not record request"));return}l(!0),n(!1)};return f.jsxs("div",{className:"space-y-2",children:[f.jsxs("button",{type:"button",onClick:()=>n(!0),disabled:s,className:r||"inline-flex w-full items-center justify-center gap-2 px-3 py-2 rounded-xl border border-gray-300 bg-white text-gray-800 text-sm font-medium hover:bg-gray-50 disabled:opacity-50",children:[s?f.jsx(de,{className:"w-4 h-4 animate-spin"}):f.jsx(Lm,{className:"w-4 h-4"}),"Book advisor"]}),o&&f.jsxs("div",{className:"px-3 py-2 rounded-lg bg-emerald-50 border border-emerald-200 text-[12px] text-emerald-800 inline-flex items-center gap-1.5",children:[f.jsx(je,{className:"w-3.5 h-3.5"}),"Advisor request received"]}),c&&f.jsx("div",{className:"px-3 py-2 rounded-lg bg-red-50 border border-red-200 text-[12px] text-red-700",children:c}),i&&f.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 flex items-end sm:items-center justify-center p-0 sm:p-4",onClick:()=>!s&&n(!1),children:f.jsxs("form",{onSubmit:g,onClick:y=>y.stopPropagation(),className:"w-full sm:max-w-md bg-white rounded-t-2xl sm:rounded-2xl shadow-2xl p-5 space-y-3",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h3",{className:"text-base font-semibold text-gray-900",children:"Book an advisor session"}),f.jsx("button",{type:"button",onClick:()=>!s&&n(!1),className:"p-1 text-gray-400 hover:text-gray-700",children:f.jsx(pi,{className:"w-4 h-4"})})]}),f.jsx("p",{className:"text-[12px] text-gray-600",children:"We’ll review your deliverables and reach out within one business day to schedule a 30-minute walkthrough."}),f.jsxs("label",{className:"block",children:[f.jsx("span",{className:"sr-only",children:"Name"}),f.jsxs("div",{className:"flex items-center gap-2 border border-gray-200 rounded-lg px-2.5 py-1.5",children:[f.jsx(Tm,{className:"w-3.5 h-3.5 text-gray-400"}),f.jsx("input",{value:u.name,onChange:y=>p(C=>({...C,name:y.target.value})),placeholder:"Your name",className:"flex-1 text-sm bg-transparent outline-none"})]})]}),f.jsxs("label",{className:"block",children:[f.jsx("span",{className:"sr-only",children:"Email"}),f.jsxs("div",{className:"flex items-center gap-2 border border-gray-200 rounded-lg px-2.5 py-1.5",children:[f.jsx(Sh,{className:"w-3.5 h-3.5 text-gray-400"}),f.jsx("input",{type:"email",value:u.email,onChange:y=>p(C=>({...C,email:y.target.value})),placeholder:"Work email",className:"flex-1 text-sm bg-transparent outline-none"})]})]}),f.jsxs("label",{className:"block",children:[f.jsx("span",{className:"sr-only",children:"Phone"}),f.jsxs("div",{className:"flex items-center gap-2 border border-gray-200 rounded-lg px-2.5 py-1.5",children:[f.jsx(sv,{className:"w-3.5 h-3.5 text-gray-400"}),f.jsx("input",{value:u.phone,onChange:y=>p(C=>({...C,phone:y.target.value})),placeholder:"Phone (optional)",className:"flex-1 text-sm bg-transparent outline-none"})]})]}),f.jsx("textarea",{value:u.message,onChange:y=>p(C=>({...C,message:y.target.value})),placeholder:"What would you like to discuss?",rows:3,className:"w-full text-sm border border-gray-200 rounded-lg px-2.5 py-1.5 outline-none focus:ring-1 focus:ring-[var(--color-brand,#00C7FD)]/40"}),f.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[f.jsx("button",{type:"button",onClick:()=>!s&&n(!1),className:"px-3 py-1.5 text-sm text-gray-600 hover:text-gray-900",children:"Cancel"}),f.jsxs("button",{type:"submit",disabled:s,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-lg bg-[var(--color-brand,#00C7FD)] text-white hover:opacity-90 disabled:opacity-50",children:[s&&f.jsx(de,{className:"w-3.5 h-3.5 animate-spin"}),"Request session"]})]})]})})]})};Vk.propTypes={sessionId:Y.string,defaultEmail:Y.string,buttonClassName:Y.string};const Xg=4200,vz={discovery:"Discovery consultant",strategy:"Strategy principal",requirements:"Requirements analyst",architect:"Solution architect",boq:"Cost consultant",compliance:"Risk reviewer",reviewer:"Executive reviewer",supervisor:"Consulting lead"},Sz={discover:"the engagement brief",strategy:"the transformation strategy",requirements:"the requirement set",architecture:"the solution blueprint",boq:"the investment case",compliance:"the risk view",review:"the executive pack",complete:"the final pack"};function Ia(e){return String(e||"").replace(/\s+/g," ").trim()}function Tz(e){if(typeof e!="string")return null;const t=e.trim();if(!(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")))return null;try{return JSON.parse(t)}catch{return null}}function _z(e){if(typeof e!="string")return"";const t=e.replace(/^\s*(?:[-*]\s*)?\d+[.)]\s*/,"").trim().replace(/^[*_`]+|[*_`]+$/g,"").trim(),r
488=t.match(/^(.+?\?)\s*\[\s*(single|multi|scale|number|text|rank)\b[^\]]*\]/i);if(r)return r[1].replace(/\s+/g," ").trim();if(!t.includes("|"))return"";const i=t.split("|").map(a=>a.trim());if(i.length<2)return"";const n=i[0].replace(/\s+/g," ").trim(),s=i[1].toLowerCase();return!n.endsWith("?")||n.length<10||!/^(single|multi|scale|number|text|rank)\b/.test(s)?"":n}function Qg(e){return Ia(e).replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").toLowerCase()}function re(e){return Array.isArray(e)?e:[]}function xe(e,t,r,i){return!e||typeof e!="object"?i:e[t]!==void 0?e[t]:e[r]!==void 0?e[r]:i}function ai(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean"){if(typeof e=="string"){const t=Tz(e);if(t!==null)return ai(t);const r=_z(e);if(r)return r}return Ia(e)}if(Array.isArray(e))return e.map(ai).filter(Boolean).join(", ");if(typeof e=="object"){const t=e.question||e.message||e.detail||e.description||e.title||e.name||e.label||e.text||e.code;if(t){const r=e.phase?`${Qg(e.phase)}: `:"";return Ia(`${r}${ai(t)}`)}return Ia(Object.entries(e).filter(([r])=>!["action","actions","metadata","meta"].includes(r)).map(([r,i])=>{const n=ai(i);return n?`${Qg(r)}: ${n}`:""}).filter(Boolean).join("; "))}return""}function fc(...e){return e.map(ai).find(Boolean)}function Bz(e){return String(e||"").split(`
489`).map(t=>t.replace(/^#+\s*/,"").trim()).find(t=>t&&!t.startsWith("|")&&!t.startsWith("```"))||""}function ba(e,t){if(e==null||Number.isNaN(Number(e)))return"";try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t||"USD",maximumFractionDigits:0}).format(Number(e))}catch{return`${Number(e).toLocaleString()} ${t}`.trim()}}function Qt(e,t,r={}){const i=ai(t);if(!i)return null;const n=ai(r.label);return{key:`${e}:${n.toLowerCase()}:${i.toLowerCase().slice(0,180)}`,sectionId:e,label:n||null,text:i,mode:r.mode||"bullet",tone:r.tone||"default"}}function bi(e){const t=new Map;return e.filter(Boolean).map(r=>{const i=t.get(r.key)||0;return t.set(r.key,i+1),i===0?r:{...r,key:`${r.key}:${i}`}})}function Kg(e,t){if(typeof e=="string")return e;if(!e||typeof e!="object")return"";const r=e.title||e.name||t,i=e.description||e.target,n=e.priority?`${e.priority}: `:"",s=e.target&&e.description?` Target: ${e.target}.`:"";return`${n}${r}${i?` - ${i}`:""}${s}`}function Zg(e){const t=e.map(ai).filter(Boolean);return t.length?t.join(" · "):""}function Lz({artifacts:e,sessionMeta:t,plan:r}){const i=e||{},n=i.discovery||{},s=i.strategy||i.strategyArtifact||{},a=i.requirementsArtifact||{},o=i.architecture||{},l=i.complianceArtifact||{},c=i.readiness||{},h=i.prd||{},u=i.boq||null,p=t||{},d=re(xe(n,"primaryGoals","primary_goals",[])),g=re(xe(n,"openQuestions","open_questions",[])),y=xe(n,"budgetBand","budget_band",null),C=xe(n,"timelineBand","timeline_band",null),x=re(n.stakeholders),w=re(n.assumptions),k=xe(s,"scenarioType","scenario_type",null),v=xe(s,"transformationStrategy","transformation_strategy",null),T=[["Modernization path",re(xe(s,"modernizationPath","modernization_path",[]))],["Delivery sequence",re(xe(s,"deliverySequence","delivery_sequence",[]))],["Economic guardrail",re(xe(s,"economicGuardrails","economic_guardrails",[]))],["Trade-off",re(xe(s,"keyTradeOffs","key_trade_offs",[]))],["Delivery risk",re(xe(s,"deliveryRisks","delivery_risks",[]))]],L=re(a.functional),D=re(xe(a,"nonFunctional","non_functional",[])),M=re(a.constraints),W=re(xe(a,"successMetrics","success_metrics",[])),E=re(xe(a,"outOfScope","out_of_scope",[])),N=re(i.requirements),z=(u==null?void 0:u.currency)||p.currency||"USD",O=(u==null?void 0:u.totals)||{},I=re(u==null?void 0:u.rows),j=re(l.frameworks),A=re(l.findings||i.compliance),R=[...re(xe(o,"integrationFlows","integration_flows",[])),...re(xe(o,"dataFlows","data_flows",[]))],H=[...re(xe(o,"securityControls","security_controls",[])),...re(xe(o,"resilienceControls","resilience_controls",[])),...re(xe(o,"observabilityControls","observability_controls",[]))],q=re(xe(o,"requirementTraceability","requirement_traceability",[])),_=re(xe(o,"openDecisions","open_decisions",[])),ct=re(r).find(P=>
489!P.done),X=Object.values(i.quality||{}).flatMap(P=>re((P==null?void 0:P.missingFields)||(P==null?void 0:P.missing_fields))),F=re(c.blockers),ht=re(c.warnings),pt=Zg([n.industry||p.industry?`Industry: ${n.industry||p.industry}`:"",k||n.scenario||p.scenario?`Scenario: ${k||n.scenario||p.scenario}`:"",n.region||p.region?`Region: ${n.region||p.region}`:"",y?`Budget: ${y}`:"",C?`Timeline: ${C}`:""]),wt=Zg([O.tco3y!==void 0?`Estimated 3-year TCO: ${ba(O.tco3y,z)}`:"",O.annual!==void 0?`Annual recurring: ${ba(O.annual,z)}`:"",O.oneOff!==void 0?`One-off: ${ba(O.oneOff,z)}`:""]);return[{id:"intent",title:"Business intent",blocks:bi([Qt("intent",fc(i.executiveSummary,n.intent,Bz(h.markdown)),{mode:"paragraph",tone:"lead"}),Qt("intent",pt,{mode:"paragraph"}),...d.slice(0,5).map(P=>Qt("intent",P,{label:"Goal"})),...x.slice(0,4).map(P=>Qt("intent",P,{label:"Stakeholder"})),...w.slice(0,3).map(P=>Qt("intent",P,{label:"Assumption"}))])},{id:"strategy",title:"Transformation strategy",blocks:bi([Qt("strategy",v,{mode:"paragraph",tone:"lead"}),Qt("strategy",k?`Scenario classification: ${k}`:"",{mode:"paragraph"}),Qt("strategy",s.buyVsBuild?`Buy vs build: ${s.buyVsBuild}`:"",{mode:"paragraph"}),Qt("strategy",s.operatingModel?`Operating model: ${s.operatingModel}`:"",{mode:"paragraph"}),Qt("strategy",s.cloudStrategy?`Cloud strategy: ${s.cloudStrategy}`:"",{mode:"paragraph"}),Qt("strategy",s.integrationStrategy?`Integration strategy: ${s.integrationStrategy}`:"",{mode:"paragraph"}),Qt("strategy",s.vendorStrategy?`Vendor strategy: ${s.vendorStrategy}`:"",{mode:"paragraph"}),...T.flatMap(([P,mt])=>mt.slice(0,5).map(st=>Qt("strategy",st,{label:P})))])},{id:"requirements",title:"Requirements gathered",blocks:bi([...L.map((P,mt)=>Qt("requirements",Kg(P,`Functional requirement ${mt+1}`),{label:(P==null?void 0:P.id)||"Functional"})),...D.map((P,mt)=>Qt("requirements",Kg(P,`Non-functional requirement ${mt+1}`),{label:(P==null?void 0:P.id)||"Non-functional"})),...N.map(P=>Qt("requirements",P,{label:"Requirement"})),...M.map(P=>Qt("requirements",P,{label:"Constraint"})),...W.map(P=>Qt("requirements",P,{label:"Success metric"})),...E.map(P=>Qt("requirements",P,{label:"Out of scope"}))])},{id:"solution",title:"Solution direction",blocks:bi([Qt("solution",o.summary,{mode:"paragraph",tone:"lead"}),Qt("solution",o.cloud?`Primary cloud: ${o.cloud}`:"",{mode:"paragraph"}),...re(o.decisions).map(P=>Qt("solution",`${P.title||P.name||P.choice||"Decision"}${fc(P.choice,P.rationale,P.tradeOffs)?` - ${fc(P.choice,P.rationale,P.tradeOffs)}`:""}`,{label:"Decision"})),...re(o.components).slice(0,10).map(P=>Qt("solution",`${P.name||P.id}${P.service||P.category?` - ${P.service||P.category}`:""}`,{label:P.provider||"Component"})),...R.slice(0,6).map(P=>Qt("solution",`${P.name||P.purpose||"Flow"}: ${P.source||"source"} -> ${P.target||"target"}${P.protocol||P.mode?` (${[P.protocol,P.mode].filter(Boolean).join(" / ")})`:""}`,{label:P.data?"Data flow":"Flow"})),...H.slice(0,6).map(P=>Qt("solution",`${P.name||"Control"}${P.implementation?` - ${P.implementation}`:""}${P.purpose?` - ${P.purpose}`:""}`,{label:P.layer||"Control"})),...q.slice(0,4).map(P=>Qt("solution",`${P.requirementId||P.requirement||"Requirement"} -> ${re(P.componentIds).join(", ")||"architecture components"}${P.note?` - ${P.note}`:""}`,{label:"Traceability"})),..._.slice(0,3).map(P=>Qt("solution",P,{label:"Open decision"}))])},{id:"commercials",title:"Commercial estimate",blocks:bi([Qt("commercials",wt,{mode:"paragraph",tone:"lead"}),...I.slice(0,8).map(P=>Qt("commercials",`${P.name||"Line item"}${P.quantity?` x ${P.quantity}`:""}${P.unit?` ${P.unit}`:""}${P.subtotal!==void 0?` - ${ba(P.subtotal,z)}`:""}`,{label:P.category||"Item"}))])},{id:"risk",title:"Compliance and risk",blocks:bi([...j.map(P=>Qt("risk",P,{label:"Framework"})),...A.map(P=>Qt("risk",P,{label:"Finding"}))])},{id:"open",title:"Open items",blocks:bi([Qt("open",ct==null?void 0:ct.label,{label:"Current focus"}),...g.map(P=>Qt("open",P,{label:"Question"})),...X.map(P=>Qt("open",P,{label:"Missing"})),...F.map(P=>Qt("open",P,{label:"Blocker"})),...ht.map(P=>Qt("open",P,{label:"Warning"}))])}].filter(P=>P.blocks.length>0)}function Az(e){const t=new Map;return e.forEach(r=>{r.blocks.forEach(i=>
489t.set(i.key,i))}),t}function Fz(e,t){const[r,i]=V.useState({}),n=V.useRef(null),s=V.useMemo(()=>Az(e),[e]),a=V.useMemo(()=>Array.from(s.keys()).sort().join("|"),[s]);return V.useEffect(()=>{n.current=null,i({})},[t]),V.useEffect(()=>{const o=n.current;if(!o||o.size<=1){n.current=s;return}const l=Date.now()+Xg,c={};if(s.forEach((u,p)=>{o.has(p)||(c[p]={status:"added",expiresAt:l,block:u})}),n.current=s,Object.keys(c).length===0)return;i(u=>({...u,...c}));const h=setTimeout(()=>{const u=Date.now();i(p=>Object.fromEntries(Object.entries(p).filter(([,d])=>d.expiresAt>u)))},Xg+120);return()=>clearTimeout(h)},[a,s]),r}function yh({block:e,status:t}){const r=t==="added"?"consultant-diff-text-added text-emerald-700":t==="removed"?"consultant-diff-text-removed text-red-600 line-through decoration-red-500 decoration-2":e.tone==="lead"?"text-gray-950":"text-gray-800";return f.jsxs(f.Fragment,{children:[e.label&&f.jsxs("span",{className:"font-semibold text-gray-900",children:[e.label,": "]}),f.jsx("span",{className:r,children:e.text})]})}yh.propTypes={block:Y.shape({label:Y.string,text:Y.string.isRequired,tone:Y.string}).isRequired,status:Y.string};const Gk=({artifacts:e,sessionMeta:t,plan:r,currentRoute:i,streaming:n,sessionId:s})=>{const a=V.useMemo(()=>Lz({artifacts:e,sessionMeta:t,plan:r}),[e,t,r]),o=Fz(a,s),l=i!=null&&i.agent?vz[i.agent]||i.agent:null,c=i!=null&&i.phase?Sz[i.phase]||i.phase:"the report";return f.jsxs("section",{className:"space-y-3","aria-live":"polite",children:[f.jsxs("div",{className:"flex items-center justify-between gap-3",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Generated Report"}),f.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:l?`${l} is updating ${c}`:"Live consultation brief"})]}),n&&f.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-gray-200 bg-white px-2.5 py-1 text-[11px] text-gray-600 shadow-sm",children:[f.jsx(de,{className:"w-3 h-3 animate-spin text-[var(--color-brand,#006B82)]"}),"Updating"]})]}),f.jsx("div",{className:"rounded-[26px] border border-gray-200 bg-white shadow-sm overflow-hidden",children:f.jsx("div",{className:"max-h-[calc(100vh-14rem)] overflow-y-auto px-5 sm:px-6 py-5 sm:py-6",children:a.length===0?f.jsx("div",{className:"min-h-64 flex items-center justify-center text-center text-sm text-gray-500 px-8",children:"The report will populate as the interview captures goals, requirements, solution direction, estimate, and risk notes."}):f.jsx("div",{className:"space-y-5",children:a.map(h=>{const u=h.blocks.map(g=>{var y,C;return{block:g,status:((y=o[g.key])==null?void 0:y.status)==="removed"||(C=o[g.key])==null?void 0:C.status}}),p=u.filter(({block:g})=>g.mode==="paragraph"),d=u.filter(({block:g})=>g.mode!=="paragraph");return f.jsxs("section",{children:[f.jsxs("h3",{className:"text-[15px] font-bold text-gray-900 mb-2",children:[h.title,":"]}),f.jsxs("div",{className:"space-y-2 text-[14px] leading-7",children:[p.map(({block:g,status:y})=>f.jsx("p",{className:y?`consultant-diff-row-${y}`:void 0,children:f.jsx(yh,{block:g,status:y})},`${g.key}-${y||"normal"}`)),d.length>0&&f.jsx("ul",{className:"list-disc pl-5 space-y-1.5 marker:text-gray-400",children:d.map(({block:g,status:y})=>f.jsx("li",{className:y?`consultant-diff-row-${y}`:void 0,children:f.jsx(yh,{block:g,status:y})},`${g.key}-${y||"normal"}`))})]})]},h.id)})})})}),f.jsxs("div",{className:"rounded-lg border border-sky-100 bg-sky-50 px-3 py-2 text-[11px] leading-relaxed text-slate-800 flex gap-2",children:[f.jsx(mr,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),f.jsx("span",{children:"Draft consulting output. Final scope, pricing, and delivery commitments should be reviewed before booking or signing."})]})]})};Gk.propTypes={artifacts:Y.object,sessionMeta:Y.object,plan:Y.array,currentRoute:Y.shape({agent:Y.string,phase:Y.string}),streaming:Y.bool,sessionId:Y.string};const Jg={done:"border-emerald-200 bg-emerald-50 text-emerald-800",skipped:"border-slate-200 bg-slate-50 text-slate-500",running:"border-cyan-200 bg-cyan-50 text-cyan-800",needs_input:"border-sky-200 bg-sky-50 text-sky-800",blocked:"border-red-200 bg-red-50 text-red-800",invali
489dated:"border-violet-200 bg-violet-50 text-violet-800",not_started:"border-gray-200 bg-white text-gray-600"},tm={discovery:"Discovery",strategy:"Strategy",org:"Org readiness",research:"Research",domain:"Business model",architecture:"Architecture",finops:"Costs",compliance:"Compliance",reviewer:"Review",synth:"Final pack"},Ez=[{status:"approved",label:"Approve",Icon:je},{status:"flagged",label:"Flag",Icon:Uw}],Nz=new Set(["strategy","org","research","domain","architecture","finops","compliance","reviewer","synth"]),Mz=new Set(["discovery"]);function ii(e){return String(e||"").replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function $z(e){return e==="done"?je:e==="blocked"||e==="needs_input"?mr:ww}function jz(e,t){return(e==null?void 0:e.status)==="blocked"?"Needs fixes":(e==null?void 0:e.status)==="warn"?"Needs review":t.total&&t.complete>=t.total?"Ready":"In progress"}const Xk=({sessionId:e,isAuthenticated:t,refreshKey:r})=>{const i=Ch(),[n,s]=V.useState(null),[a,o]=V.useState(null),[l,c]=V.useState(null),[h,u]=V.useState(!1),[p,d]=V.useState(!1),[g,y]=V.useState(null),[C,x]=V.useState(null),[w,k]=V.useState(null),[v,T]=V.useState(null),[L,D]=V.useState(null),M=V.useCallback(async()=>{var q;if(!(!e||!t)){u(!0),D(null);try{const _=await Q2(e);if(_!=null&&_.success){s(_.state||null),o(_.summary||null);const ct=await K2(e);ct!=null&&ct.success?c(ct):c(null)}else(_==null?void 0:_.status)!==404&&D(((q=_==null?void 0:_.error)==null?void 0:q.detail)||"Planner unavailable")}finally{u(!1)}}},[t,e]);V.useEffect(()=>{M()},[M,r]);const W=V.useCallback(async()=>{var q;if(!(!e||!t)){d(!0),D(null);try{const _=await Z2(e,{overwrite:!1});_!=null&&_.success?(s(_.state||null),await M()):D(((q=_==null?void 0:_.error)==null?void 0:q.detail)||"Planner draft failed")}finally{d(!1)}}},[t,M,e]),E=V.useCallback(async(q,_)=>{var ct;if(!(!e||!q)){y(q),D(null);try{const X=await J2(e,q,_);X!=null&&X.success?await M():D(((ct=X==null?void 0:X.error)==null?void 0:ct.detail)||"Decision update failed")}finally{y(null)}}},[M,e]),N=V.useCallback(async q=>{var _,ct,X;if(!(!e||!q)){x(q),D(null);try{const F=await tw(e,q,{});if(F!=null&&F.success)await M();else if((F==null?void 0:F.status)===409){const ht=(_=F==null?void 0:F.error)==null?void 0:_.detail,pt=(ct=ht==null?void 0:ht.missing)==null?void 0:ct.join(", ");D(pt?`Node refused: missing ${pt}`:(ht==null?void 0:ht.msg)||"Specialist refused")}else D(((X=F==null?void 0:F.error)==null?void 0:X.detail)||"Node run failed")}finally{x(null)}}},[M,e]),z=V.useCallback(async(q,_)=>{var ct;if(!(!e||!q)){k(q),D(null);try{const X=await ew(e,q,{rationale:_,reset_status:!0});X!=null&&X.success?(T(null),await M()):D(((ct=X==null?void 0:X.error)==null?void 0:ct.detail)||"Edit failed")}finally{k(null)}}},[M,e]),O=V.useMemo(()=>(n==null?void 0:n.plan)||[],[n==null?void 0:n.plan]),I=(n==null?void 0:n.decisions)||[],j=(n==null?void 0:n.findings)||[],A=(a==null?void 0:a.nextRunnableId)||null,R=V.useMemo(()=>O.length?{complete:O.filter(_=>["done","skipped"].includes(_.status)).length,total:O.length}:{complete:0,total:0},[O]),H=jz(l,R);return e?t?f.jsxs("section",{className:"rounded-xl border border-gray-200 bg-white shadow-sm overflow-hidden",children:[f.jsxs("div",{className:"px-4 py-3 border-b border-gray-100 flex items-center justify-between gap-3",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs uppercase tracking-wide text-violet-700 font-semibold",children:[f.jsx(vh,{className:"w-3.5 h-3.5"}),"Engagement plan"]}),f.jsx("div",{className:"text-sm text-gray-700 truncate",children:n!=null&&n.archetype?ii(n.archetype):"Plan workspace"})]}),f.jsxs("button",{type:"button",onClick:O.length?M:W,disabled:h||p,className:"inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border border-gray-200 text-xs font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:[h||p?f.jsx(de,{className:"w-3.5 h-3.5 animate-spin"}):O.length?f.jsx(_m,{className:"w-3.5 h-3.5"}):f.jsx(wo,{className:"w-3.5 h-3.5"}),O.length?"Refresh":"Draft"]})]}),f.jsxs("div",{className:"p-4 space-y-4",children:[L&&f.jsx("div",{className:"rounded-lg border border-red-100 bg-red-50 px-3 py-2 text-xs text-red-700",children:L}),O.length?f.jsxs(f.Fragment,{children:[f.jsx(Zk,{gate:l}),v&&f.jsx(Kk,{draft:v,saving:w===v.nodeId,onChange:q=>T(_=>({..._,rationale:q})),onCancel:()=>T(null),onSave:()=>z(v.nodeId,v.rationale)}),f.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[f.jsxs("div",{className:"rounded-lg border border-gray-100 bg-gray-50 px-3 py-2",children:[f.jsx("div",{className:"text-[11px] uppercase tracking-wide text-gray-500 font-semibold",children:"Status"}),f.jsx("div",{className:"mt-1 flex items-end gap-2",children:f.jsx("span",{className:"text-xl font-semibold text-gray-900",children:H})})]}),f.jsxs("div",{className:"rounded-lg border border-gray-100 bg-gray-50 px-3 py-2",children:[f.jsx("div",{className:"text-[11px] uppercase tracking-wide text-gray-500 font-semibold",children:"Plan steps"}),f.jsxs("div",{className:"mt-1 text-2xl font-semibold text-gray-900",children:[R.complete,"/",R.total]})]})]}),f.jsx("div",{className:"space-y-2",children:O.map((q,_)=>{var mt;const ct=$z(q.status),X=q.id===A,F=Number(((mt=q==null?void 0:q.cost)==null?void 0:mt.usd)||0),ht=C===q.id||q.status==="running",pt=w===q.id,wt=Nz.has(q.role),P=Mz.has(q.role);return f.jsx("div",{className:`rounded-lg border px-3 py-2 ${X?"border-violet-300 bg-vi
489olet-50/70":Jg[q.status]||Jg.not_started}`,children:f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(ct,{className:"w-4 h-4 mt-0.5 shrink-0"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[f.jsx("span",{className:"text-sm font-semibold text-gray-900",children:tm[q.role]||ii(q.role)}),X&&f.jsx("span",{className:"rounded-full bg-violet-100 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-violet-700",children:"next"})]}),f.jsx("div",{className:"text-xs text-gray-600 truncate",children:q.title||ii(q.status)}),(q.status==="done"||q.status==="invalidated")&&F>0&&f.jsx("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-gray-500",children:f.jsxs("span",{className:"inline-flex items-center gap-1",children:[f.jsx(Fw,{className:"w-3 h-3"}),"$",F.toFixed(2)]})}),f.jsxs("div",{className:"mt-2 flex flex-wrap gap-1.5",children:[(q.status==="not_started"||q.status==="invalidated"||q.status==="needs_input")&&(wt?f.jsxs("button",{type:"button",onClick:()=>N(q.id),disabled:ht||h,className:"inline-flex items-center gap-1 rounded-md border border-violet-200 bg-white px-2 py-1 text-[11px] font-medium text-violet-700 hover:bg-violet-50 disabled:opacity-50",children:[ht?f.jsx(de,{className:"w-3 h-3 animate-spin"}):f.jsx(yw,{className:"w-3 h-3"}),"Run"]}):f.jsxs("span",{title:P?"Answer in chat":"Needs an answer before this step can run",className:"inline-flex items-center gap-1 rounded-md border border-sky-200 bg-sky-50 px-2 py-1 text-[11px] font-medium text-sky-800",children:[f.jsx(mr,{className:"w-3 h-3"}),P?"Chat":"Needs input"]})),(q.status==="done"||q.status==="invalidated")&&f.jsxs("button",{type:"button",onClick:()=>T({nodeId:q.id,title:q.title||tm[q.role]||ii(q.role),rationale:q.rationale||""}),disabled:pt||h,className:"inline-flex items-center gap-1 rounded-md border border-gray-200 bg-white px-2 py-1 text-[11px] font-medium text-gray-600 hover:bg-gray-50 disabled:opacity-50",children:[pt?f.jsx(de,{className:"w-3 h-3 animate-spin"}):f.jsx(li,{className:"w-3 h-3"}),"Edit"]})]})]}),f.jsx("span",{className:"text-[10px] uppercase tracking-wide font-semibold text-gray-500",children:ii(q.status)})]})},q.id||`${q.role}-${_}`)})}),f.jsx(Qk,{decisions:I,savingDecision:g,onDecision:E}),f.jsx(Jk,{findings:j})]}):f.jsxs("button",{type:"button",onClick:W,disabled:p,className:"w-full rounded-xl border border-dashed border-violet-200 bg-violet-50/40 px-3 py-4 text-left hover:bg-violet-50 disabled:opacity-60",children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-violet-800",children:[p?f.jsx(de,{className:"w-4 h-4 animate-spin"}):f.jsx(Ra,{className:"w-4 h-4"}),"Draft engagement plan"]}),f.jsx("div",{className:"mt-1 text-xs text-gray-600",children:"Brief, strategy, organization, research, business model, architecture, costs, risk, review, final pack."})]})]})]}):f.jsxs("section",{className:"rounded-xl border border-gray-200 bg-white shadow-sm p-4",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs uppercase tracking-wide text-gray-500 font-semibold mb-2",children:[f.jsx(ko,{className:"w-3.5 h-3.5"}),"Engagement plan"]}),f.jsx("div",{className:"text-sm text-gray-700 mb-3",children:"Sign in to open the engagement plan and saved decisions."}),f.jsxs("button",{type:"button",onClick:()=>i(`/signup?from=/consultant/${e}?planner=1`),className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-900 text-white text-sm font-medium hover:bg-gray-700",children:[f.jsx(Ri,{className:"w-4 h-4"}),"Sign in"]})]}):null},Qk=({decisions:e,savingDecision:t,onDecision:r})=>e.length?f.jsxs("div",{className:"space-y-2",children:[f.jsx("div",{className:"text-[11px] uppercase tracking-wide text-gray-500 font-semibold",children:"Decision ledger"}),e.slice(0,5).map(i=>f.jsx("div",{className:"rounded-lg border border-gray-100 bg-white px-3 py-2",children:f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(Ri,{className:"w-4 h-4 text-gray-400 mt-0.5 shrink-0"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("div",{className:"text-sm font-medium text-gray-900 truncate",children:i.title||"Decision"}),f.jsxs("div",{className:"text-xs text-gray-500",children:[ii(i.owner_agent)," · ",ii(i.review_status)]}),f.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:Ez.map(({status:n,label:s,Icon:a})=>f.jsxs("button",{type:"button",onClick:()=>r(i.id,n),disabled:t===i.id||i.review_status===n,className:"inline-flex items-center gap-1 rounded-md border border-gray-200 px-2 py-1 text-[11px] font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:[t===i.id?f.jsx(de,{className:"w-3 h-3 animate-spin"}):f.jsx(a,{className:"w-3 h-3"}),s]},n))})]})]})},i.id))]}):null,Kk=({draft:e,saving:t,onChange:r,onCancel:i,onSave:n})=>f.jsxs("div",{className:"rounded-xl border border-violet-200 bg-vi
489olet-50/70 p-3 space-y-2",children:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(li,{className:"w-4 h-4 text-violet-700 mt-0.5 shrink-0"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("div",{className:"text-sm font-semibold text-gray-900 truncate",children:e.title||"Edit planner node"}),f.jsx("div",{className:"text-xs text-gray-600",children:"Downstream planner nodes will be reopened for review."})]}),f.jsx("button",{type:"button",onClick:i,disabled:t,className:"p-1 rounded-md text-gray-400 hover:text-gray-700 hover:bg-white/70 disabled:opacity-50","aria-label":"Close planner edit",children:f.jsx(pi,{className:"w-3.5 h-3.5"})})]}),f.jsx("textarea",{value:e.rationale||"",onChange:s=>r(s.target.value),rows:4,className:"w-full resize-none rounded-lg border border-violet-200 bg-white px-3 py-2 text-sm text-gray-800 outline-none focus:border-violet-400 disabled:bg-gray-100",disabled:t,placeholder:"Update the rationale..."}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx("button",{type:"button",onClick:i,disabled:t,className:"rounded-lg border border-gray-200 bg-white px-3 py-1.5 text-xs font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),f.jsxs("button",{type:"button",onClick:n,disabled:t,className:"inline-flex items-center gap-1.5 rounded-lg bg-violet-700 px-3 py-1.5 text-xs font-medium text-white hover:bg-violet-600 disabled:opacity-50",children:[t?f.jsx(de,{className:"w-3.5 h-3.5 animate-spin"}):f.jsx(je,{className:"w-3.5 h-3.5"}),"Save"]})]})]}),em={ok:{cls:"border-emerald-200 bg-emerald-50 text-emerald-800",Icon:Ri,label:"Ready to export"},warn:{cls:"border-sky-200 bg-sky-50 text-slate-800",Icon:mr,label:"Review suggested before export"},blocked:{cls:"border-red-200 bg-red-50 text-red-800",Icon:dv,label:"Needs fixes before export"}},Iz=e=>String(e||"").replace(/(\d+)\s+block-severity verdict\(s\) must be resolved upstream\./i,"$1 review issue must be resolved.").replace(/(\d+)\s+warn-severity verdict\(s\) require acknowledgement\./i,"$1 warning should be reviewed.").replace(/\bblock\b/gi,"issue").replace(/\bwarn\b/gi,"warning"),rm=(e,t,r)=>e===1?`1 ${t}`:`${e} ${r}`,Zk=({gate:e})=>{if(!e||!e.status)return null;const{cls:t,Icon:r,label:i}=em[e.status]||em.warn,n=(e.reasons||[]).slice(0,2);return f.jsxs("div",{className:`rounded-lg border px-3 py-2 text-xs ${t}`,children:[f.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[f.jsx(r,{className:"w-3.5 h-3.5"}),i]}),f.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px] opacity-90",children:[e.blockCount>0&&f.jsx("span",{children:rm(e.blockCount,"issue","issues")}),e.warnCount>0&&f.jsx("span",{children:rm(e.warnCount,"warning","warnings")})]}),n.length>0&&f.jsx("ul",{className:"mt-1.5 list-disc list-inside space-y-0.5 opacity-90",children:n.map((s,a)=>f.jsx("li",{children:Iz(s)},a))})]})},Jk=({findings:e})=>e.length?f.jsxs("div",{className:"space-y-2",children:[f.jsx("div",{className:"text-[11px] uppercase tracking-wide text-gray-500 font-semibold",children:"Findings"}),e.slice(0,3).map(t=>f.jsxs("div",{className:"rounded-lg border border-gray-100 bg-gray-50 px-3 py-2",children:[f.jsx("div",{className:"text-sm font-medium text-gray-900",children:t.claim||"Finding"}),f.jsxs("div",{className:"text-xs text-gray-500",children:["Evidence: ",ii(t.source_quality||"reviewed")]})]},t.id||t.claim))]}):null;Xk.propTypes={sessionId:Y.string,isAuthenticated:Y.bool,refreshKey:Y.number};Qk.propTypes={decisions:Y.array.isRequired,savingDecision:Y.string,onDecision:Y.func.isRequired};Kk.propTypes={draft:Y.shape({nodeId:Y.string.isRequired,title:Y.string,rationale:Y.string}).isRequired,saving:Y.bool,onChange:Y.func.isRequired,onCancel:Y.func.isRequired,onSave:Y.func.isRequired};Jk.propTypes={findings:Y.array.isRequired};Zk.propTypes={gate:Y.shape({status:Y.oneOf(["ok","warn","blocked"]),engagementConfidence:Y.number,blockCount:Y.number,warnCount:Y.number,reasons:Y.arrayOf(Y.string)})};const t2=({sessionId:e,isAuthenticated:t=!1})=>{const[r,i]=V.useState(""),[n,s]=V.useState(""),[a,o]=V.useState(""),[l,c]=V.useState(""),[h,u]=V.useState(""),[p,d]=V.useState(!1),[g,y]=V.useState(!1),[C,x]=V.useState(null),w=async k=>{var v,T;if(k.preventDefault(),!(!e||p)){if(!t&&(!r.trim()||!n.trim()||!a.trim())){x("Please fill name, email and company.");return}x(null),d(!0);try{const L=t?{notes:l.trim()}:{name:r.trim(),email:n.trim(),company:a.trim(),notes:l.trim()},D=await rw(e,L);u((D==null?void 0:D.contactEmail)||n.trim()),y(!0)}catch(L){x(((T=(v=L==null?void 0:L.response)==null?void 0:v.data)==null?void 0:T.detail)||"Something went wrong. Please try again.")}finally{d(!1)}}};return g?f.jsxs("div",{className:"rounded-2xl border border-emerald-200 bg-emerald-50 shadow-sm p-4 flex items-start gap-3",children:[f.jsx(je,{className:"w-5 h-5 text-emerald-600 mt-0.5 shrink-0"}),f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-semibold text-emerald-900",children:"Quote request received"}),f.jsxs("div",{className:"text-xs text-emerald-800 mt-1",children:["A Bytical advisor will reach out within 24 hours",h?f.jsxs(f.Fragment,{children:[" at ",f.jsx("span",{className:"font-medium",children:h})]}):" using your account email","."]})]})]}):f.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white shadow-sm p-4",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs uppercase tracking-wide text-cyan-700 font-semibold mb-1",children:[f.jsx(qa,{className:"w-3.5 h-3.5"}),"Request a quote"]}),f.jsx("p",{className:"text-xs text-gray-600 mb-3",children:t?"We will use your account profile and active workspace to tailor a fixed-price proposal for this architecture.":"Share your details and a Bytical advisor will tailor a fixed-price proposal for this architecture."}),f.jsxs("form",{onSubmit:w,className:"space-y-2",children:[!t&&f.jsxs(f.Fragment,{children:[f.jsx("input",{type:"text",required:!0,placeholder:"Full name",value:r,onChange:k=>i(k.target.value),className:"w-full text-sm rounded-lg border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2 focus:ring-cyan-200",disabled:p,maxLength:120}),f.jsx("input",{type:"email",required:!0,placeholder:"Work email",value:n,onChange:k=>s(k.target.value),className:"w-full text-sm rounded-lg border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2 focus:ring-cyan-200",disabled:p,maxLength:240}),f.jsx("input",{type:"text",required:!0,placeholder:"Company",value:a,onChange:k=>o(k.target.value),className:"w-full text-sm rounded-lg border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2 focus:ring-cyan-200",disabled:p,maxLength:160})]}),f.jsx("textarea",{placeholder:"Anything we should know? (optional)",value:l,onCh
489ange:k=>c(k.target.value),rows:2,className:"w-full text-sm rounded-lg border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2 focus:ring-cyan-200 resize-y",disabled:p,maxLength:2e3}),C&&f.jsx("div",{className:"text-xs text-red-600",children:C}),f.jsxs("button",{type:"submit",disabled:p,className:"w-full inline-flex items-center justify-center gap-2 rounded-xl bg-cyan-600 hover:bg-cyan-700 text-white text-sm font-medium px-3 py-2 disabled:opacity-50",children:[p?f.jsx(de,{className:"w-4 h-4 animate-spin"}):f.jsx(qa,{className:"w-4 h-4"}),"Request quote"]}),f.jsx("div",{className:"text-[11px] text-gray-500 text-center",children:"We'll reply from [email protected] within 24 hours."})]})]})};t2.propTypes={sessionId:Y.string,isAuthenticated:Y.bool};const Dz={discovery:"Discovery",strategy:"Strategy",requirements:"Requirements",architecture:"Architecture",compliance:"Compliance",boq:"BOQ"},Pz=new Set(["cost_unconfirmed"]),Oz=(e,t)=>(e==null?void 0:e.message)||(e==null?void 0:e.title)||(e==null?void 0:e.code)||t,e2=e=>{var t;return Pz.has(e==null?void 0:e.code)||((t=e==null?void 0:e.action)==null?void 0:t.kind)==="confirm_cost"},xh=(e,t)=>{const r=[],i=new Set;
489return(Array.isArray(e)?e:[]).forEach(n=>{const s=Oz(n,t),a=`${(n==null?void 0:n.code)||"item"}:${s}`.toLowerCase();i.has(a)||(i.add(a),r.push({...n,message:s}))}),r},Rz=(e,t="Could not queue PDF")=>{var i;const r=(e==null?void 0:e.detail)||e;return typeof r=="string"?r:Array.isArray(r==null?void 0:r.blockers)&&r.blockers.length?((i=r.blockers[0])==null?void 0:i.message)||t:typeof(r==null?void 0:r.message)=="string"?r.message:t};function r2({version:e,isNew:t}){return e?f.jsxs("span",{className:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-semibold ${t?"bg-[var(--color-brand,#00C7FD)]/10 text-[var(--color-brand,#00C7FD)]":"bg-gray-100 text-gray-600"}`,title:`Version ${e}`,children:["v",e,t&&f.jsx("span",{className:"ml-0.5",children:"NEW"})]}):null}r2.propTypes={version:Y.number,isNew:Y.bool};function qz(e,t){if(!t||typeof t!="object")return"Building artifact";if(e==="architecture"){const r=Array.isArray(t.components)?t.components.length:0,i=Array.isArray(t.integrationFlows||t.integration_flows)?(t.integrationFlows||t.integration_flows).length:0,n=Array.isArray(t.dataFlows||t.data_flows)?(t.dataFlows||t.data_flows).length:0;return[r?`${r} components`:null,i?`${i} runtime flows`:null,n?`${n} data flows`:null].filter(Boolean).join(" · ")||"Building architecture view"}if(e==="strategy")return[t.scenarioType,t.buyVsBuild,t.cloudStrategy].filter(Boolean).join(" · ")||t.transformationStrategy||"Building strategy";if(e==="requirements"){const r=Array.isArray(t.functional)?t.functional.length:0,i=Array.isArray(t.nonFunctional||t.non_functional)?(t.nonFunctional||t.non_functional).length:0;return`${r} functional · ${i} non-functional`}if(e==="compliance"){const r=Array.isArray(t.findings)?t.findings.length:0;return r?`${r} findings`:"Checking compliance"}return Object.keys(t).slice(0,4).join(" · ")||"Building artifact"}function i2({partial:e}){const t=V.useMemo(()=>e?Object.entries(e).map(([r,i])=>{const n=Nm(i);return{attr:r,parsed:n,raw:i}}).filter(r=>r.parsed&&Object.keys(r.parsed).length>0):[],[e]);return t.length?f.jsxs("div",{className:"rounded-2xl border border-dashed border-[var(--color-brand,#00C7FD)]/40 bg-cyan-50/40 shadow-sm p-3",children:[f.jsxs("div",{className:"flex items-center gap-2 text-[11px] uppercase tracking-wide text-[var(--color-brand,#00C7FD)] font-semibold mb-2",children:[f.jsx(wo,{className:"w-3.5 h-3.5"}),"Building live",f.jsx(de,{className:"w-3 h-3 animate-spin ml-auto text-gray-400"})]}),f.jsx("div",{className:"space-y-2",children:t.map(({attr:r,parsed:i})=>{const n=r.replace(/_artifact$/,"");return f.jsxs("div",{className:"text-[12px] rounded-lg border border-white/70 bg-white px-3 py-2",children:[f.jsx("div",{className:"text-gray-500 mb-0.5",children:Dz[n]||n}),f.jsx("div",{className:"text-gray-800 font-medium leading-snug",children:qz(n,i)})]},r)})})]}):null}i2.propTypes={partial:Y.object};const im={blocker:"bg-red-50 border-red-200 text-red-800",warning:"bg-sky-50 border-sky-200 text-sky-800",nit:"bg-gray-50 border-gray-200 text-gray-700"},nm={blocker:"bg-red-500",warning:"bg-sky-500",nit:"bg-gray-400"},sm={blocker:"Must resolve",warning:"Review",nit:"Note"};function n2({critique:e}){if(!e)return null;const t=e.findings||[],r=!!e.overallConsistent&&t.length===0;return f.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white shadow-sm p-4",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs uppercase tracking-wide text-gray-500 font-semibold mb-2",children:[r?f.jsx(Ri,{className:"w-3.5 h-3.5 text-emerald-600"}):f.jsx(mr,{className:"w-3.5 h-3.5 text-sky-600"}),r?"Consistency review":"Items to resolve"]}),r?f.jsx("div",{className:"text-sm text-emerald-700",children:"The strategy, requirements, architecture, cost, and risk views are aligned."}):f.jsx("div",{className:"space-y-2",children:t.map((i,n)=>f.jsxs("div",{className:`rounded-lg border px-3 py-2 text-[13px] ${im[i.severity]||im.nit}`,children:[f.jsxs("div",{className:"flex items-center gap-2 font-medium",children:[f.jsx("span",{className:`w-2 h-2 rounded-full ${nm[i.severity]||nm.nit}`}),f.jsx("span",{children:i.title}),f.jsx("span",{className:"ml-auto text-[10px] uppercase tracking-wide opacity-70",children:sm[i.severity]||sm.nit})]}),i.detail&&f.jsx("div",{className:"mt-1 text-[12px] leading-relaxed opacity-90",children:i.detail})]},n))})]})}n2.propTypes={critique:Y.object};function s2({readiness:e}){const t=xh(e==null?void 0:e.blockers,"A required export step needs attention."),r=xh(e==null?void 0:e.warnings,"A review note will be included in the report."),i=t.length>0&&t.every(e2);return!t.length&&!r.length?f.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-emerald-100 bg-emerald-50 px-3 py-2 text-xs text-emerald-800",children:[f.jsx(je,{className:"w-3.5 h-3.5 mt-0.5 shrink-0"}),f.jsx("span",{children:"Export readiness checks are clear."})]}):f.jsxs("div",{className:"rounded-lg border border-sky-200 bg-sky-50 px-3 py-2 text-xs text-slate-800 space-y-2",children:[t.length>0&&f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-1.5 font-semibold text-slate-900 mb-1",children:[f.jsx(mr,{className:"w-3.5 h-3.5"}),i?"Ready after final confirmation":"Needs attention before export"]}),i&&f.jsx("p",{className:"leading-relaxed mb-1.5",children:"Use the email report button below. I will confirm the remaining export step first, then queue the PDF."}),f.jsx("ul",{className:"space-y-1 leading-relaxed",children:t.map((n,s)=>f.jsxs("li",{children:["- ",n.message]},`${n.code||"blocker"}-${s}`))})]}),r.length>0&&f.jsxs("div",{children:[f.jsx("div",{className:"font-semibold text-slate-900 mb-1",children:"Review notes included in the report"}),f.jsx("ul",{className:"space-y-1 leading-relaxed",children:r.slice(0,4).map((n,s)=>f.jsxs("li",{children:["- ",n.message]},`${n.code||"warning"}-${s}`))}),r.length>4&&f.jsxs("details",{className:"mt-1",children:[f.jsxs("summary",{className:"cursor-pointer font-medium text-slate-900",children:["Show ",r.length-4," more review notes"]}),f.jsx("ul",{className:"mt-1 space-y-1 leading-relaxed",children:r.slice(4).map((n,s)=>f.jsxs("li",{children:["- ",n.message]},`${n.code||"warning-more"}-${s}`))})]})]})]})}s2.propTypes={readiness:Y.object};const md=({sessionId:e,isAuthenticated:t,version:r,plannerEnabled:i})=>{var P,mt;const n=Ch(),s=kh(),a=ee(st=>{var at;return(at=st.consultant)==null?void 0:at.sessionMeta}),o=ee(st=>{var at;return((at=st.consultant)==null?void 0:at.plan)||[]}),l=ee(st=>{var at;return(at=st.consultant)==null?void 0:at.currentRoute}),c=ee(st=>{var at;return!!((at=st.consultant)!=null&&at.streaming)}),h=ee(st=>{var at;return((at=st.consultant)==null?void 0:at.artifacts)||{}}),u=h.partial||{},p=h.critique||null,d=V.useMemo(()=>{var st,at,dt,bt,vt,Bt;return{discovery:(st=h.discovery)==null?void 0:st.version,strategy:(at=h.strategy)==null?void 0:at.version,requirements:(dt=h.requirements)==null?void 0:dt.version,architecture:(bt=h.architecture)==null?void 0:bt.version,compliance:(vt=h.compliance)==null?void 0:vt.version,boq:(Bt=h.boq)==null?void 0:Bt.version}},[h]),[g,y]=V.useState({}),C=V.useRef(d);V.useEffect(()=>{const st=C.current||{},at={};
489if(Object.keys(d).forEach(dt=>{d[dt]&&d[dt]!==st[dt]&&(at[dt]=!0)}),Object.keys(at).length){y(bt=>({...bt,...at}));const dt=setTimeout(()=>{y(bt=>{const vt={...bt};return Object.keys(at).forEach(Bt=>{delete vt[Bt]}),vt})},4e3);return C.current=d,()=>clearTimeout(dt)}C.current=d},[d]);const x=((a==null?void 0:a.locale)||"en").slice(0,2),[w,k]=V.useState(null),[v,T]=V.useState(!1),[L,D]=V.useState(null),[M,W]=V.useState(null),[E,N]=V.useState(null),[z,O]=V.useState(!0),I=V.useMemo(()=>{const st=o.find(at=>at.id==="review");return!!(st!=null&&st.done||(l==null?void 0:l.phase)==="complete")},[o,l]),j=V.useRef(""),A=V.useRef(0),R=V.useCallback(async()=>{var st,at,dt,bt,vt,Bt,Q,$t,te,pe,Oe,Ae,Re,gt,St,kt,At,G;if(e){T(!0);try{const nt=await wh(e);if(nt!=null&&nt.success){k(nt),(st=nt.artifacts)!=null&&st.quality&&s(mm(nt.artifacts.quality)),(at=nt.artifacts)!=null&&at.readiness&&s(ym(nt.artifacts.readiness)),s(xm(((dt=nt.artifacts)==null?void 0:dt.suggestionChips)||[])),s(bm({mermaidSrc:(bt=nt.artifacts)==null?void 0:bt.mermaidSrc,brandedArchDataUri:(vt=nt.artifacts)==null?void 0:vt.brandedArchDataUri,brandedArchUrl:(Bt=nt.artifacts)==null?void 0:Bt.brandedArchUrl,plantumlSrc:(Q=nt.artifacts)==null?void 0:Q.plantumlSrc,d2Src:($t=nt.artifacts)==null?void 0:$t.d2Src,architectureArtifact:(te=nt.artifacts)==null?void 0:te.architecture,strategy:(pe=nt.artifacts)==null?void 0:pe.strategy,boq:(Oe=nt.artifacts)==null?void 0:Oe.boq,prd:(Ae=nt.artifacts)==null?void 0:Ae.prd,requirements:((Re=nt.artifacts)==null?void 0:Re.requirementsArtifact)||((gt=nt.artifacts)==null?void 0:gt.requirements),compliance:((St=nt.artifacts)==null?void 0:St.complianceArtifact)||((kt=nt.artifacts)==null?void 0:kt.compliance),downloadAvailable:nt.downloadAvailable}));const m=Number(((At=nt.artifacts)==null?void 0:At.notificationsVersion)||0),$=A.current||0;if(m>$){const U=((G=nt.artifacts)==null?void 0:G.notifications)||[];if($>0){const tt=Math.min(U.length,m-$),J=U.slice(-tt);for(const ft of J)try{window.dispatchEvent(new CustomEvent("consultant:notification",{detail:ft}))}catch{}}A.current=m}}}finally{T(!1)}}},[e,s]),H=V.useRef(null);V.useEffect(()=>(H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{R()},600),()=>{H.current&&clearTimeout(H.current)}),[R,r]);const q=V.useMemo(()=>(w==null?void 0:w.artifacts)||{},[w==null?void 0:w.artifacts]),_=(q==null?void 0:q.readiness)||{ok:!0,blockers:[],warnings:[]},ct=V.useMemo(()=>xh(_.blockers,"A required export step needs attention."),[_.blockers]),X=t&&_.ok===!1,F=ct.length>0&&ct.every(e2),ht=V.useCallback(async st=>{if(!(!e||!st||st===j.current)){j.current=st;try{await iw(e,st,q.mermaidSrc||null)}catch{}}},[e,q.mermaidSrc]),pt=V.useCallback(async st=>{var at,dt;if(W(null),N(null),!t){n(`/signup?from=/consultant/${e}`);return}if(X&&!F){W(((at=ct[0])==null?void 0:at.message)||"Finish the required consultant step before exporting.");return}D(st);try{if(X&&F){for(const vt of ct)if(vt.code==="cost_unconfirmed"||((dt=vt.action)==null?void 0:dt.kind)==="confirm_cost"){const Bt=await km(e,!0);if(!(Bt!=null&&Bt.success)){W("Could not confirm pricing. Please try again.");return}}await R()}const bt=await Cm(e,st,{lang:x});if(!bt.success){if(bt.requiresAuth){n(`/signup?from=/consultant/${e}`);return}W(Rz(bt.error,"Could not queue PDF"));return}N({email:bt.deliveryEmail||null,channel:bt.deliveryChannel||"email"})}finally{D(null)}},[t,X,F,ct,n,e,R,x]),wt=V.useMemo(()=>!!(q.mermaidSrc||q.boq||q.requirements&&q.requirements.length),[q]);return e?f.jsxs("aside",{className:"w-full lg:w-[560px] xl:w-[640px] flex-shrink-0 space-y-4",children:[f.jsx(Gk,{artifacts:q,sessionMeta:a,plan:o,currentRoute:l,streaming:c,sessionId:e}),i&&f.jsx(Xk,{sessionId:e,isAuthenticated:t,refreshKey:r}),f.jsxs("div",{className:"rounded-xl border border-gray-200 bg-white shadow-sm overflow-hidden",children:[f.jsxs("button",{type:"button",onClick:()=>O(st=>!st),className:"w-full px-4 py-3 flex items-center justify-between gap-3 text-left hover:bg-gray-50",children:[f.jsxs("div",{children:[f.jsx("div",{className:"text-xs uppercase tracking-wide text-gray-500 font-semibold",children:"Export & detailed artefacts"}),f.jsx("div",{className:"text-sm text-gray-700",children:"PDFs, diagrams, priced BOQ, and review outputs"})]}),z?f.jsx(Oa,{className:"w-4 h-4 text-gray-400 shrink-0"}):f.jsx(Da,{className:"w-4 h-4 text-gray-400 shrink-0"})]}),z&&f.jsxs("div",{className:"border-t border-gray-100 p-3 space-y-4",children:[f.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white shadow-sm",children:[f.jsxs("div",{className:"px-4 py-3 border-b border-gray-100 flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("div",{className:"text-xs uppercase tracking-wide text-gray-500 font-semibold",children:"Deliverables"}),f.jsx("div",{className:"text-sm text-gray-700",children:wt?"Live artefacts assembled by the consultant":"Artefacts appear here as the agent works"})]}),v&&f.jsx(de,{className:"w-4 h-4 text-gray-400 animate-spin"})]}),f.jsxs("div",{className:"p-3 grid grid-cols-1 gap-2",children:[f.jsx(s2,{readiness:_}),f.jsxs("div",{className:I&&wt?"grid grid-cols-1 sm:grid-cols-2 gap-2":"grid grid-cols-1 gap-2",children:[f.jsxs("button",{type:"button",onClick:()=>pt("combined"),disabled:L!==null||!wt,className:"inline-flex items-center justify-center gap-2 px-3 py-2 rounded-xl bg-gray-900 text-white text-sm font-medium hover:bg-gray-700 disabled:opacity-50",children:[L==="combined"?f.jsx(de,{className:"w-4 h-4 animate-spin"}):f.jsx(Sh,{className:"w-4 h-4"}),X&&F?"Confirm & email report":"Email me the report"]}),I&&wt&&f.jsx(Vk,{sessionId:e,buttonClassName:"inline-flex w-full items-center justify-center gap-2 px-3 py-2 rounded-xl border border-gray-300 bg-white text-gray-800 text-sm font-medium hover:bg-gray-50 disabled:opacity-50"})]}),!t&&f.jsx("div",{className:"text-[11px] text-gray-500 text-center px-2",children:"Sign up free to re
489ceive PDF reports by email."}),M&&f.jsx("div",{className:"text-xs text-red-600",children:M})]})]}),E&&f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4",onClick:()=>N(null),children:f.jsxs("div",{className:"bg-white rounded-2xl shadow-xl max-w-md w-full p-6",onClick:st=>st.stopPropagation(),children:[f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("div",{className:"shrink-0 w-10 h-10 rounded-full bg-emerald-50 flex items-center justify-center",children:f.jsx(je,{className:"w-5 h-5 text-emerald-600"})}),f.jsxs("div",{className:"flex-1",children:[f.jsx("h3",{className:"text-base font-semibold text-gray-900",children:"PDF is on its way"}),f.jsxs("p",{className:"text-sm text-gray-600 mt-1.5",children:["We're generating your report now. You'll receive an email",E.email?f.jsxs(f.Fragment,{children:[" ","at ",f.jsx("span",{className:"font-medium text-gray-800",children:E.email})]}):null," ","with a secure download link as soon as it's ready (usually within a minute)."]}),f.jsx("p",{className:"text-xs text-gray-500 mt-3",children:"The link will expire in 24 hours. You can safely close this page - generation continues in the background."})]})]}),f.jsx("div",{className:"mt-5 flex justify-end",children:f.jsx("button",{type:"button",onClick:()=>N(null),className:"px-4 py-2 rounded-lg bg-gray-900 text-white text-sm font-medium hover:bg-gray-700",children:"Got it"})})]})}),(q.brandedArchUrl||q.brandedArchDataUri||q.mermaidSrc||((mt=(P=q.architecture)==null?void 0:P.components)==null?void 0:mt.length))&&f.jsx(a2,{sessionId:e,brandedUrl:q.brandedArchUrl,brandedDataUri:q.brandedArchDataUri,mermaidSrc:q.mermaidSrc,plantumlSrc:q.plantumlSrc,d2Src:q.d2Src,architecture:q.architecture,onCapture:ht,version:d.architecture,isNew:!!g.architecture}),f.jsx(i2,{partial:u}),f.jsx(n2,{critique:p}),f.jsx(t2,{sessionId:e,isAuthenticated:t})]})]})]}):null};md.propTypes={sessionId:Y.string,isAuthenticated:Y.bool,version:Y.number,plannerEnabled:Y.bool};const zz={branded:"Cloud map",beautified:"Flow map",plantuml:"PlantUML",d2:"D2"},a2=({sessionId:e,brandedUrl:t,brandedDataUri:r,mermaidSrc:i,plantumlSrc:n,d2Src:s,architecture:a,onCapture:o,version:l,isNew:c})=>{const h=!!(t||r),u=!!i,p=!!n,d=!!s,[g,y]=V.useState(!1),C=h&&!g,x=[C&&"branded",u&&"beautified",p&&"plantuml",d&&"d2"].filter(Boolean),[w,k]=V.useState(x[0]||"beautified");V.useEffect(()=>{!x.includes(w)&&x.length&&k(x[0])},[x,w]),V.useEffect(()=>{y(!1)},[t,r]);let v=w;return v==="branded"&&!C&&u&&(v="beautified"),f.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white shadow-sm p-4",children:[f.jsxs("div",{className:"flex items-center justify-between mb-2 gap-2 flex-wrap",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs uppercase tracking-wide text-indigo-700 font-semibold",children:[f.jsx(Fm,{className:"w-3.5 h-3.5"}),"Solution blueprint",f.jsx(r2,{version:l,isNew:c})]}),x.length>1&&f.jsx("div",{className:"inline-flex items-center text-[11px] rounded-full border border-gray-200 overflow-hidden",children:x.map(T=>f.jsx("button",{type:"button",onClick:()=>{T==="branded"&&y(!1),k(T)},className:`px-2 py-0.5 ${v===T?"bg-gray-900 text-white":"bg-white text-gray-600 hover:bg-gray-50"}`,children:zz[T]||T},T))})]}),v==="branded"&&C&&f.jsx(Jo,{title:"Cloud architecture canvas",initialZoom:100,minZoom:55,maxZoom:220,step:15,baseWidth:2200,viewportClassName:"h-[620px] max-h-[78vh]",children:f.jsx(fd,{url:t,dataUri:r,alt:"Branded solution blueprint",className:"w-full max-w-none h-auto rounded-lg border border-gray-100 bg-white shadow-sm",onAllSourcesFailed:()=>y(!0)})}),v==="beautified"&&u&&f.jsx(Ls,{sessionId:e,format:"mermaid",source:i,beautify:!0,onCapture:o}),v==="plantuml"&&p&&f.jsx(Ls,{sessionId:e,format:"plantuml",source:n}),v==="d2"&&d&&f.jsx(Ls,{sessionId:e,format:"d2",source:s}),f.jsx(pd,{architecture:a})]})};a2.propTypes={sessionId:Y.string,brandedUrl:Y.string,brandedDataUri:Y.string,mermaidSrc:Y.string,plantumlSrc:Y.string,d2Src:Y.string,architecture:Y.object,onCapture:Y.func,version:Y.number,isNew:Y.bool};const bh=[{id:"industry-neutral",label:"Cross-industry",desc:"AI, data, cloud and application transformation"},{id:"financial-services",label:"Financial services",desc:"Banking, payments and regulated finance"},{id:"healthcare",label:"Healthcare",desc:"Provider, payer and life-sciences contexts"},{id:"manufacturing",label:"Manufacturing",desc:"Plants, assets, supply chain and IT/OT"},{id:"retail",label:"Retail",desc:"Commerce, stores, customers and supply chain"},{id:"professional-services",label:"Professional services",desc:"Knowledge work and client delivery"},{id:"public-sector",label:"Public sector",desc:"Citizen services and regulated government workloads"},{id:"insurance",label:"Insurance",desc:"Carrier, broker, MGA and reinsurance contexts"}],Wz=[{id:"azure-foundation",label:"Azure Foundation",desc:"Landing zone, identity, network and governance"},{id:"application-modernization",label:"Application Modernization",desc:"Assess, migrate and modernize applications"},{id:"data-platform",label:"Data & Analytics",desc:"Fabric, lakehouse, BI and data governance"},{id:"ai-adoption",label:"AI / GenAI Adoption",desc:"Agents, RAG, document intelligence and evaluation"},{id:"security-resilience",label:"Security & Resilience",desc:"Zero trust, continuity and operational controls"},{id:"cost-optimization",label:"Cloud Cost Optimization",desc:"FinOps, rightsizing and unit economics"},{id:"digital-workplace",label:"Digital Workplace",desc:"Microsoft 365, Copilot and Power Platform"},{id:"integration-modernization",label:"Integration Modernization",desc:"APIs, events, workflows and legacy integration"}],Hz=[{id:"microsoft-365",label:"Microsoft 365"},{id:"dynamics-365",label:"Dynamics 365"},{id:"sap",label:"SAP"},{id:"salesforce",label:"Salesforce"},{id:"sql-server",label:"SQL Server"},{id:"on-prem",label:"On-premises systems"},{id:"custom-apis",label:"Custom APIs"},{id:"none",label:"None yet"}],ds=[{id:"initiative",title:"What are you looking to build?",subtitle:"Select your transformation initiative and industry context",icon:"🎯",questions:[{key:"initiative",label:"Initiative",multiSelect:!1,hasCustomInput:!0,options:Wz},{key:"industryPack",label:"Industry Context",multiSelect:!1,hasCustomInput:!1,options:bh}]},{id:"landscape",title:"Your current landscape",subtitle:"Where are you starting from and what systems exist today?",icon:"🏗️",questions:[{key:"approach",label:"Starting Point",multiSelect:!1,hasCustomInput:!1,options:[{id:"greenfield",label:"Building from scratch",desc:"No legacy constraints — ideal for MVPs"},{id:"migration",label:"Legacy migration",desc:"Strangler-fig recommended for phased delivery"}
489,{id:"saas-integration",label:"SaaS integration",desc:"Adopt and connect a packaged platform"},{id:"enhancement",label:"Enhancing existing platform",desc:"Adding capabilities to current stack"}]},{key:"integrations",label:"Existing Systems & Integrations",multiSelect:!0,hasCustomInput:!0,options:Hz}]},{id:"deployment",title:"Deployment & scale",subtitle:"Cloud, region, and expected scale",icon:"☁️",questions:[{key:"cloud",label:"Cloud Preference",multiSelect:!1,hasCustomInput:!1,options:[{id:"azure",label:"Azure",desc:"Azure-native target architecture"},{id:"hybrid-azure",label:"Hybrid Azure",desc:"Azure with retained on-premises workloads"},{id:"multi-cloud",label:"Azure-led multi-cloud",desc:"Azure control plane with existing cloud dependencies"},{id:"assessment",label:"Assess current estate",desc:"Recommend the Azure adoption path from evidence"}]},{key:"region",label:"Target Market",multiSelect:!1,hasCustomInput:!1,options:[{id:"US",label:"North America"},{id:"GB",label:"UK / Europe"},{id:"IN",label:"India"},{id:"SG",label:"Asia Pacific"},{id:"BR",label:"Latin America"},{id:"global",label:"Global / Multi-region"}]},{key:"scale",label:"Expected Scale",multiSelect:!1,hasCustomInput:!1,options:[{id:"small",label:"Small",desc:"Under 50 users"},{id:"mid",label:"Mid-market",desc:"50–500 users"},{id:"enterprise",label:"Enterprise",desc:"500+ users"},{id:"unsure",label:"Not sure yet"}]}]},{id:"timeline",title:"Timeline & priorities",subtitle:"When do you need it and what matters most?",icon:"⏱️",questions:[{key:"timeline",label:"Target Timeline",multiSelect:!1,hasCustomInput:!1,options:[{id:"3-months",label:"3 months",desc:"Fast MVP / proof of concept"},{id:"6-months",label:"6 months",desc:"Focused delivery sprint"},{id:"12-months",label:"12 months",desc:"Full platform build"},{id:"18-plus",label:"18+ months",desc:"Enterprise transformation"},{id:"flexible",label:"Flexible",desc:"No hard deadline"}]},{key:"priorities",label:"Key Priorities (select all that apply)",multiSelect:!0,hasCustomInput:!0,options:[{id:"speed",label:"Speed to market"},{id:"cost",label:"Cost optimization"},{id:"scalability",label:"Scalability"},{id:"compliance",label:"Regulatory compliance"},{id:"ux",label:"User experience"},{id:"integration",label:"System integration"},{id:"security",label:"Security & data privacy"},{id:"ai-ml",label:"AI / ML capabilities"}]}]}],Uz={US:"USD",GB:"GBP",IN:"INR",SG:"SGD",BR:"BRL",global:"USD"},Yz={greenfield:"mvp",migration:"migration","saas-integration":"saas",enhancement:"build"},o2=(e,t)=>{for(const r of ds){const i=r.questions.find(n=>n.key===e);if(i)return i.options.find(n=>n.id===t)||null}return null},am=(e,t)=>{var r;return((r=o2(e,t))==null?void 0:r.label)||t},om=(e,t)=>{const r=o2(e,t);return r?r.desc?`${r.label} — ${r.desc}`:r.label:t},l2=({option:e,selected:t,multiSelect:r,onClick:i})=>f.jsxs("button",{type:"button",onClick:i,className:`relative text-left p-3 rounded-xl border-2 transition-all ${t?"border-[var(--color-brand,#00C7FD)] bg-cyan-50/80 shadow-sm":"border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm"}`,children:[r&&t&&f.jsx("span",{className:"absolute top-1.5 right-1.5 w-4 h-4 rounded-full bg-[var(--color-brand,#00C7FD)] flex items-center justify-center",children:f.jsx(ys,{className:"w-2.5 h-2.5 text-white"})}),!r&&t&&f.jsx("span",{className:"absolute top-1.5 right-1.5 w-2.5 h-2.5 rounded-full bg-[var(--color-brand,#00C7FD)]"}),f.jsx("div",{className:"text-[13px] font-medium text-gray-900",children:e.label}),e.desc&&f.jsx("div",{className:"text-[11px] text-gray-500 mt-0.5 leading-snug",children:e.desc})]});l2.propTypes={option:Y.object.isRequired,selected:Y.bool,multiSelect:Y.bool,onClick:Y.func.isRequired};const c2=({total:e,current:t,onDotClick:r})=>f.jsx("div",{className:"flex items-center gap-1.5",children:Array.from({length:e},(i,n)=>f.jsx("button",{type:"button",onClick:()=>r(n),className:`h-2 rounded-full transition-all ${n===t?"w-5 bg-[var(--color-brand,#00C7FD)]":n<t?"w-2 bg-[var(--color-brand,#00C7FD)]/40":"w-2 bg-gray-300"}`,"aria-label":`Go to step ${n+1}`},n))});c2.propTypes={total:Y.number.isRequired,current:Y.number.isRequired,onDotClick:Y.func.isRequired};const h2=({onSubmit:e,disabled:t,seedText:r=""})=>{const[i,n]=V.useState(0),[s,a]=V.useState({}),[o,l]=V.useState(()=>r.trim()?{initiative:r.trim()}:{}),[c,h]=V.useState(""),u=ds.length+1,p=i===ds.length,d=i===0,g=V.useCallback((M,W,E)=>{a(N=>{if(E){const z=N[M]||[];if(W==="none")return{...N,[M]:z.includes("none")?[]:["none"]};const O=z.filter(j=>j!=="none"),I=O.includes(W)?O.filter(j=>j!==W):[...O,W];return{...N,[M]:I}}return{...N,[M]:N[M]===W?null:W}})},[]),y=V.useCallback((M,W="Not specified")=>{var z;const E=s[M]||null,N=(z=o[M])==null?void 0:z.trim();return E&&N?`${om(M,E)} (${N})`:E?om(M,E):N||W},[s,o]),C=V.useCallback((M,W="Not specified")=>{var O;const N=(s[M]||[]).map(I=>am(M,I)).join(", "),z=(O=o[M])==null?void 0:O.trim();return N&&z?`${N}, ${z}`:N||z||W},[s,o]),x=V.useCallback(M=>{const W=s[M]||null;return W?am(M,W):null},[s]),w=V.useCallback(()=>{const M=["Here are my requirements for the AI, data, and cloud consultation:","",`**Initiative:** ${y("initiative")}`,`**Industry Context:** ${y("industryPack")}`,`**Starting Point:** ${y("approach")}`,`**Existing Systems:** ${C("integrations","None specified")}`,`**Cloud Preference:** ${y("cloud","No preference")}`,`**Target Market:** ${y("region")}`,`**Expected Scale:** ${y("scale")}`,`**Timeline:** ${y("timeline","Flexible")}`,`**Key Priorities:** ${C("priorities")}`];c.trim()&&M.push("",`**Additional Context:** ${c.trim()}`),M.push("","Please analyze these requirements and provide a comprehensive discovery assessment. Identify key architectural decisions, recommend best-practice approaches, and highlight risks or considerations specific to this initiative.");const W=M.join(`
490`),N=`📋 **Discovery Requirements**
491${[x("initiative"),x("industryPack"),x("approach"),x("cloud"),x("timeline")].filter(
491Boolean).join(" · ")}`+(c.trim()?`
492_“${c.trim().slice(0,120)}${c.trim().length>120?"…":""}”_`:""),z={industryPack:s.industryPack||"industry-neutral",region:s.region||null,currency:Uz[s.region]||null,scenario:Yz[s.approach]||null};return{content:W,displayContent:N,context:z}},[s,c,y,C,x]),k=V.useCallback(()=>{if(t)return;const{content:M,displayContent:W,context:E}=w();e({context:E,message:{content:M,displayContent:W}})},[t,w,e]),v=()=>n(M=>Math.min(M+1,u-1)),T=()=>n(M=>Math.max(M-1,0)),L=M=>n(M),D=[{label:"Initiative",step:0,format:()=>y("initiative")},{label:"Industry Context",step:0,format:()=>y("industryPack")},{label:"Starting Point",step:1,format:()=>y("approach")},{label:"Integrations",step:1,format:()=>C("integrations","None specified")},{label:"Cloud",step:2,format:()=>y("cloud","No preference")},{label:"Region",step:2,format:()=>y("region")},{label:"Scale",step:2,format:()=>y("scale")},{label:"Timeline",step:3,format:()=>y("timeline","Flexible")},{label:"Priorities",step:3,format:()=>C("priorities")}];return f.jsx("div",{className:"px-4 sm:px-6 pb-2",children:f.jsxs("div",{className:"max-w-3xl mx-auto rounded-2xl border border-gray-200 bg-white/80 backdrop-blur-sm p-5 space-y-4",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs uppercase tracking-wide text-gray-500",children:[f.jsx(wo,{className:"w-3.5 h-3.5"}),p?"Review":`Step ${i+1} of ${ds.length}`]}),f.jsx(c2,{total:u,current:i,onDotClick:L})]}),f.jsx("div",{className:"overflow-hidden",children:f.jsxs("div",{className:"flex transition-transform duration-300 ease-in-out",style:{transform:`translateX(-${i*100}%)`},children:[ds.map(M=>f.jsxs("div",{className:"w-full flex-shrink-0 min-w-0 px-0.5",children:[f.jsxs("h2",{className:"text-lg font-semibold text-gray-900 mb-0.5",children:[f.jsx("span",{className:"mr-1.5",children:M.icon}),M.title]}),f.jsx("p",{className:"text-sm text-gray-500 mb-4",children:M.subtitle}),M.questions.map(W=>f.jsxs("div",{className:"mb-5",children:[f.jsx("div",{className:"text-xs font-medium text-gray-600 uppercase tracking-wide mb-2",children:W.label}),f.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2",children:W.options.map(E=>f.jsx(l2,{option:E,multiSelect:W.multiSelect,selected:W.multiSelect?(s[W.key]||[]).includes(E.id):s[W.key]===E.id,onClick:()=>g(W.key,E.id,W.multiSelect)},E.id))}),W.hasCustomInput&&f.jsx("input",{type:"text",className:`mt-2 w-full px-3 py-2 text-sm border border-gray-200 rounded-lg
493                          focus:outline-none focus:ring-1 focus:ring-[var(--color-brand,#00C7FD)]
494                          focus:border-[var(--color-brand,#00C7FD)]`,placeholder:"Or describe in your own words…",value:o[W.key]||"",onChange:E=>l(N=>({...N,[W.key]:E.target.value}))})]},W.key)),M.id==="timeline"&&f.jsxs("div",{className:"mb-3",children:[f.jsx("div",{className:"text-xs font-medium text-gray-600 uppercase tracking-wide mb-2",children:"Anything else we should know?"}),f.jsx("textarea",{className:`w-full px-3 py-2 text-sm border border-gray-200 rounded-lg
495                        focus:outline-none focus:ring-1 focus:ring-[var(--color-brand,#00C7FD)]
496                        focus:border-[var(--color-brand,#00C7FD)] resize-none`,rows:3,placeholder:"Pain points, compliance deadlines, vendor contracts, team size, existing infrastructure…",value:c,onChange:W=>h(W.target.value)})]})]},M.id)),f.jsxs("div",{className:"w-full flex-shrink-0 min-w-0 px-0.5",children:[f.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-0.5",children:"✅ Review your requirements"}),f.jsx("p",{className:"text-sm text-gray-500 mb-4",children:"Everything look right? Click any row to edit, or launch your consultation."}),f.jsxs("div",{className:"space-y-1.5",children:[D.map(M=>f.jsxs("button",{type:"button",onClick:()=>L(M.step),className:`w-full flex items-center justify-between px-3 py-2 rounded-lg
497                      bg-gray-50 hover:bg-cyan-50/50 transition-colors text-left group`,children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("span",{className:"text-[11px] uppercase text-gray-400 tracking-wide",children:M.label}),f.jsx("div",{className:"text-sm text-gray-900 truncate",children:M.format()})]}),f.jsx(Em,{className:"w-3.5 h-3.5 text-gray-400 shrink-0 ml-2 opacity-0 group-hover:opacity-100 transition-opacity"})]},M.label)),c.trim()&&f.jsxs("div",{className:"px-3 py-2 rounded-lg bg-gray-50",children:[f.jsx("span",{className:"text-[11px] uppercase text-gray-400 tracking-wide",children:"Additional Context"}),f.jsxs("div",{className:"text-sm text-gray-900 italic truncate",children:["“",c.trim().slice(0,200),c.trim().length>200?"…":"","”"]})]})]})]})]})}),f.jsxs("div",{className:"flex items-center justify-between pt-1 border-t border-gray-100",children:[f.jsxs("button",{type:"button",onClick:T,disabled:d,className:`inline-flex items-center gap-1 text-sm px-3 py-1.5 rounded-lg transition-colors ${d?"text-gray-300 cursor-not-allowed":"text-gray-600 hover:bg-gray-100"}`,children:[f.jsx(vm,{className:"w-4 h-4"}),"Back"]}),p?f.jsxs("button",{type:"button",onClick:k,disabled:t,className:`inline-flex items-center gap-2 text-sm px-5 py-2 rounded-xl
498                bg-[var(--color-brand,#00C7FD)] text-white font-medium
499                hover:opacity-90 transition-opacity disabled:opacity-40`,children:[f.jsx(qa,{className:"w-4 h-4"}),"Start Consultation"]}):f.jsxs("button",{type:"button",onClick:v,className:`inline-flex items-center gap-1 text-sm px-4 py-1.5 rounded-lg
500                text-[var(--color-brand,#00C7FD)] font-medium hover:bg-cyan-50 transition-colors`,children:["Next",f.jsx(Co,{className:"w-4 h-4"})]})]})]})})};h2.propTypes={onSubmit:Y.func.isRequired,disabled:Y.bool,seedText:Y.string};const Vz=[{id:"US",currency:"USD"},{id:"GB",currency:"GBP"},{id:"DE",currency:"EUR"},{id:"FR",currency:"EUR"},{id:"IT",currency:"EUR"},{id:"ES",currency:"EUR"},{id:"NL",currency:"EUR"},{id:"IE",currency:"EUR"},{id:"IN",currency:"INR"},{id:"AU",currency:"AUD"},{id:"SG",currency:"SGD"},{id:"JP",currency:"JPY"},{id:"BR",currency:"BRL"},{id:"CA",currency:"CAD"}],Gz=["USD","EUR","GBP","INR","AUD","SGD","JPY","BRL","CAD","CHF","AED"],lm=[{id:"",label:"Auto"},{id:"mvp",label:"MVP"},{id:"migration",label:"Migration"}
500,{id:"saas",label:"SaaS"},{id:"build",label:"Build"},{id:"compliance",label:"Compliance"},{id:"ai-integration",label:"AI integration"}],ps=({open:e,onClose:t,children:r})=>e?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"fixed inset-0 z-30",onClick:t}),f.jsx("div",{className:"absolute z-40 mt-1 left-0 min-w-[180px] bg-white border border-gray-200 rounded-xl shadow-lg p-1.5",children:r})]}):null;ps.propTypes={open:Y.bool,onClose:Y.func,children:Y.node};const fs=({icon:e,label:t,value:r,onClick:i})=>f.jsxs("button",{type:"button",onClick:i,className:"inline-flex items-center gap-1.5 text-xs px-2.5 py-1 rounded-full border border-gray-200 bg-white hover:border-gray-300 text-gray-700",children:[f.jsx(e,{className:"w-3 h-3 text-gray-400"}),f.jsx("span",{className:"text-gray-500",children:t}),f.jsx("span",{className:"font-medium text-gray-900 max-w-[120px] truncate",children:r||"auto"}),f.jsx(li,{className:"w-3 h-3 text-gray-300"})]});fs.propTypes={icon:Y.elementType,label:Y.string,value:Y.string,onClick:Y.func};const u2=({sessionId:e})=>{var p,d;const t=kh(),r=ee(g=>g.consultant.sessionMeta)||{},[i,n]=V.useState(null),[s,a]=V.useState(!1),o=async g=>{if(e){a(!0),t(ms(g)),n(null);try{const y=await wm(e,g);y!=null&&y.success&&(y!=null&&y.session)&&t(ms({region:y.session.region,currency:y.session.currency,locale:y.session.locale,industryPack:y.session.industryPack,industry:y.session.industry,scenario:y.session.scenario}))}finally{a(!1)}}},l=r.industryPack||"industry-neutral",c=r.region||"",h=r.currency||"",u=r.scenario||"";return f.jsx("div",{className:"px-4 sm:px-6 pt-2 pr-36 sm:pr-44",children:f.jsxs("div",{className:"max-w-7xl mx-auto flex flex-wrap items-center gap-2 text-xs",children:[f.jsx("span",{className:"text-[11px] uppercase tracking-wide text-gray-400",children:"Context"}),f.jsxs("div",{className:"relative",children:[f.jsx(fs,{icon:xw,label:"Industry",value:((p=bh.find(g=>g.id===l))==null?void 0:p.label)||l,onClick:()=>n(i==="industryPack"?null:"industryPack")}),f.jsx(ps,{open:i==="industryPack",onClose:()=>n(null),children:f.jsx("ul",{className:"text-xs",children:bh.map(g=>f.jsx("li",{children:f.jsxs("button",{type:"button",disabled:s,onClick:()=>o({industryPack:g.id}),className:"w-full text-left px-2.5 py-1.5 rounded-md hover:bg-gray-50 flex items-center justify-between gap-2",children:[g.label,l===g.id&&f.jsx(ys,{className:"w-3 h-3 text-emerald-600"})]})},g.id))})})]}),f.jsxs("div",{className:"relative",children:[f.jsx(fs,{icon:bw,label:"Region",value:c||"auto",onClick:()=>n(i==="region"?null:"region")}),f.jsx(ps,{open:i==="region",onClose:()=>n(null),children:f.jsx("ul",{className:"text-xs grid grid-cols-2 gap-0.5 min-w-[200px]",children:Vz.map(g=>f.jsx("li",{children:f.jsxs("button",{type:"button",disabled:s,onClick:()=>o({region:g.id}),className:"w-full text-left px-2.5 py-1.5 rounded-md hover:bg-gray-50 flex items-center justify-between",children:[f.jsx("span",{children:g.id}),f.jsx("span",{className:"text-gray-400",children:g.currency})]})},g.id))})})]}),f.jsxs("div",{className:"relative",children:[f.jsx(fs,{icon:Dw,label:"Currency",value:h||"USD",onClick:()=>n(i==="currency"?null:"currency")}),f.jsx(ps,{open:i==="currency",onClose:()=>n(null),children:f.jsx("ul",{className:"text-xs grid grid-cols-3 gap-0.5 min-w-[180px]",children:Gz.map(g=>f.jsx("li",{children:f.jsxs("button",{type:"button",disabled:s,onClick:()=>o({currency:g}),className:"w-full text-left px-2 py-1.5 rounded-md hover:bg-gray-50 flex items-center justify-between",children:[g,h===g&&f.jsx(ys,{className:"w-3 h-3 text-emerald-600"})]})},g))})})]}),f.jsxs("div",{className:"relative",children:[f.jsx(fs,{icon:jw,label:"Scenario",value:((d=lm.find(g=>g.id===u))==null?void 0:d.label)||u||"auto",onClick:()=>n(i==="scenario"?null:"scenario")}),f.jsx(ps,{open:i==="scenario",onClose:()=>n(null),children:f.jsx("ul",{className:"text-xs",children:lm.map(g=>f.jsx("li",{children:f.jsxs("button",{type:"button",disabled:s,onClick:()=>o({scenario:g.id||null}),className:"w-full text-left px-2.5 py-1.5 rounded-md hover:bg-gray-50 flex items-center justify-between gap-2",children:[g.label,u===g.id&&f.jsx(ys,{className:"w-3 h-3 text-emerald-600"})]})},g.id||"auto"))})})]}),s&&f.jsx("span",{className:"text-[11px] text-gray-400",children:"saving…"})]})})};
500u2.propTypes={sessionId:Y.string};const cm={MUST:"bg-red-50 text-red-700 border-red-200",SHOULD:"bg-sky-50 text-sky-700 border-sky-200",COULD:"bg-blue-50 text-blue-700 border-blue-200",WONT:"bg-gray-100 text-gray-600 border-gray-200"},hm={functional:"functional requirements",nonFunctional:"non-functional requirements",non_functional:"non-functional requirements",constraints:"constraints",assumptions:"assumptions",successMetrics:"success metrics",success_metrics:"success metrics",outOfScope:"out-of-scope items",out_of_scope:"out-of-scope items",acceptanceCriteria:"acceptance criteria",acceptance_criteria:"acceptance criteria",priority:"priority",owner:"owner",dependencies:"dependencies"},Xz=e=>e?hm[e]?hm[e]:String(e).replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").toLowerCase():"",um={draft:"bg-gray-100 text-gray-600",pending_review:"bg-blue-50 text-blue-700",approved:"bg-emerald-50 text-emerald-700",locked:"bg-purple-50 text-purple-700"};function d2({status:e}){const t={draft:"Draft",pending_review:"Pending review",approved:"Approved",locked:"Locked"}[e]||e;return f.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[11px] font-medium ${um[e]||um.draft}`,children:[e==="approved"&&f.jsx(je,{className:"w-3 h-3"}),e==="locked"&&f.jsx(ko,{className:"w-3 h-3"}),t]})}d2.propTypes={status:Y.string};function p2({score:e}){const t=Math.max(0,Math.min(100,e||0)),r=t>=75?"bg-emerald-500":t>=50?"bg-sky-500":"bg-gray-300";return f.jsx("div",{className:"w-full",children:f.jsx("div",{className:"h-1.5 rounded-full bg-gray-100 overflow-hidden",children:f.jsx("div",{className:`h-full ${r}`,style:{width:`${t}%`}})})})}p2.propTypes={score:Y.number};function f2({item:e,index:t,onChange:r,onDelete:i,locked:n}){const[s,a]=V.useState(!1),o=Array.isArray(e.acceptanceCriteria||e.acceptance_criteria)?e.acceptanceCriteria||e.acceptance_criteria:[],l=Array.isArray(e.dependencies)?e.dependencies:[],c=d=>r(t,{...e,...d}),h=(d,g)=>{const y=[...o];y[d]=g,c({acceptanceCriteria:y})},u=()=>c({acceptanceCriteria:[...o,""]}),p=d=>{const g=o.filter((y,C)=>C!==d);c({acceptanceCriteria:g})};return f.jsxs("div",{className:`rounded-xl border bg-white shadow-sm p-3 ${e.outOfScope||e.out_of_scope?"opacity-60":""} ${n?"pointer-events-none opacity-70":""}`,children:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[f.jsx("span",{className:"text-[11px] font-mono text-gray-500",children:e.id||`FR-${String(t+1).padStart(3,"0")}`}),e.priority&&f.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-bold border ${cm[e.priority]||cm.COULD}`,children:e.priority}),e.risk&&f.jsxs("span",{className:"text-[10px] uppercase tracking-wide text-gray-400",children:["risk: ",e.risk]}),(e.outOfScope||e.out_of_scope)&&f.jsx("span",{className:"text-[10px] uppercase tracking-wide text-gray-400",children:"out of scope"})]}),f.jsx("input",{value:e.title||"",onChange:d=>c({title:d.target.value}),disabled:n,placeholder:"Requirement title",className:"mt-1 w-full text-sm font-semibold text-gray-900 bg-transparent border-0 outline-none focus:ring-0 p-0"}),s&&f.jsx("textarea",{value:e.description||"",onChange:d=>c({description:d.target.value}),disabled:n,placeholder:"Description / context",rows:2,className:"mt-1 w-full text-[13px] text-gray-700 bg-gray-50 border border-gray-100 rounded-lg p-2 focus:outline-none focus:ring-1 focus:ring-[var(--color-brand,#00C7FD)]/40"})]}),f.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[f.jsx("button",{type:"button",onClick:()=>a(d=>!d),className:"p-1 text-gray-400 hover:text-gray-600 rounded",title:s?"Collapse":"Edit details",children:f.jsx(li,{className:"w-3.5 h-3.5"})}),!n&&f.jsx("button",{type:"button",onClick:()=>i(t),className:"p-1 text-gray-400 hover:text-red-600 rounded",title:"Delete requirement",children:f.jsx(Cw,{className:"w-3.5 h-3.5"})})]})]}),s&&f.jsxs("div",{className:"mt-2 space-y-2",children:[f.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[f.jsx("select",{value:e.priority||"SHOULD",onChange:d=>c({priority:d.target.value}),disabled:n,className:"text-[12px] border border-gray-200 rounded px-1.5 py-0.5 bg-white",children:["MUST","SHOULD","COULD","WONT"].map(d=>f.jsx("option",{value:d,children:d},d))}),f.jsxs("select",{value:e.risk||"",onChange:d=>c({risk:d.target.value||null}),disabled:n,className:"text-[12px] border border-gray-200 rounded px-1.5 py-0.5 bg-white",children:[f.jsx("option",{value:"",children:"risk: -"}),f.jsx("option",{value:"low",children:"risk: low"}),f.jsx("option",{value:"medium",children:"risk: medium"}),f.jsx("option",{value:"high",children:"risk: high"})]}),f.jsxs("select",{value:e.testability||"",onChange:d=>c({testability:d.target.value||null}),disabled:n,className:"text-[12px] border border-gray-200 rounded px-1.5 py-0.5 bg-white",children:[f.jsx("option",{value:"",children:"testability: -"}),f.jsx("option",{value:"automated",children:"automated"}),f.jsx("option",{value:"manual",children:"manual"}),f.jsx("option",{value:"observational",children:"observational"})]}),f.jsxs("label",{className:"inline-flex items-center gap-1 text-[12px] text-gray-600",children:[f.jsx("input",{type:"checkbox",checked:!!(e.outOfScope||e.out_of_scope),onChange:d=>c({outOfScope:d.target.checked}),disabled:n,className:"rounded"}),"out of scope"]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[f.jsx("input",{value:e.owner||"",onChange:d=>c({owner:d.target.value}),disabled:n,placeholder:"Owner (e.g. Platform Engineering)",className:"text-[12px] border border-gray-200 rounded px-2 py-1 bg-white"}),f.jsx("input",{value:e.source||"",onChange:d=>c({source:d.target.value}),disabled:n,placeholder:"Source (discovery / document:foo.pdf)",className:"text-[12px] border border-gray-200 rounded px-2 py-1 bg-white"})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-gray-500",children:"Acceptance criteria"}),!n&&f.jsxs("button",{type:"button",onClick:u,className:"inline-flex items-center gap-1 text-[11px] text-[var(--color-brand,#00C7FD)]",children:[f.jsx(Bm,{className:"w-3 h-3"})," Add"]})]}),o.length===0&&f.jsx("div",{className:"text-[12px] text-gray-400 italic",children:"No criteria yet - at least one is required for testability."}),o.map((d,g)=>f.jsxs("div",{className:"flex items-start gap-1 mt-1",children:[f.jsx("textarea",{value:d,onChange:y=>h(g,y.target.value),disabled:n,rows:1,placeholder:"Given … When … Then …",className:"flex-1 text-[12px] border border-gray-200 rounded px-2 py-1 bg-white"}),!n&&f.jsx("button",{type:"button",onClick:()=>p(g),className:"p-1 text-gray-300 hover:text-red-600",children:f.jsx(pi,{className:"w-3 h-3"})})]},g))]}),l.length>0&&f.jsxs("div",{className:"text-[11px] text-gray-500",children:["Depends on:"," ",l.map((d,g)=>f.jsx("span",{className:"inline-block ml-1 px-1.5 py-0.5 rounded bg-gray-100 font-mono",children:d},g))]})]})]})}
500f2.propTypes={item:Y.object.isRequired,index:Y.number.isRequired,onChange:Y.func.isRequired,onDelete:Y.func.isRequired,locked:Y.bool};const g2=({sessionId:e,onRefresh:t})=>{var q,_,ct;const r=ee(X=>{var F;return((F=X.consultant)==null?void 0:F.artifacts)||{}}),[i,n]=V.useState(null),[s,a]=V.useState(!1),[o,l]=V.useState(null),[c,h]=V.useState(null),[u,p]=V.useState(null),[d,g]=V.useState(!1),[y,C]=V.useState(null),x=async()=>{if(!e)return;const X=await wh(e);X!=null&&X.success&&n(X.artifacts||{})};V.useEffect(()=>{x()},[e,(q=r.requirements)==null?void 0:q.version]);const w=i==null?void 0:i.requirementsArtifact,k=(_=i==null?void 0:i.quality)==null?void 0:_.requirements,v=(w==null?void 0:w.status)||"draft",T=v==="locked",L=V.useMemo(()=>((w==null?void 0:w.functional)||[]).map((X,F)=>({...X,id:X.id||`FR-${String(F+1).padStart(3,"0")}`})),[w]),D=()=>{l({...w||{functional:[],nonFunctional:[],constraints:[],assumptions:[],successMetrics:[],outOfScope:[]},functional:L.length?[...L]:[]}),a(!0),p(null)},M=()=>{l(null),a(!1),p(null)},W=(X,F)=>{l(ht=>{const pt=[...ht.functional||[]];return pt[X]=F,{...ht,functional:pt}})},E=X=>{l(F=>({...F,functional:(F.functional||[]).filter((ht,pt)=>pt!==X)}))},N=()=>{l(X=>{var F;return{...X,functional:[...X.functional||[],{id:`FR-${String((((F=X.functional)==null?void 0:F.length)||0)+1).padStart(3,"0")}`,title:"",priority:"SHOULD",acceptanceCriteria:[],source:"user-edit"}]}})},z=async()=>{var F;h("save"),p(null);const X=await sw(e,o,"workbench-edit");if(h(null),!(X!=null&&X.success)){p(((F=X==null?void 0:X.error)==null?void 0:F.detail)||(X==null?void 0:X.error)||"Save failed");return}a(!1),l(null),await x(),t==null||t()},O=async X=>{var ht;h(X),p(null);const F=await nw(e,"requirements",X);if(h(null),!(F!=null&&F.success)){p(((ht=F==null?void 0:F.error)==null?void 0:ht.detail)||"Status update failed");return}await x(),t==null||t()},I=V.useMemo(()=>{var X;return(((X=i==null?void 0:i.history)==null?void 0:X.requirements)||[]).slice().reverse()},[(ct=i==null?void 0:i.history)==null?void 0:ct.requirements]),j=async X=>{var ht;if(T)return;h("restore"),p(null);const F=await aw(e,"requirements",X);if(h(null),!(F!=null&&F.success)){p(((ht=F==null?void 0:F.error)==null?void 0:ht.detail)||"Restore failed");return}C(null),await x(),t==null||t()},A=X=>{var at;const F=(((at=X==null?void 0:X.data)==null?void 0:at.functional)||[]).map(dt=>({id:dt.id,title:dt.title||"",priority:dt.priority||"SHOULD"})),ht=L.map(dt=>({id:dt.id,title:dt.title||"",priority:dt.priority||"SHOULD"})),pt=new Set(F.map(dt=>dt.id)),wt=new Set(ht.map(dt=>dt.id)),P=ht.filter(dt=>!pt.has(dt.id)),mt=F.filter(dt=>!wt.has(dt.id)),st=ht.filter(dt=>{const bt=F.find(vt=>vt.id===dt.id);return bt&&(bt.title!==dt.title||bt.priority!==dt.priority)});return{added:P,removed:mt,changed:st,oldCount:F.length,newCount:ht.length}};if(!w)return f.jsx("div",{className:"rounded-2xl border border-dashed border-gray-200 bg-white p-4 text-sm text-gray-500",children:"Requirements will appear here once the consultant has gathered enough context. You can also paste an RFP or describe goals to seed them."});const R=s?(o==null?void 0:o.functional)||[]:L,H=((k==null?void 0:k.missingFields)||[]).map(Xz);return f.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white shadow-sm flex flex-col max-h-[55vh] overflow-hidden",children:[f.jsxs("div",{className:"px-4 py-3 border-b border-gray-100 flex items-center justify-between gap-2 flex-wrap bg-white sticky top-0 z-10",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-xs uppercase tracking-wide text-gray-500 font-semibold",children:"Requirements"}),f.jsx(d2,{status:v}),(k==null?void 0:k.score)!==void 0&&f.jsxs("span",{className:"text-[11px] text-gray-500",children:[Math.round(k.score),"% complete"]})]}),(k==null?void 0:k.score)!==void 0&&f.jsx("div",{className:"mt-1 w-48",children:f.jsx(p2,{score:k.score})}),H.length>0&&f.jsxs("div",{className:"mt-1 text-[11px] text-sky-700 inline-flex items-start gap-1",children:[f.jsx(Sm,{className:"w-3 h-3 mt-0.5 shrink-0"}),f.jsxs("span",{children:["Still need: ",H.slice(0,3).join(", "),H.length>3?` and ${H.length-3} more`:""]})]})]}),f.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[!s&&!T&&f.jsxs("button",{type:"button",onClick:D,className:"inline-flex items-center gap-1 px-2.5 py-1 text-xs rounded-lg border border-gray-300 hover:bg-gray-50",children:[f.jsx(li,{className:"w-3 h-3"})," Edit"]}),!s&&v!=="approved"&&v!=="locked"&&f.jsxs("button",{type:"button",onClick:()=>O("approved"),disabled:c!==null,className:"inline-flex items-center gap-1 px-2.5 py-1 text-xs rounded-lg bg-emerald-600 text-white hover:bg-emerald-700 disabled:opacity-50",children:[f.jsx(je,{className:"w-3 h-3"})," Approve"]}),!s&&v==="approved"&&f.jsxs("button",{type:"button",onClick:()=>O("locked"),disabled:c!==null,className:"inline-flex items-center gap-1 px-2.5 py-1 text-xs rounded-lg bg-purple-600 text-white hover:bg-purple-700 disabled:opacity-50",children:[f.jsx(ko,{className:"w-3 h-3"})," Lock"]}),!s&&(v==="approved"||v==="locked")&&f.jsxs("button",{type:"button",onClick:()=>O(v==="locked"?"approved":"pending_review"),disabled:c!==null,className:"inline-flex items-center gap-1 px-2.5 py-1 text-xs rounded-lg border border-gray-300 hover:bg-gray-50",children:[f.jsx(mc,{className:"w-3 h-3"})," Reopen"]}),s&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button",onClick:M,disabled:c!==null,className:"inline-flex items-center gap-1 px-2.5 py-1 text-xs rounded-lg border border-gray-300 hover:bg-gray-50",children:[f.jsx(pi,{className:"w-3 h-3"})," Cancel"]}),f.jsxs("button",{type:"button",onClick:z,disabled:c!==null,className:"inline-flex items-center gap-1 px-2.5 py-1 text-xs rounded-lg bg-[var(--color-brand,#00C7FD)] text-white hover:opacity-90 disabled:opacity-50",children:[f.jsx(vw,{className:"w-3 h-3"})," Save"]})]})]})]}),u&&f.jsx("div",{className:"mx-4 mt-3 px-3 py-2 rounded-lg bg-red-50 border border-red-200 text-[12px] text-red-700",children:typeof u=="string"?u:"Something went wrong. Please try again."}),f.jsxs("div",{className:"p-3 space-y-2 overflow-y-auto flex-1 min-h-0",children:[R.length===0&&!s&&f.jsx("div",{className:"text-sm text-gray-500",children:"No functional requirements captured yet. Click Edit to add the first one, or continue the chat - the consultant will fill them in."}),R.map((X,F)=>f.jsx(f2,{item:X,index:F,onChange:s?W:()=>{},onDelete:s?E:()=>{},locked:!s},X.id||F)),s&&f.jsxs("button",{type:"button",onClick:N,className:"w-full inline-flex items-center justify-center gap-1.5 py-2 rounded-xl border-2 border-dashed border-gray-200 text-sm text-gray-500 hover:border-[var(--color-brand,#00C7FD)] hover:text-[var(--color-brand,#00C7FD)]",children:[f.jsx(Bm,{className:"w-3.5 h-3.5"})," Add requirement"]}),!s&&f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 mt-2",children:[["Constraints",w.constraints||[]],["Assumptions",w.assumptions||[]],["Out of scope",w.outOfScope||w.out_of_scope||[]]].map(([X,F])=>f.jsxs("div",{className:"rounded-lg bg-gray-50 border border-gray-100 p-2",children:[f.jsx("div",{className:"text-[10px] uppercase tracking-wide text-gray-500 font-semibold mb-1",children:X}),F.length===0?f.jsx("div",{className:"text-[12px] text-gray-400 italic",children:"-"}):f.jsx("ul",{className:"text-[12px] text-gray-700 list-disc list-inside space-y-0.5",children:F.slice(0,5).map((ht,pt)=>f.jsx("li",{children:ht},pt))})]},X))})]}),!s&&I.length>1&&f.jsxs("div",{className:"border-t border-gray-100 shrink-0",children:[f.jsxs("button",{type:"button",onClick:()=>g(X=>
500!X),className:"w-full px-4 py-2 text-left text-[11px] uppercase tracking-wide text-gray-500 font-semibold hover:bg-gray-50 flex items-center justify-between",children:[f.jsxs("span",{children:["Earlier versions (",I.length,")"]}),f.jsx("span",{className:"text-gray-400",children:d?"▾":"▸"})]}),d&&f.jsx("div",{className:"px-4 pb-3 space-y-1.5 max-h-60 overflow-y-auto",children:I.map((X,F)=>{const ht=F===0,pt=A(X),wt=y===X.version;return f.jsxs("div",{className:`rounded-lg border p-2 text-[12px] ${wt?"border-[var(--color-brand,#00C7FD)] bg-cyan-50/40":"border-gray-100 bg-gray-50"}`,children:[f.jsxs("div",{className:"flex items-center justify-between gap-2 flex-wrap",children:[f.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[f.jsx("span",{className:"text-[11px] px-1.5 py-0.5 rounded bg-white border border-gray-200",children:ht?"Current":`Version ${X.version}`}),f.jsx("span",{className:"text-gray-500 truncate",children:X.ts?new Date(X.ts).toLocaleString():"-"})]}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[!ht&&f.jsx("button",{type:"button",onClick:()=>C(wt?null:X.version),className:"px-2 py-0.5 text-[11px] rounded border border-gray-300 hover:bg-white",children:wt?"Hide changes":"Compare"}),!ht&&!T&&f.jsxs("button",{type:"button",onClick:()=>j(X.version),disabled:c!==null,className:"inline-flex items-center gap-1 px-2 py-0.5 text-[11px] rounded bg-[var(--color-brand,#00C7FD)] text-white hover:opacity-90 disabled:opacity-50",children:[f.jsx(mc,{className:"w-3 h-3"})," Restore"]})]})]}),wt&&f.jsxs("div",{className:"mt-2 pt-2 border-t border-gray-200 grid grid-cols-3 gap-2",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"text-[10px] text-gray-500 uppercase tracking-wide",children:["Added since (",pt.added.length,")"]}),pt.added.length===0?f.jsx("div",{className:"text-gray-400 italic",children:"none"}):f.jsxs("ul",{className:"text-[11px] text-emerald-700 space-y-0.5",children:[pt.added.slice(0,5).map(P=>f.jsxs("li",{className:"truncate",children:["+ ",P.title||P.id]},P.id)),pt.added.length>5&&f.jsxs("li",{className:"text-gray-400",children:["and ",pt.added.length-5," more"]})]})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"text-[10px] text-gray-500 uppercase tracking-wide",children:["Removed since (",pt.removed.length,")"]}),pt.removed.length===0?f.jsx("div",{className:"text-gray-400 italic",children:"none"}):f.jsxs("ul",{className:"text-[11px] text-red-700 space-y-0.5",children:[pt.removed.slice(0,5).map(P=>f.jsxs("li",{className:"truncate",children:["− ",P.title||P.id]},P.id)),pt.removed.length>5&&f.jsxs("li",{className:"text-gray-400",children:["and ",pt.removed.length-5," more"]})]})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"text-[10px] text-gray-500 uppercase tracking-wide",children:["Edited (",pt.changed.length,")"]}),pt.changed.length===0?f.jsx("div",{className:"text-gray-400 italic",children:"none"}):f.jsxs("ul",{className:"text-[11px] text-sky-700 space-y-0.5",children:[pt.changed.slice(0,5).map(P=>f.jsxs("li",{className:"truncate",children:["• ",P.title||P.id]},P.id)),pt.changed.length>5&&f.jsxs("li",{className:"text-gray-400",children:["and ",pt.changed.length-5," more"]})]})]}),f.jsxs("div",{className:"col-span-3 text-[10px] text-gray-500 mt-1",children:["Then: ",pt.oldCount," requirements · Now:"," ",pt.newCount]})]})]},X.version)})})]}),v==="approved"&&f.jsxs("div",{className:"px-4 py-2 border-t border-gray-100 bg-emerald-50/50 flex items-center gap-2 text-[12px] text-emerald-700 shrink-0",children:[f.jsx(Ri,{className:"w-3.5 h-3.5"}),"Requirements approved - the consultant will treat them as fixed in downstream phases."]})]})};g2.propTypes={sessionId:Y.string,onRefresh:Y.func};const m2=({sessionId:e,isAuthenticated:t,version:r,plannerEnabled:i})=>{const[n,s]=V.useState(!1),a=ee(l=>{var c;return((c=l.consultant)==null?void 0:c.artifacts)||{}});V.useEffect(()=>{if(!n)return;const l=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=l}},[n]);const o=["discovery","strategy","requirements","architecture","compliance","boq"].filter(l=>{var c;return(c=a[l])==null?void 0:c.version}).length;return e?f.jsxs("div",{className:"lg:hidden",children:[f.jsxs("button",{type:"button",onClick:()=>s(!0),className:"fixed bottom-20 right-4 z-30 inline-flex items-center gap-2 px-3.5 py-2 rounded-full bg-gray-900 text-white shadow-lg hover:bg-gray-800",children:[f.jsx(Ww,{className:"w-4 h-4"}),f.jsx("span",{className:"text-xs font-medium",children:"Report"}),o>0&&f.jsx("span",{className:"ml-0.5 inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full text-[10px] font-bold bg-[var(--color-brand,#00C7FD)] text-white",children:o})]}),f.jsxs("div",{className:`fixed inset-0 z-40 transition-opacity ${n?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"}`,"aria-hidden":!n,children:[f.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:()=>s(!1)}),f.jsxs("div",{className:`absolute inset-x-0 bottom-0 top-12 bg-[#fafaf9] rounded-t-2xl shadow-2xl transform transition-transform ${n?"translate-y-0":"translate-y-full"}`,children:[f.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-200 bg-white rounded-t-2xl",children:[f.jsx("div",{className:"text-sm font-semibold text-gray-900",children:"Generated Report"}),f.jsx("button",{type:"button",onClick:()=>s(!1),className:"p-1.5 text-gray-500 hover:text-gray-900",children:f.jsx(pi,{className:"w-4 h-4"})})]}),f.jsx("div",{className:"h-[calc(100%-3rem)] overflow-y-auto px-3 py-3",children:f.jsx(md,{sessionId:e,isAuthenticated:t,version:r,plannerEnabled:i})})]})]})]}):null};
500m2.propTypes={sessionId:Y.string,isAuthenticated:Y.bool,version:Y.number,plannerEnabled:Y.bool};const Qz={discover:"discovery",strategy:"strategy",requirements:"requirementsArtifact",architecture:"architecture"},y2=new Set(["single","multi","scale","number","text","rank"]);function dm(e){if(typeof e!="string")return null;const t=e.trim();if(!(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")))return null;try{return JSON.parse(t)}catch{return null}}function x2(e){const t=String(e||"").trim();if(!t)return[];const r=t.includes("|")?"|":";";return t.split(r).map(i=>i.replace(/\s+/g," ").replace(/[.;:\-\s]+$/g,"").trim()).filter(i=>i.length>0&&i.length<=160)}function Kz(e){if(typeof e!="string")return null;const r=e.replace(/^\s*(?:[-*]\s*)?\d+[.)]\s*/,"").trim().replace(/^[*_`]+|[*_`]+$/g,"").trim().match(/^(.+?\?)\s*\[\s*(single|multi|scale|number|text|rank)([^\]]*)\]\s*(.*)$/i);if(!r)return null;const i=r[1].replace(/\s+/g," ").trim(),n=r[2].toLowerCase(),s=`${n}${r[3]||""}`.toLowerCase(),a=(r[4]||"").trim(),o={question:i,kind:n,required:!0};if(["single","multi","rank"].includes(n)){const l=x2(a);l.length&&(o.choices=l)}else if(n==="scale"){const l=s.match(/(-?\d+(?:\.\d+)?)\s*[-–]\s*(-?\d+(?:\.\d+)?)/);o.min=l?Number(l[1]):1,o.max=l?Number(l[2]):5,o.step=1,a&&(o.helpText=a)}else a&&(o.helpText=a);return o}function pm(e){const t=Kz(e);if(t)return t;if(typeof e!="string"||!e.includes("|"))return null;const i=e.replace(/^\s*(?:[-*]\s*)?\d+[.)]\s*/,"").trim().replace(/^[*_`]+|[*_`]+$/g,"").trim().split("|").map(c=>c.trim());if(i.length<2)return null;const n=i[0].replace(/\s+/g," ").trim();if(!n.endsWith("?")||n.length<10)return null;const s=i[1].toLowerCase(),a=Array.from(y2).find(c=>s.startsWith(c));if(!a)return null;const o=i.slice(2).join(" | ").trim(),l={question:n,kind:a,required:!0};if(["single","multi","rank"].includes(a)&&o){const c=x2(o);c.length&&(l.choices=c)}else if(a==="scale"){const c=s.match(/(-?\d+(?:\.\d+)?)\s*[-–]\s*(-?\d+(?:\.\d+)?)/);l.min=c?Number(c[1]):1,l.max=c?Number(c[2]):5,l.step=1,o&&(l.helpText=o)}else o&&(l.helpText=o);return l}function Zz(e,t){const r=typeof e=="string"?e.trim():String((e==null?void 0:e.text)||(e==null?void 0:e.label)||(e==null?void 0:e.value)||"").trim();return r?{text:r,kind:(e==null?void 0:e.kind)||"question",value:(e==null?void 0:e.value)||r,prompt:(e==null?void 0:e.prompt)||`For this question, use: ${r}. Question: ${t}`}:null}function gs(e,t,r){if(!e)return null;if(typeof e=="string"){const c=dm(e);if(c)return gs(c,t,r);const h=pm(e);if(h)return gs(h,t,r);const u=e.trim();return u?{id:`${r}:open-question:${t}`,label:`Question ${t+1}`,question:u,kind:"text",choices:[],required:!0,manual:{placeholder:"Type your answer..."}}:null}if(typeof e!="object")return null;const i=e.question||e.text||e.title||e.message;if(typeof i!="string")return null;const n=dm(i);if(n)return gs({...e,...n},t,r);const s=pm(i);if(s)return gs({...e,...s},t,r);const a=i.trim();if(!a)return null;const o=String(e.kind||e.inputType||"").toLowerCase(),l=Array.isArray(e.choices)?e.choices.map(c=>Zz(c,a)).filter(Boolean):[];return{...e,id:e.id||`${r}:open-question:${t}`,label:e.label||`Question ${t+1}`,question:a,kind:y2.has(o)?o:l.length?"single":"text",choices:l,required:e.required!==!1,manual:e.manual||{placeholder:e.placeholder||"Type your answer..."}}}function Jz(e){var i,n;if(!e||typeof e!="object")return null;const r=[Qz[e.phase],"discovery","strategy","requirementsArtifact","architecture"].filter((s,a,o)=>s&&o.indexOf(s)===a);for(const s of r){const a=e[s];if(!a||typeof a!="object")continue;const o=a.openQuestions||a.open_questions||[];if(!Array.isArray(o)||o.length===0)continue;const l=o.map((h,u)=>gs(h,u,s)).filter(Boolean).slice(0,8);if(l.length===0)continue;const c=l.map(h=>h.question).join("|").slice(0,80);return{id:`persisted-open-question:${s}:${c}`,source:"open_questions",title:"Consultant checkpoint",message:l.length===1?"I have one open question. Answer it here and I will fold it into the design.":`I have ${l.length} open questions. Answer them here and I will fold them into the design.`,reason:"open_question",questions:l,choices:((n=(i=l[0])==null?void 0:i.choices)==null?void 0:n.slice(0,4))||[],manual:{placeholder:"Type your answer..."}}}return null}const fm={"rag.search_chunks":"Searching project context","rag.search":"Searching project context","pricing.estimate":"Pricing the BOQ","pricing.lookup":"Pricing the BOQ","compliance.check":"Running compliance checks","web.search":"Searching the web"},t7={discovery:"Discovery consultant",strategy:"Strategy principal",requirements:"Requirements analyst",architect:"Solution architect",boq:"Cost consultant",compliance:"Risk reviewer",reviewer:"Executive reviewer",supervisor:"Consulting lead"},e7={discover:"the engagement brief",strategy:"the transformation strategy",requirements:"the requirement set",architecture:"the solution blueprint",boq:"the investment case",compliance:"the risk view",review:"the executive pack",complete:"the final pack"},r7={discovery:"the brief",strategy:"the strategy",org:"delivery readiness",research:"the evidence review",domain:"the business model",architecture:"the solution blueprint",f
500inops:"the investment case",compliance:"the risk view",reviewer:"quality review",synth:"the final pack"},i7=e=>e?fm[e]?fm[e]:(e.split(".").pop()||e).replace(/_/g," "):"Working",n7=()=>{const e=kh(),t=Ch(),r=T2(),[i]=_2(),n=ee(m=>m.login.userInfo),s=!!(n&&n.success),a=ee(m=>{var $;return($=m.consultant)==null?void 0:$.sessionId}),o=ee(m=>{var $;return($=m.consultant)==null?void 0:$.messages}),l=ee(m=>{var $;return($=m.consultant)==null?void 0:$.currentRoute}),c=ee(m=>{var $,U;return(U=($=m.consultant)==null?void 0:$.artifacts)==null?void 0:U.plannerRuntime}),h=ee(m=>{var $;return!!(($=m.consultant)!=null&&$.streaming)}),u=ee(m=>{var $;return!!(($=m.consultant)!=null&&$.composerLocked)}),p=ee(m=>{var $;return($=m.consultant)==null?void 0:$.error}),d=ee(m=>{var $,U;return(U=($=m.consultant)==null?void 0:$.artifacts)==null?void 0:U.lastJump}),g=ee(m=>{var $,U;return(U=($=m.consultant)==null?void 0:$.artifacts)==null?void 0:U.decisionPrompt}),y=ee(m=>{var $,U,tt;return(tt=(U=($=m.consultant)==null?void 0:$.artifacts)==null?void 0:U.quality)==null?void 0:tt.requirements}),C=ee(m=>{var $,U,tt;return(tt=(U=($=m.consultant)==null?void 0:$.artifacts)==null?void 0:U.requirements)==null?void 0:tt.version}),[x,w]=V.useState(null),[k,v]=V.useState(!1),[T,L]=V.useState(0),[D,M]=V.useState(!1),[W,E]=V.useState(()=>typeof window>"u"?!1:window.localStorage.getItem("consultant_chat_focus")==="1"),[N,z]=V.useState([]),[O,I]=V.useState(null),[j,A]=V.useState(null),[R,H]=V.useState(null),q=V.useRef(null),_=V.useRef(0),ct=["1","true","yes"].includes((i.get("planner")||"").toLowerCase());V.useEffect(()=>(e(L2()),e(A2()),()=>{e(F2()),e(E2())}),[e]),V.useEffect(()=>{const m=()=>v(window.scrollY>80);return window.addEventListener("scroll",m,{passive:!0}),()=>window.removeEventListener("scroll",m)},[]),V.useEffect(()=>{typeof window>"u"||window.localStorage.setItem("consultant_chat_focus",W?"1":"0")},[W]),V.useEffect(()=>{if(!s)return;const m=N2();ow(m).catch(()=>{})},[s]),V.useEffect(()=>{let m=!1;return(async()=>{var $,U,tt,J,ft,B,Z,ut,lt,ot,xt,yt,Lt,_t,jt,Pt,Ot,ne,Qr,or;try{const _e=r.sessionId||i.get("session");if(_e){const[Cr,fe]=await Promise.all([lw(_e),wh(_e)]);if(m)return;if(Cr!=null&&Cr.success&&Cr.session)e(bd(Cr.session));else{w("Could not load session.");return}if(fe!=null&&fe.success){const C2=fe.artifacts||{};e(mm(($=fe.artifacts)==null?void 0:$.quality)),e(ym((U=fe.artifacts)==null?void 0:U.readiness)),e(xm(((tt=fe.artifacts)==null?void 0:tt.suggestionChips)||[])),e(bm({mermaidSrc:(J=fe.artifacts)==null?void 0:J.mermaidSrc,brandedArchDataUri:(ft=fe.artifacts)==null?void 0:ft.brandedArchDataUri,brandedArchUrl:(B=fe.artifacts)==null?void 0:B.brandedArchUrl,plantumlSrc:(Z=fe.artifacts)==null?void 0:Z.plantumlSrc,d2Src:(ut=fe.artifacts)==null?void 0:ut.d2Src,architectureArtifact:(lt=fe.artifacts)==null?void 0:lt.architecture,strategy:(ot=fe.artifacts)==null?void 0:ot.strategy,boq:(xt=fe.artifacts)==null?void 0:xt.boq,prd:(yt=fe.artifacts)==null?void 0:yt.prd,requirements:((Lt=fe.artifacts)==null?void 0:Lt.requirementsArtifact)||((_t=fe.artifacts)==null?void 0:_t.requirements),compliance:((jt=fe.artifacts)==null?void 0:jt.complianceArtifact)||((Pt=fe.artifacts)==null?void 0:Pt.compliance),downloadAvailable:fe.downloadAvailable}));const yd=Jz(C2);yd&&e(Cd(yd)),L(k2=>k2+1)}return}const Rn=((navigator==null?void 0:navigator.language)||"en").toLowerCase().split("-").filter(Boolean),Yi=(Rn[0]||"en").slice(0,2),qt=Rn.slice(1).find(Cr=>/^[a-z]{2}$/.test(Cr)),oe=/^[a-z]{2}$/.test(Yi)?qt?`${Yi}-${qt.toUpperCase()}`:Yi:"en",lr=(i.get("currency")||"").toUpperCase(),cr=(i.get("region")||"").toUpperCase(),Ir={locale:oe,region:"US",currency:"USD",industryPack:"industry-neutral"};/^[A-Z]{3}$/.test(lr)&&(Ir.currency=lr),/^[A-Z]{2}$/.test(cr)&&(Ir.region=cr);const He=await cw(Ir);if(m)return;if(He!=null&&He.success&&He.session){e(bd(He.session));const Cr=((Ot=He.session)==null?void 0:Ot._id)||((ne=He.session)==null?void 0:ne.id)||((Qr=He.session)==null?void 0:Qr.sessionId);if(Cr){const fe=i.toString();t(`/consultant/${Cr}${fe?`?${fe}`:""}`,{replace:!0})}}else w(((or=He==null?void 0:He.error)==null?void 0:or.detail)||(He==null?void 0:He.error)||"Failed to create session.")}catch(_e){m||w(String((_e==null?void 0:_e.message)||_e))}})(),()=>{m=!0,e(kd())}},[r.sessionId]);const X=V.useCallback(async m=>{var ne,Qr,or,_e,tl,Rn,Yi;const $=typeof m=="object"&&m!==null?m.action:null;if(!(typeof m=="object"&&m!==null?!!m.autoContinue:!1)&&!$&&(_.current=0,H(null)),$==="confirm_cost"){if(!a||h)return;A(null),I({message:"Confirming the investment case...",elapsedSec:0});const qt=await km(a,!0);if(I(null),!(qt!=null&&qt.success)){A(((ne=qt==null?void 0:qt.error)==null?void 0:ne.detail)||((Qr=qt==null?void 0:qt.error)==null?void 0:Qr.message)||"Could not confirm the investment case. Review the pricing and try again.");return}L(oe=>oe+1),H({phase:"compliance",label:"Risk Review",prompt:"Proceed to compliance and prepare the risk review from the confirmed investment case."});return}const tt=typeof m=="object"&&m!==null?m.content:m,J=typeof m=="object"&&m!==null?m.displayContent:null,ft=typeof m=="object"&&m!==null?!!m.hideInChat:!1,B=String(tt||"").trim();if(!a||h||!B)return;A(null),ft||e(M2({content:J||B,rawContent:B,generated:!!J})),e($2()),e(j2()),I({message:"Starting consultant step...",elapsedSec:0});const Z=hw({sessionId:a,content:B,planner:ct});q.current=Z.cancel;let ut="",lt=!1;const ot=new Map;let xt=!1,yt=!1;z([]);const Lt=()=>{if(lt=!1,!ut)return;const qt=ut;ut="",e(H2({text:qt}))},_t=()=>{lt||(lt=!0,typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame(Lt):setTimeout(Lt,16))},jt=()=>{if(xt=!1,!ot.size)return;const qt=Array.from(ot.values());ot.clear(),qt.forEach(oe=>{e(U2(oe||{}));const lr=oe==null?void 0:oe.argsAccum;if(lr){const cr=kv(lr,"thoughtProcess");cr&&e(Y2({text:cr}))}})},Pt=()=>{xt||(xt=!0,typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame(jt):setTimeout(jt,33))},Ot=()=>{Lt(),jt()};try{for await(const qt of Z.iterator)switch(qt.event){case"plan":e(z2(qt.data));break;case"route":e(q2(qt.data));break;case"token":ut+=((or=qt.data)==null?void 0:or.text)||"",_t();break;case"status":I(qt.data||null);break;case"tool_call":Ot(),z(oe=>{var lr,cr,Ir;return[...oe,{id:((lr=qt.data)==null?void 0:lr.callId)||`${(cr=qt.data)==null?void 0:cr.name}-${Date.now()}`,name:((Ir=qt.data)==null?void 0:Ir.name)||"tool"}]});break;case"tool_result":Ot(),z(oe=>oe.filter(lr=>{var cr,Ir;return lr.id!==((cr=qt.data)==null?void 0:cr.callId)&&lr.name!==((Ir=qt.data)==null?void 0:Ir.name)}));break;case"artifact":Ot(),e(R2(qt.data)),L(oe=>oe+1);break;case"artifact_partial":{const oe=((_e=qt.data)==null?void 0:_e.attr)||`partial-${ot.size}`;ot.set(oe,qt.data||{}),Pt();break}case"context_update":Ot(),e(ms(qt.data||{}));break;case"plan_draft":Ot(),e(O2(qt.data)),L(oe=>oe+1);break;case"node_started":Ot(),e(P2(qt.data)),L(oe=>oe+1);break;case"node_done":Ot(),e(D2(qt.data)),L(oe=>oe+1);break;case"confidence_update":Ot(),e(I2(qt.data)),L(oe=>oe+1);break;case"decision_recorded":case"finding_recorded":case"review_verdict":case"plan_blocked":case"plan_completed":Ot(),L(oe=>oe+1);break;case"decision_prompt":Ot(),e(Cd(qt.data));break;case"done":Ot(),yt=!0,z([]),I(null),e(el(qt.data)),L(oe=>oe+1),(Rn=(tl=qt.data)==null?void 0:tl.autoContinue)!=null&&Rn.prompt&&!((Yi=qt.data)!=null&&Yi.modelError)&&H(qt.data.autoContinue);break;case"error":Ot(),yt=!0,z([]),I(null),e(wd(qt.data));break;default:break}Ot(),yt||(I(null),e(el({})))}catch(qt){Ot(),I(null),(qt==null?void 0:qt.name)!=="AbortError"?e(wd({message:String((qt==null?void 0:qt.message)||qt)})):(H(null),e(el({aborted:!0})))}finally{q.current=null}},[a,h,e,ct]);V.useEffect(()=>{if(!R||h||g)return;if(_.current>=6){H(null),A("Automatic progression paused after six steps. Continue when ready.");return}const m=R,$=window.setTimeout(()=>{_.current+=1,H(null),X({content:`Consultant continue: ${m.prompt}`,hideInChat:!0,autoContinue:!0})},650);return()=>window.clearTimeout($)},[g,X,R,h]);const F=V.useCallback(()=>{q.current&&q.current()},[]),ht=V.useCallback(async m=>{if(!a||!m)return{success:!1,error:"No active session"};const $=await uw(a,m);return $!=null&&$.success&&L(U=>U+1),$},[a]),pt=V.useCallback(async m=>{if(!a||!m)return{success:!1,error:"No active session"};const $=await dw(a,m);return $!=null&&$.success&&L(U=>U+1),$},[a]),wt=V.useCallback(()=>{e(kd()),t(ct?"/consultant?planner=1":"/consultant",{replace:!0})},[e,t,ct]),P=V.useCallback(()=>{var $;if(h)return;let m=null;for(let U=o.length-1;U>=0;U-=1)if((($=o[U])==null?void 0:$.role)==="user"){m=o[U];break}m!=null&&m.content&&X(m.content)},[o,h,X]),[mt,st]=V.useState({text:"",token:0}),[at,dt]=V.useState(!1),[bt,vt]=V.useState(!1),Bt=V.useRef(null),Q=V.useRef(null),$t=V.useRef(null),te=V.useRef(0),pe=V.useCallback((m={})=>{te.current+=1;const $=Q.current;if($){$.onended=null,$.onerror=null,$.pause(),$.removeAttribute("src");try{$.load()}catch{}Q.current=null}$t.current&&(URL.revokeObjectURL($t.current),$t.current=null),vt(!1),m.disableVoiceMode&&dt(!1)},[]),Oe=V.useCallback(m=>{m!=null&&m.content&&st($=>({text:m.content,token:$.token+1}))},[]),Ae=V.useCallback(()=>{var m;for(let $=o.length-1;$>=0;$-=1)if(((m=o[$])==null?void 0:m.role)==="user")return o[$].content||"";return""},[o]),Re=V.useCallback(()=>{const m=[...o].reverse().find($=>($==null?void 0:$.role)==="assistant"&&($==null?void 0:$.content));m&&(Bt.current=m.id),dt(!0)},[o]),gt=V.useCallback(m=>String(m||"").replace(/```[\s\S]*?```/g," ").replace(/`([^`]+)`/g,"$1").replace(/^#{1,6}\s+/gm,"").replace(/[*_>
500~|#\-[\]]+/g," ").replace(/\s+/g," ").trim().slice(0,3200),[]);V.useEffect(()=>{if(!at||h)return;const m=[...o].reverse().find(J=>(J==null?void 0:J.role)==="assistant"&&(J==null?void 0:J.content));if(!m||Bt.current===m.id)return;const $=gt(m.content);if(!$)return;Bt.current=m.id,pe();const U=te.current+1;te.current=U;let tt=!1;return(async()=>{vt(!0);const J=await pw($,"alloy");if(tt||U!==te.current)return;if(!(J!=null&&J.success)||!(J.audioBlob instanceof Blob)){vt(!1);return}const ft=URL.createObjectURL(J.audioBlob);if(tt||U!==te.current){URL.revokeObjectURL(ft);return}$t.current=ft;const B=new Audio(ft);Q.current=B;const Z=()=>{U===te.current&&($t.current&&(URL.revokeObjectURL($t.current),$t.current=null),Q.current=null,vt(!1))};B.onended=Z,B.onerror=Z;try{await B.play()}catch{Z()}})(),()=>{tt=!0,U===te.current&&pe()}},[o,h,pe,gt,at]),V.useEffect(()=>()=>pe(),[pe]);const St=V.useCallback(async({context:m,message:$})=>{if(!a)return;const U={};if(m.industryPack&&(U.industryPack=m.industryPack),m.industry&&(U.industry=m.industry),m.region&&(U.region=m.region),m.currency&&(U.currency=m.currency),m.scenario&&(U.scenario=m.scenario),Object.keys(U).length){e(ms(U));try{const tt=await wm(a,U);tt!=null&&tt.success&&tt.session&&e(ms({region:tt.session.region,currency:tt.session.currency,locale:tt.session.locale,industryPack:tt.session.industryPack,industry:tt.session.industry,scenario:tt.session.scenario}))}catch{}}X({content:$.content,displayContent:$.displayContent})},[a,e,X]),kt=(l==null?void 0:l.phase)||null,At=l!=null&&l.agent?t7[l.agent]||l.agent:null,G=l!=null&&l.phase?e7[l.phase]||l.phase:"context",nt=!!(o.length>0||l||C||T>0);return x?f.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center bg-gray-50 px-4",children:[f.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"We couldn’t open the consultant"}),f.jsx("p",{className:"text-sm text-gray-600 max-w-md text-center mb-4",children:x}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("button",{onClick:()=>{window.location.href="/consultant"},className:"px-4 py-2 bg-[var(--color-brand,#00C7FD)] text-white rounded-xl",children:"Start a new consultation"}),f.jsx("button",{onClick:()=>window.location.reload(),className:"px-4 py-2 border border-gray-300 text-gray-700 rounded-xl hover:bg-gray-100",children:"Retry"})]})]}):f.jsxs("div",{className:"relative min-h-screen flex flex-col bg-[#fafaf9]",children:[f.jsx("header",{className:"sticky top-0 z-30 bg-white/80 backdrop-blur-md border-b border-gray-200",children:f.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 h-14 flex items-center justify-between",children:[f.jsxs("button",{onClick:()=>t(s?"/dashboard/consultant":"/"),className:"inline-flex items-center gap-2 text-sm text-gray-600 hover:text-gray-900",children:[f.jsx(Sw,{className:"w-4 h-4"}),s?"Chats":"Home"]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("h1",{className:"text-sm font-semibold text-gray-800",children:"AI Solutions Consultant"}),f.jsx("span",{className:"text-[11px] uppercase tracking-wide text-gray-400 hidden sm:inline",children:s?"Signed in":"Guest"})]}),f.jsxs("button",{onClick:wt,className:"inline-flex items-center gap-1.5 text-sm text-gray-600 hover:text-gray-900",title:"Start a new consultation",children:[f.jsx(gw,{className:"w-4 h-4"}),f.jsx("span",{className:"hidden sm:inline",children:"New"})]})]})}),f.jsx(u2,{sessionId:a}),d&&f.jsx("div",{className:"mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8",children:f.jsxs("div",{className:"mt-3 rounded-xl border border-[var(--color-brand,#00C7FD)]/30 bg-cyan-50/70 px-3 py-2 flex items-center gap-2 text-[12px] text-gray-800",children:[f.jsx(mv,{className:"w-3.5 h-3.5 text-[var(--color-brand,#00C7FD)] shrink-0"}),f.jsxs("span",{className:"min-w-0 truncate",children:["Skipped to ",f.jsx("b",{className:"font-semibold capitalize",children:d.phase}),d.reason?f.jsxs(f.Fragment,{children:[" - ",d.reason]}):null]}),f.jsx("button",{type:"button",onClick:()=>e(W2()),className:"ml-auto p-1 text-gray-400 hover:text-gray-700","aria-label":"Dismiss jump notice",children:f.jsx(pi,{className:"w-3.5 h-3.5"})})]})}),f.jsxs("div",{className:`relative flex-1 mx-auto w-full px-4 sm:px-6 lg:px-8 ${W?"max-w-none py-3":"max-w-[1500px] py-6"}`,children:[f.jsxs("div",{className:"flex gap-6",children:[f.jsxs("main",{className:`flex-1 min-w-0 flex flex-col gap-3 ${W?"h-[calc(100vh-5.75rem)]":"h-[calc(100vh-7rem)]"}`,children:[C?f.jsxs("div",{children:[f.jsxs("button",{type:"button",onClick:()=>M(m=>!m),className:"text-[11px] uppercase tracking-wide text-gray-500 hover:text-gray-800 mb
500-1.5",children:[D?"Hide":"Show"," requirements",(y==null?void 0:y.score)!==void 0&&f.jsxs("span",{className:"ml-2 normal-case tracking-normal text-gray-400",children:["· ",Math.round(y.score),"% complete"]})]}),D&&f.jsx(g2,{sessionId:a,onRefresh:()=>L(m=>m+1)})]}):null,f.jsxs("div",{className:"flex-1 min-h-0 flex flex-col bg-white rounded-2xl border border-gray-200 shadow-sm overflow-hidden",children:[f.jsxs("div",{className:"px-4 sm:px-6 lg:px-8 py-3 border-b border-gray-100 flex items-center justify-between gap-3 bg-white",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"text-xs uppercase tracking-wide text-gray-500 font-semibold",children:"Requirement Interview"}),f.jsx("div",{className:"text-sm text-gray-600 truncate",children:l!=null&&l.plannerGuided&&At?`Planner-guided ${At} is shaping ${G}`:At?`${At} is shaping ${G}`:"Conversation"}),h&&(O==null?void 0:O.message)&&f.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5 text-[12px] text-gray-500 min-w-0",children:[f.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-[var(--color-brand,#00C7FD)] animate-pulse shrink-0"}),f.jsx("span",{className:"truncate",children:O.message}),Number.isFinite(O.elapsedSec)&&O.elapsedSec>0&&f.jsxs("span",{className:"shrink-0 text-gray-400",children:[Math.round(O.elapsedSec),"s"]})]})]}),f.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[(l==null?void 0:l.plannerGuided)&&f.jsxs("span",{className:"hidden sm:inline-flex items-center gap-1.5 rounded-full border border-violet-200 bg-violet-50 px-2.5 py-1 text-[11px] font-semibold text-violet-700",children:[f.jsx(vh,{className:"w-3 h-3"}),"Planner"]}),h&&f.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-gray-200 bg-gray-50 px-2.5 py-1 text-[11px] font-medium text-gray-600",children:[f.jsx(de,{className:"w-3 h-3 animate-spin text-[var(--color-brand,#006B82)]"}),"Updating"]}),f.jsx("button",{type:"button",onClick:()=>E(m=>!m),className:"hidden lg:inline-flex items-center justify-center w-8 h-8 rounded-lg border border-gray-200 text-gray-500 hover:text-gray-900 hover:bg-gray-50",title:W?"Exit full screen chat":"Full screen chat","aria-label":W?"Exit full screen chat":"Full screen chat",children:W?f.jsx(Jw,{className:"w-4 h-4"}):f.jsx(Xw,{className:"w-4 h-4"})})]})]}),f.jsx(b2,{enabled:ct,runtime:c,route:l,streaming:h}),f.jsx(qk,{messages:o,streaming:h,showInlineArtifacts:!0,onRegenerate:P,onEditUser:Oe,emptyState:f.jsx(h2,{onSubmit:St,disabled:!a||h,seedText:i.get("seed")||""})}),o.length>0&&(!h||g)&&f.jsx(Uk,{phase:kt,onPick:X,disabled:u||!a||h}),f.jsx(zk,{onSend:X,onCancel:F,onAttach:ht,onRemoveAttachment:pt,streaming:h,locked:u||!a,sessionId:a,onEditLast:Ae,pendingDraft:mt,onVoiceTurn:Re,voiceActive:at,speaking:bt,onStopVoice:()=>pe({disableVoiceMode:!0})}),N.length>0&&h&&f.jsx("div",{className:"px-4 sm:px-6 lg:px-8 pb-2 -mt-1",children:f.jsx("div",{className:"max-w-3xl mx-auto flex flex-wrap gap-1.5",children:N.map(m=>f.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[11px] font-medium uppercase tracking-wide text-gray-600 bg-gray-100 border border-gray-200 rounded-full px-2 py-0.5",children:[f.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[var(--color-brand,#00C7FD)] animate-pulse"}),i7(m.name)]},m.id))})})]})]}),nt&&!W&&f.jsx("div",{className:"hidden lg:block",children:f.jsx(md,{sessionId:a,isAuthenticated:s,version:T,plannerEnabled:ct})})]}),(p||j)&&f.jsx("div",{className:"mt-3 text-sm text-red-600 text-center",children:p||j})]}),nt&&f.jsx(m2,{sessionId:a,isAuthenticated:s,version:T,plannerEnabled:ct}),f.jsx(Yk,{minimized:k})]})},gc=e=>{const t=typeof e=="string"?e:e==null?void 0:e.role;return r7[t]||String(t||"Planner")},gm=e=>{const t=typeof e=="string"?e:e==null?void 0:e.role;return t==="research"?"Checking evidence and assumptions":t==="org"?"Checking delivery readiness":t==="domain"?"Mapping business capabilities":t==="architecture"?"Preparing the solution blueprint":t==="finops"?"Preparing the investment view":t==="compliance"?"Checking risk and compliance":t==="reviewer"?"Checking consistency before export":t==="synth"?"Assembling the final pack":"Preparing the next consultant output"},b2=({enabled:e,runtime:t,route:r,streaming:i})=>{var p,d,g;if(!e)return null;const n=t==null?void 0:t.directive,s=r!=null&&r.plannerNodeId&&Array.isArray((p=t==null?void 0:t.state)==null?void 0:p.plan)?t.state.plan.find(y=>y.id===r.plannerNodeId):null,a=(t==null?void 0:t.activeNode)||s||(t==null?void 0:t.completedNode),o=t==null?void 0:t.summary;let l=vh,c="border-violet-100 bg-violet-50/70 text-violet-800",h="Plan ready",u=o!=null&&o.nextRunnableId?"Next step is ready":"Engagement plan is synced";if((n==null?void 0:n.kind)==="pause")l=mr,c="border-sky-200 bg-sky-50 text-slate-800",h="Consultant checkpoint",u=((d=n.prompt)==null?void 0:d.message)||"Answer this and I will keep going.";else if((n==null?void 0:n.kind)==="unsupported")l=mr,c="border-sky-200 bg-sky-50 text-slate-800",h=`Help me with ${gc(n.node)}`,u=((g=n.prompt)==null?void 0:g.message)||"Answer this and I will keep going.";else if(r!=null&&r.plannerGuided)l=je,c="border-emerald-200 bg-emerald-50 text-emerald-800",h=`Working on ${gc(a)}`,u=i?gm(a):"The plan was updated";else if(a&&i)h=`Working on ${gc(a)}`,u=gm(a);else if(!n&&!(r!=null&&r.plannerGuided)&&!(o!=null&&o.nextRunnableId))return null;return f.jsx("div",{className:`border-b px-4 sm:px-6 lg:px-8 py-2 ${c}`,children:f.jsxs("div",{className:"max-w-3xl mx-auto flex items-center gap-2 text-xs",children:[f.jsx(l,{className:"w-3.5 h-3.5 shrink-0"}),f.jsx("span",{className:"font-semibold whitespace-nowrap",children:h}),f.jsx("span",{className:"min-w-0 truncate opacity-90",children:u})]})})};b2.propTypes={enabled:Y.bool,runtime:Y.shape({directive:Y.object,activeNode:Y.object,completedNode:Y.object,state:Y.object,summary:Y.object}),route:Y.object,streaming:Y.bool};const s9=Object.freeze(Object.defineProperty({__proto__:null,default:n7},Symbol.toStringTag,{value:"Module"}));
500export{RO as $,me as A,uF as B,Lr as C,yu as D,Wy as E,n$ as F,HN as G,EN as H,iu as I,L7 as J,E7 as K,Gi as L,Ip as M,jp as N,M7 as O,N7 as P,F7 as Q,_7 as R,B7 as S,A7 as T,Ht as U,j7 as V,$7 as W,uA as X,v7 as Y,qO as Z,b as _,sF as a,A1 as a$,Es as a0,w7 as a1,$o as a2,XM as a3,UA as a4,ex as a5,mp as a6,Go as a7,jN as a8,Wc as a9,Ne as aA,a4 as aB,hu as aC,lu as aD,La as aE,MM as aF,NM as aG,EM as aH,FM as aI,wM as aJ,n0 as aK,TM as aL,kM as aM,LM as aN,s0 as aO,SM as aP,IM as aQ,jM as aR,$M as aS,PM as aT,DM as aU,vM as aV,a0 as aW,AM as aX,BM as aY,_M as aZ,o0 as a_,i$ as aa,yr as ab,rt as ac,it as ad,JA as ae,ix as af,v1 as ag,ju as ah,Nf as ai,Ks as aj,gM as ak,gu as al,Et as am,H7 as an,W7 as ao,DO as ap,Kt as aq,Q1 as ar,Nt as as,z7 as at,xo as au,Z1 as av,Ro as aw,Iu as ax,_1 as ay,gj as az,nF as b,Vo as b$,f0 as b0,Ry as b1,NN as b2,k7 as b3,br as b4,fM as b5,S7 as b6,Jh as b7,ri as b8,$s as b9,In as bA,Vr as bB,rg as bC,Ar as bD,qr as bE,gD as bF,Yf as bG,yo as bH,Wr as bI,TI as bJ,Xe as bK,Qf as bL,Ru as bM,mO as bN,Ho as bO,mo as bP,pO as bQ,X1 as bR,Tr as bS,_I as bT,Uu as bU,N1 as bV,yO as bW,fO as bX,nO as bY,zo as bZ,q1 as b_,Ap as ba,u3 as bb,Mt as bc,Jx as bd,Ge as be,n3 as bf,Zh as bg,yx as bh,Qs as bi,Cx as bj,T7 as bk,ZL as bl,Du as bm,Pu as bn,qf as bo,j1 as bp,Wo as bq,$1 as br,$I as bs,I1 as bt,bD as bu,sP as bv,SI as bw,MI as bx,CD as by,Di as bz,Gt as c,z1 as c0,sO as c1,rP as c2,yi as c3,cs as c4,rn as c5,ma as c6,Pl as c7,TO as c8,J4 as c9,s9 as ca,rx as d,Te as e,Ur as f,oF as g,C1 as h,nr as i,Yt as j,Gs as k,et as l,m0 as m,Vs as n,bM as o,lF as p,cF as q,iF as r,aF as s,I7 as t,oi as u,GL as v,o$ as w,n9 as x,i9 as y,Me as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.