maintenance/talks/fosdem-2021/declaratively/images/tradeoff.svg

164 lines
35 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="251.92445mm"
height="157.72684mm"
viewBox="0 0 251.92446 157.72683"
version="1.1"
id="svg8"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
sodipodi:docname="tradeoff.svg">
<defs
id="defs2">
<meshgradient
inkscape:collect="always"
id="meshgradient921"
gradientUnits="userSpaceOnUse"
x="26.974476"
y="84.265938">
<meshrow
id="meshrow923">
<meshpatch
id="meshpatch925">
<stop
path="c 12.224,0 24.4479,0 36.6719,0"
style="stop-color:#ffffff;stop-opacity:1"
id="stop927" />
<stop
path="c 0,2.02588 0,4.05177 0,6.07765"
style="stop-color:#800080;stop-opacity:1"
id="stop929" />
<stop
path="c -12.224,0 -24.4479,0 -36.6719,0"
style="stop-color:#ffffff;stop-opacity:1"
id="stop931" />
<stop
path="c 0,-2.02588 0,-4.05177 0,-6.07765"
style="stop-color:#800080;stop-opacity:1"
id="stop933" />
</meshpatch>
</meshrow>
</meshgradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
inkscape:cx="484.63882"
inkscape:cy="-231.31983"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
inkscape:window-width="1200"
inkscape:window-height="1880"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Tavolo 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(34.735006,-98.328905)">
<path
style="opacity:0.594;fill:#000000;stroke:#2875ec;stroke-width:1.065;stroke-opacity:1"
id="path22"
d="m 17.373487,115.89346 c 0.108543,4.08278 0.09938,8.169 0.126464,12.25324 0.124134,8.91244 -0.05493,17.82178 -0.418496,26.72635 -0.186152,4.82002 -0.494585,9.63609 -0.641701,14.45773 -0.135672,4.44656 -0.129638,8.89229 -0.0864,13.33984 0.14241,7.36616 0.311834,14.73186 0.58482,22.09443 0.159876,5.16293 0.707277,10.30131 1.494191,15.40317 0.186959,1.13615 0.363544,2.274 0.560237,3.40853 0.0014,0.008 0.167676,0.99125 0.205102,1.04043 0.06604,0.0868 0.20553,0.0731 0.308294,0.10963 0.320724,-0.27326 0.641448,-0.54653 0.962172,-0.8198 0,0 -0.0711,0.0371 -0.0711,0.0371 v 0 c 0.338213,-0.0858 0.676426,-0.17158 1.014639,-0.25738 0.05757,-0.11848 0.160299,-0.22431 0.172703,-0.35546 0.01333,-0.1409 -0.06518,-0.27546 -0.100058,-0.41263 -0.0503,-0.19785 -0.105889,-0.39435 -0.155457,-0.59239 -0.27476,-1.09775 -0.505747,-2.20585 -0.709948,-3.31881 -0.933316,-5.03378 -1.592199,-10.11456 -1.745257,-15.23811 -0.302347,-7.33264 -0.479776,-14.66979 -0.751175,-22.00365 -0.08084,-3.65668 -0.133589,-4.88741 -0.110829,-8.56505 0.03948,-6.3785 0.377972,-12.74848 0.639688,-19.12023 0.288519,-8.90454 0.439027,-17.81368 0.395994,-26.7232 -0.01842,-4.0627 -0.0066,-8.12918 -0.279649,-12.185 0,0 -1.394233,0.7213 -1.394233,0.7213 z" />
<path
style="opacity:0.594;fill:#000000;stroke:#2875ec;stroke-width:1.065;stroke-opacity:1"
id="path24"
d="m 16.993123,116.70492 c -1.36445,2.39671 -2.423008,4.93895 -3.428927,7.50107 -1.008036,2.75442 -2.031329,5.5028 -3.058151,8.25031 -0.253879,0.57629 -0.405428,1.20961 -0.7157448,1.76142 -0.4922152,0.611 -0.8764034,1.07798 1.9181378,-1.1424 0.168066,-0.13353 0.177824,-0.39084 0.273057,-0.58321 0.170969,-0.34537 0.346751,-0.68837 0.525442,-1.02981 0.651308,-1.2445 0.949314,-1.7692 1.648329,-3.04002 1.889401,-3.44345 3.800515,-6.87464 5.74917,-10.28491 1.157967,-1.9565 2.20659,-3.97671 3.106068,-6.06474 0.05305,-0.13803 0.105963,-0.27611 0.159138,-0.4141 0.03741,-0.0971 0.07603,-0.19367 0.112612,-0.29105 0.02271,-0.0605 0.0234,-0.13324 0.06524,-0.18245 0.01613,-0.019 0.09262,0.008 0.0715,0.0217 -1.704928,1.06488 -1.701971,0.30708 -1.502917,1.37024 0.707314,2.97063 1.449899,5.9331 2.190686,8.8956 0.341808,1.32077 0.644613,2.65077 0.966986,3.97627 0.135411,0.55676 0.270402,1.09958 0.333611,1.66864 0.0905,0.83081 -0.289744,0.8246 0.986731,-0.22455 0,0 -0.06617,0.0453 -0.06617,0.0453 v 0 c 0.471712,-0.22135 0.937744,-0.45522 1.415134,-0.66404 0.01408,-0.006 0.0073,0.034 -0.0021,0.046 -0.02027,0.0255 -0.06113,-0.0265 -0.08427,-0.0493 -0.08515,-0.0843 -0.138451,-0.17705 -0.206809,-0.27725 -0.284681,-0.47023 -0.473096,-0.96434 -0.661786,-1.48165 -0.458677,-1.25751 -0.895458,-2.52522 -1.241093,-3.81913 -0.772783,-2.95759 -1.511254,-5.92865 -2.089115,-8.93112 -0.0187,-0.15504 0.09984,-0.47347 -0.05609,-0.4651 -1.753556,0.0941 -1.580803,0.47735 -2.088959,1.55461 -0.910843,2.04406 -1.862984,4.07075 -3.005415,5.99847 -1.945135,3.42945 -3.87145,6.86925 -5.799286,10.30847 -0.620314,1.08378 -1.156401,2.01386 -1.762233,3.09571 -0.198735,0.35488 -0.39972,0.70861 -0.590068,1.06806 -0.106198,0.20055 -0.5255982,0.59429 -0.2993194,0.61146 0.5851364,0.0444 1.1240544,-0.33752 1.6860824,-0.50628 -0.004,-0.006 -0.0079,-0.013 -0.0119,-0.0195 0.07535,-0.57016 0.377573,-1.10363 0.496367,-1.6627 0.887855,-2.71842 1.767029,-5.44101 2.782682,-8.11525 1.037899,-2.58403 2.136229,-5.1484 3.567935,-7.54419 0,0 -1.384427,0.61948 -1.384427,0.61948 z" />
<path
style="opacity:0.594;fill:#000000;stroke:#2875ec;stroke-width:1.065;stroke-opacity:1"
id="path26"
d="m 20.445943,226.42562 c 1.953217,-0.66557 3.956079,-1.16461 5.962241,-1.63995 4.567557,-1.08888 9.214053,-1.77597 13.871744,-2.33519 6.795701,-0.67724 13.602348,-1.24084 20.417054,-1.68643 5.719911,-0.39081 11.450347,-0.50969 17.178951,-0.30186 4.985758,0.26592 9.951434,0.79136 14.934126,1.10524 7.176,0.44729 14.359031,0.73893 21.545681,0.94103 8.20582,0.18454 16.41337,0.24263 24.61882,0.44605 7.72588,0.21489 15.43973,0.71199 23.14713,1.27082 3.26094,0.19697 6.50376,0.61414 9.75954,0.86759 0.56223,0.0271 1.12277,0.0774 1.68408,0.11651 0.30457,-0.0172 0.60791,0.0368 0.9199,0.0877 0.98573,0.21308 1.98391,0.2982 2.98834,0.35594 1.02973,0.054 2.05336,0.17672 3.07669,0.29779 0.40944,0.0482 0.82033,0.083 1.23157,0.11143 0.0594,0.006 0.11866,0.003 0.16976,0.0294 2.55494,-1.80005 2.50308,-1.10856 1.51265,-1.84442 -0.0664,-0.0517 -0.13054,-0.10605 -0.19747,-0.157 -0.22344,-0.15266 -0.47248,-0.27185 -0.71094,-0.39947 -1.44774,-0.74877 -2.88935,-1.50956 -4.32498,-2.28131 -1.73537,-0.98547 -3.47836,-1.9557 -5.26047,-2.85435 -1.08371,-0.54772 -2.14984,-1.1343 -3.26683,-1.61252 -0.82858,-0.28163 -1.20334,-0.0907 -1.92752,1.2879 -0.1184,0.22539 0.45697,0.22464 0.6867,0.33438 0.34986,0.1671 0.70135,0.33075 1.05202,0.49612 2.79918,1.20809 5.52391,2.57523 8.17502,4.07918 1.36439,0.79556 2.68393,1.66366 4.00944,2.52137 0.45051,0.29995 0.91827,0.57343 1.40316,0.81378 0.63378,0.32882 1.44471,-0.92042 1.68667,-1.15037 0.0972,-0.0924 -0.26111,0.0611 -0.39118,0.0936 -0.27073,0.0677 -0.5408,0.13793 -0.81119,0.20689 -2.83758,0.72416 -5.70915,1.30396 -8.56413,1.95386 -2.77861,0.5651 -5.43348,1.5249 -8.0089,2.69203 -1.53213,0.78682 -3.13822,1.5103 -4.53343,2.52883 -0.003,0.0112 -0.0194,0.0303 -0.008,0.0337 0.32909,0.10017 0.61203,-0.31481 0.91012,-0.4865 0,0 -0.0703,0.0385 -0.0703,0.0385 v 0 c 0.47453,-0.12011 0.83461,-0.15601 1.22441,-0.3897 0.61622,-0.37813 1.6193,-0.93218 -1.17942,0.65787 -0.16961,0.0964 0.3362,-0.19795 0.50594,-0.29409 0.77746,-0.44034 0.74106,-0.41038 1.59898,-0.85467 2.58276,-1.22042 5.25329,-2.21368 8.06158,-2.78437 2.82659,-0.64453 5.66846,-1.21987 8.48876,-1.89237 0.25385,-0.0596 4.55582,-0.95399 2.88837,-1.54765 -0.50148,-0.19878 -0.96904,-0.4764 -1.42738,-0.75778 -1.32761,-0.86827 -2.63851,-1.7641 -4.0344,-2.52257 -2.6742,-1.45674 -5.42037,-2.77496 -8.16157,-4.09984 -0.33447,-0.17415 -0.67116,-0.34411 -1.00341,-0.52245 -0.21644,-0.11618 -0.40382,-0.4192 -0.64249,-0.36103 -2.11426,0.51534 -2.84222,0.67523 -1.92449,1.2471 1.08163,0.55002 2.19901,1.0272 3.26885,1.60153 1.77201,0.90887 3.52232,1.85408 5.24189,2.85936 1.41942,0.77115 2.84755,1.5264 4.25449,2.3203 0.2137,0.13062 0.42441,0.27562 0.63597,0.4053 0.0705,0.0536 0.14549,0.10075 0.21813,0.15163 1.0576,0.77185 0.61356,0.42775 2.7107,-1.0661 -0.0343,0.0293 -0.1151,0.0244 -0.17311,0.0252 -0.42275,-0.002 -0.84521,-0.0233 -1.26601,-0.0647 -1.0435,-0.10151 -2.08645,-0.20973 -3.13336,-0.27125 -0.99122,-0.0654 -1.97938,-0.15145 -2.95522,-0.34613 -0.27833,-0.0514 -0.53886,-0.083 -0.79285,-0.19944 -0.006,-0.003 -0.0615,0.0537 -0.085,0.0259 -0.60395,0.0469 -1.20944,0.0296 -1.81396,-5.3e-4 -3.37667,-0.16817 -6.75048,-0.38844 -10.12433,-0.60486 -7.74612,-0.50343 -15.49525,-0.98684 -23.25582,-1.20301 -8.22091,-0.18164 -16.4443,-0.20485 -24.66483,-0.41169 -7.15505,-0.2076 -14.30592,-0.52379 -21.448434,-1.00235 -4.967875,-0.35798 -9.923867,-0.86965 -14.897774,-1.13946 -5.803331,-0.16786 -11.603948,0.0472 -17.395746,0.43828 -6.795965,0.44648 -13.589095,0.95192 -20.365651,1.63755 -4.616706,0.52964 -9.219837,1.18263 -13.753898,2.22035 -1.978168,0.46562 -3.957337,0.9384 -5.891489,1.56705 0,0 -1.573085,1.21857 -1.573085,1.21857 z" />
<path
style="opacity:0.594;fill:#000000;stroke:#d875ec;stroke-width:1.065;stroke-opacity:1"
id="path877"
d="m 29.81384,211.0874 c 0.981641,-0.35991 1.984483,-0.65275 2.998478,-0.90501 0.615936,-0.14293 1.226222,-0.30161 1.826974,-0.49875 0.759865,-0.19403 1.477312,-0.49066 2.186046,-0.82133 1.718556,-0.88091 3.413789,-1.82654 4.983747,-2.95421 1.22646,-0.93361 2.373855,-1.96437 3.513809,-3.00009 1.883037,-1.70295 3.819562,-3.34444 5.776257,-4.9617 3.18639,-2.67999 6.691965,-4.92921 10.236183,-7.09795 2.081856,-1.28247 3.493728,-2.04398 5.653474,-3.17586 1.989138,-1.00316 4.103198,-1.7291 6.186951,-2.50649 3.628159,-1.35095 7.169062,-2.91693 10.627076,-4.65476 3.707157,-1.88675 7.147611,-4.20515 10.487232,-6.66802 2.31146,-1.68179 4.513127,-3.50041 6.655243,-5.39071 2.11481,-1.91586 4.20613,-3.85766 6.30704,-5.78882 2.58493,-2.35096 5.05283,-4.8247 7.57605,-7.24037 2.24924,-2.22781 4.71766,-4.18939 7.33673,-5.95927 2.65022,-1.7351 5.52928,-3.06632 8.37796,-4.43921 2.8949,-1.38337 5.75238,-2.84389 8.58877,-4.34311 1.83388,-1.01598 3.73552,-1.94493 5.43262,-3.1857 0.64044,-0.46824 0.80989,-0.63784 1.39404,-1.14864 0.93547,-0.85399 1.7586,-1.81722 2.60818,-2.75353 0.9081,-0.96662 1.87975,-1.87043 2.88938,-2.72958 1.12558,-0.89548 2.35443,-1.6465 3.52969,-2.47283 0.96411,-0.6854 1.88427,-1.425 2.76429,-2.21472 0.61162,-0.56156 1.18629,-1.16263 1.75271,-1.76942 0.0776,-0.0773 0.21621,-0.23397 0.25793,-0.29711 -0.73994,0.19931 -0.48768,0.33139 -0.85348,-0.0362 0,0 -0.0718,0.0357 -0.0718,0.0357 v 0 c -0.40493,0.66482 -0.11981,0.36723 -0.93574,0.80814 -0.0921,0.054 -0.13343,0.19722 -0.22801,0.25744 -0.53691,0.59846 -1.08945,1.18428 -1.68831,1.72168 -0.8736,0.77699 -1.78912,1.50245 -2.74109,2.18164 -1.17278,0.82321 -2.39603,1.57759 -3.50841,2.48389 -1.0086,0.87478 -1.98741,1.78698 -2.90196,2.76022 -0.83593,0.92721 -1.64805,1.87979 -2.57781,2.71673 -0.56747,0.48926 -0.75385,0.67029 -1.37307,1.11761 -0.27142,0.19608 -0.60265,0.31949 -0.83093,0.56446 -0.15728,0.16879 0.80766,-0.44607 0.60989,-0.32725 -0.5116,0.30738 -1.67071,0.92709 -2.17692,1.20125 -2.86849,1.53014 -5.76143,3.01555 -8.68836,4.431 -3.78266,1.83181 -7.54572,3.72202 -11.08053,6.00666 -2.61759,1.78245 -5.08703,3.75134 -7.33627,5.98754 -2.51668,2.42213 -4.97854,4.90203 -7.57792,7.23735 -2.11297,1.93623 -4.22416,3.87456 -6.345759,5.80125 -2.125618,1.875 -4.311082,3.6788 -6.599672,5.35333 -2.537872,1.86302 -5.098399,3.72248 -7.899254,5.17616 -3.427865,1.73409 -6.943267,3.28309 -10.548385,4.61409 -2.071523,0.76561 -4.178572,1.46683 -6.156946,2.45694 -2.824263,1.47865 -5.587839,3.07081 -8.310428,4.72882 -3.534777,2.18486 -7.03512,4.44236 -10.226455,7.11618 -1.982311,1.62457 -3.946006,3.27273 -5.843204,4.99666 -1.136076,1.02519 -2.270694,2.0565 -3.497275,2.97405 -0.207889,0.1476 -0.412139,0.30046 -0.623666,0.4428 -0.211783,0.14252 -0.597172,0.16091 -0.645861,0.4115 -0.0461,0.23724 0.749454,-0.56387 0.634193,-0.35144 -0.0987,0.1819 -1.459291,0.76547 -1.728192,0.94207 -0.723225,0.33983 -1.451377,0.67448 -2.227852,0.87628 -0.637564,0.21402 -1.282486,0.40154 -1.928858,0.58711 -1.051981,0.307 -2.093291,0.64697 -3.131513,0.99753 0,0 -0.907023,0.70606 -0.907023,0.70606 z" />
<circle
id="path879"
style="fill:#000000;stroke:#2875ec;stroke-width:0.264583"
cx="116.99651"
cy="194.56647"
r="0.14217871" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:10.5833px;line-height:13.2292px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;letter-spacing:0px;word-spacing:0px;fill:#68121d;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-13.873935"
y="106.14996"
id="text903"><tspan
sodipodi:role="line"
id="tspan901"
x="-13.873935"
y="106.14996"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:10.5833px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#68121d;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-opacity:1">structured</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:10.5833px;line-height:13.2292px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;letter-spacing:0px;word-spacing:0px;fill:#68121d;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-35.179504"
y="215.99982"
id="text903-8"><tspan
sodipodi:role="line"
x="-35.179504"
y="215.99982"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:10.5833px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#68121d;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-opacity:1"
id="tspan973">expressive</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:10.5833px;line-height:13.2292px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;letter-spacing:0px;word-spacing:0px;fill:#68121d;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-106.41733"
y="232.371"
id="text903-88"
transform="rotate(-30)"><tspan
sodipodi:role="line"
id="tspan901-4"
x="-106.41733"
y="232.371"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:10.5833px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#68121d;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-opacity:1">procedural</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:10.5833px;line-height:13.2292px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;letter-spacing:0px;word-spacing:0px;fill:#68121d;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="23.863708"
y="300.68112"
id="text903-3"
transform="rotate(-30)"><tspan
sodipodi:role="line"
x="23.863708"
y="300.68112"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:10.5833px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#68121d;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-opacity:1"
id="tspan977">declarative</tspan></text>
</g>
<script
id="mesh_polyfill"
type="text/javascript">
!function(){const t=&quot;http://www.w3.org/2000/svg&quot;,e=&quot;http://www.w3.org/1999/xlink&quot;,s=&quot;http://www.w3.org/1999/xhtml&quot;,r=2;if(document.createElementNS(t,&quot;meshgradient&quot;).x)return;const n=(t,e,s,r)=&gt;{let n=new x(.5*(e.x+s.x),.5*(e.y+s.y)),o=new x(.5*(t.x+e.x),.5*(t.y+e.y)),i=new x(.5*(s.x+r.x),.5*(s.y+r.y)),a=new x(.5*(n.x+o.x),.5*(n.y+o.y)),h=new x(.5*(n.x+i.x),.5*(n.y+i.y)),l=new x(.5*(a.x+h.x),.5*(a.y+h.y));return[[t,o,a,l],[l,h,i,r]]},o=t=&gt;{let e=t[0].distSquared(t[1]),s=t[2].distSquared(t[3]),r=.25*t[0].distSquared(t[2]),n=.25*t[1].distSquared(t[3]),o=e&gt;s?e:s,i=r&gt;n?r:n;return 18*(o&gt;i?o:i)},i=(t,e)=&gt;Math.sqrt(t.distSquared(e)),a=(t,e)=&gt;t.scale(2/3).add(e.scale(1/3)),h=t=&gt;{let e,s,r,n,o,i,a,h=new g;return t.match(/(\w+\(\s*[^)]+\))+/g).forEach(t=&gt;{let l=t.match(/[\w.-]+/g),d=l.shift();switch(d){case&quot;translate&quot;:2===l.length?e=new g(1,0,0,1,l[0],l[1]):(console.error(&quot;mesh.js: translate does not have 2 arguments!&quot;),e=new g(1,0,0,1,0,0)),h=h.append(e);break;case&quot;scale&quot;:1===l.length?s=new g(l[0],0,0,l[0],0,0):2===l.length?s=new g(l[0],0,0,l[1],0,0):(console.error(&quot;mesh.js: scale does not have 1 or 2 arguments!&quot;),s=new g(1,0,0,1,0,0)),h=h.append(s);break;case&quot;rotate&quot;:if(3===l.length&amp;&amp;(e=new g(1,0,0,1,l[1],l[2]),h=h.append(e)),l[0]){r=l[0]*Math.PI/180;let t=Math.cos(r),e=Math.sin(r);Math.abs(t)&lt;1e-16&amp;&amp;(t=0),Math.abs(e)&lt;1e-16&amp;&amp;(e=0),a=new g(t,e,-e,t,0,0),h=h.append(a)}else console.error(&quot;math.js: No argument to rotate transform!&quot;);3===l.length&amp;&amp;(e=new g(1,0,0,1,-l[1],-l[2]),h=h.append(e));break;case&quot;skewX&quot;:l[0]?(r=l[0]*Math.PI/180,n=Math.tan(r),o=new g(1,0,n,1,0,0),h=h.append(o)):console.error(&quot;math.js: No argument to skewX transform!&quot;);break;case&quot;skewY&quot;:l[0]?(r=l[0]*Math.PI/180,n=Math.tan(r),i=new g(1,n,0,1,0,0),h=h.append(i)):console.error(&quot;math.js: No argument to skewY transform!&quot;);break;case&quot;matrix&quot;:6===l.length?h=h.append(new g(...l)):console.error(&quot;math.js: Incorrect number of arguments for matrix!&quot;);break;default:console.error(&quot;mesh.js: Unhandled transform type: &quot;+d)}}),h},l=t=&gt;{let e=[],s=t.split(/[ ,]+/);for(let t=0,r=s.length-1;t&lt;r;t+=2)e.push(new x(parseFloat(s[t]),parseFloat(s[t+1])));return e},d=(t,e)=&gt;{for(let s in e)t.setAttribute(s,e[s])},c=(t,e,s,r,n)=&gt;{let o,i,a=[0,0,0,0];for(let h=0;h&lt;3;++h)e[h]&lt;t[h]&amp;&amp;e[h]&lt;s[h]||t[h]&lt;e[h]&amp;&amp;s[h]&lt;e[h]?a[h]=0:(a[h]=.5*((e[h]-t[h])/r+(s[h]-e[h])/n),o=Math.abs(3*(e[h]-t[h])/r),i=Math.abs(3*(s[h]-e[h])/n),a[h]&gt;o?a[h]=o:a[h]&gt;i&amp;&amp;(a[h]=i));return a},u=[[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0],[-3,3,0,0,-2,-1,0,0,0,0,0,0,0,0,0,0],[2,-2,0,0,1,1,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0],[0,0,0,0,0,0,0,0,-3,3,0,0,-2,-1,0,0],[0,0,0,0,0,0,0,0,2,-2,0,0,1,1,0,0],[-3,0,3,0,0,0,0,0,-2,0,-1,0,0,0,0,0],[0,0,0,0,-3,0,3,0,0,0,0,0,-2,0,-1,0],[9,-9,-9,9,6,3,-6,-3,6,-6,3,-3,4,2,2,1],[-6,6,6,-6,-3,-3,3,3,-4,4,-2,2,-2,-2,-1,-1],[2,0,-2,0,0,0,0,0,1,0,1,0,0,0,0,0],[0,0,0,0,2,0,-2,0,0,0,0,0,1,0,1,0],[-6,6,6,-6,-4,-2,4,2,-3,3,-3,3,-2,-1,-2,-1],[4,-4,-4,4,2,2,-2,-2,2,-2,2,-2,1,1,1,1]],f=t=&gt;{let e=[];for(let s=0;s&lt;16;++s){e[s]=0;for(let r=0;r&lt;16;++r)e[s]+=u[s][r]*t[r]}return e},p=(t,e,s)=&gt;{const r=e*e,n=s*s,o=e*e*e,i=s*s*s;return t[0]+t[1]*e+t[2]*r+t[3]*o+t[4]*s+t[5]*s*e+t[6]*s*r+t[7]*s*o+t[8]*n+t[9]*n*e+t[10]*n*r+t[11]*n*o+t[12]*i+t[13]*i*e+t[14]*i*r+t[15]*i*o},y=t=&gt;{let e=[],s=[],r=[];for(let s=0;s&lt;4;++s)e[s]=[],e[s][0]=n(t[0][s],t[1][s],t[2][s],t[3][s]),e[s][1]=[],e[s][1].push(...n(...e[s][0][0])),e[s][1].push(...n(...e[s][0][1])),e[s][2]=[],e[s][2].push(...n(...e[s][1][0])),e[s][2].push(...n(...e[s][1][1])),e[s][2].push(...n(...e[s][1][2])),e[s][2].push(...n(...e[s][1][3]));for(let t=0;t&lt;8;++t){s[t]=[];for(let r=0;r&lt;4;++r)s[t][r]=[],s[t][r][0]=n(e[0][2][t][r],e[1][2][t][r],e[2][2][t][r],e[3][2][t][r]),s[t][r][1]=[],s[t][r][1].push(...n(...s[t][r][0][0])),s[t][r][1].push(...n(...s[t][r][0][1])),s[t][r][2]=[],s[t][r][2].push(...n(...s[t][r][1][0])),s[t][r][2].push(...n(...s[t][r][1][1])),s[t][r][2].push(...n(...s[t][r][1][2])),s[t][r][2].push(...n(...s[t][r][1][3]))}for(let t=0;t&lt;8;++t){r[t]=[];for(let e=0;e&lt;8;++e)r[t][e]=[],r[t][e][0]=s[t][0][2][e],r[t][e][1]=s[t][1][2][e],r[t][e][2]=s[t][2][2][e],r[t][e][3]=s[t][3][2][e]}return r};class x{constructor(t,e){this.x=t||0,this.y=e||0}toString(){return`(x=${this.x}, y=${this.y})`}clone(){return new x(this.x,this.y)}add(t){return new x(this.x+t.x,this.y+t.y)}scale(t){return void 0===t.x?new x(this.x*t,this.y*t):new x(this.x*t.x,this.y*t.y)}distSquared(t){let e=this.x-t.x,s=this.y-t.y;return e*e+s*s}transform(t){let e=this.x*t.a+this.y*t.c+t.e,s=this.x*t.b+this.y*t.d+t.f;return new x(e,s)}}class g{constructor(t,e,s,r,n,o){void 0===t?(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0):(this.a=t,this.b=e,this.c=s,this.d=r,this.e=n,this.f=o)}toString(){return`affine: ${this.a} ${this.c} ${this.e} \n ${this.b} ${this.d} ${this.f}`}append(t){t instanceof g||console.error(&quot;mesh.js: argument to Affine.append is not affine!&quot;);let e=this.a*t.a+this.c*t.b,s=this.b*t.a+this.d*t.b,r=this.a*t.c+this.c*t.d,n=this.b*t.c+this.d*t.d,o=this.a*t.e+this.c*t.f+this.e,i=this.b*t.e+this.d*t.f+this.f;return new g(e,s,r,n,o,i)}}class w{constructor(t,e){this.nodes=t,this.colors=e}paintCurve(t,e){if(o(this.nodes)&gt;r){const s=n(...this.nodes);let r=[[],[]],o=[[],[]];for(let t=0;t&lt;4;++t)r[0][t]=this.colors[0][t],r[1][t]=(this.colors[0][t]+this.colors[1][t])/2,o[0][t]=r[1][t],o[1][t]=this.colors[1][t];let i=new w(s[0],r),a=new w(s[1],o);i.paintCurve(t,e),a.paintCurve(t,e)}else{let s=Math.round(this.nodes[0].x);if(s&gt;=0&amp;&amp;s&lt;e){let r=4*(~~this.nodes[0].y*e+s);t[r]=Math.round(this.colors[0][0]),t[r+1]=Math.round(this.colors[0][1]),t[r+2]=Math.round(this.colors[0][2]),t[r+3]=Math.round(this.colors[0][3])}}}}class m{constructor(t,e){this.nodes=t,this.colors=e}split(){let t=[[],[],[],[]],e=[[],[],[],[]],s=[[[],[]],[[],[]]],r=[[[],[]],[[],[]]];for(let s=0;s&lt;4;++s){const r=n(this.nodes[0][s],this.nodes[1][s],this.nodes[2][s],this.nodes[3][s]);t[0][s]=r[0][0],t[1][s]=r[0][1],t[2][s]=r[0][2],t[3][s]=r[0][3],e[0][s]=r[1][0],e[1][s]=r[1][1],e[2][s]=r[1][2],e[3][s]=r[1][3]}for(let t=0;t&lt;4;++t)s[0][0][t]=this.colors[0][0][t],s[0][1][t]=this.colors[0][1][t],s[1][0][t]=(this.colors[0][0][t]+this.colors[1][0][t])/2,s[1][1][t]=(this.colors[0][1][t]+this.colors[1][1][t])/2,r[0][0][t]=s[1][0][t],r[0][1][t]=s[1][1][t],r[1][0][t]=this.colors[1][0][t],r[1][1][t]=this.colors[1][1][t];return[new m(t,s),new m(e,r)]}paint(t,e){let s,n=!1;for(let t=0;t&lt;4;++t)if((s=o([this.nodes[0][t],this.nodes[1][t],this.nodes[2][t],this.nodes[3][t]]))&gt;r){n=!0;break}if(n){let s=this.split();s[0].paint(t,e),s[1].paint(t,e)}else{new w([...this.nodes[0]],[...this.colors[0]]).paintCurve(t,e)}}}class b{constructor(t){this.readMesh(t),this.type=t.getAttribute(&quot;type&quot;)||&quot;bilinear&quot;}readMesh(t){let e=[[]],s=[[]],r=Number(t.getAttribute(&quot;x&quot;)),n=Number(t.getAttribute(&quot;y&quot;));e[0][0]=new x(r,n);let o=t.children;for(let t=0,r=o.length;t&lt;r;++t){e[3*t+1]=[],e[3*t+2]=[],e[3*t+3]=[],s[t+1]=[];let r=o[t].children;for(let n=0,o=r.length;n&lt;o;++n){let o=r[n].children;for(let r=0,i=o.length;r&lt;i;++r){let i=r;0!==t&amp;&amp;++i;let h,d=o[r].getAttribute(&quot;path&quot;),c=&quot;l&quot;;null!=d&amp;&amp;(c=(h=d.match(/\s*([lLcC])\s*(.*)/))[1]);let u=l(h[2]);switch(c){case&quot;l&quot;:0===i?(e[3*t][3*n+3]=u[0].add(e[3*t][3*n]),e[3*t][3*n+1]=a(e[3*t][3*n],e[3*t][3*n+3]),e[3*t][3*n+2]=a(e[3*t][3*n+3],e[3*t][3*n])):1===i?(e[3*t+3][3*n+3]=u[0].add(e[3*t][3*n+3]),e[3*t+1][3*n+3]=a(e[3*t][3*n+3],e[3*t+3][3*n+3]),e[3*t+2][3*n+3]=a(e[3*t+3][3*n+3],e[3*t][3*n+3])):2===i?(0===n&amp;&amp;(e[3*t+3][3*n+0]=u[0].add(e[3*t+3][3*n+3])),e[3*t+3][3*n+1]=a(e[3*t+3][3*n],e[3*t+3][3*n+3]),e[3*t+3][3*n+2]=a(e[3*t+3][3*n+3],e[3*t+3][3*n])):(e[3*t+1][3*n]=a(e[3*t][3*n],e[3*t+3][3*n]),e[3*t+2][3*n]=a(e[3*t+3][3*n],e[3*t][3*n]));break;case&quot;L&quot;:0===i?(e[3*t][3*n+3]=u[0],e[3*t][3*n+1]=a(e[3*t][3*n],e[3*t][3*n+3]),e[3*t][3*n+2]=a(e[3*t][3*n+3],e[3*t][3*n])):1===i?(e[3*t+3][3*n+3]=u[0],e[3*t+1][3*n+3]=a(e[3*t][3*n+3],e[3*t+3][3*n+3]),e[3*t+2][3*n+3]=a(e[3*t+3][3*n+3],e[3*t][3*n+3])):2===i?(0===n&amp;&amp;(e[3*t+3][3*n+0]=u[0]),e[3*t+3][3*n+1]=a(e[3*t+3][3*n],e[3*t+3][3*n+3]),e[3*t+3][3*n+2]=a(e[3*t+3][3*n+3],e[3*t+3][3*n])):(e[3*t+1][3*n]=a(e[3*t][3*n],e[3*t+3][3*n]),e[3*t+2][3*n]=a(e[3*t+3][3*n],e[3*t][3*n]));break;case&quot;c&quot;:0===i?(e[3*t][3*n+1]=u[0].add(e[3*t][3*n]),e[3*t][3*n+2]=u[1].add(e[3*t][3*n]),e[3*t][3*n+3]=u[2].add(e[3*t][3*n])):1===i?(e[3*t+1][3*n+3]=u[0].add(e[3*t][3*n+3]),e[3*t+2][3*n+3]=u[1].add(e[3*t][3*n+3]),e[3*t+3][3*n+3]=u[2].add(e[3*t][3*n+3])):2===i?(e[3*t+3][3*n+2]=u[0].add(e[3*t+3][3*n+3]),e[3*t+3][3*n+1]=u[1].add(e[3*t+3][3*n+3]),0===n&amp;&amp;(e[3*t+3][3*n+0]=u[2].add(e[3*t+3][3*n+3]))):(e[3*t+2][3*n]=u[0].add(e[3*t+3][3*n]),e[3*t+1][3*n]=u[1].add(e[3*t+3][3*n]));break;case&quot;C&quot;:0===i?(e[3*t][3*n+1]=u[0],e[3*t][3*n+2]=u[1],e[3*t][3*n+3]=u[2]):1===i?(e[3*t+1][3*n+3]=u[0],e[3*t+2][3*n+3]=u[1],e[3*t+3][3*n+3]=u[2]):2===i?(e[3*t+3][3*n+2]=u[0],e[3*t+3][3*n+1]=u[1],0===n&amp;&amp;(e[3*t+3][3*n+0]=u[2])):(e[3*t+2][3*n]=u[0],e[3*t+1][3*n]=u[1]);break;default:console.error(&quot;mesh.js: &quot;+c+&quot; invalid path type.&quot;)}if(0===t&amp;&amp;0===n||r&gt;0){let e=window.getComputedStyle(o[r]).stopColor.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),a=window.getComputedStyle(o[r]).stopOpacity,h=255;a&amp;&amp;(h=Math.floor(255*a)),e&amp;&amp;(0===i?(s[t][n]=[],s[t][n][0]=Math.floor(e[1]),s[t][n][1]=Math.floor(e[2]),s[t][n][2]=Math.floor(e[3]),s[t][n][3]=h):1===i?(s[t][n+1]=[],s[t][n+1][0]=Math.floor(e[1]),s[t][n+1][1]=Math.floor(e[2]),s[t][n+1][2]=Math.floor(e[3]),s[t][n+1][3]=h):2===i?(s[t+1][n+1]=[],s[t+1][n+1][0]=Math.floor(e[1]),s[t+1][n+1][1]=Math.floor(e[2]),s[t+1][n+1][2]=Math.floor(e[3]),s[t+1][n+1][3]=h):3===i&amp;&amp;(s[t+1][n]=[],s[t+1][n][0]=Math.floor(e[1]),s[t+1][n][1]=Math.floor(e[2]),s[t+1][n][2]=Math.floor(e[3]),s[t+1][n][3]=h))}}e[3*t+1][3*n+1]=new x,e[3*t+1][3*n+2]=new x,e[3*t+2][3*n+1]=new x,e[3*t+2][3*n+2]=new x,e[3*t+1][3*n+1].x=(-4*e[3*t][3*n].x+6*(e[3*t][3*n+1].x+e[3*t+1][3*n].x)+-2*(e[3*t][3*n+3].x+e[3*t+3][3*n].x)+3*(e[3*t+3][3*n+1].x+e[3*t+1][3*n+3].x)+-1*e[3*t+3][3*n+3].x)/9,e[3*t+1][3*n+2].x=(-4*e[3*t][3*n+3].x+6*(e[3*t][3*n+2].x+e[3*t+1][3*n+3].x)+-2*(e[3*t][3*n].x+e[3*t+3][3*n+3].x)+3*(e[3*t+3][3*n+2].x+e[3*t+1][3*n].x)+-1*e[3*t+3][3*n].x)/9,e[3*t+2][3*n+1].x=(-4*e[3*t+3][3*n].x+6*(e[3*t+3][3*n+1].x+e[3*t+2][3*n].x)+-2*(e[3*t+3][3*n+3].x+e[3*t][3*n].x)+3*(e[3*t][3*n+1].x+e[3*t+2][3*n+3].x)+-1*e[3*t][3*n+3].x)/9,e[3*t+2][3*n+2].x=(-4*e[3*t+3][3*n+3].x+6*(e[3*t+3][3*n+2].x+e[3*t+2][3*n+3].x)+-2*(e[3*t+3][3*n].x+e[3*t][3*n+3].x)+3*(e[3*t][3*n+2].x+e[3*t+2][3*n].x)+-1*e[3*t][3*n].x)/9,e[3*t+1][3*n+1].y=(-4*e[3*t][3*n].y+6*(e[3*t][3*n+1].y+e[3*t+1][3*n].y)+-2*(e[3*t][3*n+3].y+e[3*t+3][3*n].y)+3*(e[3*t+3][3*n+1].y+e[3*t+1][3*n+3].y)+-1*e[3*t+3][3*n+3].y)/9,e[3*t+1][3*n+2].y=(-4*e[3*t][3*n+3].y+6*(e[3*t][3*n+2].y+e[3*t+1][3*n+3].y)+-2*(e[3*t][3*n].y+e[3*t+3][3*n+3].y)+3*(e[3*t+3][3*n+2].y+e[3*t+1][3*n].y)+-1*e[3*t+3][3*n].y)/9,e[3*t+2][3*n+1].y=(-4*e[3*t+3][3*n].y+6*(e[3*t+3][3*n+1].y+e[3*t+2][3*n].y)+-2*(e[3*t+3][3*n+3].y+e[3*t][3*n].y)+3*(e[3*t][3*n+1].y+e[3*t+2][3*n+3].y)+-1*e[3*t][3*n+3].y)/9,e[3*t+2][3*n+2].y=(-4*e[3*t+3][3*n+3].y+6*(e[3*t+3][3*n+2].y+e[3*t+2][3*n+3].y)+-2*(e[3*t+3][3*n].y+e[3*t][3*n+3].y)+3*(e[3*t][3*n+2].y+e[3*t+2][3*n].y)+-1*e[3*t][3*n].y)/9}}this.nodes=e,this.colors=s}paintMesh(t,e){let s=(this.nodes.length-1)/3,r=(this.nodes[0].length-1)/3;if(&quot;bilinear&quot;===this.type||s&lt;2||r&lt;2){let n;for(let o=0;o&lt;s;++o)for(let s=0;s&lt;r;++s){let r=[];for(let t=3*o,e=3*o+4;t&lt;e;++t)r.push(this.nodes[t].slice(3*s,3*s+4));let i=[];i.push(this.colors[o].slice(s,s+2)),i.push(this.colors[o+1].slice(s,s+2)),(n=new m(r,i)).paint(t,e)}}else{let n,o,a,h,l,d,u;const x=s,g=r;s++,r++;let w=new Array(s);for(let t=0;t&lt;s;++t){w[t]=new Array(r);for(let e=0;e&lt;r;++e)w[t][e]=[],w[t][e][0]=this.nodes[3*t][3*e],w[t][e][1]=this.colors[t][e]}for(let t=0;t&lt;s;++t)for(let e=0;e&lt;r;++e)0!==t&amp;&amp;t!==x&amp;&amp;(n=i(w[t-1][e][0],w[t][e][0]),o=i(w[t+1][e][0],w[t][e][0]),w[t][e][2]=c(w[t-1][e][1],w[t][e][1],w[t+1][e][1],n,o)),0!==e&amp;&amp;e!==g&amp;&amp;(n=i(w[t][e-1][0],w[t][e][0]),o=i(w[t][e+1][0],w[t][e][0]),w[t][e][3]=c(w[t][e-1][1],w[t][e][1],w[t][e+1][1],n,o));for(let t=0;t&lt;r;++t){w[0][t][2]=[],w[x][t][2]=[];for(let e=0;e&lt;4;++e)n=i(w[1][t][0],w[0][t][0]),o=i(w[x][t][0],w[x-1][t][0]),w[0][t][2][e]=n&gt;0?2*(w[1][t][1][e]-w[0][t][1][e])/n-w[1][t][2][e]:0,w[x][t][2][e]=o&gt;0?2*(w[x][t][1][e]-w[x-1][t][1][e])/o-w[x-1][t][2][e]:0}for(let t=0;t&lt;s;++t){w[t][0][3]=[],w[t][g][3]=[];for(let e=0;e&lt;4;++e)n=i(w[t][1][0],w[t][0][0]),o=i(w[t][g][0],w[t][g-1][0]),w[t][0][3][e]=n&gt;0?2*(w[t][1][1][e]-w[t][0][1][e])/n-w[t][1][3][e]:0,w[t][g][3][e]=o&gt;0?2*(w[t][g][1][e]-w[t][g-1][1][e])/o-w[t][g-1][3][e]:0}for(let s=0;s&lt;x;++s)for(let r=0;r&lt;g;++r){let n=i(w[s][r][0],w[s+1][r][0]),o=i(w[s][r+1][0],w[s+1][r+1][0]),c=i(w[s][r][0],w[s][r+1][0]),x=i(w[s+1][r][0],w[s+1][r+1][0]),g=[[],[],[],[]];for(let t=0;t&lt;4;++t){(d=[])[0]=w[s][r][1][t],d[1]=w[s+1][r][1][t],d[2]=w[s][r+1][1][t],d[3]=w[s+1][r+1][1][t],d[4]=w[s][r][2][t]*n,d[5]=w[s+1][r][2][t]*n,d[6]=w[s][r+1][2][t]*o,d[7]=w[s+1][r+1][2][t]*o,d[8]=w[s][r][3][t]*c,d[9]=w[s+1][r][3][t]*x,d[10]=w[s][r+1][3][t]*c,d[11]=w[s+1][r+1][3][t]*x,d[12]=0,d[13]=0,d[14]=0,d[15]=0,u=f(d);for(let e=0;e&lt;9;++e){g[t][e]=[];for(let s=0;s&lt;9;++s)g[t][e][s]=p(u,e/8,s/8),g[t][e][s]&gt;255?g[t][e][s]=255:g[t][e][s]&lt;0&amp;&amp;(g[t][e][s]=0)}}h=[];for(let t=3*s,e=3*s+4;t&lt;e;++t)h.push(this.nodes[t].slice(3*r,3*r+4));l=y(h);for(let s=0;s&lt;8;++s)for(let r=0;r&lt;8;++r)(a=new m(l[s][r],[[[g[0][s][r],g[1][s][r],g[2][s][r],g[3][s][r]],[g[0][s][r+1],g[1][s][r+1],g[2][s][r+1],g[3][s][r+1]]],[[g[0][s+1][r],g[1][s+1][r],g[2][s+1][r],g[3][s+1][r]],[g[0][s+1][r+1],g[1][s+1][r+1],g[2][s+1][r+1],g[3][s+1][r+1]]]])).paint(t,e)}}}transform(t){if(t instanceof x)for(let e=0,s=this.nodes.length;e&lt;s;++e)for(let s=0,r=this.nodes[0].length;s&lt;r;++s)this.nodes[e][s]=this.nodes[e][s].add(t);else if(t instanceof g)for(let e=0,s=this.nodes.length;e&lt;s;++e)for(let s=0,r=this.nodes[0].length;s&lt;r;++s)this.nodes[e][s]=this.nodes[e][s].transform(t)}scale(t){for(let e=0,s=this.nodes.length;e&lt;s;++e)for(let s=0,r=this.nodes[0].length;s&lt;r;++s)this.nodes[e][s]=this.nodes[e][s].scale(t)}}document.querySelectorAll(&quot;rect,circle,ellipse,path,text&quot;).forEach((r,n)=&gt;{let o=r.getAttribute(&quot;id&quot;);o||(o=&quot;patchjs_shape&quot;+n,r.setAttribute(&quot;id&quot;,o));const i=r.style.fill.match(/^url\(\s*&quot;?\s*#([^\s&quot;]+)&quot;?\s*\)/),a=r.style.stroke.match(/^url\(\s*&quot;?\s*#([^\s&quot;]+)&quot;?\s*\)/);if(i&amp;&amp;i[1]){const a=document.getElementById(i[1]);if(a&amp;&amp;&quot;meshgradient&quot;===a.nodeName){const i=r.getBBox();let l=document.createElementNS(s,&quot;canvas&quot;);d(l,{width:i.width,height:i.height});const c=l.getContext(&quot;2d&quot;);let u=c.createImageData(i.width,i.height);const f=new b(a);&quot;objectBoundingBox&quot;===a.getAttribute(&quot;gradientUnits&quot;)&amp;&amp;f.scale(new x(i.width,i.height));const p=a.getAttribute(&quot;gradientTransform&quot;);null!=p&amp;&amp;f.transform(h(p)),&quot;userSpaceOnUse&quot;===a.getAttribute(&quot;gradientUnits&quot;)&amp;&amp;f.transform(new x(-i.x,-i.y)),f.paintMesh(u.data,l.width),c.putImageData(u,0,0);const y=document.createElementNS(t,&quot;image&quot;);d(y,{width:i.width,height:i.height,x:i.x,y:i.y});let g=l.toDataURL();y.setAttributeNS(e,&quot;xlink:href&quot;,g),r.parentNode.insertBefore(y,r),r.style.fill=&quot;none&quot;;const w=document.createElementNS(t,&quot;use&quot;);w.setAttributeNS(e,&quot;xlink:href&quot;,&quot;#&quot;+o);const m=&quot;patchjs_clip&quot;+n,M=document.createElementNS(t,&quot;clipPath&quot;);M.setAttribute(&quot;id&quot;,m),M.appendChild(w),r.parentElement.insertBefore(M,r),y.setAttribute(&quot;clip-path&quot;,&quot;url(#&quot;+m+&quot;)&quot;),u=null,l=null,g=null}}if(a&amp;&amp;a[1]){const o=document.getElementById(a[1]);if(o&amp;&amp;&quot;meshgradient&quot;===o.nodeName){const i=parseFloat(r.style.strokeWidth.slice(0,-2))*(parseFloat(r.style.strokeMiterlimit)||parseFloat(r.getAttribute(&quot;stroke-miterlimit&quot;))||1),a=r.getBBox(),l=Math.trunc(a.width+i),c=Math.trunc(a.height+i),u=Math.trunc(a.x-i/2),f=Math.trunc(a.y-i/2);let p=document.createElementNS(s,&quot;canvas&quot;);d(p,{width:l,height:c});const y=p.getContext(&quot;2d&quot;);let g=y.createImageData(l,c);const w=new b(o);&quot;objectBoundingBox&quot;===o.getAttribute(&quot;gradientUnits&quot;)&amp;&amp;w.scale(new x(l,c));const m=o.getAttribute(&quot;gradientTransform&quot;);null!=m&amp;&amp;w.transform(h(m)),&quot;userSpaceOnUse&quot;===o.getAttribute(&quot;gradientUnits&quot;)&amp;&amp;w.transform(new x(-u,-f)),w.paintMesh(g.data,p.width),y.putImageData(g,0,0);const M=document.createElementNS(t,&quot;image&quot;);d(M,{width:l,height:c,x:0,y:0});let S=p.toDataURL();M.setAttributeNS(e,&quot;xlink:href&quot;,S);const k=&quot;pattern_clip&quot;+n,A=document.createElementNS(t,&quot;pattern&quot;);d(A,{id:k,patternUnits:&quot;userSpaceOnUse&quot;,width:l,height:c,x:u,y:f}),A.appendChild(M),o.parentNode.appendChild(A),r.style.stroke=&quot;url(#&quot;+k+&quot;)&quot;,g=null,p=null,S=null}}})}();
</script>
</svg>