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.
- package/CHANGELOG.md +34 -0
- package/dist/agent-core.d.ts +7 -7
- package/dist/agent-core.js +1 -1
- package/dist/agent.d.ts +7 -7
- package/dist/agent.js +1 -1
- package/dist/agentic-mermaid-mcp.js +1 -1
- package/dist/am.js +1 -1
- package/dist/browser-lazy/chunks/{agentic-producer-core-CC6OOLDW.js → agentic-producer-core-ECZ3CMZM.js} +1 -1
- package/dist/browser-lazy/chunks/{architecture-QUFVKYJR.js → architecture-H5LTMKQW.js} +6 -6
- package/dist/browser-lazy/chunks/{block-6J3Q63BO.js → block-566X6FNV.js} +5 -5
- package/dist/browser-lazy/chunks/{builtin-backends-7SOZZHPF.js → builtin-backends-VAFEZXKY.js} +6 -6
- package/dist/browser-lazy/chunks/{c4-SQVBZAKJ.js → c4-ZXFDLBFK.js} +5 -5
- package/dist/browser-lazy/chunks/{chunk-5X6MJX3H.js → chunk-2JQXRKBC.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-E2WMJZNM.js → chunk-37FZNMPR.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-TYZOZXUJ.js → chunk-3JTYTXA6.js} +6 -6
- package/dist/browser-lazy/chunks/{chunk-PQGPS2YV.js → chunk-4NILRBC7.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-AMJLVPUB.js → chunk-5LKPDHPC.js} +2 -2
- package/dist/browser-lazy/chunks/{chunk-BY2CPG6B.js → chunk-62MR3LWJ.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-J7FFAFQF.js → chunk-64JFHCJC.js} +1 -1
- package/dist/browser-lazy/chunks/chunk-6GPDLZFQ.js +1 -0
- package/dist/browser-lazy/chunks/{chunk-VWVZGQE2.js → chunk-6UOOATQR.js} +1 -1
- package/dist/browser-lazy/chunks/chunk-7TTFBJYA.js +1 -0
- package/dist/browser-lazy/chunks/chunk-7UFOFWBA.js +20 -0
- package/dist/browser-lazy/chunks/{chunk-5B2Z7575.js → chunk-A7V5VDKN.js} +1 -1
- package/dist/browser-lazy/chunks/chunk-CPO5P4L2.js +1 -0
- package/dist/browser-lazy/chunks/chunk-EIYLJ4FI.js +20 -0
- package/dist/browser-lazy/chunks/{chunk-X2UYKWKM.js → chunk-G4JBA7HU.js} +3 -3
- package/dist/browser-lazy/chunks/{chunk-2UIA2IME.js → chunk-IUI4DYC3.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-QA6GJQ4X.js → chunk-J57YRC2M.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-BU5LHXNJ.js → chunk-LBXXKLIR.js} +3 -3
- package/dist/browser-lazy/chunks/chunk-NKW2ZNCD.js +1 -0
- package/dist/browser-lazy/chunks/{chunk-ICC7HBJX.js → chunk-O34YYEQV.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-UL6NDWLL.js → chunk-OBI5U5XU.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-YCEICNM6.js → chunk-OFOS57WQ.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-OZ443IVJ.js → chunk-PSZEE64O.js} +7 -7
- package/dist/browser-lazy/chunks/{chunk-SZELX2EJ.js → chunk-PXTLV57R.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-HLWUNUCM.js → chunk-QVSZOF5M.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-2GPK4VFF.js → chunk-TT5GR5EJ.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-DF6765YX.js → chunk-V6I2VGNQ.js} +5 -5
- package/dist/browser-lazy/chunks/{chunk-CN7WTBWB.js → chunk-VRZKI33U.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-2SH76OTH.js → chunk-XHU3A432.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-NO7ZIVRU.js → chunk-YVNJDVQO.js} +1 -1
- package/dist/browser-lazy/chunks/chunk-Z7UHFVKN.js +6 -0
- package/dist/browser-lazy/chunks/{class-5QA4SCTS.js → class-XIFNVBFE.js} +8 -8
- package/dist/{zenuml/chunks/decode-BWERFDGK.js → browser-lazy/chunks/decode-5MFOG3AZ.js} +1 -1
- package/dist/browser-lazy/chunks/{elk.bundled-L4CADV5W.js → elk.bundled-RYWHIS5N.js} +8 -8
- package/dist/browser-lazy/chunks/er-VEUYJBGG.js +11 -0
- package/dist/browser-lazy/chunks/{eventmodeling-2BPLHWRN.js → eventmodeling-G7DITZX7.js} +10 -10
- package/dist/browser-lazy/chunks/{flowchart-NEIMZTB5.js → flowchart-SSFIU4EU.js} +1 -1
- package/dist/browser-lazy/chunks/{forest-implementation-AEP24AIP.js → forest-implementation-RWFF7XDV.js} +1 -1
- package/dist/browser-lazy/chunks/{gantt-RDPIFYAF.js → gantt-HQNVDX2B.js} +6 -6
- package/dist/browser-lazy/chunks/{gitgraph-N4Y5RYB7.js → gitgraph-Z5MN6M6L.js} +4 -4
- package/dist/browser-lazy/chunks/{ishikawa-LD3YBDJN.js → ishikawa-UEERNFQV.js} +2 -2
- package/dist/browser-lazy/chunks/{journey-6YQR5DJX.js → journey-3BEWWGB5.js} +6 -6
- package/dist/browser-lazy/chunks/{kanban-PLMJ7NBW.js → kanban-2WFNCWLB.js} +10 -10
- package/dist/browser-lazy/chunks/{mermaid-yaml-runtime-QVYX4EWK.js → mermaid-yaml-runtime-IK4ET4BT.js} +8 -8
- package/dist/browser-lazy/chunks/{mindmap-K2UBFO3Y.js → mindmap-R2C6SNYR.js} +4 -4
- package/dist/browser-lazy/chunks/{packet-CUW4QY6Y.js → packet-GMVCI5YZ.js} +3 -3
- package/dist/browser-lazy/chunks/{pie-7F7UUCG3.js → pie-WER45DKC.js} +7 -7
- package/dist/browser-lazy/chunks/{quadrant-TOONO2WC.js → quadrant-NCUPSFKN.js} +4 -4
- package/dist/browser-lazy/chunks/{radar-J6JVWVAX.js → radar-WLYS4YC5.js} +8 -8
- package/dist/browser-lazy/chunks/render-core-42UVWIPF.js +3 -0
- package/dist/browser-lazy/chunks/{requirement-CMAKDJPO.js → requirement-AK3NWMJ6.js} +7 -7
- package/dist/browser-lazy/chunks/{sankey-AWXQEP3F.js → sankey-C2DY6WVU.js} +4 -4
- package/dist/browser-lazy/chunks/{sequence-Q2RJRB4L.js → sequence-D4WJB44W.js} +1 -1
- package/dist/browser-lazy/chunks/{state-WRBFQEDX.js → state-YUQVESE7.js} +2 -2
- package/dist/browser-lazy/chunks/{timeline-D2KILFXM.js → timeline-BMBJJXWR.js} +4 -4
- package/dist/browser-lazy/chunks/{treemap-N3VYX5D4.js → treemap-B66XBZZ6.js} +3 -3
- package/dist/browser-lazy/chunks/{xychart-G73OGK66.js → xychart-HAVFROGT.js} +6 -6
- package/dist/browser-lazy/chunks/{zenuml-H4BXNYXR.js → zenuml-62RLYFWP.js} +7 -7
- package/dist/browser-lazy/index.js +1 -1
- package/dist/browser.global.js +507 -507
- package/dist/{chunk-DQDKA5ND.js → chunk-2DNGDTJD.js} +2 -2
- package/dist/{chunk-GVCHLSHH.js → chunk-4F2UGYTM.js} +2 -2
- package/dist/{chunk-H3NCS2XZ.js → chunk-7XYB2LNC.js} +2 -2
- package/dist/chunk-DOFB572I.js +58 -0
- package/dist/chunk-EHJI3QYE.js +52 -0
- package/dist/{chunk-UA234O4M.js → chunk-HINRNKPO.js} +2 -2
- package/dist/{chunk-JZOJ4YGS.js → chunk-KXMANAST.js} +33 -33
- package/dist/{chunk-7CRDX2QR.js → chunk-U4MT3RRE.js} +2 -2
- package/dist/{chunk-NKNFOREZ.js → chunk-WYIB6BUR.js} +2 -2
- package/dist/{cli-YGGTJZH7.js → cli-ZYIDBYNS.js} +2 -2
- package/dist/{index-EeXqJXr5.d.ts → index-Bvhprdxz.d.ts} +3 -3
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/{mcp-cli-63DYXTVD.js → mcp-cli-YVDCORWA.js} +2 -2
- package/dist/{paint-certification-6rwQjIv_.d.ts → paint-certification-BoLyr006.d.ts} +2 -2
- package/dist/{server-5NEOHOFS.js → server-4JGAVXR3.js} +2 -2
- package/dist/{svg-styles-BdnoM7AT.d.ts → svg-styles-BnCoXyYe.d.ts} +1 -1
- package/dist/svg-styles.d.ts +1 -1
- package/dist/svg-styles.js +1 -1
- package/dist/svg.d.ts +4 -4
- package/dist/svg.js +1 -1
- package/dist/{types-BcS52Mjt.d.ts → types-CLVJCaH2.d.ts} +1 -1
- package/dist/zenuml/chunks/{appearance-UOQ5KA6O.js → appearance-5RM5MVM2.js} +1 -1
- package/dist/zenuml/chunks/{builtin-backends-KDKE7YHO.js → builtin-backends-UTNWL4N3.js} +11 -11
- package/dist/zenuml/chunks/{chunk-QWX77U7G.js → chunk-3A6S6GNB.js} +2 -2
- package/dist/zenuml/chunks/{chunk-OXQWRSBM.js → chunk-55WS466K.js} +11 -11
- package/dist/zenuml/chunks/chunk-6J4BGPB2.js +29 -0
- package/dist/zenuml/chunks/chunk-CNLL4BGF.js +1 -0
- package/dist/zenuml/chunks/{chunk-RZ6XK5CD.js → chunk-IARQ24W3.js} +13 -13
- package/dist/zenuml/chunks/{chunk-42DXZ5C6.js → chunk-ZNZRIISS.js} +2 -2
- package/dist/{browser-lazy/chunks/decode-63UIZGD2.js → zenuml/chunks/decode-LDNNXEAO.js} +1 -1
- package/dist/zenuml/chunks/{mermaid-yaml-runtime-KZVU74WU.js → mermaid-yaml-runtime-A5CNJ3IE.js} +8 -8
- package/dist/zenuml/chunks/render-core-ECIWU5ZS.js +3 -0
- package/dist/zenuml/chunks/{zenuml-EA2ZFRUX.js → zenuml-N3LZMB2G.js} +8 -8
- package/dist/zenuml.d.ts +2 -2
- package/dist/zenuml.js +1 -1
- package/docs/MCP-DIRECTORY-LISTINGS.md +81 -12
- package/docs/api.md +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/dist/browser-lazy/chunks/chunk-4LHYF3BS.js +0 -1
- package/dist/browser-lazy/chunks/chunk-FAIMVOX5.js +0 -6
- package/dist/browser-lazy/chunks/chunk-GVOEAY52.js +0 -1
- package/dist/browser-lazy/chunks/chunk-J35HAQQF.js +0 -20
- package/dist/browser-lazy/chunks/chunk-RIVTHZAQ.js +0 -1
- package/dist/browser-lazy/chunks/chunk-Z3FDIVLN.js +0 -20
- package/dist/browser-lazy/chunks/er-7ZSKGN7Y.js +0 -11
- package/dist/browser-lazy/chunks/render-core-BZOM3K7D.js +0 -3
- package/dist/chunk-EHCMJUMD.js +0 -52
- package/dist/chunk-OMY6NRQD.js +0 -58
- package/dist/zenuml/chunks/chunk-7TVYPTDW.js +0 -1
- package/dist/zenuml/chunks/chunk-RLJEI7YN.js +0 -29
- package/dist/zenuml/chunks/render-core-V5RQ737O.js +0 -3
- /package/dist/browser-lazy/chunks/{chunk-5FQ534HP.js → chunk-BMZ24VPS.js} +0 -0
- /package/dist/browser-lazy/chunks/{chunk-2I4UPL7Q.js → chunk-D6MQ7QSU.js} +0 -0
- /package/dist/browser-lazy/chunks/{chunk-CQE4HQEW.js → chunk-HJVO5VC3.js} +0 -0
- /package/dist/browser-lazy/chunks/{chunk-LH7HUDKW.js → chunk-L4UC3KGS.js} +0 -0
- /package/dist/browser-lazy/chunks/{chunk-NMQQMRIR.js → chunk-MFTQWHUB.js} +0 -0
- /package/dist/browser-lazy/chunks/{chunk-N5ELX7LR.js → chunk-PJJSDGLB.js} +0 -0
- /package/dist/browser-lazy/chunks/{chunk-CSFUKSU6.js → chunk-QCU5G5PZ.js} +0 -0
- /package/dist/browser-lazy/chunks/{chunk-VQYYGAXP.js → chunk-TLFX3U6S.js} +0 -0
- /package/dist/browser-lazy/chunks/{chunk-5UVGUSD6.js → chunk-YHMTSXIR.js} +0 -0
- /package/dist/zenuml/chunks/{chunk-EVPSMEKN.js → chunk-GC7IPQ5P.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-
|
|
1
|
+
import{n as e}from"./chunk-3A6S6GNB.js";import{ka as o,o as r,oa as l,sa as t}from"./chunk-IARQ24W3.js";import"./chunk-GC7IPQ5P.js";function n(n){let a=e(n),s=Object.keys(a??{}).filter(e=>!["formatVersion","$schema","name","blurb","colors","roles"].includes(e));for(let[e,o]of Object.entries(a?.roles??{})){let r="node"===e||"group"===e?["fillColor","borderColor","textColor"]:"edge"===e?["strokeColor","textColor"]:"label"===e?["textColor"]:[];for(let l of Object.keys(o))r.includes(l)||s.push(`roles.${e}.${l}`)}if(s.length)throw Error(`ZenUML cannot realize ${s.join(", ")}; use a palette or node/edge/group/label paint colors.`);let d=t({...l,...a?.colors}),i=a?.roles,u=i?.node?.fillColor??d.nodeFill,c=i?.group?.fillColor??d.groupHdr,g={background:d.bg,foreground:i?.label?.textColor??d.text,muted:d.textMuted,nodeFill:u,nodeBorder:i?.node?.borderColor??d.nodeStroke,nodeText:i?.node?.textColor??r(i?.label?.textColor??d.text,u),edge:i?.edge?.strokeColor??d.line,edgeText:i?.edge?.textColor??i?.label?.textColor??d.text,groupFill:c,groupBorder:i?.group?.borderColor??d.nodeStroke,groupText:i?.group?.textColor??r(i?.label?.textColor??d.text,c)};for(let[e,r]of Object.entries(g))if(!o(r))throw Error(`ZenUML ${e} requires a concrete, non-fetching color; unresolved CSS variables are unavailable.`);return g}export{n as resolveZenUMLAppearance};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{M as t,ba as e,j as s,ja as r,k as n,la as a,ma as i,na as o,oa as l,p as h,s as u,sa as p,z as c}from"./chunk-RLJEI7YN.js";import{Ha as f,P as d,T as g,Z as k,k as y,l as M,m as m,ra as x}from"./chunk-RZ6XK5CD.js";import"./chunk-EVPSMEKN.js";function v(t,e,s){if(t&&t.length){let[r,n]=e,a=Math.PI/180*s,i=Math.cos(a),o=Math.sin(a);for(let e of t){let[t,s]=e;e[0]=(t-r)*i-(s-n)*o+r,e[1]=(t-r)*o+(s-n)*i+n}}}function b(t,e){var s;let r=e.hachureAngle+90,n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return e.roughness>=1&&((null==(s=e.randomizer)?void 0:s.next())||Math.random())>.7&&(a=n),function(t,e,s,r=1){let n=Math.max(e,.1),a=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,i=[0,0];if(s)for(let t of a)v(t,i,s);let o=function(t,e,s){let r=[];for(let e of t){var n,a;let t=[...e];n=t[0],a=t[t.length-1],n[0]===a[0]&&n[1]===a[1]||t.push([t[0][0],t[0][1]]),t.length>2&&r.push(t)}let i=[];e=Math.max(e,.1);let o=[];for(let t of r)for(let e=0;e<t.length-1;e++){let s=t[e],r=t[e+1];if(s[1]!==r[1]){let t=Math.min(s[1],r[1]);o.push({ymin:t,ymax:Math.max(s[1],r[1]),x:t===s[1]?s[0]:r[0],islope:(r[0]-s[0])/(r[1]-s[1])})}}if(o.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!o.length)return i;let l=[],h=o[0].ymin,u=0;for(;l.length||o.length;){if(o.length){let t=-1;for(let e=0;e<o.length&&!(o[e].ymin>h);e++)t=e;o.splice(0,t+1).forEach(t=>{l.push({s:h,edge:t})})}if((l=l.filter(t=>!(t.edge.ymax<=h))).sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==s||u%e==0)&&l.length>1)for(let t=0;t<l.length;t+=2){let e=t+1;if(e>=l.length)break;let s=l[t].edge,r=l[e].edge;i.push([[Math.round(s.x),h],[Math.round(r.x),h]])}h+=s,l.forEach(t=>{t.edge.x=t.edge.x+s*t.edge.islope}),u++}return i}(a,n,r);if(s){let t;for(let t of a)v(t,i,-s);t=[],o.forEach(e=>t.push(...e)),v(t,i,-s)}return o}(t,n,r,a||1)}var $=class{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){let s=b(t,e);return{type:"fillSketch",ops:this.renderLines(s,e)}}renderLines(t,e){let s=[];for(let r of t)s.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return s}};function P(t){let e=t[0],s=t[1];return Math.sqrt(Math.pow(e[0]-s[0],2)+Math.pow(e[1]-s[1],2))}var w=class extends ${fillPolygons(t,e){let s=e.hachureGap;s<0&&(s=4*e.strokeWidth);let r=b(t,Object.assign({},e,{hachureGap:s=Math.max(s,.1)})),n=Math.PI/180*e.hachureAngle,a=[],i=.5*s*Math.cos(n),o=.5*s*Math.sin(n);for(let[t,e]of r)P([t,e])&&a.push([[t[0]-i,t[1]+o],[...e]],[[t[0]+i,t[1]-o],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}},S=class extends ${fillPolygons(t,e){let s=this._fillPolygons(t,e),r=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),n=this._fillPolygons(t,r);return s.ops=s.ops.concat(n.ops),s}},O=class{constructor(t){this.helper=t}fillPolygons(t,e){let s=b(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(s,e)}dotsOnLines(t,e){let s=[],r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);let n=e.fillWeight;n<0&&(n=e.strokeWidth/2);let a=r/4;for(let i of t){let t=P(i),o=Math.ceil(t/r)-1,l=t-o*r,h=(i[0][0]+i[1][0])/2-r/4,u=Math.min(i[0][1],i[1][1]);for(let t=0;t<o;t++){let i=h-a+2*Math.random()*a,o=u+l+t*r-a+2*Math.random()*a,p=this.helper.ellipse(i,o,n,n,e);s.push(...p.ops)}}return{type:"fillSketch",ops:s}}},L=class{constructor(t){this.helper=t}fillPolygons(t,e){let s=b(t,e);return{type:"fillSketch",ops:this.dashedLine(s,e)}}dashedLine(t,e){let s=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,r=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,n=[];return t.forEach(t=>{let a=P(t),i=Math.floor(a/(s+r)),o=(a+r-i*(s+r))/2,l=t[0],h=t[1];l[0]>h[0]&&(l=t[1],h=t[0]);let u=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let t=0;t<i;t++){let a=t*(s+r),i=a+s,h=[l[0]+a*Math.cos(u)+o*Math.cos(u),l[1]+a*Math.sin(u)+o*Math.sin(u)],p=[l[0]+i*Math.cos(u)+o*Math.cos(u),l[1]+i*Math.sin(u)+o*Math.sin(u)];n.push(...this.helper.doubleLineOps(h[0],h[1],p[0],p[1],e))}}),n}},j=class{constructor(t){this.helper=t}fillPolygons(t,e){let s=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,r=e.zigzagOffset<0?s:e.zigzagOffset,n=b(t,e=Object.assign({},e,{hachureGap:s+r}));return{type:"fillSketch",ops:this.zigzagLines(n,r,e)}}zigzagLines(t,e,s){let r=[];return t.forEach(t=>{let n=Math.round(P(t)/(2*e)),a=t[0],i=t[1];a[0]>i[0]&&(a=t[1],i=t[0]);let o=Math.atan((i[1]-a[1])/(i[0]-a[0]));for(let t=0;t<n;t++){let n=2*t*e,i=(t+1)*2*e,l=Math.sqrt(2*Math.pow(e,2)),h=[a[0]+n*Math.cos(o),a[1]+n*Math.sin(o)],u=[a[0]+i*Math.cos(o),a[1]+i*Math.sin(o)],p=[h[0]+l*Math.cos(o+Math.PI/4),h[1]+l*Math.sin(o+Math.PI/4)];r.push(...this.helper.doubleLineOps(h[0],h[1],p[0],p[1],s),...this.helper.doubleLineOps(p[0],p[1],u[0],u[1],s))}}),r}},I={},_=class{constructor(t){this.seed=t}next(){return this.seed?(0x80000000-1&(this.seed=Math.imul(48271,this.seed)))/0x80000000:Math.random()}},z={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 W(t){let e=[],s=function(t){let e=[];for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t),r="BOD",n=0,a=s[0];for(;2!==a.type;){let i=0,o=[];if("BOD"===r)if("M"!==a.text&&"m"!==a.text)return W("M0,0"+t);else n++,i=z[a.text],r=a.text;else 1===a.type?i=z[r]:(n++,i=z[a.text],r=a.text);if(n+i<s.length){for(let t=n;t<n+i;t++){let e=s[t];if(1===e.type)o[o.length]=+e.text;else throw Error("Param not a number: "+r+","+e.text)}if("number"==typeof z[r]){let t={key:r,data:o};e.push(t),n+=i,a=s[n],"M"===r&&(r="L"),"m"===r&&(r="l")}else throw Error("Bad segment: "+r)}else throw Error("Path data ended short")}return e}function C(t){let e=0,s=0,r=0,n=0,a=[];for(let{key:i,data:o}of t)switch(i){case"M":a.push({key:"M",data:[...o]}),[e,s]=o,[r,n]=o;break;case"m":e+=o[0],s+=o[1],a.push({key:"M",data:[e,s]}),r=e,n=s;break;case"L":a.push({key:"L",data:[...o]}),[e,s]=o;break;case"l":e+=o[0],s+=o[1],a.push({key:"L",data:[e,s]});break;case"C":a.push({key:"C",data:[...o]}),e=o[4],s=o[5];break;case"c":{let t=o.map((t,r)=>r%2?t+s:t+e);a.push({key:"C",data:t}),e=t[4],s=t[5];break}case"Q":a.push({key:"Q",data:[...o]}),e=o[2],s=o[3];break;case"q":{let t=o.map((t,r)=>r%2?t+s:t+e);a.push({key:"Q",data:t}),e=t[2],s=t[3];break}case"A":a.push({key:"A",data:[...o]}),e=o[5],s=o[6];break;case"a":e+=o[5],s+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,s]});break;case"H":a.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...o]}),s=o[0];break;case"v":s+=o[0],a.push({key:"V",data:[s]});break;case"S":a.push({key:"S",data:[...o]}),e=o[2],s=o[3];break;case"s":{let t=o.map((t,r)=>r%2?t+s:t+e);a.push({key:"S",data:t}),e=t[2],s=t[3];break}case"T":a.push({key:"T",data:[...o]}),e=o[0],s=o[1];break;case"t":e+=o[0],s+=o[1],a.push({key:"T",data:[e,s]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=r,s=n}return a}function T(t){let e=[],s="",r=0,n=0,a=0,i=0,o=0,l=0;for(let{key:h,data:u}of t){switch(h){case"M":e.push({key:"M",data:[...u]}),[r,n]=u,[a,i]=u;break;case"C":e.push({key:"C",data:[...u]}),r=u[4],n=u[5],o=u[2],l=u[3];break;case"L":e.push({key:"L",data:[...u]}),[r,n]=u;break;case"H":r=u[0],e.push({key:"L",data:[r,n]});break;case"V":n=u[0],e.push({key:"L",data:[r,n]});break;case"S":{let t=0,a=0;"C"===s||"S"===s?(t=r+(r-o),a=n+(n-l)):(t=r,a=n),e.push({key:"C",data:[t,a,...u]}),o=u[0],l=u[1],r=u[2],n=u[3];break}case"T":{let[t,a]=u,i=0,h=0;"Q"===s||"T"===s?(i=r+(r-o),h=n+(n-l)):(i=r,h=n);let p=r+2*(i-r)/3,c=n+2*(h-n)/3,f=t+2*(i-t)/3,d=a+2*(h-a)/3;e.push({key:"C",data:[p,c,f,d,t,a]}),o=i,l=h,r=t,n=a;break}case"Q":{let[t,s,a,i]=u,h=r+2*(t-r)/3,p=n+2*(s-n)/3,c=a+2*(t-a)/3,f=i+2*(s-i)/3;e.push({key:"C",data:[h,p,c,f,a,i]}),o=t,l=s,r=a,n=i;break}case"A":{let t=Math.abs(u[0]),s=Math.abs(u[1]),a=u[2],i=u[3],o=u[4],l=u[5],h=u[6];0===t||0===s?(e.push({key:"C",data:[r,n,l,h,l,h]}),r=l,n=h):(r!==l||n!==h)&&((function t(e,s,r,n,a,i,o,l,h,u){let p=Math.PI*o/180,c=[],f=0,d=0,g=0,k=0;if(u)[f,d,g,k]=u;else{[e,s]=A(e,s,-p),[r,n]=A(r,n,-p);let t=(e-r)/2,o=(s-n)/2,u=t*t/(a*a)+o*o/(i*i);u>1&&(a*=u=Math.sqrt(u),i*=u);let c=a*a,y=i*i,M=(l===h?-1:1)*Math.sqrt(Math.abs((c*y-c*o*o-y*t*t)/(c*o*o+y*t*t)));g=M*a*o/i+(e+r)/2,k=-(M*i)*t/a+(s+n)/2,f=Math.asin(parseFloat(((s-k)/i).toFixed(9))),d=Math.asin(parseFloat(((n-k)/i).toFixed(9))),e<g&&(f=Math.PI-f),r<g&&(d=Math.PI-d),f<0&&(f=2*Math.PI+f),d<0&&(d=2*Math.PI+d),h&&f>d&&(f-=2*Math.PI),!h&&d>f&&(d-=2*Math.PI)}let y=d-f;if(Math.abs(y)>120*Math.PI/180){let e=d,s=r,l=n;c=t(r=g+a*Math.cos(d=h&&d>f?f+120*Math.PI/180*1:f+-(120*Math.PI/180*1)),n=k+i*Math.sin(d),s,l,a,i,o,0,h,[d,e,g,k])}y=d-f;let M=Math.cos(f),m=Math.cos(d),x=Math.tan(y/4),v=4/3*a*x,b=4/3*i*x,$=[e,s],P=[e+v*Math.sin(f),s-b*M],w=[r+v*Math.sin(d),n-b*m],S=[r,n];if(P[0]=2*$[0]-P[0],P[1]=2*$[1]-P[1],u)return[P,w,S].concat(c);{c=[P,w,S].concat(c);let t=[];for(let e=0;e<c.length;e+=3){let s=A(c[e][0],c[e][1],p),r=A(c[e+1][0],c[e+1][1],p),n=A(c[e+2][0],c[e+2][1],p);t.push([s[0],s[1],r[0],r[1],n[0],n[1]])}return t}})(r,n,l,h,t,s,a,i,o).forEach(function(t){e.push({key:"C",data:t})}),r=l,n=h);break}case"Z":e.push({key:"Z",data:[]}),r=a,n=i}s=h}return e}function A(t,e,s){return[t*Math.cos(s)-e*Math.sin(s),t*Math.sin(s)+e*Math.cos(s)]}var E={randOffset:function(t,e){return K(t,e)},randOffsetWithRange:function(t,e,s){return J(t,e,s)},ellipse:function(t,e,s,r,n){let a=B(s,r,n);return F(t,e,n,a).opset},doubleLineOps:function(t,e,s,r,n){return U(t,e,s,r,n,!0)}};function G(t,e,s,r,n){return{type:"path",ops:U(t,e,s,r,n)}}function R(t,e,s){let r=(t||[]).length;if(r>2){let n=[];for(let e=0;e<r-1;e++)n.push(...U(t[e][0],t[e][1],t[e+1][0],t[e+1][1],s));return e&&n.push(...U(t[r-1][0],t[r-1][1],t[0][0],t[0][1],s)),{type:"path",ops:n}}return 2===r?G(t[0][0],t[0][1],t[1][0],t[1][1],s):{type:"path",ops:[]}}function Z(t,e){if(t.length){let s="number"==typeof t[0][0]?[t]:t,r=Y(s[0],+(1+.2*e.roughness),e),n=e.disableMultiStroke?[]:Y(s[0],1.5*(1+.22*e.roughness),H(e));for(let t=1;t<s.length;t++){let a=s[t];if(a.length){let t=Y(a,+(1+.2*e.roughness),e),s=e.disableMultiStroke?[]:Y(a,1.5*(1+.22*e.roughness),H(e));for(let e of t)"move"!==e.op&&r.push(e);for(let t of s)"move"!==t.op&&n.push(t)}}return{type:"path",ops:r.concat(n)}}return{type:"path",ops:[]}}function B(t,e,s){let r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),n=2*Math.PI/Math.ceil(Math.max(s.curveStepCount,s.curveStepCount/Math.sqrt(200)*r)),a=Math.abs(t/2),i=Math.abs(e/2),o=1-s.curveFitting;return a+=K(a*o,s),i+=K(i*o,s),{increment:n,rx:a,ry:i}}function F(t,e,s,r){let[n,a]=te(r.increment,t,e,r.rx,r.ry,1,r.increment*J(.1,J(.4,1,s),s),s),i=tt(n,null,s);if(!s.disableMultiStroke&&0!==s.roughness){let[n]=te(r.increment,t,e,r.rx,r.ry,1.5,0,s),a=tt(n,null,s);i=i.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:i}}}function q(t,e,s,r,n,a,i,o,l){let h=Math.abs(s/2),u=Math.abs(r/2);h+=K(.01*h,l),u+=K(.01*u,l);let p=n,c=a;for(;p<0;)p+=2*Math.PI,c+=2*Math.PI;c-p>2*Math.PI&&(p=0,c=2*Math.PI);let f=Math.min(2*Math.PI/l.curveStepCount/2,(c-p)/2),d=ts(f,t,e,h,u,p,c,1,l);if(!l.disableMultiStroke){let s=ts(f,t,e,h,u,p,c,1.5,l);d.push(...s)}return i&&(o?d.push(...U(t,e,t+h*Math.cos(p),e+u*Math.sin(p),l),...U(t,e,t+h*Math.cos(c),e+u*Math.sin(c),l)):d.push({op:"lineTo",data:[t,e]},{op:"lineTo",data:[t+h*Math.cos(p),e+u*Math.sin(p)]})),{type:"path",ops:d}}function N(t,e){let s=T(C(W(t))),r=[],n=[0,0],a=[0,0];for(let{key:t,data:i}of s)switch(t){case"M":a=[i[0],i[1]],n=[i[0],i[1]];break;case"L":r.push(...U(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]];break;case"C":{let[t,s,n,o,l,h]=i;r.push(...function(t,e,s,r,n,a,i,o){let l=[],h=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3],u=[0,0],p=o.disableMultiStroke?1:2,c=o.preserveVertices;for(let f=0;f<p;f++)0===f?l.push({op:"move",data:[i[0],i[1]]}):l.push({op:"move",data:[i[0]+(c?0:K(h[0],o)),i[1]+(c?0:K(h[0],o))]}),u=c?[n,a]:[n+K(h[f],o),a+K(h[f],o)],l.push({op:"bcurveTo",data:[t+K(h[f],o),e+K(h[f],o),s+K(h[f],o),r+K(h[f],o),u[0],u[1]]});return l}(t,s,n,o,l,h,a,e)),a=[l,h];break}case"Z":r.push(...U(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]]}return{type:"path",ops:r}}function Q(t,e){let s=[];for(let r of t)if(r.length){let t=e.maxRandomnessOffset||0,n=r.length;if(n>2){s.push({op:"move",data:[r[0][0]+K(t,e),r[0][1]+K(t,e)]});for(let a=1;a<n;a++)s.push({op:"lineTo",data:[r[a][0]+K(t,e),r[a][1]+K(t,e)]})}}return{type:"fillPath",ops:s}}function V(t,e){return(function(t,e){let s=t.fillStyle||"hachure";if(!I[s])switch(s){case"zigzag":I[s]||(I[s]=new w(e));break;case"cross-hatch":I[s]||(I[s]=new S(e));break;case"dots":I[s]||(I[s]=new O(e));break;case"dashed":I[s]||(I[s]=new L(e));break;case"zigzag-line":I[s]||(I[s]=new j(e));break;default:I[s="hachure"]||(I[s]=new $(e))}return I[s]})(e,E).fillPolygons(t,e)}function H(t){let e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function D(t){return t.randomizer||(t.randomizer=new _(t.seed||0)),t.randomizer.next()}function J(t,e,s,r=1){return s.roughness*r*(D(s)*(e-t)+t)}function K(t,e,s=1){return J(-t,t,e,s)}function U(t,e,s,r,n,a=!1){let i=a?n.disableMultiStrokeFill:n.disableMultiStroke,o=X(t,e,s,r,n,!0,!1);if(i)return o;let l=X(t,e,s,r,n,!0,!0);return o.concat(l)}function X(t,e,s,r,n,a,i){let o=Math.pow(t-s,2)+Math.pow(e-r,2),l=Math.sqrt(o),h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let u=n.maxRandomnessOffset||0;u*u*100>o&&(u=l/10);let p=u/2,c=.2+.2*D(n),f=n.bowing*n.maxRandomnessOffset*(r-e)/200,d=n.bowing*n.maxRandomnessOffset*(t-s)/200;f=K(f,n,h),d=K(d,n,h);let g=[],k=n.preserveVertices;return a&&(i?g.push({op:"move",data:[t+(k?0:K(p,n,h)),e+(k?0:K(p,n,h))]}):g.push({op:"move",data:[t+(k?0:K(u,n,h)),e+(k?0:K(u,n,h))]})),i?g.push({op:"bcurveTo",data:[f+t+(s-t)*c+K(p,n,h),d+e+(r-e)*c+K(p,n,h),f+t+2*(s-t)*c+K(p,n,h),d+e+2*(r-e)*c+K(p,n,h),s+(k?0:K(p,n,h)),r+(k?0:K(p,n,h))]}):g.push({op:"bcurveTo",data:[f+t+(s-t)*c+K(u,n,h),d+e+(r-e)*c+K(u,n,h),f+t+2*(s-t)*c+K(u,n,h),d+e+2*(r-e)*c+K(u,n,h),s+(k?0:K(u,n,h)),r+(k?0:K(u,n,h))]}),g}function Y(t,e,s){if(!t.length)return[];let r=[];r.push([t[0][0]+K(e,s),t[0][1]+K(e,s)]),r.push([t[0][0]+K(e,s),t[0][1]+K(e,s)]);for(let n=1;n<t.length;n++)r.push([t[n][0]+K(e,s),t[n][1]+K(e,s)]),n===t.length-1&&r.push([t[n][0]+K(e,s),t[n][1]+K(e,s)]);return tt(r,null,s)}function tt(t,e,s){let r=t.length,n=[];if(r>3){let a=[],i=1-s.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<r;e++){let s=t[e];a[0]=[s[0],s[1]],a[1]=[s[0]+(i*t[e+1][0]-i*t[e-1][0])/6,s[1]+(i*t[e+1][1]-i*t[e-1][1])/6],a[2]=[t[e+1][0]+(i*t[e][0]-i*t[e+2][0])/6,t[e+1][1]+(i*t[e][1]-i*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){let t=s.maxRandomnessOffset;n.push({op:"lineTo",data:[e[0]+K(t,s),e[1]+K(t,s)]})}}else 3===r?(n.push({op:"move",data:[t[1][0],t[1][1]]}),n.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===r&&n.push(...X(t[0][0],t[0][1],t[1][0],t[1][1],s,!0,!0));return n}function te(t,e,s,r,n,a,i,o){let l=0===o.roughness,h=[],u=[];if(l){t/=4,u.push([e+r*Math.cos(-t),s+n*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){let t=[e+r*Math.cos(a),s+n*Math.sin(a)];h.push(t),u.push(t)}u.push([e+ +r,s+0*n]),u.push([e+r*Math.cos(t),s+n*Math.sin(t)])}else{let l=K(.5,o)-Math.PI/2;u.push([K(a,o)+e+.9*r*Math.cos(l-t),K(a,o)+s+.9*n*Math.sin(l-t)]);let p=2*Math.PI+l-.01;for(let i=l;i<p;i+=t){let t=[K(a,o)+e+r*Math.cos(i),K(a,o)+s+n*Math.sin(i)];h.push(t),u.push(t)}u.push([K(a,o)+e+r*Math.cos(l+2*Math.PI+.5*i),K(a,o)+s+n*Math.sin(l+2*Math.PI+.5*i)]),u.push([K(a,o)+e+.98*r*Math.cos(l+i),K(a,o)+s+.98*n*Math.sin(l+i)]),u.push([K(a,o)+e+.9*r*Math.cos(l+.5*i),K(a,o)+s+.9*n*Math.sin(l+.5*i)])}return[u,h]}function ts(t,e,s,r,n,a,i,o,l){let h=a+K(.1,l),u=[];u.push([K(o,l)+e+.9*r*Math.cos(h-t),K(o,l)+s+.9*n*Math.sin(h-t)]);for(let a=h;a<=i;a+=t)u.push([K(o,l)+e+r*Math.cos(a),K(o,l)+s+n*Math.sin(a)]);return u.push([e+r*Math.cos(i),s+n*Math.sin(i)]),u.push([e+r*Math.cos(i),s+n*Math.sin(i)]),tt(u,null,l)}function tr(t,e=0){let s=t.length;if(s<3)throw Error("A curve must have at least three points.");let r=[];if(3===s)r.push([...t[0]],[...t[1]],[...t[2]],[...t[2]]);else{let s=[];s.push(t[0],t[0]);for(let e=1;e<t.length;e++)s.push(t[e]),e===t.length-1&&s.push(t[e]);let n=[],a=1-e;r.push([...s[0]]);for(let t=1;t+2<s.length;t++){let e=s[t];n[0]=[e[0],e[1]],n[1]=[e[0]+(a*s[t+1][0]-a*s[t-1][0])/6,e[1]+(a*s[t+1][1]-a*s[t-1][1])/6],n[2]=[s[t+1][0]+(a*s[t][0]-a*s[t+2][0])/6,s[t+1][1]+(a*s[t][1]-a*s[t+2][1])/6],n[3]=[s[t+1][0],s[t+1][1]],r.push(n[1],n[2],n[3])}}return r}function tn(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function ta(t,e,s){return[t[0]+(e[0]-t[0])*s,t[1]+(e[1]-t[1])*s]}function ti(t,e,s,r,n){let a=n||[],i=t[e],o=t[s-1],l=0,h=1;for(let r=e+1;r<s-1;++r){let e=function(t,e,s){let r=tn(e,s);if(0===r)return tn(t,e);let n=((t[0]-e[0])*(s[0]-e[0])+(t[1]-e[1])*(s[1]-e[1]))/r;return tn(t,ta(e,s,n=Math.max(0,Math.min(1,n))))}(t[r],i,o);e>l&&(l=e,h=r)}return Math.sqrt(l)>r?(ti(t,e,h+1,r,a),ti(t,h,s,r,a)):(a.length||a.push(i),a.push(o)),a}function to(t,e=.15,s){let r=[],n=(t.length-1)/3;for(let s=0;s<n;s++)!function t(e,s,r,n){let a,i,o,l,h,u,p,c,f=n||[];if(a=e[s+0],i=e[s+1],o=e[s+2],l=e[s+3],h=3*i[0]-2*a[0]-l[0],h*=h,u=3*i[1]-2*a[1]-l[1],u*=u,p=3*o[0]-2*l[0]-a[0],p*=p,c=3*o[1]-2*l[1]-a[1],c*=c,h<p&&(h=p),u<c&&(u=c),h+u<r){let t=e[s+0];f.length?Math.sqrt(tn(f[f.length-1],t))>1&&f.push(t):f.push(t),f.push(e[s+3])}else{let n=e[s+0],a=e[s+1],i=e[s+2],o=e[s+3],l=ta(n,a,.5),h=ta(a,i,.5),u=ta(i,o,.5),p=ta(l,h,.5),c=ta(h,u,.5),d=ta(p,c,.5);t([n,l,p,d],0,r,f),t([d,c,u,o],0,r,f)}return f}(t,3*s,e,r);return s&&s>0?ti(r,0,r.length,s):r}var tl="none",th=new class{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(0x80000000*Math.random())}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,s){return{shape:t,sets:e||[],options:s||this.defaultOptions}}line(t,e,s,r,n){let a=this._o(n);return this._d("line",[G(t,e,s,r,a)],a)}rectangle(t,e,s,r,n){let a=this._o(n),i=[],o=R([[t,e],[t+s,e],[t+s,e+r],[t,e+r]],!0,a);if(a.fill){let n=[[t,e],[t+s,e],[t+s,e+r],[t,e+r]];"solid"===a.fillStyle?i.push(Q([n],a)):i.push(V([n],a))}return a.stroke!==tl&&i.push(o),this._d("rectangle",i,a)}ellipse(t,e,s,r,n){let a=this._o(n),i=[],o=B(s,r,a),l=F(t,e,a,o);if(a.fill)if("solid"===a.fillStyle){let s=F(t,e,a,o).opset;s.type="fillPath",i.push(s)}else i.push(V([l.estimatedPoints],a));return a.stroke!==tl&&i.push(l.opset),this._d("ellipse",i,a)}circle(t,e,s,r){let n=this.ellipse(t,e,s,s,r);return n.shape="circle",n}linearPath(t,e){let s=this._o(e);return this._d("linearPath",[R(t,!1,s)],s)}arc(t,e,s,r,n,a,i=!1,o){let l=this._o(o),h=[],u=q(t,e,s,r,n,a,i,!0,l);if(i&&l.fill)if("solid"===l.fillStyle){let i=Object.assign({},l);i.disableMultiStroke=!0;let o=q(t,e,s,r,n,a,!0,!1,i);o.type="fillPath",h.push(o)}else h.push(function(t,e,s,r,n,a,i){let o=Math.abs(s/2),l=Math.abs(r/2);o+=K(.01*o,i),l+=K(.01*l,i);let h=n,u=a;for(;h<0;)h+=2*Math.PI,u+=2*Math.PI;u-h>2*Math.PI&&(h=0,u=2*Math.PI);let p=(u-h)/i.curveStepCount,c=[];for(let s=h;s<=u;s+=p)c.push([t+o*Math.cos(s),e+l*Math.sin(s)]);return c.push([t+o*Math.cos(u),e+l*Math.sin(u)]),c.push([t,e]),V([c],i)}(t,e,s,r,n,a,l));return l.stroke!==tl&&h.push(u),this._d("arc",h,l)}curve(t,e){let s=this._o(e),r=[],n=Z(t,s);if(s.fill&&s.fill!==tl)if("solid"===s.fillStyle){let e=Z(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{let e=[];if(t.length)for(let r of"number"==typeof t[0][0]?[t]:t)r.length<3?e.push(...r):3===r.length?e.push(...to(tr([r[0],r[0],r[1],r[2]]),10,(1+s.roughness)/2)):e.push(...to(tr(r),10,(1+s.roughness)/2));e.length&&r.push(V([e],s))}return s.stroke!==tl&&r.push(n),this._d("curve",r,s)}polygon(t,e){let s=this._o(e),r=[],n=R(t,!0,s);return s.fill&&("solid"===s.fillStyle?r.push(Q([t],s)):r.push(V([t],s))),s.stroke!==tl&&r.push(n),this._d("polygon",r,s)}path(t,e){let s=this._o(e),r=[];if(!t)return this._d("path",r,s);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let n=s.fill&&"transparent"!==s.fill&&s.fill!==tl,a=s.stroke!==tl,i=!!(s.simplification&&s.simplification<1),o=i?4-4*(s.simplification||1):(1+s.roughness)/2,l=function(t,e,s){let r=T(C(W(t))),n=[],a=[],i=[0,0],o=[],l=()=>{o.length>=4&&a.push(...to(o,1)),o=[]},h=()=>{l(),a.length&&(n.push(a),a=[])};for(let{key:t,data:e}of r)switch(t){case"M":h(),i=[e[0],e[1]],a.push(i);break;case"L":l(),a.push([e[0],e[1]]);break;case"C":if(!o.length){let t=a.length?a[a.length-1]:i;o.push([t[0],t[1]])}o.push([e[0],e[1]]),o.push([e[2],e[3]]),o.push([e[4],e[5]]);break;case"Z":l(),a.push([i[0],i[1]])}if(h(),!s)return n;let u=[];for(let t of n){let e=ti(t,0,t.length,s);e.length&&u.push(e)}return u}(t,0,o),h=N(t,s);if(n)if("solid"===s.fillStyle)if(1===l.length){let e=N(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else r.push(Q(l,s));else r.push(V(l,s));return a&&(i?l.forEach(t=>{r.push(R(t,!1,s))}):r.push(h)),this._d("path",r,s)}opsToPath(t,e){let s="";for(let r of t.ops){let t="number"==typeof e&&e>=0?r.data.map(t=>+t.toFixed(e)):r.data;switch(r.op){case"move":s+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":s+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":s+=`L${t[0]} ${t[1]} `}}return s.trim()}toPaths(t){let e=t.sets||[],s=t.options||this.defaultOptions,r=[];for(let t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:s.stroke,strokeWidth:s.strokeWidth,fill:tl};break;case"fillPath":e={d:this.opsToPath(t),stroke:tl,strokeWidth:0,fill:s.fill||tl};break;case"fillSketch":e=this.fillSketch(t,s)}e&&r.push(e)}return r}fillSketch(t,e){let s=e.fillWeight;return s<0&&(s=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||tl,strokeWidth:s,fill:tl}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}};function tu(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 tp(t,e,s,r,n,a={},i){let o=[],l=function(t={}){return[`stroke-linecap="${t.lineCap??"round"}"`,`stroke-linejoin="${t.lineJoin??"round"}"`,...void 0!==t.miterLimit?[`stroke-miterlimit="${d(String(t.miterLimit))}"`]:[],...void 0!==t.dashArray?[`stroke-dasharray="${d(t.dashArray)}"`]:[],...void 0!==t.dashOffset?[`stroke-dashoffset="${d(String(t.dashOffset))}"`]:[],...void 0!==t.opacity?[`stroke-opacity="${d(String(t.opacity))}"`]:[],...void 0!==t.pathLength?[`pathLength="${d(String(t.pathLength))}"`]:[],...void 0!==t.paintOrder?[`paint-order="${d(t.paintOrder)}"`]:[],...void 0!==t.mixBlendMode?[`style="mix-blend-mode:${t.mixBlendMode}"`]:[],...t.nonScaling?['vector-effect="non-scaling-stroke"']:[]].join(" ")}(a),h=l?` ${l}`:" ",u=i?.stroke===void 0?"":` stroke-opacity="${d(String(i.stroke))}"`,p=i?.fill===void 0?"":` stroke-opacity="${d(String(i.fill))}"`;for(let a of t){let t=th.opsToPath(a,2);t&&("path"===a.type?o.push(`<path d="${t}" fill="none" stroke="${e}" stroke-width="${g(s)}"${h}${u} />`):"fillPath"===a.type?o.push(`<path d="${t}" fill="${r}" fill-opacity="${d(String(i?.fill??.92))}" stroke="none" />`):"fillSketch"===a.type&&o.push(`<path d="${t}" fill="none" stroke="${r}" stroke-width="${g(n.fillWeight)}"${p} />`))}return o.join(`
|
|
2
|
-
`)}function tc(t,e,s,r,n,a,i,o,l){var h,u,p,c,f;let d={...o,...void 0!==i?{dashArray:i}:{}},g={seed:e,roughness:a.roughness,bowing:a.bowing,stroke:s,strokeWidth:r,disableMultiStroke:a.passes<2,...n?{fill:n,fillStyle:"solid"===a.fill?"solid":"hachure",fillWeight:a.fillWeight,hachureGap:a.hachureGap,hachureAngle:a.hachureAngle}:{},preserveVertices:!1};try{switch(t.kind){case"rect":let e;return(t.rx??0)>.5?tp(th.path((h=t.x,u=t.y,p=t.width,c=t.height,f=t.rx,e=Math.min(f,p/2,c/2),`M ${h+e} ${u} L ${h+p-e} ${u} Q ${h+p} ${u} ${h+p} ${u+e} L ${h+p} ${u+c-e} Q ${h+p} ${u+c} ${h+p-e} ${u+c} L ${h+e} ${u+c} Q ${h} ${u+c} ${h} ${u+c-e} L ${h} ${u+e} Q ${h} ${u} ${h+e} ${u} Z`),g).sets,s,r,n,a,d,l):tp(th.rectangle(t.x,t.y,t.width,t.height,g).sets,s,r,n,a,d,l);case"circle":return tp(th.circle(t.cx,t.cy,2*t.r,g).sets,s,r,n,a,d,l);case"ellipse":return tp(th.ellipse(t.cx,t.cy,2*t.rx,2*t.ry,g).sets,s,r,n,a,d,l);case"line":return tp(th.line(t.x1,t.y1,t.x2,t.y2,g).sets,s,r,void 0,a,d,l);case"polygon":return tp(th.polygon(t.points.map(t=>[t.x,t.y]),g).sets,s,r,n,a,d,l);case"polyline":return tp(th.linearPath(t.points.map(t=>[t.x,t.y]),g).sets,s,r,void 0,a,d,l);case"path":return tp(th.path(t.d,g).sets,s,r,n,a,d,l);case"compound":return""}}catch{return""}}function tf(t,e,s,r,n,a,i,o,l){if(t.sketcher){let h=t.sketcher(e,{seed:s,stroke:r,width:n,fill:a,p:t.p,style:t.ctx.style,dash:i,strokeProjection:o,opacity:l});if(null!==h)return h}return tc(e,s,r,n,a,t.p,i,o,l)}function td(t,e,s){return t.replace(`<${e} `,`<${e} ${s} `)}function tg(t){if(void 0===t)return 1;let e="number"==typeof t?t:parseFloat(t);return Number.isNaN(e)?1:e}function tk(t,e){return void 0!==t?t:e}function ty(t,e){return e&&""!==t?`<g transform="${c(e)}">${t}</g>`:t}function tM(t){return t.startsWith("var(--_node-fill")||t.startsWith("var(--_group")||"var(--bg)"===t||"var(--surface)"===t}function tm(t,e){return/<text\b[^>]*?\sfill="/.test(t)?t.replace(/(<text\b[^>]*?\sfill=")[^"]*(")/,`$1${
|
|
3
|
-
`),u=t=>1===
|
|
4
|
-
`);return e.identity&&!/\sdata-id=/.test(
|
|
5
|
-
`):""}}if(!c)return
|
|
6
|
-
${ty(c,e.transform)}`}(e,s):t(e);case"text":return
|
|
1
|
+
import{N as t,da as e,j as s,k as r,la as n,na as a,oa as i,p as o,pa as l,qa as h,t as u,ua as p,z as c}from"./chunk-6J4BGPB2.js";import{$ as f,Ja as d,R as g,V as k,k as y,l as M,m as m,ta as x}from"./chunk-IARQ24W3.js";import"./chunk-GC7IPQ5P.js";function v(t,e,s){if(t&&t.length){let[r,n]=e,a=Math.PI/180*s,i=Math.cos(a),o=Math.sin(a);for(let e of t){let[t,s]=e;e[0]=(t-r)*i-(s-n)*o+r,e[1]=(t-r)*o+(s-n)*i+n}}}function b(t,e){var s;let r=e.hachureAngle+90,n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return e.roughness>=1&&((null==(s=e.randomizer)?void 0:s.next())||Math.random())>.7&&(a=n),function(t,e,s,r=1){let n=Math.max(e,.1),a=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,i=[0,0];if(s)for(let t of a)v(t,i,s);let o=function(t,e,s){let r=[];for(let e of t){var n,a;let t=[...e];n=t[0],a=t[t.length-1],n[0]===a[0]&&n[1]===a[1]||t.push([t[0][0],t[0][1]]),t.length>2&&r.push(t)}let i=[];e=Math.max(e,.1);let o=[];for(let t of r)for(let e=0;e<t.length-1;e++){let s=t[e],r=t[e+1];if(s[1]!==r[1]){let t=Math.min(s[1],r[1]);o.push({ymin:t,ymax:Math.max(s[1],r[1]),x:t===s[1]?s[0]:r[0],islope:(r[0]-s[0])/(r[1]-s[1])})}}if(o.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!o.length)return i;let l=[],h=o[0].ymin,u=0;for(;l.length||o.length;){if(o.length){let t=-1;for(let e=0;e<o.length&&!(o[e].ymin>h);e++)t=e;o.splice(0,t+1).forEach(t=>{l.push({s:h,edge:t})})}if((l=l.filter(t=>!(t.edge.ymax<=h))).sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==s||u%e==0)&&l.length>1)for(let t=0;t<l.length;t+=2){let e=t+1;if(e>=l.length)break;let s=l[t].edge,r=l[e].edge;i.push([[Math.round(s.x),h],[Math.round(r.x),h]])}h+=s,l.forEach(t=>{t.edge.x=t.edge.x+s*t.edge.islope}),u++}return i}(a,n,r);if(s){let t;for(let t of a)v(t,i,-s);t=[],o.forEach(e=>t.push(...e)),v(t,i,-s)}return o}(t,n,r,a||1)}var $=class{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){let s=b(t,e);return{type:"fillSketch",ops:this.renderLines(s,e)}}renderLines(t,e){let s=[];for(let r of t)s.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return s}};function P(t){let e=t[0],s=t[1];return Math.sqrt(Math.pow(e[0]-s[0],2)+Math.pow(e[1]-s[1],2))}var w=class extends ${fillPolygons(t,e){let s=e.hachureGap;s<0&&(s=4*e.strokeWidth);let r=b(t,Object.assign({},e,{hachureGap:s=Math.max(s,.1)})),n=Math.PI/180*e.hachureAngle,a=[],i=.5*s*Math.cos(n),o=.5*s*Math.sin(n);for(let[t,e]of r)P([t,e])&&a.push([[t[0]-i,t[1]+o],[...e]],[[t[0]+i,t[1]-o],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}},S=class extends ${fillPolygons(t,e){let s=this._fillPolygons(t,e),r=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),n=this._fillPolygons(t,r);return s.ops=s.ops.concat(n.ops),s}},O=class{constructor(t){this.helper=t}fillPolygons(t,e){let s=b(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(s,e)}dotsOnLines(t,e){let s=[],r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);let n=e.fillWeight;n<0&&(n=e.strokeWidth/2);let a=r/4;for(let i of t){let t=P(i),o=Math.ceil(t/r)-1,l=t-o*r,h=(i[0][0]+i[1][0])/2-r/4,u=Math.min(i[0][1],i[1][1]);for(let t=0;t<o;t++){let i=h-a+2*Math.random()*a,o=u+l+t*r-a+2*Math.random()*a,p=this.helper.ellipse(i,o,n,n,e);s.push(...p.ops)}}return{type:"fillSketch",ops:s}}},L=class{constructor(t){this.helper=t}fillPolygons(t,e){let s=b(t,e);return{type:"fillSketch",ops:this.dashedLine(s,e)}}dashedLine(t,e){let s=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,r=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,n=[];return t.forEach(t=>{let a=P(t),i=Math.floor(a/(s+r)),o=(a+r-i*(s+r))/2,l=t[0],h=t[1];l[0]>h[0]&&(l=t[1],h=t[0]);let u=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let t=0;t<i;t++){let a=t*(s+r),i=a+s,h=[l[0]+a*Math.cos(u)+o*Math.cos(u),l[1]+a*Math.sin(u)+o*Math.sin(u)],p=[l[0]+i*Math.cos(u)+o*Math.cos(u),l[1]+i*Math.sin(u)+o*Math.sin(u)];n.push(...this.helper.doubleLineOps(h[0],h[1],p[0],p[1],e))}}),n}},j=class{constructor(t){this.helper=t}fillPolygons(t,e){let s=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,r=e.zigzagOffset<0?s:e.zigzagOffset,n=b(t,e=Object.assign({},e,{hachureGap:s+r}));return{type:"fillSketch",ops:this.zigzagLines(n,r,e)}}zigzagLines(t,e,s){let r=[];return t.forEach(t=>{let n=Math.round(P(t)/(2*e)),a=t[0],i=t[1];a[0]>i[0]&&(a=t[1],i=t[0]);let o=Math.atan((i[1]-a[1])/(i[0]-a[0]));for(let t=0;t<n;t++){let n=2*t*e,i=(t+1)*2*e,l=Math.sqrt(2*Math.pow(e,2)),h=[a[0]+n*Math.cos(o),a[1]+n*Math.sin(o)],u=[a[0]+i*Math.cos(o),a[1]+i*Math.sin(o)],p=[h[0]+l*Math.cos(o+Math.PI/4),h[1]+l*Math.sin(o+Math.PI/4)];r.push(...this.helper.doubleLineOps(h[0],h[1],p[0],p[1],s),...this.helper.doubleLineOps(p[0],p[1],u[0],u[1],s))}}),r}},I={},_=class{constructor(t){this.seed=t}next(){return this.seed?(0x80000000-1&(this.seed=Math.imul(48271,this.seed)))/0x80000000:Math.random()}},W={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 z(t){let e=[],s=function(t){let e=[];for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t),r="BOD",n=0,a=s[0];for(;2!==a.type;){let i=0,o=[];if("BOD"===r)if("M"!==a.text&&"m"!==a.text)return z("M0,0"+t);else n++,i=W[a.text],r=a.text;else 1===a.type?i=W[r]:(n++,i=W[a.text],r=a.text);if(n+i<s.length){for(let t=n;t<n+i;t++){let e=s[t];if(1===e.type)o[o.length]=+e.text;else throw Error("Param not a number: "+r+","+e.text)}if("number"==typeof W[r]){let t={key:r,data:o};e.push(t),n+=i,a=s[n],"M"===r&&(r="L"),"m"===r&&(r="l")}else throw Error("Bad segment: "+r)}else throw Error("Path data ended short")}return e}function A(t){let e=0,s=0,r=0,n=0,a=[];for(let{key:i,data:o}of t)switch(i){case"M":a.push({key:"M",data:[...o]}),[e,s]=o,[r,n]=o;break;case"m":e+=o[0],s+=o[1],a.push({key:"M",data:[e,s]}),r=e,n=s;break;case"L":a.push({key:"L",data:[...o]}),[e,s]=o;break;case"l":e+=o[0],s+=o[1],a.push({key:"L",data:[e,s]});break;case"C":a.push({key:"C",data:[...o]}),e=o[4],s=o[5];break;case"c":{let t=o.map((t,r)=>r%2?t+s:t+e);a.push({key:"C",data:t}),e=t[4],s=t[5];break}case"Q":a.push({key:"Q",data:[...o]}),e=o[2],s=o[3];break;case"q":{let t=o.map((t,r)=>r%2?t+s:t+e);a.push({key:"Q",data:t}),e=t[2],s=t[3];break}case"A":a.push({key:"A",data:[...o]}),e=o[5],s=o[6];break;case"a":e+=o[5],s+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,s]});break;case"H":a.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...o]}),s=o[0];break;case"v":s+=o[0],a.push({key:"V",data:[s]});break;case"S":a.push({key:"S",data:[...o]}),e=o[2],s=o[3];break;case"s":{let t=o.map((t,r)=>r%2?t+s:t+e);a.push({key:"S",data:t}),e=t[2],s=t[3];break}case"T":a.push({key:"T",data:[...o]}),e=o[0],s=o[1];break;case"t":e+=o[0],s+=o[1],a.push({key:"T",data:[e,s]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=r,s=n}return a}function C(t){let e=[],s="",r=0,n=0,a=0,i=0,o=0,l=0;for(let{key:h,data:u}of t){switch(h){case"M":e.push({key:"M",data:[...u]}),[r,n]=u,[a,i]=u;break;case"C":e.push({key:"C",data:[...u]}),r=u[4],n=u[5],o=u[2],l=u[3];break;case"L":e.push({key:"L",data:[...u]}),[r,n]=u;break;case"H":r=u[0],e.push({key:"L",data:[r,n]});break;case"V":n=u[0],e.push({key:"L",data:[r,n]});break;case"S":{let t=0,a=0;"C"===s||"S"===s?(t=r+(r-o),a=n+(n-l)):(t=r,a=n),e.push({key:"C",data:[t,a,...u]}),o=u[0],l=u[1],r=u[2],n=u[3];break}case"T":{let[t,a]=u,i=0,h=0;"Q"===s||"T"===s?(i=r+(r-o),h=n+(n-l)):(i=r,h=n);let p=r+2*(i-r)/3,c=n+2*(h-n)/3,f=t+2*(i-t)/3,d=a+2*(h-a)/3;e.push({key:"C",data:[p,c,f,d,t,a]}),o=i,l=h,r=t,n=a;break}case"Q":{let[t,s,a,i]=u,h=r+2*(t-r)/3,p=n+2*(s-n)/3,c=a+2*(t-a)/3,f=i+2*(s-i)/3;e.push({key:"C",data:[h,p,c,f,a,i]}),o=t,l=s,r=a,n=i;break}case"A":{let t=Math.abs(u[0]),s=Math.abs(u[1]),a=u[2],i=u[3],o=u[4],l=u[5],h=u[6];0===t||0===s?(e.push({key:"C",data:[r,n,l,h,l,h]}),r=l,n=h):(r!==l||n!==h)&&((function t(e,s,r,n,a,i,o,l,h,u){let p=Math.PI*o/180,c=[],f=0,d=0,g=0,k=0;if(u)[f,d,g,k]=u;else{[e,s]=T(e,s,-p),[r,n]=T(r,n,-p);let t=(e-r)/2,o=(s-n)/2,u=t*t/(a*a)+o*o/(i*i);u>1&&(a*=u=Math.sqrt(u),i*=u);let c=a*a,y=i*i,M=(l===h?-1:1)*Math.sqrt(Math.abs((c*y-c*o*o-y*t*t)/(c*o*o+y*t*t)));g=M*a*o/i+(e+r)/2,k=-(M*i)*t/a+(s+n)/2,f=Math.asin(parseFloat(((s-k)/i).toFixed(9))),d=Math.asin(parseFloat(((n-k)/i).toFixed(9))),e<g&&(f=Math.PI-f),r<g&&(d=Math.PI-d),f<0&&(f=2*Math.PI+f),d<0&&(d=2*Math.PI+d),h&&f>d&&(f-=2*Math.PI),!h&&d>f&&(d-=2*Math.PI)}let y=d-f;if(Math.abs(y)>120*Math.PI/180){let e=d,s=r,l=n;c=t(r=g+a*Math.cos(d=h&&d>f?f+120*Math.PI/180*1:f+-(120*Math.PI/180*1)),n=k+i*Math.sin(d),s,l,a,i,o,0,h,[d,e,g,k])}y=d-f;let M=Math.cos(f),m=Math.cos(d),x=Math.tan(y/4),v=4/3*a*x,b=4/3*i*x,$=[e,s],P=[e+v*Math.sin(f),s-b*M],w=[r+v*Math.sin(d),n-b*m],S=[r,n];if(P[0]=2*$[0]-P[0],P[1]=2*$[1]-P[1],u)return[P,w,S].concat(c);{c=[P,w,S].concat(c);let t=[];for(let e=0;e<c.length;e+=3){let s=T(c[e][0],c[e][1],p),r=T(c[e+1][0],c[e+1][1],p),n=T(c[e+2][0],c[e+2][1],p);t.push([s[0],s[1],r[0],r[1],n[0],n[1]])}return t}})(r,n,l,h,t,s,a,i,o).forEach(function(t){e.push({key:"C",data:t})}),r=l,n=h);break}case"Z":e.push({key:"Z",data:[]}),r=a,n=i}s=h}return e}function T(t,e,s){return[t*Math.cos(s)-e*Math.sin(s),t*Math.sin(s)+e*Math.cos(s)]}var G={randOffset:function(t,e){return K(t,e)},randOffsetWithRange:function(t,e,s){return D(t,e,s)},ellipse:function(t,e,s,r,n){let a=q(s,r,n);return F(t,e,n,a).opset},doubleLineOps:function(t,e,s,r,n){return U(t,e,s,r,n,!0)}};function E(t,e,s,r,n){return{type:"path",ops:U(t,e,s,r,n)}}function R(t,e,s){let r=(t||[]).length;if(r>2){let n=[];for(let e=0;e<r-1;e++)n.push(...U(t[e][0],t[e][1],t[e+1][0],t[e+1][1],s));return e&&n.push(...U(t[r-1][0],t[r-1][1],t[0][0],t[0][1],s)),{type:"path",ops:n}}return 2===r?E(t[0][0],t[0][1],t[1][0],t[1][1],s):{type:"path",ops:[]}}function B(t,e){if(t.length){let s="number"==typeof t[0][0]?[t]:t,r=Y(s[0],+(1+.2*e.roughness),e),n=e.disableMultiStroke?[]:Y(s[0],1.5*(1+.22*e.roughness),H(e));for(let t=1;t<s.length;t++){let a=s[t];if(a.length){let t=Y(a,+(1+.2*e.roughness),e),s=e.disableMultiStroke?[]:Y(a,1.5*(1+.22*e.roughness),H(e));for(let e of t)"move"!==e.op&&r.push(e);for(let t of s)"move"!==t.op&&n.push(t)}}return{type:"path",ops:r.concat(n)}}return{type:"path",ops:[]}}function q(t,e,s){let r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),n=2*Math.PI/Math.ceil(Math.max(s.curveStepCount,s.curveStepCount/Math.sqrt(200)*r)),a=Math.abs(t/2),i=Math.abs(e/2),o=1-s.curveFitting;return a+=K(a*o,s),i+=K(i*o,s),{increment:n,rx:a,ry:i}}function F(t,e,s,r){let[n,a]=te(r.increment,t,e,r.rx,r.ry,1,r.increment*D(.1,D(.4,1,s),s),s),i=tt(n,null,s);if(!s.disableMultiStroke&&0!==s.roughness){let[n]=te(r.increment,t,e,r.rx,r.ry,1.5,0,s),a=tt(n,null,s);i=i.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:i}}}function Q(t,e,s,r,n,a,i,o,l){let h=Math.abs(s/2),u=Math.abs(r/2);h+=K(.01*h,l),u+=K(.01*u,l);let p=n,c=a;for(;p<0;)p+=2*Math.PI,c+=2*Math.PI;c-p>2*Math.PI&&(p=0,c=2*Math.PI);let f=Math.min(2*Math.PI/l.curveStepCount/2,(c-p)/2),d=ts(f,t,e,h,u,p,c,1,l);if(!l.disableMultiStroke){let s=ts(f,t,e,h,u,p,c,1.5,l);d.push(...s)}return i&&(o?d.push(...U(t,e,t+h*Math.cos(p),e+u*Math.sin(p),l),...U(t,e,t+h*Math.cos(c),e+u*Math.sin(c),l)):d.push({op:"lineTo",data:[t,e]},{op:"lineTo",data:[t+h*Math.cos(p),e+u*Math.sin(p)]})),{type:"path",ops:d}}function Z(t,e){let s=C(A(z(t))),r=[],n=[0,0],a=[0,0];for(let{key:t,data:i}of s)switch(t){case"M":a=[i[0],i[1]],n=[i[0],i[1]];break;case"L":r.push(...U(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]];break;case"C":{let[t,s,n,o,l,h]=i;r.push(...function(t,e,s,r,n,a,i,o){let l=[],h=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3],u=[0,0],p=o.disableMultiStroke?1:2,c=o.preserveVertices;for(let f=0;f<p;f++)0===f?l.push({op:"move",data:[i[0],i[1]]}):l.push({op:"move",data:[i[0]+(c?0:K(h[0],o)),i[1]+(c?0:K(h[0],o))]}),u=c?[n,a]:[n+K(h[f],o),a+K(h[f],o)],l.push({op:"bcurveTo",data:[t+K(h[f],o),e+K(h[f],o),s+K(h[f],o),r+K(h[f],o),u[0],u[1]]});return l}(t,s,n,o,l,h,a,e)),a=[l,h];break}case"Z":r.push(...U(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]]}return{type:"path",ops:r}}function V(t,e){let s=[];for(let r of t)if(r.length){let t=e.maxRandomnessOffset||0,n=r.length;if(n>2){s.push({op:"move",data:[r[0][0]+K(t,e),r[0][1]+K(t,e)]});for(let a=1;a<n;a++)s.push({op:"lineTo",data:[r[a][0]+K(t,e),r[a][1]+K(t,e)]})}}return{type:"fillPath",ops:s}}function N(t,e){return(function(t,e){let s=t.fillStyle||"hachure";if(!I[s])switch(s){case"zigzag":I[s]||(I[s]=new w(e));break;case"cross-hatch":I[s]||(I[s]=new S(e));break;case"dots":I[s]||(I[s]=new O(e));break;case"dashed":I[s]||(I[s]=new L(e));break;case"zigzag-line":I[s]||(I[s]=new j(e));break;default:I[s="hachure"]||(I[s]=new $(e))}return I[s]})(e,G).fillPolygons(t,e)}function H(t){let e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function J(t){return t.randomizer||(t.randomizer=new _(t.seed||0)),t.randomizer.next()}function D(t,e,s,r=1){return s.roughness*r*(J(s)*(e-t)+t)}function K(t,e,s=1){return D(-t,t,e,s)}function U(t,e,s,r,n,a=!1){let i=a?n.disableMultiStrokeFill:n.disableMultiStroke,o=X(t,e,s,r,n,!0,!1);if(i)return o;let l=X(t,e,s,r,n,!0,!0);return o.concat(l)}function X(t,e,s,r,n,a,i){let o=Math.pow(t-s,2)+Math.pow(e-r,2),l=Math.sqrt(o),h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let u=n.maxRandomnessOffset||0;u*u*100>o&&(u=l/10);let p=u/2,c=.2+.2*J(n),f=n.bowing*n.maxRandomnessOffset*(r-e)/200,d=n.bowing*n.maxRandomnessOffset*(t-s)/200;f=K(f,n,h),d=K(d,n,h);let g=[],k=n.preserveVertices;return a&&(i?g.push({op:"move",data:[t+(k?0:K(p,n,h)),e+(k?0:K(p,n,h))]}):g.push({op:"move",data:[t+(k?0:K(u,n,h)),e+(k?0:K(u,n,h))]})),i?g.push({op:"bcurveTo",data:[f+t+(s-t)*c+K(p,n,h),d+e+(r-e)*c+K(p,n,h),f+t+2*(s-t)*c+K(p,n,h),d+e+2*(r-e)*c+K(p,n,h),s+(k?0:K(p,n,h)),r+(k?0:K(p,n,h))]}):g.push({op:"bcurveTo",data:[f+t+(s-t)*c+K(u,n,h),d+e+(r-e)*c+K(u,n,h),f+t+2*(s-t)*c+K(u,n,h),d+e+2*(r-e)*c+K(u,n,h),s+(k?0:K(u,n,h)),r+(k?0:K(u,n,h))]}),g}function Y(t,e,s){if(!t.length)return[];let r=[];r.push([t[0][0]+K(e,s),t[0][1]+K(e,s)]),r.push([t[0][0]+K(e,s),t[0][1]+K(e,s)]);for(let n=1;n<t.length;n++)r.push([t[n][0]+K(e,s),t[n][1]+K(e,s)]),n===t.length-1&&r.push([t[n][0]+K(e,s),t[n][1]+K(e,s)]);return tt(r,null,s)}function tt(t,e,s){let r=t.length,n=[];if(r>3){let a=[],i=1-s.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<r;e++){let s=t[e];a[0]=[s[0],s[1]],a[1]=[s[0]+(i*t[e+1][0]-i*t[e-1][0])/6,s[1]+(i*t[e+1][1]-i*t[e-1][1])/6],a[2]=[t[e+1][0]+(i*t[e][0]-i*t[e+2][0])/6,t[e+1][1]+(i*t[e][1]-i*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){let t=s.maxRandomnessOffset;n.push({op:"lineTo",data:[e[0]+K(t,s),e[1]+K(t,s)]})}}else 3===r?(n.push({op:"move",data:[t[1][0],t[1][1]]}),n.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===r&&n.push(...X(t[0][0],t[0][1],t[1][0],t[1][1],s,!0,!0));return n}function te(t,e,s,r,n,a,i,o){let l=0===o.roughness,h=[],u=[];if(l){t/=4,u.push([e+r*Math.cos(-t),s+n*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){let t=[e+r*Math.cos(a),s+n*Math.sin(a)];h.push(t),u.push(t)}u.push([e+ +r,s+0*n]),u.push([e+r*Math.cos(t),s+n*Math.sin(t)])}else{let l=K(.5,o)-Math.PI/2;u.push([K(a,o)+e+.9*r*Math.cos(l-t),K(a,o)+s+.9*n*Math.sin(l-t)]);let p=2*Math.PI+l-.01;for(let i=l;i<p;i+=t){let t=[K(a,o)+e+r*Math.cos(i),K(a,o)+s+n*Math.sin(i)];h.push(t),u.push(t)}u.push([K(a,o)+e+r*Math.cos(l+2*Math.PI+.5*i),K(a,o)+s+n*Math.sin(l+2*Math.PI+.5*i)]),u.push([K(a,o)+e+.98*r*Math.cos(l+i),K(a,o)+s+.98*n*Math.sin(l+i)]),u.push([K(a,o)+e+.9*r*Math.cos(l+.5*i),K(a,o)+s+.9*n*Math.sin(l+.5*i)])}return[u,h]}function ts(t,e,s,r,n,a,i,o,l){let h=a+K(.1,l),u=[];u.push([K(o,l)+e+.9*r*Math.cos(h-t),K(o,l)+s+.9*n*Math.sin(h-t)]);for(let a=h;a<=i;a+=t)u.push([K(o,l)+e+r*Math.cos(a),K(o,l)+s+n*Math.sin(a)]);return u.push([e+r*Math.cos(i),s+n*Math.sin(i)]),u.push([e+r*Math.cos(i),s+n*Math.sin(i)]),tt(u,null,l)}function tr(t,e=0){let s=t.length;if(s<3)throw Error("A curve must have at least three points.");let r=[];if(3===s)r.push([...t[0]],[...t[1]],[...t[2]],[...t[2]]);else{let s=[];s.push(t[0],t[0]);for(let e=1;e<t.length;e++)s.push(t[e]),e===t.length-1&&s.push(t[e]);let n=[],a=1-e;r.push([...s[0]]);for(let t=1;t+2<s.length;t++){let e=s[t];n[0]=[e[0],e[1]],n[1]=[e[0]+(a*s[t+1][0]-a*s[t-1][0])/6,e[1]+(a*s[t+1][1]-a*s[t-1][1])/6],n[2]=[s[t+1][0]+(a*s[t][0]-a*s[t+2][0])/6,s[t+1][1]+(a*s[t][1]-a*s[t+2][1])/6],n[3]=[s[t+1][0],s[t+1][1]],r.push(n[1],n[2],n[3])}}return r}function tn(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function ta(t,e,s){return[t[0]+(e[0]-t[0])*s,t[1]+(e[1]-t[1])*s]}function ti(t,e,s,r,n){let a=n||[],i=t[e],o=t[s-1],l=0,h=1;for(let r=e+1;r<s-1;++r){let e=function(t,e,s){let r=tn(e,s);if(0===r)return tn(t,e);let n=((t[0]-e[0])*(s[0]-e[0])+(t[1]-e[1])*(s[1]-e[1]))/r;return tn(t,ta(e,s,n=Math.max(0,Math.min(1,n))))}(t[r],i,o);e>l&&(l=e,h=r)}return Math.sqrt(l)>r?(ti(t,e,h+1,r,a),ti(t,h,s,r,a)):(a.length||a.push(i),a.push(o)),a}function to(t,e=.15,s){let r=[],n=(t.length-1)/3;for(let s=0;s<n;s++)!function t(e,s,r,n){let a,i,o,l,h,u,p,c,f=n||[];if(a=e[s+0],i=e[s+1],o=e[s+2],l=e[s+3],h=3*i[0]-2*a[0]-l[0],h*=h,u=3*i[1]-2*a[1]-l[1],u*=u,p=3*o[0]-2*l[0]-a[0],p*=p,c=3*o[1]-2*l[1]-a[1],c*=c,h<p&&(h=p),u<c&&(u=c),h+u<r){let t=e[s+0];f.length?Math.sqrt(tn(f[f.length-1],t))>1&&f.push(t):f.push(t),f.push(e[s+3])}else{let n=e[s+0],a=e[s+1],i=e[s+2],o=e[s+3],l=ta(n,a,.5),h=ta(a,i,.5),u=ta(i,o,.5),p=ta(l,h,.5),c=ta(h,u,.5),d=ta(p,c,.5);t([n,l,p,d],0,r,f),t([d,c,u,o],0,r,f)}return f}(t,3*s,e,r);return s&&s>0?ti(r,0,r.length,s):r}var tl="none",th=new class{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(0x80000000*Math.random())}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,s){return{shape:t,sets:e||[],options:s||this.defaultOptions}}line(t,e,s,r,n){let a=this._o(n);return this._d("line",[E(t,e,s,r,a)],a)}rectangle(t,e,s,r,n){let a=this._o(n),i=[],o=R([[t,e],[t+s,e],[t+s,e+r],[t,e+r]],!0,a);if(a.fill){let n=[[t,e],[t+s,e],[t+s,e+r],[t,e+r]];"solid"===a.fillStyle?i.push(V([n],a)):i.push(N([n],a))}return a.stroke!==tl&&i.push(o),this._d("rectangle",i,a)}ellipse(t,e,s,r,n){let a=this._o(n),i=[],o=q(s,r,a),l=F(t,e,a,o);if(a.fill)if("solid"===a.fillStyle){let s=F(t,e,a,o).opset;s.type="fillPath",i.push(s)}else i.push(N([l.estimatedPoints],a));return a.stroke!==tl&&i.push(l.opset),this._d("ellipse",i,a)}circle(t,e,s,r){let n=this.ellipse(t,e,s,s,r);return n.shape="circle",n}linearPath(t,e){let s=this._o(e);return this._d("linearPath",[R(t,!1,s)],s)}arc(t,e,s,r,n,a,i=!1,o){let l=this._o(o),h=[],u=Q(t,e,s,r,n,a,i,!0,l);if(i&&l.fill)if("solid"===l.fillStyle){let i=Object.assign({},l);i.disableMultiStroke=!0;let o=Q(t,e,s,r,n,a,!0,!1,i);o.type="fillPath",h.push(o)}else h.push(function(t,e,s,r,n,a,i){let o=Math.abs(s/2),l=Math.abs(r/2);o+=K(.01*o,i),l+=K(.01*l,i);let h=n,u=a;for(;h<0;)h+=2*Math.PI,u+=2*Math.PI;u-h>2*Math.PI&&(h=0,u=2*Math.PI);let p=(u-h)/i.curveStepCount,c=[];for(let s=h;s<=u;s+=p)c.push([t+o*Math.cos(s),e+l*Math.sin(s)]);return c.push([t+o*Math.cos(u),e+l*Math.sin(u)]),c.push([t,e]),N([c],i)}(t,e,s,r,n,a,l));return l.stroke!==tl&&h.push(u),this._d("arc",h,l)}curve(t,e){let s=this._o(e),r=[],n=B(t,s);if(s.fill&&s.fill!==tl)if("solid"===s.fillStyle){let e=B(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{let e=[];if(t.length)for(let r of"number"==typeof t[0][0]?[t]:t)r.length<3?e.push(...r):3===r.length?e.push(...to(tr([r[0],r[0],r[1],r[2]]),10,(1+s.roughness)/2)):e.push(...to(tr(r),10,(1+s.roughness)/2));e.length&&r.push(N([e],s))}return s.stroke!==tl&&r.push(n),this._d("curve",r,s)}polygon(t,e){let s=this._o(e),r=[],n=R(t,!0,s);return s.fill&&("solid"===s.fillStyle?r.push(V([t],s)):r.push(N([t],s))),s.stroke!==tl&&r.push(n),this._d("polygon",r,s)}path(t,e){let s=this._o(e),r=[];if(!t)return this._d("path",r,s);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let n=s.fill&&"transparent"!==s.fill&&s.fill!==tl,a=s.stroke!==tl,i=!!(s.simplification&&s.simplification<1),o=i?4-4*(s.simplification||1):(1+s.roughness)/2,l=function(t,e,s){let r=C(A(z(t))),n=[],a=[],i=[0,0],o=[],l=()=>{o.length>=4&&a.push(...to(o,1)),o=[]},h=()=>{l(),a.length&&(n.push(a),a=[])};for(let{key:t,data:e}of r)switch(t){case"M":h(),i=[e[0],e[1]],a.push(i);break;case"L":l(),a.push([e[0],e[1]]);break;case"C":if(!o.length){let t=a.length?a[a.length-1]:i;o.push([t[0],t[1]])}o.push([e[0],e[1]]),o.push([e[2],e[3]]),o.push([e[4],e[5]]);break;case"Z":l(),a.push([i[0],i[1]])}if(h(),!s)return n;let u=[];for(let t of n){let e=ti(t,0,t.length,s);e.length&&u.push(e)}return u}(t,0,o),h=Z(t,s);if(n)if("solid"===s.fillStyle)if(1===l.length){let e=Z(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else r.push(V(l,s));else r.push(N(l,s));return a&&(i?l.forEach(t=>{r.push(R(t,!1,s))}):r.push(h)),this._d("path",r,s)}opsToPath(t,e){let s="";for(let r of t.ops){let t="number"==typeof e&&e>=0?r.data.map(t=>+t.toFixed(e)):r.data;switch(r.op){case"move":s+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":s+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":s+=`L${t[0]} ${t[1]} `}}return s.trim()}toPaths(t){let e=t.sets||[],s=t.options||this.defaultOptions,r=[];for(let t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:s.stroke,strokeWidth:s.strokeWidth,fill:tl};break;case"fillPath":e={d:this.opsToPath(t),stroke:tl,strokeWidth:0,fill:s.fill||tl};break;case"fillSketch":e=this.fillSketch(t,s)}e&&r.push(e)}return r}fillSketch(t,e){let s=e.fillWeight;return s<0&&(s=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||tl,strokeWidth:s,fill:tl}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}};function tu(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 tp(t,e,s,r,n,a={},i){let o=[],l=function(t={}){return[`stroke-linecap="${t.lineCap??"round"}"`,`stroke-linejoin="${t.lineJoin??"round"}"`,...void 0!==t.miterLimit?[`stroke-miterlimit="${g(String(t.miterLimit))}"`]:[],...void 0!==t.dashArray?[`stroke-dasharray="${g(t.dashArray)}"`]:[],...void 0!==t.dashOffset?[`stroke-dashoffset="${g(String(t.dashOffset))}"`]:[],...void 0!==t.opacity?[`stroke-opacity="${g(String(t.opacity))}"`]:[],...void 0!==t.pathLength?[`pathLength="${g(String(t.pathLength))}"`]:[],...void 0!==t.paintOrder?[`paint-order="${g(t.paintOrder)}"`]:[],...void 0!==t.mixBlendMode?[`style="mix-blend-mode:${t.mixBlendMode}"`]:[],...t.nonScaling?['vector-effect="non-scaling-stroke"']:[]].join(" ")}(a),h=l?` ${l}`:" ",u=i?.stroke===void 0?"":` stroke-opacity="${g(String(i.stroke))}"`,p=i?.fill===void 0?"":` stroke-opacity="${g(String(i.fill))}"`;for(let a of t){let t=th.opsToPath(a,2);t&&("path"===a.type?o.push(`<path d="${t}" fill="none" stroke="${e}" stroke-width="${k(s)}"${h}${u} />`):"fillPath"===a.type?o.push(`<path d="${t}" fill="${r}" fill-opacity="${g(String(i?.fill??.92))}" stroke="none" />`):"fillSketch"===a.type&&o.push(`<path d="${t}" fill="none" stroke="${r}" stroke-width="${k(n.fillWeight)}"${p} />`))}return o.join(`
|
|
2
|
+
`)}function tc(t,e,s,r,n,a,i,o,l){var h,u,p,c,f;let d={...o,...void 0!==i?{dashArray:i}:{}},g={seed:e,roughness:a.roughness,bowing:a.bowing,stroke:s,strokeWidth:r,disableMultiStroke:a.passes<2,...n?{fill:n,fillStyle:"solid"===a.fill?"solid":"hachure",fillWeight:a.fillWeight,hachureGap:a.hachureGap,hachureAngle:a.hachureAngle}:{},preserveVertices:!1};try{switch(t.kind){case"rect":let e;return(t.rx??0)>.5?tp(th.path((h=t.x,u=t.y,p=t.width,c=t.height,f=t.rx,e=Math.min(f,p/2,c/2),`M ${h+e} ${u} L ${h+p-e} ${u} Q ${h+p} ${u} ${h+p} ${u+e} L ${h+p} ${u+c-e} Q ${h+p} ${u+c} ${h+p-e} ${u+c} L ${h+e} ${u+c} Q ${h} ${u+c} ${h} ${u+c-e} L ${h} ${u+e} Q ${h} ${u} ${h+e} ${u} Z`),g).sets,s,r,n,a,d,l):tp(th.rectangle(t.x,t.y,t.width,t.height,g).sets,s,r,n,a,d,l);case"circle":return tp(th.circle(t.cx,t.cy,2*t.r,g).sets,s,r,n,a,d,l);case"ellipse":return tp(th.ellipse(t.cx,t.cy,2*t.rx,2*t.ry,g).sets,s,r,n,a,d,l);case"line":return tp(th.line(t.x1,t.y1,t.x2,t.y2,g).sets,s,r,void 0,a,d,l);case"polygon":return tp(th.polygon(t.points.map(t=>[t.x,t.y]),g).sets,s,r,n,a,d,l);case"polyline":return tp(th.linearPath(t.points.map(t=>[t.x,t.y]),g).sets,s,r,void 0,a,d,l);case"path":return tp(th.path(t.d,g).sets,s,r,n,a,d,l);case"compound":return""}}catch{return""}}function tf(t,e,s,r,n,a,i,o,l){if(t.sketcher){let h=t.sketcher(e,{seed:s,stroke:r,width:n,fill:a,p:t.p,style:t.ctx.style,dash:i,strokeProjection:o,opacity:l});if(null!==h)return h}return tc(e,s,r,n,a,t.p,i,o,l)}function td(t,e,s){return t.replace(`<${e} `,`<${e} ${s} `)}function tg(t){if(void 0===t)return 1;let e="number"==typeof t?t:parseFloat(t);return Number.isNaN(e)?1:e}function tk(t,e){return void 0!==t?t:e}function ty(t,e){return e&&""!==t?`<g transform="${c(e)}">${t}</g>`:t}function tM(t){return t.startsWith("var(--_node-fill")||t.startsWith("var(--_group")||"var(--bg)"===t||"var(--surface)"===t}function tm(t,e){return/<text\b[^>]*?\sfill="/.test(t)?t.replace(/(<text\b[^>]*?\sfill=")[^"]*(")/,`$1${g(e)}$2`):t.replace(/<text /,`<text fill="${g(e)}" `)}function tx(e,s){switch(e.kind){case"document":return t(e);case"shape":return"shape"===d(e.role).sketch?function(e,s){let n=s.p,a=t(e),i=function(t){let e=[],s=0,r,n=/<\/([a-zA-Z][a-zA-Z0-9-]*)>/g,a=[];for(let e of f(t)){let t=new Map(e.attributes.map(t=>[t.name,t.value]));a.push({index:e.start,kind:e.selfClosing?"self":"open",tag:e.name,attrs:t})}for(;null!==(r=n.exec(t));)a.push({index:r.index,kind:"close",tag:r[1]});for(let t of(a.sort((t,e)=>t.index-e.index),a))"self"===t.kind?0===s&&e.push({tag:t.tag,attrs:t.attrs}):"open"===t.kind?(0===s&&e.push({tag:t.tag,attrs:t.attrs}),s++):s--;return e}(a),l="compound"===e.geometry.kind?e.geometry.children:[e.geometry];if(i.length<l.length)return a;let h=a.split(`
|
|
3
|
+
`),u=t=>1===h.length&&0===t?a:h[t]??"",p=[];for(let t=0;t<l.length;t++){var c,d;let a=i[t],o=tk(a.attrs.get("stroke"),e.paint.stroke),h=tk(a.attrs.get("fill"),e.paint.fill),f=r(s.ctx.seed,e.id,`outline:${t}`)||1,g=tg(tk(a.attrs.get("stroke-width"),e.paint.strokeWidth)),k=tk(a.attrs.get("stroke-dasharray"),e.paint.strokeDasharray),y=void 0!==o&&"none"!==o&&g>0,M=void 0!==h&&"none"!==h,m=M&&"none"!==n.fill?h:void 0,x=function(t,e){let s=t.get("opacity")??e.opacity,r=t.get("fill-opacity")??e.fillOpacity,n=t.get("stroke-opacity")??e.strokeOpacity;if(void 0===s&&void 0===r&&void 0===n)return;let a=t=>void 0===t?s:void 0===s?t:Number(s)*Number(t);return{fill:a(r),stroke:a(n)}}(a.attrs,e.paint)??{};if("wash"===n.fill&&e.channels?.category!==void 0&&["pie-slice","actor","legend","point","bar"].includes(e.role)&&(x.fill??="1"),!y){if(e.surfaceFragment&&M&&"none"===n.fill&&tM(h))continue;if(m){let r=tf(s,l[t],f,"none",0,m,k,void 0,x);if(r){p.push(ty(r,e.transform));continue}}p.push(u(t));continue}let v=Math.max(.6,Math.min(n.strokeWidth*g,4*n.strokeWidth)),b=tf(s,l[t],f,o,v,m,k,void 0,x);if(!b){p.push(u(t));continue}M&&"none"===n.fill&&!tM(h)&&p.push((c=u(t),d=a.tag,/style="/.test(c)?c.replace(/style="([^"]*)"/,(t,e)=>{let s=0===e.trim().length||/;\s*$/.test(e)?"":";";return`style="${e}${s}stroke:none"`}):td(c,d,'style="stroke:none"'))),p.push(ty(b,e.transform))}let g=p.filter(Boolean).join(`
|
|
4
|
+
`);return e.identity&&!/\sdata-id=/.test(g)?o(g,e.identity):g}(e,s):t(e);case"connector":return"connector"===d(e.role).sketch?function(e,s){let n=t(e);if("invisible"===e.lineStyle||""===n)return n;let a=e.stroke.color,i=tg(e.stroke.width);if(i<=0)return n;let o=e.stroke.encodesValue?i:s.p.strokeWidth*i,l=r(s.ctx.seed,e.id,"stroke")||1,h=e.stroke.dash?"string"==typeof e.stroke.dash.array?e.stroke.dash.array:e.stroke.dash.array.join(" "):void 0,p={...void 0!==h?{dashArray:h}:{},...e.stroke.dash?.offset!==void 0?{dashOffset:e.stroke.dash.offset}:{},lineCap:e.stroke.lineCap,lineJoin:e.stroke.lineJoin,miterLimit:e.stroke.miterLimit,...void 0!==e.stroke.opacity?{opacity:e.stroke.opacity}:{},...void 0!==e.stroke.pathLength?{pathLength:e.stroke.pathLength}:{},...void 0!==e.stroke.paintOrder?{paintOrder:e.stroke.paintOrder}:{},...void 0!==e.stroke.mixBlendMode?{mixBlendMode:e.stroke.mixBlendMode}:{},nonScaling:e.stroke.nonScaling},c="",f=e.route.geometry;if("polyline"===f.kind)c=tf(s,{kind:"polyline",points:f.points},l,a,o,void 0,h,p);else if("line"===f.kind)c=tf(s,f,l,a,o,void 0,h,p);else{let t=u(f,e.route.closed);if(1===t.length&&(c=tf(s,{kind:"path",d:f.d},l,a,o,void 0,h,p)),!c&&f.points.length>1){let e=t.map((t,e)=>{let r=t.points[0],n=t.points.at(-1);return tf(s,{kind:"polyline",points:[...t.closed&&r&&n&&(r.x!==n.x||r.y!==n.y)?[...t.points,r]:t.points]},l+e,a,o,void 0,h,p)});c=e.every(Boolean)?e.join(`
|
|
5
|
+
`):""}}if(!c)return n;let d=n.replace(/\sstroke-opacity=(?:"[^"]*"|'[^']*')/,' stroke-opacity="0"');return`${d===n?td(n,e.route.geometry.kind,'stroke-opacity="0"'):d}
|
|
6
|
+
${ty(c,e.transform)}`}(e,s):t(e);case"text":return d(e.role).textHalo?(void 0!==e.pageFill?tm(t(e),e.pageFill):function(t,e,s){let r=s.colors,n=void 0===r?void 0:x("var(--bg)",r);if(void 0===r||void 0===n)return t;let a=e.fontSize>=24?m:M,i=t=>{let e=x(t,r);return void 0!==e&&(y(e,n)??a)<a};return(void 0!==e.paint.fill&&i(e.paint.fill)?tm(t,"var(--_text)"):t).replace(/(<tspan\b[^>]*?\sfill=")([^"]*)(")/g,(t,e,s,r)=>i(s)?`${e}var(--_text)${r}`:t)}(t(e),e,s)).replace(/<text\b[^>]*>/g,t=>t.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"')):t(e);case"group":return i(e.open,e.close,e.join,e.children.map(t=>({serialized:tx(t.node,s),indent:t.indent})))}}function tv(t,s){return{id:t,capabilities:e(`backend:${t}`,"sketch",s?"hybrid":"rough"),drawNode:(t,e)=>tx(t,{ctx:e,p:tu(e.style),sketcher:s}),render(t,e){let r=n(t),i={ctx:e,p:tu(e.style),sketcher:s,colors:r.colors},o=[];for(let t=0;t<r.parts.length;t++){let s=r.parts[t];if(o.push(a(e,s,tx(s,i))),0===t&&"document"===s.kind&&"open"===s.element){let t=l(r,e);t&&o.push(t);let s=function(t,e){let s=t?.backdrop??"plain";if("paper-ruled"===s){let t=['<g data-backdrop="paper-ruled">'];for(let s=26;s<e.height;s+=26)t.push(` <line x1="0" y1="${s}" x2="${e.width}" y2="${s}" stroke="var(--_line)" stroke-width="0.5" opacity="0.14" />`);return t.push("</g>"),t.join(`
|
|
7
7
|
`)}if("grid"===s){let t=['<g data-backdrop="grid">'];for(let s=22;s<e.width;s+=22)t.push(` <line x1="${s}" y1="0" x2="${s}" y2="${e.height}" stroke="var(--_line)" stroke-width="0.5" opacity="0.10" />`);for(let s=22;s<e.height;s+=22)t.push(` <line x1="0" y1="${s}" x2="${e.width}" y2="${s}" stroke="var(--_line)" stroke-width="0.5" opacity="0.10" />`);return t.push("</g>"),t.join(`
|
|
8
|
-
`)}return""}(e.style,
|
|
9
|
-
`)}}}var tb=tv("rough"),{PI:t$}=Math,tP=t$+1e-4,tw=.5,tS=[1,1];function tO(t,e,s,r=t=>t){return t*r(.5-e*(.5-s))}var{min:tL}=Math;function tj(t,e,s){let r=tL(1,e/s);return tL(1,t+(tL(1,1-r)-t)*(.275*r))}function tI(t,e){return[t[0]+e[0],t[1]+e[1]]}function t_(t,e,s){return t[0]=e[0]+s[0],t[1]=e[1]+s[1],t}function
|
|
10
|
-
<path d="${i}" fill="none" stroke="${r}" stroke-width="1.4" stroke-opacity="${a}" />`)):"path"===t.kind&&
|
|
11
|
-
`)}}let
|
|
12
|
-
`):null})]);for(let t of t1)t!==
|
|
8
|
+
`)}return""}(e.style,r);s&&o.push(s)}}return o.join(`
|
|
9
|
+
`)}}}var tb=tv("rough"),{PI:t$}=Math,tP=t$+1e-4,tw=.5,tS=[1,1];function tO(t,e,s,r=t=>t){return t*r(.5-e*(.5-s))}var{min:tL}=Math;function tj(t,e,s){let r=tL(1,e/s);return tL(1,t+(tL(1,1-r)-t)*(.275*r))}function tI(t,e){return[t[0]+e[0],t[1]+e[1]]}function t_(t,e,s){return t[0]=e[0]+s[0],t[1]=e[1]+s[1],t}function tW(t,e){return[t[0]-e[0],t[1]-e[1]]}function tz(t,e,s){return t[0]=e[0]-s[0],t[1]=e[1]-s[1],t}function tA(t,e){return[t[0]*e,t[1]*e]}function tC(t,e,s){return t[0]=e[0]*s,t[1]=e[1]*s,t}function tT(t){return[t[1],-t[0]]}function tG(t,e){let s=e[0];return t[0]=e[1],t[1]=-s,t}function tE(t,e){return t[0]*e[0]+t[1]*e[1]}function tR(t,e){let s=t[0]-e[0],r=t[1]-e[1];return s*s+r*r}function tB(t){var e;return e=Math.hypot(t[0],t[1]),[t[0]/e,t[1]/e]}function tq(t,e,s){let r=Math.sin(s),n=Math.cos(s),a=t[0]-e[0],i=t[1]-e[1];return[a*n-i*r+e[0],a*r+i*n+e[1]]}function tF(t,e,s,r){let n=Math.sin(r),a=Math.cos(r),i=e[0]-s[0],o=e[1]-s[1];return t[0]=i*a-o*n+s[0],t[1]=i*n+o*a+s[1],t}function tQ(t,e,s){return tI(t,tA(tW(e,t),s))}var tZ=[0,0],tV=[0,0],tN=[0,0];function tH(t,e,s){return!1===t||void 0===t?0:!0===t?Math.max(e,s):t}var tJ=[0,0];function tD(t){return null!=t&&t>=0}var tK=t=>Math.round(1e3*t)/1e3,tU=(t,e,s)=>t+(e-t)*s,tX=t=>Math.max(0,Math.min(1,t));function tY(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":{let e=[];for(let s=0;s<24;s++){let r=s/24*Math.PI*2;e.push({x:t.cx+Math.cos(r)*t.r,y:t.cy+Math.sin(r)*t.r})}return e}case"ellipse":{let e=[];for(let s=0;s<28;s++){let r=s/28*Math.PI*2;e.push({x:t.cx+Math.cos(r)*t.rx,y:t.cy+Math.sin(r)*t.ry})}return e}default:return null}}function t0(t,e,s){if(t.length<2)return"";var r=function(t,e={}){return function(t,e={}){var s,r;let{size:n=16,smoothing:a=.5,thinning:i=.5,simulatePressure:o=!0,easing:l=t=>t,start:h={},end:u={},last:p=!1}=e,{cap:c=!0,easing:f=t=>t*(2-t)}=h,{cap:d=!0,easing:g=t=>--t*t*t+1}=u;if(0===t.length||n<=0)return[];let k=t[t.length-1].runningLength,y=tH(h.taper,n,k),M=tH(u.taper,n,k),m=(n*a)**2,x=[],v=[],b=t.slice(0,10).reduce((t,e)=>{let s=e.pressure;return o&&(s=tj(t,e.distance,n)),(t+s)/2},t[0].pressure),$=tO(n,i,t[t.length-1].pressure,l),P,w=t[0].vector,S=t[0].point,O=S,L=S,j=O,I=!1;for(let e=0;e<t.length;e++){let{pressure:s}=t[e],{point:r,vector:a,distance:h,runningLength:u}=t[e],p=e===t.length-1;if(!p&&k-u<3)continue;i?(o&&(s=tj(b,h,n)),$=tO(n,i,s,l)):$=n/2,void 0===P&&(P=$),$=Math.max(.01,$*Math.min(u<y?f(u/y):1,k-u<M?g((k-u)/M):1));let c=(p?t[e]:t[e+1]).vector,d=p?1:tE(a,c),_=0>tE(a,w)&&!I,W=null!==d&&d<0;if(_||W){tG(tZ,w),tC(tZ,tZ,$);for(let t=0;t<=1;t+=.07692307692307693)tz(tV,r,tZ),tF(tV,tV,r,tP*t),L=[tV[0],tV[1]],x.push(L),t_(tN,r,tZ),tF(tN,tN,r,-(tP*t)),j=[tN[0],tN[1]],v.push(j);S=L,O=j,W&&(I=!0);continue}if(I=!1,p){tG(tZ,a),tC(tZ,tZ,$),x.push(tW(r,tZ)),v.push(tI(r,tZ));continue}(function(t,e,s,r){let n=s[0]-e[0],a=s[1]-e[1];t[0]=e[0]+n*r,t[1]=e[1]+a*r})(tZ,c,a,d),tG(tZ,tZ),tC(tZ,tZ,$),tz(tV,r,tZ),L=[tV[0],tV[1]],(e<=1||tR(S,L)>m)&&(x.push(L),S=L),t_(tN,r,tZ),j=[tN[0],tN[1]],(e<=1||tR(O,j)>m)&&(v.push(j),O=j),b=s,w=a}let _=[t[0].point[0],t[0].point[1]],W=t.length>1?[t[t.length-1].point[0],t[t.length-1].point[1]]:tI(t[0].point,[1,1]),z=[],A=[];if(1===t.length){if(!(y||M)||p)return function(t,e){var s;let r=(s=tB(tT(tW(t,tI(t,[1,1])))),tI(t,tA(s,-e))),n=[],a=1/13;for(let e=a;e<=1;e+=a)n.push(tq(r,t,2*tP*e));return n}(_,P||$)}else{let e,n,a;y||M&&1===t.length||(c?z.push(...function(t,e,s){let r=[],n=1/13;for(let s=n;s<=1;s+=n)r.push(tq(e,t,tP*s));return r}(_,v[0],0)):z.push(...(n=tA(e=tW(x[0],v[0]),.5),a=tA(e,.51),[tW(_,n),tW(_,a),tI(_,a),tI(_,n)])));let i=tT([-(s=t[t.length-1].vector)[0],-s[1]]);M||y&&1===t.length?A.push(W):d?A.push(...function(t,e,s,r){let n=[],a=tI(t,tA(e,s)),i=1/29;for(let e=i;e<1;e+=i)n.push(tq(a,t,3*tP*e));return n}(W,i,$,0)):A.push(tI(W,tA(i,r=$)),tI(W,tA(i,.99*r)),tW(W,tA(i,.99*r)),tW(W,tA(i,r)))}return x.concat(A,v.reverse(),z)}(function(t,e={}){let{streamline:s=.5,size:r=16,last:n=!1}=e;if(0===t.length)return[];let a=.15+(1-s)*.85,i=Array.isArray(t[0])?t:t.map(({x:t,y:e,pressure:s=tw})=>[t,e,s]);if(2===i.length){let t=i[1];i=i.slice(0,-1);for(let e=1;e<5;e++)i.push(tQ(i[0],t,e/4))}1===i.length&&(i=[...i,[...tI(i[0],tS),...i[0].slice(2)]]);let o=[{point:[i[0][0],i[0][1]],pressure:tD(i[0][2])?i[0][2]:.25,vector:[...tS],distance:0,runningLength:0}],l=!1,h=0,u=o[0],p=i.length-1;for(let t=1;t<i.length;t++){var c,f;let e=n&&t===p?[i[t][0],i[t][1]]:tQ(u.point,i[t],a);if((c=u.point)[0]===e[0]&&c[1]===e[1])continue;let s=(f=u.point,Math.hypot(e[1]-f[1],e[0]-f[0]));if(h+=s,t<p&&!l){if(h<r)continue;l=!0}tz(tJ,u.point,e),u={point:e,pressure:tD(i[t][2])?i[t][2]:tw,vector:tB(tJ),distance:s,runningLength:h},o.push(u)}return o[0].vector=o[1]?.vector||[0,0],o}(t,e),e)}(function(t,e,s,r){let n=s?[...t,t[0]]:t,a=[];for(let t=0;t<n.length-1;t++){let r=n[t],i=n[t+1],o=Math.hypot(i.x-r.x,i.y-r.y)||1,l=Math.max(1,Math.ceil(o/14)),h=-(i.y-r.y)/o,u=(i.x-r.x)/o;for(let o=0;o<l;o++){if(t>0&&0===o)continue;let p=o/l,c=s||(0!==t||0!==o)&&(t!==n.length-2||o!==l)?(e()-.5)*2:0,f={x:tU(r.x,i.x,p)+h*c,y:tU(r.y,i.y,p)+u*c},d=tX(.52+.12*Math.sin((t+p)/Math.max(1,n.length-1)*Math.PI*2)+(e()-.5)*.16);a.push([f.x,f.y,d])}}let i=n[n.length-1];return a.push([i.x,i.y,s?a[0]?.[2]??.55:.46]),a}(t,e,s.closed,0),{size:s.width,thinning:.58,smoothing:.62,streamline:.35,simulatePressure:!1,start:{cap:!0,taper:10*!s.closed},end:{cap:!0,taper:14*!s.closed},last:!0});if(r.length<2)return"";let n=[`M${tK(r[0][0])},${tK(r[0][1])}`];for(let t=1;t<r.length;t++){let[e,s]=r[t],[a,i]=r[(t+1)%r.length];n.push(`Q${tK(e)},${tK(s)} ${tK((e+a)/2)},${tK((s+i)/2)}`)}return n.push("Z"),n.join(" ")}var t1=Object.freeze([h,tb,tv("hybrid",(t,e)=>{var r,n,a,i,o;let l=e.style?.stroke??"jittered",h=(e.style?.fill??"none")==="wash"&&void 0!==e.fill,u="freehand"===l,p=e.opacity?.fill===void 0?void 0:Number(e.opacity.fill),c=e.opacity?.stroke===void 0?void 0:Number(e.opacity.stroke);if(!h&&!u)return null;let f=[];if(h){let i,o=s((0x9e3779b9^e.seed)>>>0),l="path"===t.kind?null:tY(t);l?f.push((r=e.fill,n=p??e.style?.washOpacity??.3,a=e.style?.washEdge??.34,i=l.map(t=>({x:t.x+(o()-.5)*3,y:t.y+(o()-.5)*3})).map((t,e)=>`${e?"L":"M"}${tK(t.x)},${tK(t.y)}`).join(" ")+" Z",`<path d="${i}" fill="${r}" fill-opacity="${n}" stroke="none" />
|
|
10
|
+
<path d="${i}" fill="none" stroke="${r}" stroke-width="1.4" stroke-opacity="${a}" />`)):"path"===t.kind&&f.push(`<path d="${t.d}" fill="${e.fill}" fill-opacity="${p??e.style?.washOpacity??.3}" stroke="${e.fill}" stroke-width="1.4" stroke-opacity="${e.style?.washEdge??.34}" />`)}if(u&&!e.dash){let r=s(e.seed||1),n=Math.max(2.5,2.2*e.width),a="";if("polyline"===t.kind)a=t0(t.points,r,{width:n,closed:!1});else if("line"===t.kind)a=t0([{x:t.x1,y:t.y1},{x:t.x2,y:t.y2}],r,{width:n,closed:!1});else{let e=tY(t);e&&(a=t0(e,r,{width:n,closed:!0}))}if(a){let t=e.strokeProjection?[...void 0!==e.strokeProjection.opacity?[`opacity="${g(String(e.strokeProjection.opacity))}"`]:[],...void 0!==e.strokeProjection.paintOrder?[`paint-order="${g(e.strokeProjection.paintOrder)}"`]:[],...void 0!==e.strokeProjection.mixBlendMode?[`style="mix-blend-mode:${e.strokeProjection.mixBlendMode}"`]:[]].join(" "):"",s=void 0===c?"":` fill-opacity="${g(String(c))}"`;return f.push(`<path d="${a}" fill="${e.stroke}" stroke="none"${s}${t?` ${t}`:""} />`),f.join(`
|
|
11
|
+
`)}}let d=(i=e.seed,o=e.stroke,tc(t,i,o,e.width,h?void 0:e.fill,e.p,e.dash,e.strokeProjection,e.opacity));return d&&f.push(d),f.length>0?f.join(`
|
|
12
|
+
`):null})]);for(let t of t1)t!==h&&p(t);export{t1 as BUILTIN_BACKENDS};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`||"\r"===s)&&(a=!1);continue}if(r){if('"'===r&&i){i=!1;continue}if('"'===r&&"\\"===s){i=!0;continue}if("'"===r&&"'"===s&&"'"===e[o+1]){o++;continue}s===r&&(r=void 0);continue}if('"'===s||"'"===s){r=s;continue}if("#"===s){a=!0;continue}if("{"===s||"["===s){if(t.push(s),t.length>g.maxDepth){n.push({code:"JSON_DEPTH_LIMIT",path:[],message:`exceeds maximum nesting depth ${g.maxDepth}`});break}}else("}"===s||"]"===s)&&t.pop()}}if(n.length>0)throw new k(t,n)}function O(e,t){let r=g.maxDiagnostics;return e.length<=r?[...e]:[...e.slice(0,r-1),`${t} exceeds the ${r}-diagnostic admission limit`]}var j=Object.freeze({contrast:Object.freeze({properties:Object.freeze({role:Object.freeze({kind:"role"}),minimum:Object.freeze({kind:"number",minimum:1,maximum:21})}),recovery:"Choose an authored text/surface pair that meets the requested ratio, or remove the rule; the renderer will not repaint it."}),"accent-area":Object.freeze({properties:Object.freeze({maxFraction:Object.freeze({kind:"number",minimum:0,maximum:1,required:!0})}),recovery:"Reduce authored accent-filled area or raise the declared maximum; the renderer will not rewrite fills."}),"mono-role":Object.freeze({properties:Object.freeze({role:Object.freeze({kind:"role",required:!0})}),recovery:"Use measurable monochrome paint for the named role or remove the rule; the renderer will not rewrite paint."})}),S=Object.freeze(Object.keys(j));function w(e){return j[e].properties}var C=Object.freeze({warn:Object.freeze({code:"BRAND_CONSTRAINT_WARNING",severity:"warning",tier:"lint"}),error:Object.freeze({code:"BRAND_CONSTRAINT_ERROR",severity:"error",tier:"lint"})}),$=s({bg:{},fg:{},line:{},accent:{},muted:{},surface:{},border:{}}),z=Object.freeze(["category"]),T=s({formatVersion:{kind:"const",value:1},$schema:{kind:"string"},name:{kind:"string"},blurb:{kind:"string"},colors:{kind:"colors"},font:{kind:"string",runtimeValidator:"safeCssFontFamily"},roles:{kind:"roles"},semanticSlots:{kind:"semanticSlots"},bindings:{kind:"bindings"},constraints:{kind:"constraints"},stroke:{kind:"enum",values:["crisp","jittered","freehand"]},roughness:{kind:"number",minimum:0,maximum:10,expected:"between 0 and 10"},bowing:{kind:"number",minimum:0,maximum:10,expected:"between 0 and 10"},passes:{kind:"integer",minimum:1,maximum:8,expected:"an integer from 1 through 8"},strokeWidth:{kind:"number",exclusiveMinimum:0,maximum:20,expected:"greater than 0 and at most 20"},fill:{kind:"enum",values:["none","hachure","solid","wash"]},hachureAngle:{kind:"number",minimum:-360,maximum:360,expected:"between -360 and 360"},hachureGap:{kind:"number",exclusiveMinimum:0,maximum:100,expected:"greater than 0 and at most 100"},fillWeight:{kind:"number",exclusiveMinimum:0,maximum:20,expected:"greater than 0 and at most 20"},washOpacity:{kind:"number",minimum:0,maximum:1,expected:"between 0 and 1"},washEdge:{kind:"number",minimum:0,maximum:1,expected:"between 0 and 1"},backdrop:{kind:"enum",values:["plain","paper-ruled","grid"]},intent:{kind:"enum",values:["premium","draft","lofi"]},mono:{kind:"boolean"}});function A(e,t){return!("number"!=typeof e||!Number.isFinite(e)||"integer"===t.kind&&!Number.isInteger(e)||void 0!==t.minimum&&e<t.minimum||void 0!==t.exclusiveMinimum&&e<=t.exclusiveMinimum||void 0!==t.maximum&&e>t.maximum)}var N=new Set(Object.freeze(["--bg","--fg","--_text","--_text-sec","--_text-muted","--_text-faint","--_line","--_arrow","--_node-fill","--_node-stroke","--_group-fill","--_group-hdr","--_inner-stroke","--_key-badge"])),W=new Map(a.map(e=>[e.role,e])),_=r.map(e=>W.get(e)),E=new Set(n),I=/^[A-Za-z][A-Za-z0-9._-]{0,63}$/,L=new Set(["__proto__","constructor","prototype"]);function P(e,r,n){if(!o(e))return[`"${r}" must be an object`];let i=[];for(let[a,o]of Object.entries(e)){if(!Object.hasOwn(t,a)){i.push(`unknown role style field "${r.slice(r.indexOf(".")+1)}.${a}"`);continue}if(n&&!n.has(a)){i.push(`role style field "${r}.${a}" is not applicable`);continue}let e=t[a],s=`${r}.${a}`;void 0!==o&&("number"!==e.kind||A(o,e)?"font"===e.kind&&("string"!=typeof o||void 0===c(o))?i.push(`"${s}" must be a safe non-fetching CSS font family or stack`):"color"!==e.kind||"string"==typeof o&&void 0!==f(o)&&[...o.matchAll(/var\(\s*(--[a-z0-9_-]+)/gi)].map(e=>e[1]).every(e=>N.has(e))?"enum"!==e.kind||"string"==typeof o&&e.values.includes(o)||i.push(`"${s}" must be one of ${e.values.join(" | ")}`):i.push(`"${s}" must be a safe non-fetching CSS paint`):i.push(`"${s}" must be ${e.expected}`))}return i}function R(e){return"string"==typeof e&&I.test(e)&&!L.has(e)}function F(e){if(!o(e))return["style spec must be a plain object"];if(Object.keys(e).length>g.maxItemsPerContainer)return[`style spec must contain at most ${g.maxItemsPerContainer} fields`];let t=[];for(let[r,i]of Object.entries(e)){if(!Object.hasOwn(T,r)){t.push(`unknown field "${r}"`);continue}let e=T[r];if(void 0!==i)switch(e.kind){case"const":i!==e.value&&t.push(`"${r}" must be ${e.value}`);break;case"string":"string"!=typeof i?t.push(`"${r}" must be a string`):"safeCssFontFamily"===e.runtimeValidator&&void 0===c(i)&&t.push(`"${r}" must be a safe non-fetching CSS font family or stack`);break;case"boolean":"boolean"!=typeof i&&t.push(`"${r}" must be a boolean`);break;case"number":case"integer":A(i,e)||t.push(`"${r}" must be ${e.expected}`);break;case"enum":"string"==typeof i&&e.values.includes(i)||t.push(`"${r}" must be one of ${e.values.join(" | ")}`);break;case"roles":t.push(...function(e){if(!o(e))return['"roles" must be an object of SceneRole records'];let t=[];for(let[r,n]of Object.entries(e)){let e=W.get(r);if(!e){t.push(`unknown scene role "${r}"`);continue}if("fallback-only"===e.traits.styleConsumption){t.push(`scene role "${r}" is fallback-only; set roles.${e.style.fallbackRole} instead`);continue}let i=P(n,`roles.${r}`,new Set(e.style.applicableProperties)).map(e=>e===`"roles.${r}" must be an object`?e:e.replace(`role style field "roles.${r}.`,`role style field "${r}.`).replace('" is not applicable',`" is not applicable to ${r} roles`));t.push(...i)}return t}(i));break;case"semanticSlots":t.push(...function(e){if(!o(e))return['"semanticSlots" must be an object of named role-style slots'];if(Object.keys(e).length>g.maxItemsPerContainer)return[`"semanticSlots" must contain at most ${g.maxItemsPerContainer} slots`];let t=[];for(let[r,n]of Object.entries(e)){if(!R(r)){t.push(`invalid semantic slot name "${r}"`);continue}t.push(...P(n,`semanticSlots.${r}`))}return t}(i));break;case"bindings":t.push(...function(e){if(!Array.isArray(e))return['"bindings" must be an array'];if(e.length>g.maxItemsPerContainer)return[`"bindings" must contain at most ${g.maxItemsPerContainer} entries`];let t=[];return e.forEach((e,r)=>{let i=`bindings[${r}]`;if(!o(e))return void t.push(`"${i}" must be an object`);for(let r of Object.keys(e))["channel","value","slot","role"].includes(r)||t.push(`unknown binding field "${i}.${r}"`);"string"==typeof e.channel&&z.includes(e.channel)||t.push(`"${i}.channel" must be one of ${z.join(" | ")}`),("string"!=typeof e.value||0===e.value.length||e.value.length>256||/[\r\n\0]/.test(e.value))&&t.push(`"${i}.value" must be a non-empty single-line string of at most 256 characters`),R(e.slot)||t.push(`"${i}.slot" must be a valid semantic slot name`),void 0===e.role||E.has(e.role)||t.push(`"${i}.role" must be a SceneRole with an executable category-binding consumer (${n.join(" | ")})`)}),t}(i));break;case"constraints":t.push(...function(e){if(!Array.isArray(e))return['"constraints" must be an array'];if(e.length>g.maxItemsPerContainer)return[`"constraints" must contain at most ${g.maxItemsPerContainer} entries`];let t=[];return e.forEach((e,r)=>{let n=`constraints[${r}]`;if(!o(e))return void t.push(`"${n}" must be an object`);if("string"!=typeof e.kind||!S.includes(e.kind))return void t.push(`"${n}.kind" must be one of ${S.join(" | ")}`);let i=e.kind,a=w(i),s=new Set(Object.freeze(["kind","action",...Object.keys(j[i].properties)]));for(let r of Object.keys(e))s.has(r)||t.push(`unknown constraint field "${n}.${r}"`);for(let[r,o]of("warn"!==e.action&&"error"!==e.action&&t.push(`"${n}.action" must be one of warn | error`),Object.entries(a))){let a=e[r];if(void 0===a){o.required&&t.push(`"${n}.${r}" is required for ${i}`);continue}"role"!==o.kind||W.has(a)?"number"!==o.kind||A(a,o)||t.push(`"${n}.${r}" must be between ${o.minimum} and ${o.maximum}`):t.push(`"${n}.${r}" must be a registered built-in SceneRole`)}}),t}(i));break;case"colors":if(!o(i)){t.push('"colors" must be an object of color tokens');break}for(let[e,r]of Object.entries(i))Object.hasOwn($,e)?void 0!==r&&"string"!=typeof r?t.push(`color token "${e}" must be a string`):void 0!==r&&void 0===d(r)&&t.push(`color token "${e}" must be a safe non-fetching CSS color`):t.push(`unknown color token "${e}"`)}}return O(t,"Style validation")}function D(e=Object.keys(t)){let r=Object.fromEntries(Object.entries(t).map(([e,t])=>"number"===t.kind?[e,{type:"number",...void 0!==t.minimum?{minimum:t.minimum}:{},...void 0!==t.exclusiveMinimum?{exclusiveMinimum:t.exclusiveMinimum}:{},...void 0!==t.maximum?{maximum:t.maximum}:{}}]:"enum"===t.kind?[e,{type:"string",enum:[...t.values]}]:[e,{type:"string","x-agentic-mermaid-runtime-validator":"font"===t.kind?"safeCssFontFamily":"safeStylePaint"}]));return{type:"object",additionalProperties:!1,maxProperties:e.length,properties:Object.fromEntries(e.map(e=>[e,r[e]]))}}function M(e){return`roleStyle-${e.role}`}var B="^[A-Za-z][A-Za-z0-9._-]{0,63}$";function J(){let e=Object.fromEntries(_.map(e=>[M(e),D(e.style.applicableProperties)]));return{type:"object",additionalProperties:!1,maxProperties:Object.keys(T).length,properties:Object.fromEntries(Object.entries(T).map(([e,t])=>[e,function(e){switch(e.kind){case"const":return{const:e.value};case"string":return{type:"string",...e.runtimeValidator?{"x-agentic-mermaid-runtime-validator":e.runtimeValidator}:{}};case"boolean":return{type:"boolean"};case"enum":return{type:"string",enum:[...e.values]};case"number":case"integer":return{type:e.kind,...void 0!==e.minimum?{minimum:e.minimum}:{},...void 0!==e.exclusiveMinimum?{exclusiveMinimum:e.exclusiveMinimum}:{},...void 0!==e.maximum?{maximum:e.maximum}:{}};case"roles":return{type:"object",additionalProperties:!1,properties:Object.fromEntries(_.map(e=>[e.role,{$ref:`#/$defs/${M(e)}`}]))};case"semanticSlots":return{type:"object",maxProperties:g.maxItemsPerContainer,propertyNames:{pattern:B,not:{enum:[...L]}},additionalProperties:{$ref:"#/$defs/roleStyle-any"}};case"bindings":return{type:"array",maxItems:g.maxItemsPerContainer,items:{type:"object",additionalProperties:!1,maxProperties:4,required:["channel","value","slot"],properties:{channel:{type:"string",enum:[...z]},value:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\r\\n\\u0000]+$"},slot:{type:"string",pattern:B,not:{enum:[...L]}},role:{type:"string",enum:[...n]}}}};case"constraints":{let e={type:"string",enum:["warn","error"]},t={type:"string",enum:a.map(e=>e.role)},r=S.map(r=>{let n=Object.fromEntries(Object.entries(w(r)).map(([e,r])=>[e,"role"===r.kind?t:{type:"number",minimum:r.minimum,maximum:r.maximum}]));return{type:"object",additionalProperties:!1,required:[...Object.freeze(["kind","action",...Object.entries(w(r)).filter(([,e])=>!0===e.required).map(([e])=>e)])],properties:{kind:{const:r},action:e,...n}}});return{type:"array",maxItems:g.maxItemsPerContainer,items:{oneOf:r}}}case"colors":return{type:"object",additionalProperties:!1,maxProperties:Object.keys($).length,properties:Object.fromEntries(Object.entries($).map(([e,t])=>[e,{type:"string","x-agentic-mermaid-runtime-validator":"safeCssColor"}]))}}}(t)])),$defs:{...e,"roleStyle-any":D()}}}var Y=Object.freeze([{id:"palette:paper",inputName:"paper",displayLabel:"Paper",colors:{bg:"#F5F0E4",fg:"#221E16",accent:"#9A4A24"}},{id:"palette:dusk",inputName:"dusk",displayLabel:"Dusk",colors:{bg:"#2A2521",fg:"#E9DFCC",accent:"#CC8A57"}},{id:"palette:zinc-light",inputName:"zinc-light",displayLabel:"Zinc Light",colors:{bg:"#FFFFFF",fg:"#27272A"}},{id:"palette:zinc-dark",inputName:"zinc-dark",displayLabel:"Zinc Dark",colors:{bg:"#18181B",fg:"#FAFAFA"}},{id:"palette:tokyo-night",inputName:"tokyo-night",displayLabel:"Tokyo Night",colors:{bg:"#1a1b26",fg:"#a9b1d6",line:"#3d59a1",accent:"#7aa2f7",muted:"#565f89"}},{id:"palette:tokyo-night-storm",inputName:"tokyo-night-storm",displayLabel:"Tokyo Night Storm",colors:{bg:"#24283b",fg:"#a9b1d6",line:"#3d59a1",accent:"#7aa2f7",muted:"#565f89"}},{id:"palette:tokyo-night-light",inputName:"tokyo-night-light",displayLabel:"Tokyo Night Light",colors:{bg:"#d5d6db",fg:"#343b58",line:"#34548a",accent:"#34548a",muted:"#9699a3"}},{id:"palette:catppuccin-mocha",inputName:"catppuccin-mocha",displayLabel:"Catppuccin Mocha",colors:{bg:"#1e1e2e",fg:"#cdd6f4",line:"#585b70",accent:"#cba6f7",muted:"#6c7086"}},{id:"palette:catppuccin-latte",inputName:"catppuccin-latte",displayLabel:"Catppuccin Latte",colors:{bg:"#eff1f5",fg:"#4c4f69",line:"#9ca0b0",accent:"#8839ef",muted:"#9ca0b0"}},{id:"palette:nord",inputName:"nord",displayLabel:"Nord",colors:{bg:"#2e3440",fg:"#d8dee9",line:"#4c566a",accent:"#88c0d0",muted:"#616e88"}},{id:"palette:nord-light",inputName:"nord-light",displayLabel:"Nord Light",colors:{bg:"#eceff4",fg:"#2e3440",line:"#aab1c0",accent:"#5e81ac",muted:"#7b88a1"}},{id:"palette:dracula",inputName:"dracula",displayLabel:"Dracula",colors:{bg:"#282a36",fg:"#f8f8f2",line:"#6272a4",accent:"#bd93f9",muted:"#6272a4"}},{id:"palette:github-light",inputName:"github-light",displayLabel:"GitHub Light",colors:{bg:"#ffffff",fg:"#1f2328",line:"#d1d9e0",accent:"#0969da",muted:"#59636e"}},{id:"palette:github-dark",inputName:"github-dark",displayLabel:"GitHub Dark",colors:{bg:"#0d1117",fg:"#e6edf3",line:"#3d444d",accent:"#4493f8",muted:"#9198a1"}},{id:"palette:solarized-light",inputName:"solarized-light",displayLabel:"Solarized Light",colors:{bg:"#fdf6e3",fg:"#657b83",line:"#93a1a1",accent:"#268bd2",muted:"#93a1a1"}},{id:"palette:solarized-dark",inputName:"solarized-dark",displayLabel:"Solarized Dark",colors:{bg:"#002b36",fg:"#839496",line:"#586e75",accent:"#268bd2",muted:"#586e75"}},{id:"palette:one-dark",inputName:"one-dark",displayLabel:"One Dark",colors:{bg:"#282c34",fg:"#abb2bf",line:"#4b5263",accent:"#c678dd",muted:"#5c6370"}},{id:"palette:salmon",inputName:"salmon",displayLabel:"Salmon",colors:{bg:"#FFFBF5",fg:"#521000",line:"#C9A88A",accent:"#FF4801",muted:"#85532E",surface:"#FFFDFB",border:"#D4B89E"}},{id:"palette:salmon-dark",inputName:"salmon-dark",displayLabel:"Salmon Dark",colors:{bg:"#1F1008",fg:"#F5DCC8",line:"#6B4A2E",accent:"#FF6B35",muted:"#A07858",surface:"#2A1810",border:"#5A3A22"}},{id:"palette:tufte-dark",inputName:"tufte-dark",displayLabel:"Tufte Dark",colors:{bg:"#1C1C1A",fg:"#E8E4DC",line:"#666660",accent:"#C87070",muted:"#908880",surface:"#2A2926",border:"#444440"}}]),X=0;function G(e){X++;try{return e()}finally{X--}}function q(e){let t=new WeakMap,r=new WeakSet,n=new Set(["__proto__","prototype","constructor"]),i=0,a=0,s=(e,l)=>{if(l>g.maxDepth)throw TypeError(`Style input exceeds maximum nesting depth ${g.maxDepth}`);if(++i>g.maxNodes)throw TypeError(`Style input exceeds the ${g.maxNodes}-node limit`);if("string"==typeof e){if((a+=e.length)>g.maxAggregateTextCharacters)throw TypeError(`Style input exceeds the ${g.maxAggregateTextCharacters}-character text limit`);return e}if("object"!=typeof e||null===e)return e;if(r.has(e))throw TypeError("Style input must be acyclic");let c=t.get(e);if(void 0!==c)return c;if(Array.isArray(e)){if(e.length>g.maxItemsPerContainer)throw TypeError(`Style array must contain at most ${g.maxItemsPerContainer} items`);let n=[];t.set(e,n),r.add(e);for(let t=0;t<e.length;t++){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("Style arrays must not be sparse");n.push(s(e[t],l+1))}return r.delete(e),Object.freeze(n)}if(!o(e))return e;let d=Object.entries(e);if(d.length>g.maxItemsPerContainer)throw TypeError(`Style object must contain at most ${g.maxItemsPerContainer} properties`);let f=Object.create(null);for(let[i,o]of(t.set(e,f),r.add(e),d)){if(n.has(i))throw TypeError(`Style input uses forbidden key "${i}"`);if((a+=i.length)>g.maxAggregateTextCharacters)throw TypeError(`Style input exceeds the ${g.maxAggregateTextCharacters}-character text limit`);Object.defineProperty(f,i,{value:s(o,l+1),enumerable:!0,writable:!1,configurable:!1})}return r.delete(e),Object.freeze(f)};return s(e,0)}var V=Object.freeze(["fontSize","fontWeight","letterSpacing","textTransform","textColor"]),H=Object.freeze(["paddingX","paddingY","cornerRadius","lineWidth","fillColor","borderColor"]),U=(Object.freeze({text:Object.freeze({sourceRole:"label",fields:V}),node:Object.freeze({sourceRole:"node",fields:Object.freeze([...V,...H])}),edge:Object.freeze({sourceRole:"edge",fields:Object.freeze([...V,"lineWidth","bendRadius","strokeColor"])}),group:Object.freeze({sourceRole:"group",fields:Object.freeze([...V,...H,"fontFamily","headerFillColor"])})}),"1.0.0"),Z=Object.freeze({core:u}),K=Object.freeze({owner:"agentic-mermaid",source:"built-in",reference:"src/scene/style-registry.ts"}),Q=Object.freeze({owner:"host",source:"in-process"}),ee=new Map,et=new Map,er=class extends Error{constructor(e){super(e),this.name="StyleSpecError"}};function en(e){if(e)return Object.freeze(Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.freeze({...t})])))}function ei(e){if(e)return Object.freeze(Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.freeze({...t})])))}function ea(e){return e?Object.freeze(e.map(e=>Object.freeze({...e}))):void 0}function eo(e){if(!e)return;let{displayLabel:t,...r}=e;return Object.freeze({...r,formatVersion:1,...r.colors?{colors:Object.freeze({...r.colors})}:{},...r.roles?{roles:en(r.roles)}:{},...r.semanticSlots?{semanticSlots:ei(r.semanticSlots)}:{},...r.bindings?{bindings:ea(r.bindings)}:{},...r.constraints?{constraints:ea(r.constraints)}:{}})}function es(t,r="look",n=t.name??""){if(!t.name)throw Error("registerBuiltInStyle requires a name");let i=m(r,t.name),a=F(eo({...t,name:i}));if(a.length)throw Error(`Invalid built-in style "${i}": ${a.join("; ")}`);!function(t,r,n,i){let a=t.name,o=Object.freeze({...t,formatVersion:1,...t.colors?{colors:Object.freeze({...t.colors})}:{},...t.roles?{roles:en(t.roles)}:{},...t.semanticSlots?{semanticSlots:ei(t.semanticSlots)}:{},...t.bindings?{bindings:ea(t.bindings)}:{},...t.constraints?{constraints:ea(t.constraints)}:{}});if(e(ee,{identity:p({id:a,kind:r,version:n.version??U,compatibility:{...Z,...n.compatibility},provenance:n.provenance??Q}),value:o}),void 0!==i){let e=et.get(i),t=ee.has(i)&&i!==a?i:void 0;if(void 0!==e||void 0!==t)throw ee.delete(a),Error(`Style input name "${i}" already selects "${e??t}"`);et.set(i,a)}}({...t,name:i},r,{version:U,compatibility:Z,provenance:K},n)}function el(e){return ee.has(e)?e:et.get(e)}function ec(e){let t=el(e);if(!t)return;let r=eo(ee.get(t)?.value);if(r)return Object.freeze({canonicalId:t,spec:r})}function ed(e){return"freehand"===e.stroke||"wash"===e.fill?"hybrid":"jittered"===e.stroke||"hachure"===e.fill||void 0!==e.backdrop&&"plain"!==e.backdrop||void 0!==e.roughness||void 0!==e.bowing||void 0!==e.passes||void 0!==e.hachureGap||void 0!==e.hachureAngle||void 0!==e.fillWeight?"rough":"default"}function ef(e,t){if(!e&&!t)return;let r=[],n=new Set;for(let i of[...e??[],...t??[]]){let e=JSON.stringify(i);n.has(e)||(n.add(e),r.push(i))}return r}function eu(e){if(void 0===e)return;let t=Array.isArray(e)?e:[e],r=[];for(let e of t)if("string"==typeof e){let t=el(e);if("look:crisp"===t)continue;let n=t?ee.get(t)?.value:void 0;if(!n)throw new er(`Unknown style "${e}". Known styles: ${Object.freeze(Array.from(ee.values(),({identity:e,value:t})=>{let r=Array.from(et.entries()).find(([,t])=>t===e.id)?.[0]??e.id,n=e.id.slice(e.id.indexOf(":")+1),i=t.displayLabel??n.split("-").filter(Boolean).map(e=>"ops"===e?"OPS":e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return Object.freeze({identity:e,spec:eo(t),inputName:r,displayLabel:i,kind:e.kind,isDefault:"look:crisp"===e.id})})).map(e=>e.inputName).join(", ")}`);r.push(n)}else r.push(function(e){let t=q(e),r=F(t);if(r.length)throw new er(`Invalid style spec: ${r.join("; ")}`);return t}(e));if(0===r.length)return;let n={formatVersion:1};for(let e of r)for(let[t,r]of Object.entries(e))if(void 0!==r)if("colors"===t){let t={...n.colors};for(let[r,n]of Object.entries(e.colors??{}))void 0!==n&&(t[r]=n);n.colors=t}else"roles"===t?n.roles=function(e,t){if(!e&&!t)return;let r={...e};for(let[e,n]of Object.entries(t??{}))void 0!==n&&(r[e]={...r[e],...n});return r}(n.roles,e.roles):"semanticSlots"===t?n.semanticSlots=function(e,t){if(!e&&!t)return;let r={...e};for(let[e,n]of Object.entries(t??{}))r[e]={...r[e],...n};return r}(n.semanticSlots,e.semanticSlots):"bindings"===t?n.bindings=ef(n.bindings,e.bindings):"constraints"===t?n.constraints=ef(n.constraints,e.constraints):n[t]=r;return n}function em(e){return G(()=>{let t=eu(e);return t&&ep(t),eo(t)})}function ep(e){for(let[t,r]of(e.bindings??[]).entries()){let n=e.semanticSlots?.[r.slot];if(!n)throw new er(`Invalid style spec: binding ${t+1} references missing semantic slot "${r.slot}"`);let o=new Set(void 0===r.role?i:a.find(e=>e.role===r.role).style.applicableProperties);if(!Object.keys(n).some(e=>o.has(e)))throw new er(void 0===r.role?`Invalid style spec: semantic slot "${r.slot}" has no field applicable to any executable category-binding role`:`Invalid style spec: semantic slot "${r.slot}" has no field applicable to role "${r.role}"`)}let t=["hachureAngle","hachureGap","fillWeight"].filter(t=>void 0!==e[t]&&"hachure"!==e.fill);if(t.length>0)throw new er(`Invalid style spec: ${t.map(e=>`"${e}"`).join(", ")} require fill "hachure" in the final Style stack`);let r=["washOpacity","washEdge"].filter(t=>void 0!==e[t]&&"wash"!==e.fill);if(r.length>0)throw new er(`Invalid style spec: ${r.map(e=>`"${e}"`).join(", ")} require fill "wash" in the final Style stack`);if(void 0!==e.fill&&"default"===ed(e))throw new er('Invalid style spec: "fill" has no crisp/default backend projection; combine it with stroke "jittered"/"freehand" or another rough/hybrid backend field')}function eg(e){return G(()=>{let t=eu(e);if(void 0===t)return{};ep(t);let r=eo(t),n=function(e){let t=e.strokeWidth,r=e.roles?Object.fromEntries(Object.entries(e.roles).map(([e,t])=>[e,t?{...t}:void 0])):void 0,n={...void 0!==t&&t>0&&"default"===ed(e)?{lineWidth:t}:{},...r?.node},i={...void 0!==t&&t>0&&"default"===ed(e)?{lineWidth:t}:{},...r?.edge},a={...void 0!==t&&t>0&&"default"===ed(e)?{lineWidth:t}:{},...r?.group};if(!(!r&&!e.semanticSlots&&!e.bindings&&!e.constraints&&0===Object.keys(n).length&&0===Object.keys(i).length&&0===Object.keys(a).length))return{...r?{roles:en(r)}:{},...e.semanticSlots?{semanticSlots:ei(e.semanticSlots)}:{},...e.bindings?{bindings:ea(e.bindings)}:{},...e.constraints?{constraints:ea(e.constraints)}:{},...r?.label?{text:{...r.label}}:{},...Object.keys(n).length?{node:n}:{},...Object.keys(i).length?{edge:i}:{},...Object.keys(a).length?{group:a}:{}}}(t);return{...r?{style:r}:{},...n?{face:n}:{}}})}function eb(e){return"default"!==ed(e)||void 0!==e.colors||void 0!==e.font||void 0!==e.strokeWidth||void 0!==e.roles||void 0!==e.semanticSlots||void 0!==e.bindings||void 0!==e.constraints}for(let e of(es({name:"crisp",displayLabel:"Crisp",blurb:"The default renderer with precise SVG geometry.",stroke:"crisp"},"look"),Y)){let{inputName:t,colors:r}=e;if(m("palette",t)!==e.id)throw Error(`Built-in palette identity mismatch: ${e.id}`);es({name:t,displayLabel:e.displayLabel,blurb:`Palette: ${t}.`,colors:{bg:r.bg,fg:r.fg,line:r.line,accent:r.accent,muted:r.muted,surface:r.surface,border:r.border}},"palette",t)}es({name:"hand-drawn",displayLabel:"Hand-drawn",blurb:"Black ink on ruled paper — wobbly double strokes, unfilled boxes.",intent:"draft",colors:{bg:"#f7f5ef",fg:"#1a1a1e",line:"#26262b",accent:"#26262b",border:"#26262b"},font:"Caveat",stroke:"jittered",roughness:1,bowing:1,passes:2,strokeWidth:1.8,fill:"none",backdrop:"paper-ruled",mono:!0}),es({name:"excalidraw",displayLabel:"Excalidraw",blurb:"Virtual whiteboard style — rough strokes, pastel hachure fills.",intent:"draft",colors:{bg:"#ffffff",fg:"#1e1e1e",line:"#1e1e1e",accent:"#4263eb",surface:"#f1f3f5"},font:"Caveat",stroke:"jittered",roughness:1.1,bowing:1.2,passes:2,strokeWidth:1.6,fill:"hachure",hachureAngle:-41,hachureGap:5.5,fillWeight:.9}),es({name:"pen-and-ink",displayLabel:"Pen & ink",blurb:"Fine single-pass linework on warm cream — no interior hatching.",intent:"premium",colors:{bg:"#faf6ec",fg:"#241f1a",line:"#2b241d",accent:"#2b241d",border:"#2b241d"},font:"EB Garamond",stroke:"jittered",roughness:.5,bowing:.6,passes:1,strokeWidth:1.5,fill:"none",mono:!0}),es({name:"freehand",displayLabel:"Freehand",blurb:"Pressure-sensitive marker ribbons — variable-width filled strokes.",intent:"draft",colors:{bg:"#fbfaf7",fg:"#16161a",line:"#1d1d22",accent:"#1d1d22",border:"#1d1d22"},font:"Architects Daughter",stroke:"freehand",roughness:.9,passes:1,strokeWidth:1.6,fill:"none",mono:!0}),es({name:"watercolor",displayLabel:"Watercolor",blurb:"Rough outlines over translucent glazes with pigment-pooled edges.",intent:"premium",colors:{bg:"#fdfbf6",fg:"#31302c",line:"#4d4a44",accent:"#7a6a52",surface:"#ead9b9",border:"#5a564e"},font:"Caveat",stroke:"jittered",roughness:.9,bowing:.8,passes:1,strokeWidth:1.5,fill:"wash",washOpacity:.3,washEdge:.34}),es({name:"blueprint",displayLabel:"Blueprint",blurb:"Cyanotype: white linework on Prussian blue with a drafting grid.",intent:"premium",colors:{bg:"#123a63",fg:"#eaf2fb",line:"#dbe9f7",accent:"#ffffff",muted:"#b8cfe6",surface:"#1c4a78",border:"#dbe9f7"},font:"Share Tech Mono",stroke:"jittered",roughness:.4,bowing:.4,passes:1,strokeWidth:1.4,fill:"none",backdrop:"grid",mono:!0}),es({name:"tufte",displayLabel:"Tufte",blurb:"Maximal data-ink: crisp hairlines, warm paper, one red accent.",intent:"premium",colors:{bg:"#fffff8",fg:"#111111",line:"#4a4a45",accent:"#a00000",muted:"#6b6b64",border:"#8a8a80"},font:"EB Garamond",roles:{node:{lineWidth:.8,cornerRadius:0},edge:{lineWidth:.8},group:{lineWidth:.8}},mono:!0},"look","look:tufte"),es({name:"accessible-high-contrast",displayLabel:"Accessible Contrast",blurb:"Accessibility-first: large labels, heavy strokes, white ground, colorblind-safe blue accent.",intent:"premium",colors:{bg:"#ffffff",fg:"#050505",line:"#111111",accent:"#005fcc",muted:"#333333",surface:"#ffffff",border:"#050505"},roles:{node:{fontSize:17,fontWeight:700,textColor:"var(--fg)",paddingX:28,paddingY:16,cornerRadius:8,lineWidth:2.4,borderColor:"var(--fg)"},edge:{fontSize:14,fontWeight:700,textColor:"var(--fg)",lineWidth:2.6,bendRadius:10,strokeColor:"var(--fg)"},group:{fontSize:14,fontWeight:700,textColor:"var(--fg)",paddingX:24,paddingY:22,cornerRadius:8,lineWidth:2.2,borderColor:"var(--fg)"}}}),es({name:"patent-drawing",displayLabel:"Patent Hatching",blurb:"Print-safe patent figure: uniform ink, strong outlines, tone via oblique hatching.",intent:"premium",colors:{bg:"#ffffff",fg:"#111111",line:"#111111",accent:"#111111",muted:"#444444",surface:"#ffffff",border:"#111111"},font:"EB Garamond",stroke:"jittered",roughness:.3,bowing:.2,passes:1,strokeWidth:1.35,fill:"hachure",hachureAngle:-50,hachureGap:7,fillWeight:.65,roles:{node:{fontSize:14,fontWeight:600,textColor:"var(--fg)",paddingX:24,paddingY:13,lineWidth:1.35,cornerRadius:0,borderColor:"var(--fg)"},edge:{fontSize:12,textColor:"var(--fg)",lineWidth:1.45,bendRadius:0,strokeColor:"var(--fg)"},group:{fontSize:12,fontWeight:700,textColor:"var(--fg)",paddingX:22,paddingY:18,lineWidth:1.35,cornerRadius:0,borderColor:"var(--fg)"}},mono:!0}),es({name:"status-dashboard",displayLabel:"Dark Ops Dashboard",blurb:"Operational dashboard: dark surface, rounded modules, bright status-friendly accent.",intent:"premium",colors:{bg:"#08111f",fg:"#e6f4ff",line:"#5a7c99",accent:"#2dd4bf",muted:"#8aa6bf",surface:"#102033",border:"#2e4c63"},roles:{node:{fontSize:14,fontWeight:700,textColor:"var(--fg)",paddingX:24,paddingY:13,cornerRadius:10,lineWidth:1.4,borderColor:"var(--fg)"},edge:{fontSize:12,fontWeight:600,textColor:"var(--fg)",lineWidth:2,bendRadius:14,strokeColor:"var(--fg)"},group:{fontSize:13,fontWeight:700,textColor:"var(--fg)",textTransform:"uppercase",letterSpacing:.06,paddingX:22,paddingY:20,cornerRadius:10,lineWidth:1.3,borderColor:"var(--fg)"}}}),es({name:"ops-schematic",displayLabel:"Compact Trace Map",blurb:"Dense operational schematic: compact mono labels, sturdy traces, theme-friendly geometry.",intent:"lofi",colors:{bg:"#f8faf7",fg:"#17211c",line:"#24523b",accent:"#0f766e",muted:"#4f665a",surface:"#f0f5ef",border:"#24523b"},font:"Share Tech Mono",stroke:"jittered",roughness:.18,bowing:.2,passes:1,strokeWidth:1.6,fill:"none",roles:{node:{fontSize:12,fontWeight:700,textTransform:"uppercase",textColor:"var(--fg)",paddingX:16,paddingY:8,cornerRadius:2,lineWidth:1.6,borderColor:"var(--fg)"},edge:{fontSize:10,fontWeight:700,textTransform:"uppercase",textColor:"var(--fg)",lineWidth:1.8,bendRadius:0,strokeColor:"var(--fg)"},group:{fontSize:11,fontWeight:700,textColor:"var(--fg)",textTransform:"uppercase",letterSpacing:.05,paddingX:16,paddingY:16,cornerRadius:2,lineWidth:1.5,borderColor:"var(--fg)"}}}),es({name:"chalkboard",displayLabel:"Chalkboard",blurb:"Classroom chalkboard: dusty off-white strokes on green slate.",intent:"draft",colors:{bg:"#17362f",fg:"#f5f1df",line:"#ece6cf",accent:"#ffe08a",muted:"#c7d2c4",surface:"#17362f",border:"#f3ecd5"},font:"Caveat",stroke:"jittered",roughness:1.25,bowing:1,passes:2,strokeWidth:1.9,fill:"none",roles:{node:{fontSize:16,fontWeight:700,textColor:"var(--fg)",paddingX:24,paddingY:12,borderColor:"var(--fg)"},edge:{fontSize:13,textColor:"var(--fg)",lineWidth:1.8,strokeColor:"var(--fg)"},group:{fontSize:14,fontWeight:700,textColor:"var(--fg)",paddingX:20,paddingY:20,lineWidth:1.7,borderColor:"var(--fg)"}},mono:!0}),es({name:"risograph",displayLabel:"Riso Print",blurb:"Two-ink poster print: warm stock, offset blue linework, coral accent, coarse hachure.",intent:"premium",colors:{bg:"#fff5df",fg:"#2b2725",line:"#1f3d5a",accent:"#ff5a5f",muted:"#876a52",surface:"#ffd166",border:"#1f3d5a"},font:"EB Garamond",stroke:"jittered",roughness:.7,bowing:.55,passes:1,strokeWidth:1.5,fill:"hachure",hachureAngle:18,hachureGap:6.5,fillWeight:.75,roles:{node:{fontSize:14,fontWeight:700,textColor:"var(--fg)",paddingX:24,paddingY:13,cornerRadius:3,borderColor:"var(--fg)"},edge:{fontSize:12,textColor:"var(--fg)",lineWidth:1.5,strokeColor:"var(--fg)"},group:{fontSize:13,fontWeight:700,textColor:"var(--fg)",paddingX:22,paddingY:18,cornerRadius:3,borderColor:"var(--fg)"}}}),es({name:"architectural-plan",displayLabel:"Plan Drafting",blurb:"Architectural plan: square technical linework, uppercase mono labels, room-like frames.",intent:"premium",colors:{bg:"#fbf7ea",fg:"#202a2f",line:"#38535e",accent:"#1f6f8b",muted:"#60727a",surface:"#fffaf0",border:"#38535e"},font:"Share Tech Mono",stroke:"jittered",roughness:.18,bowing:.25,passes:1,strokeWidth:1.45,fill:"none",roles:{node:{fontSize:12,fontWeight:700,textTransform:"uppercase",textColor:"var(--fg)",paddingX:20,paddingY:10,cornerRadius:0,lineWidth:1.45,borderColor:"var(--fg)"},edge:{fontSize:10,fontWeight:700,textTransform:"uppercase",textColor:"var(--fg)",lineWidth:1.55,bendRadius:0,strokeColor:"var(--fg)"},group:{fontSize:11,fontWeight:700,textColor:"var(--fg)",textTransform:"uppercase",letterSpacing:.06,paddingX:20,paddingY:20,cornerRadius:0,lineWidth:1.45,borderColor:"var(--fg)"}}}),es({name:"publication-figure",displayLabel:"Report Figure",blurb:"Polished publication figure: serif labels, confident rules, rounded boxes, one quiet accent.",intent:"premium",colors:{bg:"#fffdf8",fg:"#171512",line:"#24211d",accent:"#1d4ed8",muted:"#5f5a52",surface:"#faf5ea",border:"#24211d"},font:"EB Garamond",strokeWidth:1.45,roles:{node:{fontSize:15,fontWeight:700,textColor:"var(--fg)",paddingX:26,paddingY:14,cornerRadius:7,lineWidth:1.45,borderColor:"var(--fg)"},edge:{fontSize:12,fontWeight:600,textColor:"var(--fg)",lineWidth:1.45,bendRadius:8,strokeColor:"var(--fg)"},group:{fontSize:12,fontWeight:700,textColor:"var(--fg)",textTransform:"uppercase",letterSpacing:.08,paddingX:24,paddingY:22,cornerRadius:7,lineWidth:1.35,borderColor:"var(--fg)"}}});export{g as a,b as b,y as c,k as d,x as e,v as f,O as g,C as h,J as i,G as j,q as k,ec as l,ed as m,em as n,eg as o,eb as p};
|
|
1
|
+
import{Ba as e,Ca as t,Da as r,Ea as n,Fa as i,Ga as a,Ia as o,a as s,b as l,c as c,ia as d,ka as f,na as u,ya as m,za as p}from"./chunk-IARQ24W3.js";var g=Object.freeze({maxDepth:64,maxNodes:1e5,maxItemsPerContainer:4096,maxAggregateTextCharacters:5e6,maxAggregateTextBytes:1e7,maxDiagnostics:64});function b(e){return"__proto__"===e||"prototype"===e||"constructor"===e}function h(e){return"number"==typeof e?"must be a finite number":`must be a JSON value, not ${typeof e}`}function y(e,t=[],r={}){let n=[],i=new WeakSet,a=[{kind:"visit",value:e,path:t,depth:0}],o=0,l=0,d=0,f=!1,u=(e,r,i,a=!1)=>{if(!f){if(n.length>=g.maxDiagnostics-1){n.push({code:"JSON_DIAGNOSTIC_LIMIT",path:t,message:`exceeds the ${g.maxDiagnostics}-diagnostic admission limit`}),f=!0;return}n.push({code:e,path:r,message:i}),a&&(f=!0)}},m=(e,t)=>{if(f)return;if((l+=e.length)>g.maxAggregateTextCharacters)return void u("JSON_TEXT_CHARACTER_LIMIT",t,`exceeds the aggregate ${g.maxAggregateTextCharacters}-character text limit`,!0);let r=g.maxAggregateTextBytes-d;(d+=c(e,Math.max(0,r)))>g.maxAggregateTextBytes&&u("JSON_TEXT_BYTE_LIMIT",t,`exceeds the aggregate ${g.maxAggregateTextBytes}-byte UTF-8 text limit`,!0)};for(;a.length>0&&!f;){let e=a.pop();if("exit"===e.kind){i.delete(e.value);continue}if(e.depth>g.maxDepth){u("JSON_DEPTH_LIMIT",e.path,`exceeds maximum nesting depth ${g.maxDepth}`,!0);continue}if(++o>g.maxNodes){u("JSON_NODE_LIMIT",e.path,`exceeds the aggregate ${g.maxNodes}-node limit`,!0);continue}let t=e.value;if(null===t||"boolean"==typeof t)continue;if("string"==typeof t){m(t,e.path);continue}if("number"==typeof t){Number.isFinite(t)||u("JSON_NON_JSON_VALUE",e.path,h(t));continue}if("object"!=typeof t){u("JSON_NON_JSON_VALUE",e.path,h(t));continue}if(i.has(t)){u("JSON_CYCLE",e.path,"must be acyclic");continue}if(Array.isArray(t)){if(t.length>g.maxItemsPerContainer){u("JSON_ITEM_LIMIT",e.path,`must contain at most ${g.maxItemsPerContainer} items`,!0);continue}i.add(t),a.push({kind:"exit",value:t});for(let r=t.length-1;r>=0;r--){if(!Object.prototype.hasOwnProperty.call(t,r)){u("JSON_SPARSE_ARRAY",[...e.path,r],"must not be a sparse array");continue}a.push({kind:"visit",value:t[r],path:[...e.path,r],depth:e.depth+1})}continue}if(!s(t)){u("JSON_NON_PLAIN_OBJECT",e.path,"must be a plain JSON object");continue}let n=Object.entries(t);if(n.length>g.maxItemsPerContainer){u("JSON_ITEM_LIMIT",e.path,`must contain at most ${g.maxItemsPerContainer} properties`,!0);continue}i.add(t),a.push({kind:"exit",value:t});for(let t=n.length-1;t>=0;t--){let[i,o]=n[t],s=[...e.path,i];if(m(i,s),b(i)){u("JSON_PROTOTYPE_KEY",s,"uses a forbidden prototype key");continue}void 0===o&&r.allowUndefinedObjectProperties||a.push({kind:"visit",value:o,path:s,depth:e.depth+1})}}return n}var k=class extends TypeError{constructor(e,t){super(`${e} failed JSON/config admission: ${t.map(e=>`${function(e){let t="$";for(let r of e)"number"==typeof r?t+=`[${r}]`:/^[A-Za-z_$][\w$]*$/.test(r)?t+=`.${r}`:t+=`[${JSON.stringify(r)}]`;return t}(e.path)} ${e.message}`).join("; ")}`),this.context=e,this.problems=t,this.name="JsonConfigAdmissionError"}context;problems;code="JSON_CONFIG_ADMISSION_FAILED"};function v(e,t,r={}){let n=y(e,[],r);if(n.length>0)throw new k(t,n)}function x(e,t,r={}){let n=[];if(e.length>g.maxAggregateTextCharacters?n.push({code:"JSON_TEXT_CHARACTER_LIMIT",path:[],message:`exceeds the aggregate ${g.maxAggregateTextCharacters}-character text limit`}):c(e,g.maxAggregateTextBytes)>g.maxAggregateTextBytes&&n.push({code:"JSON_TEXT_BYTE_LIMIT",path:[],message:`exceeds the aggregate ${g.maxAggregateTextBytes}-byte UTF-8 text limit`}),0===n.length&&r.trackFlowDepth){let t=[],r,i=!1,a=!1;for(let o=0;o<e.length;o++){let s=e[o];if(a){(s===`
|
|
2
|
+
`||"\r"===s)&&(a=!1);continue}if(r){if('"'===r&&i){i=!1;continue}if('"'===r&&"\\"===s){i=!0;continue}if("'"===r&&"'"===s&&"'"===e[o+1]){o++;continue}s===r&&(r=void 0);continue}if('"'===s||"'"===s){r=s;continue}if("#"===s){a=!0;continue}if("{"===s||"["===s){if(t.push(s),t.length>g.maxDepth){n.push({code:"JSON_DEPTH_LIMIT",path:[],message:`exceeds maximum nesting depth ${g.maxDepth}`});break}}else("}"===s||"]"===s)&&t.pop()}}if(n.length>0)throw new k(t,n)}function O(e,t){let r=g.maxDiagnostics;return e.length<=r?[...e]:[...e.slice(0,r-1),`${t} exceeds the ${r}-diagnostic admission limit`]}var j=Object.freeze({contrast:Object.freeze({properties:Object.freeze({role:Object.freeze({kind:"role"}),minimum:Object.freeze({kind:"number",minimum:1,maximum:21})}),recovery:"Choose an authored text/surface pair that meets the requested ratio, or remove the rule; the renderer will not repaint it."}),"accent-area":Object.freeze({properties:Object.freeze({maxFraction:Object.freeze({kind:"number",minimum:0,maximum:1,required:!0})}),recovery:"Reduce authored accent-filled area or raise the declared maximum; the renderer will not rewrite fills."}),"mono-role":Object.freeze({properties:Object.freeze({role:Object.freeze({kind:"role",required:!0})}),recovery:"Use measurable monochrome paint for the named role or remove the rule; the renderer will not rewrite paint."})}),S=Object.freeze(Object.keys(j));function w(e){return j[e].properties}var C=Object.freeze({warn:Object.freeze({code:"BRAND_CONSTRAINT_WARNING",severity:"warning",tier:"lint"}),error:Object.freeze({code:"BRAND_CONSTRAINT_ERROR",severity:"error",tier:"lint"})}),$=l({bg:{},fg:{},line:{},accent:{},muted:{},surface:{},border:{}}),z=Object.freeze(["category"]),T=l({formatVersion:{kind:"const",value:1},$schema:{kind:"string"},name:{kind:"string"},blurb:{kind:"string"},colors:{kind:"colors"},font:{kind:"string",runtimeValidator:"safeCssFontFamily"},roles:{kind:"roles"},semanticSlots:{kind:"semanticSlots"},bindings:{kind:"bindings"},constraints:{kind:"constraints"},stroke:{kind:"enum",values:["crisp","jittered","freehand"]},roughness:{kind:"number",minimum:0,maximum:10,expected:"between 0 and 10"},bowing:{kind:"number",minimum:0,maximum:10,expected:"between 0 and 10"},passes:{kind:"integer",minimum:1,maximum:8,expected:"an integer from 1 through 8"},strokeWidth:{kind:"number",exclusiveMinimum:0,maximum:20,expected:"greater than 0 and at most 20"},fill:{kind:"enum",values:["none","hachure","solid","wash"]},hachureAngle:{kind:"number",minimum:-360,maximum:360,expected:"between -360 and 360"},hachureGap:{kind:"number",exclusiveMinimum:0,maximum:100,expected:"greater than 0 and at most 100"},fillWeight:{kind:"number",exclusiveMinimum:0,maximum:20,expected:"greater than 0 and at most 20"},washOpacity:{kind:"number",minimum:0,maximum:1,expected:"between 0 and 1"},washEdge:{kind:"number",minimum:0,maximum:1,expected:"between 0 and 1"},backdrop:{kind:"enum",values:["plain","paper-ruled","grid"]},intent:{kind:"enum",values:["premium","draft","lofi"]},mono:{kind:"boolean"}});function A(e,t){return!("number"!=typeof e||!Number.isFinite(e)||"integer"===t.kind&&!Number.isInteger(e)||void 0!==t.minimum&&e<t.minimum||void 0!==t.exclusiveMinimum&&e<=t.exclusiveMinimum||void 0!==t.maximum&&e>t.maximum)}var N=new Set(Object.freeze(["--bg","--fg","--_text","--_text-sec","--_text-muted","--_text-faint","--_line","--_arrow","--_node-fill","--_node-stroke","--_group-fill","--_group-hdr","--_inner-stroke","--_key-badge"])),W=new Map(o.map(e=>[e.role,e])),_=n.map(e=>W.get(e)),E=new Set(i),I=/^[A-Za-z][A-Za-z0-9._-]{0,63}$/,L=new Set(["__proto__","constructor","prototype"]);function P(e,t,n){if(!s(e))return[`"${t}" must be an object`];let i=[];for(let[a,o]of Object.entries(e)){if(!Object.hasOwn(r,a)){i.push(`unknown role style field "${t.slice(t.indexOf(".")+1)}.${a}"`);continue}if(n&&!n.has(a)){i.push(`role style field "${t}.${a}" is not applicable`);continue}let e=r[a],s=`${t}.${a}`;void 0!==o&&("number"!==e.kind||A(o,e)?"font"===e.kind&&("string"!=typeof o||void 0===d(o))?i.push(`"${s}" must be a safe non-fetching CSS font family or stack`):"color"!==e.kind||"string"==typeof o&&void 0!==u(o)&&[...o.matchAll(/var\(\s*(--[a-z0-9_-]+)/gi)].map(e=>e[1]).every(e=>N.has(e))?"enum"!==e.kind||"string"==typeof o&&e.values.includes(o)||i.push(`"${s}" must be one of ${e.values.join(" | ")}`):i.push(`"${s}" must be a safe non-fetching CSS paint`):i.push(`"${s}" must be ${e.expected}`))}return i}function R(e){return"string"==typeof e&&I.test(e)&&!L.has(e)}function F(e){if(!s(e))return["style spec must be a plain object"];if(Object.keys(e).length>g.maxItemsPerContainer)return[`style spec must contain at most ${g.maxItemsPerContainer} fields`];let t=[];for(let[r,n]of Object.entries(e)){if(!Object.hasOwn(T,r)){t.push(`unknown field "${r}"`);continue}let e=T[r];if(void 0!==n)switch(e.kind){case"const":n!==e.value&&t.push(`"${r}" must be ${e.value}`);break;case"string":"string"!=typeof n?t.push(`"${r}" must be a string`):"safeCssFontFamily"===e.runtimeValidator&&void 0===d(n)&&t.push(`"${r}" must be a safe non-fetching CSS font family or stack`);break;case"boolean":"boolean"!=typeof n&&t.push(`"${r}" must be a boolean`);break;case"number":case"integer":A(n,e)||t.push(`"${r}" must be ${e.expected}`);break;case"enum":"string"==typeof n&&e.values.includes(n)||t.push(`"${r}" must be one of ${e.values.join(" | ")}`);break;case"roles":t.push(...function(e){if(!s(e))return['"roles" must be an object of SceneRole records'];let t=[];for(let[r,n]of Object.entries(e)){let e=W.get(r);if(!e){t.push(`unknown scene role "${r}"`);continue}if("fallback-only"===e.traits.styleConsumption){t.push(`scene role "${r}" is fallback-only; set roles.${e.style.fallbackRole} instead`);continue}let i=P(n,`roles.${r}`,new Set(e.style.applicableProperties)).map(e=>e===`"roles.${r}" must be an object`?e:e.replace(`role style field "roles.${r}.`,`role style field "${r}.`).replace('" is not applicable',`" is not applicable to ${r} roles`));t.push(...i)}return t}(n));break;case"semanticSlots":t.push(...function(e){if(!s(e))return['"semanticSlots" must be an object of named role-style slots'];if(Object.keys(e).length>g.maxItemsPerContainer)return[`"semanticSlots" must contain at most ${g.maxItemsPerContainer} slots`];let t=[];for(let[r,n]of Object.entries(e)){if(!R(r)){t.push(`invalid semantic slot name "${r}"`);continue}t.push(...P(n,`semanticSlots.${r}`))}return t}(n));break;case"bindings":t.push(...function(e){if(!Array.isArray(e))return['"bindings" must be an array'];if(e.length>g.maxItemsPerContainer)return[`"bindings" must contain at most ${g.maxItemsPerContainer} entries`];let t=[];return e.forEach((e,r)=>{let n=`bindings[${r}]`;if(!s(e))return void t.push(`"${n}" must be an object`);for(let r of Object.keys(e))["channel","value","slot","role"].includes(r)||t.push(`unknown binding field "${n}.${r}"`);"string"==typeof e.channel&&z.includes(e.channel)||t.push(`"${n}.channel" must be one of ${z.join(" | ")}`),("string"!=typeof e.value||0===e.value.length||e.value.length>256||/[\r\n\0]/.test(e.value))&&t.push(`"${n}.value" must be a non-empty single-line string of at most 256 characters`),R(e.slot)||t.push(`"${n}.slot" must be a valid semantic slot name`),void 0===e.role||E.has(e.role)||t.push(`"${n}.role" must be a SceneRole with an executable category-binding consumer (${i.join(" | ")})`)}),t}(n));break;case"constraints":t.push(...function(e){if(!Array.isArray(e))return['"constraints" must be an array'];if(e.length>g.maxItemsPerContainer)return[`"constraints" must contain at most ${g.maxItemsPerContainer} entries`];let t=[];return e.forEach((e,r)=>{let n=`constraints[${r}]`;if(!s(e))return void t.push(`"${n}" must be an object`);if("string"!=typeof e.kind||!S.includes(e.kind))return void t.push(`"${n}.kind" must be one of ${S.join(" | ")}`);let i=e.kind,a=w(i),o=new Set(Object.freeze(["kind","action",...Object.keys(j[i].properties)]));for(let r of Object.keys(e))o.has(r)||t.push(`unknown constraint field "${n}.${r}"`);for(let[r,o]of("warn"!==e.action&&"error"!==e.action&&t.push(`"${n}.action" must be one of warn | error`),Object.entries(a))){let a=e[r];if(void 0===a){o.required&&t.push(`"${n}.${r}" is required for ${i}`);continue}"role"!==o.kind||W.has(a)?"number"!==o.kind||A(a,o)||t.push(`"${n}.${r}" must be between ${o.minimum} and ${o.maximum}`):t.push(`"${n}.${r}" must be a registered built-in SceneRole`)}}),t}(n));break;case"colors":if(!s(n)){t.push('"colors" must be an object of color tokens');break}for(let[e,r]of Object.entries(n))Object.hasOwn($,e)?void 0!==r&&"string"!=typeof r?t.push(`color token "${e}" must be a string`):void 0!==r&&void 0===f(r)&&t.push(`color token "${e}" must be a safe non-fetching CSS color`):t.push(`unknown color token "${e}"`)}}return O(t,"Style validation")}function D(e=Object.keys(r)){let t=Object.fromEntries(Object.entries(r).map(([e,t])=>"number"===t.kind?[e,{type:"number",...void 0!==t.minimum?{minimum:t.minimum}:{},...void 0!==t.exclusiveMinimum?{exclusiveMinimum:t.exclusiveMinimum}:{},...void 0!==t.maximum?{maximum:t.maximum}:{}}]:"enum"===t.kind?[e,{type:"string",enum:[...t.values]}]:[e,{type:"string","x-agentic-mermaid-runtime-validator":"font"===t.kind?"safeCssFontFamily":"safeStylePaint"}]));return{type:"object",additionalProperties:!1,maxProperties:e.length,properties:Object.fromEntries(e.map(e=>[e,t[e]]))}}function M(e){return`roleStyle-${e.role}`}var B="^[A-Za-z][A-Za-z0-9._-]{0,63}$";function J(){let e=Object.fromEntries(_.map(e=>[M(e),D(e.style.applicableProperties)]));return{type:"object",additionalProperties:!1,maxProperties:Object.keys(T).length,properties:Object.fromEntries(Object.entries(T).map(([e,t])=>[e,function(e){switch(e.kind){case"const":return{const:e.value};case"string":return{type:"string",...e.runtimeValidator?{"x-agentic-mermaid-runtime-validator":e.runtimeValidator}:{}};case"boolean":return{type:"boolean"};case"enum":return{type:"string",enum:[...e.values]};case"number":case"integer":return{type:e.kind,...void 0!==e.minimum?{minimum:e.minimum}:{},...void 0!==e.exclusiveMinimum?{exclusiveMinimum:e.exclusiveMinimum}:{},...void 0!==e.maximum?{maximum:e.maximum}:{}};case"roles":return{type:"object",additionalProperties:!1,properties:Object.fromEntries(_.map(e=>[e.role,{$ref:`#/$defs/${M(e)}`}]))};case"semanticSlots":return{type:"object",maxProperties:g.maxItemsPerContainer,propertyNames:{pattern:B,not:{enum:[...L]}},additionalProperties:{$ref:"#/$defs/roleStyle-any"}};case"bindings":return{type:"array",maxItems:g.maxItemsPerContainer,items:{type:"object",additionalProperties:!1,maxProperties:4,required:["channel","value","slot"],properties:{channel:{type:"string",enum:[...z]},value:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\r\\n\\u0000]+$"},slot:{type:"string",pattern:B,not:{enum:[...L]}},role:{type:"string",enum:[...i]}}}};case"constraints":{let e={type:"string",enum:["warn","error"]},t={type:"string",enum:o.map(e=>e.role)},r=S.map(r=>{let n=Object.fromEntries(Object.entries(w(r)).map(([e,r])=>[e,"role"===r.kind?t:{type:"number",minimum:r.minimum,maximum:r.maximum}]));return{type:"object",additionalProperties:!1,required:[...Object.freeze(["kind","action",...Object.entries(w(r)).filter(([,e])=>!0===e.required).map(([e])=>e)])],properties:{kind:{const:r},action:e,...n}}});return{type:"array",maxItems:g.maxItemsPerContainer,items:{oneOf:r}}}case"colors":return{type:"object",additionalProperties:!1,maxProperties:Object.keys($).length,properties:Object.fromEntries(Object.entries($).map(([e,t])=>[e,{type:"string","x-agentic-mermaid-runtime-validator":"safeCssColor"}]))}}}(t)])),$defs:{...e,"roleStyle-any":D()}}}var Y=Object.freeze([{id:"palette:paper",inputName:"paper",displayLabel:"Paper",colors:{bg:"#F5F0E4",fg:"#221E16",accent:"#9A4A24"}},{id:"palette:dusk",inputName:"dusk",displayLabel:"Dusk",colors:{bg:"#2A2521",fg:"#E9DFCC",accent:"#CC8A57"}},{id:"palette:zinc-light",inputName:"zinc-light",displayLabel:"Zinc Light",colors:{bg:"#FFFFFF",fg:"#27272A"}},{id:"palette:zinc-dark",inputName:"zinc-dark",displayLabel:"Zinc Dark",colors:{bg:"#18181B",fg:"#FAFAFA"}},{id:"palette:tokyo-night",inputName:"tokyo-night",displayLabel:"Tokyo Night",colors:{bg:"#1a1b26",fg:"#a9b1d6",line:"#3d59a1",accent:"#7aa2f7",muted:"#565f89"}},{id:"palette:tokyo-night-storm",inputName:"tokyo-night-storm",displayLabel:"Tokyo Night Storm",colors:{bg:"#24283b",fg:"#a9b1d6",line:"#3d59a1",accent:"#7aa2f7",muted:"#565f89"}},{id:"palette:tokyo-night-light",inputName:"tokyo-night-light",displayLabel:"Tokyo Night Light",colors:{bg:"#d5d6db",fg:"#343b58",line:"#34548a",accent:"#34548a",muted:"#9699a3"}},{id:"palette:catppuccin-mocha",inputName:"catppuccin-mocha",displayLabel:"Catppuccin Mocha",colors:{bg:"#1e1e2e",fg:"#cdd6f4",line:"#585b70",accent:"#cba6f7",muted:"#6c7086"}},{id:"palette:catppuccin-latte",inputName:"catppuccin-latte",displayLabel:"Catppuccin Latte",colors:{bg:"#eff1f5",fg:"#4c4f69",line:"#9ca0b0",accent:"#8839ef",muted:"#9ca0b0"}},{id:"palette:nord",inputName:"nord",displayLabel:"Nord",colors:{bg:"#2e3440",fg:"#d8dee9",line:"#4c566a",accent:"#88c0d0",muted:"#616e88"}},{id:"palette:nord-light",inputName:"nord-light",displayLabel:"Nord Light",colors:{bg:"#eceff4",fg:"#2e3440",line:"#aab1c0",accent:"#5e81ac",muted:"#7b88a1"}},{id:"palette:dracula",inputName:"dracula",displayLabel:"Dracula",colors:{bg:"#282a36",fg:"#f8f8f2",line:"#6272a4",accent:"#bd93f9",muted:"#6272a4"}},{id:"palette:github-light",inputName:"github-light",displayLabel:"GitHub Light",colors:{bg:"#ffffff",fg:"#1f2328",line:"#d1d9e0",accent:"#0969da",muted:"#59636e"}},{id:"palette:github-dark",inputName:"github-dark",displayLabel:"GitHub Dark",colors:{bg:"#0d1117",fg:"#e6edf3",line:"#3d444d",accent:"#4493f8",muted:"#9198a1"}},{id:"palette:solarized-light",inputName:"solarized-light",displayLabel:"Solarized Light",colors:{bg:"#fdf6e3",fg:"#657b83",line:"#93a1a1",accent:"#268bd2",muted:"#93a1a1"}},{id:"palette:solarized-dark",inputName:"solarized-dark",displayLabel:"Solarized Dark",colors:{bg:"#002b36",fg:"#839496",line:"#586e75",accent:"#268bd2",muted:"#586e75"}},{id:"palette:one-dark",inputName:"one-dark",displayLabel:"One Dark",colors:{bg:"#282c34",fg:"#abb2bf",line:"#4b5263",accent:"#c678dd",muted:"#5c6370"}},{id:"palette:salmon",inputName:"salmon",displayLabel:"Salmon",colors:{bg:"#FFFBF5",fg:"#521000",line:"#C9A88A",accent:"#FF4801",muted:"#85532E",surface:"#FFFDFB",border:"#D4B89E"}},{id:"palette:salmon-dark",inputName:"salmon-dark",displayLabel:"Salmon Dark",colors:{bg:"#1F1008",fg:"#F5DCC8",line:"#6B4A2E",accent:"#FF6B35",muted:"#A07858",surface:"#2A1810",border:"#5A3A22"}},{id:"palette:tufte-dark",inputName:"tufte-dark",displayLabel:"Tufte Dark",colors:{bg:"#1C1C1A",fg:"#E8E4DC",line:"#666660",accent:"#C87070",muted:"#908880",surface:"#2A2926",border:"#444440"}}]),X=0;function G(e){X++;try{return e()}finally{X--}}function q(e){let t=new WeakMap,r=new WeakSet,n=new Set(["__proto__","prototype","constructor"]),i=0,a=0,o=(e,l)=>{if(l>g.maxDepth)throw TypeError(`Style input exceeds maximum nesting depth ${g.maxDepth}`);if(++i>g.maxNodes)throw TypeError(`Style input exceeds the ${g.maxNodes}-node limit`);if("string"==typeof e){if((a+=e.length)>g.maxAggregateTextCharacters)throw TypeError(`Style input exceeds the ${g.maxAggregateTextCharacters}-character text limit`);return e}if("object"!=typeof e||null===e)return e;if(r.has(e))throw TypeError("Style input must be acyclic");let c=t.get(e);if(void 0!==c)return c;if(Array.isArray(e)){if(e.length>g.maxItemsPerContainer)throw TypeError(`Style array must contain at most ${g.maxItemsPerContainer} items`);let n=[];t.set(e,n),r.add(e);for(let t=0;t<e.length;t++){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("Style arrays must not be sparse");n.push(o(e[t],l+1))}return r.delete(e),Object.freeze(n)}if(!s(e))return e;let d=Object.entries(e);if(d.length>g.maxItemsPerContainer)throw TypeError(`Style object must contain at most ${g.maxItemsPerContainer} properties`);let f=Object.create(null);for(let[i,s]of(t.set(e,f),r.add(e),d)){if(n.has(i))throw TypeError(`Style input uses forbidden key "${i}"`);if((a+=i.length)>g.maxAggregateTextCharacters)throw TypeError(`Style input exceeds the ${g.maxAggregateTextCharacters}-character text limit`);Object.defineProperty(f,i,{value:o(s,l+1),enumerable:!0,writable:!1,configurable:!1})}return r.delete(e),Object.freeze(f)};return o(e,0)}var V=Object.freeze(["fontSize","fontWeight","letterSpacing","textTransform","textColor"]),H=Object.freeze(["paddingX","paddingY","cornerRadius","lineWidth","fillColor","borderColor"]),U=(Object.freeze({text:Object.freeze({sourceRole:"label",fields:V}),node:Object.freeze({sourceRole:"node",fields:Object.freeze([...V,...H])}),edge:Object.freeze({sourceRole:"edge",fields:Object.freeze([...V,"lineWidth","bendRadius","strokeColor"])}),group:Object.freeze({sourceRole:"group",fields:Object.freeze([...V,...H,"fontFamily","headerFillColor"])})}),"1.0.0"),Z=Object.freeze({core:m}),K=Object.freeze({owner:"agentic-mermaid",source:"built-in",reference:"src/scene/style-registry.ts"}),Q=Object.freeze({owner:"host",source:"in-process"}),ee=new Map,et=new Map,er=class extends Error{constructor(e){super(e),this.name="StyleSpecError"}};function en(e){if(e)return Object.freeze(Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.freeze({...t})])))}function ei(e){if(e)return Object.freeze(Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.freeze({...t})])))}function ea(e){return e?Object.freeze(e.map(e=>Object.freeze({...e}))):void 0}function eo(e){if(!e)return;let{displayLabel:t,...r}=e;return Object.freeze({...r,formatVersion:1,...r.colors?{colors:Object.freeze({...r.colors})}:{},...r.roles?{roles:en(r.roles)}:{},...r.semanticSlots?{semanticSlots:ei(r.semanticSlots)}:{},...r.bindings?{bindings:ea(r.bindings)}:{},...r.constraints?{constraints:ea(r.constraints)}:{}})}function es(r,n="look",i=r.name??""){if(!r.name)throw Error("registerBuiltInStyle requires a name");let a=p(n,r.name),o=F(eo({...r,name:a}));if(o.length)throw Error(`Invalid built-in style "${a}": ${o.join("; ")}`);!function(r,n,i,a){let o=r.name,s=Object.freeze({...r,formatVersion:1,...r.colors?{colors:Object.freeze({...r.colors})}:{},...r.roles?{roles:en(r.roles)}:{},...r.semanticSlots?{semanticSlots:ei(r.semanticSlots)}:{},...r.bindings?{bindings:ea(r.bindings)}:{},...r.constraints?{constraints:ea(r.constraints)}:{}});if(t(ee,{identity:e({id:o,kind:n,version:i.version??U,compatibility:{...Z,...i.compatibility},provenance:i.provenance??Q}),value:s}),void 0!==a){let e=et.get(a),t=ee.has(a)&&a!==o?a:void 0;if(void 0!==e||void 0!==t)throw ee.delete(o),Error(`Style input name "${a}" already selects "${e??t}"`);et.set(a,o)}}({...r,name:a},n,{version:U,compatibility:Z,provenance:K},i)}function el(e){return ee.has(e)?e:et.get(e)}function ec(e){let t=el(e);if(!t)return;let r=eo(ee.get(t)?.value);if(r)return Object.freeze({canonicalId:t,spec:r})}function ed(e){return"freehand"===e.stroke||"wash"===e.fill?"hybrid":"jittered"===e.stroke||"hachure"===e.fill||void 0!==e.backdrop&&"plain"!==e.backdrop||void 0!==e.roughness||void 0!==e.bowing||void 0!==e.passes||void 0!==e.hachureGap||void 0!==e.hachureAngle||void 0!==e.fillWeight?"rough":"default"}function ef(e,t){if(!e&&!t)return;let r=[],n=new Set;for(let i of[...e??[],...t??[]]){let e=JSON.stringify(i);n.has(e)||(n.add(e),r.push(i))}return r}function eu(e){if(void 0===e)return;let t=Array.isArray(e)?e:[e],r=[];for(let e of t)if("string"==typeof e){let t=el(e);if("look:crisp"===t)continue;let n=t?ee.get(t)?.value:void 0;if(!n)throw new er(`Unknown style "${e}". Known styles: ${Object.freeze(Array.from(ee.values(),({identity:e,value:t})=>{let r=Array.from(et.entries()).find(([,t])=>t===e.id)?.[0]??e.id,n=e.id.slice(e.id.indexOf(":")+1),i=t.displayLabel??n.split("-").filter(Boolean).map(e=>"ops"===e?"OPS":e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return Object.freeze({identity:e,spec:eo(t),inputName:r,displayLabel:i,kind:e.kind,isDefault:"look:crisp"===e.id})})).map(e=>e.inputName).join(", ")}`);r.push(n)}else r.push(function(e){let t=q(e),r=F(t);if(r.length)throw new er(`Invalid style spec: ${r.join("; ")}`);return t}(e));if(0===r.length)return;let n={formatVersion:1};for(let e of r)for(let[t,r]of Object.entries(e))if(void 0!==r)if("colors"===t){let t={...n.colors};for(let[r,n]of Object.entries(e.colors??{}))void 0!==n&&(t[r]=n);n.colors=t}else"roles"===t?n.roles=function(e,t){if(!e&&!t)return;let r={...e};for(let[e,n]of Object.entries(t??{}))void 0!==n&&(r[e]={...r[e],...n});return r}(n.roles,e.roles):"semanticSlots"===t?n.semanticSlots=function(e,t){if(!e&&!t)return;let r={...e};for(let[e,n]of Object.entries(t??{}))r[e]={...r[e],...n};return r}(n.semanticSlots,e.semanticSlots):"bindings"===t?n.bindings=ef(n.bindings,e.bindings):"constraints"===t?n.constraints=ef(n.constraints,e.constraints):n[t]=r;return n}function em(e){return G(()=>{let t=eu(e);return t&&ep(t),eo(t)})}function ep(e){for(let[t,r]of(e.bindings??[]).entries()){let n=e.semanticSlots?.[r.slot];if(!n)throw new er(`Invalid style spec: binding ${t+1} references missing semantic slot "${r.slot}"`);let i=new Set(void 0===r.role?a:o.find(e=>e.role===r.role).style.applicableProperties);if(!Object.keys(n).some(e=>i.has(e)))throw new er(void 0===r.role?`Invalid style spec: semantic slot "${r.slot}" has no field applicable to any executable category-binding role`:`Invalid style spec: semantic slot "${r.slot}" has no field applicable to role "${r.role}"`)}let t=["hachureAngle","hachureGap","fillWeight"].filter(t=>void 0!==e[t]&&"hachure"!==e.fill);if(t.length>0)throw new er(`Invalid style spec: ${t.map(e=>`"${e}"`).join(", ")} require fill "hachure" in the final Style stack`);let r=["washOpacity","washEdge"].filter(t=>void 0!==e[t]&&"wash"!==e.fill);if(r.length>0)throw new er(`Invalid style spec: ${r.map(e=>`"${e}"`).join(", ")} require fill "wash" in the final Style stack`);if(void 0!==e.fill&&"default"===ed(e))throw new er('Invalid style spec: "fill" has no crisp/default backend projection; combine it with stroke "jittered"/"freehand" or another rough/hybrid backend field')}function eg(e){return G(()=>{let t=eu(e);if(void 0===t)return{};ep(t);let r=eo(t),n=function(e){let t=e.strokeWidth,r=e.roles?Object.fromEntries(Object.entries(e.roles).map(([e,t])=>[e,t?{...t}:void 0])):void 0,n={...void 0!==t&&t>0&&"default"===ed(e)?{lineWidth:t}:{},...r?.node},i={...void 0!==t&&t>0&&"default"===ed(e)?{lineWidth:t}:{},...r?.edge},a={...void 0!==t&&t>0&&"default"===ed(e)?{lineWidth:t}:{},...r?.group};if(!(!r&&!e.semanticSlots&&!e.bindings&&!e.constraints&&0===Object.keys(n).length&&0===Object.keys(i).length&&0===Object.keys(a).length))return{...r?{roles:en(r)}:{},...e.semanticSlots?{semanticSlots:ei(e.semanticSlots)}:{},...e.bindings?{bindings:ea(e.bindings)}:{},...e.constraints?{constraints:ea(e.constraints)}:{},...r?.label?{text:{...r.label}}:{},...Object.keys(n).length?{node:n}:{},...Object.keys(i).length?{edge:i}:{},...Object.keys(a).length?{group:a}:{}}}(t);return{...r?{style:r}:{},...n?{face:n}:{}}})}function eb(e){return"default"!==ed(e)||void 0!==e.colors||void 0!==e.font||void 0!==e.strokeWidth||void 0!==e.roles||void 0!==e.semanticSlots||void 0!==e.bindings||void 0!==e.constraints}for(let e of(es({name:"crisp",displayLabel:"Crisp",blurb:"The default renderer with precise SVG geometry.",stroke:"crisp"},"look"),Y)){let{inputName:t,colors:r}=e;if(p("palette",t)!==e.id)throw Error(`Built-in palette identity mismatch: ${e.id}`);es({name:t,displayLabel:e.displayLabel,blurb:`Palette: ${t}.`,colors:{bg:r.bg,fg:r.fg,line:r.line,accent:r.accent,muted:r.muted,surface:r.surface,border:r.border}},"palette",t)}es({name:"hand-drawn",displayLabel:"Hand-drawn",blurb:"Black ink on ruled paper — wobbly double strokes, unfilled boxes.",intent:"draft",colors:{bg:"#f7f5ef",fg:"#1a1a1e",line:"#26262b",accent:"#26262b",border:"#26262b"},font:"Caveat",stroke:"jittered",roughness:1,bowing:1,passes:2,strokeWidth:1.8,fill:"none",backdrop:"paper-ruled",mono:!0}),es({name:"excalidraw",displayLabel:"Excalidraw",blurb:"Virtual whiteboard style — rough strokes, pastel hachure fills.",intent:"draft",colors:{bg:"#ffffff",fg:"#1e1e1e",line:"#1e1e1e",accent:"#4263eb",surface:"#f1f3f5"},font:"Caveat",stroke:"jittered",roughness:1.1,bowing:1.2,passes:2,strokeWidth:1.6,fill:"hachure",hachureAngle:-41,hachureGap:5.5,fillWeight:.9}),es({name:"pen-and-ink",displayLabel:"Pen & ink",blurb:"Fine single-pass linework on warm cream — no interior hatching.",intent:"premium",colors:{bg:"#faf6ec",fg:"#241f1a",line:"#2b241d",accent:"#2b241d",border:"#2b241d"},font:"EB Garamond",stroke:"jittered",roughness:.5,bowing:.6,passes:1,strokeWidth:1.5,fill:"none",mono:!0}),es({name:"freehand",displayLabel:"Freehand",blurb:"Pressure-sensitive marker ribbons — variable-width filled strokes.",intent:"draft",colors:{bg:"#fbfaf7",fg:"#16161a",line:"#1d1d22",accent:"#1d1d22",border:"#1d1d22"},font:"Architects Daughter",stroke:"freehand",roughness:.9,passes:1,strokeWidth:1.6,fill:"none",mono:!0}),es({name:"watercolor",displayLabel:"Watercolor",blurb:"Rough outlines over translucent glazes with pigment-pooled edges.",intent:"premium",colors:{bg:"#fdfbf6",fg:"#31302c",line:"#4d4a44",accent:"#7a6a52",surface:"#ead9b9",border:"#5a564e"},font:"Caveat",stroke:"jittered",roughness:.9,bowing:.8,passes:1,strokeWidth:1.5,fill:"wash",washOpacity:.3,washEdge:.34}),es({name:"blueprint",displayLabel:"Blueprint",blurb:"Cyanotype: white linework on Prussian blue with a drafting grid.",intent:"premium",colors:{bg:"#123a63",fg:"#eaf2fb",line:"#dbe9f7",accent:"#ffffff",muted:"#b8cfe6",surface:"#1c4a78",border:"#dbe9f7"},font:"Share Tech Mono",stroke:"jittered",roughness:.4,bowing:.4,passes:1,strokeWidth:1.4,fill:"none",backdrop:"grid",mono:!0}),es({name:"tufte",displayLabel:"Tufte",blurb:"Maximal data-ink: crisp hairlines, warm paper, one red accent.",intent:"premium",colors:{bg:"#fffff8",fg:"#111111",line:"#4a4a45",accent:"#a00000",muted:"#6b6b64",border:"#8a8a80"},font:"EB Garamond",roles:{node:{lineWidth:.8,cornerRadius:0},edge:{lineWidth:.8},group:{lineWidth:.8}},mono:!0},"look","look:tufte"),es({name:"accessible-high-contrast",displayLabel:"Accessible Contrast",blurb:"Accessibility-first: large labels, heavy strokes, white ground, colorblind-safe blue accent.",intent:"premium",colors:{bg:"#ffffff",fg:"#050505",line:"#111111",accent:"#005fcc",muted:"#333333",surface:"#ffffff",border:"#050505"},roles:{node:{fontSize:17,fontWeight:700,textColor:"var(--fg)",paddingX:28,paddingY:16,cornerRadius:8,lineWidth:2.4,borderColor:"var(--fg)"},edge:{fontSize:14,fontWeight:700,textColor:"var(--fg)",lineWidth:2.6,bendRadius:10,strokeColor:"var(--fg)"},group:{fontSize:14,fontWeight:700,textColor:"var(--fg)",paddingX:24,paddingY:22,cornerRadius:8,lineWidth:2.2,borderColor:"var(--fg)"}}}),es({name:"patent-drawing",displayLabel:"Patent Hatching",blurb:"Print-safe patent figure: uniform ink, strong outlines, tone via oblique hatching.",intent:"premium",colors:{bg:"#ffffff",fg:"#111111",line:"#111111",accent:"#111111",muted:"#444444",surface:"#ffffff",border:"#111111"},font:"EB Garamond",stroke:"jittered",roughness:.3,bowing:.2,passes:1,strokeWidth:1.35,fill:"hachure",hachureAngle:-50,hachureGap:7,fillWeight:.65,roles:{node:{fontSize:14,fontWeight:600,textColor:"var(--fg)",paddingX:24,paddingY:13,lineWidth:1.35,cornerRadius:0,borderColor:"var(--fg)"},edge:{fontSize:12,textColor:"var(--fg)",lineWidth:1.45,bendRadius:0,strokeColor:"var(--fg)"},group:{fontSize:12,fontWeight:700,textColor:"var(--fg)",paddingX:22,paddingY:18,lineWidth:1.35,cornerRadius:0,borderColor:"var(--fg)"}},mono:!0}),es({name:"status-dashboard",displayLabel:"Dark Ops Dashboard",blurb:"Operational dashboard: dark surface, rounded modules, bright status-friendly accent.",intent:"premium",colors:{bg:"#08111f",fg:"#e6f4ff",line:"#5a7c99",accent:"#2dd4bf",muted:"#8aa6bf",surface:"#102033",border:"#2e4c63"},roles:{node:{fontSize:14,fontWeight:700,textColor:"var(--fg)",paddingX:24,paddingY:13,cornerRadius:10,lineWidth:1.4,borderColor:"var(--fg)"},edge:{fontSize:12,fontWeight:600,textColor:"var(--fg)",lineWidth:2,bendRadius:14,strokeColor:"var(--fg)"},group:{fontSize:13,fontWeight:700,textColor:"var(--fg)",textTransform:"uppercase",letterSpacing:.06,paddingX:22,paddingY:20,cornerRadius:10,lineWidth:1.3,borderColor:"var(--fg)"}}}),es({name:"ops-schematic",displayLabel:"Compact Trace Map",blurb:"Dense operational schematic: compact mono labels, sturdy traces, theme-friendly geometry.",intent:"lofi",colors:{bg:"#f8faf7",fg:"#17211c",line:"#24523b",accent:"#0f766e",muted:"#4f665a",surface:"#f0f5ef",border:"#24523b"},font:"Share Tech Mono",stroke:"jittered",roughness:.18,bowing:.2,passes:1,strokeWidth:1.6,fill:"none",roles:{node:{fontSize:12,fontWeight:700,textTransform:"uppercase",textColor:"var(--fg)",paddingX:16,paddingY:8,cornerRadius:2,lineWidth:1.6,borderColor:"var(--fg)"},edge:{fontSize:10,fontWeight:700,textTransform:"uppercase",textColor:"var(--fg)",lineWidth:1.8,bendRadius:0,strokeColor:"var(--fg)"},group:{fontSize:11,fontWeight:700,textColor:"var(--fg)",textTransform:"uppercase",letterSpacing:.05,paddingX:16,paddingY:16,cornerRadius:2,lineWidth:1.5,borderColor:"var(--fg)"}}}),es({name:"chalkboard",displayLabel:"Chalkboard",blurb:"Classroom chalkboard: dusty off-white strokes on green slate.",intent:"draft",colors:{bg:"#17362f",fg:"#f5f1df",line:"#ece6cf",accent:"#ffe08a",muted:"#c7d2c4",surface:"#17362f",border:"#f3ecd5"},font:"Caveat",stroke:"jittered",roughness:1.25,bowing:1,passes:2,strokeWidth:1.9,fill:"none",roles:{node:{fontSize:16,fontWeight:700,textColor:"var(--fg)",paddingX:24,paddingY:12,borderColor:"var(--fg)"},edge:{fontSize:13,textColor:"var(--fg)",lineWidth:1.8,strokeColor:"var(--fg)"},group:{fontSize:14,fontWeight:700,textColor:"var(--fg)",paddingX:20,paddingY:20,lineWidth:1.7,borderColor:"var(--fg)"}},mono:!0}),es({name:"risograph",displayLabel:"Riso Print",blurb:"Two-ink poster print: warm stock, offset blue linework, coral accent, coarse hachure.",intent:"premium",colors:{bg:"#fff5df",fg:"#2b2725",line:"#1f3d5a",accent:"#ff5a5f",muted:"#876a52",surface:"#ffd166",border:"#1f3d5a"},font:"EB Garamond",stroke:"jittered",roughness:.7,bowing:.55,passes:1,strokeWidth:1.5,fill:"hachure",hachureAngle:18,hachureGap:6.5,fillWeight:.75,roles:{node:{fontSize:14,fontWeight:700,textColor:"var(--fg)",paddingX:24,paddingY:13,cornerRadius:3,borderColor:"var(--fg)"},edge:{fontSize:12,textColor:"var(--fg)",lineWidth:1.5,strokeColor:"var(--fg)"},group:{fontSize:13,fontWeight:700,textColor:"var(--fg)",paddingX:22,paddingY:18,cornerRadius:3,borderColor:"var(--fg)"}}}),es({name:"architectural-plan",displayLabel:"Plan Drafting",blurb:"Architectural plan: square technical linework, uppercase mono labels, room-like frames.",intent:"premium",colors:{bg:"#fbf7ea",fg:"#202a2f",line:"#38535e",accent:"#1f6f8b",muted:"#60727a",surface:"#fffaf0",border:"#38535e"},font:"Share Tech Mono",stroke:"jittered",roughness:.18,bowing:.25,passes:1,strokeWidth:1.45,fill:"none",roles:{node:{fontSize:12,fontWeight:700,textTransform:"uppercase",textColor:"var(--fg)",paddingX:20,paddingY:10,cornerRadius:0,lineWidth:1.45,borderColor:"var(--fg)"},edge:{fontSize:10,fontWeight:700,textTransform:"uppercase",textColor:"var(--fg)",lineWidth:1.55,bendRadius:0,strokeColor:"var(--fg)"},group:{fontSize:11,fontWeight:700,textColor:"var(--fg)",textTransform:"uppercase",letterSpacing:.06,paddingX:20,paddingY:20,cornerRadius:0,lineWidth:1.45,borderColor:"var(--fg)"}}}),es({name:"publication-figure",displayLabel:"Report Figure",blurb:"Polished publication figure: serif labels, confident rules, rounded boxes, one quiet accent.",intent:"premium",colors:{bg:"#fffdf8",fg:"#171512",line:"#24211d",accent:"#1d4ed8",muted:"#5f5a52",surface:"#faf5ea",border:"#24211d"},font:"EB Garamond",strokeWidth:1.45,roles:{node:{fontSize:15,fontWeight:700,textColor:"var(--fg)",paddingX:26,paddingY:14,cornerRadius:7,lineWidth:1.45,borderColor:"var(--fg)"},edge:{fontSize:12,fontWeight:600,textColor:"var(--fg)",lineWidth:1.45,bendRadius:8,strokeColor:"var(--fg)"},group:{fontSize:12,fontWeight:700,textColor:"var(--fg)",textTransform:"uppercase",letterSpacing:.08,paddingX:24,paddingY:22,cornerRadius:7,lineWidth:1.35,borderColor:"var(--fg)"}}});export{g as a,b as b,y as c,k as d,v as e,x as f,O as g,C as h,J as i,G as j,q as k,ec as l,ed as m,em as n,eg as o,eb as p};
|