module.exports=[54804,a=>{"use strict";function b(a,b){a.accDescr&&b.setAccDescription?.(a.accDescr),a.accTitle&&b.setAccTitle?.(a.accTitle),a.title&&b.setDiagramTitle?.(a.title)}(0,a.i(62939).__name)(b,"populateCommonDb"),a.s(["populateCommonDb",0,b])},22697,a=>{"use strict";var b=a.i(29336),c=a.i(54804),d=a.i(97112),e=a.i(4225),f=a.i(62939),g=a.i(89961),h=e.defaultConfig_default.packet,i=class{constructor(){this.packet=[],this.setAccTitle=e.setAccTitle,this.getAccTitle=e.getAccTitle,this.setDiagramTitle=e.setDiagramTitle,this.getDiagramTitle=e.getDiagramTitle,this.getAccDescription=e.getAccDescription,this.setAccDescription=e.setAccDescription}static{(0,f.__name)(this,"PacketDB")}getConfig(){let a=(0,d.cleanAndMerge)({...h,...(0,e.getConfig)().packet});return a.showBits&&(a.paddingY+=10),a}getPacket(){return this.packet}pushWord(a){a.length>0&&this.packet.push(a)}clear(){(0,e.clear)(),this.packet=[]}},j=(0,f.__name)((a,b)=>{(0,c.populateCommonDb)(a,b);let d=-1,e=[],g=1,{bitsPerRow:h}=b.getConfig();for(let{start:c,end:i,bits:j,label:l}of a.blocks){if(void 0!==c&&void 0!==i&&i<c)throw Error(`Packet block ${c} - ${i} is invalid. End must be greater than start.`);if((c??=d+1)!==d+1)throw Error(`Packet block ${c} - ${i??c} is not contiguous. It should start from ${d+1}.`);if(0===j)throw Error(`Packet block ${c} is invalid. Cannot have a zero bit field.`);for(i??=c+(j??1)-1,j??=i-c+1,d=i,f.log.debug(`Packet block ${c} - ${d} with label ${l}`);e.length<=h+1&&b.getPacket().length<1e4;){let[a,d]=k({start:c,end:i,bits:j,label:l},g,h);if(e.push(a),a.end+1===g*h&&(b.pushWord(e),e=[],g++),!d)break;({start:c,end:i,bits:j,label:l}=d)}}b.pushWord(e)},"populate"),k=(0,f.__name)((a,b,c)=>{if(void 0===a.start)throw Error("start should have been set during first phase");if(void 0===a.end)throw Error("end should have been set during first phase");if(a.start>a.end)throw Error(`Block start ${a.start} is greater than block end ${a.end}.`);if(a.end+1<=b*c)return[a,void 0];let d=b*c-1,e=b*c;return[{start:a.start,end:d,label:a.label,bits:d-a.start},{start:e,end:a.end,label:a.label,bits:a.end-e}]},"getNextFittingBlock"),l={parser:{yy:void 0},parse:(0,f.__name)(async a=>{let b=await (0,g.parse)("packet",a),c=l.parser?.yy;if(!(c instanceof i))throw Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");f.log.debug(b),j(b,c)},"parse")},m=(0,f.__name)((a,c,d,f)=>{let g=f.db,h=g.getConfig(),{rowHeight:i,paddingY:j,bitWidth:k,bitsPerRow:l}=h,m=g.getPacket(),o=g.getDiagramTitle(),p=i+j,q=p*(m.length+1)-(o?0:i),r=k*l+2,s=(0,b.selectSvgElement)(c);for(let[a,b]of(s.attr("viewBox",`0 0 ${r} ${q}`),(0,e.configureSvgSize)(s,q,r,h.useMaxWidth),m.entries()))n(s,b,a,h);s.append("text").text(o).attr("x",r/2).attr("y",q-p/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),n=(0,f.__name)((a,b,c,{rowHeight:d,paddingX:e,paddingY:f,bitWidth:g,bitsPerRow:h,showBits:i})=>{let j=a.append("g"),k=c*(d+f)+f;for(let a of b){let b=a.start%h*g+1,c=(a.end-a.start+1)*g-e;if(j.append("rect").attr("x",b).attr("y",k).attr("width",c).attr("height",d).attr("class","packetBlock"),j.append("text").attr("x",b+c/2).attr("y",k+d/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(a.label),!i)continue;let f=a.end===a.start,l=k-2;j.append("text").attr("x",b+(f?c/2:0)).attr("y",l).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",f?"middle":"start").text(a.start),f||j.append("text").attr("x",b+c).attr("y",l).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(a.end)}},"drawWord"),o={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},p=(0,f.__name)(({packet:a}={})=>{let b=(0,d.cleanAndMerge)(o,a);return`
	.packetByte {
		font-size: ${b.byteFontSize};
	}
	.packetByte.start {
		fill: ${b.startByteColor};
	}
	.packetByte.end {
		fill: ${b.endByteColor};
	}
	.packetLabel {
		fill: ${b.labelColor};
		font-size: ${b.labelFontSize};
	}
	.packetTitle {
		fill: ${b.titleColor};
		font-size: ${b.titleFontSize};
	}
	.packetBlock {
		stroke: ${b.blockStrokeColor};
		stroke-width: ${b.blockStrokeWidth};
		fill: ${b.blockFillColor};
	}
	`},"styles");a.s(["diagram",0,{parser:l,get db(){return new i},renderer:{draw:m},styles:p}])},93898,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0_r9m5a._.js","server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-NNHCCRGN_mjs_0ppzi2~._.js"].map(b=>a.l(b))).then(()=>b(73415)))},42707,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0_-k76-._.js","server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-NNHCCRGN_mjs_0ppzi2~._.js"].map(b=>a.l(b))).then(()=>b(57458)))},38374,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0wfr796._.js","server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-NNHCCRGN_mjs_0ppzi2~._.js"].map(b=>a.l(b))).then(()=>b(11698)))},1573,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0c-n5ib._.js","server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-NNHCCRGN_mjs_0ppzi2~._.js"].map(b=>a.l(b))).then(()=>b(61813)))},36390,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_056q8fo._.js","server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-NNHCCRGN_mjs_0ppzi2~._.js"].map(b=>a.l(b))).then(()=>b(54311)))},70148,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_07to42b._.js","server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-NNHCCRGN_mjs_0ppzi2~._.js"].map(b=>a.l(b))).then(()=>b(9311)))},2421,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_08_~0ln._.js","server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-NNHCCRGN_mjs_0ppzi2~._.js"].map(b=>a.l(b))).then(()=>b(43256)))},83480,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_03kz2y8._.js","server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-NNHCCRGN_mjs_0ppzi2~._.js"].map(b=>a.l(b))).then(()=>b(88754)))},47385,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0gmydyt._.js","server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-NNHCCRGN_mjs_0ppzi2~._.js"].map(b=>a.l(b))).then(()=>b(31392)))},46807,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0wfshzo._.js","server/chunks/ssr/0ui-_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-NNHCCRGN_mjs_0ppzi2~._.js"].map(b=>a.l(b))).then(()=>b(64490)))}];

//# sourceMappingURL=node_modules__pnpm_08wrwh6._.js.map