#pragma once

#include <stddef.h>

static const char *ps_txt[] = {
    // clang-format off
    "%%BeginProlog\n"
    "/DotDict 200 dict def\n"
    "DotDict begin\n"
    "\n"
    "/setupLatin1 {\n"
    "mark\n"
    "/EncodingVector 256 array def\n"
    " EncodingVector 0\n"
    "\n"
    "ISOLatin1Encoding 0 255 getinterval putinterval\n"
    "EncodingVector 45 /hyphen put\n"
    "\n"
    "% Set up ISO Latin 1 character encoding\n"
    "/starnetISO {\n"
    "        dup dup findfont dup length dict begin\n"
    "        { 1 index /FID ne { def }{ pop pop } ifelse\n"
    "        } forall\n"
    "        /Encoding EncodingVector def\n"
    "        currentdict end definefont\n"
    "} def\n"
    "/Times-Roman starnetISO def\n"
    "/Times-Italic starnetISO def\n"
    "/Times-Bold starnetISO def\n"
    "/Times-BoldItalic starnetISO def\n"
    "/Helvetica starnetISO def\n"
    "/Helvetica-Oblique starnetISO def\n"
    "/Helvetica-Bold starnetISO def\n"
    "/Helvetica-BoldOblique starnetISO def\n"
    "/Courier starnetISO def\n"
    "/Courier-Oblique starnetISO def\n"
    "/Courier-Bold starnetISO def\n"
    "/Courier-BoldOblique starnetISO def\n"
    "cleartomark\n"
    "} bind def\n"
    "\n"
    "%%BeginResource: procset graphviz 0 0\n"
    "/coord-font-family /Times-Roman def\n"
    "/default-font-family /Times-Roman def\n"
    "/coordfont coord-font-family findfont 8 scalefont def\n"
    "\n"
    "/InvScaleFactor 1.0 def\n"
    "/set_scale {\n"
    "       dup 1 exch div /InvScaleFactor exch def\n"
    "       scale\n"
    "} bind def\n"
    "\n"
    "% styles\n"
    "/solid { [] 0 setdash } bind def\n"
    "/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def\n"
    "/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def\n"
    "/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def\n"
    "/bold { 2 setlinewidth } bind def\n"
    "/filled { } bind def\n"
    "/unfilled { } bind def\n"
    "/rounded { } bind def\n"
    "/diagonals { } bind def\n"
    "/tapered { } bind def\n"
    "\n"
    "% hooks for setting color \n"
    "/nodecolor { sethsbcolor } bind def\n"
    "/edgecolor { sethsbcolor } bind def\n"
    "/graphcolor { sethsbcolor } bind def\n"
    "/nopcolor {pop pop pop} bind def\n"
    "\n"
    "/beginpage {	% i j npages\n"
    "	/npages exch def\n"
    "	/j exch def\n"
    "	/i exch def\n"
    "	/str 10 string def\n"
    "	npages 1 gt {\n"
    "		gsave\n"
    "			coordfont setfont\n"
    "			0 0 moveto\n"
    "			(\\() show i str cvs show (,) show j str cvs show (\\)) show\n"
    "		grestore\n"
    "	} if\n"
    "} bind def\n"
    "\n"
    "/set_font {\n"
    "	findfont exch\n"
    "	scalefont setfont\n"
    "} def\n"
    "\n"
    "% draw text fitted to its expected width\n"
    "/alignedtext {			% width text\n"
    "	/text exch def\n"
    "	/width exch def\n"
    "	gsave\n"
    "		width 0 gt {\n"
    "			[] 0 setdash\n"
    "			text stringwidth pop width exch sub text length div 0 text ashow\n"
    "		} if\n"
    "	grestore\n"
    "} def\n"
    "\n"
    "/boxprim {				% xcorner ycorner xsize ysize\n"
    "		4 2 roll\n"
    "		moveto\n"
    "		2 copy\n"
    "		exch 0 rlineto\n"
    "		0 exch rlineto\n"
    "		pop neg 0 rlineto\n"
    "		closepath\n"
    "} bind def\n"
    "\n"
    "/ellipse_path {\n"
    "	/ry exch def\n"
    "	/rx exch def\n"
    "	/y exch def\n"
    "	/x exch def\n"
    "	matrix currentmatrix\n"
    "	newpath\n"
    "	x y translate\n"
    "	rx ry scale\n"
    "	0 0 1 0 360 arc\n"
    "	setmatrix\n"
    "} bind def\n"
    "\n"
    "/endpage { showpage } bind def\n"
    "/showpage { } def\n"
    "\n"
    "/layercolorseq\n"
    "	[	% layer color sequence - darkest to lightest\n"
    "		[0 0 0]\n"
    "		[.2 .8 .8]\n"
    "		[.4 .8 .8]\n"
    "		[.6 .8 .8]\n"
    "		[.8 .8 .8]\n"
    "	]\n"
    "def\n"
    "\n"
    "/layerlen layercolorseq length def\n"
    "\n"
    "/setlayer {/maxlayer exch def /curlayer exch def\n"
    "	layercolorseq curlayer 1 sub layerlen mod get\n"
    "	aload pop sethsbcolor\n"
    "	/nodecolor {nopcolor} def\n"
    "	/edgecolor {nopcolor} def\n"
    "	/graphcolor {nopcolor} def\n"
    "} bind def\n"
    "\n"
    "/onlayer { curlayer ne {invis} if } def\n"
    "\n"
    "/onlayers {\n"
    "	/myupper exch def\n"
    "	/mylower exch def\n"
    "	curlayer mylower lt\n"
    "	curlayer myupper gt\n"
    "	or\n"
    "	{invis} if\n"
    "} def\n"
    "\n"
    "/curlayer 0 def\n"
    "\n"
    "%%EndResource\n"
    "%%EndProlog\n"
    "%%BeginSetup\n"
    "14 default-font-family set_font\n"
    "% /arrowlength 10 def\n"
    "% /arrowwidth 5 def\n"
    "\n"
    "% make sure pdfmark is harmless for PS-interpreters other than Distiller\n"
    "/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse\n"
    "% make '<<' and '>>' safe on PS Level 1 devices\n"
    "/languagelevel where {pop languagelevel}{1} ifelse\n"
    "2 lt {\n"
    "    userdict (<<) cvn ([) cvn load put\n"
    "    userdict (>>) cvn ([) cvn load put\n"
    "} if\n"
    "\n"
    "%%EndSetup",
    NULL,
    // clang-format on
};
