agentic-mermaid 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/agent-core.d.ts +7 -7
  3. package/dist/agent-core.js +1 -1
  4. package/dist/agent.d.ts +7 -7
  5. package/dist/agent.js +1 -1
  6. package/dist/agentic-mermaid-mcp.js +1 -1
  7. package/dist/am.js +1 -1
  8. package/dist/browser-lazy/chunks/{agentic-producer-core-CC6OOLDW.js → agentic-producer-core-ECZ3CMZM.js} +1 -1
  9. package/dist/browser-lazy/chunks/{architecture-QUFVKYJR.js → architecture-H5LTMKQW.js} +6 -6
  10. package/dist/browser-lazy/chunks/{block-6J3Q63BO.js → block-566X6FNV.js} +5 -5
  11. package/dist/browser-lazy/chunks/{builtin-backends-7SOZZHPF.js → builtin-backends-VAFEZXKY.js} +6 -6
  12. package/dist/browser-lazy/chunks/{c4-SQVBZAKJ.js → c4-ZXFDLBFK.js} +5 -5
  13. package/dist/browser-lazy/chunks/{chunk-5X6MJX3H.js → chunk-2JQXRKBC.js} +1 -1
  14. package/dist/browser-lazy/chunks/{chunk-E2WMJZNM.js → chunk-37FZNMPR.js} +1 -1
  15. package/dist/browser-lazy/chunks/{chunk-TYZOZXUJ.js → chunk-3JTYTXA6.js} +6 -6
  16. package/dist/browser-lazy/chunks/{chunk-PQGPS2YV.js → chunk-4NILRBC7.js} +1 -1
  17. package/dist/browser-lazy/chunks/{chunk-AMJLVPUB.js → chunk-5LKPDHPC.js} +2 -2
  18. package/dist/browser-lazy/chunks/{chunk-BY2CPG6B.js → chunk-62MR3LWJ.js} +1 -1
  19. package/dist/browser-lazy/chunks/{chunk-J7FFAFQF.js → chunk-64JFHCJC.js} +1 -1
  20. package/dist/browser-lazy/chunks/chunk-6GPDLZFQ.js +1 -0
  21. package/dist/browser-lazy/chunks/{chunk-VWVZGQE2.js → chunk-6UOOATQR.js} +1 -1
  22. package/dist/browser-lazy/chunks/chunk-7TTFBJYA.js +1 -0
  23. package/dist/browser-lazy/chunks/chunk-7UFOFWBA.js +20 -0
  24. package/dist/browser-lazy/chunks/{chunk-5B2Z7575.js → chunk-A7V5VDKN.js} +1 -1
  25. package/dist/browser-lazy/chunks/chunk-CPO5P4L2.js +1 -0
  26. package/dist/browser-lazy/chunks/chunk-EIYLJ4FI.js +20 -0
  27. package/dist/browser-lazy/chunks/{chunk-X2UYKWKM.js → chunk-G4JBA7HU.js} +3 -3
  28. package/dist/browser-lazy/chunks/{chunk-2UIA2IME.js → chunk-IUI4DYC3.js} +1 -1
  29. package/dist/browser-lazy/chunks/{chunk-QA6GJQ4X.js → chunk-J57YRC2M.js} +1 -1
  30. package/dist/browser-lazy/chunks/{chunk-BU5LHXNJ.js → chunk-LBXXKLIR.js} +3 -3
  31. package/dist/browser-lazy/chunks/chunk-NKW2ZNCD.js +1 -0
  32. package/dist/browser-lazy/chunks/{chunk-ICC7HBJX.js → chunk-O34YYEQV.js} +1 -1
  33. package/dist/browser-lazy/chunks/{chunk-UL6NDWLL.js → chunk-OBI5U5XU.js} +1 -1
  34. package/dist/browser-lazy/chunks/{chunk-YCEICNM6.js → chunk-OFOS57WQ.js} +1 -1
  35. package/dist/browser-lazy/chunks/{chunk-OZ443IVJ.js → chunk-PSZEE64O.js} +7 -7
  36. package/dist/browser-lazy/chunks/{chunk-SZELX2EJ.js → chunk-PXTLV57R.js} +1 -1
  37. package/dist/browser-lazy/chunks/{chunk-HLWUNUCM.js → chunk-QVSZOF5M.js} +1 -1
  38. package/dist/browser-lazy/chunks/{chunk-2GPK4VFF.js → chunk-TT5GR5EJ.js} +1 -1
  39. package/dist/browser-lazy/chunks/{chunk-DF6765YX.js → chunk-V6I2VGNQ.js} +5 -5
  40. package/dist/browser-lazy/chunks/{chunk-CN7WTBWB.js → chunk-VRZKI33U.js} +1 -1
  41. package/dist/browser-lazy/chunks/{chunk-2SH76OTH.js → chunk-XHU3A432.js} +1 -1
  42. package/dist/browser-lazy/chunks/{chunk-NO7ZIVRU.js → chunk-YVNJDVQO.js} +1 -1
  43. package/dist/browser-lazy/chunks/chunk-Z7UHFVKN.js +6 -0
  44. package/dist/browser-lazy/chunks/{class-5QA4SCTS.js → class-XIFNVBFE.js} +8 -8
  45. package/dist/{zenuml/chunks/decode-BWERFDGK.js → browser-lazy/chunks/decode-5MFOG3AZ.js} +1 -1
  46. package/dist/browser-lazy/chunks/{elk.bundled-L4CADV5W.js → elk.bundled-RYWHIS5N.js} +8 -8
  47. package/dist/browser-lazy/chunks/er-VEUYJBGG.js +11 -0
  48. package/dist/browser-lazy/chunks/{eventmodeling-2BPLHWRN.js → eventmodeling-G7DITZX7.js} +10 -10
  49. package/dist/browser-lazy/chunks/{flowchart-NEIMZTB5.js → flowchart-SSFIU4EU.js} +1 -1
  50. package/dist/browser-lazy/chunks/{forest-implementation-AEP24AIP.js → forest-implementation-RWFF7XDV.js} +1 -1
  51. package/dist/browser-lazy/chunks/{gantt-RDPIFYAF.js → gantt-HQNVDX2B.js} +6 -6
  52. package/dist/browser-lazy/chunks/{gitgraph-N4Y5RYB7.js → gitgraph-Z5MN6M6L.js} +4 -4
  53. package/dist/browser-lazy/chunks/{ishikawa-LD3YBDJN.js → ishikawa-UEERNFQV.js} +2 -2
  54. package/dist/browser-lazy/chunks/{journey-6YQR5DJX.js → journey-3BEWWGB5.js} +6 -6
  55. package/dist/browser-lazy/chunks/{kanban-PLMJ7NBW.js → kanban-2WFNCWLB.js} +10 -10
  56. package/dist/browser-lazy/chunks/{mermaid-yaml-runtime-QVYX4EWK.js → mermaid-yaml-runtime-IK4ET4BT.js} +8 -8
  57. package/dist/browser-lazy/chunks/{mindmap-K2UBFO3Y.js → mindmap-R2C6SNYR.js} +4 -4
  58. package/dist/browser-lazy/chunks/{packet-CUW4QY6Y.js → packet-GMVCI5YZ.js} +3 -3
  59. package/dist/browser-lazy/chunks/{pie-7F7UUCG3.js → pie-WER45DKC.js} +7 -7
  60. package/dist/browser-lazy/chunks/{quadrant-TOONO2WC.js → quadrant-NCUPSFKN.js} +4 -4
  61. package/dist/browser-lazy/chunks/{radar-J6JVWVAX.js → radar-WLYS4YC5.js} +8 -8
  62. package/dist/browser-lazy/chunks/render-core-42UVWIPF.js +3 -0
  63. package/dist/browser-lazy/chunks/{requirement-CMAKDJPO.js → requirement-AK3NWMJ6.js} +7 -7
  64. package/dist/browser-lazy/chunks/{sankey-AWXQEP3F.js → sankey-C2DY6WVU.js} +4 -4
  65. package/dist/browser-lazy/chunks/{sequence-Q2RJRB4L.js → sequence-D4WJB44W.js} +1 -1
  66. package/dist/browser-lazy/chunks/{state-WRBFQEDX.js → state-YUQVESE7.js} +2 -2
  67. package/dist/browser-lazy/chunks/{timeline-D2KILFXM.js → timeline-BMBJJXWR.js} +4 -4
  68. package/dist/browser-lazy/chunks/{treemap-N3VYX5D4.js → treemap-B66XBZZ6.js} +3 -3
  69. package/dist/browser-lazy/chunks/{xychart-G73OGK66.js → xychart-HAVFROGT.js} +6 -6
  70. package/dist/browser-lazy/chunks/{zenuml-H4BXNYXR.js → zenuml-62RLYFWP.js} +7 -7
  71. package/dist/browser-lazy/index.js +1 -1
  72. package/dist/browser.global.js +507 -507
  73. package/dist/{chunk-DQDKA5ND.js → chunk-2DNGDTJD.js} +2 -2
  74. package/dist/{chunk-GVCHLSHH.js → chunk-4F2UGYTM.js} +2 -2
  75. package/dist/{chunk-H3NCS2XZ.js → chunk-7XYB2LNC.js} +2 -2
  76. package/dist/chunk-DOFB572I.js +58 -0
  77. package/dist/chunk-EHJI3QYE.js +52 -0
  78. package/dist/{chunk-UA234O4M.js → chunk-HINRNKPO.js} +2 -2
  79. package/dist/{chunk-JZOJ4YGS.js → chunk-KXMANAST.js} +33 -33
  80. package/dist/{chunk-7CRDX2QR.js → chunk-U4MT3RRE.js} +2 -2
  81. package/dist/{chunk-NKNFOREZ.js → chunk-WYIB6BUR.js} +2 -2
  82. package/dist/{cli-YGGTJZH7.js → cli-ZYIDBYNS.js} +2 -2
  83. package/dist/{index-EeXqJXr5.d.ts → index-Bvhprdxz.d.ts} +3 -3
  84. package/dist/index.d.ts +4 -4
  85. package/dist/index.js +1 -1
  86. package/dist/{mcp-cli-63DYXTVD.js → mcp-cli-YVDCORWA.js} +2 -2
  87. package/dist/{paint-certification-6rwQjIv_.d.ts → paint-certification-BoLyr006.d.ts} +2 -2
  88. package/dist/{server-5NEOHOFS.js → server-4JGAVXR3.js} +2 -2
  89. package/dist/{svg-styles-BdnoM7AT.d.ts → svg-styles-BnCoXyYe.d.ts} +1 -1
  90. package/dist/svg-styles.d.ts +1 -1
  91. package/dist/svg-styles.js +1 -1
  92. package/dist/svg.d.ts +4 -4
  93. package/dist/svg.js +1 -1
  94. package/dist/{types-BcS52Mjt.d.ts → types-CLVJCaH2.d.ts} +1 -1
  95. package/dist/zenuml/chunks/{appearance-UOQ5KA6O.js → appearance-5RM5MVM2.js} +1 -1
  96. package/dist/zenuml/chunks/{builtin-backends-KDKE7YHO.js → builtin-backends-UTNWL4N3.js} +11 -11
  97. package/dist/zenuml/chunks/{chunk-QWX77U7G.js → chunk-3A6S6GNB.js} +2 -2
  98. package/dist/zenuml/chunks/{chunk-OXQWRSBM.js → chunk-55WS466K.js} +11 -11
  99. package/dist/zenuml/chunks/chunk-6J4BGPB2.js +29 -0
  100. package/dist/zenuml/chunks/chunk-CNLL4BGF.js +1 -0
  101. package/dist/zenuml/chunks/{chunk-RZ6XK5CD.js → chunk-IARQ24W3.js} +13 -13
  102. package/dist/zenuml/chunks/{chunk-42DXZ5C6.js → chunk-ZNZRIISS.js} +2 -2
  103. package/dist/{browser-lazy/chunks/decode-63UIZGD2.js → zenuml/chunks/decode-LDNNXEAO.js} +1 -1
  104. package/dist/zenuml/chunks/{mermaid-yaml-runtime-KZVU74WU.js → mermaid-yaml-runtime-A5CNJ3IE.js} +8 -8
  105. package/dist/zenuml/chunks/render-core-ECIWU5ZS.js +3 -0
  106. package/dist/zenuml/chunks/{zenuml-EA2ZFRUX.js → zenuml-N3LZMB2G.js} +8 -8
  107. package/dist/zenuml.d.ts +2 -2
  108. package/dist/zenuml.js +1 -1
  109. package/docs/MCP-DIRECTORY-LISTINGS.md +81 -12
  110. package/docs/api.md +1 -1
  111. package/package.json +1 -1
  112. package/server.json +2 -2
  113. package/dist/browser-lazy/chunks/chunk-4LHYF3BS.js +0 -1
  114. package/dist/browser-lazy/chunks/chunk-FAIMVOX5.js +0 -6
  115. package/dist/browser-lazy/chunks/chunk-GVOEAY52.js +0 -1
  116. package/dist/browser-lazy/chunks/chunk-J35HAQQF.js +0 -20
  117. package/dist/browser-lazy/chunks/chunk-RIVTHZAQ.js +0 -1
  118. package/dist/browser-lazy/chunks/chunk-Z3FDIVLN.js +0 -20
  119. package/dist/browser-lazy/chunks/er-7ZSKGN7Y.js +0 -11
  120. package/dist/browser-lazy/chunks/render-core-BZOM3K7D.js +0 -3
  121. package/dist/chunk-EHCMJUMD.js +0 -52
  122. package/dist/chunk-OMY6NRQD.js +0 -58
  123. package/dist/zenuml/chunks/chunk-7TVYPTDW.js +0 -1
  124. package/dist/zenuml/chunks/chunk-RLJEI7YN.js +0 -29
  125. package/dist/zenuml/chunks/render-core-V5RQ737O.js +0 -3
  126. /package/dist/browser-lazy/chunks/{chunk-5FQ534HP.js → chunk-BMZ24VPS.js} +0 -0
  127. /package/dist/browser-lazy/chunks/{chunk-2I4UPL7Q.js → chunk-D6MQ7QSU.js} +0 -0
  128. /package/dist/browser-lazy/chunks/{chunk-CQE4HQEW.js → chunk-HJVO5VC3.js} +0 -0
  129. /package/dist/browser-lazy/chunks/{chunk-LH7HUDKW.js → chunk-L4UC3KGS.js} +0 -0
  130. /package/dist/browser-lazy/chunks/{chunk-NMQQMRIR.js → chunk-MFTQWHUB.js} +0 -0
  131. /package/dist/browser-lazy/chunks/{chunk-N5ELX7LR.js → chunk-PJJSDGLB.js} +0 -0
  132. /package/dist/browser-lazy/chunks/{chunk-CSFUKSU6.js → chunk-QCU5G5PZ.js} +0 -0
  133. /package/dist/browser-lazy/chunks/{chunk-VQYYGAXP.js → chunk-TLFX3U6S.js} +0 -0
  134. /package/dist/browser-lazy/chunks/{chunk-5UVGUSD6.js → chunk-YHMTSXIR.js} +0 -0
  135. /package/dist/zenuml/chunks/{chunk-EVPSMEKN.js → chunk-GC7IPQ5P.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{Dd as de,Fc as pe,Ia as Nt,Kd as ge,Md as me,Nd as ke,Od as Bt,Qb as gt,Ra as O,Td as ye,Vb as fe,Wa as he,Xb as G,j as ae,jd as jt,kd as Gt,l as oe,m as ce,sb as _t,ua as ue,z as le}from"./chunk-OMY6NRQD.js";function Rt(t,e,n){if(t&&t.length){const[s,r]=e;const i=Math.PI/180*n;const o=Math.cos(i);const a=Math.sin(i);for(const l of t){const[u,c]=l;l[0]=(u-s)*o-(c-r)*a+s;l[1]=(u-s)*a+(c-r)*o+r}}}function hn(t,e,n){const s=[];t.forEach(r=>s.push(...r));Rt(s,e,n)}function fn(t,e){return t[0]===e[0]&&t[1]===e[1]}function xe(t,e,n,s=1){const r=n;const i=Math.max(e,.1);const o=t[0]&&t[0][0]&&typeof t[0][0]==="number"?[t]:t;const a=[0,0];if(r){for(const u of o){Rt(u,a,r)}}const l=pn(o,i,s);if(r){for(const u of o){Rt(u,a,-r)}hn(l,a,-r)}return l}function pn(t,e,n){const s=[];for(const u of t){const c=[...u];if(!fn(c[0],c[c.length-1])){c.push([c[0][0],c[0][1]])}if(c.length>2){s.push(c)}}const r=[];e=Math.max(e,.1);const i=[];for(const u of s){for(let c=0;c<u.length-1;c++){const h=u[c];const f=u[c+1];if(h[1]!==f[1]){const p=Math.min(h[1],f[1]);i.push({ymin:p,ymax:Math.max(h[1],f[1]),x:p===h[1]?h[0]:f[0],islope:(f[0]-h[0])/(f[1]-h[1])})}}}i.sort((u,c)=>{if(u.ymin<c.ymin){return-1}if(u.ymin>c.ymin){return 1}if(u.x<c.x){return-1}if(u.x>c.x){return 1}if(u.ymax===c.ymax){return 0}return(u.ymax-c.ymax)/Math.abs(u.ymax-c.ymax)});if(!i.length){return r}let o=[];let a=i[0].ymin;let l=0;while(o.length||i.length){if(i.length){let u=-1;for(let h=0;h<i.length;h++){if(i[h].ymin>a){break}u=h}const c=i.splice(0,u+1);c.forEach(h=>{o.push({s:a,edge:h})})}o=o.filter(u=>{if(u.edge.ymax<=a){return false}return true});o.sort((u,c)=>{if(u.edge.x===c.edge.x){return 0}return(u.edge.x-c.edge.x)/Math.abs(u.edge.x-c.edge.x)});if(n!==1||l%e===0){if(o.length>1){for(let u=0;u<o.length;u=u+2){const c=u+1;if(c>=o.length){break}const h=o[u].edge;const f=o[c].edge;r.push([[Math.round(h.x),a],[Math.round(f.x),a]])}}}a+=n;o.forEach(u=>{u.edge.x=u.edge.x+n*u.edge.islope});l++}return r}function B(t,e){var n;const s=e.hachureAngle+90;let r=e.hachureGap;if(r<0){r=e.strokeWidth*4}r=Math.round(Math.max(r,.1));let i=1;if(e.roughness>=1){if((((n=e.randomizer)===null||n===void 0?void 0:n.next())||Math.random())>.7){i=r}}return xe(t,r,s,i||1)}var H=class{constructor(e){this.helper=e}fillPolygons(e,n){return this._fillPolygons(e,n)}_fillPolygons(e,n){const s=B(e,n);const r=this.renderLines(s,n);return{type:"fillSketch",ops:r}}renderLines(e,n){const s=[];for(const r of e){s.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],n))}return s}};function D(t){const e=t[0];const n=t[1];return Math.sqrt(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))}var mt=class extends H{fillPolygons(e,n){let s=n.hachureGap;if(s<0){s=n.strokeWidth*4}s=Math.max(s,.1);const r=Object.assign({},n,{hachureGap:s});const i=B(e,r);const o=Math.PI/180*n.hachureAngle;const a=[];const l=s*.5*Math.cos(o);const u=s*.5*Math.sin(o);for(const[h,f]of i){if(D([h,f])){a.push([[h[0]-l,h[1]+u],[...f]],[[h[0]+l,h[1]-u],[...f]])}}const c=this.renderLines(a,n);return{type:"fillSketch",ops:c}}};var kt=class extends H{fillPolygons(e,n){const s=this._fillPolygons(e,n);const r=Object.assign({},n,{hachureAngle:n.hachureAngle+90});const i=this._fillPolygons(e,r);s.ops=s.ops.concat(i.ops);return s}};var yt=class{constructor(e){this.helper=e}fillPolygons(e,n){n=Object.assign({},n,{hachureAngle:0});const s=B(e,n);return this.dotsOnLines(s,n)}dotsOnLines(e,n){const s=[];let r=n.hachureGap;if(r<0){r=n.strokeWidth*4}r=Math.max(r,.1);let i=n.fillWeight;if(i<0){i=n.strokeWidth/2}const o=r/4;for(const a of e){const l=D(a);const u=l/r;const c=Math.ceil(u)-1;const h=l-c*r;const f=(a[0][0]+a[1][0])/2-r/4;const p=Math.min(a[0][1],a[1][1]);for(let d=0;d<c;d++){const g=p+h+d*r;const k=f-o+Math.random()*2*o;const y=g-o+Math.random()*2*o;const x=this.helper.ellipse(k,y,i,i,n);s.push(...x.ops)}}return{type:"fillSketch",ops:s}}};var xt=class{constructor(e){this.helper=e}fillPolygons(e,n){const s=B(e,n);return{type:"fillSketch",ops:this.dashedLine(s,n)}}dashedLine(e,n){const s=n.dashOffset<0?n.hachureGap<0?n.strokeWidth*4:n.hachureGap:n.dashOffset;const r=n.dashGap<0?n.hachureGap<0?n.strokeWidth*4:n.hachureGap:n.dashGap;const i=[];e.forEach(o=>{const a=D(o);const l=Math.floor(a/(s+r));const u=(a+r-l*(s+r))/2;let c=o[0];let h=o[1];if(c[0]>h[0]){c=o[1];h=o[0]}const f=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let p=0;p<l;p++){const d=p*(s+r);const g=d+s;const k=[c[0]+d*Math.cos(f)+u*Math.cos(f),c[1]+d*Math.sin(f)+u*Math.sin(f)];const y=[c[0]+g*Math.cos(f)+u*Math.cos(f),c[1]+g*Math.sin(f)+u*Math.sin(f)];i.push(...this.helper.doubleLineOps(k[0],k[1],y[0],y[1],n))}});return i}};var bt=class{constructor(e){this.helper=e}fillPolygons(e,n){const s=n.hachureGap<0?n.strokeWidth*4:n.hachureGap;const r=n.zigzagOffset<0?s:n.zigzagOffset;n=Object.assign({},n,{hachureGap:s+r});const i=B(e,n);return{type:"fillSketch",ops:this.zigzagLines(i,r,n)}}zigzagLines(e,n,s){const r=[];e.forEach(i=>{const o=D(i);const a=Math.round(o/(2*n));let l=i[0];let u=i[1];if(l[0]>u[0]){l=i[1];u=i[0]}const c=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let h=0;h<a;h++){const f=h*2*n;const p=(h+1)*2*n;const d=Math.sqrt(2*Math.pow(n,2));const g=[l[0]+f*Math.cos(c),l[1]+f*Math.sin(c)];const k=[l[0]+p*Math.cos(c),l[1]+p*Math.sin(c)];const y=[g[0]+d*Math.cos(c+Math.PI/4),g[1]+d*Math.sin(c+Math.PI/4)];r.push(...this.helper.doubleLineOps(g[0],g[1],y[0],y[1],s),...this.helper.doubleLineOps(y[0],y[1],k[0],k[1],s))}});return r}};var L={};function be(t,e){let n=t.fillStyle||"hachure";if(!L[n]){switch(n){case"zigzag":if(!L[n]){L[n]=new mt(e)}break;case"cross-hatch":if(!L[n]){L[n]=new kt(e)}break;case"dots":if(!L[n]){L[n]=new yt(e)}break;case"dashed":if(!L[n]){L[n]=new xt(e)}break;case"zigzag-line":if(!L[n]){L[n]=new bt(e)}break;case"hachure":default:n="hachure";if(!L[n]){L[n]=new H(e)}break}}return L[n]}function Me(){return Math.floor(Math.random()*2**31)}var Mt=class{constructor(e){this.seed=e}next(){if(this.seed){return(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31}else{return Math.random()}}};var dn=0;var Ft=1;var $e=2;var $t={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 gn(t){const e=new Array;while(t!==""){if(t.match(/^([ \t\r\n,]+)/)){t=t.substr(RegExp.$1.length)}else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/)){e[e.length]={type:dn,text:RegExp.$1};t=t.substr(RegExp.$1.length)}else if(t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/)){e[e.length]={type:Ft,text:`${parseFloat(RegExp.$1)}`};t=t.substr(RegExp.$1.length)}else{return[]}}e[e.length]={type:$e,text:""};return e}function Wt(t,e){return t.type===e}function nt(t){const e=[];const n=gn(t);let s="BOD";let r=0;let i=n[r];while(!Wt(i,$e)){let o=0;const a=[];if(s==="BOD"){if(i.text==="M"||i.text==="m"){r++;o=$t[i.text];s=i.text}else{return nt("M0,0"+t)}}else if(Wt(i,Ft)){o=$t[s]}else{r++;o=$t[i.text];s=i.text}if(r+o<n.length){for(let l=r;l<r+o;l++){const u=n[l];if(Wt(u,Ft)){a[a.length]=+u.text}else{throw new Error("Param not a number: "+s+","+u.text)}}if(typeof $t[s]==="number"){const l={key:s,data:a};e.push(l);r+=o;i=n[r];if(s==="M")s="L";if(s==="m")s="l"}else{throw new Error("Bad segment: "+s)}}else{throw new Error("Path data ended short")}}return e}function at(t){let e=0,n=0;let s=0,r=0;const i=[];for(const{key:o,data:a}of t){switch(o){case"M":i.push({key:"M",data:[...a]});[e,n]=a;[s,r]=a;break;case"m":e+=a[0];n+=a[1];i.push({key:"M",data:[e,n]});s=e;r=n;break;case"L":i.push({key:"L",data:[...a]});[e,n]=a;break;case"l":e+=a[0];n+=a[1];i.push({key:"L",data:[e,n]});break;case"C":i.push({key:"C",data:[...a]});e=a[4];n=a[5];break;case"c":{const l=a.map((u,c)=>c%2?u+n:u+e);i.push({key:"C",data:l});e=l[4];n=l[5];break}case"Q":i.push({key:"Q",data:[...a]});e=a[2];n=a[3];break;case"q":{const l=a.map((u,c)=>c%2?u+n:u+e);i.push({key:"Q",data:l});e=l[2];n=l[3];break}case"A":i.push({key:"A",data:[...a]});e=a[5];n=a[6];break;case"a":e+=a[5];n+=a[6];i.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],e,n]});break;case"H":i.push({key:"H",data:[...a]});e=a[0];break;case"h":e+=a[0];i.push({key:"H",data:[e]});break;case"V":i.push({key:"V",data:[...a]});n=a[0];break;case"v":n+=a[0];i.push({key:"V",data:[n]});break;case"S":i.push({key:"S",data:[...a]});e=a[2];n=a[3];break;case"s":{const l=a.map((u,c)=>c%2?u+n:u+e);i.push({key:"S",data:l});e=l[2];n=l[3];break}case"T":i.push({key:"T",data:[...a]});e=a[0];n=a[1];break;case"t":e+=a[0];n+=a[1];i.push({key:"T",data:[e,n]});break;case"Z":case"z":i.push({key:"Z",data:[]});e=s;n=r;break}}return i}function ct(t){const e=[];let n="";let s=0,r=0;let i=0,o=0;let a=0,l=0;for(const{key:u,data:c}of t){switch(u){case"M":e.push({key:"M",data:[...c]});[s,r]=c;[i,o]=c;break;case"C":e.push({key:"C",data:[...c]});s=c[4];r=c[5];a=c[2];l=c[3];break;case"L":e.push({key:"L",data:[...c]});[s,r]=c;break;case"H":s=c[0];e.push({key:"L",data:[s,r]});break;case"V":r=c[0];e.push({key:"L",data:[s,r]});break;case"S":{let h=0,f=0;if(n==="C"||n==="S"){h=s+(s-a);f=r+(r-l)}else{h=s;f=r}e.push({key:"C",data:[h,f,...c]});a=c[0];l=c[1];s=c[2];r=c[3];break}case"T":{const[h,f]=c;let p=0,d=0;if(n==="Q"||n==="T"){p=s+(s-a);d=r+(r-l)}else{p=s;d=r}const g=s+2*(p-s)/3;const k=r+2*(d-r)/3;const y=h+2*(p-h)/3;const x=f+2*(d-f)/3;e.push({key:"C",data:[g,k,y,x,h,f]});a=p;l=d;s=h;r=f;break}case"Q":{const[h,f,p,d]=c;const g=s+2*(h-s)/3;const k=r+2*(f-r)/3;const y=p+2*(h-p)/3;const x=d+2*(f-d)/3;e.push({key:"C",data:[g,k,y,x,p,d]});a=h;l=f;s=p;r=d;break}case"A":{const h=Math.abs(c[0]);const f=Math.abs(c[1]);const p=c[2];const d=c[3];const g=c[4];const k=c[5];const y=c[6];if(h===0||f===0){e.push({key:"C",data:[s,r,k,y,k,y]});s=k;r=y}else{if(s!==k||r!==y){const x=Se(s,r,k,y,h,f,p,d,g);x.forEach(function($){e.push({key:"C",data:$})});s=k;r=y}}break}case"Z":e.push({key:"Z",data:[]});s=i;r=o;break}n=u}return e}function mn(t){return Math.PI*t/180}function ot(t,e,n){const s=t*Math.cos(n)-e*Math.sin(n);const r=t*Math.sin(n)+e*Math.cos(n);return[s,r]}function Se(t,e,n,s,r,i,o,a,l,u){const c=mn(o);let h=[];let f=0,p=0,d=0,g=0;if(u){[f,p,d,g]=u}else{[t,e]=ot(t,e,-c);[n,s]=ot(n,s,-c);const w=(t-n)/2;const M=(e-s)/2;let v=w*w/(r*r)+M*M/(i*i);if(v>1){v=Math.sqrt(v);r=v*r;i=v*i}const q=a===l?-1:1;const z=r*r;const b=i*i;const rt=z*b-z*M*M-b*w*w;const j=z*M*M+b*w*w;const V=q*Math.sqrt(Math.abs(rt/j));d=V*r*M/i+(t+n)/2;g=V*-i*w/r+(e+s)/2;f=Math.asin(parseFloat(((e-g)/i).toFixed(9)));p=Math.asin(parseFloat(((s-g)/i).toFixed(9)));if(t<d){f=Math.PI-f}if(n<d){p=Math.PI-p}if(f<0){f=Math.PI*2+f}if(p<0){p=Math.PI*2+p}if(l&&f>p){f=f-Math.PI*2}if(!l&&p>f){p=p-Math.PI*2}}let k=p-f;if(Math.abs(k)>Math.PI*120/180){const w=p;const M=n;const v=s;if(l&&p>f){p=f+Math.PI*120/180*1}else{p=f+Math.PI*120/180*-1}n=d+r*Math.cos(p);s=g+i*Math.sin(p);h=Se(n,s,M,v,r,i,o,0,l,[p,w,d,g])}k=p-f;const y=Math.cos(f);const x=Math.sin(f);const $=Math.cos(p);const C=Math.sin(p);const P=Math.tan(k/4);const W=4/3*r*P;const F=4/3*i*P;const I=[t,e];const T=[t+W*x,e-F*y];const N=[n+W*C,s-F*$];const _=[n,s];T[0]=2*I[0]-T[0];T[1]=2*I[1]-T[1];if(u){return[T,N,_].concat(h)}else{h=[T,N,_].concat(h);const w=[];for(let M=0;M<h.length;M+=3){const v=ot(h[M][0],h[M][1],c);const q=ot(h[M+1][0],h[M+1][1],c);const z=ot(h[M+2][0],h[M+2][1],c);w.push([v[0],v[1],q[0],q[1],z[0],z[1]])}return w}}var kn={randOffset:bn,randOffsetWithRange:Mn,ellipse:xn,doubleLineOps:$n};function It(t,e,n,s,r){return{type:"path",ops:Z(t,e,n,s,r)}}function lt(t,e,n){const s=(t||[]).length;if(s>2){const r=[];for(let i=0;i<s-1;i++){r.push(...Z(t[i][0],t[i][1],t[i+1][0],t[i+1][1],n))}if(e){r.push(...Z(t[s-1][0],t[s-1][1],t[0][0],t[0][1],n))}return{type:"path",ops:r}}else if(s===2){return It(t[0][0],t[0][1],t[1][0],t[1][1],n)}return{type:"path",ops:[]}}function yn(t,e){return lt(t,true,e)}function ve(t,e,n,s,r){const i=[[t,e],[t+n,e],[t+n,e+s],[t,e+s]];return yn(i,r)}function qt(t,e){if(t.length){const n=t[0];const s=typeof n[0]==="number"?[t]:t;const r=St(s[0],1*(1+e.roughness*.2),e);const i=e.disableMultiStroke?[]:St(s[0],1.5*(1+e.roughness*.22),Pe(e));for(let o=1;o<s.length;o++){const a=s[o];if(a.length){const l=St(a,1*(1+e.roughness*.2),e);const u=e.disableMultiStroke?[]:St(a,1.5*(1+e.roughness*.22),Pe(e));for(const c of l){if(c.op!=="move"){r.push(c)}}for(const c of u){if(c.op!=="move"){i.push(c)}}}}return{type:"path",ops:r.concat(i)}}return{type:"path",ops:[]}}function xn(t,e,n,s,r){const i=Vt(n,s,r);return Ot(t,e,r,i).opset}function Vt(t,e,n){const s=Math.sqrt(Math.PI*2*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2));const r=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*s));const i=Math.PI*2/r;let o=Math.abs(t/2);let a=Math.abs(e/2);const l=1-n.curveFitting;o+=m(o*l,n);a+=m(a*l,n);return{increment:i,rx:o,ry:a}}function Ot(t,e,n,s){const[r,i]=we(s.increment,t,e,s.rx,s.ry,1,s.increment*Pt(.1,Pt(.4,1,n),n),n);let o=wt(r,null,n);if(!n.disableMultiStroke&&n.roughness!==0){const[a]=we(s.increment,t,e,s.rx,s.ry,1.5,0,n);const l=wt(a,null,n);o=o.concat(l)}return{estimatedPoints:i,opset:{type:"path",ops:o}}}function Ht(t,e,n,s,r,i,o,a,l){const u=t;const c=e;let h=Math.abs(n/2);let f=Math.abs(s/2);h+=m(h*.01,l);f+=m(f*.01,l);let p=r;let d=i;while(p<0){p+=Math.PI*2;d+=Math.PI*2}if(d-p>Math.PI*2){p=0;d=Math.PI*2}const g=Math.PI*2/l.curveStepCount;const k=Math.min(g/2,(d-p)/2);const y=Oe(k,u,c,h,f,p,d,1,l);if(!l.disableMultiStroke){const x=Oe(k,u,c,h,f,p,d,1.5,l);y.push(...x)}if(o){if(a){y.push(...Z(u,c,u+h*Math.cos(p),c+f*Math.sin(p),l),...Z(u,c,u+h*Math.cos(d),c+f*Math.sin(d),l))}else{y.push({op:"lineTo",data:[u,c]},{op:"lineTo",data:[u+h*Math.cos(p),c+f*Math.sin(p)]})}}return{type:"path",ops:y}}function Dt(t,e){const n=ct(at(nt(t)));const s=[];let r=[0,0];let i=[0,0];for(const{key:o,data:a}of n){switch(o){case"M":{i=[a[0],a[1]];r=[a[0],a[1]];break}case"L":s.push(...Z(i[0],i[1],a[0],a[1],e));i=[a[0],a[1]];break;case"C":{const[l,u,c,h,f,p]=a;s.push(...Sn(l,u,c,h,f,p,i,e));i=[f,p];break}case"Z":s.push(...Z(i[0],i[1],r[0],r[1],e));i=[r[0],r[1]];break}}return{type:"path",ops:s}}function vt(t,e){const n=[];for(const s of t){if(s.length){const r=e.maxRandomnessOffset||0;const i=s.length;if(i>2){n.push({op:"move",data:[s[0][0]+m(r,e),s[0][1]+m(r,e)]});for(let o=1;o<i;o++){n.push({op:"lineTo",data:[s[o][0]+m(r,e),s[o][1]+m(r,e)]})}}}}return{type:"fillPath",ops:n}}function tt(t,e){return be(e,kn).fillPolygons(t,e)}function Le(t,e,n,s,r,i,o){const a=t;const l=e;let u=Math.abs(n/2);let c=Math.abs(s/2);u+=m(u*.01,o);c+=m(c*.01,o);let h=r;let f=i;while(h<0){h+=Math.PI*2;f+=Math.PI*2}if(f-h>Math.PI*2){h=0;f=Math.PI*2}const p=(f-h)/o.curveStepCount;const d=[];for(let g=h;g<=f;g=g+p){d.push([a+u*Math.cos(g),l+c*Math.sin(g)])}d.push([a+u*Math.cos(f),l+c*Math.sin(f)]);d.push([a,l]);return tt([d],o)}function bn(t,e){return m(t,e)}function Mn(t,e,n){return Pt(t,e,n)}function $n(t,e,n,s,r){return Z(t,e,n,s,r,true)}function Pe(t){const e=Object.assign({},t);e.randomizer=void 0;if(t.seed){e.seed=t.seed+1}return e}function Ae(t){if(!t.randomizer){t.randomizer=new Mt(t.seed||0)}return t.randomizer.next()}function Pt(t,e,n,s=1){return n.roughness*s*(Ae(n)*(e-t)+t)}function m(t,e,n=1){return Pt(-t,t,e,n)}function Z(t,e,n,s,r,i=false){const o=i?r.disableMultiStrokeFill:r.disableMultiStroke;const a=Et(t,e,n,s,r,true,false);if(o){return a}const l=Et(t,e,n,s,r,true,true);return a.concat(l)}function Et(t,e,n,s,r,i,o){const a=Math.pow(t-n,2)+Math.pow(e-s,2);const l=Math.sqrt(a);let u=1;if(l<200){u=1}else if(l>500){u=.4}else{u=-.0016668*l+1.233334}let c=r.maxRandomnessOffset||0;if(c*c*100>a){c=l/10}const h=c/2;const f=.2+Ae(r)*.2;let p=r.bowing*r.maxRandomnessOffset*(s-e)/200;let d=r.bowing*r.maxRandomnessOffset*(t-n)/200;p=m(p,r,u);d=m(d,r,u);const g=[];const k=()=>m(h,r,u);const y=()=>m(c,r,u);const x=r.preserveVertices;if(i){if(o){g.push({op:"move",data:[t+(x?0:k()),e+(x?0:k())]})}else{g.push({op:"move",data:[t+(x?0:m(c,r,u)),e+(x?0:m(c,r,u))]})}}if(o){g.push({op:"bcurveTo",data:[p+t+(n-t)*f+k(),d+e+(s-e)*f+k(),p+t+2*(n-t)*f+k(),d+e+2*(s-e)*f+k(),n+(x?0:k()),s+(x?0:k())]})}else{g.push({op:"bcurveTo",data:[p+t+(n-t)*f+y(),d+e+(s-e)*f+y(),p+t+2*(n-t)*f+y(),d+e+2*(s-e)*f+y(),n+(x?0:y()),s+(x?0:y())]})}return g}function St(t,e,n){if(!t.length){return[]}const s=[];s.push([t[0][0]+m(e,n),t[0][1]+m(e,n)]);s.push([t[0][0]+m(e,n),t[0][1]+m(e,n)]);for(let r=1;r<t.length;r++){s.push([t[r][0]+m(e,n),t[r][1]+m(e,n)]);if(r===t.length-1){s.push([t[r][0]+m(e,n),t[r][1]+m(e,n)])}}return wt(s,null,n)}function wt(t,e,n){const s=t.length;const r=[];if(s>3){const i=[];const o=1-n.curveTightness;r.push({op:"move",data:[t[1][0],t[1][1]]});for(let a=1;a+2<s;a++){const l=t[a];i[0]=[l[0],l[1]];i[1]=[l[0]+(o*t[a+1][0]-o*t[a-1][0])/6,l[1]+(o*t[a+1][1]-o*t[a-1][1])/6];i[2]=[t[a+1][0]+(o*t[a][0]-o*t[a+2][0])/6,t[a+1][1]+(o*t[a][1]-o*t[a+2][1])/6];i[3]=[t[a+1][0],t[a+1][1]];r.push({op:"bcurveTo",data:[i[1][0],i[1][1],i[2][0],i[2][1],i[3][0],i[3][1]]})}if(e&&e.length===2){const a=n.maxRandomnessOffset;r.push({op:"lineTo",data:[e[0]+m(a,n),e[1]+m(a,n)]})}}else if(s===3){r.push({op:"move",data:[t[1][0],t[1][1]]});r.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})}else if(s===2){r.push(...Et(t[0][0],t[0][1],t[1][0],t[1][1],n,true,true))}return r}function we(t,e,n,s,r,i,o,a){const l=a.roughness===0;const u=[];const c=[];if(l){t=t/4;c.push([e+s*Math.cos(-t),n+r*Math.sin(-t)]);for(let h=0;h<=Math.PI*2;h=h+t){const f=[e+s*Math.cos(h),n+r*Math.sin(h)];u.push(f);c.push(f)}c.push([e+s*Math.cos(0),n+r*Math.sin(0)]);c.push([e+s*Math.cos(t),n+r*Math.sin(t)])}else{const h=m(.5,a)-Math.PI/2;c.push([m(i,a)+e+.9*s*Math.cos(h-t),m(i,a)+n+.9*r*Math.sin(h-t)]);const f=Math.PI*2+h-.01;for(let p=h;p<f;p=p+t){const d=[m(i,a)+e+s*Math.cos(p),m(i,a)+n+r*Math.sin(p)];u.push(d);c.push(d)}c.push([m(i,a)+e+s*Math.cos(h+Math.PI*2+o*.5),m(i,a)+n+r*Math.sin(h+Math.PI*2+o*.5)]);c.push([m(i,a)+e+.98*s*Math.cos(h+o),m(i,a)+n+.98*r*Math.sin(h+o)]);c.push([m(i,a)+e+.9*s*Math.cos(h+o*.5),m(i,a)+n+.9*r*Math.sin(h+o*.5)])}return[c,u]}function Oe(t,e,n,s,r,i,o,a,l){const u=i+m(.1,l);const c=[];c.push([m(a,l)+e+.9*s*Math.cos(u-t),m(a,l)+n+.9*r*Math.sin(u-t)]);for(let h=u;h<=o;h=h+t){c.push([m(a,l)+e+s*Math.cos(h),m(a,l)+n+r*Math.sin(h)])}c.push([e+s*Math.cos(o),n+r*Math.sin(o)]);c.push([e+s*Math.cos(o),n+r*Math.sin(o)]);return wt(c,null,l)}function Sn(t,e,n,s,r,i,o,a){const l=[];const u=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let c=[0,0];const h=a.disableMultiStroke?1:2;const f=a.preserveVertices;for(let p=0;p<h;p++){if(p===0){l.push({op:"move",data:[o[0],o[1]]})}else{l.push({op:"move",data:[o[0]+(f?0:m(u[0],a)),o[1]+(f?0:m(u[0],a))]})}c=f?[r,i]:[r+m(u[p],a),i+m(u[p],a)];l.push({op:"bcurveTo",data:[t+m(u[p],a),e+m(u[p],a),n+m(u[p],a),s+m(u[p],a),c[0],c[1]]})}return l}function ut(t){return[...t]}function Zt(t,e=0){const n=t.length;if(n<3){throw new Error("A curve must have at least three points.")}const s=[];if(n===3){s.push(ut(t[0]),ut(t[1]),ut(t[2]),ut(t[2]))}else{const r=[];r.push(t[0],t[0]);for(let a=1;a<t.length;a++){r.push(t[a]);if(a===t.length-1){r.push(t[a])}}const i=[];const o=1-e;s.push(ut(r[0]));for(let a=1;a+2<r.length;a++){const l=r[a];i[0]=[l[0],l[1]];i[1]=[l[0]+(o*r[a+1][0]-o*r[a-1][0])/6,l[1]+(o*r[a+1][1]-o*r[a-1][1])/6];i[2]=[r[a+1][0]+(o*r[a][0]-o*r[a+2][0])/6,r[a+1][1]+(o*r[a][1]-o*r[a+2][1])/6];i[3]=[r[a+1][0],r[a+1][1]];s.push(i[1],i[2],i[3])}}return s}function Pn(t,e){return Math.sqrt(Lt(t,e))}function Lt(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function wn(t,e,n){const s=Lt(e,n);if(s===0){return Lt(t,e)}let r=((t[0]-e[0])*(n[0]-e[0])+(t[1]-e[1])*(n[1]-e[1]))/s;r=Math.max(0,Math.min(1,r));return Lt(t,et(e,n,r))}function et(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function On(t,e){const n=t[e+0];const s=t[e+1];const r=t[e+2];const i=t[e+3];let o=3*s[0]-2*n[0]-i[0];o*=o;let a=3*s[1]-2*n[1]-i[1];a*=a;let l=3*r[0]-2*i[0]-n[0];l*=l;let u=3*r[1]-2*i[1]-n[1];u*=u;if(o<l){o=l}if(a<u){a=u}return o+a}function Qt(t,e,n,s){const r=s||[];if(On(t,e)<n){const i=t[e+0];if(r.length){const o=Pn(r[r.length-1],i);if(o>1){r.push(i)}}else{r.push(i)}r.push(t[e+3])}else{const i=.5;const o=t[e+0];const a=t[e+1];const l=t[e+2];const u=t[e+3];const c=et(o,a,i);const h=et(a,l,i);const f=et(l,u,i);const p=et(c,h,i);const d=et(h,f,i);const g=et(p,d,i);Qt([o,c,p,g],0,n,r);Qt([g,d,f,u],0,n,r)}return r}function Te(t,e){return At(t,0,t.length,e)}function At(t,e,n,s,r){const i=r||[];const o=t[e];const a=t[n-1];let l=0;let u=1;for(let c=e+1;c<n-1;++c){const h=wn(t[c],o,a);if(h>l){l=h;u=c}}if(Math.sqrt(l)>s){At(t,e,u+1,s,i);At(t,u,n,s,i)}else{if(!i.length){i.push(o)}i.push(a)}return i}function ht(t,e=.15,n){const s=[];const r=(t.length-1)/3;for(let i=0;i<r;i++){const o=i*3;Qt(t,o,e,s)}if(n&&n>0){return At(s,0,s.length,n)}return s}function ze(t,e,n){const s=nt(t);const r=ct(at(s));const i=[];let o=[];let a=[0,0];let l=[];const u=()=>{if(l.length>=4){o.push(...ht(l,e))}l=[]};const c=()=>{u();if(o.length){i.push(o);o=[]}};for(const{key:f,data:p}of r){switch(f){case"M":c();a=[p[0],p[1]];o.push(a);break;case"L":u();o.push([p[0],p[1]]);break;case"C":if(!l.length){const d=o.length?o[o.length-1]:a;l.push([d[0],d[1]])}l.push([p[0],p[1]]);l.push([p[2],p[3]]);l.push([p[4],p[5]]);break;case"Z":u();o.push([a[0],a[1]]);break}}c();if(!n){return i}const h=[];for(const f of i){const p=Te(f,n);if(p.length){h.push(p)}}return h}var A="none";var Tt=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:false,disableMultiStrokeFill:false,preserveVertices:false,fillShapeRoughnessGain:.8};this.config=e||{};if(this.config.options){this.defaultOptions=this._o(this.config.options)}}static newSeed(){return Me()}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,n,s){return{shape:e,sets:n||[],options:s||this.defaultOptions}}line(e,n,s,r,i){const o=this._o(i);return this._d("line",[It(e,n,s,r,o)],o)}rectangle(e,n,s,r,i){const o=this._o(i);const a=[];const l=ve(e,n,s,r,o);if(o.fill){const u=[[e,n],[e+s,n],[e+s,n+r],[e,n+r]];if(o.fillStyle==="solid"){a.push(vt([u],o))}else{a.push(tt([u],o))}}if(o.stroke!==A){a.push(l)}return this._d("rectangle",a,o)}ellipse(e,n,s,r,i){const o=this._o(i);const a=[];const l=Vt(s,r,o);const u=Ot(e,n,o,l);if(o.fill){if(o.fillStyle==="solid"){const c=Ot(e,n,o,l).opset;c.type="fillPath";a.push(c)}else{a.push(tt([u.estimatedPoints],o))}}if(o.stroke!==A){a.push(u.opset)}return this._d("ellipse",a,o)}circle(e,n,s,r){const i=this.ellipse(e,n,s,s,r);i.shape="circle";return i}linearPath(e,n){const s=this._o(n);return this._d("linearPath",[lt(e,false,s)],s)}arc(e,n,s,r,i,o,a=false,l){const u=this._o(l);const c=[];const h=Ht(e,n,s,r,i,o,a,true,u);if(a&&u.fill){if(u.fillStyle==="solid"){const f=Object.assign({},u);f.disableMultiStroke=true;const p=Ht(e,n,s,r,i,o,true,false,f);p.type="fillPath";c.push(p)}else{c.push(Le(e,n,s,r,i,o,u))}}if(u.stroke!==A){c.push(h)}return this._d("arc",c,u)}curve(e,n){const s=this._o(n);const r=[];const i=qt(e,s);if(s.fill&&s.fill!==A){if(s.fillStyle==="solid"){const o=qt(e,Object.assign(Object.assign({},s),{disableMultiStroke:true,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[];const a=e;if(a.length){const l=a[0];const u=typeof l[0]==="number"?[a]:a;for(const c of u){if(c.length<3){o.push(...c)}else if(c.length===3){o.push(...ht(Zt([c[0],c[0],c[1],c[2]]),10,(1+s.roughness)/2))}else{o.push(...ht(Zt(c),10,(1+s.roughness)/2))}}}if(o.length){r.push(tt([o],s))}}}if(s.stroke!==A){r.push(i)}return this._d("curve",r,s)}polygon(e,n){const s=this._o(n);const r=[];const i=lt(e,true,s);if(s.fill){if(s.fillStyle==="solid"){r.push(vt([e],s))}else{r.push(tt([e],s))}}if(s.stroke!==A){r.push(i)}return this._d("polygon",r,s)}path(e,n){const s=this._o(n);const r=[];if(!e){return this._d("path",r,s)}e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=s.fill&&s.fill!=="transparent"&&s.fill!==A;const o=s.stroke!==A;const a=!!(s.simplification&&s.simplification<1);const l=a?4-4*(s.simplification||1):(1+s.roughness)/2;const u=ze(e,1,l);const c=Dt(e,s);if(i){if(s.fillStyle==="solid"){if(u.length===1){const h=Dt(e,Object.assign(Object.assign({},s),{disableMultiStroke:true,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else{r.push(vt(u,s))}}else{r.push(tt(u,s))}}if(o){if(a){u.forEach(h=>{r.push(lt(h,false,s))})}else{r.push(c)}}return this._d("path",r,s)}opsToPath(e,n){let s="";for(const r of e.ops){const i=typeof n==="number"&&n>=0?r.data.map(o=>+o.toFixed(n)):r.data;switch(r.op){case"move":s+=`M${i[0]} ${i[1]} `;break;case"bcurveTo":s+=`C${i[0]} ${i[1]}, ${i[2]} ${i[3]}, ${i[4]} ${i[5]} `;break;case"lineTo":s+=`L${i[0]} ${i[1]} `;break}}return s.trim()}toPaths(e){const n=e.sets||[];const s=e.options||this.defaultOptions;const r=[];for(const i of n){let o=null;switch(i.type){case"path":o={d:this.opsToPath(i),stroke:s.stroke,strokeWidth:s.strokeWidth,fill:A};break;case"fillPath":o={d:this.opsToPath(i),stroke:A,strokeWidth:0,fill:s.fill||A};break;case"fillSketch":o=this.fillSketch(i,s);break}if(o){r.push(o)}}return r}fillSketch(e,n){let s=n.fillWeight;if(s<0){s=n.strokeWidth/2}return{d:this.opsToPath(e),stroke:n.fill||A,strokeWidth:s,fill:A}}_mergedShape(e){return e.filter((n,s)=>{if(s===0){return true}if(n.op==="move"){return false}return true})}};import{decodeXML as ur}from"entities";function Ce(t){const e=[];let n=0;let s;const r=/<\/([a-zA-Z][a-zA-Z0-9-]*)>/g;const i=[];for(const o of he(t)){const a=new Map(o.attributes.map(l=>[l.name,l.value]));i.push({index:o.start,kind:o.selfClosing?"self":"open",tag:o.name,attrs:a})}while((s=r.exec(t))!==null)i.push({index:s.index,kind:"close",tag:s[1]});i.sort((o,a)=>o.index-a.index);for(const o of i){if(o.kind==="self"){if(n===0)e.push({tag:o.tag,attrs:o.attrs})}else if(o.kind==="open"){if(n===0)e.push({tag:o.tag,attrs:o.attrs});n++}else{n--}}return e}var E=new Tt;function vn(t,e){const n=t.get("opacity")??e.opacity;const s=t.get("fill-opacity")??e.fillOpacity;const r=t.get("stroke-opacity")??e.strokeOpacity;if(n===void 0&&s===void 0&&r===void 0)return void 0;const i=o=>o===void 0?n:n===void 0?o:Number(n)*Number(o);return{fill:i(s),stroke:i(r)}}function Ne(t){return{roughness:t?.roughness??1,bowing:t?.bowing??1,passes:t?.passes??2,strokeWidth:t?.strokeWidth??1.6,fill:t?.fill??"none",hachureAngle:t?.hachureAngle??-41,hachureGap:t?.hachureGap??5,fillWeight:t?.fillWeight??.9}}function Ln(t,e,n,s,r){return{seed:e,roughness:t.roughness,bowing:t.bowing,stroke:n,strokeWidth:s,disableMultiStroke:t.passes<2,...r?{fill:r,fillStyle:t.fill==="solid"?"solid":"hachure",fillWeight:t.fillWeight,hachureGap:t.hachureGap,hachureAngle:t.hachureAngle}:{},preserveVertices:false}}function An(t={}){const e=[`stroke-linecap="${t.lineCap??"round"}"`,`stroke-linejoin="${t.lineJoin??"round"}"`,...t.miterLimit!==void 0?[`stroke-miterlimit="${O(String(t.miterLimit))}"`]:[],...t.dashArray!==void 0?[`stroke-dasharray="${O(t.dashArray)}"`]:[],...t.dashOffset!==void 0?[`stroke-dashoffset="${O(String(t.dashOffset))}"`]:[],...t.opacity!==void 0?[`stroke-opacity="${O(String(t.opacity))}"`]:[],...t.pathLength!==void 0?[`pathLength="${O(String(t.pathLength))}"`]:[],...t.paintOrder!==void 0?[`paint-order="${O(t.paintOrder)}"`]:[],...t.mixBlendMode!==void 0?[`style="mix-blend-mode:${t.mixBlendMode}"`]:[],...t.nonScaling?['vector-effect="non-scaling-stroke"']:[]];return e.join(" ")}function Q(t,e,n,s,r,i={},o){const a=[];const l=An(i);const u=l?` ${l}`:" ";const c=o?.stroke===void 0?"":` stroke-opacity="${O(String(o.stroke))}"`;const h=o?.fill===void 0?"":` stroke-opacity="${O(String(o.fill))}"`;for(const f of t){const p=E.opsToPath(f,2);if(!p)continue;if(f.type==="path"){a.push(`<path d="${p}" fill="none" stroke="${e}" stroke-width="${Nt(n)}"${u}${c} />`)}else if(f.type==="fillPath"){a.push(`<path d="${p}" fill="${s}" fill-opacity="${O(String(o?.fill??.92))}" stroke="none" />`)}else if(f.type==="fillSketch"){a.push(`<path d="${p}" fill="none" stroke="${s}" stroke-width="${Nt(r.fillWeight)}"${h} />`)}}return a.join("\n")}function Tn(t,e,n,s,r){const i=Math.min(r,n/2,s/2);return`M ${t+i} ${e} L ${t+n-i} ${e} Q ${t+n} ${e} ${t+n} ${e+i} L ${t+n} ${e+s-i} Q ${t+n} ${e+s} ${t+n-i} ${e+s} L ${t+i} ${e+s} Q ${t} ${e+s} ${t} ${e+s-i} L ${t} ${e+i} Q ${t} ${e} ${t+i} ${e} Z`}function je(t,e,n,s,r,i,o,a,l){return Ge(t,e,n,s,r,i,o,a,l)}function Ge(t,e,n,s,r,i,o,a,l){const u={...a,...o!==void 0?{dashArray:o}:{}};const c=Ln(i,e,n,s,r);try{switch(t.kind){case"rect":{if((t.rx??0)>.5){return Q(E.path(Tn(t.x,t.y,t.width,t.height,t.rx),c).sets,n,s,r,i,u,l)}return Q(E.rectangle(t.x,t.y,t.width,t.height,c).sets,n,s,r,i,u,l)}case"circle":return Q(E.circle(t.cx,t.cy,t.r*2,c).sets,n,s,r,i,u,l);case"ellipse":return Q(E.ellipse(t.cx,t.cy,t.rx*2,t.ry*2,c).sets,n,s,r,i,u,l);case"line":return Q(E.line(t.x1,t.y1,t.x2,t.y2,c).sets,n,s,void 0,i,u,l);case"polygon":return Q(E.polygon(t.points.map(h=>[h.x,h.y]),c).sets,n,s,r,i,u,l);case"polyline":return Q(E.linearPath(t.points.map(h=>[h.x,h.y]),c).sets,n,s,void 0,i,u,l);case"path":return Q(E.path(t.d,c).sets,n,s,r,i,u,l);case"compound":return""}}catch{return""}}function st(t,e,n,s,r,i,o,a,l){if(t.sketcher){const u=t.sketcher(e,{seed:n,stroke:s,width:r,fill:i,p:t.p,style:t.ctx.style,dash:o,strokeProjection:a,opacity:l});if(u!==null)return u}return Ge(e,n,s,r,i,t.p,o,a,l)}function Be(t,e,n){return t.replace(`<${e} `,`<${e} ${n} `)}function Re(t){if(t===void 0)return 1;const e=typeof t==="number"?t:parseFloat(t);if(Number.isNaN(e))return 1;return e}function zt(t,e){return t!==void 0?t:e}function zn(t,e){if(/style="/.test(t)){return t.replace(/style="([^"]*)"/,(n,s)=>{const r=s.trim().length===0||/;\s*$/.test(s)?"":";";return`style="${s}${r}stroke:none"`})}return Be(t,e,'style="stroke:none"')}function Xt(t,e){if(!e||t==="")return t;return`<g transform="${ue(e)}">${t}</g>`}function Cn(t,e){const n=e.p;const s=G(t);const r=Ce(s);const i=t.geometry.kind==="compound"?t.geometry.children:[t.geometry];if(r.length<i.length)return s;const o=s.split("\n");const a=c=>o.length===1&&c===0?s:o[c]??"";const l=[];for(let c=0;c<i.length;c++){const h=r[c];const f=zt(h.attrs.get("stroke"),t.paint.stroke);const p=zt(h.attrs.get("fill"),t.paint.fill);const d=Gt(e.ctx.seed,t.id,`outline:${c}`)||1;const g=Re(zt(h.attrs.get("stroke-width"),t.paint.strokeWidth));const k=zt(h.attrs.get("stroke-dasharray"),t.paint.strokeDasharray);const y=f!==void 0&&f!=="none"&&g>0;const x=p!==void 0&&p!=="none";const $=x&&n.fill!=="none"?p:void 0;const C=vn(h.attrs,t.paint)??{};if(n.fill==="wash"&&t.channels?.category!==void 0&&["pie-slice","actor","legend","point","bar"].includes(t.role))C.fill??="1";if(!y){if(t.surfaceFragment&&x&&n.fill==="none"&&_e(p))continue;if($){const F=st(e,i[c],d,"none",0,$,k,void 0,C);if(F){l.push(Xt(F,t.transform));continue}}l.push(a(c));continue}const P=Math.max(.6,Math.min(n.strokeWidth*g,n.strokeWidth*4));const W=st(e,i[c],d,f,P,$,k,void 0,C);if(!W){l.push(a(c));continue}if(x&&n.fill==="none"&&!_e(p)){l.push(zn(a(c),h.tag))}l.push(Xt(W,t.transform))}const u=l.filter(Boolean).join("\n");return t.identity&&!/\sdata-id=/.test(u)?fe(u,t.identity):u}function _e(t){return t.startsWith("var(--_node-fill")||t.startsWith("var(--_group")||t==="var(--bg)"||t==="var(--surface)"}function Nn(t,e){const n=G(t);if(t.lineStyle==="invisible"||n==="")return n;const s=t.stroke.color;const r=Re(t.stroke.width);if(r<=0)return n;const i=t.stroke.encodesValue?r:e.p.strokeWidth*r;const o=Gt(e.ctx.seed,t.id,"stroke")||1;const a=t.stroke.dash?typeof t.stroke.dash.array==="string"?t.stroke.dash.array:t.stroke.dash.array.join(" "):void 0;const l={...a!==void 0?{dashArray:a}:{},...t.stroke.dash?.offset!==void 0?{dashOffset:t.stroke.dash.offset}:{},lineCap:t.stroke.lineCap,lineJoin:t.stroke.lineJoin,miterLimit:t.stroke.miterLimit,...t.stroke.opacity!==void 0?{opacity:t.stroke.opacity}:{},...t.stroke.pathLength!==void 0?{pathLength:t.stroke.pathLength}:{},...t.stroke.paintOrder!==void 0?{paintOrder:t.stroke.paintOrder}:{},...t.stroke.mixBlendMode!==void 0?{mixBlendMode:t.stroke.mixBlendMode}:{},nonScaling:t.stroke.nonScaling};let u="";const c=t.route.geometry;if(c.kind==="polyline"){u=st(e,{kind:"polyline",points:c.points},o,s,i,void 0,a,l)}else if(c.kind==="line"){u=st(e,c,o,s,i,void 0,a,l)}else{const p=le(c,t.route.closed);if(p.length===1){u=st(e,{kind:"path",d:c.d},o,s,i,void 0,a,l)}if(!u&&c.points.length>1){const d=p.map((g,k)=>{const y=g.points[0];const x=g.points.at(-1);const $=g.closed&&y&&x&&(y.x!==x.x||y.y!==x.y)?[...g.points,y]:g.points;return st(e,{kind:"polyline",points:[...$]},o+k,s,i,void 0,a,l)});u=d.every(Boolean)?d.join("\n"):""}}if(!u)return n;const h=n.replace(/\sstroke-opacity=(?:"[^"]*"|'[^']*')/,' stroke-opacity="0"');const f=h===n?Be(n,t.route.geometry.kind,'stroke-opacity="0"'):h;return`${f}
1
+ import{Gd as de,Ja as Nt,Nd as ge,Pd as me,Qd as ke,Rb as gt,Rd as Bt,Sa as O,Tc as pe,Wb as fe,Wd as ye,Xa as he,Yb as G,j as ae,l as oe,m as ce,md as jt,nd as Gt,tb as _t,va as ue,z as le}from"./chunk-DOFB572I.js";function Rt(t,e,n){if(t&&t.length){const[s,r]=e;const i=Math.PI/180*n;const o=Math.cos(i);const a=Math.sin(i);for(const l of t){const[u,c]=l;l[0]=(u-s)*o-(c-r)*a+s;l[1]=(u-s)*a+(c-r)*o+r}}}function hn(t,e,n){const s=[];t.forEach(r=>s.push(...r));Rt(s,e,n)}function fn(t,e){return t[0]===e[0]&&t[1]===e[1]}function xe(t,e,n,s=1){const r=n;const i=Math.max(e,.1);const o=t[0]&&t[0][0]&&typeof t[0][0]==="number"?[t]:t;const a=[0,0];if(r){for(const u of o){Rt(u,a,r)}}const l=pn(o,i,s);if(r){for(const u of o){Rt(u,a,-r)}hn(l,a,-r)}return l}function pn(t,e,n){const s=[];for(const u of t){const c=[...u];if(!fn(c[0],c[c.length-1])){c.push([c[0][0],c[0][1]])}if(c.length>2){s.push(c)}}const r=[];e=Math.max(e,.1);const i=[];for(const u of s){for(let c=0;c<u.length-1;c++){const h=u[c];const f=u[c+1];if(h[1]!==f[1]){const p=Math.min(h[1],f[1]);i.push({ymin:p,ymax:Math.max(h[1],f[1]),x:p===h[1]?h[0]:f[0],islope:(f[0]-h[0])/(f[1]-h[1])})}}}i.sort((u,c)=>{if(u.ymin<c.ymin){return-1}if(u.ymin>c.ymin){return 1}if(u.x<c.x){return-1}if(u.x>c.x){return 1}if(u.ymax===c.ymax){return 0}return(u.ymax-c.ymax)/Math.abs(u.ymax-c.ymax)});if(!i.length){return r}let o=[];let a=i[0].ymin;let l=0;while(o.length||i.length){if(i.length){let u=-1;for(let h=0;h<i.length;h++){if(i[h].ymin>a){break}u=h}const c=i.splice(0,u+1);c.forEach(h=>{o.push({s:a,edge:h})})}o=o.filter(u=>{if(u.edge.ymax<=a){return false}return true});o.sort((u,c)=>{if(u.edge.x===c.edge.x){return 0}return(u.edge.x-c.edge.x)/Math.abs(u.edge.x-c.edge.x)});if(n!==1||l%e===0){if(o.length>1){for(let u=0;u<o.length;u=u+2){const c=u+1;if(c>=o.length){break}const h=o[u].edge;const f=o[c].edge;r.push([[Math.round(h.x),a],[Math.round(f.x),a]])}}}a+=n;o.forEach(u=>{u.edge.x=u.edge.x+n*u.edge.islope});l++}return r}function B(t,e){var n;const s=e.hachureAngle+90;let r=e.hachureGap;if(r<0){r=e.strokeWidth*4}r=Math.round(Math.max(r,.1));let i=1;if(e.roughness>=1){if((((n=e.randomizer)===null||n===void 0?void 0:n.next())||Math.random())>.7){i=r}}return xe(t,r,s,i||1)}var H=class{constructor(e){this.helper=e}fillPolygons(e,n){return this._fillPolygons(e,n)}_fillPolygons(e,n){const s=B(e,n);const r=this.renderLines(s,n);return{type:"fillSketch",ops:r}}renderLines(e,n){const s=[];for(const r of e){s.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],n))}return s}};function D(t){const e=t[0];const n=t[1];return Math.sqrt(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))}var mt=class extends H{fillPolygons(e,n){let s=n.hachureGap;if(s<0){s=n.strokeWidth*4}s=Math.max(s,.1);const r=Object.assign({},n,{hachureGap:s});const i=B(e,r);const o=Math.PI/180*n.hachureAngle;const a=[];const l=s*.5*Math.cos(o);const u=s*.5*Math.sin(o);for(const[h,f]of i){if(D([h,f])){a.push([[h[0]-l,h[1]+u],[...f]],[[h[0]+l,h[1]-u],[...f]])}}const c=this.renderLines(a,n);return{type:"fillSketch",ops:c}}};var kt=class extends H{fillPolygons(e,n){const s=this._fillPolygons(e,n);const r=Object.assign({},n,{hachureAngle:n.hachureAngle+90});const i=this._fillPolygons(e,r);s.ops=s.ops.concat(i.ops);return s}};var yt=class{constructor(e){this.helper=e}fillPolygons(e,n){n=Object.assign({},n,{hachureAngle:0});const s=B(e,n);return this.dotsOnLines(s,n)}dotsOnLines(e,n){const s=[];let r=n.hachureGap;if(r<0){r=n.strokeWidth*4}r=Math.max(r,.1);let i=n.fillWeight;if(i<0){i=n.strokeWidth/2}const o=r/4;for(const a of e){const l=D(a);const u=l/r;const c=Math.ceil(u)-1;const h=l-c*r;const f=(a[0][0]+a[1][0])/2-r/4;const p=Math.min(a[0][1],a[1][1]);for(let d=0;d<c;d++){const g=p+h+d*r;const k=f-o+Math.random()*2*o;const y=g-o+Math.random()*2*o;const x=this.helper.ellipse(k,y,i,i,n);s.push(...x.ops)}}return{type:"fillSketch",ops:s}}};var xt=class{constructor(e){this.helper=e}fillPolygons(e,n){const s=B(e,n);return{type:"fillSketch",ops:this.dashedLine(s,n)}}dashedLine(e,n){const s=n.dashOffset<0?n.hachureGap<0?n.strokeWidth*4:n.hachureGap:n.dashOffset;const r=n.dashGap<0?n.hachureGap<0?n.strokeWidth*4:n.hachureGap:n.dashGap;const i=[];e.forEach(o=>{const a=D(o);const l=Math.floor(a/(s+r));const u=(a+r-l*(s+r))/2;let c=o[0];let h=o[1];if(c[0]>h[0]){c=o[1];h=o[0]}const f=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let p=0;p<l;p++){const d=p*(s+r);const g=d+s;const k=[c[0]+d*Math.cos(f)+u*Math.cos(f),c[1]+d*Math.sin(f)+u*Math.sin(f)];const y=[c[0]+g*Math.cos(f)+u*Math.cos(f),c[1]+g*Math.sin(f)+u*Math.sin(f)];i.push(...this.helper.doubleLineOps(k[0],k[1],y[0],y[1],n))}});return i}};var bt=class{constructor(e){this.helper=e}fillPolygons(e,n){const s=n.hachureGap<0?n.strokeWidth*4:n.hachureGap;const r=n.zigzagOffset<0?s:n.zigzagOffset;n=Object.assign({},n,{hachureGap:s+r});const i=B(e,n);return{type:"fillSketch",ops:this.zigzagLines(i,r,n)}}zigzagLines(e,n,s){const r=[];e.forEach(i=>{const o=D(i);const a=Math.round(o/(2*n));let l=i[0];let u=i[1];if(l[0]>u[0]){l=i[1];u=i[0]}const c=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let h=0;h<a;h++){const f=h*2*n;const p=(h+1)*2*n;const d=Math.sqrt(2*Math.pow(n,2));const g=[l[0]+f*Math.cos(c),l[1]+f*Math.sin(c)];const k=[l[0]+p*Math.cos(c),l[1]+p*Math.sin(c)];const y=[g[0]+d*Math.cos(c+Math.PI/4),g[1]+d*Math.sin(c+Math.PI/4)];r.push(...this.helper.doubleLineOps(g[0],g[1],y[0],y[1],s),...this.helper.doubleLineOps(y[0],y[1],k[0],k[1],s))}});return r}};var L={};function be(t,e){let n=t.fillStyle||"hachure";if(!L[n]){switch(n){case"zigzag":if(!L[n]){L[n]=new mt(e)}break;case"cross-hatch":if(!L[n]){L[n]=new kt(e)}break;case"dots":if(!L[n]){L[n]=new yt(e)}break;case"dashed":if(!L[n]){L[n]=new xt(e)}break;case"zigzag-line":if(!L[n]){L[n]=new bt(e)}break;case"hachure":default:n="hachure";if(!L[n]){L[n]=new H(e)}break}}return L[n]}function Me(){return Math.floor(Math.random()*2**31)}var Mt=class{constructor(e){this.seed=e}next(){if(this.seed){return(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31}else{return Math.random()}}};var dn=0;var Ft=1;var $e=2;var $t={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 gn(t){const e=new Array;while(t!==""){if(t.match(/^([ \t\r\n,]+)/)){t=t.substr(RegExp.$1.length)}else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/)){e[e.length]={type:dn,text:RegExp.$1};t=t.substr(RegExp.$1.length)}else if(t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/)){e[e.length]={type:Ft,text:`${parseFloat(RegExp.$1)}`};t=t.substr(RegExp.$1.length)}else{return[]}}e[e.length]={type:$e,text:""};return e}function Wt(t,e){return t.type===e}function nt(t){const e=[];const n=gn(t);let s="BOD";let r=0;let i=n[r];while(!Wt(i,$e)){let o=0;const a=[];if(s==="BOD"){if(i.text==="M"||i.text==="m"){r++;o=$t[i.text];s=i.text}else{return nt("M0,0"+t)}}else if(Wt(i,Ft)){o=$t[s]}else{r++;o=$t[i.text];s=i.text}if(r+o<n.length){for(let l=r;l<r+o;l++){const u=n[l];if(Wt(u,Ft)){a[a.length]=+u.text}else{throw new Error("Param not a number: "+s+","+u.text)}}if(typeof $t[s]==="number"){const l={key:s,data:a};e.push(l);r+=o;i=n[r];if(s==="M")s="L";if(s==="m")s="l"}else{throw new Error("Bad segment: "+s)}}else{throw new Error("Path data ended short")}}return e}function at(t){let e=0,n=0;let s=0,r=0;const i=[];for(const{key:o,data:a}of t){switch(o){case"M":i.push({key:"M",data:[...a]});[e,n]=a;[s,r]=a;break;case"m":e+=a[0];n+=a[1];i.push({key:"M",data:[e,n]});s=e;r=n;break;case"L":i.push({key:"L",data:[...a]});[e,n]=a;break;case"l":e+=a[0];n+=a[1];i.push({key:"L",data:[e,n]});break;case"C":i.push({key:"C",data:[...a]});e=a[4];n=a[5];break;case"c":{const l=a.map((u,c)=>c%2?u+n:u+e);i.push({key:"C",data:l});e=l[4];n=l[5];break}case"Q":i.push({key:"Q",data:[...a]});e=a[2];n=a[3];break;case"q":{const l=a.map((u,c)=>c%2?u+n:u+e);i.push({key:"Q",data:l});e=l[2];n=l[3];break}case"A":i.push({key:"A",data:[...a]});e=a[5];n=a[6];break;case"a":e+=a[5];n+=a[6];i.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],e,n]});break;case"H":i.push({key:"H",data:[...a]});e=a[0];break;case"h":e+=a[0];i.push({key:"H",data:[e]});break;case"V":i.push({key:"V",data:[...a]});n=a[0];break;case"v":n+=a[0];i.push({key:"V",data:[n]});break;case"S":i.push({key:"S",data:[...a]});e=a[2];n=a[3];break;case"s":{const l=a.map((u,c)=>c%2?u+n:u+e);i.push({key:"S",data:l});e=l[2];n=l[3];break}case"T":i.push({key:"T",data:[...a]});e=a[0];n=a[1];break;case"t":e+=a[0];n+=a[1];i.push({key:"T",data:[e,n]});break;case"Z":case"z":i.push({key:"Z",data:[]});e=s;n=r;break}}return i}function ct(t){const e=[];let n="";let s=0,r=0;let i=0,o=0;let a=0,l=0;for(const{key:u,data:c}of t){switch(u){case"M":e.push({key:"M",data:[...c]});[s,r]=c;[i,o]=c;break;case"C":e.push({key:"C",data:[...c]});s=c[4];r=c[5];a=c[2];l=c[3];break;case"L":e.push({key:"L",data:[...c]});[s,r]=c;break;case"H":s=c[0];e.push({key:"L",data:[s,r]});break;case"V":r=c[0];e.push({key:"L",data:[s,r]});break;case"S":{let h=0,f=0;if(n==="C"||n==="S"){h=s+(s-a);f=r+(r-l)}else{h=s;f=r}e.push({key:"C",data:[h,f,...c]});a=c[0];l=c[1];s=c[2];r=c[3];break}case"T":{const[h,f]=c;let p=0,d=0;if(n==="Q"||n==="T"){p=s+(s-a);d=r+(r-l)}else{p=s;d=r}const g=s+2*(p-s)/3;const k=r+2*(d-r)/3;const y=h+2*(p-h)/3;const x=f+2*(d-f)/3;e.push({key:"C",data:[g,k,y,x,h,f]});a=p;l=d;s=h;r=f;break}case"Q":{const[h,f,p,d]=c;const g=s+2*(h-s)/3;const k=r+2*(f-r)/3;const y=p+2*(h-p)/3;const x=d+2*(f-d)/3;e.push({key:"C",data:[g,k,y,x,p,d]});a=h;l=f;s=p;r=d;break}case"A":{const h=Math.abs(c[0]);const f=Math.abs(c[1]);const p=c[2];const d=c[3];const g=c[4];const k=c[5];const y=c[6];if(h===0||f===0){e.push({key:"C",data:[s,r,k,y,k,y]});s=k;r=y}else{if(s!==k||r!==y){const x=Se(s,r,k,y,h,f,p,d,g);x.forEach(function($){e.push({key:"C",data:$})});s=k;r=y}}break}case"Z":e.push({key:"Z",data:[]});s=i;r=o;break}n=u}return e}function mn(t){return Math.PI*t/180}function ot(t,e,n){const s=t*Math.cos(n)-e*Math.sin(n);const r=t*Math.sin(n)+e*Math.cos(n);return[s,r]}function Se(t,e,n,s,r,i,o,a,l,u){const c=mn(o);let h=[];let f=0,p=0,d=0,g=0;if(u){[f,p,d,g]=u}else{[t,e]=ot(t,e,-c);[n,s]=ot(n,s,-c);const w=(t-n)/2;const M=(e-s)/2;let v=w*w/(r*r)+M*M/(i*i);if(v>1){v=Math.sqrt(v);r=v*r;i=v*i}const q=a===l?-1:1;const z=r*r;const b=i*i;const rt=z*b-z*M*M-b*w*w;const j=z*M*M+b*w*w;const V=q*Math.sqrt(Math.abs(rt/j));d=V*r*M/i+(t+n)/2;g=V*-i*w/r+(e+s)/2;f=Math.asin(parseFloat(((e-g)/i).toFixed(9)));p=Math.asin(parseFloat(((s-g)/i).toFixed(9)));if(t<d){f=Math.PI-f}if(n<d){p=Math.PI-p}if(f<0){f=Math.PI*2+f}if(p<0){p=Math.PI*2+p}if(l&&f>p){f=f-Math.PI*2}if(!l&&p>f){p=p-Math.PI*2}}let k=p-f;if(Math.abs(k)>Math.PI*120/180){const w=p;const M=n;const v=s;if(l&&p>f){p=f+Math.PI*120/180*1}else{p=f+Math.PI*120/180*-1}n=d+r*Math.cos(p);s=g+i*Math.sin(p);h=Se(n,s,M,v,r,i,o,0,l,[p,w,d,g])}k=p-f;const y=Math.cos(f);const x=Math.sin(f);const $=Math.cos(p);const C=Math.sin(p);const P=Math.tan(k/4);const W=4/3*r*P;const F=4/3*i*P;const I=[t,e];const T=[t+W*x,e-F*y];const N=[n+W*C,s-F*$];const _=[n,s];T[0]=2*I[0]-T[0];T[1]=2*I[1]-T[1];if(u){return[T,N,_].concat(h)}else{h=[T,N,_].concat(h);const w=[];for(let M=0;M<h.length;M+=3){const v=ot(h[M][0],h[M][1],c);const q=ot(h[M+1][0],h[M+1][1],c);const z=ot(h[M+2][0],h[M+2][1],c);w.push([v[0],v[1],q[0],q[1],z[0],z[1]])}return w}}var kn={randOffset:bn,randOffsetWithRange:Mn,ellipse:xn,doubleLineOps:$n};function It(t,e,n,s,r){return{type:"path",ops:Z(t,e,n,s,r)}}function lt(t,e,n){const s=(t||[]).length;if(s>2){const r=[];for(let i=0;i<s-1;i++){r.push(...Z(t[i][0],t[i][1],t[i+1][0],t[i+1][1],n))}if(e){r.push(...Z(t[s-1][0],t[s-1][1],t[0][0],t[0][1],n))}return{type:"path",ops:r}}else if(s===2){return It(t[0][0],t[0][1],t[1][0],t[1][1],n)}return{type:"path",ops:[]}}function yn(t,e){return lt(t,true,e)}function ve(t,e,n,s,r){const i=[[t,e],[t+n,e],[t+n,e+s],[t,e+s]];return yn(i,r)}function qt(t,e){if(t.length){const n=t[0];const s=typeof n[0]==="number"?[t]:t;const r=St(s[0],1*(1+e.roughness*.2),e);const i=e.disableMultiStroke?[]:St(s[0],1.5*(1+e.roughness*.22),Pe(e));for(let o=1;o<s.length;o++){const a=s[o];if(a.length){const l=St(a,1*(1+e.roughness*.2),e);const u=e.disableMultiStroke?[]:St(a,1.5*(1+e.roughness*.22),Pe(e));for(const c of l){if(c.op!=="move"){r.push(c)}}for(const c of u){if(c.op!=="move"){i.push(c)}}}}return{type:"path",ops:r.concat(i)}}return{type:"path",ops:[]}}function xn(t,e,n,s,r){const i=Vt(n,s,r);return Ot(t,e,r,i).opset}function Vt(t,e,n){const s=Math.sqrt(Math.PI*2*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2));const r=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*s));const i=Math.PI*2/r;let o=Math.abs(t/2);let a=Math.abs(e/2);const l=1-n.curveFitting;o+=m(o*l,n);a+=m(a*l,n);return{increment:i,rx:o,ry:a}}function Ot(t,e,n,s){const[r,i]=we(s.increment,t,e,s.rx,s.ry,1,s.increment*Pt(.1,Pt(.4,1,n),n),n);let o=wt(r,null,n);if(!n.disableMultiStroke&&n.roughness!==0){const[a]=we(s.increment,t,e,s.rx,s.ry,1.5,0,n);const l=wt(a,null,n);o=o.concat(l)}return{estimatedPoints:i,opset:{type:"path",ops:o}}}function Ht(t,e,n,s,r,i,o,a,l){const u=t;const c=e;let h=Math.abs(n/2);let f=Math.abs(s/2);h+=m(h*.01,l);f+=m(f*.01,l);let p=r;let d=i;while(p<0){p+=Math.PI*2;d+=Math.PI*2}if(d-p>Math.PI*2){p=0;d=Math.PI*2}const g=Math.PI*2/l.curveStepCount;const k=Math.min(g/2,(d-p)/2);const y=Oe(k,u,c,h,f,p,d,1,l);if(!l.disableMultiStroke){const x=Oe(k,u,c,h,f,p,d,1.5,l);y.push(...x)}if(o){if(a){y.push(...Z(u,c,u+h*Math.cos(p),c+f*Math.sin(p),l),...Z(u,c,u+h*Math.cos(d),c+f*Math.sin(d),l))}else{y.push({op:"lineTo",data:[u,c]},{op:"lineTo",data:[u+h*Math.cos(p),c+f*Math.sin(p)]})}}return{type:"path",ops:y}}function Dt(t,e){const n=ct(at(nt(t)));const s=[];let r=[0,0];let i=[0,0];for(const{key:o,data:a}of n){switch(o){case"M":{i=[a[0],a[1]];r=[a[0],a[1]];break}case"L":s.push(...Z(i[0],i[1],a[0],a[1],e));i=[a[0],a[1]];break;case"C":{const[l,u,c,h,f,p]=a;s.push(...Sn(l,u,c,h,f,p,i,e));i=[f,p];break}case"Z":s.push(...Z(i[0],i[1],r[0],r[1],e));i=[r[0],r[1]];break}}return{type:"path",ops:s}}function vt(t,e){const n=[];for(const s of t){if(s.length){const r=e.maxRandomnessOffset||0;const i=s.length;if(i>2){n.push({op:"move",data:[s[0][0]+m(r,e),s[0][1]+m(r,e)]});for(let o=1;o<i;o++){n.push({op:"lineTo",data:[s[o][0]+m(r,e),s[o][1]+m(r,e)]})}}}}return{type:"fillPath",ops:n}}function tt(t,e){return be(e,kn).fillPolygons(t,e)}function Le(t,e,n,s,r,i,o){const a=t;const l=e;let u=Math.abs(n/2);let c=Math.abs(s/2);u+=m(u*.01,o);c+=m(c*.01,o);let h=r;let f=i;while(h<0){h+=Math.PI*2;f+=Math.PI*2}if(f-h>Math.PI*2){h=0;f=Math.PI*2}const p=(f-h)/o.curveStepCount;const d=[];for(let g=h;g<=f;g=g+p){d.push([a+u*Math.cos(g),l+c*Math.sin(g)])}d.push([a+u*Math.cos(f),l+c*Math.sin(f)]);d.push([a,l]);return tt([d],o)}function bn(t,e){return m(t,e)}function Mn(t,e,n){return Pt(t,e,n)}function $n(t,e,n,s,r){return Z(t,e,n,s,r,true)}function Pe(t){const e=Object.assign({},t);e.randomizer=void 0;if(t.seed){e.seed=t.seed+1}return e}function Ae(t){if(!t.randomizer){t.randomizer=new Mt(t.seed||0)}return t.randomizer.next()}function Pt(t,e,n,s=1){return n.roughness*s*(Ae(n)*(e-t)+t)}function m(t,e,n=1){return Pt(-t,t,e,n)}function Z(t,e,n,s,r,i=false){const o=i?r.disableMultiStrokeFill:r.disableMultiStroke;const a=Et(t,e,n,s,r,true,false);if(o){return a}const l=Et(t,e,n,s,r,true,true);return a.concat(l)}function Et(t,e,n,s,r,i,o){const a=Math.pow(t-n,2)+Math.pow(e-s,2);const l=Math.sqrt(a);let u=1;if(l<200){u=1}else if(l>500){u=.4}else{u=-.0016668*l+1.233334}let c=r.maxRandomnessOffset||0;if(c*c*100>a){c=l/10}const h=c/2;const f=.2+Ae(r)*.2;let p=r.bowing*r.maxRandomnessOffset*(s-e)/200;let d=r.bowing*r.maxRandomnessOffset*(t-n)/200;p=m(p,r,u);d=m(d,r,u);const g=[];const k=()=>m(h,r,u);const y=()=>m(c,r,u);const x=r.preserveVertices;if(i){if(o){g.push({op:"move",data:[t+(x?0:k()),e+(x?0:k())]})}else{g.push({op:"move",data:[t+(x?0:m(c,r,u)),e+(x?0:m(c,r,u))]})}}if(o){g.push({op:"bcurveTo",data:[p+t+(n-t)*f+k(),d+e+(s-e)*f+k(),p+t+2*(n-t)*f+k(),d+e+2*(s-e)*f+k(),n+(x?0:k()),s+(x?0:k())]})}else{g.push({op:"bcurveTo",data:[p+t+(n-t)*f+y(),d+e+(s-e)*f+y(),p+t+2*(n-t)*f+y(),d+e+2*(s-e)*f+y(),n+(x?0:y()),s+(x?0:y())]})}return g}function St(t,e,n){if(!t.length){return[]}const s=[];s.push([t[0][0]+m(e,n),t[0][1]+m(e,n)]);s.push([t[0][0]+m(e,n),t[0][1]+m(e,n)]);for(let r=1;r<t.length;r++){s.push([t[r][0]+m(e,n),t[r][1]+m(e,n)]);if(r===t.length-1){s.push([t[r][0]+m(e,n),t[r][1]+m(e,n)])}}return wt(s,null,n)}function wt(t,e,n){const s=t.length;const r=[];if(s>3){const i=[];const o=1-n.curveTightness;r.push({op:"move",data:[t[1][0],t[1][1]]});for(let a=1;a+2<s;a++){const l=t[a];i[0]=[l[0],l[1]];i[1]=[l[0]+(o*t[a+1][0]-o*t[a-1][0])/6,l[1]+(o*t[a+1][1]-o*t[a-1][1])/6];i[2]=[t[a+1][0]+(o*t[a][0]-o*t[a+2][0])/6,t[a+1][1]+(o*t[a][1]-o*t[a+2][1])/6];i[3]=[t[a+1][0],t[a+1][1]];r.push({op:"bcurveTo",data:[i[1][0],i[1][1],i[2][0],i[2][1],i[3][0],i[3][1]]})}if(e&&e.length===2){const a=n.maxRandomnessOffset;r.push({op:"lineTo",data:[e[0]+m(a,n),e[1]+m(a,n)]})}}else if(s===3){r.push({op:"move",data:[t[1][0],t[1][1]]});r.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})}else if(s===2){r.push(...Et(t[0][0],t[0][1],t[1][0],t[1][1],n,true,true))}return r}function we(t,e,n,s,r,i,o,a){const l=a.roughness===0;const u=[];const c=[];if(l){t=t/4;c.push([e+s*Math.cos(-t),n+r*Math.sin(-t)]);for(let h=0;h<=Math.PI*2;h=h+t){const f=[e+s*Math.cos(h),n+r*Math.sin(h)];u.push(f);c.push(f)}c.push([e+s*Math.cos(0),n+r*Math.sin(0)]);c.push([e+s*Math.cos(t),n+r*Math.sin(t)])}else{const h=m(.5,a)-Math.PI/2;c.push([m(i,a)+e+.9*s*Math.cos(h-t),m(i,a)+n+.9*r*Math.sin(h-t)]);const f=Math.PI*2+h-.01;for(let p=h;p<f;p=p+t){const d=[m(i,a)+e+s*Math.cos(p),m(i,a)+n+r*Math.sin(p)];u.push(d);c.push(d)}c.push([m(i,a)+e+s*Math.cos(h+Math.PI*2+o*.5),m(i,a)+n+r*Math.sin(h+Math.PI*2+o*.5)]);c.push([m(i,a)+e+.98*s*Math.cos(h+o),m(i,a)+n+.98*r*Math.sin(h+o)]);c.push([m(i,a)+e+.9*s*Math.cos(h+o*.5),m(i,a)+n+.9*r*Math.sin(h+o*.5)])}return[c,u]}function Oe(t,e,n,s,r,i,o,a,l){const u=i+m(.1,l);const c=[];c.push([m(a,l)+e+.9*s*Math.cos(u-t),m(a,l)+n+.9*r*Math.sin(u-t)]);for(let h=u;h<=o;h=h+t){c.push([m(a,l)+e+s*Math.cos(h),m(a,l)+n+r*Math.sin(h)])}c.push([e+s*Math.cos(o),n+r*Math.sin(o)]);c.push([e+s*Math.cos(o),n+r*Math.sin(o)]);return wt(c,null,l)}function Sn(t,e,n,s,r,i,o,a){const l=[];const u=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let c=[0,0];const h=a.disableMultiStroke?1:2;const f=a.preserveVertices;for(let p=0;p<h;p++){if(p===0){l.push({op:"move",data:[o[0],o[1]]})}else{l.push({op:"move",data:[o[0]+(f?0:m(u[0],a)),o[1]+(f?0:m(u[0],a))]})}c=f?[r,i]:[r+m(u[p],a),i+m(u[p],a)];l.push({op:"bcurveTo",data:[t+m(u[p],a),e+m(u[p],a),n+m(u[p],a),s+m(u[p],a),c[0],c[1]]})}return l}function ut(t){return[...t]}function Zt(t,e=0){const n=t.length;if(n<3){throw new Error("A curve must have at least three points.")}const s=[];if(n===3){s.push(ut(t[0]),ut(t[1]),ut(t[2]),ut(t[2]))}else{const r=[];r.push(t[0],t[0]);for(let a=1;a<t.length;a++){r.push(t[a]);if(a===t.length-1){r.push(t[a])}}const i=[];const o=1-e;s.push(ut(r[0]));for(let a=1;a+2<r.length;a++){const l=r[a];i[0]=[l[0],l[1]];i[1]=[l[0]+(o*r[a+1][0]-o*r[a-1][0])/6,l[1]+(o*r[a+1][1]-o*r[a-1][1])/6];i[2]=[r[a+1][0]+(o*r[a][0]-o*r[a+2][0])/6,r[a+1][1]+(o*r[a][1]-o*r[a+2][1])/6];i[3]=[r[a+1][0],r[a+1][1]];s.push(i[1],i[2],i[3])}}return s}function Pn(t,e){return Math.sqrt(Lt(t,e))}function Lt(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function wn(t,e,n){const s=Lt(e,n);if(s===0){return Lt(t,e)}let r=((t[0]-e[0])*(n[0]-e[0])+(t[1]-e[1])*(n[1]-e[1]))/s;r=Math.max(0,Math.min(1,r));return Lt(t,et(e,n,r))}function et(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function On(t,e){const n=t[e+0];const s=t[e+1];const r=t[e+2];const i=t[e+3];let o=3*s[0]-2*n[0]-i[0];o*=o;let a=3*s[1]-2*n[1]-i[1];a*=a;let l=3*r[0]-2*i[0]-n[0];l*=l;let u=3*r[1]-2*i[1]-n[1];u*=u;if(o<l){o=l}if(a<u){a=u}return o+a}function Qt(t,e,n,s){const r=s||[];if(On(t,e)<n){const i=t[e+0];if(r.length){const o=Pn(r[r.length-1],i);if(o>1){r.push(i)}}else{r.push(i)}r.push(t[e+3])}else{const i=.5;const o=t[e+0];const a=t[e+1];const l=t[e+2];const u=t[e+3];const c=et(o,a,i);const h=et(a,l,i);const f=et(l,u,i);const p=et(c,h,i);const d=et(h,f,i);const g=et(p,d,i);Qt([o,c,p,g],0,n,r);Qt([g,d,f,u],0,n,r)}return r}function Te(t,e){return At(t,0,t.length,e)}function At(t,e,n,s,r){const i=r||[];const o=t[e];const a=t[n-1];let l=0;let u=1;for(let c=e+1;c<n-1;++c){const h=wn(t[c],o,a);if(h>l){l=h;u=c}}if(Math.sqrt(l)>s){At(t,e,u+1,s,i);At(t,u,n,s,i)}else{if(!i.length){i.push(o)}i.push(a)}return i}function ht(t,e=.15,n){const s=[];const r=(t.length-1)/3;for(let i=0;i<r;i++){const o=i*3;Qt(t,o,e,s)}if(n&&n>0){return At(s,0,s.length,n)}return s}function ze(t,e,n){const s=nt(t);const r=ct(at(s));const i=[];let o=[];let a=[0,0];let l=[];const u=()=>{if(l.length>=4){o.push(...ht(l,e))}l=[]};const c=()=>{u();if(o.length){i.push(o);o=[]}};for(const{key:f,data:p}of r){switch(f){case"M":c();a=[p[0],p[1]];o.push(a);break;case"L":u();o.push([p[0],p[1]]);break;case"C":if(!l.length){const d=o.length?o[o.length-1]:a;l.push([d[0],d[1]])}l.push([p[0],p[1]]);l.push([p[2],p[3]]);l.push([p[4],p[5]]);break;case"Z":u();o.push([a[0],a[1]]);break}}c();if(!n){return i}const h=[];for(const f of i){const p=Te(f,n);if(p.length){h.push(p)}}return h}var A="none";var Tt=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:false,disableMultiStrokeFill:false,preserveVertices:false,fillShapeRoughnessGain:.8};this.config=e||{};if(this.config.options){this.defaultOptions=this._o(this.config.options)}}static newSeed(){return Me()}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,n,s){return{shape:e,sets:n||[],options:s||this.defaultOptions}}line(e,n,s,r,i){const o=this._o(i);return this._d("line",[It(e,n,s,r,o)],o)}rectangle(e,n,s,r,i){const o=this._o(i);const a=[];const l=ve(e,n,s,r,o);if(o.fill){const u=[[e,n],[e+s,n],[e+s,n+r],[e,n+r]];if(o.fillStyle==="solid"){a.push(vt([u],o))}else{a.push(tt([u],o))}}if(o.stroke!==A){a.push(l)}return this._d("rectangle",a,o)}ellipse(e,n,s,r,i){const o=this._o(i);const a=[];const l=Vt(s,r,o);const u=Ot(e,n,o,l);if(o.fill){if(o.fillStyle==="solid"){const c=Ot(e,n,o,l).opset;c.type="fillPath";a.push(c)}else{a.push(tt([u.estimatedPoints],o))}}if(o.stroke!==A){a.push(u.opset)}return this._d("ellipse",a,o)}circle(e,n,s,r){const i=this.ellipse(e,n,s,s,r);i.shape="circle";return i}linearPath(e,n){const s=this._o(n);return this._d("linearPath",[lt(e,false,s)],s)}arc(e,n,s,r,i,o,a=false,l){const u=this._o(l);const c=[];const h=Ht(e,n,s,r,i,o,a,true,u);if(a&&u.fill){if(u.fillStyle==="solid"){const f=Object.assign({},u);f.disableMultiStroke=true;const p=Ht(e,n,s,r,i,o,true,false,f);p.type="fillPath";c.push(p)}else{c.push(Le(e,n,s,r,i,o,u))}}if(u.stroke!==A){c.push(h)}return this._d("arc",c,u)}curve(e,n){const s=this._o(n);const r=[];const i=qt(e,s);if(s.fill&&s.fill!==A){if(s.fillStyle==="solid"){const o=qt(e,Object.assign(Object.assign({},s),{disableMultiStroke:true,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[];const a=e;if(a.length){const l=a[0];const u=typeof l[0]==="number"?[a]:a;for(const c of u){if(c.length<3){o.push(...c)}else if(c.length===3){o.push(...ht(Zt([c[0],c[0],c[1],c[2]]),10,(1+s.roughness)/2))}else{o.push(...ht(Zt(c),10,(1+s.roughness)/2))}}}if(o.length){r.push(tt([o],s))}}}if(s.stroke!==A){r.push(i)}return this._d("curve",r,s)}polygon(e,n){const s=this._o(n);const r=[];const i=lt(e,true,s);if(s.fill){if(s.fillStyle==="solid"){r.push(vt([e],s))}else{r.push(tt([e],s))}}if(s.stroke!==A){r.push(i)}return this._d("polygon",r,s)}path(e,n){const s=this._o(n);const r=[];if(!e){return this._d("path",r,s)}e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=s.fill&&s.fill!=="transparent"&&s.fill!==A;const o=s.stroke!==A;const a=!!(s.simplification&&s.simplification<1);const l=a?4-4*(s.simplification||1):(1+s.roughness)/2;const u=ze(e,1,l);const c=Dt(e,s);if(i){if(s.fillStyle==="solid"){if(u.length===1){const h=Dt(e,Object.assign(Object.assign({},s),{disableMultiStroke:true,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else{r.push(vt(u,s))}}else{r.push(tt(u,s))}}if(o){if(a){u.forEach(h=>{r.push(lt(h,false,s))})}else{r.push(c)}}return this._d("path",r,s)}opsToPath(e,n){let s="";for(const r of e.ops){const i=typeof n==="number"&&n>=0?r.data.map(o=>+o.toFixed(n)):r.data;switch(r.op){case"move":s+=`M${i[0]} ${i[1]} `;break;case"bcurveTo":s+=`C${i[0]} ${i[1]}, ${i[2]} ${i[3]}, ${i[4]} ${i[5]} `;break;case"lineTo":s+=`L${i[0]} ${i[1]} `;break}}return s.trim()}toPaths(e){const n=e.sets||[];const s=e.options||this.defaultOptions;const r=[];for(const i of n){let o=null;switch(i.type){case"path":o={d:this.opsToPath(i),stroke:s.stroke,strokeWidth:s.strokeWidth,fill:A};break;case"fillPath":o={d:this.opsToPath(i),stroke:A,strokeWidth:0,fill:s.fill||A};break;case"fillSketch":o=this.fillSketch(i,s);break}if(o){r.push(o)}}return r}fillSketch(e,n){let s=n.fillWeight;if(s<0){s=n.strokeWidth/2}return{d:this.opsToPath(e),stroke:n.fill||A,strokeWidth:s,fill:A}}_mergedShape(e){return e.filter((n,s)=>{if(s===0){return true}if(n.op==="move"){return false}return true})}};import{decodeXML as ur}from"entities";function Ce(t){const e=[];let n=0;let s;const r=/<\/([a-zA-Z][a-zA-Z0-9-]*)>/g;const i=[];for(const o of he(t)){const a=new Map(o.attributes.map(l=>[l.name,l.value]));i.push({index:o.start,kind:o.selfClosing?"self":"open",tag:o.name,attrs:a})}while((s=r.exec(t))!==null)i.push({index:s.index,kind:"close",tag:s[1]});i.sort((o,a)=>o.index-a.index);for(const o of i){if(o.kind==="self"){if(n===0)e.push({tag:o.tag,attrs:o.attrs})}else if(o.kind==="open"){if(n===0)e.push({tag:o.tag,attrs:o.attrs});n++}else{n--}}return e}var E=new Tt;function vn(t,e){const n=t.get("opacity")??e.opacity;const s=t.get("fill-opacity")??e.fillOpacity;const r=t.get("stroke-opacity")??e.strokeOpacity;if(n===void 0&&s===void 0&&r===void 0)return void 0;const i=o=>o===void 0?n:n===void 0?o:Number(n)*Number(o);return{fill:i(s),stroke:i(r)}}function Ne(t){return{roughness:t?.roughness??1,bowing:t?.bowing??1,passes:t?.passes??2,strokeWidth:t?.strokeWidth??1.6,fill:t?.fill??"none",hachureAngle:t?.hachureAngle??-41,hachureGap:t?.hachureGap??5,fillWeight:t?.fillWeight??.9}}function Ln(t,e,n,s,r){return{seed:e,roughness:t.roughness,bowing:t.bowing,stroke:n,strokeWidth:s,disableMultiStroke:t.passes<2,...r?{fill:r,fillStyle:t.fill==="solid"?"solid":"hachure",fillWeight:t.fillWeight,hachureGap:t.hachureGap,hachureAngle:t.hachureAngle}:{},preserveVertices:false}}function An(t={}){const e=[`stroke-linecap="${t.lineCap??"round"}"`,`stroke-linejoin="${t.lineJoin??"round"}"`,...t.miterLimit!==void 0?[`stroke-miterlimit="${O(String(t.miterLimit))}"`]:[],...t.dashArray!==void 0?[`stroke-dasharray="${O(t.dashArray)}"`]:[],...t.dashOffset!==void 0?[`stroke-dashoffset="${O(String(t.dashOffset))}"`]:[],...t.opacity!==void 0?[`stroke-opacity="${O(String(t.opacity))}"`]:[],...t.pathLength!==void 0?[`pathLength="${O(String(t.pathLength))}"`]:[],...t.paintOrder!==void 0?[`paint-order="${O(t.paintOrder)}"`]:[],...t.mixBlendMode!==void 0?[`style="mix-blend-mode:${t.mixBlendMode}"`]:[],...t.nonScaling?['vector-effect="non-scaling-stroke"']:[]];return e.join(" ")}function Q(t,e,n,s,r,i={},o){const a=[];const l=An(i);const u=l?` ${l}`:" ";const c=o?.stroke===void 0?"":` stroke-opacity="${O(String(o.stroke))}"`;const h=o?.fill===void 0?"":` stroke-opacity="${O(String(o.fill))}"`;for(const f of t){const p=E.opsToPath(f,2);if(!p)continue;if(f.type==="path"){a.push(`<path d="${p}" fill="none" stroke="${e}" stroke-width="${Nt(n)}"${u}${c} />`)}else if(f.type==="fillPath"){a.push(`<path d="${p}" fill="${s}" fill-opacity="${O(String(o?.fill??.92))}" stroke="none" />`)}else if(f.type==="fillSketch"){a.push(`<path d="${p}" fill="none" stroke="${s}" stroke-width="${Nt(r.fillWeight)}"${h} />`)}}return a.join("\n")}function Tn(t,e,n,s,r){const i=Math.min(r,n/2,s/2);return`M ${t+i} ${e} L ${t+n-i} ${e} Q ${t+n} ${e} ${t+n} ${e+i} L ${t+n} ${e+s-i} Q ${t+n} ${e+s} ${t+n-i} ${e+s} L ${t+i} ${e+s} Q ${t} ${e+s} ${t} ${e+s-i} L ${t} ${e+i} Q ${t} ${e} ${t+i} ${e} Z`}function je(t,e,n,s,r,i,o,a,l){return Ge(t,e,n,s,r,i,o,a,l)}function Ge(t,e,n,s,r,i,o,a,l){const u={...a,...o!==void 0?{dashArray:o}:{}};const c=Ln(i,e,n,s,r);try{switch(t.kind){case"rect":{if((t.rx??0)>.5){return Q(E.path(Tn(t.x,t.y,t.width,t.height,t.rx),c).sets,n,s,r,i,u,l)}return Q(E.rectangle(t.x,t.y,t.width,t.height,c).sets,n,s,r,i,u,l)}case"circle":return Q(E.circle(t.cx,t.cy,t.r*2,c).sets,n,s,r,i,u,l);case"ellipse":return Q(E.ellipse(t.cx,t.cy,t.rx*2,t.ry*2,c).sets,n,s,r,i,u,l);case"line":return Q(E.line(t.x1,t.y1,t.x2,t.y2,c).sets,n,s,void 0,i,u,l);case"polygon":return Q(E.polygon(t.points.map(h=>[h.x,h.y]),c).sets,n,s,r,i,u,l);case"polyline":return Q(E.linearPath(t.points.map(h=>[h.x,h.y]),c).sets,n,s,void 0,i,u,l);case"path":return Q(E.path(t.d,c).sets,n,s,r,i,u,l);case"compound":return""}}catch{return""}}function st(t,e,n,s,r,i,o,a,l){if(t.sketcher){const u=t.sketcher(e,{seed:n,stroke:s,width:r,fill:i,p:t.p,style:t.ctx.style,dash:o,strokeProjection:a,opacity:l});if(u!==null)return u}return Ge(e,n,s,r,i,t.p,o,a,l)}function Be(t,e,n){return t.replace(`<${e} `,`<${e} ${n} `)}function Re(t){if(t===void 0)return 1;const e=typeof t==="number"?t:parseFloat(t);if(Number.isNaN(e))return 1;return e}function zt(t,e){return t!==void 0?t:e}function zn(t,e){if(/style="/.test(t)){return t.replace(/style="([^"]*)"/,(n,s)=>{const r=s.trim().length===0||/;\s*$/.test(s)?"":";";return`style="${s}${r}stroke:none"`})}return Be(t,e,'style="stroke:none"')}function Xt(t,e){if(!e||t==="")return t;return`<g transform="${ue(e)}">${t}</g>`}function Cn(t,e){const n=e.p;const s=G(t);const r=Ce(s);const i=t.geometry.kind==="compound"?t.geometry.children:[t.geometry];if(r.length<i.length)return s;const o=s.split("\n");const a=c=>o.length===1&&c===0?s:o[c]??"";const l=[];for(let c=0;c<i.length;c++){const h=r[c];const f=zt(h.attrs.get("stroke"),t.paint.stroke);const p=zt(h.attrs.get("fill"),t.paint.fill);const d=Gt(e.ctx.seed,t.id,`outline:${c}`)||1;const g=Re(zt(h.attrs.get("stroke-width"),t.paint.strokeWidth));const k=zt(h.attrs.get("stroke-dasharray"),t.paint.strokeDasharray);const y=f!==void 0&&f!=="none"&&g>0;const x=p!==void 0&&p!=="none";const $=x&&n.fill!=="none"?p:void 0;const C=vn(h.attrs,t.paint)??{};if(n.fill==="wash"&&t.channels?.category!==void 0&&["pie-slice","actor","legend","point","bar"].includes(t.role))C.fill??="1";if(!y){if(t.surfaceFragment&&x&&n.fill==="none"&&_e(p))continue;if($){const F=st(e,i[c],d,"none",0,$,k,void 0,C);if(F){l.push(Xt(F,t.transform));continue}}l.push(a(c));continue}const P=Math.max(.6,Math.min(n.strokeWidth*g,n.strokeWidth*4));const W=st(e,i[c],d,f,P,$,k,void 0,C);if(!W){l.push(a(c));continue}if(x&&n.fill==="none"&&!_e(p)){l.push(zn(a(c),h.tag))}l.push(Xt(W,t.transform))}const u=l.filter(Boolean).join("\n");return t.identity&&!/\sdata-id=/.test(u)?fe(u,t.identity):u}function _e(t){return t.startsWith("var(--_node-fill")||t.startsWith("var(--_group")||t==="var(--bg)"||t==="var(--surface)"}function Nn(t,e){const n=G(t);if(t.lineStyle==="invisible"||n==="")return n;const s=t.stroke.color;const r=Re(t.stroke.width);if(r<=0)return n;const i=t.stroke.encodesValue?r:e.p.strokeWidth*r;const o=Gt(e.ctx.seed,t.id,"stroke")||1;const a=t.stroke.dash?typeof t.stroke.dash.array==="string"?t.stroke.dash.array:t.stroke.dash.array.join(" "):void 0;const l={...a!==void 0?{dashArray:a}:{},...t.stroke.dash?.offset!==void 0?{dashOffset:t.stroke.dash.offset}:{},lineCap:t.stroke.lineCap,lineJoin:t.stroke.lineJoin,miterLimit:t.stroke.miterLimit,...t.stroke.opacity!==void 0?{opacity:t.stroke.opacity}:{},...t.stroke.pathLength!==void 0?{pathLength:t.stroke.pathLength}:{},...t.stroke.paintOrder!==void 0?{paintOrder:t.stroke.paintOrder}:{},...t.stroke.mixBlendMode!==void 0?{mixBlendMode:t.stroke.mixBlendMode}:{},nonScaling:t.stroke.nonScaling};let u="";const c=t.route.geometry;if(c.kind==="polyline"){u=st(e,{kind:"polyline",points:c.points},o,s,i,void 0,a,l)}else if(c.kind==="line"){u=st(e,c,o,s,i,void 0,a,l)}else{const p=le(c,t.route.closed);if(p.length===1){u=st(e,{kind:"path",d:c.d},o,s,i,void 0,a,l)}if(!u&&c.points.length>1){const d=p.map((g,k)=>{const y=g.points[0];const x=g.points.at(-1);const $=g.closed&&y&&x&&(y.x!==x.x||y.y!==x.y)?[...g.points,y]:g.points;return st(e,{kind:"polyline",points:[...$]},o+k,s,i,void 0,a,l)});u=d.every(Boolean)?d.join("\n"):""}}if(!u)return n;const h=n.replace(/\sstroke-opacity=(?:"[^"]*"|'[^']*')/,' stroke-opacity="0"');const f=h===n?Be(n,t.route.geometry.kind,'stroke-opacity="0"'):h;return`${f}
2
2
  ${Xt(u,t.transform)}`}function _n(t,e){const n=t.pageFill!==void 0?We(G(t),t.pageFill):jn(G(t),t,e);return n.replace(/<text\b[^>]*>/g,s=>s.replace(/\s(?:paint-order|stroke|stroke-width|stroke-linejoin|stroke-linecap)="[^"]*"/g,"").replace(/^<text/,'<text paint-order="stroke" stroke="var(--bg)" stroke-width="3" stroke-linejoin="round" stroke-linecap="round"'))}function jn(t,e,n){const s=n.colors;const r=s===void 0?void 0:_t("var(--bg)",s);if(s===void 0||r===void 0)return t;const i=e.fontSize>=24?ce:oe;const o=l=>{const u=_t(l,s);return u!==void 0&&(ae(u,r)??i)<i};const a=e.paint.fill!==void 0&&o(e.paint.fill)?We(t,"var(--_text)"):t;return a.replace(/(<tspan\b[^>]*?\sfill=")([^"]*)(")/g,(l,u,c,h)=>o(c)?`${u}var(--_text)${h}`:l)}function We(t,e){return/<text\b[^>]*?\sfill="/.test(t)?t.replace(/(<text\b[^>]*?\sfill=")[^"]*(")/,`$1${O(e)}$2`):t.replace(/<text /,`<text fill="${O(e)}" `)}function Gn(t,e){const n=t?.backdrop??"plain";if(n==="paper-ruled"){const s=['<g data-backdrop="paper-ruled">'];for(let r=26;r<e.height;r+=26){s.push(` <line x1="0" y1="${r}" x2="${e.width}" y2="${r}" stroke="var(--_line)" stroke-width="0.5" opacity="0.14" />`)}s.push("</g>");return s.join("\n")}if(n==="grid"){const s=['<g data-backdrop="grid">'];for(let r=22;r<e.width;r+=22)s.push(` <line x1="${r}" y1="0" x2="${r}" y2="${e.height}" stroke="var(--_line)" stroke-width="0.5" opacity="0.10" />`);for(let r=22;r<e.height;r+=22)s.push(` <line x1="0" y1="${r}" x2="${e.width}" y2="${r}" stroke="var(--_line)" stroke-width="0.5" opacity="0.10" />`);s.push("</g>");return s.join("\n")}return""}function Jt(t,e){switch(t.kind){case"document":return G(t);case"shape":return gt(t.role).sketch==="shape"?Cn(t,e):G(t);case"connector":return gt(t.role).sketch==="connector"?Nn(t,e):G(t);case"text":return gt(t.role).textHalo?_n(t,e):G(t);case"group":return me(t.open,t.close,t.join,t.children.map(n=>({serialized:Jt(n.node,e),indent:n.indent})))}}function Yt(t,e){return{id:t,capabilities:pe(`backend:${t}`,"sketch",e?"hybrid":"rough"),drawNode(n,s){return Jt(n,{ctx:s,p:Ne(s.style),sketcher:e})},render(n,s){const r=de(n);const i={ctx:s,p:Ne(s.style),sketcher:e,colors:r.colors};const o=[];for(let a=0;a<r.parts.length;a++){const l=r.parts[a];o.push(ge(s,l,Jt(l,i)));if(a===0&&l.kind==="document"&&l.element==="open"){const u=ke(r,s);if(u)o.push(u);const c=Gn(s.style,r);if(c)o.push(c)}}return o.join("\n")}}}var Fe=Yt("rough");var{PI:Bn}=Math;var ft=Bn+1e-4;var Ee=.5;var Ie=[1,1];function qe(t,e,n,s=r=>r){return t*s(.5-e*(.5-n))}var{min:Kt}=Math;function Ke(t,e,n){let s=Kt(1,e/n);return Kt(1,t+(Kt(1,1-s)-t)*(s*.275))}function Rn(t){return[-t[0],-t[1]]}function R(t,e){return[t[0]+e[0],t[1]+e[1]]}function Ve(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function K(t,e){return[t[0]-e[0],t[1]-e[1]]}function ee(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function Y(t,e){return[t[0]*e,t[1]*e]}function Ut(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function Wn(t,e){return[t[0]/e,t[1]/e]}function Ue(t){return[t[1],-t[0]]}function te(t,e){let n=e[0];return t[0]=e[1],t[1]=-n,t}function He(t,e){return t[0]*e[0]+t[1]*e[1]}function Fn(t,e){return t[0]===e[0]&&t[1]===e[1]}function En(t){return Math.hypot(t[0],t[1])}function De(t,e){let n=t[0]-e[0],s=t[1]-e[1];return n*n+s*s}function tn(t){return Wn(t,En(t))}function In(t,e){return Math.hypot(t[1]-e[1],t[0]-e[0])}function ne(t,e,n){let s=Math.sin(n),r=Math.cos(n),i=t[0]-e[0],o=t[1]-e[1],a=i*r-o*s,l=i*s+o*r;return[a+e[0],l+e[1]]}function Ze(t,e,n,s){let r=Math.sin(s),i=Math.cos(s),o=e[0]-n[0],a=e[1]-n[1],l=o*i-a*r,u=o*r+a*i;return t[0]=l+n[0],t[1]=u+n[1],t}function Qe(t,e,n){return R(t,Y(K(e,t),n))}function qn(t,e,n,s){let r=n[0]-e[0],i=n[1]-e[1];return t[0]=e[0]+r*s,t[1]=e[1]+i*s,t}function en(t,e,n){return R(t,Y(e,n))}var S=[0,0];var X=[0,0];var J=[0,0];function Vn(t,e){let n=en(t,tn(Ue(K(t,R(t,[1,1])))),-e),s=[],r=1/13;for(let i=r;i<=1;i+=r)s.push(ne(n,t,ft*2*i));return s}function Hn(t,e,n){let s=[],r=1/n;for(let i=r;i<=1;i+=r)s.push(ne(e,t,ft*i));return s}function Dn(t,e,n){let s=K(e,n),r=Y(s,.5),i=Y(s,.51);return[K(t,r),K(t,i),R(t,i),R(t,r)]}function Zn(t,e,n,s){let r=[],i=en(t,e,n),o=1/s;for(let a=o;a<1;a+=o)r.push(ne(i,t,ft*3*a));return r}function Qn(t,e,n){return[R(t,Y(e,n)),R(t,Y(e,n*.99)),K(t,Y(e,n*.99)),K(t,Y(e,n))]}function Xe(t,e,n){return t===false||t===void 0?0:t===true?Math.max(e,n):t}function Xn(t,e,n){return t.slice(0,10).reduce((s,r)=>{let i=r.pressure;return e&&(i=Ke(s,r.distance,n)),(s+i)/2},t[0].pressure)}function Jn(t,e={}){let{size:n=16,smoothing:s=.5,thinning:r=.5,simulatePressure:i=true,easing:o=b=>b,start:a={},end:l={},last:u=false}=e,{cap:c=true,easing:h=b=>b*(2-b)}=a,{cap:f=true,easing:p=b=>--b*b*b+1}=l;if(t.length===0||n<=0)return[];let d=t[t.length-1].runningLength,g=Xe(a.taper,n,d),k=Xe(l.taper,n,d),y=(n*s)**2,x=[],$=[],C=Xn(t,i,n),P=qe(n,r,t[t.length-1].pressure,o),W,F=t[0].vector,I=t[0].point,T=I,N=I,_=T,w=false;for(let b=0;b<t.length;b++){let{pressure:rt}=t[b],{point:j,vector:V,distance:on,runningLength:it}=t[b],pt=b===t.length-1;if(!pt&&d-it<3)continue;r?(i&&(rt=Ke(C,on,n)),P=qe(n,r,rt,o)):P=n/2,W===void 0&&(W=P);let cn=it<g?h(it/g):1,ln=d-it<k?p((d-it)/k):1;P=Math.max(.01,P*Math.min(cn,ln));let re=(pt?t[b]:t[b+1]).vector,Ct=pt?1:He(V,re),un=He(V,F)<0&&!w,ie=Ct!==null&&Ct<0;if(un||ie){te(S,F),Ut(S,S,P);for(let dt=0;dt<=1;dt+=.07692307692307693)ee(X,j,S),Ze(X,X,j,ft*dt),N=[X[0],X[1]],x.push(N),Ve(J,j,S),Ze(J,J,j,ft*-dt),_=[J[0],J[1]],$.push(_);I=N,T=_,ie&&(w=true);continue}if(w=false,pt){te(S,V),Ut(S,S,P),x.push(K(j,S)),$.push(R(j,S));continue}qn(S,re,V,Ct),te(S,S),Ut(S,S,P),ee(X,j,S),N=[X[0],X[1]],(b<=1||De(I,N)>y)&&(x.push(N),I=N),Ve(J,j,S),_=[J[0],J[1]],(b<=1||De(T,_)>y)&&($.push(_),T=_),C=rt,F=V}let M=[t[0].point[0],t[0].point[1]],v=t.length>1?[t[t.length-1].point[0],t[t.length-1].point[1]]:R(t[0].point,[1,1]),q=[],z=[];if(t.length===1){if(!(g||k)||u)return Vn(M,W||P)}else{g||k&&t.length===1||(c?q.push(...Hn(M,$[0],13)):q.push(...Dn(M,x[0],$[0])));let b=Ue(Rn(t[t.length-1].vector));k||g&&t.length===1?z.push(v):f?z.push(...Zn(v,b,P,29)):z.push(...Qn(v,b,P))}return x.concat(z,$.reverse(),q)}var Je=[0,0];function Ye(t){return t!=null&&t>=0}function Yn(t,e={}){let{streamline:n=.5,size:s=16,last:r=false}=e;if(t.length===0)return[];let i=.15+(1-n)*.85,o=Array.isArray(t[0])?t:t.map(({x:f,y:p,pressure:d=Ee})=>[f,p,d]);if(o.length===2){let f=o[1];o=o.slice(0,-1);for(let p=1;p<5;p++)o.push(Qe(o[0],f,p/4))}o.length===1&&(o=[...o,[...R(o[0],Ie),...o[0].slice(2)]]);let a=[{point:[o[0][0],o[0][1]],pressure:Ye(o[0][2])?o[0][2]:.25,vector:[...Ie],distance:0,runningLength:0}],l=false,u=0,c=a[0],h=o.length-1;for(let f=1;f<o.length;f++){let p=r&&f===h?[o[f][0],o[f][1]]:Qe(c.point,o[f],i);if(Fn(c.point,p))continue;let d=In(p,c.point);if(u+=d,f<h&&!l){if(u<s)continue;l=true}ee(Je,c.point,p),c={point:p,pressure:Ye(o[f][2])?o[f][2]:Ee,vector:tn(Je),distance:d,runningLength:u},a.push(c)}return a[0].vector=a[1]?.vector||[0,0],a}function nn(t,e={}){return Jn(Yn(t,e),e)}var U=t=>Math.round(t*1e3)/1e3;var sn=(t,e,n)=>t+(e-t)*n;var Kn=t=>Math.max(0,Math.min(1,t));function rn(t){switch(t.kind){case"rect":return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}];case"polygon":return t.points;case"circle":{const e=[];for(let n=0;n<24;n++){const s=n/24*Math.PI*2;e.push({x:t.cx+Math.cos(s)*t.r,y:t.cy+Math.sin(s)*t.r})}return e}case"ellipse":{const e=[];for(let n=0;n<28;n++){const s=n/28*Math.PI*2;e.push({x:t.cx+Math.cos(s)*t.rx,y:t.cy+Math.sin(s)*t.ry})}return e}default:return null}}function Un(t){if(t.length<2)return"";const e=[`M${U(t[0][0])},${U(t[0][1])}`];for(let n=1;n<t.length;n++){const[s,r]=t[n];const[i,o]=t[(n+1)%t.length];e.push(`Q${U(s)},${U(r)} ${U((s+i)/2)},${U((r+o)/2)}`)}e.push("Z");return e.join(" ")}function ts(t,e,n,s){const r=n?[...t,t[0]]:t;const i=[];for(let a=0;a<r.length-1;a++){const l=r[a],u=r[a+1];const c=Math.hypot(u.x-l.x,u.y-l.y)||1;const h=Math.max(1,Math.ceil(c/14));const f=-(u.y-l.y)/c,p=(u.x-l.x)/c;for(let d=0;d<h;d++){if(a>0&&d===0)continue;const g=d/h;const k=!n&&(a===0&&d===0||a===r.length-2&&d===h);const y=k?0:(e()-.5)*2*s;const x={x:sn(l.x,u.x,g)+f*y,y:sn(l.y,u.y,g)+p*y};const $=(a+g)/Math.max(1,r.length-1);const C=Kn(.52+Math.sin($*Math.PI*2)*.12+(e()-.5)*.16);i.push([x.x,x.y,C])}}const o=r[r.length-1];i.push([o.x,o.y,n?i[0]?.[2]??.55:.46]);return i}function se(t,e,n){if(t.length<2)return"";const s=ts(t,e,n.closed,1);const r=nn(s,{size:n.width,thinning:.58,smoothing:.62,streamline:.35,simulatePressure:false,start:{cap:true,taper:n.closed?0:10},end:{cap:true,taper:n.closed?0:14},last:true});return Un(r)}function es(t,e,n,s,r){const i=t.map(a=>({x:a.x+(e()-.5)*3,y:a.y+(e()-.5)*3}));const o=i.map((a,l)=>`${l?"L":"M"}${U(a.x)},${U(a.y)}`).join(" ")+" Z";return`<path d="${o}" fill="${n}" fill-opacity="${s}" stroke="none" />
3
3
  <path d="${o}" fill="none" stroke="${n}" stroke-width="1.4" stroke-opacity="${r}" />`}var ns=(t,e)=>{const n=e.style?.stroke??"jittered";const s=e.style?.fill??"none";const r=s==="wash"&&e.fill!==void 0;const i=n==="freehand";const o=e.opacity?.fill===void 0?void 0:Number(e.opacity.fill);const a=e.opacity?.stroke===void 0?void 0:Number(e.opacity.stroke);if(!r&&!i)return null;const l=[];if(r){const c=jt((e.seed^2654435769)>>>0);const h=t.kind==="path"?null:rn(t);if(h){l.push(es(h,c,e.fill,o??e.style?.washOpacity??.3,e.style?.washEdge??.34))}else if(t.kind==="path"){l.push(`<path d="${t.d}" fill="${e.fill}" fill-opacity="${o??e.style?.washOpacity??.3}" stroke="${e.fill}" stroke-width="1.4" stroke-opacity="${e.style?.washEdge??.34}" />`)}}if(i&&!e.dash){const c=jt(e.seed||1);const h=Math.max(2.5,e.width*2.2);let f="";if(t.kind==="polyline"){f=se(t.points,c,{width:h,closed:false})}else if(t.kind==="line"){f=se([{x:t.x1,y:t.y1},{x:t.x2,y:t.y2}],c,{width:h,closed:false})}else{const p=rn(t);if(p)f=se(p,c,{width:h,closed:true})}if(f){const p=e.strokeProjection?[...e.strokeProjection.opacity!==void 0?[`opacity="${O(String(e.strokeProjection.opacity))}"`]:[],...e.strokeProjection.paintOrder!==void 0?[`paint-order="${O(e.strokeProjection.paintOrder)}"`]:[],...e.strokeProjection.mixBlendMode!==void 0?[`style="mix-blend-mode:${e.strokeProjection.mixBlendMode}"`]:[]].join(" "):"";const d=a===void 0?"":` fill-opacity="${O(String(a))}"`;l.push(`<path d="${f}" fill="${e.stroke}" stroke="none"${d}${p?` ${p}`:""} />`);return l.join("\n")}}const u=je(t,e.seed,e.stroke,e.width,r?void 0:e.fill,e.p,e.dash,e.strokeProjection,e.opacity);if(u)l.push(u);return l.length>0?l.join("\n"):null};var an=Yt("hybrid",ns);var ss=Object.freeze([Bt,Fe,an]);for(const t of ss){if(t!==Bt)ye(t)}
4
- //# sourceMappingURL=chunk-UA234O4M.js.map
4
+ //# sourceMappingURL=chunk-HINRNKPO.js.map