@antv/infographic 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/infographic.min.js +62 -62
  2. package/dist/infographic.min.js.map +1 -1
  3. package/esm/designs/layouts/Align.js +6 -6
  4. package/esm/designs/layouts/Flex.js +8 -6
  5. package/esm/designs/structures/index.d.ts +1 -0
  6. package/esm/designs/structures/index.js +1 -0
  7. package/esm/designs/structures/list-zigzag.d.ts +11 -0
  8. package/esm/designs/structures/list-zigzag.js +240 -0
  9. package/esm/index.d.ts +1 -1
  10. package/esm/index.js +1 -1
  11. package/esm/renderer/composites/icon.d.ts +2 -5
  12. package/esm/renderer/composites/icon.js +5 -10
  13. package/esm/renderer/composites/illus.d.ts +3 -2
  14. package/esm/renderer/composites/illus.js +6 -2
  15. package/esm/renderer/composites/index.d.ts +2 -2
  16. package/esm/renderer/composites/index.js +2 -2
  17. package/esm/renderer/palettes/registry.d.ts +1 -1
  18. package/esm/renderer/palettes/registry.js +1 -1
  19. package/esm/renderer/renderer.js +6 -3
  20. package/esm/resource/loader.d.ts +2 -1
  21. package/esm/resource/loader.js +55 -23
  22. package/esm/templates/built-in.js +2 -0
  23. package/esm/templates/list-zigzag.d.ts +2 -0
  24. package/esm/templates/list-zigzag.js +68 -0
  25. package/lib/designs/layouts/Align.js +6 -6
  26. package/lib/designs/layouts/Flex.js +8 -6
  27. package/lib/designs/structures/index.d.ts +1 -0
  28. package/lib/designs/structures/index.js +1 -0
  29. package/lib/designs/structures/list-zigzag.d.ts +11 -0
  30. package/lib/designs/structures/list-zigzag.js +246 -0
  31. package/lib/index.d.ts +1 -1
  32. package/lib/index.js +3 -2
  33. package/lib/renderer/composites/icon.d.ts +2 -5
  34. package/lib/renderer/composites/icon.js +5 -11
  35. package/lib/renderer/composites/illus.d.ts +3 -2
  36. package/lib/renderer/composites/illus.js +7 -2
  37. package/lib/renderer/composites/index.d.ts +2 -2
  38. package/lib/renderer/composites/index.js +2 -2
  39. package/lib/renderer/palettes/registry.d.ts +1 -1
  40. package/lib/renderer/palettes/registry.js +1 -1
  41. package/lib/renderer/renderer.js +5 -2
  42. package/lib/resource/loader.d.ts +2 -1
  43. package/lib/resource/loader.js +55 -23
  44. package/lib/templates/built-in.js +2 -0
  45. package/lib/templates/list-zigzag.d.ts +2 -0
  46. package/lib/templates/list-zigzag.js +71 -0
  47. package/package.json +1 -1
  48. package/src/designs/layouts/Align.tsx +6 -6
  49. package/src/designs/layouts/Flex.tsx +8 -6
  50. package/src/designs/structures/index.ts +1 -0
  51. package/src/designs/structures/list-zigzag.tsx +492 -0
  52. package/src/index.ts +2 -0
  53. package/src/renderer/composites/icon.ts +6 -16
  54. package/src/renderer/composites/illus.ts +12 -2
  55. package/src/renderer/composites/index.ts +2 -2
  56. package/src/renderer/palettes/registry.ts +2 -2
  57. package/src/renderer/renderer.ts +5 -11
  58. package/src/resource/loader.ts +54 -20
  59. package/src/templates/built-in.ts +2 -0
  60. package/src/templates/list-zigzag.ts +70 -0
@@ -1,22 +1,22 @@
1
- (function(F,ge){typeof exports=="object"&&typeof module!="undefined"?ge(exports):typeof define=="function"&&define.amd?define(["exports"],ge):(F=typeof globalThis!="undefined"?globalThis:F||self,ge(F.AntVInfographic={}))})(this,(function(F){"use strict";var UN=Object.defineProperty,ZN=Object.defineProperties;var KN=Object.getOwnPropertyDescriptors;var Pv=Object.getOwnPropertySymbols;var QN=Object.prototype.hasOwnProperty,JN=Object.prototype.propertyIsEnumerable;var Xi=Math.pow,Ov=(F,ge,De)=>ge in F?UN(F,ge,{enumerable:!0,configurable:!0,writable:!0,value:De}):F[ge]=De,ve=(F,ge)=>{for(var De in ge||(ge={}))QN.call(ge,De)&&Ov(F,De,ge[De]);if(Pv)for(var De of Pv(ge))JN.call(ge,De)&&Ov(F,De,ge[De]);return F},Ae=(F,ge)=>ZN(F,KN(ge));const De={version:"0.2.2"},ma=new Map;function Rh(t,e){ma.set(t,e)}function Hh(t){return ma.get(t)}function Cv(){return Array.from(ma.keys())}var Mv=Object.defineProperty,Dh=Object.getOwnPropertySymbols,Sv=Object.prototype.hasOwnProperty,Ev=Object.prototype.propertyIsEnumerable,Nh=(t,e,n)=>e in t?Mv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jh=(t,e)=>{for(var n in e||(e={}))Sv.call(e,n)&&Nh(t,n,e[n]);if(Dh)for(var n of Dh(e))Ev.call(e,n)&&Nh(t,n,e[n]);return t};const Xr={edgeType:"curved",edgeColorMode:"gradient",edgeWidth:2,colorMode:"branch",levelGap:80,nodeGap:18},Gr={edgeType:"curved",edgeWidth:2,edgeColorMode:"gradient",colorMode:"level",levelGap:80,nodeGap:18},Fh={type:"lined-text",usePaletteColor:!0,showUnderline:!0,underlineThickness:2},Bh={type:"capsule-item"},Wh={type:"circular-progress"},Vh={type:"rounded-rect-node",positionH:"center"},Yh={type:"compact-card"},Iv=(t,e)=>jh(jh({type:"hierarchy-mindmap"},e!==void 0?{edgeAlign:e}:{}),t),Qe=(t,e,n,r)=>[t,{design:{structure:Iv(e,r),item:n}}],Tv=Object.fromEntries([Qe("hierarchy-mindmap-branch-gradient-lined-palette",Xr,Fh,"bottom"),Qe("hierarchy-mindmap-level-gradient-lined-palette",Gr,Fh,"bottom"),Qe("hierarchy-mindmap-branch-gradient-capsule-item",Xr,Bh),Qe("hierarchy-mindmap-level-gradient-capsule-item",Gr,Bh),Qe("hierarchy-mindmap-branch-gradient-circle-progress",Xr,Wh,.4),Qe("hierarchy-mindmap-level-gradient-circle-progress",Gr,Wh,.4),Qe("hierarchy-mindmap-branch-gradient-rounded-rect",Xr,Vh),Qe("hierarchy-mindmap-level-gradient-rounded-rect",Gr,Vh),Qe("hierarchy-mindmap-branch-gradient-compact-card",Xr,Yh),Qe("hierarchy-mindmap-level-gradient-compact-card",Gr,Yh)]);var Av=Object.defineProperty,Xh=Object.getOwnPropertySymbols,kv=Object.prototype.hasOwnProperty,zv=Object.prototype.propertyIsEnumerable,Gh=(t,e,n)=>e in t?Av(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qh=(t,e)=>{for(var n in e||(e={}))kv.call(e,n)&&Gh(t,n,e[n]);if(Xh)for(var n of Xh(e))zv.call(e,n)&&Gh(t,n,e[n]);return t};const Lv={"tech-style":{edgeType:"straight",edgeStyle:"solid",edgeColorMode:"gradient",edgeMarker:"arrow",markerSize:12,edgeCornerRadius:5},"dashed-line":{edgeStyle:"dashed",edgeCornerRadius:10,edgeDashPattern:"10,5",edgeColorMode:"gradient",edgeMarker:"dot",markerSize:6,edgeOffset:6},"distributed-origin":{edgeOrigin:"distributed",edgeOriginPadding:30,edgeMarker:"arrow",edgeCornerRadius:10,markerSize:12,edgeColorMode:"gradient"},"curved-line":{edgeType:"curved",edgeColorMode:"gradient",edgeMarker:"none"},"dashed-arrow":{edgeType:"straight",edgeStyle:"dashed",edgeDashPattern:"8,4",edgeMarker:"arrow",markerSize:10,edgeCornerRadius:0}},Rv=["capsule-item","rounded-rect-node","compact-card","badge-card","ribbon-card"],Uh={},Zh="hierarchy-tree",Hv=[{key:""},{key:"bt",orientation:"bottom-top"},{key:"lr",orientation:"left-right"},{key:"rl",orientation:"right-left"}],Dv=(t,e,n)=>t?`${Zh}-${t}-${e}-${n}`:`${Zh}-${e}-${n}`;for(const t of Rv)for(const[e,n]of Object.entries(Lv))for(const{key:r,orientation:i}of Hv){const o=Dv(r,e,t);Uh[o]={design:{structure:qh(qh({type:"hierarchy-tree"},i?{orientation:i}:{}),n),item:{type:t}}}}const Nv={"sequence-stairs-front-pill-badge":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"pill-badge"}]}},"sequence-stairs-front-compact-card":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"compact-card"}]}},"sequence-stairs-front-simple":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"simple",usePaletteColor:!0}]}}},jv={"chart-wordcloud-rotate":{design:{structure:{type:"chart-wordcloud"},item:"simple"}},"chart-wordcloud":{design:{structure:{type:"chart-wordcloud",enableRotate:!1},item:"simple"}}};var Fv=Object.defineProperty,Kh=Object.getOwnPropertySymbols,Bv=Object.prototype.hasOwnProperty,Wv=Object.prototype.propertyIsEnumerable,Qh=(t,e,n)=>e in t?Fv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gi=(t,e)=>{for(var n in e||(e={}))Bv.call(e,n)&&Qh(t,n,e[n]);if(Kh)for(var n of Kh(e))Wv.call(e,n)&&Qh(t,n,e[n]);return t};const Vv=Gi(Gi(Gi(Gi({"compare-hierarchy-left-right-circle-node-pill-badge":{design:{structure:{type:"compare-hierarchy-left-right",decoration:"split-line",surround:!1,groupGap:-20},title:"default",items:[{type:"circle-node",width:240},"pill-badge"]},themeConfig:{}},"compare-hierarchy-left-right-circle-node-plain-text":{design:{title:"default",structure:{type:"compare-hierarchy-left-right",decoration:"dot-line",flipLeaf:!0,groupGap:-10},items:[{type:"circle-node",width:180},{type:"plain-text"}]}},"list-pyramid-rounded-rect-node":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"rounded-rect-node"}]}},"list-pyramid-badge-card":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"badge-card"}]}},"list-pyramid-compact-card":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"compact-card"}]}},"list-column-done-list":{design:{title:"default",structure:{type:"list-column"},items:[{type:"done-list"}]}},"list-column-vertical-icon-arrow":{design:{title:"default",structure:{type:"list-column",gap:-5,zigzag:!0},items:[{type:"vertical-icon-arrow"}]}},"list-grid-badge-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"badge-card"}]}},"list-grid-candy-card-lite":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"candy-card-lite"}]}},"chart-column-simple":{design:{title:"default",structure:{type:"chart-column"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"list-grid-circular-progress":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"circular-progress"}]}},"list-grid-compact-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"compact-card"}]}},"list-grid-done-list":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"done-list"}]}},"list-grid-horizontal-icon-arrow":{design:{title:"default",structure:{type:"list-grid",gap:0,zigzag:!0},items:[{type:"horizontal-icon-arrow"}]}},"list-grid-progress-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"progress-card"}]}},"list-grid-ribbon-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"ribbon-card"}]}},"list-grid-simple":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"simple"}]}},"list-row-circular-progress":{design:{title:"default",structure:{type:"list-row"},items:[{type:"circular-progress"}]}},"list-row-horizontal-icon-arrow":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"horizontal-icon-arrow"}]}},"relation-circle-circular-progress":{design:{title:"default",structure:{type:"relation-circle"},items:[{type:"circular-progress"}]}},"relation-circle-icon-badge":{design:{title:"default",structure:{type:"relation-circle"},items:[{type:"icon-badge"}]}},"sequence-steps-badge-card":{design:{title:"default",structure:{type:"sequence-steps"},items:[{type:"badge-card"}]}},"sequence-steps-simple":{design:{title:"default",structure:{type:"sequence-steps",gap:10},items:[{type:"simple"}]}},"sequence-timeline-done-list":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"done-list"}]}},"sequence-timeline-plain-text":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"plain-text"}]}},"sequence-timeline-rounded-rect-node":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"rounded-rect-node"}]}},"sequence-ascending-steps":{design:{title:"default",structure:{type:"sequence-ascending-steps",vGap:-46,hGap:-20},items:[{type:"l-corner-card"}]}},"sequence-timeline-simple":{design:{title:"default",structure:{type:"sequence-timeline",gap:20},items:[{type:"simple",positionV:"middle"}]}},"sequence-cylinders-3d-simple":{design:{title:"default",structure:{type:"sequence-cylinders-3d",gapY:20},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"list-column-simple-vertical-arrow":{design:{title:"default",structure:{type:"list-column",gap:0,zigzag:!0},items:[{type:"simple-vertical-arrow"}]}},"list-row-simple-horizontal-arrow":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"simple-horizontal-arrow"}]}},"compare-swot":{design:{title:"default",structure:{type:"compare-hierarchy-row",itemGap:32,itemPadding:40,showColumnBackground:!0,columnBackgroundAlpha:.08},items:[{type:"letter-card",showBottomShade:!1},{type:"plain-text",formatter:t=>`● ${t}`,usePaletteColor:!0}]}},"compare-hierarchy-row-letter-card-compact-card":{design:{title:"default",structure:{type:"compare-hierarchy-row"},items:[{type:"letter-card"},{type:"compact-card"}]}},"compare-hierarchy-row-letter-card-rounded-rect-node":{design:{title:"default",structure:{type:"compare-hierarchy-row"},items:[{type:"letter-card"},{type:"rounded-rect-node"}]}},"sequence-snake-steps-compact-card":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"compact-card"}]}},"sequence-snake-steps-pill-badge":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"pill-badge"}]}},"sequence-snake-steps-simple":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"simple"}]}},"sequence-color-snake-steps-horizontal-icon-line":{design:{title:"default",structure:{type:"sequence-color-snake-steps"},items:[{type:"horizontal-icon-line"}]}},"sequence-pyramid-simple":{design:{title:"default",structure:{type:"sequence-pyramid"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]},themeConfig:{colorPrimary:"#1677ff"}},"list-row-horizontal-icon-line":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"horizontal-icon-line"}]}},"list-sector-simple":{design:{title:"default",structure:{type:"list-sector"},items:[{type:"simple"}]}},"list-sector-plain-text":{design:{title:"default",structure:{type:"list-sector"},items:[{type:"plain-text"}]}},"list-sector-half-plain-text":{design:{title:"default",structure:{type:"list-sector",startAngle:-180,endAngle:0},items:[{type:"plain-text"}]}},"quadrant-quarter-simple-card":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"quarter-simple-card"}]}},"quadrant-quarter-circular":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"quarter-circular"}]}},"sequence-roadmap-vertical-plain-text":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"plain-text"}]}},"sequence-roadmap-vertical-simple":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"simple",showIcon:!1}]}},"sequence-roadmap-vertical-badge-card":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"badge-card"}]}},"sequence-roadmap-vertical-pill-badge":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"pill-badge"}]}},"sequence-roadmap-vertical-quarter-circular":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"quarter-circular"}]}},"sequence-roadmap-vertical-quarter-simple-card":{design:{title:"default",structure:{type:"sequence-roadmap-vertical",flipped:!0},items:[{type:"quarter-simple-card"}]}},"sequence-horizontal-zigzag-simple-illus":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple-illus"}]}},"sequence-horizontal-zigzag-horizontal-icon-line":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"horizontal-icon-line"}]}},"sequence-horizontal-zigzag-plain-text":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"plain-text"}]}},"sequence-horizontal-zigzag-simple-horizontal-arrow":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple-horizontal-arrow"}]}},"sequence-horizontal-zigzag-simple":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple"}]}},"list-row-simple-illus":{design:{title:"default",structure:{type:"list-row"},items:[{type:"simple-illus"}]}},"quadrant-simple-illus":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"simple-illus"}]}},"sequence-color-snake-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-color-snake-steps"},items:[{type:"simple-illus"}]}},"sequence-snake-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"simple-illus"}]}},"sequence-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-steps"},items:[{type:"simple-illus"}]}},"sequence-timeline-simple-illus":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"simple-illus",usePaletteColor:!0}]}},"sequence-zigzag-steps-underline-text":{design:{title:"default",structure:{type:"sequence-zigzag-steps"},items:[{type:"underline-text"}]}},"sequence-horizontal-zigzag-underline-text":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"underline-text"}]}},"sequence-roadmap-vertical-underline-text":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"underline-text"}]}},"sequence-snake-steps-underline-text":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"underline-text"}]}},"sequence-circle-arrows-indexed-card":{design:{title:"default",structure:{type:"sequence-circle-arrows"},items:[{type:"indexed-card"}]}},"sequence-zigzag-pucks-3d-simple":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-zigzag-pucks-3d-underline-text":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"underline-text"}]}},"sequence-zigzag-pucks-3d-indexed-card":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"indexed-card"}]}},"sequence-ascending-stairs-3d-simple":{design:{title:"default",structure:{type:"sequence-ascending-stairs-3d"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-ascending-stairs-3d-underline-text":{design:{title:"default",structure:{type:"sequence-ascending-stairs-3d"},items:[{type:"underline-text"}]}},"sequence-circular-underline-text":{design:{title:"default",structure:{type:"sequence-circular"},items:[{type:"underline-text"}]}},"sequence-circular-simple":{design:{title:"default",structure:{type:"sequence-circular"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-filter-mesh-underline-text":{design:{title:"default",structure:{type:"sequence-filter-mesh"},items:[{type:"underline-text"}]}},"sequence-filter-mesh-simple":{design:{title:"default",structure:{type:"sequence-filter-mesh"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-mountain-underline-text":{design:{title:"default",structure:{type:"sequence-mountain"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-simple-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"compact-card"}]}},"compare-binary-horizontal-simple-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"compact-card"}]}},"compare-binary-horizontal-simple-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"compact-card"}]}},"chart-bar-plain-text":{design:{title:"default",structure:{type:"chart-bar"},items:[{type:"plain-text",positionH:"flipped"}]}},"chart-line-plain-text":{design:{title:"default",structure:{type:"chart-line"},items:[{type:"plain-text",lineNumber:2}]}},"chart-pie-plain-text":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"plain-text"}]}},"chart-pie-compact-card":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"compact-card"}]}},"chart-pie-pill-badge":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"pill-badge"}]}},"chart-pie-donut-plain-text":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"plain-text"}]}},"chart-pie-donut-compact-card":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"compact-card"}]}},"chart-pie-donut-pill-badge":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"pill-badge"}]}}},Uh),Tv),Nv),jv);Object.entries(Vv).forEach(([t,e])=>{Rh(t,e)});const Rt=Symbol.for("@antv/infographic/Fragment");function d(t,e={}){return{type:t,props:e}}const E=d,ya="infographic-component";var kt=(t=>(t.Background="background",t.Title="title",t.Desc="desc",t.ItemsGroup="items-group",t.ItemIconGroup="item-icon-group",t.ItemIcon="item-icon",t.ItemLabel="item-label",t.ItemDesc="item-desc",t.ItemValue="item-value",t.ItemIllus="item-illus",t.BtnAdd="btn-add",t.BtnRemove="btn-remove",t.IllusGroup="illus-group",t.IllusVolume="illus-volume",t.Illus="illus",t.BtnsGroup="btns-group",t.Unknown="unknown",t))(kt||{});const Yv="https://www.weavefox.cn/api/open/v1/icon",va=Symbol.for("@antv/infographic/Defs");function zt(t){return{type:va,props:t}}function Lt(t){var e,n,r,i;const{x:o=0,y:s=0,width:a=0,height:l=0}=t;return(e=t.cx)!=null||(t.cx=o+a/2),(n=t.cy)!=null||(t.cy=s+l/2),(r=t.rx)!=null||(t.rx=a/2),(i=t.ry)!=null||(t.ry=l/2),{type:"ellipse",props:t}}function Y(t){const{x:e=0,y:n=0}=t;return(e||n)&&(t.transform||(t.transform=`translate(${e}, ${n})`)),{type:"g",props:t}}var Xv=Object.defineProperty,Jh=Object.getOwnPropertySymbols,Gv=Object.prototype.hasOwnProperty,qv=Object.prototype.propertyIsEnumerable,td=(t,e,n)=>e in t?Xv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Uv=(t,e)=>{for(var n in e||(e={}))Gv.call(e,n)&&td(t,n,e[n]);if(Jh)for(var n of Jh(e))qv.call(e,n)&&td(t,n,e[n]);return t};function ht(t){const{x:e,y:n}=t,r=Uv({},t);return(e!==void 0||n!==void 0)&&(r.transform=`translate(${e!=null?e:0}, ${n!=null?n:0})`),{type:"path",props:r}}var Zv=Object.defineProperty,Kv=Object.defineProperties,Qv=Object.getOwnPropertyDescriptors,qi=Object.getOwnPropertySymbols,ed=Object.prototype.hasOwnProperty,nd=Object.prototype.propertyIsEnumerable,rd=(t,e,n)=>e in t?Zv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jv=(t,e)=>{for(var n in e||(e={}))ed.call(e,n)&&rd(t,n,e[n]);if(qi)for(var n of qi(e))nd.call(e,n)&&rd(t,n,e[n]);return t},tb=(t,e)=>Kv(t,Qv(e)),eb=(t,e)=>{var n={};for(var r in t)ed.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&qi)for(var r of qi(t))e.indexOf(r)<0&&nd.call(t,r)&&(n[r]=t[r]);return n};function Ne(t){var e=t,{points:n=[]}=e,r=eb(e,["points"]);const{x:i,y:o}=r,s=n.map(({x:c,y:h})=>`${c},${h}`).join(" "),a=tb(Jv({},r),{points:s});return(i!==void 0||o!==void 0)&&(a.transform=`translate(${i!=null?i:0}, ${o!=null?o:0})`+(a.transform||"")),{type:"polygon",props:a}}function St(t){return{type:"rect",props:t}}function id(t){return Object.keys(t[0]).reduce((e,n)=>{const r=n;return t.every(i=>i[r]===t[0][r])&&(e[r]=t[0][r]),e},{})}const od=(t,e)=>{if(typeof t=="number"){if(e===3)return{mode:"rgb",r:(t>>8&15|t>>4&240)/255,g:(t>>4&15|t&240)/255,b:(t&15|t<<4&240)/255};if(e===4)return{mode:"rgb",r:(t>>12&15|t>>8&240)/255,g:(t>>8&15|t>>4&240)/255,b:(t>>4&15|t&240)/255,alpha:(t&15|t<<4&240)/255};if(e===6)return{mode:"rgb",r:(t>>16&255)/255,g:(t>>8&255)/255,b:(t&255)/255};if(e===8)return{mode:"rgb",r:(t>>24&255)/255,g:(t>>16&255)/255,b:(t>>8&255)/255,alpha:(t&255)/255}}},nb={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},rb=t=>od(nb[t.toLowerCase()],6),ib=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,ob=t=>{let e;return(e=t.match(ib))?od(parseInt(e[1],16),e[1].length):void 0},Pn="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",qr=`${Pn}%`,ba=`(?:${Pn}%|${Pn})`,sb=`(?:${Pn}(deg|grad|rad|turn)|${Pn})`,br="\\s*,\\s*",ab=new RegExp(`^rgba?\\(\\s*${Pn}${br}${Pn}${br}${Pn}\\s*(?:,\\s*${ba}\\s*)?\\)$`),lb=new RegExp(`^rgba?\\(\\s*${qr}${br}${qr}${br}${qr}\\s*(?:,\\s*${ba}\\s*)?\\)$`),cb=t=>{let e={mode:"rgb"},n;if(n=t.match(ab))n[1]!==void 0&&(e.r=n[1]/255),n[2]!==void 0&&(e.g=n[2]/255),n[3]!==void 0&&(e.b=n[3]/255);else if(n=t.match(lb))n[1]!==void 0&&(e.r=n[1]/100),n[2]!==void 0&&(e.g=n[2]/100),n[3]!==void 0&&(e.b=n[3]/100);else return;return n[4]!==void 0?e.alpha=Math.max(0,Math.min(1,n[4]/100)):n[5]!==void 0&&(e.alpha=Math.max(0,Math.min(1,+n[5]))),e},hb=(t,e)=>t===void 0?void 0:typeof t!="object"?tn(t):t.mode!==void 0?t:e?Ae(ve({},t),{mode:e}):void 0,xa=(t="rgb")=>e=>(e=hb(e,t))!==void 0?e.mode===t?e:Je[e.mode][t]?Je[e.mode][t](e):t==="rgb"?Je[e.mode].rgb(e):Je.rgb[t](Je[e.mode].rgb(e)):void 0,Je={},sd={},Ui=[],ad={},db=t=>t,Ht=t=>(Je[t.mode]=ve(ve({},Je[t.mode]),t.toMode),Object.keys(t.fromMode||{}).forEach(e=>{Je[e]||(Je[e]={}),Je[e][t.mode]=t.fromMode[e]}),t.ranges||(t.ranges={}),t.difference||(t.difference={}),t.channels.forEach(e=>{if(t.ranges[e]===void 0&&(t.ranges[e]=[0,1]),!t.interpolate[e])throw new Error(`Missing interpolator for: ${e}`);typeof t.interpolate[e]=="function"&&(t.interpolate[e]={use:t.interpolate[e]}),t.interpolate[e].fixup||(t.interpolate[e].fixup=db)}),sd[t.mode]=t,(t.parse||[]).forEach(e=>{fb(e,t.mode)}),xa(t.mode)),ub=t=>sd[t],fb=(t,e)=>{if(typeof t=="string"){if(!e)throw new Error("'mode' required when 'parser' is a string");ad[t]=e}else typeof t=="function"&&Ui.indexOf(t)<0&&Ui.push(t)},wa=/[^\x00-\x7F]|[a-zA-Z_]/,pb=/[^\x00-\x7F]|[-\w]/,J={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let xt=0;function Zi(t){let e=t[xt],n=t[xt+1];return e==="-"||e==="+"?/\d/.test(n)||n==="."&&/\d/.test(t[xt+2]):e==="."?/\d/.test(n):/\d/.test(e)}function _a(t){if(xt>=t.length)return!1;let e=t[xt];if(wa.test(e))return!0;if(e==="-"){if(t.length-xt<2)return!1;let n=t[xt+1];return!!(n==="-"||wa.test(n))}return!1}const gb={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function Ur(t){let e="";if((t[xt]==="-"||t[xt]==="+")&&(e+=t[xt++]),e+=Ki(t),t[xt]==="."&&/\d/.test(t[xt+1])&&(e+=t[xt++]+Ki(t)),(t[xt]==="e"||t[xt]==="E")&&((t[xt+1]==="-"||t[xt+1]==="+")&&/\d/.test(t[xt+2])?e+=t[xt++]+t[xt++]+Ki(t):/\d/.test(t[xt+1])&&(e+=t[xt++]+Ki(t))),_a(t)){let n=Qi(t);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:J.Hue,value:e*gb[n]}:void 0}return t[xt]==="%"?(xt++,{type:J.Percentage,value:+e}):{type:J.Number,value:+e}}function Ki(t){let e="";for(;/\d/.test(t[xt]);)e+=t[xt++];return e}function Qi(t){let e="";for(;xt<t.length&&pb.test(t[xt]);)e+=t[xt++];return e}function mb(t){let e=Qi(t);return t[xt]==="("?(xt++,{type:J.Function,value:e}):e==="none"?{type:J.None,value:void 0}:{type:J.Ident,value:e}}function yb(t=""){let e=t.trim(),n=[],r;for(xt=0;xt<e.length;){if(r=e[xt++],r===`
2
- `||r===" "||r===" "){for(;xt<e.length&&(e[xt]===`
3
- `||e[xt]===" "||e[xt]===" ");)xt++;continue}if(r===",")return;if(r===")"){n.push({type:J.ParenClose});continue}if(r==="+"){if(xt--,Zi(e)){n.push(Ur(e));continue}return}if(r==="-"){if(xt--,Zi(e)){n.push(Ur(e));continue}if(_a(e)){n.push({type:J.Ident,value:Qi(e)});continue}return}if(r==="."){if(xt--,Zi(e)){n.push(Ur(e));continue}return}if(r==="/"){for(;xt<e.length&&(e[xt]===`
4
- `||e[xt]===" "||e[xt]===" ");)xt++;let i;if(Zi(e)&&(i=Ur(e),i.type!==J.Hue)){n.push({type:J.Alpha,value:i});continue}if(_a(e)&&Qi(e)==="none"){n.push({type:J.Alpha,value:{type:J.None,value:void 0}});continue}return}if(/\d/.test(r)){xt--,n.push(Ur(e));continue}if(wa.test(r)){xt--,n.push(mb(e));continue}return}return n}function vb(t){t._i=0;let e=t[t._i++];if(!e||e.type!==J.Function||e.value!=="color"||(e=t[t._i++],e.type!==J.Ident))return;const n=ad[e.value];if(!n)return;const r={mode:n},i=ld(t,!1);if(!i)return;const o=ub(n).channels;for(let s=0,a,l;s<o.length;s++)a=i[s],l=o[s],a.type!==J.None&&(r[l]=a.type===J.Number?a.value:a.value/100,l==="alpha"&&(r[l]=Math.max(0,Math.min(1,r[l]))));return r}function ld(t,e){const n=[];let r;for(;t._i<t.length;){if(r=t[t._i++],r.type===J.None||r.type===J.Number||r.type===J.Alpha||r.type===J.Percentage||e&&r.type===J.Hue){n.push(r);continue}if(r.type===J.ParenClose){if(t._i<t.length)return;continue}return}if(!(n.length<3||n.length>4)){if(n.length===4){if(n[3].type!==J.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:J.None,value:void 0}),n.every(i=>i.type!==J.Alpha)?n:void 0}}function bb(t,e){t._i=0;let n=t[t._i++];if(!n||n.type!==J.Function)return;let r=ld(t,e);if(r)return r.unshift(n.value),r}const tn=t=>{if(typeof t!="string")return;const e=yb(t),n=e?bb(e,!0):void 0;let r,i=0,o=Ui.length;for(;i<o;)if((r=Ui[i++](t,n))!==void 0)return r;return e?vb(e):void 0};function xb(t,e){if(!e||e[0]!=="rgb"&&e[0]!=="rgba")return;const n={mode:"rgb"},[,r,i,o,s]=e;if(!(r.type===J.Hue||i.type===J.Hue||o.type===J.Hue))return r.type!==J.None&&(n.r=r.type===J.Number?r.value/255:r.value/100),i.type!==J.None&&(n.g=i.type===J.Number?i.value/255:i.value/100),o.type!==J.None&&(n.b=o.type===J.Number?o.value/255:o.value/100),s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const wb=t=>t==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,_b=(t,e,n)=>t+n*(e-t),$b=t=>{let e=[];for(let n=0;n<t.length-1;n++){let r=t[n],i=t[n+1];r===void 0&&i===void 0?e.push(void 0):r!==void 0&&i!==void 0?e.push([r,i]):e.push(r!==void 0?[r,r]:[i,i])}return e},it=(t=>e=>{let n=$b(e);return r=>{let i=r*n.length,o=r>=1?n.length-1:Math.max(Math.floor(i),0),s=n[o];return s===void 0?void 0:t(s[0],s[1],i-o)}})(_b),ce=t=>{let e=!1,n=t.map(r=>r!==void 0?(e=!0,r):1);return e?n:t},xr={mode:"rgb",channels:["r","g","b","alpha"],parse:[xb,ob,cb,rb,wb,"srgb"],serialize:"srgb",interpolate:{r:it,g:it,b:it,alpha:{use:it,fixup:ce}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},$a=(t=0)=>Math.pow(Math.abs(t),563/256)*Math.sign(t),cd=t=>{let e=$a(t.r),n=$a(t.g),r=$a(t.b),i={mode:"xyz65",x:.5766690429101305*e+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*e+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*e+.0706888525358272*n+.9913375368376386*r};return t.alpha!==void 0&&(i.alpha=t.alpha),i},Pa=t=>Math.pow(Math.abs(t),256/563)*Math.sign(t),hd=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"a98",r:Pa(t*2.0415879038107465-e*.5650069742788597-.3447313507783297*n),g:Pa(t*-.9692436362808798+e*1.8759675015077206+.0415550574071756*n),b:Pa(t*.0134442806320312-e*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(i.alpha=r),i},Oa=(t=0)=>{const e=Math.abs(t);return e<=.04045?t/12.92:(Math.sign(t)||1)*Math.pow((e+.055)/1.055,2.4)},wr=({r:t,g:e,b:n,alpha:r})=>{let i={mode:"lrgb",r:Oa(t),g:Oa(e),b:Oa(n)};return r!==void 0&&(i.alpha=r),i},jn=t=>{let{r:e,g:n,b:r,alpha:i}=wr(t),o={mode:"xyz65",x:.4123907992659593*e+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*e+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*e+.119194779794626*n+.9505321522496607*r};return i!==void 0&&(o.alpha=i),o},Ca=(t=0)=>{const e=Math.abs(t);return e>.0031308?(Math.sign(t)||1)*(1.055*Math.pow(e,1/2.4)-.055):t*12.92},_r=({r:t,g:e,b:n,alpha:r},i="rgb")=>{let o={mode:i,r:Ca(t),g:Ca(e),b:Ca(n)};return r!==void 0&&(o.alpha=r),o},Fn=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=_r({r:t*3.2409699419045226-e*1.537383177570094-.4986107602930034*n,g:t*-.9692436362808796+e*1.8759675015077204+.0415550574071756*n,b:t*.0556300796969936-e*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(i.alpha=r),i},Pb=Ae(ve({},xr),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:t=>hd(jn(t)),xyz65:hd},toMode:{rgb:t=>Fn(cd(t)),xyz65:cd}}),me=t=>(t=t%360)<0?t+360:t,Ob=(t,e)=>t.map((n,r,i)=>{if(n===void 0)return n;let o=me(n);return r===0||t[r-1]===void 0?o:e(o-me(i[r-1]))}).reduce((n,r)=>!n.length||r===void 0||n[n.length-1]===void 0?(n.push(r),n):(n.push(r+n[n.length-1]),n),[]),fn=t=>Ob(t,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),de=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Cb=Math.PI/180,Mb=180/Math.PI;let dd=de[3]*de[4],ud=de[1]*de[4],fd=de[1]*de[2]-de[0]*de[3];const Sb=({r:t,g:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(fd*n+t*dd-e*ud)/(fd+dd-ud),o=n-i,s=(de[4]*(e-i)-de[2]*o)/de[3],a={mode:"cubehelix",l:i,s:i===0||i===1?void 0:Math.sqrt(o*o+s*s)/(de[4]*i*(1-i))};return a.s&&(a.h=Math.atan2(s,o)*Mb-120),r!==void 0&&(a.alpha=r),a},Eb=({h:t,s:e,l:n,alpha:r})=>{let i={mode:"rgb"};t=(t===void 0?0:t+120)*Cb,n===void 0&&(n=0);let o=e===void 0?0:e*n*(1-n),s=Math.cos(t),a=Math.sin(t);return i.r=n+o*(de[0]*s+de[1]*a),i.g=n+o*(de[2]*s+de[3]*a),i.b=n+o*(de[4]*s+de[5]*a),r!==void 0&&(i.alpha=r),i},Ji=(t,e)=>{if(t.h===void 0||e.h===void 0||!t.s||!e.s)return 0;let n=me(t.h),r=me(e.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(t.s*e.s)*i},Ib=(t,e)=>{if(t.h===void 0||e.h===void 0)return 0;let n=me(t.h),r=me(e.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},to=(t,e)=>{if(t.h===void 0||e.h===void 0||!t.c||!e.c)return 0;let n=me(t.h),r=me(e.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(t.c*e.c)*i},pn=t=>{let e=t.reduce((r,i)=>{if(i!==void 0){let o=i*Math.PI/180;r.sin+=Math.sin(o),r.cos+=Math.cos(o)}return r},{sin:0,cos:0}),n=Math.atan2(e.sin,e.cos)*180/Math.PI;return n<0?360+n:n},Tb={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Sb},toMode:{rgb:Eb},interpolate:{h:{use:it,fixup:fn},s:it,l:it,alpha:{use:it,fixup:ce}},difference:{h:Ji},average:{h:pn}},On=({l:t,a:e,b:n,alpha:r},i="lch")=>{e===void 0&&(e=0),n===void 0&&(n=0);let o=Math.sqrt(e*e+n*n),s={mode:i,l:t,c:o};return o&&(s.h=me(Math.atan2(n,e)*180/Math.PI)),r!==void 0&&(s.alpha=r),s},Cn=({l:t,c:e,h:n,alpha:r},i="lab")=>{n===void 0&&(n=0);let o={mode:i,l:t,a:e?e*Math.cos(n/180*Math.PI):0,b:e?e*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},pd=Math.pow(29,3)/Math.pow(3,3),gd=Math.pow(6,3)/Math.pow(29,3),se={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},$r={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let Ma=t=>Math.pow(t,3)>gd?Math.pow(t,3):(116*t-16)/pd;const md=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(t+16)/116,o=e/500+i,s=i-n/200,a={mode:"xyz65",x:Ma(o)*$r.X,y:Ma(i)*$r.Y,z:Ma(s)*$r.Z};return r!==void 0&&(a.alpha=r),a},eo=t=>Fn(md(t)),Sa=t=>t>gd?Math.cbrt(t):(pd*t+16)/116,yd=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Sa(t/$r.X),o=Sa(e/$r.Y),s=Sa(n/$r.Z),a={mode:"lab65",l:116*o-16,a:500*(i-o),b:200*(o-s)};return r!==void 0&&(a.alpha=r),a},no=t=>{let e=yd(jn(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},ro=1,vd=1,Zr=26/180*Math.PI,io=Math.cos(Zr),oo=Math.sin(Zr),bd=100/Math.log(139/100),Ea=({l:t,c:e,h:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"lab65",l:(Math.exp(t*ro/bd)-1)/.0039},o=(Math.exp(.0435*e*vd*ro)-1)/.075,s=o*Math.cos(n/180*Math.PI-Zr),a=o*Math.sin(n/180*Math.PI-Zr);return i.a=s*io-a/.83*oo,i.b=s*oo+a/.83*io,r!==void 0&&(i.alpha=r),i},Ia=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=e*io+n*oo,o=.83*(n*io-e*oo),s=Math.sqrt(i*i+o*o),a={mode:"dlch",l:bd/ro*Math.log(1+.0039*t),c:Math.log(1+.075*s)/(.0435*vd*ro)};return a.c&&(a.h=me((Math.atan2(o,i)+Zr)/Math.PI*180)),r!==void 0&&(a.alpha=r),a},xd=t=>Ea(On(t,"dlch")),wd=t=>Cn(Ia(t),"dlab"),Ab={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:xd,rgb:t=>eo(xd(t))},fromMode:{lab65:wd,rgb:t=>wd(no(t))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:it,a:it,b:it,alpha:{use:it,fixup:ce}}},kb={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Ea,dlab:t=>Cn(t,"dlab"),rgb:t=>eo(Ea(t))},fromMode:{lab65:Ia,dlab:t=>On(t,"dlch"),rgb:t=>Ia(no(t))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:it,c:it,h:{use:it,fixup:fn},alpha:{use:it,fixup:ce}},difference:{h:to},average:{h:pn}};function zb({h:t,s:e,i:n,alpha:r}){t=me(t!==void 0?t:0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.abs(t/60%2-1),o;switch(Math.floor(t/60)){case 0:o={r:n*(1+e*(3/(2-i)-1)),g:n*(1+e*(3*(1-i)/(2-i)-1)),b:n*(1-e)};break;case 1:o={r:n*(1+e*(3*(1-i)/(2-i)-1)),g:n*(1+e*(3/(2-i)-1)),b:n*(1-e)};break;case 2:o={r:n*(1-e),g:n*(1+e*(3/(2-i)-1)),b:n*(1+e*(3*(1-i)/(2-i)-1))};break;case 3:o={r:n*(1-e),g:n*(1+e*(3*(1-i)/(2-i)-1)),b:n*(1+e*(3/(2-i)-1))};break;case 4:o={r:n*(1+e*(3*(1-i)/(2-i)-1)),g:n*(1-e),b:n*(1+e*(3/(2-i)-1))};break;case 5:o={r:n*(1+e*(3/(2-i)-1)),g:n*(1-e),b:n*(1+e*(3*(1-i)/(2-i)-1))};break;default:o={r:n*(1-e),g:n*(1-e),b:n*(1-e)}}return o.mode="rgb",r!==void 0&&(o.alpha=r),o}function Lb({r:t,g:e,b:n,alpha:r}){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.max(t,e,n),o=Math.min(t,e,n),s={mode:"hsi",s:t+e+n===0?0:1-3*o/(t+e+n),i:(t+e+n)/3};return i-o!==0&&(s.h=(i===t?(e-n)/(i-o)+(e<n)*6:i===e?(n-t)/(i-o)+2:(t-e)/(i-o)+4)*60),r!==void 0&&(s.alpha=r),s}const Rb={mode:"hsi",toMode:{rgb:zb},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Lb},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:it,fixup:fn},s:it,i:it,alpha:{use:it,fixup:ce}},difference:{h:Ji},average:{h:pn}};function Hb({h:t,s:e,l:n,alpha:r}){t=me(t!==void 0?t:0),e===void 0&&(e=0),n===void 0&&(n=0);let i=n+e*(n<.5?n:1-n),o=i-(i-n)*2*Math.abs(t/60%2-1),s;switch(Math.floor(t/60)){case 0:s={r:i,g:o,b:2*n-i};break;case 1:s={r:o,g:i,b:2*n-i};break;case 2:s={r:2*n-i,g:i,b:o};break;case 3:s={r:2*n-i,g:o,b:i};break;case 4:s={r:o,g:2*n-i,b:i};break;case 5:s={r:i,g:2*n-i,b:o};break;default:s={r:2*n-i,g:2*n-i,b:2*n-i}}return s.mode="rgb",r!==void 0&&(s.alpha=r),s}function Db({r:t,g:e,b:n,alpha:r}){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.max(t,e,n),o=Math.min(t,e,n),s={mode:"hsl",s:i===o?0:(i-o)/(1-Math.abs(i+o-1)),l:.5*(i+o)};return i-o!==0&&(s.h=(i===t?(e-n)/(i-o)+(e<n)*6:i===e?(n-t)/(i-o)+2:(t-e)/(i-o)+4)*60),r!==void 0&&(s.alpha=r),s}const Nb=(t,e)=>{switch(e){case"deg":return+t;case"rad":return t/Math.PI*180;case"grad":return t/10*9;case"turn":return t*360}},jb=new RegExp(`^hsla?\\(\\s*${sb}${br}${qr}${br}${qr}\\s*(?:,\\s*${ba}\\s*)?\\)$`),Fb=t=>{let e=t.match(jb);if(!e)return;let n={mode:"hsl"};return e[3]!==void 0?n.h=+e[3]:e[1]!==void 0&&e[2]!==void 0&&(n.h=Nb(e[1],e[2])),e[4]!==void 0&&(n.s=Math.min(Math.max(0,e[4]/100),1)),e[5]!==void 0&&(n.l=Math.min(Math.max(0,e[5]/100),1)),e[6]!==void 0?n.alpha=Math.max(0,Math.min(1,e[6]/100)):e[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+e[7]))),n};function Bb(t,e){if(!e||e[0]!=="hsl"&&e[0]!=="hsla")return;const n={mode:"hsl"},[,r,i,o,s]=e;if(r.type!==J.None){if(r.type===J.Percentage)return;n.h=r.value}if(i.type!==J.None){if(i.type===J.Hue)return;n.s=i.value/100}if(o.type!==J.None){if(o.type===J.Hue)return;n.l=o.value/100}return s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const _d={mode:"hsl",toMode:{rgb:Hb},fromMode:{rgb:Db},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Bb,Fb],serialize:t=>`hsl(${t.h!==void 0?t.h:"none"} ${t.s!==void 0?t.s*100+"%":"none"} ${t.l!==void 0?t.l*100+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:it,fixup:fn},s:it,l:it,alpha:{use:it,fixup:ce}},difference:{h:Ji},average:{h:pn}};function $d({h:t,s:e,v:n,alpha:r}){t=me(t!==void 0?t:0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.abs(t/60%2-1),o;switch(Math.floor(t/60)){case 0:o={r:n,g:n*(1-e*i),b:n*(1-e)};break;case 1:o={r:n*(1-e*i),g:n,b:n*(1-e)};break;case 2:o={r:n*(1-e),g:n,b:n*(1-e*i)};break;case 3:o={r:n*(1-e),g:n*(1-e*i),b:n};break;case 4:o={r:n*(1-e*i),g:n*(1-e),b:n};break;case 5:o={r:n,g:n*(1-e),b:n*(1-e*i)};break;default:o={r:n*(1-e),g:n*(1-e),b:n*(1-e)}}return o.mode="rgb",r!==void 0&&(o.alpha=r),o}function Pd({r:t,g:e,b:n,alpha:r}){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.max(t,e,n),o=Math.min(t,e,n),s={mode:"hsv",s:i===0?0:1-o/i,v:i};return i-o!==0&&(s.h=(i===t?(e-n)/(i-o)+(e<n)*6:i===e?(n-t)/(i-o)+2:(t-e)/(i-o)+4)*60),r!==void 0&&(s.alpha=r),s}const Od={mode:"hsv",toMode:{rgb:$d},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:Pd},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:it,fixup:fn},s:it,v:it,alpha:{use:it,fixup:ce}},difference:{h:Ji},average:{h:pn}};function Wb({h:t,w:e,b:n,alpha:r}){if(e===void 0&&(e=0),n===void 0&&(n=0),e+n>1){let i=e+n;e/=i,n/=i}return $d({h:t,s:n===1?1:1-e/(1-n),v:1-n,alpha:r})}function Vb(t){let e=Pd(t);if(e===void 0)return;let n=e.s!==void 0?e.s:0,r=e.v!==void 0?e.v:0,i={mode:"hwb",w:(1-n)*r,b:1-r};return e.h!==void 0&&(i.h=e.h),e.alpha!==void 0&&(i.alpha=e.alpha),i}function Yb(t,e){if(!e||e[0]!=="hwb")return;const n={mode:"hwb"},[,r,i,o,s]=e;if(r.type!==J.None){if(r.type===J.Percentage)return;n.h=r.value}if(i.type!==J.None){if(i.type===J.Hue)return;n.w=i.value/100}if(o.type!==J.None){if(o.type===J.Hue)return;n.b=o.value/100}return s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const Xb={mode:"hwb",toMode:{rgb:Wb},fromMode:{rgb:Vb},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Yb],serialize:t=>`hwb(${t.h!==void 0?t.h:"none"} ${t.w!==void 0?t.w*100+"%":"none"} ${t.b!==void 0?t.b*100+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:it,fixup:fn},w:it,b:it,alpha:{use:it,fixup:ce}},difference:{h:Ib},average:{h:pn}},Cd=203,so=.1593017578125,Md=78.84375,ao=.8359375,lo=18.8515625,co=18.6875;function Ta(t){if(t<0)return 0;const e=Math.pow(t,1/Md);return 1e4*Math.pow(Math.max(0,e-ao)/(lo-co*e),1/so)}function Aa(t){if(t<0)return 0;const e=Math.pow(t/1e4,so);return Math.pow((ao+lo*e)/(1+co*e),Md)}const ka=t=>Math.max(t/Cd,0),Sd=({i:t,t:e,p:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i=Ta(t+.008609037037932761*e+.11102962500302593*n),o=Ta(t-.00860903703793275*e-.11102962500302599*n),s=Ta(t+.5600313357106791*e-.32062717498731885*n),a={mode:"xyz65",x:ka(2.070152218389422*i-1.3263473389671556*o+.2066510476294051*s),y:ka(.3647385209748074*i+.680566024947227*o-.0453045459220346*s),z:ka(-.049747207535812*i-.0492609666966138*o+1.1880659249923042*s)};return r!==void 0&&(a.alpha=r),a},za=(t=0)=>Math.max(t*Cd,0),Ed=({x:t,y:e,z:n,alpha:r})=>{const i=za(t),o=za(e),s=za(n),a=Aa(.3592832590121217*i+.6976051147779502*o-.0358915932320289*s),l=Aa(-.1920808463704995*i+1.1004767970374323*o+.0753748658519118*s),c=Aa(.0070797844607477*i+.0748396662186366*o+.8433265453898765*s),h=.5*a+.5*l,u=1.61376953125*a-3.323486328125*l+1.709716796875*c,f=4.378173828125*a-4.24560546875*l-.132568359375*c,p={mode:"itp",i:h,t:u,p:f};return r!==void 0&&(p.alpha=r),p},Gb={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Sd,rgb:t=>Fn(Sd(t))},fromMode:{xyz65:Ed,rgb:t=>Ed(jn(t))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:it,t:it,p:it,alpha:{use:it,fixup:ce}}},qb=134.03437499999998,Ub=16295499532821565e-27,La=t=>{if(t<0)return 0;let e=Math.pow(t/1e4,so);return Math.pow((ao+lo*e)/(1+co*e),qb)},Ra=(t=0)=>Math.max(t*203,0),Id=({x:t,y:e,z:n,alpha:r})=>{t=Ra(t),e=Ra(e),n=Ra(n);let i=1.15*t-.15*n,o=.66*e+.34*t,s=La(.41478972*i+.579999*o+.014648*n),a=La(-.20151*i+1.120649*o+.0531008*n),l=La(-.0166008*i+.2648*o+.6684799*n),c=(s+a)/2,h={mode:"jab",j:.44*c/(1-.56*c)-Ub,a:3.524*s-4.066708*a+.542708*l,b:.199076*s+1.096799*a-1.295875*l};return r!==void 0&&(h.alpha=r),h},Zb=134.03437499999998,Td=16295499532821565e-27,Ha=t=>{if(t<0)return 0;let e=Math.pow(t,1/Zb);return 1e4*Math.pow((ao-e)/(co*e-lo),1/so)},Da=t=>t/203,Ad=({j:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(t+Td)/(.44+.56*(t+Td)),o=Ha(i+.13860504*e+.058047316*n),s=Ha(i-.13860504*e-.058047316*n),a=Ha(i-.096019242*e-.8118919*n),l={mode:"xyz65",x:Da(1.661373024652174*o-.914523081304348*s+.23136208173913045*a),y:Da(-.3250758611844533*o+1.571847026732543*s-.21825383453227928*a),z:Da(-.090982811*o-.31272829*s+1.5227666*a)};return r!==void 0&&(l.alpha=r),l},kd=t=>{let e=Id(jn(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},zd=t=>Fn(Ad(t)),Kb={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:kd,xyz65:Id},toMode:{rgb:zd,xyz65:Ad},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:it,a:it,b:it,alpha:{use:it,fixup:ce}}},Ld=({j:t,a:e,b:n,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.sqrt(e*e+n*n),o={mode:"jch",j:t,c:i};return i&&(o.h=me(Math.atan2(n,e)*180/Math.PI)),r!==void 0&&(o.alpha=r),o},Rd=({j:t,c:e,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:"jab",j:t,a:e?e*Math.cos(n/180*Math.PI):0,b:e?e*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},Qb={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Rd,rgb:t=>zd(Rd(t))},fromMode:{rgb:t=>Ld(kd(t)),jab:Ld},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:it,fixup:fn},c:it,j:it,alpha:{use:it,fixup:ce}},difference:{h:to},average:{h:pn}},ho=Math.pow(29,3)/Math.pow(3,3),Na=Math.pow(6,3)/Math.pow(29,3);let ja=t=>Math.pow(t,3)>Na?Math.pow(t,3):(116*t-16)/ho;const Fa=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(t+16)/116,o=e/500+i,s=i-n/200,a={mode:"xyz50",x:ja(o)*se.X,y:ja(i)*se.Y,z:ja(s)*se.Z};return r!==void 0&&(a.alpha=r),a},Kr=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=_r({r:t*3.1341359569958707-e*1.6173863321612538-.4906619460083532*n,g:t*-.978795502912089+e*1.916254567259524+.03344273116131949*n,b:t*.07195537988411677-e*.2289768264158322+1.405386058324125*n});return r!==void 0&&(i.alpha=r),i},Hd=t=>Kr(Fa(t)),Qr=t=>{let{r:e,g:n,b:r,alpha:i}=wr(t),o={mode:"xyz50",x:.436065742824811*e+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*e+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*e+.09708128566574634*n+.7140993584005155*r};return i!==void 0&&(o.alpha=i),o},Ba=t=>t>Na?Math.cbrt(t):(ho*t+16)/116,Wa=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Ba(t/se.X),o=Ba(e/se.Y),s=Ba(n/se.Z),a={mode:"lab",l:116*o-16,a:500*(i-o),b:200*(o-s)};return r!==void 0&&(a.alpha=r),a},Dd=t=>{let e=Wa(Qr(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e};function Jb(t,e){if(!e||e[0]!=="lab")return;const n={mode:"lab"},[,r,i,o,s]=e;if(!(r.type===J.Hue||i.type===J.Hue||o.type===J.Hue))return r.type!==J.None&&(n.l=Math.min(Math.max(0,r.value),100)),i.type!==J.None&&(n.a=i.type===J.Number?i.value:i.value*125/100),o.type!==J.None&&(n.b=o.type===J.Number?o.value:o.value*125/100),s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const Va={mode:"lab",toMode:{xyz50:Fa,rgb:Hd},fromMode:{xyz50:Wa,rgb:Dd},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Jb],serialize:t=>`lab(${t.l!==void 0?t.l:"none"} ${t.a!==void 0?t.a:"none"} ${t.b!==void 0?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{l:it,a:it,b:it,alpha:{use:it,fixup:ce}}},tx=Ae(ve({},Va),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:md,rgb:eo},fromMode:{xyz65:yd,rgb:no},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}});function ex(t,e){if(!e||e[0]!=="lch")return;const n={mode:"lch"},[,r,i,o,s]=e;if(r.type!==J.None){if(r.type===J.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(i.type!==J.None&&(n.c=Math.max(0,i.type===J.Number?i.value:i.value*150/100)),o.type!==J.None){if(o.type===J.Percentage)return;n.h=o.value}return s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const Ya={mode:"lch",toMode:{lab:Cn,rgb:t=>Hd(Cn(t))},fromMode:{rgb:t=>On(Dd(t)),lab:On},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[ex],serialize:t=>`lch(${t.l!==void 0?t.l:"none"} ${t.c!==void 0?t.c:"none"} ${t.h!==void 0?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:it,fixup:fn},c:it,l:it,alpha:{use:it,fixup:ce}},difference:{h:to},average:{h:pn}},nx=Ae(ve({},Ya),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:t=>Cn(t,"lab65"),rgb:t=>eo(Cn(t,"lab65"))},fromMode:{rgb:t=>On(no(t),"lch65"),lab65:t=>On(t,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Nd=({l:t,u:e,v:n,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.sqrt(e*e+n*n),o={mode:"lchuv",l:t,c:i};return i&&(o.h=me(Math.atan2(n,e)*180/Math.PI)),r!==void 0&&(o.alpha=r),o},jd=({l:t,c:e,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:"luv",l:t,u:e?e*Math.cos(n/180*Math.PI):0,v:e?e*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},Fd=(t,e,n)=>4*t/(t+15*e+3*n),Bd=(t,e,n)=>9*e/(t+15*e+3*n),rx=Fd(se.X,se.Y,se.Z),ix=Bd(se.X,se.Y,se.Z),ox=t=>t<=Na?ho*t:116*Math.cbrt(t)-16,Xa=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=ox(e/se.Y),o=Fd(t,e,n),s=Bd(t,e,n);!isFinite(o)||!isFinite(s)?i=o=s=0:(o=13*i*(o-rx),s=13*i*(s-ix));let a={mode:"luv",l:i,u:o,v:s};return r!==void 0&&(a.alpha=r),a},sx=(t,e,n)=>4*t/(t+15*e+3*n),ax=(t,e,n)=>9*e/(t+15*e+3*n),lx=sx(se.X,se.Y,se.Z),cx=ax(se.X,se.Y,se.Z),Ga=({l:t,u:e,v:n,alpha:r})=>{if(t===void 0&&(t=0),t===0)return{mode:"xyz50",x:0,y:0,z:0};e===void 0&&(e=0),n===void 0&&(n=0);let i=e/(13*t)+lx,o=n/(13*t)+cx,s=se.Y*(t<=8?t/ho:Math.pow((t+16)/116,3)),a=s*(9*i)/(4*o),l=s*(12-3*i-20*o)/(4*o),c={mode:"xyz50",x:a,y:s,z:l};return r!==void 0&&(c.alpha=r),c},hx={mode:"lchuv",toMode:{luv:jd,rgb:t=>Kr(Ga(jd(t)))},fromMode:{rgb:t=>Nd(Xa(Qr(t))),luv:Nd},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:it,fixup:fn},c:it,l:it,alpha:{use:it,fixup:ce}},difference:{h:to},average:{h:pn}},dx=Ae(ve({},xr),{mode:"lrgb",toMode:{rgb:_r},fromMode:{rgb:wr},parse:["srgb-linear"],serialize:"srgb-linear"}),ux={mode:"luv",toMode:{xyz50:Ga,rgb:t=>Kr(Ga(t))},fromMode:{xyz50:Xa,rgb:t=>Xa(Qr(t))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:it,u:it,v:it,alpha:{use:it,fixup:ce}}},Wd=({r:t,g:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.cbrt(.412221469470763*t+.5363325372617348*e+.0514459932675022*n),o=Math.cbrt(.2119034958178252*t+.6806995506452344*e+.1073969535369406*n),s=Math.cbrt(.0883024591900564*t+.2817188391361215*e+.6299787016738222*n),a={mode:"oklab",l:.210454268309314*i+.7936177747023054*o-.0040720430116193*s,a:1.9779985324311684*i-2.42859224204858*o+.450593709617411*s,b:.0259040424655478*i+.7827717124575296*o-.8086757549230774*s};return r!==void 0&&(a.alpha=r),a},uo=t=>{let e=Wd(wr(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},Jr=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.pow(t+.3963377773761749*e+.2158037573099136*n,3),o=Math.pow(t-.1055613458156586*e-.0638541728258133*n,3),s=Math.pow(t-.0894841775298119*e-1.2914855480194092*n,3),a={mode:"lrgb",r:4.076741636075957*i-3.3077115392580616*o+.2309699031821044*s,g:-1.2684379732850317*i+2.6097573492876887*o-.3413193760026573*s,b:-.0041960761386756*i-.7034186179359362*o+1.7076146940746117*s};return r!==void 0&&(a.alpha=r),a},fo=t=>_r(Jr(t));function qa(t){const r=1.170873786407767;return .5*(r*t-.206+Math.sqrt((r*t-.206)*(r*t-.206)+4*.03*r*t))}function po(t){return(t*t+.206*t)/(1.170873786407767*(t+.03))}function fx(t,e){let n,r,i,o,s,a,l,c;-1.88170328*t-.80936493*e>1?(n=1.19086277,r=1.76576728,i=.59662641,o=.75515197,s=.56771245,a=4.0767416621,l=-3.3077115913,c=.2309699292):1.81444104*t-1.19445276*e>1?(n=.73956515,r=-.45954404,i=.08285427,o=.1254107,s=.14503204,a=-1.2684380046,l=2.6097574011,c=-.3413193965):(n=1.35733652,r=-.00915799,i=-1.1513021,o=-.50559606,s=.00692167,a=-.0041960863,l=-.7034186147,c=1.707614701);let h=n+r*t+i*e+o*t*t+s*t*e,u=.3963377774*t+.2158037573*e,f=-.1055613458*t-.0638541728*e,p=-.0894841775*t-1.291485548*e;{let g=1+h*u,y=1+h*f,m=1+h*p,b=g*g*g,v=y*y*y,x=m*m*m,w=3*u*g*g,_=3*f*y*y,$=3*p*m*m,P=6*u*u*g,O=6*f*f*y,T=6*p*p*m,I=a*b+l*v+c*x,S=a*w+l*_+c*$,H=a*P+l*O+c*T;h=h-I*S/(S*S-.5*I*H)}return h}function Ua(t,e){let n=fx(t,e),r=Jr({l:1,a:n*t,b:n*e}),i=Math.cbrt(1/Math.max(r.r,r.g,r.b)),o=i*n;return[i,o]}function px(t,e,n,r,i,o=null){o||(o=Ua(t,e));let s;if((n-i)*o[1]-(o[0]-i)*r<=0)s=o[1]*i/(r*o[0]+o[1]*(i-n));else{s=o[1]*(i-1)/(r*(o[0]-1)+o[1]*(i-n));{let a=n-i,l=r,c=.3963377774*t+.2158037573*e,h=-.1055613458*t-.0638541728*e,u=-.0894841775*t-1.291485548*e,f=a+l*c,p=a+l*h,g=a+l*u;{let y=i*(1-s)+s*n,m=s*r,b=y+m*c,v=y+m*h,x=y+m*u,w=b*b*b,_=v*v*v,$=x*x*x,P=3*f*b*b,O=3*p*v*v,T=3*g*x*x,I=6*f*f*b,S=6*p*p*v,H=6*g*g*x,C=4.0767416621*w-3.3077115913*_+.2309699292*$-1,A=4.0767416621*P-3.3077115913*O+.2309699292*T,B=4.0767416621*I-3.3077115913*S+.2309699292*H,k=A/(A*A-.5*C*B),D=-C*k,z=-1.2684380046*w+2.6097574011*_-.3413193965*$-1,N=-1.2684380046*P+2.6097574011*O-.3413193965*T,j=-1.2684380046*I+2.6097574011*S-.3413193965*H,X=N/(N*N-.5*z*j),L=-z*X,M=-.0041960863*w-.7034186147*_+1.707614701*$-1,R=-.0041960863*P-.7034186147*O+1.707614701*T,W=-.0041960863*I-.7034186147*S+1.707614701*H,U=R/(R*R-.5*M*W),V=-M*U;D=k>=0?D:1e6,L=X>=0?L:1e6,V=U>=0?V:1e6,s+=Math.min(D,Math.min(L,V))}}}return s}function Za(t,e,n=null){n||(n=Ua(t,e));let r=n[0],i=n[1];return[i/r,i/(1-r)]}function Vd(t,e,n){let r=Ua(e,n),i=px(e,n,t,1,t,r),o=Za(e,n,r),s=.11516993+1/(7.4477897+4.1590124*n+e*(-2.19557347+1.75198401*n+e*(-2.13704948-10.02301043*n+e*(-4.24894561+5.38770819*n+4.69891013*e)))),a=.11239642+1/(1.6132032-.68124379*n+e*(.40370612+.90148123*n+e*(-.27087943+.6122399*n+e*(.00299215-.45399568*n-.14661872*e)))),l=i/Math.min(t*o[0],(1-t)*o[1]),c=t*s,h=(1-t)*a,u=.9*l*Math.sqrt(Math.sqrt(1/(1/(c*c*c*c)+1/(h*h*h*h))));return c=t*.4,h=(1-t)*.8,[Math.sqrt(1/(1/(c*c)+1/(h*h))),u,i]}function Yd(t){const e=t.l!==void 0?t.l:0,n=t.a!==void 0?t.a:0,r=t.b!==void 0?t.b:0,i={mode:"okhsl",l:qa(e)};t.alpha!==void 0&&(i.alpha=t.alpha);let o=Math.sqrt(n*n+r*r);if(!o)return i.s=0,i;let[s,a,l]=Vd(e,n/o,r/o),c;if(o<a){let h=0,u=.8*s,f=1-u/a;c=(o-h)/(u+f*(o-h))*.8}else{let h=a,u=.2*a*a*1.25*1.25/s,f=1-u/(l-a);c=.8+.2*((o-h)/(u+f*(o-h)))}return c&&(i.s=c,i.h=me(Math.atan2(r,n)*180/Math.PI)),i}function Xd(t){let e=t.h!==void 0?t.h:0,n=t.s!==void 0?t.s:0,r=t.l!==void 0?t.l:0;const i={mode:"oklab",l:po(r)};if(t.alpha!==void 0&&(i.alpha=t.alpha),!n||r===1)return i.a=i.b=0,i;let o=Math.cos(e/180*Math.PI),s=Math.sin(e/180*Math.PI),[a,l,c]=Vd(i.l,o,s),h,u,f,p;n<.8?(h=1.25*n,u=0,f=.8*a,p=1-f/l):(h=5*(n-.8),u=l,f=.2*l*l*1.25*1.25/a,p=1-f/(c-l));let g=u+h*f/(1-p*h);return i.a=g*o,i.b=g*s,i}const gx=Ae(ve({},_d),{mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:Yd,rgb:t=>Yd(uo(t))},toMode:{oklab:Xd,rgb:t=>fo(Xd(t))}});function Gd(t){let e=t.l!==void 0?t.l:0,n=t.a!==void 0?t.a:0,r=t.b!==void 0?t.b:0,i=Math.sqrt(n*n+r*r),o=i?n/i:1,s=i?r/i:1,[a,l]=Za(o,s),c=.5,h=1-c/a,u=l/(i+e*l),f=u*e,p=u*i,g=po(f),y=p*g/f,m=Jr({l:g,a:o*y,b:s*y}),b=Math.cbrt(1/Math.max(m.r,m.g,m.b,0));e=e/b,i=i/b*qa(e)/e,e=qa(e);const v={mode:"okhsv",s:i?(c+l)*p/(l*c+l*h*p):0,v:e?e/f:0};return v.s&&(v.h=me(Math.atan2(r,n)*180/Math.PI)),t.alpha!==void 0&&(v.alpha=t.alpha),v}function qd(t){const e={mode:"oklab"};t.alpha!==void 0&&(e.alpha=t.alpha);const n=t.h!==void 0?t.h:0,r=t.s!==void 0?t.s:0,i=t.v!==void 0?t.v:0,o=Math.cos(n/180*Math.PI),s=Math.sin(n/180*Math.PI),[a,l]=Za(o,s),c=.5,h=1-c/a,u=1-r*c/(c+l-l*h*r),f=r*l*c/(c+l-l*h*r),p=po(u),g=f*p/u,y=Jr({l:p,a:o*g,b:s*g}),m=Math.cbrt(1/Math.max(y.r,y.g,y.b,0)),b=po(i*u),v=f*b/u;return e.l=b*m,e.a=v*o*m,e.b=v*s*m,e}const mx=Ae(ve({},Od),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Gd,rgb:t=>Gd(uo(t))},toMode:{oklab:qd,rgb:t=>fo(qd(t))}});function yx(t,e){if(!e||e[0]!=="oklab")return;const n={mode:"oklab"},[,r,i,o,s]=e;if(!(r.type===J.Hue||i.type===J.Hue||o.type===J.Hue))return r.type!==J.None&&(n.l=Math.min(Math.max(0,r.type===J.Number?r.value:r.value/100),1)),i.type!==J.None&&(n.a=i.type===J.Number?i.value:i.value*.4/100),o.type!==J.None&&(n.b=o.type===J.Number?o.value:o.value*.4/100),s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const vx=Ae(ve({},Va),{mode:"oklab",toMode:{lrgb:Jr,rgb:fo},fromMode:{lrgb:Wd,rgb:uo},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[yx],serialize:t=>`oklab(${t.l!==void 0?t.l:"none"} ${t.a!==void 0?t.a:"none"} ${t.b!==void 0?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`});function bx(t,e){if(!e||e[0]!=="oklch")return;const n={mode:"oklch"},[,r,i,o,s]=e;if(r.type!==J.None){if(r.type===J.Hue)return;n.l=Math.min(Math.max(0,r.type===J.Number?r.value:r.value/100),1)}if(i.type!==J.None&&(n.c=Math.max(0,i.type===J.Number?i.value:i.value*.4/100)),o.type!==J.None){if(o.type===J.Percentage)return;n.h=o.value}return s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const Ud=Ae(ve({},Ya),{mode:"oklch",toMode:{oklab:t=>Cn(t,"oklab"),rgb:t=>fo(Cn(t,"oklab"))},fromMode:{rgb:t=>On(uo(t),"oklch"),oklab:t=>On(t,"oklch")},parse:[bx],serialize:t=>`oklch(${t.l!==void 0?t.l:"none"} ${t.c!==void 0?t.c:"none"} ${t.h!==void 0?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),Zd=t=>{let{r:e,g:n,b:r,alpha:i}=wr(t),o={mode:"xyz65",x:.486570948648216*e+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*e+.6917385218365062*n+.079286914093745*r,z:0*e+.0451133818589026*n+1.043944368900976*r};return i!==void 0&&(o.alpha=i),o},Kd=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=_r({r:t*2.4934969119414263-e*.9313836179191242-.402710784450717*n,g:t*-.8294889695615749+e*1.7626640603183465+.0236246858419436*n,b:t*.0358458302437845-e*.0761723892680418+.9568845240076871*n},"p3");return r!==void 0&&(i.alpha=r),i},xx=Ae(ve({},xr),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:t=>Kd(jn(t)),xyz65:Kd},toMode:{rgb:t=>Fn(Zd(t)),xyz65:Zd}}),Ka=t=>{let e=Math.abs(t);return e>=1/512?Math.sign(t)*Math.pow(e,1/1.8):16*t},Qd=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"prophoto",r:Ka(t*1.3457868816471585-e*.2555720873797946-.0511018649755453*n),g:Ka(t*-.5446307051249019+e*1.5082477428451466+.0205274474364214*n),b:Ka(t*0+e*0+1.2119675456389452*n)};return r!==void 0&&(i.alpha=r),i},Qa=(t=0)=>{let e=Math.abs(t);return e>=16/512?Math.sign(t)*Math.pow(e,1.8):t/16},Jd=t=>{let e=Qa(t.r),n=Qa(t.g),r=Qa(t.b),i={mode:"xyz50",x:.7977666449006423*e+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*e+.7118352342418731*n+899369387256e-16*r,z:0*e+0*n+.8251046025104602*r};return t.alpha!==void 0&&(i.alpha=t.alpha),i},wx=Ae(ve({},xr),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:Qd,rgb:t=>Qd(Qr(t))},toMode:{xyz50:Jd,rgb:t=>Kr(Jd(t))}}),tu=1.09929682680944,_x=.018053968510807,Ja=t=>{const e=Math.abs(t);return e>_x?(Math.sign(t)||1)*(tu*Math.pow(e,.45)-(tu-1)):4.5*t},eu=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"rec2020",r:Ja(t*1.7166511879712683-e*.3556707837763925-.2533662813736599*n),g:Ja(t*-.6666843518324893+e*1.6164812366349395+.0157685458139111*n),b:Ja(t*.0176398574453108-e*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(i.alpha=r),i},nu=1.09929682680944,$x=.018053968510807,tl=(t=0)=>{let e=Math.abs(t);return e<$x*4.5?t/4.5:(Math.sign(t)||1)*Math.pow((e+nu-1)/nu,1/.45)},ru=t=>{let e=tl(t.r),n=tl(t.g),r=tl(t.b),i={mode:"xyz65",x:.6369580483012911*e+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*e+.6779980715188708*n+.059301716469862*r,z:0*e+.0280726930490874*n+1.0609850577107909*r};return t.alpha!==void 0&&(i.alpha=t.alpha),i},Px=Ae(ve({},xr),{mode:"rec2020",fromMode:{xyz65:eu,rgb:t=>eu(jn(t))},toMode:{xyz65:ru,rgb:t=>Fn(ru(t))},parse:["rec2020"],serialize:"rec2020"}),Bn=.0037930732552754493,iu=Math.cbrt(Bn),el=t=>Math.cbrt(t)-iu,Ox=t=>{const{r:e,g:n,b:r,alpha:i}=wr(t),o=el(.3*e+.622*n+.078*r+Bn),s=el(.23*e+.692*n+.078*r+Bn),a=el(.2434226892454782*e+.2047674442449682*n+.5518098665095535*r+Bn),l={mode:"xyb",x:(o-s)/2,y:(o+s)/2,b:a-(o+s)/2};return i!==void 0&&(l.alpha=i),l},nl=t=>Math.pow(t+iu,3),Cx={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:({x:t,y:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i=nl(t+e)-Bn,o=nl(e-t)-Bn,s=nl(n+e)-Bn,a=_r({r:11.031566904639861*i-9.866943908131562*o-.16462299650829934*s,g:-3.2541473810744237*i+4.418770377582723*o-.16462299650829934*s,b:-3.6588512867136815*i+2.7129230459360922*o+1.9459282407775895*s});return r!==void 0&&(a.alpha=r),a}},fromMode:{rgb:Ox},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:it,y:it,b:it,alpha:{use:it,fixup:ce}}},Mx={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Kr,lab:Wa},fromMode:{rgb:Qr,lab:Fa},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:it,y:it,z:it,alpha:{use:it,fixup:ce}}},Sx={mode:"xyz65",toMode:{rgb:Fn,xyz50:t=>{let{x:e,y:n,z:r,alpha:i}=t;e===void 0&&(e=0),n===void 0&&(n=0),r===void 0&&(r=0);let o={mode:"xyz50",x:1.0479298208405488*e+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*e+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*e+.0150551448965779*n+.7518742899580008*r};return i!==void 0&&(o.alpha=i),o}},fromMode:{rgb:jn,xyz50:t=>{let{x:e,y:n,z:r,alpha:i}=t;e===void 0&&(e=0),n===void 0&&(n=0),r===void 0&&(r=0);let o={mode:"xyz65",x:.9554734527042182*e-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*e+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*e-.0205076964334779*n+1.3303659366080753*r};return i!==void 0&&(o.alpha=i),o}},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:it,y:it,z:it,alpha:{use:it,fixup:ce}}},Ex={mode:"yiq",toMode:{rgb:({y:t,i:e,q:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i={mode:"rgb",r:t+.95608445*e+.6208885*n,g:t-.27137664*e-.6486059*n,b:t-1.10561724*e+1.70250126*n};return r!==void 0&&(i.alpha=r),i}},fromMode:{rgb:({r:t,g:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i={mode:"yiq",y:.29889531*t+.58662247*e+.11448223*n,i:.59597799*t-.2741761*e-.32180189*n,q:.21147017*t-.52261711*e+.31114694*n};return r!==void 0&&(i.alpha=r),i}},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:it,i:it,q:it,alpha:{use:it,fixup:ce}}},Ix=t=>Math.max(0,Math.min(1,t||0)),go=t=>Math.round(Ix(t)*255),ou=xa("rgb"),su=t=>{if(t===void 0)return;let e=go(t.r),n=go(t.g),r=go(t.b);return"#"+(1<<24|e<<16|n<<8|r).toString(16).slice(1)},Tx=t=>{if(t===void 0)return;let e=go(t.alpha!==void 0?t.alpha:1);return su(t)+(256|e).toString(16).slice(1)},ti=t=>su(ou(t)),Ax=t=>Tx(ou(t));function rl(t){let e=xa("lrgb")(t);return .2126*e.r+.7152*e.g+.0722*e.b}function il(t,e){let n=rl(t),r=rl(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}Ht(Pb),Ht(Tb),Ht(Ab),Ht(kb),Ht(Rb),Ht(_d),Ht(Od),Ht(Xb),Ht(Gb),Ht(Kb),Ht(Qb),Ht(Va),Ht(tx),Ht(Ya),Ht(nx),Ht(hx),Ht(dx),Ht(ux),Ht(gx),Ht(mx),Ht(vx);const au=Ht(Ud);Ht(xx),Ht(wx),Ht(Px),Ht(xr),Ht(Cx),Ht(Mx),Ht(Sx),Ht(Ex);function Wn(t){if(!t)return!1;const e=t.trim().toLowerCase();return!(e==="none"||e==="transparent"||e==="")}function lu(t){const e=tn(t);return e?rl(e)<.5:!1}var Mn=Array.isArray,cu=typeof global=="object"&&global&&global.Object===Object&&global,kx=typeof self=="object"&&self&&self.Object===Object&&self,en=cu||kx||Function("return this")(),Sn=en.Symbol,hu=Object.prototype,zx=hu.hasOwnProperty,Lx=hu.toString,ei=Sn?Sn.toStringTag:void 0;function Rx(t){var e=zx.call(t,ei),n=t[ei];try{t[ei]=void 0;var r=!0}catch(o){}var i=Lx.call(t);return r&&(e?t[ei]=n:delete t[ei]),i}var Hx=Object.prototype,Dx=Hx.toString;function Nx(t){return Dx.call(t)}var jx="[object Null]",Fx="[object Undefined]",du=Sn?Sn.toStringTag:void 0;function Vn(t){return t==null?t===void 0?Fx:jx:du&&du in Object(t)?Rx(t):Nx(t)}function En(t){return t!=null&&typeof t=="object"}var Bx="[object Symbol]";function mo(t){return typeof t=="symbol"||En(t)&&Vn(t)==Bx}var Wx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vx=/^\w*$/;function Yx(t,e){if(Mn(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||mo(t)?!0:Vx.test(t)||!Wx.test(t)||e!=null&&t in Object(e)}function nn(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Xx="[object AsyncFunction]",Gx="[object Function]",qx="[object GeneratorFunction]",Ux="[object Proxy]";function ol(t){if(!nn(t))return!1;var e=Vn(t);return e==Gx||e==qx||e==Xx||e==Ux}var sl=en["__core-js_shared__"],uu=(function(){var t=/[^.]+$/.exec(sl&&sl.keys&&sl.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Zx(t){return!!uu&&uu in t}var Kx=Function.prototype,Qx=Kx.toString;function Yn(t){if(t!=null){try{return Qx.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var Jx=/[\\^$.*+?()[\]{}|]/g,tw=/^\[object .+?Constructor\]$/,ew=Function.prototype,nw=Object.prototype,rw=ew.toString,iw=nw.hasOwnProperty,ow=RegExp("^"+rw.call(iw).replace(Jx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function sw(t){if(!nn(t)||Zx(t))return!1;var e=ol(t)?ow:tw;return e.test(Yn(t))}function aw(t,e){return t==null?void 0:t[e]}function Xn(t,e){var n=aw(t,e);return sw(n)?n:void 0}var ni=Xn(Object,"create");function lw(){this.__data__=ni?ni(null):{},this.size=0}function cw(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var hw="__lodash_hash_undefined__",dw=Object.prototype,uw=dw.hasOwnProperty;function fw(t){var e=this.__data__;if(ni){var n=e[t];return n===hw?void 0:n}return uw.call(e,t)?e[t]:void 0}var pw=Object.prototype,gw=pw.hasOwnProperty;function mw(t){var e=this.__data__;return ni?e[t]!==void 0:gw.call(e,t)}var yw="__lodash_hash_undefined__";function vw(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ni&&e===void 0?yw:e,this}function Gn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Gn.prototype.clear=lw,Gn.prototype.delete=cw,Gn.prototype.get=fw,Gn.prototype.has=mw,Gn.prototype.set=vw;function bw(){this.__data__=[],this.size=0}function yo(t,e){return t===e||t!==t&&e!==e}function vo(t,e){for(var n=t.length;n--;)if(yo(t[n][0],e))return n;return-1}var xw=Array.prototype,ww=xw.splice;function _w(t){var e=this.__data__,n=vo(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():ww.call(e,n,1),--this.size,!0}function $w(t){var e=this.__data__,n=vo(e,t);return n<0?void 0:e[n][1]}function Pw(t){return vo(this.__data__,t)>-1}function Ow(t,e){var n=this.__data__,r=vo(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function gn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}gn.prototype.clear=bw,gn.prototype.delete=_w,gn.prototype.get=$w,gn.prototype.has=Pw,gn.prototype.set=Ow;var ri=Xn(en,"Map");function Cw(){this.size=0,this.__data__={hash:new Gn,map:new(ri||gn),string:new Gn}}function Mw(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function bo(t,e){var n=t.__data__;return Mw(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Sw(t){var e=bo(this,t).delete(t);return this.size-=e?1:0,e}function Ew(t){return bo(this,t).get(t)}function Iw(t){return bo(this,t).has(t)}function Tw(t,e){var n=bo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function In(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}In.prototype.clear=Cw,In.prototype.delete=Sw,In.prototype.get=Ew,In.prototype.has=Iw,In.prototype.set=Tw;var Aw="Expected a function";function al(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Aw);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(al.Cache||In),n}al.Cache=In;var kw=500;function zw(t){var e=al(t,function(r){return n.size===kw&&n.clear(),r}),n=e.cache;return e}var Lw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rw=/\\(\\)?/g,Hw=zw(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Lw,function(n,r,i,o){e.push(i?o.replace(Rw,"$1"):r||n)}),e});function Dw(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var fu=Sn?Sn.prototype:void 0,pu=fu?fu.toString:void 0;function gu(t){if(typeof t=="string")return t;if(Mn(t))return Dw(t,gu)+"";if(mo(t))return pu?pu.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ii(t){return t==null?"":gu(t)}function Nw(t,e){return Mn(t)?t:Yx(t,e)?[t]:Hw(ii(t))}function jw(t){if(typeof t=="string"||mo(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Fw(t,e){e=Nw(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[jw(e[n++])];return n&&n==r?t:void 0}function mu(t,e,n){var r=t==null?void 0:Fw(t,e);return r===void 0?n:r}function Pr(t,e){if(e.length===0)return{};const n=Array.isArray(t)?t[e[0]]:t.items[e[0]];if(e.length===1)return n;const r=e.slice(1).map(i=>`children[${i}]`).join(".");return mu(n,r)}function yu(t){const{structure:e,item:n,items:r}=t;return!(!e||!n||r.some(i=>!i))}function Bw(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}function Ww(t,e,n){var r=t.length;return n=n===void 0?r:n,!e&&n>=r?t:Bw(t,e,n)}var Vw="\\ud800-\\udfff",Yw="\\u0300-\\u036f",Xw="\\ufe20-\\ufe2f",Gw="\\u20d0-\\u20ff",qw=Yw+Xw+Gw,Uw="\\ufe0e\\ufe0f",Zw="\\u200d",Kw=RegExp("["+Zw+Vw+qw+Uw+"]");function vu(t){return Kw.test(t)}function Qw(t){return t.split("")}var bu="\\ud800-\\udfff",Jw="\\u0300-\\u036f",t_="\\ufe20-\\ufe2f",e_="\\u20d0-\\u20ff",n_=Jw+t_+e_,r_="\\ufe0e\\ufe0f",i_="["+bu+"]",ll="["+n_+"]",cl="\\ud83c[\\udffb-\\udfff]",o_="(?:"+ll+"|"+cl+")",xu="[^"+bu+"]",wu="(?:\\ud83c[\\udde6-\\uddff]){2}",_u="[\\ud800-\\udbff][\\udc00-\\udfff]",s_="\\u200d",$u=o_+"?",Pu="["+r_+"]?",a_="(?:"+s_+"(?:"+[xu,wu,_u].join("|")+")"+Pu+$u+")*",l_=Pu+$u+a_,c_="(?:"+[xu+ll+"?",ll,wu,_u,i_].join("|")+")",h_=RegExp(cl+"(?="+cl+")|"+c_+l_,"g");function d_(t){return t.match(h_)||[]}function u_(t){return vu(t)?d_(t):Qw(t)}function f_(t){return function(e){e=ii(e);var n=vu(e)?u_(e):void 0,r=n?n[0]:e.charAt(0),i=n?Ww(n,1).join(""):e.slice(1);return r[t]()+i}}var p_=f_("toUpperCase");function g_(t){return p_(ii(t).toLowerCase())}function m_(t,e,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;)n=e(n,t[i],i,t);return n}function y_(t){return function(e){return t==null?void 0:t[e]}}var v_={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},b_=y_(v_),x_=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,w_="\\u0300-\\u036f",__="\\ufe20-\\ufe2f",$_="\\u20d0-\\u20ff",P_=w_+__+$_,O_="["+P_+"]",C_=RegExp(O_,"g");function M_(t){return t=ii(t),t&&t.replace(x_,b_).replace(C_,"")}var S_=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function E_(t){return t.match(S_)||[]}var I_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function T_(t){return I_.test(t)}var Ou="\\ud800-\\udfff",A_="\\u0300-\\u036f",k_="\\ufe20-\\ufe2f",z_="\\u20d0-\\u20ff",L_=A_+k_+z_,Cu="\\u2700-\\u27bf",Mu="a-z\\xdf-\\xf6\\xf8-\\xff",R_="\\xac\\xb1\\xd7\\xf7",H_="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",D_="\\u2000-\\u206f",N_=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Su="A-Z\\xc0-\\xd6\\xd8-\\xde",j_="\\ufe0e\\ufe0f",Eu=R_+H_+D_+N_,Iu="['’]",Tu="["+Eu+"]",F_="["+L_+"]",Au="\\d+",B_="["+Cu+"]",ku="["+Mu+"]",zu="[^"+Ou+Eu+Au+Cu+Mu+Su+"]",W_="\\ud83c[\\udffb-\\udfff]",V_="(?:"+F_+"|"+W_+")",Y_="[^"+Ou+"]",Lu="(?:\\ud83c[\\udde6-\\uddff]){2}",Ru="[\\ud800-\\udbff][\\udc00-\\udfff]",Or="["+Su+"]",X_="\\u200d",Hu="(?:"+ku+"|"+zu+")",G_="(?:"+Or+"|"+zu+")",Du="(?:"+Iu+"(?:d|ll|m|re|s|t|ve))?",Nu="(?:"+Iu+"(?:D|LL|M|RE|S|T|VE))?",ju=V_+"?",Fu="["+j_+"]?",q_="(?:"+X_+"(?:"+[Y_,Lu,Ru].join("|")+")"+Fu+ju+")*",U_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",K_=Fu+ju+q_,Q_="(?:"+[B_,Lu,Ru].join("|")+")"+K_,J_=RegExp([Or+"?"+ku+"+"+Du+"(?="+[Tu,Or,"$"].join("|")+")",G_+"+"+Nu+"(?="+[Tu,Or+Hu,"$"].join("|")+")",Or+"?"+Hu+"+"+Du,Or+"+"+Nu,Z_,U_,Au,Q_].join("|"),"g");function t4(t){return t.match(J_)||[]}function e4(t,e,n){return t=ii(t),e=e,e===void 0?T_(t)?t4(t):E_(t):t.match(e)||[]}var n4="['’]",r4=RegExp(n4,"g");function Bu(t){return function(e){return m_(e4(M_(e).replace(r4,"")),t,"")}}var i4=Bu(function(t,e,n){return e=e.toLowerCase(),t+(n?g_(e):e)});const o4=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","-apple-system","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function qn(t){const e=[];let n="",r=null;const i=()=>{const o=n.trim();o&&e.push(o),n=""};for(let o=0;o<t.length;o+=1){const s=t[o];if(r){n+=s,s===r&&(r=null);continue}if(s==='"'||s==="'"){r=s,n+=s;continue}if(s===","){i();continue}n+=s}return i(),e}function Wu(t){const e=t.trim();return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function s4(t){const e=t.trim();return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")}function a4(t){return/^\d/.test(t)||/\s/.test(t)}function l4(t){const e=t.trim();if(!e||s4(e)||o4.has(e.toLowerCase())||!a4(e))return e;const n=e.includes('"')&&!e.includes("'")?"'":'"';return`${n}${e}${n}`}function Cr(t){const e=qn(t);return e.length?e.length===1?Wu(e[0]):e.map(n=>Wu(n)).join(", "):""}function Un(t){const e=qn(t);return e.length?e.map(n=>l4(n)).join(", "):t.trim()}const c4={100:"thin",hairline:"thin",thin:"thin",200:"extralight",ultralight:"extralight",extralight:"extralight",300:"light",light:"light",400:"regular",normal:"regular",regular:"regular",500:"medium",medium:"medium",600:"semibold",demibold:"semibold",semibold:"semibold",700:"bold",bold:"bold",800:"extrabold",ultrabold:"extrabold",extrabold:"extrabold",900:"black",heavy:"black",black:"black",950:"extrablack",ultrablack:"extrablack",extrablack:"extrablack"};function Vu(t){const e=String(t).toLowerCase();return c4[e]||"regular"}function wt(t,e={}){const n=document.createElementNS("http://www.w3.org/2000/svg",t);return Yt(n,e),n}function Mr(t){const n=new DOMParser().parseFromString(t,"image/svg+xml");if(n.querySelector("parsererror"))throw new Error("Invalid SVG string");return n.documentElement}function Yt(t,e){Object.entries(e).forEach(([n,r])=>{r==null?t.removeAttribute(n):t.setAttribute(n,r)})}function ke(t,e,n=!0){return e.reduce((r,i)=>{const o=t.getAttribute(i);return(!n||o!==null&&o!==""&&o!==void 0)&&(r[i]=o),r},{})}function h4(t,e){e.forEach(n=>{t.removeAttribute(n)})}function hl(t,e){if(e(t)===!1)return;Array.from(t.children).forEach(r=>{hl(r,e)})}function xo(t,e="infographic-defs"){const n=e?`defs#${e}`:"defs",r=t.querySelector(n);if(r)return r;const i=wt("defs");return e&&(i.id=e),t.prepend(i),i}var Yu=Object.getOwnPropertySymbols,d4=Object.prototype.hasOwnProperty,u4=Object.prototype.propertyIsEnumerable,f4=(t,e)=>{var n={};for(var r in t)d4.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Yu)for(var r of Yu(t))e.indexOf(r)<0&&u4.call(t,r)&&(n[r]=t[r]);return n};function Zn(t){return qu(t)?t.querySelector("span"):null}function p4(t,e){const n=document.createElement("span"),r=wt("foreignObject",{overflow:"visible"});return r.appendChild(n),Xu(r,{textContent:t,attributes:e}),r}function Xu(t,e){const{textContent:n,attributes:r}=e;if(n!==void 0&&ul(t,n),!r)return;const i=Zn(t);let{width:o,height:s}=r;const a={};if(i){if(Object.assign(i.style,m4(r)),!o||!s){const p=y4(i);!o&&!t.hasAttribute("width")&&(o=String(p.width)),!s&&!t.hasAttribute("height")&&(s=String(p.height))}const{"data-horizontal-align":u,"data-vertical-align":f}=r;Object.assign(i.style,g4(u,f))}const{id:l,x:c,y:h}=r;l&&(a.id=l),c!==void 0&&(a.x=String(c)),h!==void 0&&(a.y=String(h)),o!==void 0&&(a.width=String(o)),s!==void 0&&(a.height=String(s)),Yt(t,a)}function g4(t,e){const n={width:"100%",height:"100%",display:"flex",flexWrap:"wrap",wordBreak:"break-word",whiteSpace:"pre-wrap"};switch(t){case"LEFT":n.textAlign="left",n.justifyContent="flex-start";break;case"CENTER":n.textAlign="center",n.justifyContent="center";break;case"RIGHT":n.textAlign="right",n.justifyContent="flex-end";break}switch(e){case"TOP":n.alignContent="flex-start",n.alignItems="flex-start";break;case"MIDDLE":n.alignContent="center",n.alignItems="center";break;case"BOTTOM":n.alignContent="flex-end",n.alignItems="flex-end";break}return n}function m4(t){const e=t,{x:n,y:r,width:i,height:o,["data-horizontal-align"]:s,["data-vertical-align"]:a,["font-size"]:l,["letter-spacing"]:c,["line-height"]:h,fill:u,["stroke-width"]:f,["text-anchor"]:p,["dominant-baseline"]:g,["font-family"]:y}=e,m=f4(e,["x","y","width","height","data-horizontal-align","data-vertical-align","font-size","letter-spacing","line-height","fill","stroke-width","text-anchor","dominant-baseline","font-family"]),b={overflow:"visible"};return u&&(b.color=u),Object.entries(m).forEach(([v,x])=>{b[i4(v)]=x}),l&&(b.fontSize=`${l}px`),h&&(b.lineHeight=typeof h=="string"&&h.endsWith("px")?h:+h),c&&(b.letterSpacing=`${c}px`),f&&(b.strokeWidth=`${f}px`),b.fontFamily=y?Un(y):y||"",b}function y4(t){const e=t.parentNode;t.style.visibility="hidden",document.body.appendChild(t);const n=t.getBoundingClientRect();return e?e.appendChild(t):document.body.removeChild(t),t.style.visibility="visible",n}function dl(t){var e;return((e=Zn(t))==null?void 0:e.innerText)||""}function ul(t,e){const n=Zn(t);n&&(n.innerText=e)}function fl(t){const e=Zn(t);if(!e)return{};const{color:n,fontSize:r,fontFamily:i,justifyContent:o,alignContent:s,fontWeight:a}=e.style,[l,c]=v4(o,s),h={"data-horizontal-align":l,"data-vertical-align":c};return i&&(h["font-family"]=Cr(i)),a&&(h["font-weight"]=a),r&&(h["font-size"]=String(parseInt(r))),n&&(h.fill=n),{attributes:h,textContent:dl(t)}}function v4(t,e){let n="LEFT",r="TOP";switch(t){case"flex-start":n="LEFT";break;case"center":n="CENTER";break;case"flex-end":n="RIGHT";break}switch(e){case"flex-start":r="TOP";break;case"center":r="MIDDLE";break;case"flex-end":r="BOTTOM";break}return[n,r]}const _e=(t,e)=>{var n;return((n=t==null?void 0:t.dataset)==null?void 0:n.elementType)===e},b4=t=>_e(t,"title"),x4=t=>_e(t,"desc"),w4=t=>_e(t,"shape"),_4=t=>_e(t,"shapes-group"),$4=t=>_e(t,"illus"),P4=t=>t instanceof SVGElement&&t.tagName==="text",O4=t=>t instanceof SVGElement&&t.tagName==="g",pl=t=>_e(t,"item-icon"),Gu=t=>_e(t,"item-icon-group"),C4=t=>_e(t,"item-label"),M4=t=>_e(t,"item-desc"),S4=t=>_e(t,"item-value"),E4=t=>_e(t,"item-illus"),I4=t=>_e(t,"edit-area"),T4=t=>_e(t,"btns-group"),A4=t=>_e(t,"rough-element"),k4=t=>_e(t,"rough-volume");function qu(t){return t.tagName==="foreignObject"}function z4(t){return t.tagName==="SPAN"}function mn(t){const e=gl(t);return[kt.Title,kt.Desc,kt.ItemLabel,kt.ItemDesc].includes(e)}function Uu(t){if(!t||!mn(t))return!1;const e=Zn(t);return e?e.hasAttribute("contenteditable"):!1}function L4(t){const e=t.tagName.toLowerCase();return["rect","circle","ellipse","line","polygon","polyline","path"].includes(e)}function Tn(t){return pl(t)||Gu(t)}function R4(t){let e=t;for(;e;){if(Sr(e,ya))return!0;e=e.parentElement}return!1}function oi(t,e){t.setAttribute("data-element-type",e)}function Sr(t,e){return t.querySelector(`[data-element-type="${e}"]`)}function gl(t){return Tn(t)?kt.ItemIcon:t.getAttribute("data-element-type")||kt.Unknown}function H4(t){var e,n,r,i=t;function o(a,l){++e>i&&(r=n,s(1),++e),n[a]=l}function s(a){e=0,n=Object.create(null),a||(r=Object.create(null))}return s(),{clear:s,has:function(a){return n[a]!==void 0||r[a]!==void 0},get:function(a){var l=n[a];if(l!==void 0)return l;if((l=r[a])!==void 0)return o(a,l),l},set:function(a,l){n[a]!==void 0?n[a]=l:o(a,l)}}}var Zu=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});const Ku=globalThis.fetch,ml=H4(1024),yl=new Map;function D4(t){const e=Array.from(t.headers.entries());return e.length===0?"":(e.sort(([n],[r])=>n.toLowerCase().localeCompare(r.toLowerCase())),e.map(([n,r])=>`${n.toLowerCase()}:${r}`).join("|"))}function N4(t){const e=D4(t);return e?`${t.method}:${t.url}:${e}`:`${t.method}:${t.url}`}function Qu(t){return new Response(t.body.slice(0),t.init)}function j4(t,e){return Zu(this,null,function*(){try{const n=yield Ku(t),i={body:yield n.arrayBuffer(),init:{status:n.status,statusText:n.statusText,headers:Array.from(n.headers.entries())}};return n.ok&&ml.set(e,i),i}finally{yl.delete(e)}})}function wo(t,e){return Zu(this,null,function*(){const n=new Request(t,e);if(n.method!=="GET")return Ku(n);const r=N4(n);if(ml.has(r))return Qu(ml.get(r));let i=yl.get(r);i||(i=j4(n,r),yl.set(r,i));const o=yield i;return Qu(o)})}function F4(t,e={title:"信息图标题",desc:"信息图描述",items:"信息图的内容项",label:"项目标签文本",value:"项目数值内容",icon:"项目图标",illus:"项目插图",children:"子级项目(多层结构)"}){const{structure:n,items:r}=t,i=[],o=l=>" ".repeat(l);function s(l,c,h){const u=e[l];return u?`${o(h)}/** ${u} */
1
+ (function(F,ge){typeof exports=="object"&&typeof module!="undefined"?ge(exports):typeof define=="function"&&define.amd?define(["exports"],ge):(F=typeof globalThis!="undefined"?globalThis:F||self,ge(F.AntVInfographic={}))})(this,(function(F){"use strict";var pj=Object.defineProperty,gj=Object.defineProperties;var mj=Object.getOwnPropertyDescriptors;var Lv=Object.getOwnPropertySymbols;var yj=Object.prototype.hasOwnProperty,vj=Object.prototype.propertyIsEnumerable;var Gi=Math.pow,zv=(F,ge,De)=>ge in F?pj(F,ge,{enumerable:!0,configurable:!0,writable:!0,value:De}):F[ge]=De,xe=(F,ge)=>{for(var De in ge||(ge={}))yj.call(ge,De)&&zv(F,De,ge[De]);if(Lv)for(var De of Lv(ge))vj.call(ge,De)&&zv(F,De,ge[De]);return F},Ae=(F,ge)=>gj(F,mj(ge));const De={version:"0.2.3"},ma=new Map;function jh(t,e){ma.set(t,e)}function Fh(t){return ma.get(t)}function Hv(){return Array.from(ma.keys())}var Rv=Object.defineProperty,Bh=Object.getOwnPropertySymbols,Dv=Object.prototype.hasOwnProperty,Nv=Object.prototype.propertyIsEnumerable,Wh=(t,e,n)=>e in t?Rv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vh=(t,e)=>{for(var n in e||(e={}))Dv.call(e,n)&&Wh(t,n,e[n]);if(Bh)for(var n of Bh(e))Nv.call(e,n)&&Wh(t,n,e[n]);return t};const Yr={edgeType:"curved",edgeColorMode:"gradient",edgeWidth:2,colorMode:"branch",levelGap:80,nodeGap:18},Xr={edgeType:"curved",edgeWidth:2,edgeColorMode:"gradient",colorMode:"level",levelGap:80,nodeGap:18},Yh={type:"lined-text",usePaletteColor:!0,showUnderline:!0,underlineThickness:2},Xh={type:"capsule-item"},Gh={type:"circular-progress"},qh={type:"rounded-rect-node",positionH:"center"},Uh={type:"compact-card"},jv=(t,e)=>Vh(Vh({type:"hierarchy-mindmap"},e!==void 0?{edgeAlign:e}:{}),t),Qe=(t,e,n,r)=>[t,{design:{structure:jv(e,r),item:n}}],Fv=Object.fromEntries([Qe("hierarchy-mindmap-branch-gradient-lined-palette",Yr,Yh,"bottom"),Qe("hierarchy-mindmap-level-gradient-lined-palette",Xr,Yh,"bottom"),Qe("hierarchy-mindmap-branch-gradient-capsule-item",Yr,Xh),Qe("hierarchy-mindmap-level-gradient-capsule-item",Xr,Xh),Qe("hierarchy-mindmap-branch-gradient-circle-progress",Yr,Gh,.4),Qe("hierarchy-mindmap-level-gradient-circle-progress",Xr,Gh,.4),Qe("hierarchy-mindmap-branch-gradient-rounded-rect",Yr,qh),Qe("hierarchy-mindmap-level-gradient-rounded-rect",Xr,qh),Qe("hierarchy-mindmap-branch-gradient-compact-card",Yr,Uh),Qe("hierarchy-mindmap-level-gradient-compact-card",Xr,Uh)]);var Bv=Object.defineProperty,Zh=Object.getOwnPropertySymbols,Wv=Object.prototype.hasOwnProperty,Vv=Object.prototype.propertyIsEnumerable,Kh=(t,e,n)=>e in t?Bv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qh=(t,e)=>{for(var n in e||(e={}))Wv.call(e,n)&&Kh(t,n,e[n]);if(Zh)for(var n of Zh(e))Vv.call(e,n)&&Kh(t,n,e[n]);return t};const Yv={"tech-style":{edgeType:"straight",edgeStyle:"solid",edgeColorMode:"gradient",edgeMarker:"arrow",markerSize:12,edgeCornerRadius:5},"dashed-line":{edgeStyle:"dashed",edgeCornerRadius:10,edgeDashPattern:"10,5",edgeColorMode:"gradient",edgeMarker:"dot",markerSize:6,edgeOffset:6},"distributed-origin":{edgeOrigin:"distributed",edgeOriginPadding:30,edgeMarker:"arrow",edgeCornerRadius:10,markerSize:12,edgeColorMode:"gradient"},"curved-line":{edgeType:"curved",edgeColorMode:"gradient",edgeMarker:"none"},"dashed-arrow":{edgeType:"straight",edgeStyle:"dashed",edgeDashPattern:"8,4",edgeMarker:"arrow",markerSize:10,edgeCornerRadius:0}},Xv=["capsule-item","rounded-rect-node","compact-card","badge-card","ribbon-card"],Jh={},td="hierarchy-tree",Gv=[{key:""},{key:"bt",orientation:"bottom-top"},{key:"lr",orientation:"left-right"},{key:"rl",orientation:"right-left"}],qv=(t,e,n)=>t?`${td}-${t}-${e}-${n}`:`${td}-${e}-${n}`;for(const t of Xv)for(const[e,n]of Object.entries(Yv))for(const{key:r,orientation:i}of Gv){const o=qv(r,e,t);Jh[o]={design:{structure:Qh(Qh({type:"hierarchy-tree"},i?{orientation:i}:{}),n),item:{type:t}}}}const Uv={"list-zigzag-up-compact-card":{design:{title:"default",structure:{type:"list-zigzag-up"},items:[{type:"compact-card"}]},themeConfig:{colorPrimary:"#17CA2C"}},"list-zigzag-up-simple":{design:{title:"default",structure:{type:"list-zigzag-up"},items:[{type:"simple",usePaletteColor:!0}]},themeConfig:{colorPrimary:"#17CA2C"}},"list-zigzag-down-compact-card":{design:{title:"default",structure:{type:"list-zigzag-down"},items:[{type:"compact-card"}]},themeConfig:{colorPrimary:"#17CA2C"}},"list-zigzag-down-simple":{design:{title:"default",structure:{type:"list-zigzag-down"},items:[{type:"simple",usePaletteColor:!0}]},themeConfig:{colorPrimary:"#17CA2C"}}},Zv={"sequence-stairs-front-pill-badge":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"pill-badge"}]}},"sequence-stairs-front-compact-card":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"compact-card"}]}},"sequence-stairs-front-simple":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"simple",usePaletteColor:!0}]}}},Kv={"chart-wordcloud-rotate":{design:{structure:{type:"chart-wordcloud"},item:"simple"}},"chart-wordcloud":{design:{structure:{type:"chart-wordcloud",enableRotate:!1},item:"simple"}}};var Qv=Object.defineProperty,ed=Object.getOwnPropertySymbols,Jv=Object.prototype.hasOwnProperty,t4=Object.prototype.propertyIsEnumerable,nd=(t,e,n)=>e in t?Qv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gr=(t,e)=>{for(var n in e||(e={}))Jv.call(e,n)&&nd(t,n,e[n]);if(ed)for(var n of ed(e))t4.call(e,n)&&nd(t,n,e[n]);return t};const e4=Gr(Gr(Gr(Gr(Gr({"compare-hierarchy-left-right-circle-node-pill-badge":{design:{structure:{type:"compare-hierarchy-left-right",decoration:"split-line",surround:!1,groupGap:-20},title:"default",items:[{type:"circle-node",width:240},"pill-badge"]},themeConfig:{}},"compare-hierarchy-left-right-circle-node-plain-text":{design:{title:"default",structure:{type:"compare-hierarchy-left-right",decoration:"dot-line",flipLeaf:!0,groupGap:-10},items:[{type:"circle-node",width:180},{type:"plain-text"}]}},"list-pyramid-rounded-rect-node":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"rounded-rect-node"}]}},"list-pyramid-badge-card":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"badge-card"}]}},"list-pyramid-compact-card":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"compact-card"}]}},"list-column-done-list":{design:{title:"default",structure:{type:"list-column"},items:[{type:"done-list"}]}},"list-column-vertical-icon-arrow":{design:{title:"default",structure:{type:"list-column",gap:-5,zigzag:!0},items:[{type:"vertical-icon-arrow"}]}},"list-grid-badge-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"badge-card"}]}},"list-grid-candy-card-lite":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"candy-card-lite"}]}},"chart-column-simple":{design:{title:"default",structure:{type:"chart-column"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"list-grid-circular-progress":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"circular-progress"}]}},"list-grid-compact-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"compact-card"}]}},"list-grid-done-list":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"done-list"}]}},"list-grid-horizontal-icon-arrow":{design:{title:"default",structure:{type:"list-grid",gap:0,zigzag:!0},items:[{type:"horizontal-icon-arrow"}]}},"list-grid-progress-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"progress-card"}]}},"list-grid-ribbon-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"ribbon-card"}]}},"list-grid-simple":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"simple"}]}},"list-row-circular-progress":{design:{title:"default",structure:{type:"list-row"},items:[{type:"circular-progress"}]}},"list-row-horizontal-icon-arrow":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"horizontal-icon-arrow"}]}},"relation-circle-circular-progress":{design:{title:"default",structure:{type:"relation-circle"},items:[{type:"circular-progress"}]}},"relation-circle-icon-badge":{design:{title:"default",structure:{type:"relation-circle"},items:[{type:"icon-badge"}]}},"sequence-steps-badge-card":{design:{title:"default",structure:{type:"sequence-steps"},items:[{type:"badge-card"}]}},"sequence-steps-simple":{design:{title:"default",structure:{type:"sequence-steps",gap:10},items:[{type:"simple"}]}},"sequence-timeline-done-list":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"done-list"}]}},"sequence-timeline-plain-text":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"plain-text"}]}},"sequence-timeline-rounded-rect-node":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"rounded-rect-node"}]}},"sequence-ascending-steps":{design:{title:"default",structure:{type:"sequence-ascending-steps",vGap:-46,hGap:-20},items:[{type:"l-corner-card"}]}},"sequence-timeline-simple":{design:{title:"default",structure:{type:"sequence-timeline",gap:20},items:[{type:"simple",positionV:"middle"}]}},"sequence-cylinders-3d-simple":{design:{title:"default",structure:{type:"sequence-cylinders-3d",gapY:20},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"list-column-simple-vertical-arrow":{design:{title:"default",structure:{type:"list-column",gap:0,zigzag:!0},items:[{type:"simple-vertical-arrow"}]}},"list-row-simple-horizontal-arrow":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"simple-horizontal-arrow"}]}},"compare-swot":{design:{title:"default",structure:{type:"compare-hierarchy-row",itemGap:32,itemPadding:40,showColumnBackground:!0,columnBackgroundAlpha:.08},items:[{type:"letter-card",showBottomShade:!1},{type:"plain-text",formatter:t=>`● ${t}`,usePaletteColor:!0}]}},"compare-hierarchy-row-letter-card-compact-card":{design:{title:"default",structure:{type:"compare-hierarchy-row"},items:[{type:"letter-card"},{type:"compact-card"}]}},"compare-hierarchy-row-letter-card-rounded-rect-node":{design:{title:"default",structure:{type:"compare-hierarchy-row"},items:[{type:"letter-card"},{type:"rounded-rect-node"}]}},"sequence-snake-steps-compact-card":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"compact-card"}]}},"sequence-snake-steps-pill-badge":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"pill-badge"}]}},"sequence-snake-steps-simple":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"simple"}]}},"sequence-color-snake-steps-horizontal-icon-line":{design:{title:"default",structure:{type:"sequence-color-snake-steps"},items:[{type:"horizontal-icon-line"}]}},"sequence-pyramid-simple":{design:{title:"default",structure:{type:"sequence-pyramid"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]},themeConfig:{colorPrimary:"#1677ff"}},"list-row-horizontal-icon-line":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"horizontal-icon-line"}]}},"list-sector-simple":{design:{title:"default",structure:{type:"list-sector"},items:[{type:"simple"}]}},"list-sector-plain-text":{design:{title:"default",structure:{type:"list-sector"},items:[{type:"plain-text"}]}},"list-sector-half-plain-text":{design:{title:"default",structure:{type:"list-sector",startAngle:-180,endAngle:0},items:[{type:"plain-text"}]}},"quadrant-quarter-simple-card":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"quarter-simple-card"}]}},"quadrant-quarter-circular":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"quarter-circular"}]}},"sequence-roadmap-vertical-plain-text":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"plain-text"}]}},"sequence-roadmap-vertical-simple":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"simple",showIcon:!1}]}},"sequence-roadmap-vertical-badge-card":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"badge-card"}]}},"sequence-roadmap-vertical-pill-badge":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"pill-badge"}]}},"sequence-roadmap-vertical-quarter-circular":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"quarter-circular"}]}},"sequence-roadmap-vertical-quarter-simple-card":{design:{title:"default",structure:{type:"sequence-roadmap-vertical",flipped:!0},items:[{type:"quarter-simple-card"}]}},"sequence-horizontal-zigzag-simple-illus":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple-illus"}]}},"sequence-horizontal-zigzag-horizontal-icon-line":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"horizontal-icon-line"}]}},"sequence-horizontal-zigzag-plain-text":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"plain-text"}]}},"sequence-horizontal-zigzag-simple-horizontal-arrow":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple-horizontal-arrow"}]}},"sequence-horizontal-zigzag-simple":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple"}]}},"list-row-simple-illus":{design:{title:"default",structure:{type:"list-row"},items:[{type:"simple-illus"}]}},"quadrant-simple-illus":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"simple-illus"}]}},"sequence-color-snake-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-color-snake-steps"},items:[{type:"simple-illus"}]}},"sequence-snake-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"simple-illus"}]}},"sequence-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-steps"},items:[{type:"simple-illus"}]}},"sequence-timeline-simple-illus":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"simple-illus",usePaletteColor:!0}]}},"sequence-zigzag-steps-underline-text":{design:{title:"default",structure:{type:"sequence-zigzag-steps"},items:[{type:"underline-text"}]}},"sequence-horizontal-zigzag-underline-text":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"underline-text"}]}},"sequence-roadmap-vertical-underline-text":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"underline-text"}]}},"sequence-snake-steps-underline-text":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"underline-text"}]}},"sequence-circle-arrows-indexed-card":{design:{title:"default",structure:{type:"sequence-circle-arrows"},items:[{type:"indexed-card"}]}},"sequence-zigzag-pucks-3d-simple":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-zigzag-pucks-3d-underline-text":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"underline-text"}]}},"sequence-zigzag-pucks-3d-indexed-card":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"indexed-card"}]}},"sequence-ascending-stairs-3d-simple":{design:{title:"default",structure:{type:"sequence-ascending-stairs-3d"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-ascending-stairs-3d-underline-text":{design:{title:"default",structure:{type:"sequence-ascending-stairs-3d"},items:[{type:"underline-text"}]}},"sequence-circular-underline-text":{design:{title:"default",structure:{type:"sequence-circular"},items:[{type:"underline-text"}]}},"sequence-circular-simple":{design:{title:"default",structure:{type:"sequence-circular"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-filter-mesh-underline-text":{design:{title:"default",structure:{type:"sequence-filter-mesh"},items:[{type:"underline-text"}]}},"sequence-filter-mesh-simple":{design:{title:"default",structure:{type:"sequence-filter-mesh"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-mountain-underline-text":{design:{title:"default",structure:{type:"sequence-mountain"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-simple-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"compact-card"}]}},"compare-binary-horizontal-simple-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"compact-card"}]}},"compare-binary-horizontal-simple-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"compact-card"}]}},"chart-bar-plain-text":{design:{title:"default",structure:{type:"chart-bar"},items:[{type:"plain-text",positionH:"flipped"}]}},"chart-line-plain-text":{design:{title:"default",structure:{type:"chart-line"},items:[{type:"plain-text",lineNumber:2}]}},"chart-pie-plain-text":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"plain-text"}]}},"chart-pie-compact-card":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"compact-card"}]}},"chart-pie-pill-badge":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"pill-badge"}]}},"chart-pie-donut-plain-text":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"plain-text"}]}},"chart-pie-donut-compact-card":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"compact-card"}]}},"chart-pie-donut-pill-badge":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"pill-badge"}]}}},Jh),Fv),Zv),Kv),Uv);Object.entries(e4).forEach(([t,e])=>{jh(t,e)});const Ht=Symbol.for("@antv/infographic/Fragment");function d(t,e={}){return{type:t,props:e}}const I=d,ya="infographic-component";var kt=(t=>(t.Background="background",t.Title="title",t.Desc="desc",t.ItemsGroup="items-group",t.ItemIconGroup="item-icon-group",t.ItemIcon="item-icon",t.ItemLabel="item-label",t.ItemDesc="item-desc",t.ItemValue="item-value",t.ItemIllus="item-illus",t.BtnAdd="btn-add",t.BtnRemove="btn-remove",t.IllusGroup="illus-group",t.IllusVolume="illus-volume",t.Illus="illus",t.BtnsGroup="btns-group",t.Unknown="unknown",t))(kt||{});const n4="https://www.weavefox.cn/api/open/v1/icon",va=Symbol.for("@antv/infographic/Defs");function Lt(t){return{type:va,props:t}}function zt(t){var e,n,r,i;const{x:o=0,y:s=0,width:a=0,height:l=0}=t;return(e=t.cx)!=null||(t.cx=o+a/2),(n=t.cy)!=null||(t.cy=s+l/2),(r=t.rx)!=null||(t.rx=a/2),(i=t.ry)!=null||(t.ry=l/2),{type:"ellipse",props:t}}function V(t){const{x:e=0,y:n=0}=t;return(e||n)&&(t.transform||(t.transform=`translate(${e}, ${n})`)),{type:"g",props:t}}var r4=Object.defineProperty,rd=Object.getOwnPropertySymbols,i4=Object.prototype.hasOwnProperty,o4=Object.prototype.propertyIsEnumerable,id=(t,e,n)=>e in t?r4(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,s4=(t,e)=>{for(var n in e||(e={}))i4.call(e,n)&&id(t,n,e[n]);if(rd)for(var n of rd(e))o4.call(e,n)&&id(t,n,e[n]);return t};function ht(t){const{x:e,y:n}=t,r=s4({},t);return(e!==void 0||n!==void 0)&&(r.transform=`translate(${e!=null?e:0}, ${n!=null?n:0})`),{type:"path",props:r}}var a4=Object.defineProperty,l4=Object.defineProperties,c4=Object.getOwnPropertyDescriptors,qi=Object.getOwnPropertySymbols,od=Object.prototype.hasOwnProperty,sd=Object.prototype.propertyIsEnumerable,ad=(t,e,n)=>e in t?a4(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,h4=(t,e)=>{for(var n in e||(e={}))od.call(e,n)&&ad(t,n,e[n]);if(qi)for(var n of qi(e))sd.call(e,n)&&ad(t,n,e[n]);return t},d4=(t,e)=>l4(t,c4(e)),u4=(t,e)=>{var n={};for(var r in t)od.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&qi)for(var r of qi(t))e.indexOf(r)<0&&sd.call(t,r)&&(n[r]=t[r]);return n};function Ne(t){var e=t,{points:n=[]}=e,r=u4(e,["points"]);const{x:i,y:o}=r,s=n.map(({x:c,y:h})=>`${c},${h}`).join(" "),a=d4(h4({},r),{points:s});return(i!==void 0||o!==void 0)&&(a.transform=`translate(${i!=null?i:0}, ${o!=null?o:0})`+(a.transform||"")),{type:"polygon",props:a}}function Et(t){return{type:"rect",props:t}}function ld(t){return Object.keys(t[0]).reduce((e,n)=>{const r=n;return t.every(i=>i[r]===t[0][r])&&(e[r]=t[0][r]),e},{})}const cd=(t,e)=>{if(typeof t=="number"){if(e===3)return{mode:"rgb",r:(t>>8&15|t>>4&240)/255,g:(t>>4&15|t&240)/255,b:(t&15|t<<4&240)/255};if(e===4)return{mode:"rgb",r:(t>>12&15|t>>8&240)/255,g:(t>>8&15|t>>4&240)/255,b:(t>>4&15|t&240)/255,alpha:(t&15|t<<4&240)/255};if(e===6)return{mode:"rgb",r:(t>>16&255)/255,g:(t>>8&255)/255,b:(t&255)/255};if(e===8)return{mode:"rgb",r:(t>>24&255)/255,g:(t>>16&255)/255,b:(t>>8&255)/255,alpha:(t&255)/255}}},f4={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},p4=t=>cd(f4[t.toLowerCase()],6),g4=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,m4=t=>{let e;return(e=t.match(g4))?cd(parseInt(e[1],16),e[1].length):void 0},Pn="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",qr=`${Pn}%`,xa=`(?:${Pn}%|${Pn})`,y4=`(?:${Pn}(deg|grad|rad|turn)|${Pn})`,xr="\\s*,\\s*",v4=new RegExp(`^rgba?\\(\\s*${Pn}${xr}${Pn}${xr}${Pn}\\s*(?:,\\s*${xa}\\s*)?\\)$`),x4=new RegExp(`^rgba?\\(\\s*${qr}${xr}${qr}${xr}${qr}\\s*(?:,\\s*${xa}\\s*)?\\)$`),b4=t=>{let e={mode:"rgb"},n;if(n=t.match(v4))n[1]!==void 0&&(e.r=n[1]/255),n[2]!==void 0&&(e.g=n[2]/255),n[3]!==void 0&&(e.b=n[3]/255);else if(n=t.match(x4))n[1]!==void 0&&(e.r=n[1]/100),n[2]!==void 0&&(e.g=n[2]/100),n[3]!==void 0&&(e.b=n[3]/100);else return;return n[4]!==void 0?e.alpha=Math.max(0,Math.min(1,n[4]/100)):n[5]!==void 0&&(e.alpha=Math.max(0,Math.min(1,+n[5]))),e},w4=(t,e)=>t===void 0?void 0:typeof t!="object"?tn(t):t.mode!==void 0?t:e?Ae(xe({},t),{mode:e}):void 0,ba=(t="rgb")=>e=>(e=w4(e,t))!==void 0?e.mode===t?e:Je[e.mode][t]?Je[e.mode][t](e):t==="rgb"?Je[e.mode].rgb(e):Je.rgb[t](Je[e.mode].rgb(e)):void 0,Je={},hd={},Ui=[],dd={},_4=t=>t,Rt=t=>(Je[t.mode]=xe(xe({},Je[t.mode]),t.toMode),Object.keys(t.fromMode||{}).forEach(e=>{Je[e]||(Je[e]={}),Je[e][t.mode]=t.fromMode[e]}),t.ranges||(t.ranges={}),t.difference||(t.difference={}),t.channels.forEach(e=>{if(t.ranges[e]===void 0&&(t.ranges[e]=[0,1]),!t.interpolate[e])throw new Error(`Missing interpolator for: ${e}`);typeof t.interpolate[e]=="function"&&(t.interpolate[e]={use:t.interpolate[e]}),t.interpolate[e].fixup||(t.interpolate[e].fixup=_4)}),hd[t.mode]=t,(t.parse||[]).forEach(e=>{P4(e,t.mode)}),ba(t.mode)),$4=t=>hd[t],P4=(t,e)=>{if(typeof t=="string"){if(!e)throw new Error("'mode' required when 'parser' is a string");dd[t]=e}else typeof t=="function"&&Ui.indexOf(t)<0&&Ui.push(t)},wa=/[^\x00-\x7F]|[a-zA-Z_]/,C4=/[^\x00-\x7F]|[-\w]/,J={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let bt=0;function Zi(t){let e=t[bt],n=t[bt+1];return e==="-"||e==="+"?/\d/.test(n)||n==="."&&/\d/.test(t[bt+2]):e==="."?/\d/.test(n):/\d/.test(e)}function _a(t){if(bt>=t.length)return!1;let e=t[bt];if(wa.test(e))return!0;if(e==="-"){if(t.length-bt<2)return!1;let n=t[bt+1];return!!(n==="-"||wa.test(n))}return!1}const O4={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function Ur(t){let e="";if((t[bt]==="-"||t[bt]==="+")&&(e+=t[bt++]),e+=Ki(t),t[bt]==="."&&/\d/.test(t[bt+1])&&(e+=t[bt++]+Ki(t)),(t[bt]==="e"||t[bt]==="E")&&((t[bt+1]==="-"||t[bt+1]==="+")&&/\d/.test(t[bt+2])?e+=t[bt++]+t[bt++]+Ki(t):/\d/.test(t[bt+1])&&(e+=t[bt++]+Ki(t))),_a(t)){let n=Qi(t);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:J.Hue,value:e*O4[n]}:void 0}return t[bt]==="%"?(bt++,{type:J.Percentage,value:+e}):{type:J.Number,value:+e}}function Ki(t){let e="";for(;/\d/.test(t[bt]);)e+=t[bt++];return e}function Qi(t){let e="";for(;bt<t.length&&C4.test(t[bt]);)e+=t[bt++];return e}function M4(t){let e=Qi(t);return t[bt]==="("?(bt++,{type:J.Function,value:e}):e==="none"?{type:J.None,value:void 0}:{type:J.Ident,value:e}}function S4(t=""){let e=t.trim(),n=[],r;for(bt=0;bt<e.length;){if(r=e[bt++],r===`
2
+ `||r===" "||r===" "){for(;bt<e.length&&(e[bt]===`
3
+ `||e[bt]===" "||e[bt]===" ");)bt++;continue}if(r===",")return;if(r===")"){n.push({type:J.ParenClose});continue}if(r==="+"){if(bt--,Zi(e)){n.push(Ur(e));continue}return}if(r==="-"){if(bt--,Zi(e)){n.push(Ur(e));continue}if(_a(e)){n.push({type:J.Ident,value:Qi(e)});continue}return}if(r==="."){if(bt--,Zi(e)){n.push(Ur(e));continue}return}if(r==="/"){for(;bt<e.length&&(e[bt]===`
4
+ `||e[bt]===" "||e[bt]===" ");)bt++;let i;if(Zi(e)&&(i=Ur(e),i.type!==J.Hue)){n.push({type:J.Alpha,value:i});continue}if(_a(e)&&Qi(e)==="none"){n.push({type:J.Alpha,value:{type:J.None,value:void 0}});continue}return}if(/\d/.test(r)){bt--,n.push(Ur(e));continue}if(wa.test(r)){bt--,n.push(M4(e));continue}return}return n}function E4(t){t._i=0;let e=t[t._i++];if(!e||e.type!==J.Function||e.value!=="color"||(e=t[t._i++],e.type!==J.Ident))return;const n=dd[e.value];if(!n)return;const r={mode:n},i=ud(t,!1);if(!i)return;const o=$4(n).channels;for(let s=0,a,l;s<o.length;s++)a=i[s],l=o[s],a.type!==J.None&&(r[l]=a.type===J.Number?a.value:a.value/100,l==="alpha"&&(r[l]=Math.max(0,Math.min(1,r[l]))));return r}function ud(t,e){const n=[];let r;for(;t._i<t.length;){if(r=t[t._i++],r.type===J.None||r.type===J.Number||r.type===J.Alpha||r.type===J.Percentage||e&&r.type===J.Hue){n.push(r);continue}if(r.type===J.ParenClose){if(t._i<t.length)return;continue}return}if(!(n.length<3||n.length>4)){if(n.length===4){if(n[3].type!==J.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:J.None,value:void 0}),n.every(i=>i.type!==J.Alpha)?n:void 0}}function I4(t,e){t._i=0;let n=t[t._i++];if(!n||n.type!==J.Function)return;let r=ud(t,e);if(r)return r.unshift(n.value),r}const tn=t=>{if(typeof t!="string")return;const e=S4(t),n=e?I4(e,!0):void 0;let r,i=0,o=Ui.length;for(;i<o;)if((r=Ui[i++](t,n))!==void 0)return r;return e?E4(e):void 0};function T4(t,e){if(!e||e[0]!=="rgb"&&e[0]!=="rgba")return;const n={mode:"rgb"},[,r,i,o,s]=e;if(!(r.type===J.Hue||i.type===J.Hue||o.type===J.Hue))return r.type!==J.None&&(n.r=r.type===J.Number?r.value/255:r.value/100),i.type!==J.None&&(n.g=i.type===J.Number?i.value/255:i.value/100),o.type!==J.None&&(n.b=o.type===J.Number?o.value/255:o.value/100),s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const A4=t=>t==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,k4=(t,e,n)=>t+n*(e-t),L4=t=>{let e=[];for(let n=0;n<t.length-1;n++){let r=t[n],i=t[n+1];r===void 0&&i===void 0?e.push(void 0):r!==void 0&&i!==void 0?e.push([r,i]):e.push(r!==void 0?[r,r]:[i,i])}return e},ot=(t=>e=>{let n=L4(e);return r=>{let i=r*n.length,o=r>=1?n.length-1:Math.max(Math.floor(i),0),s=n[o];return s===void 0?void 0:t(s[0],s[1],i-o)}})(k4),ce=t=>{let e=!1,n=t.map(r=>r!==void 0?(e=!0,r):1);return e?n:t},br={mode:"rgb",channels:["r","g","b","alpha"],parse:[T4,m4,b4,p4,A4,"srgb"],serialize:"srgb",interpolate:{r:ot,g:ot,b:ot,alpha:{use:ot,fixup:ce}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},$a=(t=0)=>Math.pow(Math.abs(t),563/256)*Math.sign(t),fd=t=>{let e=$a(t.r),n=$a(t.g),r=$a(t.b),i={mode:"xyz65",x:.5766690429101305*e+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*e+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*e+.0706888525358272*n+.9913375368376386*r};return t.alpha!==void 0&&(i.alpha=t.alpha),i},Pa=t=>Math.pow(Math.abs(t),256/563)*Math.sign(t),pd=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"a98",r:Pa(t*2.0415879038107465-e*.5650069742788597-.3447313507783297*n),g:Pa(t*-.9692436362808798+e*1.8759675015077206+.0415550574071756*n),b:Pa(t*.0134442806320312-e*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(i.alpha=r),i},Ca=(t=0)=>{const e=Math.abs(t);return e<=.04045?t/12.92:(Math.sign(t)||1)*Math.pow((e+.055)/1.055,2.4)},wr=({r:t,g:e,b:n,alpha:r})=>{let i={mode:"lrgb",r:Ca(t),g:Ca(e),b:Ca(n)};return r!==void 0&&(i.alpha=r),i},jn=t=>{let{r:e,g:n,b:r,alpha:i}=wr(t),o={mode:"xyz65",x:.4123907992659593*e+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*e+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*e+.119194779794626*n+.9505321522496607*r};return i!==void 0&&(o.alpha=i),o},Oa=(t=0)=>{const e=Math.abs(t);return e>.0031308?(Math.sign(t)||1)*(1.055*Math.pow(e,1/2.4)-.055):t*12.92},_r=({r:t,g:e,b:n,alpha:r},i="rgb")=>{let o={mode:i,r:Oa(t),g:Oa(e),b:Oa(n)};return r!==void 0&&(o.alpha=r),o},Fn=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=_r({r:t*3.2409699419045226-e*1.537383177570094-.4986107602930034*n,g:t*-.9692436362808796+e*1.8759675015077204+.0415550574071756*n,b:t*.0556300796969936-e*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(i.alpha=r),i},z4=Ae(xe({},br),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:t=>pd(jn(t)),xyz65:pd},toMode:{rgb:t=>Fn(fd(t)),xyz65:fd}}),me=t=>(t=t%360)<0?t+360:t,H4=(t,e)=>t.map((n,r,i)=>{if(n===void 0)return n;let o=me(n);return r===0||t[r-1]===void 0?o:e(o-me(i[r-1]))}).reduce((n,r)=>!n.length||r===void 0||n[n.length-1]===void 0?(n.push(r),n):(n.push(r+n[n.length-1]),n),[]),fn=t=>H4(t,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),de=[-.14861,1.78277,-.29227,-.90649,1.97294,0],R4=Math.PI/180,D4=180/Math.PI;let gd=de[3]*de[4],md=de[1]*de[4],yd=de[1]*de[2]-de[0]*de[3];const N4=({r:t,g:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(yd*n+t*gd-e*md)/(yd+gd-md),o=n-i,s=(de[4]*(e-i)-de[2]*o)/de[3],a={mode:"cubehelix",l:i,s:i===0||i===1?void 0:Math.sqrt(o*o+s*s)/(de[4]*i*(1-i))};return a.s&&(a.h=Math.atan2(s,o)*D4-120),r!==void 0&&(a.alpha=r),a},j4=({h:t,s:e,l:n,alpha:r})=>{let i={mode:"rgb"};t=(t===void 0?0:t+120)*R4,n===void 0&&(n=0);let o=e===void 0?0:e*n*(1-n),s=Math.cos(t),a=Math.sin(t);return i.r=n+o*(de[0]*s+de[1]*a),i.g=n+o*(de[2]*s+de[3]*a),i.b=n+o*(de[4]*s+de[5]*a),r!==void 0&&(i.alpha=r),i},Ji=(t,e)=>{if(t.h===void 0||e.h===void 0||!t.s||!e.s)return 0;let n=me(t.h),r=me(e.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(t.s*e.s)*i},F4=(t,e)=>{if(t.h===void 0||e.h===void 0)return 0;let n=me(t.h),r=me(e.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},to=(t,e)=>{if(t.h===void 0||e.h===void 0||!t.c||!e.c)return 0;let n=me(t.h),r=me(e.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(t.c*e.c)*i},pn=t=>{let e=t.reduce((r,i)=>{if(i!==void 0){let o=i*Math.PI/180;r.sin+=Math.sin(o),r.cos+=Math.cos(o)}return r},{sin:0,cos:0}),n=Math.atan2(e.sin,e.cos)*180/Math.PI;return n<0?360+n:n},B4={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:N4},toMode:{rgb:j4},interpolate:{h:{use:ot,fixup:fn},s:ot,l:ot,alpha:{use:ot,fixup:ce}},difference:{h:Ji},average:{h:pn}},Cn=({l:t,a:e,b:n,alpha:r},i="lch")=>{e===void 0&&(e=0),n===void 0&&(n=0);let o=Math.sqrt(e*e+n*n),s={mode:i,l:t,c:o};return o&&(s.h=me(Math.atan2(n,e)*180/Math.PI)),r!==void 0&&(s.alpha=r),s},On=({l:t,c:e,h:n,alpha:r},i="lab")=>{n===void 0&&(n=0);let o={mode:i,l:t,a:e?e*Math.cos(n/180*Math.PI):0,b:e?e*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},vd=Math.pow(29,3)/Math.pow(3,3),xd=Math.pow(6,3)/Math.pow(29,3),se={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},$r={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let Ma=t=>Math.pow(t,3)>xd?Math.pow(t,3):(116*t-16)/vd;const bd=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(t+16)/116,o=e/500+i,s=i-n/200,a={mode:"xyz65",x:Ma(o)*$r.X,y:Ma(i)*$r.Y,z:Ma(s)*$r.Z};return r!==void 0&&(a.alpha=r),a},eo=t=>Fn(bd(t)),Sa=t=>t>xd?Math.cbrt(t):(vd*t+16)/116,wd=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Sa(t/$r.X),o=Sa(e/$r.Y),s=Sa(n/$r.Z),a={mode:"lab65",l:116*o-16,a:500*(i-o),b:200*(o-s)};return r!==void 0&&(a.alpha=r),a},no=t=>{let e=wd(jn(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},ro=1,_d=1,Zr=26/180*Math.PI,io=Math.cos(Zr),oo=Math.sin(Zr),$d=100/Math.log(139/100),Ea=({l:t,c:e,h:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"lab65",l:(Math.exp(t*ro/$d)-1)/.0039},o=(Math.exp(.0435*e*_d*ro)-1)/.075,s=o*Math.cos(n/180*Math.PI-Zr),a=o*Math.sin(n/180*Math.PI-Zr);return i.a=s*io-a/.83*oo,i.b=s*oo+a/.83*io,r!==void 0&&(i.alpha=r),i},Ia=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=e*io+n*oo,o=.83*(n*io-e*oo),s=Math.sqrt(i*i+o*o),a={mode:"dlch",l:$d/ro*Math.log(1+.0039*t),c:Math.log(1+.075*s)/(.0435*_d*ro)};return a.c&&(a.h=me((Math.atan2(o,i)+Zr)/Math.PI*180)),r!==void 0&&(a.alpha=r),a},Pd=t=>Ea(Cn(t,"dlch")),Cd=t=>On(Ia(t),"dlab"),W4={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Pd,rgb:t=>eo(Pd(t))},fromMode:{lab65:Cd,rgb:t=>Cd(no(t))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:ot,a:ot,b:ot,alpha:{use:ot,fixup:ce}}},V4={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Ea,dlab:t=>On(t,"dlab"),rgb:t=>eo(Ea(t))},fromMode:{lab65:Ia,dlab:t=>Cn(t,"dlch"),rgb:t=>Ia(no(t))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:ot,c:ot,h:{use:ot,fixup:fn},alpha:{use:ot,fixup:ce}},difference:{h:to},average:{h:pn}};function Y4({h:t,s:e,i:n,alpha:r}){t=me(t!==void 0?t:0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.abs(t/60%2-1),o;switch(Math.floor(t/60)){case 0:o={r:n*(1+e*(3/(2-i)-1)),g:n*(1+e*(3*(1-i)/(2-i)-1)),b:n*(1-e)};break;case 1:o={r:n*(1+e*(3*(1-i)/(2-i)-1)),g:n*(1+e*(3/(2-i)-1)),b:n*(1-e)};break;case 2:o={r:n*(1-e),g:n*(1+e*(3/(2-i)-1)),b:n*(1+e*(3*(1-i)/(2-i)-1))};break;case 3:o={r:n*(1-e),g:n*(1+e*(3*(1-i)/(2-i)-1)),b:n*(1+e*(3/(2-i)-1))};break;case 4:o={r:n*(1+e*(3*(1-i)/(2-i)-1)),g:n*(1-e),b:n*(1+e*(3/(2-i)-1))};break;case 5:o={r:n*(1+e*(3/(2-i)-1)),g:n*(1-e),b:n*(1+e*(3*(1-i)/(2-i)-1))};break;default:o={r:n*(1-e),g:n*(1-e),b:n*(1-e)}}return o.mode="rgb",r!==void 0&&(o.alpha=r),o}function X4({r:t,g:e,b:n,alpha:r}){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.max(t,e,n),o=Math.min(t,e,n),s={mode:"hsi",s:t+e+n===0?0:1-3*o/(t+e+n),i:(t+e+n)/3};return i-o!==0&&(s.h=(i===t?(e-n)/(i-o)+(e<n)*6:i===e?(n-t)/(i-o)+2:(t-e)/(i-o)+4)*60),r!==void 0&&(s.alpha=r),s}const G4={mode:"hsi",toMode:{rgb:Y4},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:X4},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:ot,fixup:fn},s:ot,i:ot,alpha:{use:ot,fixup:ce}},difference:{h:Ji},average:{h:pn}};function q4({h:t,s:e,l:n,alpha:r}){t=me(t!==void 0?t:0),e===void 0&&(e=0),n===void 0&&(n=0);let i=n+e*(n<.5?n:1-n),o=i-(i-n)*2*Math.abs(t/60%2-1),s;switch(Math.floor(t/60)){case 0:s={r:i,g:o,b:2*n-i};break;case 1:s={r:o,g:i,b:2*n-i};break;case 2:s={r:2*n-i,g:i,b:o};break;case 3:s={r:2*n-i,g:o,b:i};break;case 4:s={r:o,g:2*n-i,b:i};break;case 5:s={r:i,g:2*n-i,b:o};break;default:s={r:2*n-i,g:2*n-i,b:2*n-i}}return s.mode="rgb",r!==void 0&&(s.alpha=r),s}function U4({r:t,g:e,b:n,alpha:r}){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.max(t,e,n),o=Math.min(t,e,n),s={mode:"hsl",s:i===o?0:(i-o)/(1-Math.abs(i+o-1)),l:.5*(i+o)};return i-o!==0&&(s.h=(i===t?(e-n)/(i-o)+(e<n)*6:i===e?(n-t)/(i-o)+2:(t-e)/(i-o)+4)*60),r!==void 0&&(s.alpha=r),s}const Z4=(t,e)=>{switch(e){case"deg":return+t;case"rad":return t/Math.PI*180;case"grad":return t/10*9;case"turn":return t*360}},K4=new RegExp(`^hsla?\\(\\s*${y4}${xr}${qr}${xr}${qr}\\s*(?:,\\s*${xa}\\s*)?\\)$`),Q4=t=>{let e=t.match(K4);if(!e)return;let n={mode:"hsl"};return e[3]!==void 0?n.h=+e[3]:e[1]!==void 0&&e[2]!==void 0&&(n.h=Z4(e[1],e[2])),e[4]!==void 0&&(n.s=Math.min(Math.max(0,e[4]/100),1)),e[5]!==void 0&&(n.l=Math.min(Math.max(0,e[5]/100),1)),e[6]!==void 0?n.alpha=Math.max(0,Math.min(1,e[6]/100)):e[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+e[7]))),n};function J4(t,e){if(!e||e[0]!=="hsl"&&e[0]!=="hsla")return;const n={mode:"hsl"},[,r,i,o,s]=e;if(r.type!==J.None){if(r.type===J.Percentage)return;n.h=r.value}if(i.type!==J.None){if(i.type===J.Hue)return;n.s=i.value/100}if(o.type!==J.None){if(o.type===J.Hue)return;n.l=o.value/100}return s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const Od={mode:"hsl",toMode:{rgb:q4},fromMode:{rgb:U4},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[J4,Q4],serialize:t=>`hsl(${t.h!==void 0?t.h:"none"} ${t.s!==void 0?t.s*100+"%":"none"} ${t.l!==void 0?t.l*100+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:ot,fixup:fn},s:ot,l:ot,alpha:{use:ot,fixup:ce}},difference:{h:Ji},average:{h:pn}};function Md({h:t,s:e,v:n,alpha:r}){t=me(t!==void 0?t:0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.abs(t/60%2-1),o;switch(Math.floor(t/60)){case 0:o={r:n,g:n*(1-e*i),b:n*(1-e)};break;case 1:o={r:n*(1-e*i),g:n,b:n*(1-e)};break;case 2:o={r:n*(1-e),g:n,b:n*(1-e*i)};break;case 3:o={r:n*(1-e),g:n*(1-e*i),b:n};break;case 4:o={r:n*(1-e*i),g:n*(1-e),b:n};break;case 5:o={r:n,g:n*(1-e),b:n*(1-e*i)};break;default:o={r:n*(1-e),g:n*(1-e),b:n*(1-e)}}return o.mode="rgb",r!==void 0&&(o.alpha=r),o}function Sd({r:t,g:e,b:n,alpha:r}){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.max(t,e,n),o=Math.min(t,e,n),s={mode:"hsv",s:i===0?0:1-o/i,v:i};return i-o!==0&&(s.h=(i===t?(e-n)/(i-o)+(e<n)*6:i===e?(n-t)/(i-o)+2:(t-e)/(i-o)+4)*60),r!==void 0&&(s.alpha=r),s}const Ed={mode:"hsv",toMode:{rgb:Md},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:Sd},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:ot,fixup:fn},s:ot,v:ot,alpha:{use:ot,fixup:ce}},difference:{h:Ji},average:{h:pn}};function tx({h:t,w:e,b:n,alpha:r}){if(e===void 0&&(e=0),n===void 0&&(n=0),e+n>1){let i=e+n;e/=i,n/=i}return Md({h:t,s:n===1?1:1-e/(1-n),v:1-n,alpha:r})}function ex(t){let e=Sd(t);if(e===void 0)return;let n=e.s!==void 0?e.s:0,r=e.v!==void 0?e.v:0,i={mode:"hwb",w:(1-n)*r,b:1-r};return e.h!==void 0&&(i.h=e.h),e.alpha!==void 0&&(i.alpha=e.alpha),i}function nx(t,e){if(!e||e[0]!=="hwb")return;const n={mode:"hwb"},[,r,i,o,s]=e;if(r.type!==J.None){if(r.type===J.Percentage)return;n.h=r.value}if(i.type!==J.None){if(i.type===J.Hue)return;n.w=i.value/100}if(o.type!==J.None){if(o.type===J.Hue)return;n.b=o.value/100}return s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const rx={mode:"hwb",toMode:{rgb:tx},fromMode:{rgb:ex},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[nx],serialize:t=>`hwb(${t.h!==void 0?t.h:"none"} ${t.w!==void 0?t.w*100+"%":"none"} ${t.b!==void 0?t.b*100+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:ot,fixup:fn},w:ot,b:ot,alpha:{use:ot,fixup:ce}},difference:{h:F4},average:{h:pn}},Id=203,so=.1593017578125,Td=78.84375,ao=.8359375,lo=18.8515625,co=18.6875;function Ta(t){if(t<0)return 0;const e=Math.pow(t,1/Td);return 1e4*Math.pow(Math.max(0,e-ao)/(lo-co*e),1/so)}function Aa(t){if(t<0)return 0;const e=Math.pow(t/1e4,so);return Math.pow((ao+lo*e)/(1+co*e),Td)}const ka=t=>Math.max(t/Id,0),Ad=({i:t,t:e,p:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i=Ta(t+.008609037037932761*e+.11102962500302593*n),o=Ta(t-.00860903703793275*e-.11102962500302599*n),s=Ta(t+.5600313357106791*e-.32062717498731885*n),a={mode:"xyz65",x:ka(2.070152218389422*i-1.3263473389671556*o+.2066510476294051*s),y:ka(.3647385209748074*i+.680566024947227*o-.0453045459220346*s),z:ka(-.049747207535812*i-.0492609666966138*o+1.1880659249923042*s)};return r!==void 0&&(a.alpha=r),a},La=(t=0)=>Math.max(t*Id,0),kd=({x:t,y:e,z:n,alpha:r})=>{const i=La(t),o=La(e),s=La(n),a=Aa(.3592832590121217*i+.6976051147779502*o-.0358915932320289*s),l=Aa(-.1920808463704995*i+1.1004767970374323*o+.0753748658519118*s),c=Aa(.0070797844607477*i+.0748396662186366*o+.8433265453898765*s),h=.5*a+.5*l,u=1.61376953125*a-3.323486328125*l+1.709716796875*c,f=4.378173828125*a-4.24560546875*l-.132568359375*c,p={mode:"itp",i:h,t:u,p:f};return r!==void 0&&(p.alpha=r),p},ix={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Ad,rgb:t=>Fn(Ad(t))},fromMode:{xyz65:kd,rgb:t=>kd(jn(t))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:ot,t:ot,p:ot,alpha:{use:ot,fixup:ce}}},ox=134.03437499999998,sx=16295499532821565e-27,za=t=>{if(t<0)return 0;let e=Math.pow(t/1e4,so);return Math.pow((ao+lo*e)/(1+co*e),ox)},Ha=(t=0)=>Math.max(t*203,0),Ld=({x:t,y:e,z:n,alpha:r})=>{t=Ha(t),e=Ha(e),n=Ha(n);let i=1.15*t-.15*n,o=.66*e+.34*t,s=za(.41478972*i+.579999*o+.014648*n),a=za(-.20151*i+1.120649*o+.0531008*n),l=za(-.0166008*i+.2648*o+.6684799*n),c=(s+a)/2,h={mode:"jab",j:.44*c/(1-.56*c)-sx,a:3.524*s-4.066708*a+.542708*l,b:.199076*s+1.096799*a-1.295875*l};return r!==void 0&&(h.alpha=r),h},ax=134.03437499999998,zd=16295499532821565e-27,Ra=t=>{if(t<0)return 0;let e=Math.pow(t,1/ax);return 1e4*Math.pow((ao-e)/(co*e-lo),1/so)},Da=t=>t/203,Hd=({j:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(t+zd)/(.44+.56*(t+zd)),o=Ra(i+.13860504*e+.058047316*n),s=Ra(i-.13860504*e-.058047316*n),a=Ra(i-.096019242*e-.8118919*n),l={mode:"xyz65",x:Da(1.661373024652174*o-.914523081304348*s+.23136208173913045*a),y:Da(-.3250758611844533*o+1.571847026732543*s-.21825383453227928*a),z:Da(-.090982811*o-.31272829*s+1.5227666*a)};return r!==void 0&&(l.alpha=r),l},Rd=t=>{let e=Ld(jn(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},Dd=t=>Fn(Hd(t)),lx={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Rd,xyz65:Ld},toMode:{rgb:Dd,xyz65:Hd},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:ot,a:ot,b:ot,alpha:{use:ot,fixup:ce}}},Nd=({j:t,a:e,b:n,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.sqrt(e*e+n*n),o={mode:"jch",j:t,c:i};return i&&(o.h=me(Math.atan2(n,e)*180/Math.PI)),r!==void 0&&(o.alpha=r),o},jd=({j:t,c:e,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:"jab",j:t,a:e?e*Math.cos(n/180*Math.PI):0,b:e?e*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},cx={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:jd,rgb:t=>Dd(jd(t))},fromMode:{rgb:t=>Nd(Rd(t)),jab:Nd},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:ot,fixup:fn},c:ot,j:ot,alpha:{use:ot,fixup:ce}},difference:{h:to},average:{h:pn}},ho=Math.pow(29,3)/Math.pow(3,3),Na=Math.pow(6,3)/Math.pow(29,3);let ja=t=>Math.pow(t,3)>Na?Math.pow(t,3):(116*t-16)/ho;const Fa=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(t+16)/116,o=e/500+i,s=i-n/200,a={mode:"xyz50",x:ja(o)*se.X,y:ja(i)*se.Y,z:ja(s)*se.Z};return r!==void 0&&(a.alpha=r),a},Kr=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=_r({r:t*3.1341359569958707-e*1.6173863321612538-.4906619460083532*n,g:t*-.978795502912089+e*1.916254567259524+.03344273116131949*n,b:t*.07195537988411677-e*.2289768264158322+1.405386058324125*n});return r!==void 0&&(i.alpha=r),i},Fd=t=>Kr(Fa(t)),Qr=t=>{let{r:e,g:n,b:r,alpha:i}=wr(t),o={mode:"xyz50",x:.436065742824811*e+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*e+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*e+.09708128566574634*n+.7140993584005155*r};return i!==void 0&&(o.alpha=i),o},Ba=t=>t>Na?Math.cbrt(t):(ho*t+16)/116,Wa=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Ba(t/se.X),o=Ba(e/se.Y),s=Ba(n/se.Z),a={mode:"lab",l:116*o-16,a:500*(i-o),b:200*(o-s)};return r!==void 0&&(a.alpha=r),a},Bd=t=>{let e=Wa(Qr(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e};function hx(t,e){if(!e||e[0]!=="lab")return;const n={mode:"lab"},[,r,i,o,s]=e;if(!(r.type===J.Hue||i.type===J.Hue||o.type===J.Hue))return r.type!==J.None&&(n.l=Math.min(Math.max(0,r.value),100)),i.type!==J.None&&(n.a=i.type===J.Number?i.value:i.value*125/100),o.type!==J.None&&(n.b=o.type===J.Number?o.value:o.value*125/100),s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const Va={mode:"lab",toMode:{xyz50:Fa,rgb:Fd},fromMode:{xyz50:Wa,rgb:Bd},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[hx],serialize:t=>`lab(${t.l!==void 0?t.l:"none"} ${t.a!==void 0?t.a:"none"} ${t.b!==void 0?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{l:ot,a:ot,b:ot,alpha:{use:ot,fixup:ce}}},dx=Ae(xe({},Va),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:bd,rgb:eo},fromMode:{xyz65:wd,rgb:no},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}});function ux(t,e){if(!e||e[0]!=="lch")return;const n={mode:"lch"},[,r,i,o,s]=e;if(r.type!==J.None){if(r.type===J.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(i.type!==J.None&&(n.c=Math.max(0,i.type===J.Number?i.value:i.value*150/100)),o.type!==J.None){if(o.type===J.Percentage)return;n.h=o.value}return s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const Ya={mode:"lch",toMode:{lab:On,rgb:t=>Fd(On(t))},fromMode:{rgb:t=>Cn(Bd(t)),lab:Cn},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[ux],serialize:t=>`lch(${t.l!==void 0?t.l:"none"} ${t.c!==void 0?t.c:"none"} ${t.h!==void 0?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:ot,fixup:fn},c:ot,l:ot,alpha:{use:ot,fixup:ce}},difference:{h:to},average:{h:pn}},fx=Ae(xe({},Ya),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:t=>On(t,"lab65"),rgb:t=>eo(On(t,"lab65"))},fromMode:{rgb:t=>Cn(no(t),"lch65"),lab65:t=>Cn(t,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Wd=({l:t,u:e,v:n,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.sqrt(e*e+n*n),o={mode:"lchuv",l:t,c:i};return i&&(o.h=me(Math.atan2(n,e)*180/Math.PI)),r!==void 0&&(o.alpha=r),o},Vd=({l:t,c:e,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:"luv",l:t,u:e?e*Math.cos(n/180*Math.PI):0,v:e?e*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},Yd=(t,e,n)=>4*t/(t+15*e+3*n),Xd=(t,e,n)=>9*e/(t+15*e+3*n),px=Yd(se.X,se.Y,se.Z),gx=Xd(se.X,se.Y,se.Z),mx=t=>t<=Na?ho*t:116*Math.cbrt(t)-16,Xa=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=mx(e/se.Y),o=Yd(t,e,n),s=Xd(t,e,n);!isFinite(o)||!isFinite(s)?i=o=s=0:(o=13*i*(o-px),s=13*i*(s-gx));let a={mode:"luv",l:i,u:o,v:s};return r!==void 0&&(a.alpha=r),a},yx=(t,e,n)=>4*t/(t+15*e+3*n),vx=(t,e,n)=>9*e/(t+15*e+3*n),xx=yx(se.X,se.Y,se.Z),bx=vx(se.X,se.Y,se.Z),Ga=({l:t,u:e,v:n,alpha:r})=>{if(t===void 0&&(t=0),t===0)return{mode:"xyz50",x:0,y:0,z:0};e===void 0&&(e=0),n===void 0&&(n=0);let i=e/(13*t)+xx,o=n/(13*t)+bx,s=se.Y*(t<=8?t/ho:Math.pow((t+16)/116,3)),a=s*(9*i)/(4*o),l=s*(12-3*i-20*o)/(4*o),c={mode:"xyz50",x:a,y:s,z:l};return r!==void 0&&(c.alpha=r),c},wx={mode:"lchuv",toMode:{luv:Vd,rgb:t=>Kr(Ga(Vd(t)))},fromMode:{rgb:t=>Wd(Xa(Qr(t))),luv:Wd},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:ot,fixup:fn},c:ot,l:ot,alpha:{use:ot,fixup:ce}},difference:{h:to},average:{h:pn}},_x=Ae(xe({},br),{mode:"lrgb",toMode:{rgb:_r},fromMode:{rgb:wr},parse:["srgb-linear"],serialize:"srgb-linear"}),$x={mode:"luv",toMode:{xyz50:Ga,rgb:t=>Kr(Ga(t))},fromMode:{xyz50:Xa,rgb:t=>Xa(Qr(t))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:ot,u:ot,v:ot,alpha:{use:ot,fixup:ce}}},Gd=({r:t,g:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.cbrt(.412221469470763*t+.5363325372617348*e+.0514459932675022*n),o=Math.cbrt(.2119034958178252*t+.6806995506452344*e+.1073969535369406*n),s=Math.cbrt(.0883024591900564*t+.2817188391361215*e+.6299787016738222*n),a={mode:"oklab",l:.210454268309314*i+.7936177747023054*o-.0040720430116193*s,a:1.9779985324311684*i-2.42859224204858*o+.450593709617411*s,b:.0259040424655478*i+.7827717124575296*o-.8086757549230774*s};return r!==void 0&&(a.alpha=r),a},uo=t=>{let e=Gd(wr(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},Jr=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.pow(t+.3963377773761749*e+.2158037573099136*n,3),o=Math.pow(t-.1055613458156586*e-.0638541728258133*n,3),s=Math.pow(t-.0894841775298119*e-1.2914855480194092*n,3),a={mode:"lrgb",r:4.076741636075957*i-3.3077115392580616*o+.2309699031821044*s,g:-1.2684379732850317*i+2.6097573492876887*o-.3413193760026573*s,b:-.0041960761386756*i-.7034186179359362*o+1.7076146940746117*s};return r!==void 0&&(a.alpha=r),a},fo=t=>_r(Jr(t));function qa(t){const r=1.170873786407767;return .5*(r*t-.206+Math.sqrt((r*t-.206)*(r*t-.206)+4*.03*r*t))}function po(t){return(t*t+.206*t)/(1.170873786407767*(t+.03))}function Px(t,e){let n,r,i,o,s,a,l,c;-1.88170328*t-.80936493*e>1?(n=1.19086277,r=1.76576728,i=.59662641,o=.75515197,s=.56771245,a=4.0767416621,l=-3.3077115913,c=.2309699292):1.81444104*t-1.19445276*e>1?(n=.73956515,r=-.45954404,i=.08285427,o=.1254107,s=.14503204,a=-1.2684380046,l=2.6097574011,c=-.3413193965):(n=1.35733652,r=-.00915799,i=-1.1513021,o=-.50559606,s=.00692167,a=-.0041960863,l=-.7034186147,c=1.707614701);let h=n+r*t+i*e+o*t*t+s*t*e,u=.3963377774*t+.2158037573*e,f=-.1055613458*t-.0638541728*e,p=-.0894841775*t-1.291485548*e;{let g=1+h*u,y=1+h*f,m=1+h*p,x=g*g*g,v=y*y*y,b=m*m*m,w=3*u*g*g,_=3*f*y*y,$=3*p*m*m,P=6*u*u*g,C=6*f*f*y,T=6*p*p*m,E=a*x+l*v+c*b,S=a*w+l*_+c*$,R=a*P+l*C+c*T;h=h-E*S/(S*S-.5*E*R)}return h}function Ua(t,e){let n=Px(t,e),r=Jr({l:1,a:n*t,b:n*e}),i=Math.cbrt(1/Math.max(r.r,r.g,r.b)),o=i*n;return[i,o]}function Cx(t,e,n,r,i,o=null){o||(o=Ua(t,e));let s;if((n-i)*o[1]-(o[0]-i)*r<=0)s=o[1]*i/(r*o[0]+o[1]*(i-n));else{s=o[1]*(i-1)/(r*(o[0]-1)+o[1]*(i-n));{let a=n-i,l=r,c=.3963377774*t+.2158037573*e,h=-.1055613458*t-.0638541728*e,u=-.0894841775*t-1.291485548*e,f=a+l*c,p=a+l*h,g=a+l*u;{let y=i*(1-s)+s*n,m=s*r,x=y+m*c,v=y+m*h,b=y+m*u,w=x*x*x,_=v*v*v,$=b*b*b,P=3*f*x*x,C=3*p*v*v,T=3*g*b*b,E=6*f*f*x,S=6*p*p*v,R=6*g*g*b,O=4.0767416621*w-3.3077115913*_+.2309699292*$-1,A=4.0767416621*P-3.3077115913*C+.2309699292*T,B=4.0767416621*E-3.3077115913*S+.2309699292*R,L=A/(A*A-.5*O*B),D=-O*L,k=-1.2684380046*w+2.6097574011*_-.3413193965*$-1,N=-1.2684380046*P+2.6097574011*C-.3413193965*T,j=-1.2684380046*E+2.6097574011*S-.3413193965*R,X=N/(N*N-.5*k*j),z=-k*X,M=-.0041960863*w-.7034186147*_+1.707614701*$-1,H=-.0041960863*P-.7034186147*C+1.707614701*T,W=-.0041960863*E-.7034186147*S+1.707614701*R,U=H/(H*H-.5*M*W),Y=-M*U;D=L>=0?D:1e6,z=X>=0?z:1e6,Y=U>=0?Y:1e6,s+=Math.min(D,Math.min(z,Y))}}}return s}function Za(t,e,n=null){n||(n=Ua(t,e));let r=n[0],i=n[1];return[i/r,i/(1-r)]}function qd(t,e,n){let r=Ua(e,n),i=Cx(e,n,t,1,t,r),o=Za(e,n,r),s=.11516993+1/(7.4477897+4.1590124*n+e*(-2.19557347+1.75198401*n+e*(-2.13704948-10.02301043*n+e*(-4.24894561+5.38770819*n+4.69891013*e)))),a=.11239642+1/(1.6132032-.68124379*n+e*(.40370612+.90148123*n+e*(-.27087943+.6122399*n+e*(.00299215-.45399568*n-.14661872*e)))),l=i/Math.min(t*o[0],(1-t)*o[1]),c=t*s,h=(1-t)*a,u=.9*l*Math.sqrt(Math.sqrt(1/(1/(c*c*c*c)+1/(h*h*h*h))));return c=t*.4,h=(1-t)*.8,[Math.sqrt(1/(1/(c*c)+1/(h*h))),u,i]}function Ud(t){const e=t.l!==void 0?t.l:0,n=t.a!==void 0?t.a:0,r=t.b!==void 0?t.b:0,i={mode:"okhsl",l:qa(e)};t.alpha!==void 0&&(i.alpha=t.alpha);let o=Math.sqrt(n*n+r*r);if(!o)return i.s=0,i;let[s,a,l]=qd(e,n/o,r/o),c;if(o<a){let h=0,u=.8*s,f=1-u/a;c=(o-h)/(u+f*(o-h))*.8}else{let h=a,u=.2*a*a*1.25*1.25/s,f=1-u/(l-a);c=.8+.2*((o-h)/(u+f*(o-h)))}return c&&(i.s=c,i.h=me(Math.atan2(r,n)*180/Math.PI)),i}function Zd(t){let e=t.h!==void 0?t.h:0,n=t.s!==void 0?t.s:0,r=t.l!==void 0?t.l:0;const i={mode:"oklab",l:po(r)};if(t.alpha!==void 0&&(i.alpha=t.alpha),!n||r===1)return i.a=i.b=0,i;let o=Math.cos(e/180*Math.PI),s=Math.sin(e/180*Math.PI),[a,l,c]=qd(i.l,o,s),h,u,f,p;n<.8?(h=1.25*n,u=0,f=.8*a,p=1-f/l):(h=5*(n-.8),u=l,f=.2*l*l*1.25*1.25/a,p=1-f/(c-l));let g=u+h*f/(1-p*h);return i.a=g*o,i.b=g*s,i}const Ox=Ae(xe({},Od),{mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:Ud,rgb:t=>Ud(uo(t))},toMode:{oklab:Zd,rgb:t=>fo(Zd(t))}});function Kd(t){let e=t.l!==void 0?t.l:0,n=t.a!==void 0?t.a:0,r=t.b!==void 0?t.b:0,i=Math.sqrt(n*n+r*r),o=i?n/i:1,s=i?r/i:1,[a,l]=Za(o,s),c=.5,h=1-c/a,u=l/(i+e*l),f=u*e,p=u*i,g=po(f),y=p*g/f,m=Jr({l:g,a:o*y,b:s*y}),x=Math.cbrt(1/Math.max(m.r,m.g,m.b,0));e=e/x,i=i/x*qa(e)/e,e=qa(e);const v={mode:"okhsv",s:i?(c+l)*p/(l*c+l*h*p):0,v:e?e/f:0};return v.s&&(v.h=me(Math.atan2(r,n)*180/Math.PI)),t.alpha!==void 0&&(v.alpha=t.alpha),v}function Qd(t){const e={mode:"oklab"};t.alpha!==void 0&&(e.alpha=t.alpha);const n=t.h!==void 0?t.h:0,r=t.s!==void 0?t.s:0,i=t.v!==void 0?t.v:0,o=Math.cos(n/180*Math.PI),s=Math.sin(n/180*Math.PI),[a,l]=Za(o,s),c=.5,h=1-c/a,u=1-r*c/(c+l-l*h*r),f=r*l*c/(c+l-l*h*r),p=po(u),g=f*p/u,y=Jr({l:p,a:o*g,b:s*g}),m=Math.cbrt(1/Math.max(y.r,y.g,y.b,0)),x=po(i*u),v=f*x/u;return e.l=x*m,e.a=v*o*m,e.b=v*s*m,e}const Mx=Ae(xe({},Ed),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Kd,rgb:t=>Kd(uo(t))},toMode:{oklab:Qd,rgb:t=>fo(Qd(t))}});function Sx(t,e){if(!e||e[0]!=="oklab")return;const n={mode:"oklab"},[,r,i,o,s]=e;if(!(r.type===J.Hue||i.type===J.Hue||o.type===J.Hue))return r.type!==J.None&&(n.l=Math.min(Math.max(0,r.type===J.Number?r.value:r.value/100),1)),i.type!==J.None&&(n.a=i.type===J.Number?i.value:i.value*.4/100),o.type!==J.None&&(n.b=o.type===J.Number?o.value:o.value*.4/100),s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const Ex=Ae(xe({},Va),{mode:"oklab",toMode:{lrgb:Jr,rgb:fo},fromMode:{lrgb:Gd,rgb:uo},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Sx],serialize:t=>`oklab(${t.l!==void 0?t.l:"none"} ${t.a!==void 0?t.a:"none"} ${t.b!==void 0?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`});function Ix(t,e){if(!e||e[0]!=="oklch")return;const n={mode:"oklch"},[,r,i,o,s]=e;if(r.type!==J.None){if(r.type===J.Hue)return;n.l=Math.min(Math.max(0,r.type===J.Number?r.value:r.value/100),1)}if(i.type!==J.None&&(n.c=Math.max(0,i.type===J.Number?i.value:i.value*.4/100)),o.type!==J.None){if(o.type===J.Percentage)return;n.h=o.value}return s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const Jd=Ae(xe({},Ya),{mode:"oklch",toMode:{oklab:t=>On(t,"oklab"),rgb:t=>fo(On(t,"oklab"))},fromMode:{rgb:t=>Cn(uo(t),"oklch"),oklab:t=>Cn(t,"oklch")},parse:[Ix],serialize:t=>`oklch(${t.l!==void 0?t.l:"none"} ${t.c!==void 0?t.c:"none"} ${t.h!==void 0?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),tu=t=>{let{r:e,g:n,b:r,alpha:i}=wr(t),o={mode:"xyz65",x:.486570948648216*e+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*e+.6917385218365062*n+.079286914093745*r,z:0*e+.0451133818589026*n+1.043944368900976*r};return i!==void 0&&(o.alpha=i),o},eu=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=_r({r:t*2.4934969119414263-e*.9313836179191242-.402710784450717*n,g:t*-.8294889695615749+e*1.7626640603183465+.0236246858419436*n,b:t*.0358458302437845-e*.0761723892680418+.9568845240076871*n},"p3");return r!==void 0&&(i.alpha=r),i},Tx=Ae(xe({},br),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:t=>eu(jn(t)),xyz65:eu},toMode:{rgb:t=>Fn(tu(t)),xyz65:tu}}),Ka=t=>{let e=Math.abs(t);return e>=1/512?Math.sign(t)*Math.pow(e,1/1.8):16*t},nu=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"prophoto",r:Ka(t*1.3457868816471585-e*.2555720873797946-.0511018649755453*n),g:Ka(t*-.5446307051249019+e*1.5082477428451466+.0205274474364214*n),b:Ka(t*0+e*0+1.2119675456389452*n)};return r!==void 0&&(i.alpha=r),i},Qa=(t=0)=>{let e=Math.abs(t);return e>=16/512?Math.sign(t)*Math.pow(e,1.8):t/16},ru=t=>{let e=Qa(t.r),n=Qa(t.g),r=Qa(t.b),i={mode:"xyz50",x:.7977666449006423*e+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*e+.7118352342418731*n+899369387256e-16*r,z:0*e+0*n+.8251046025104602*r};return t.alpha!==void 0&&(i.alpha=t.alpha),i},Ax=Ae(xe({},br),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:nu,rgb:t=>nu(Qr(t))},toMode:{xyz50:ru,rgb:t=>Kr(ru(t))}}),iu=1.09929682680944,kx=.018053968510807,Ja=t=>{const e=Math.abs(t);return e>kx?(Math.sign(t)||1)*(iu*Math.pow(e,.45)-(iu-1)):4.5*t},ou=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"rec2020",r:Ja(t*1.7166511879712683-e*.3556707837763925-.2533662813736599*n),g:Ja(t*-.6666843518324893+e*1.6164812366349395+.0157685458139111*n),b:Ja(t*.0176398574453108-e*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(i.alpha=r),i},su=1.09929682680944,Lx=.018053968510807,tl=(t=0)=>{let e=Math.abs(t);return e<Lx*4.5?t/4.5:(Math.sign(t)||1)*Math.pow((e+su-1)/su,1/.45)},au=t=>{let e=tl(t.r),n=tl(t.g),r=tl(t.b),i={mode:"xyz65",x:.6369580483012911*e+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*e+.6779980715188708*n+.059301716469862*r,z:0*e+.0280726930490874*n+1.0609850577107909*r};return t.alpha!==void 0&&(i.alpha=t.alpha),i},zx=Ae(xe({},br),{mode:"rec2020",fromMode:{xyz65:ou,rgb:t=>ou(jn(t))},toMode:{xyz65:au,rgb:t=>Fn(au(t))},parse:["rec2020"],serialize:"rec2020"}),Bn=.0037930732552754493,lu=Math.cbrt(Bn),el=t=>Math.cbrt(t)-lu,Hx=t=>{const{r:e,g:n,b:r,alpha:i}=wr(t),o=el(.3*e+.622*n+.078*r+Bn),s=el(.23*e+.692*n+.078*r+Bn),a=el(.2434226892454782*e+.2047674442449682*n+.5518098665095535*r+Bn),l={mode:"xyb",x:(o-s)/2,y:(o+s)/2,b:a-(o+s)/2};return i!==void 0&&(l.alpha=i),l},nl=t=>Math.pow(t+lu,3),Rx={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:({x:t,y:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i=nl(t+e)-Bn,o=nl(e-t)-Bn,s=nl(n+e)-Bn,a=_r({r:11.031566904639861*i-9.866943908131562*o-.16462299650829934*s,g:-3.2541473810744237*i+4.418770377582723*o-.16462299650829934*s,b:-3.6588512867136815*i+2.7129230459360922*o+1.9459282407775895*s});return r!==void 0&&(a.alpha=r),a}},fromMode:{rgb:Hx},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:ot,y:ot,b:ot,alpha:{use:ot,fixup:ce}}},Dx={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Kr,lab:Wa},fromMode:{rgb:Qr,lab:Fa},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:ot,y:ot,z:ot,alpha:{use:ot,fixup:ce}}},Nx={mode:"xyz65",toMode:{rgb:Fn,xyz50:t=>{let{x:e,y:n,z:r,alpha:i}=t;e===void 0&&(e=0),n===void 0&&(n=0),r===void 0&&(r=0);let o={mode:"xyz50",x:1.0479298208405488*e+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*e+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*e+.0150551448965779*n+.7518742899580008*r};return i!==void 0&&(o.alpha=i),o}},fromMode:{rgb:jn,xyz50:t=>{let{x:e,y:n,z:r,alpha:i}=t;e===void 0&&(e=0),n===void 0&&(n=0),r===void 0&&(r=0);let o={mode:"xyz65",x:.9554734527042182*e-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*e+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*e-.0205076964334779*n+1.3303659366080753*r};return i!==void 0&&(o.alpha=i),o}},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:ot,y:ot,z:ot,alpha:{use:ot,fixup:ce}}},jx={mode:"yiq",toMode:{rgb:({y:t,i:e,q:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i={mode:"rgb",r:t+.95608445*e+.6208885*n,g:t-.27137664*e-.6486059*n,b:t-1.10561724*e+1.70250126*n};return r!==void 0&&(i.alpha=r),i}},fromMode:{rgb:({r:t,g:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i={mode:"yiq",y:.29889531*t+.58662247*e+.11448223*n,i:.59597799*t-.2741761*e-.32180189*n,q:.21147017*t-.52261711*e+.31114694*n};return r!==void 0&&(i.alpha=r),i}},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:ot,i:ot,q:ot,alpha:{use:ot,fixup:ce}}},Fx=t=>Math.max(0,Math.min(1,t||0)),go=t=>Math.round(Fx(t)*255),cu=ba("rgb"),hu=t=>{if(t===void 0)return;let e=go(t.r),n=go(t.g),r=go(t.b);return"#"+(1<<24|e<<16|n<<8|r).toString(16).slice(1)},Bx=t=>{if(t===void 0)return;let e=go(t.alpha!==void 0?t.alpha:1);return hu(t)+(256|e).toString(16).slice(1)},ti=t=>hu(cu(t)),Wx=t=>Bx(cu(t));function rl(t){let e=ba("lrgb")(t);return .2126*e.r+.7152*e.g+.0722*e.b}function il(t,e){let n=rl(t),r=rl(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}Rt(z4),Rt(B4),Rt(W4),Rt(V4),Rt(G4),Rt(Od),Rt(Ed),Rt(rx),Rt(ix),Rt(lx),Rt(cx),Rt(Va),Rt(dx),Rt(Ya),Rt(fx),Rt(wx),Rt(_x),Rt($x),Rt(Ox),Rt(Mx),Rt(Ex);const du=Rt(Jd);Rt(Tx),Rt(Ax),Rt(zx),Rt(br),Rt(Rx),Rt(Dx),Rt(Nx),Rt(jx);function Wn(t){if(!t)return!1;const e=t.trim().toLowerCase();return!(e==="none"||e==="transparent"||e==="")}function uu(t){const e=tn(t);return e?rl(e)<.5:!1}var Mn=Array.isArray,fu=typeof global=="object"&&global&&global.Object===Object&&global,Vx=typeof self=="object"&&self&&self.Object===Object&&self,en=fu||Vx||Function("return this")(),Sn=en.Symbol,pu=Object.prototype,Yx=pu.hasOwnProperty,Xx=pu.toString,ei=Sn?Sn.toStringTag:void 0;function Gx(t){var e=Yx.call(t,ei),n=t[ei];try{t[ei]=void 0;var r=!0}catch(o){}var i=Xx.call(t);return r&&(e?t[ei]=n:delete t[ei]),i}var qx=Object.prototype,Ux=qx.toString;function Zx(t){return Ux.call(t)}var Kx="[object Null]",Qx="[object Undefined]",gu=Sn?Sn.toStringTag:void 0;function Vn(t){return t==null?t===void 0?Qx:Kx:gu&&gu in Object(t)?Gx(t):Zx(t)}function En(t){return t!=null&&typeof t=="object"}var Jx="[object Symbol]";function mo(t){return typeof t=="symbol"||En(t)&&Vn(t)==Jx}var tb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,eb=/^\w*$/;function nb(t,e){if(Mn(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||mo(t)?!0:eb.test(t)||!tb.test(t)||e!=null&&t in Object(e)}function nn(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var rb="[object AsyncFunction]",ib="[object Function]",ob="[object GeneratorFunction]",sb="[object Proxy]";function ol(t){if(!nn(t))return!1;var e=Vn(t);return e==ib||e==ob||e==rb||e==sb}var sl=en["__core-js_shared__"],mu=(function(){var t=/[^.]+$/.exec(sl&&sl.keys&&sl.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function ab(t){return!!mu&&mu in t}var lb=Function.prototype,cb=lb.toString;function Yn(t){if(t!=null){try{return cb.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var hb=/[\\^$.*+?()[\]{}|]/g,db=/^\[object .+?Constructor\]$/,ub=Function.prototype,fb=Object.prototype,pb=ub.toString,gb=fb.hasOwnProperty,mb=RegExp("^"+pb.call(gb).replace(hb,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function yb(t){if(!nn(t)||ab(t))return!1;var e=ol(t)?mb:db;return e.test(Yn(t))}function vb(t,e){return t==null?void 0:t[e]}function Xn(t,e){var n=vb(t,e);return yb(n)?n:void 0}var ni=Xn(Object,"create");function xb(){this.__data__=ni?ni(null):{},this.size=0}function bb(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var wb="__lodash_hash_undefined__",_b=Object.prototype,$b=_b.hasOwnProperty;function Pb(t){var e=this.__data__;if(ni){var n=e[t];return n===wb?void 0:n}return $b.call(e,t)?e[t]:void 0}var Cb=Object.prototype,Ob=Cb.hasOwnProperty;function Mb(t){var e=this.__data__;return ni?e[t]!==void 0:Ob.call(e,t)}var Sb="__lodash_hash_undefined__";function Eb(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ni&&e===void 0?Sb:e,this}function Gn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Gn.prototype.clear=xb,Gn.prototype.delete=bb,Gn.prototype.get=Pb,Gn.prototype.has=Mb,Gn.prototype.set=Eb;function Ib(){this.__data__=[],this.size=0}function yo(t,e){return t===e||t!==t&&e!==e}function vo(t,e){for(var n=t.length;n--;)if(yo(t[n][0],e))return n;return-1}var Tb=Array.prototype,Ab=Tb.splice;function kb(t){var e=this.__data__,n=vo(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Ab.call(e,n,1),--this.size,!0}function Lb(t){var e=this.__data__,n=vo(e,t);return n<0?void 0:e[n][1]}function zb(t){return vo(this.__data__,t)>-1}function Hb(t,e){var n=this.__data__,r=vo(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function gn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}gn.prototype.clear=Ib,gn.prototype.delete=kb,gn.prototype.get=Lb,gn.prototype.has=zb,gn.prototype.set=Hb;var ri=Xn(en,"Map");function Rb(){this.size=0,this.__data__={hash:new Gn,map:new(ri||gn),string:new Gn}}function Db(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function xo(t,e){var n=t.__data__;return Db(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Nb(t){var e=xo(this,t).delete(t);return this.size-=e?1:0,e}function jb(t){return xo(this,t).get(t)}function Fb(t){return xo(this,t).has(t)}function Bb(t,e){var n=xo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function In(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}In.prototype.clear=Rb,In.prototype.delete=Nb,In.prototype.get=jb,In.prototype.has=Fb,In.prototype.set=Bb;var Wb="Expected a function";function al(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Wb);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(al.Cache||In),n}al.Cache=In;var Vb=500;function Yb(t){var e=al(t,function(r){return n.size===Vb&&n.clear(),r}),n=e.cache;return e}var Xb=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gb=/\\(\\)?/g,qb=Yb(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Xb,function(n,r,i,o){e.push(i?o.replace(Gb,"$1"):r||n)}),e});function Ub(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var yu=Sn?Sn.prototype:void 0,vu=yu?yu.toString:void 0;function xu(t){if(typeof t=="string")return t;if(Mn(t))return Ub(t,xu)+"";if(mo(t))return vu?vu.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ii(t){return t==null?"":xu(t)}function Zb(t,e){return Mn(t)?t:nb(t,e)?[t]:qb(ii(t))}function Kb(t){if(typeof t=="string"||mo(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Qb(t,e){e=Zb(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Kb(e[n++])];return n&&n==r?t:void 0}function bu(t,e,n){var r=t==null?void 0:Qb(t,e);return r===void 0?n:r}function oi(t,e){if(e.length===0)return{};const n=Array.isArray(t)?t[e[0]]:t.items[e[0]];if(e.length===1)return n;const r=e.slice(1).map(i=>`children[${i}]`).join(".");return bu(n,r)}function wu(t){const{structure:e,item:n,items:r}=t;return!(!e||!n||r.some(i=>!i))}function Jb(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}function t5(t,e,n){var r=t.length;return n=n===void 0?r:n,!e&&n>=r?t:Jb(t,e,n)}var e5="\\ud800-\\udfff",n5="\\u0300-\\u036f",r5="\\ufe20-\\ufe2f",i5="\\u20d0-\\u20ff",o5=n5+r5+i5,s5="\\ufe0e\\ufe0f",a5="\\u200d",l5=RegExp("["+a5+e5+o5+s5+"]");function _u(t){return l5.test(t)}function c5(t){return t.split("")}var $u="\\ud800-\\udfff",h5="\\u0300-\\u036f",d5="\\ufe20-\\ufe2f",u5="\\u20d0-\\u20ff",f5=h5+d5+u5,p5="\\ufe0e\\ufe0f",g5="["+$u+"]",ll="["+f5+"]",cl="\\ud83c[\\udffb-\\udfff]",m5="(?:"+ll+"|"+cl+")",Pu="[^"+$u+"]",Cu="(?:\\ud83c[\\udde6-\\uddff]){2}",Ou="[\\ud800-\\udbff][\\udc00-\\udfff]",y5="\\u200d",Mu=m5+"?",Su="["+p5+"]?",v5="(?:"+y5+"(?:"+[Pu,Cu,Ou].join("|")+")"+Su+Mu+")*",x5=Su+Mu+v5,b5="(?:"+[Pu+ll+"?",ll,Cu,Ou,g5].join("|")+")",w5=RegExp(cl+"(?="+cl+")|"+b5+x5,"g");function _5(t){return t.match(w5)||[]}function $5(t){return _u(t)?_5(t):c5(t)}function P5(t){return function(e){e=ii(e);var n=_u(e)?$5(e):void 0,r=n?n[0]:e.charAt(0),i=n?t5(n,1).join(""):e.slice(1);return r[t]()+i}}var C5=P5("toUpperCase");function O5(t){return C5(ii(t).toLowerCase())}function M5(t,e,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;)n=e(n,t[i],i,t);return n}function S5(t){return function(e){return t==null?void 0:t[e]}}var E5={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},I5=S5(E5),T5=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,A5="\\u0300-\\u036f",k5="\\ufe20-\\ufe2f",L5="\\u20d0-\\u20ff",z5=A5+k5+L5,H5="["+z5+"]",R5=RegExp(H5,"g");function D5(t){return t=ii(t),t&&t.replace(T5,I5).replace(R5,"")}var N5=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function j5(t){return t.match(N5)||[]}var F5=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function B5(t){return F5.test(t)}var Eu="\\ud800-\\udfff",W5="\\u0300-\\u036f",V5="\\ufe20-\\ufe2f",Y5="\\u20d0-\\u20ff",X5=W5+V5+Y5,Iu="\\u2700-\\u27bf",Tu="a-z\\xdf-\\xf6\\xf8-\\xff",G5="\\xac\\xb1\\xd7\\xf7",q5="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",U5="\\u2000-\\u206f",Z5=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Au="A-Z\\xc0-\\xd6\\xd8-\\xde",K5="\\ufe0e\\ufe0f",ku=G5+q5+U5+Z5,Lu="['’]",zu="["+ku+"]",Q5="["+X5+"]",Hu="\\d+",J5="["+Iu+"]",Ru="["+Tu+"]",Du="[^"+Eu+ku+Hu+Iu+Tu+Au+"]",t6="\\ud83c[\\udffb-\\udfff]",e6="(?:"+Q5+"|"+t6+")",n6="[^"+Eu+"]",Nu="(?:\\ud83c[\\udde6-\\uddff]){2}",ju="[\\ud800-\\udbff][\\udc00-\\udfff]",Pr="["+Au+"]",r6="\\u200d",Fu="(?:"+Ru+"|"+Du+")",i6="(?:"+Pr+"|"+Du+")",Bu="(?:"+Lu+"(?:d|ll|m|re|s|t|ve))?",Wu="(?:"+Lu+"(?:D|LL|M|RE|S|T|VE))?",Vu=e6+"?",Yu="["+K5+"]?",o6="(?:"+r6+"(?:"+[n6,Nu,ju].join("|")+")"+Yu+Vu+")*",s6="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",a6="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",l6=Yu+Vu+o6,c6="(?:"+[J5,Nu,ju].join("|")+")"+l6,h6=RegExp([Pr+"?"+Ru+"+"+Bu+"(?="+[zu,Pr,"$"].join("|")+")",i6+"+"+Wu+"(?="+[zu,Pr+Fu,"$"].join("|")+")",Pr+"?"+Fu+"+"+Bu,Pr+"+"+Wu,a6,s6,Hu,c6].join("|"),"g");function d6(t){return t.match(h6)||[]}function u6(t,e,n){return t=ii(t),e=e,e===void 0?B5(t)?d6(t):j5(t):t.match(e)||[]}var f6="['’]",p6=RegExp(f6,"g");function Xu(t){return function(e){return M5(u6(D5(e).replace(p6,"")),t,"")}}var g6=Xu(function(t,e,n){return e=e.toLowerCase(),t+(n?O5(e):e)});const m6=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","-apple-system","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function qn(t){const e=[];let n="",r=null;const i=()=>{const o=n.trim();o&&e.push(o),n=""};for(let o=0;o<t.length;o+=1){const s=t[o];if(r){n+=s,s===r&&(r=null);continue}if(s==='"'||s==="'"){r=s,n+=s;continue}if(s===","){i();continue}n+=s}return i(),e}function Gu(t){const e=t.trim();return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function y6(t){const e=t.trim();return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")}function v6(t){return/^\d/.test(t)||/\s/.test(t)}function x6(t){const e=t.trim();if(!e||y6(e)||m6.has(e.toLowerCase())||!v6(e))return e;const n=e.includes('"')&&!e.includes("'")?"'":'"';return`${n}${e}${n}`}function Cr(t){const e=qn(t);return e.length?e.length===1?Gu(e[0]):e.map(n=>Gu(n)).join(", "):""}function Un(t){const e=qn(t);return e.length?e.map(n=>x6(n)).join(", "):t.trim()}const b6={100:"thin",hairline:"thin",thin:"thin",200:"extralight",ultralight:"extralight",extralight:"extralight",300:"light",light:"light",400:"regular",normal:"regular",regular:"regular",500:"medium",medium:"medium",600:"semibold",demibold:"semibold",semibold:"semibold",700:"bold",bold:"bold",800:"extrabold",ultrabold:"extrabold",extrabold:"extrabold",900:"black",heavy:"black",black:"black",950:"extrablack",ultrablack:"extrablack",extrablack:"extrablack"};function qu(t){const e=String(t).toLowerCase();return b6[e]||"regular"}function wt(t,e={}){const n=document.createElementNS("http://www.w3.org/2000/svg",t);return Yt(n,e),n}function Or(t){const n=new DOMParser().parseFromString(t,"image/svg+xml");if(n.querySelector("parsererror"))throw new Error("Invalid SVG string");return n.documentElement}function Yt(t,e){Object.entries(e).forEach(([n,r])=>{r==null?t.removeAttribute(n):t.setAttribute(n,r)})}function ke(t,e,n=!0){return e.reduce((r,i)=>{const o=t.getAttribute(i);return(!n||o!==null&&o!==""&&o!==void 0)&&(r[i]=o),r},{})}function w6(t,e){e.forEach(n=>{t.removeAttribute(n)})}function hl(t,e){if(e(t)===!1)return;Array.from(t.children).forEach(r=>{hl(r,e)})}function bo(t,e="infographic-defs"){const n=e?`defs#${e}`:"defs",r=t.querySelector(n);if(r)return r;const i=wt("defs");return e&&(i.id=e),t.prepend(i),i}var Uu=Object.getOwnPropertySymbols,_6=Object.prototype.hasOwnProperty,$6=Object.prototype.propertyIsEnumerable,P6=(t,e)=>{var n={};for(var r in t)_6.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Uu)for(var r of Uu(t))e.indexOf(r)<0&&$6.call(t,r)&&(n[r]=t[r]);return n};function Zn(t){return Qu(t)?t.querySelector("span"):null}function C6(t,e){const n=document.createElement("span"),r=wt("foreignObject",{overflow:"visible"});return r.appendChild(n),Zu(r,{textContent:t,attributes:e}),r}function Zu(t,e){const{textContent:n,attributes:r}=e;if(n!==void 0&&ul(t,n),!r)return;const i=Zn(t);let{width:o,height:s}=r;const a={};if(i){if(Object.assign(i.style,M6(r)),!o||!s){const p=S6(i);!o&&!t.hasAttribute("width")&&(o=String(p.width)),!s&&!t.hasAttribute("height")&&(s=String(p.height))}const{"data-horizontal-align":u,"data-vertical-align":f}=r;Object.assign(i.style,O6(u,f))}const{id:l,x:c,y:h}=r;l&&(a.id=l),c!==void 0&&(a.x=String(c)),h!==void 0&&(a.y=String(h)),o!==void 0&&(a.width=String(o)),s!==void 0&&(a.height=String(s)),Yt(t,a)}function O6(t,e){const n={width:"100%",height:"100%",display:"flex",flexWrap:"wrap",wordBreak:"break-word",whiteSpace:"pre-wrap"};switch(t){case"LEFT":n.textAlign="left",n.justifyContent="flex-start";break;case"CENTER":n.textAlign="center",n.justifyContent="center";break;case"RIGHT":n.textAlign="right",n.justifyContent="flex-end";break}switch(e){case"TOP":n.alignContent="flex-start",n.alignItems="flex-start";break;case"MIDDLE":n.alignContent="center",n.alignItems="center";break;case"BOTTOM":n.alignContent="flex-end",n.alignItems="flex-end";break}return n}function M6(t){const e=t,{x:n,y:r,width:i,height:o,["data-horizontal-align"]:s,["data-vertical-align"]:a,["font-size"]:l,["letter-spacing"]:c,["line-height"]:h,fill:u,["stroke-width"]:f,["text-anchor"]:p,["dominant-baseline"]:g,["font-family"]:y}=e,m=P6(e,["x","y","width","height","data-horizontal-align","data-vertical-align","font-size","letter-spacing","line-height","fill","stroke-width","text-anchor","dominant-baseline","font-family"]),x={overflow:"visible"};return u&&(x.color=u),Object.entries(m).forEach(([v,b])=>{x[g6(v)]=b}),l&&(x.fontSize=`${l}px`),h&&(x.lineHeight=typeof h=="string"&&h.endsWith("px")?h:+h),c&&(x.letterSpacing=`${c}px`),f&&(x.strokeWidth=`${f}px`),x.fontFamily=y?Un(y):y||"",x}function S6(t){const e=t.parentNode;t.style.visibility="hidden",document.body.appendChild(t);const n=t.getBoundingClientRect();return e?e.appendChild(t):document.body.removeChild(t),t.style.visibility="visible",n}function dl(t){var e;return((e=Zn(t))==null?void 0:e.innerText)||""}function ul(t,e){const n=Zn(t);n&&(n.innerText=e)}function fl(t){const e=Zn(t);if(!e)return{};const{color:n,fontSize:r,fontFamily:i,justifyContent:o,alignContent:s,fontWeight:a}=e.style,[l,c]=E6(o,s),h={"data-horizontal-align":l,"data-vertical-align":c};return i&&(h["font-family"]=Cr(i)),a&&(h["font-weight"]=a),r&&(h["font-size"]=String(parseInt(r))),n&&(h.fill=n),{attributes:h,textContent:dl(t)}}function E6(t,e){let n="LEFT",r="TOP";switch(t){case"flex-start":n="LEFT";break;case"center":n="CENTER";break;case"flex-end":n="RIGHT";break}switch(e){case"flex-start":r="TOP";break;case"center":r="MIDDLE";break;case"flex-end":r="BOTTOM";break}return[n,r]}const _e=(t,e)=>{var n;return((n=t==null?void 0:t.dataset)==null?void 0:n.elementType)===e},I6=t=>_e(t,"title"),T6=t=>_e(t,"desc"),A6=t=>_e(t,"shape"),k6=t=>_e(t,"shapes-group"),L6=t=>_e(t,"illus"),z6=t=>t instanceof SVGElement&&t.tagName==="text",H6=t=>t instanceof SVGElement&&t.tagName==="g",pl=t=>_e(t,"item-icon"),Ku=t=>_e(t,"item-icon-group"),R6=t=>_e(t,"item-label"),D6=t=>_e(t,"item-desc"),N6=t=>_e(t,"item-value"),j6=t=>_e(t,"item-illus"),F6=t=>_e(t,"edit-area"),B6=t=>_e(t,"btns-group"),W6=t=>_e(t,"rough-element"),V6=t=>_e(t,"rough-volume");function Qu(t){return t.tagName==="foreignObject"}function Y6(t){return t.tagName==="SPAN"}function mn(t){const e=gl(t);return[kt.Title,kt.Desc,kt.ItemLabel,kt.ItemDesc].includes(e)}function Ju(t){if(!t||!mn(t))return!1;const e=Zn(t);return e?e.hasAttribute("contenteditable"):!1}function X6(t){const e=t.tagName.toLowerCase();return["rect","circle","ellipse","line","polygon","polyline","path"].includes(e)}function Tn(t){return pl(t)||Ku(t)}function G6(t){let e=t;for(;e;){if(Mr(e,ya))return!0;e=e.parentElement}return!1}function si(t,e){t.setAttribute("data-element-type",e)}function Mr(t,e){return t.querySelector(`[data-element-type="${e}"]`)}function gl(t){return Tn(t)?kt.ItemIcon:t.getAttribute("data-element-type")||kt.Unknown}function q6(t){var e,n,r,i=t;function o(a,l){++e>i&&(r=n,s(1),++e),n[a]=l}function s(a){e=0,n=Object.create(null),a||(r=Object.create(null))}return s(),{clear:s,has:function(a){return n[a]!==void 0||r[a]!==void 0},get:function(a){var l=n[a];if(l!==void 0)return l;if((l=r[a])!==void 0)return o(a,l),l},set:function(a,l){n[a]!==void 0?n[a]=l:o(a,l)}}}var tf=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});const ef=globalThis.fetch,ml=q6(1024),yl=new Map;function U6(t){const e=Array.from(t.headers.entries());return e.length===0?"":(e.sort(([n],[r])=>n.toLowerCase().localeCompare(r.toLowerCase())),e.map(([n,r])=>`${n.toLowerCase()}:${r}`).join("|"))}function Z6(t){const e=U6(t);return e?`${t.method}:${t.url}:${e}`:`${t.method}:${t.url}`}function nf(t){return new Response(t.body.slice(0),t.init)}function K6(t,e){return tf(this,null,function*(){try{const n=yield ef(t),i={body:yield n.arrayBuffer(),init:{status:n.status,statusText:n.statusText,headers:Array.from(n.headers.entries())}};return n.ok&&ml.set(e,i),i}finally{yl.delete(e)}})}function wo(t,e){return tf(this,null,function*(){const n=new Request(t,e);if(n.method!=="GET")return ef(n);const r=Z6(n);if(ml.has(r))return nf(ml.get(r));let i=yl.get(r);i||(i=K6(n,r),yl.set(r,i));const o=yield i;return nf(o)})}function Q6(t,e={title:"信息图标题",desc:"信息图描述",items:"信息图的内容项",label:"项目标签文本",value:"项目数值内容",icon:"项目图标",illus:"项目插图",children:"子级项目(多层结构)"}){const{structure:n,items:r}=t,i=[],o=l=>" ".repeat(l);function s(l,c,h){const u=e[l];return u?`${o(h)}/** ${u} */
5
5
  ${o(h)}${l}: ${c};`:`${o(h)}${l}: ${c};`}function a(l,c){const h=r[l],u=[];for(const f of h){const p=f==="value"?"number":"string";u.push(s(f,p,c+1))}return r[l+1]&&u.push(s("children",`Array<${a(l+1,c+1)}>`,c+1)),`{
6
6
  ${u.join(`
7
7
  `)}
8
8
  ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push(s("title","string",1)),i.push(s("desc","string",1))),n.includes("item")&&r.length>0&&i.push(s("items",`Array<${a(0,1)}>`,1)),i.push("}"),i.join(`
9
- `)}function Ju(t){let e=0;if(t.length===0)return e.toString();for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString()}var B4=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function W4(t){return t.startsWith("data:")}function si(t){return B4(this,null,function*(){var e;if(!t||!W4(t))return null;const n=(e=t.match(/^data:([^;]+)/))==null?void 0:e[1];if(!n)return null;const r=()=>new Promise((c,h)=>{const u=new Image;u.onload=()=>{const f=u.naturalWidth,p=u.naturalHeight,g=document.createElement("canvas"),y=g.getContext("2d");if(!y)return c({width:f,height:p,hasAlpha:!1});if(["image/jpeg","image/jpg","image/webp","image/gif"].includes(n))return c({width:f,height:p,hasAlpha:!1});g.width=f,g.height=p,y.drawImage(u,0,0);let m=!1;const b=10;for(let v=0;v<f&&!m;v+=b)for(let x=0;x<p;x+=b)if(y.getImageData(v,x,1,1).data[3]<255){m=!0;break}c({width:f,height:p,hasAlpha:m})},u.onerror=()=>h(new Error("Failed to analysis image")),u.src=t}),{width:i,height:o,hasAlpha:s}=yield r(),l=(()=>{if(s||n!=null&&n.includes("image/gif")||n!=null&&n.includes("image/svg")||Math.min(i,o)<=200)return"xMidYMid meet";const h=i/o;return h>=.6&&h<=1.67||h<.3||h>3.33?"xMidYMid meet":"xMidYMid slice"})();return Mr(`
9
+ `)}function rf(t){let e=0;if(t.length===0)return e.toString();for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString()}var J6=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function tw(t){return t.startsWith("data:")}function ai(t){return J6(this,null,function*(){var e;if(!t||!tw(t))return null;const n=(e=t.match(/^data:([^;]+)/))==null?void 0:e[1];if(!n)return null;const r=()=>new Promise((c,h)=>{const u=new Image;u.onload=()=>{const f=u.naturalWidth,p=u.naturalHeight,g=document.createElement("canvas"),y=g.getContext("2d");if(!y)return c({width:f,height:p,hasAlpha:!1});if(["image/jpeg","image/jpg","image/webp","image/gif"].includes(n))return c({width:f,height:p,hasAlpha:!1});g.width=f,g.height=p,y.drawImage(u,0,0);let m=!1;const x=10;for(let v=0;v<f&&!m;v+=x)for(let b=0;b<p;b+=x)if(y.getImageData(v,b,1,1).data[3]<255){m=!0;break}c({width:f,height:p,hasAlpha:m})},u.onerror=()=>h(new Error("Failed to analysis image")),u.src=t}),{width:i,height:o,hasAlpha:s}=yield r(),l=(()=>{if(s||n!=null&&n.includes("image/gif")||n!=null&&n.includes("image/svg")||Math.min(i,o)<=200)return"xMidYMid meet";const h=i/o;return h>=.6&&h<=1.67||h<.3||h>3.33?"xMidYMid meet":"xMidYMid slice"})();return Or(`
10
10
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${i} ${o}" preserveAspectRatio="${l}">
11
11
  <image href="${t}" width="${i}" height="${o}" />
12
- </symbol>`)})}function V4(t){return t.startsWith("<svg")||t.startsWith("<symbol")}function Er(t){if(!t||!V4(t))return null;const e=t.startsWith("<svg")?t.replace(/<svg/,"<symbol").replace(/svg>/,"symbol>"):t;return Mr(e)}var Y4=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function X4(t){try{return!!new URL(t)}catch(e){return!1}}function G4(t,e){return!!(t.toLowerCase().includes("image/svg")||!t&&e==="svg")}function tf(t,e){return Y4(this,null,function*(){if(!t||!X4(t))return null;const n=yield wo(t);if(!n.ok)throw new Error("Failed to load resource");const r=n.headers.get("Content-Type")||"";if(G4(r,e)){const s=yield n.text();return Er(s)}const i=yield n.blob(),o=yield q4(i);return si(o)})}function q4(t){return new Promise((e,n)=>{const r=new FileReader;r.onloadend=()=>{e(r.result)},r.onerror=n,r.readAsDataURL(t)})}var ef=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});const U4=t=>ef(null,null,function*(){var e;try{const n=new URLSearchParams({text:t,topK:"1"}),r=`${Yv}?${n.toString()}`,i=yield wo(r);if(!i.ok)return null;const o=yield i.json();return!(o!=null&&o.status)||!Array.isArray((e=o.data)==null?void 0:e.data)?null:o.data.data[0]||null}catch(n){return console.error(`Failed to query icon for "${t}":`,n),null}});function Z4(t){return t.startsWith("data:")}function K4(t){const e=t.trim();return e.startsWith("<svg")||e.startsWith("<symbol")}function Q4(t,e){return ef(this,null,function*(){var n;if(!t)return null;const r=yield U4(t);if(!r)return null;if(K4(r))return Er(r);if(Z4(r)){const i=((n=r.match(/^data:([^;]+)/))==null?void 0:n[1])||"",o=r.includes(";base64,");if(i==="image/svg+xml"&&!o){const s=r.indexOf(","),a=s>=0?r.slice(s+1):r;return Er(a)}return si(r)}return tf(r,e)})}let nf=null;function J4(t){nf=t}function t5(){return nf}function e5(t){if(!t.startsWith("data:"))return null;const e=t.indexOf(",");if(e===-1)return null;const n=t.slice(5,e),r=t.slice(e+1),i=n.split(";"),o=i[0],s=i.includes("base64");return o==="image/svg+xml"&&!s?{source:"inline",format:"svg",encoding:"raw",data:r.startsWith("%3C")?decodeURIComponent(r):r}:o.startsWith("image/")?{source:"inline",format:o==="image/svg+xml"?"svg":"image",encoding:s?"base64":"data-uri",data:t}:null}const n5=new Set(["svg","png","jpg","jpeg","webp","gif"]);function r5(t){const e=t.trim();return e.startsWith("<svg")||e.startsWith("<symbol")}function i5(t){const e=t.toLowerCase();if(e.endsWith(".svg")||e.includes(".svg?"))return"svg";if(e.endsWith(".png")||e.endsWith(".jpg")||e.endsWith(".jpeg")||e.endsWith(".webp")||e.endsWith(".gif"))return"image"}function o5(t){var e;if(!t.startsWith("ref:"))return null;const n=t.slice(4),[r,...i]=n.split(":");if(!r||i.length===0)return null;let o;i.length>1&&n5.has(i[0].toLowerCase())&&(o=(e=i.shift())==null?void 0:e.toLowerCase());const s=i.join(":");if(!s)return null;const a=r==="url"?"remote":r;return a==="remote"?{source:"remote",format:o||i5(s)||void 0,data:s}:a==="search"?{source:"search",format:o||"svg",data:s}:a==="svg"?{source:"inline",format:"svg",data:s,encoding:"raw"}:{source:"custom",data:t,format:o}}function _o(t){if(!t)return null;if(typeof t!="string"){if(t.source)return t;const r=t;return r.type==="image"?{source:"inline",format:"image",data:r.data}:r.type==="svg"?{source:"inline",format:"svg",encoding:"raw",data:r.data}:r.type==="remote"?{source:"remote",format:r.format,data:r.data}:r.type==="search"?{source:"search",format:r.format||"svg",data:r.data}:r.type==="custom"?{source:"custom",data:r.data}:null}const e=e5(t);if(e)return e;const n=o5(t);return n||(r5(t)?{source:"inline",format:"svg",encoding:"raw",data:t}:{source:"custom",data:t})}function vl(t){const e=typeof t=="string"?_o(t):t;return e?"rsc-"+Ju(JSON.stringify(e)):null}function rf(t){const e=vl(t);return e?`#${e}`:null}var of=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function s5(t,e){return of(this,null,function*(){const n=_o(e);if(!n)return null;n.scene||(n.scene=t);const{source:r,data:i,format:o,encoding:s}=n;if(r==="inline"){const a=i.startsWith("data:");return o==="svg"&&s==="raw"?Er(i):o==="svg"&&a?yield si(i):a||o==="image"?yield si(i):Er(i)}else{if(r==="remote")return yield tf(i,o);if(r==="search")return yield Q4(i,o);{const a=t5();if(a)return yield a(n)}}return null})}const sf=new Map,bl=new WeakMap;function af(t,e,n){return of(this,null,function*(){if(!t)return null;const r=_o(n);if(!r)return null;const i=vl(r),o=sf.has(i)?sf.get(i)||null:yield s5(e,r);if(!o)return null;bl.has(t)||bl.set(t,new Map);const s=bl.get(t);if(s.has(i))return i;const a=xo(t);return o.id=i,a.appendChild(o),s.set(i,o),i})}var a5=Object.defineProperty,l5=Object.defineProperties,c5=Object.getOwnPropertyDescriptors,lf=Object.getOwnPropertySymbols,h5=Object.prototype.hasOwnProperty,d5=Object.prototype.propertyIsEnumerable,cf=(t,e,n)=>e in t?a5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,u5=(t,e)=>{for(var n in e||(e={}))h5.call(e,n)&&cf(t,n,e[n]);if(lf)for(var n of lf(e))d5.call(e,n)&&cf(t,n,e[n]);return t},f5=(t,e)=>l5(t,c5(e));const p5=new WeakMap;function g5(t,e={}){const n=wt("use",f5(u5({},e),{href:rf(t)}));return hf(n),p5.set(n,t),n}function hf(t){const{stroke:e,fill:n}=ke(t,["fill","stroke"]);t.style.color=n||e||"currentColor"}function $o(t){return t.tagName==="use"?t:t.querySelector("use")}function xl(t){const e=$o(t);return e?ke(e,["width","height","x","y","width","height","fill","fill-opacity","stroke","opacity"]):{}}function m5(t,e,n){const r=$o(t);r&&(n&&Yt(r,n),hf(r))}const y5=",",v5=(t,e=y5)=>t.split(e).map(n=>parseInt(n,10)),df=t=>v5(t);function wl(...t){return t.map(e=>e.replace(/^\/+|\/+$/g,"")).filter(e=>e.trim().length>0).join("/")}const Po=new Map;let b5="sans-serif";const x5={fontFamily:"sans-serif",fontWeight:400,fontStyle:"normal",unitsPerEm:2048,metrics:{ascender:2189,descender:-555,lineGap:0},glyphs:{'"':727,"%":1821,"'":391,"(":682,")":682,"*":797,"+":1196,"-":682,"<":1196,"=":1196,">":1196,"@":2079,C:1479,D:1479,F:1251,G:1593,H:1479,J:1024,M:1706,N:1479,O:1593,Q:1593,R:1479,T:1251,U:1479,W:1933,Z:1251,"^":961,_:1024,"`":682,c:1024,i:455,j:455,k:1024,l:455,m:1706,r:682,s:1024,v:1024,w:1479,x:1024,y:1024,z:1024,"{":684,"|":532,"}":684,"~":1196},glyphsByWidth:{569:" !,./:;I[\\]ft",1139:"#$0123456789?Labdeghnopqu",1366:"&ABEKPSVXY"},defaultWidth:1139};function uf(t){if(t===void 0||t==="normal")return"400";if(t==="bold")return"700";const e={thin:"100",hairline:"100","extra-light":"200","ultra-light":"200",light:"300",regular:"400",normal:"400",medium:"500","semi-bold":"600",semibold:"600","demi-bold":"600",demibold:"600","extra-bold":"800",extrabold:"800","ultra-bold":"800",ultrabold:"800",black:"900",heavy:"900","extra-black":"950",extrablack:"950","ultra-black":"950",ultrablack:"950",bolder:"900",lighter:"300"};if(typeof t=="string"){const n=t.toLowerCase();return e[n]||t}return String(t)}function ff(t){return t||"normal"}function w5(t){const e=t.fontFamily,n=uf(t.fontWeight),r=ff(t.fontStyle);if(t.glyphsByWidth){const s=ve({},t.glyphs||{});for(const[a,l]of Object.entries(t.glyphsByWidth))if(typeof l=="string"){const c=Number(a);for(const h of l)s[h]=c}else s[a]=l;t=Ae(ve({},t),{glyphs:s,glyphsByWidth:void 0})}Po.has(e)||Po.set(e,new Map);const i=Po.get(e);i.has(n)||i.set(n,new Map),i.get(n).set(r,t)}function _5(t,e,n){const r=t||b5,i=uf(e),o=ff(n),s=Po.get(r);if(!s)return console.warn(`Font family "${r}" not registered, using fallback font data`),x5;let a=s.get(i);if(a){let c=a.get(o);if(c||o!=="normal"&&(c=a.get("normal"),c))return c;const h=a.values().next().value;if(h)return h}if(a=s.get("400"),a){let c=a.get(o);if(c||o!=="normal"&&(c=a.get("normal"),c))return c;const h=a.values().next().value;if(h)return h}const l=s.values().next().value;if(l){const c=l.values().next().value;if(c)return c}throw new Error(`No font data found for family "${r}" with weight "${i}" and style "${o}"`)}function $5(t,e){if(!e||e==="none")return t;switch(e){case"uppercase":return t.toUpperCase();case"lowercase":return t.toLowerCase();case"capitalize":return t.split(" ").map(n=>n.length===0?n:n[0].toUpperCase()+n.slice(1).toLowerCase()).join(" ");default:return t}}function pf(t){if(t===void 0)return 14;if(typeof t=="number")return t;const e=parseFloat(t);return isNaN(e)?16:e}function P5(t,e){const n=pf(t.fontSize),r=t.lineHeight;if(r===void 0){const{ascender:i,descender:o,lineGap:s=0}=e.metrics;return(i-o+s)/e.unitsPerEm*n}return typeof r=="number"?r*n:r.type==="pixel"?r.value:r.type==="percent"?r.value/100*n:n}function O5(t,e={}){var f;const n=$5(t,e.textTransform),r=_5(e.fontFamily,e.fontWeight,e.fontStyle),i=pf(e.fontSize),o=e.letterSpacing||0,s=e.wordSpacing||0;let a=0;const l=Array.from(n);for(let p=0;p<l.length;p++){const g=l[p],y=p<l.length-1?l[p+1]:void 0;let m=(f=r.glyphs)==null?void 0:f[g];m===void 0&&(m=r.defaultWidth||r.unitsPerEm/2);const b=m/r.unitsPerEm*i;if(a+=b,y&&r.kerning){const v=g+y,x=r.kerning[v];x!==void 0&&(a+=x/r.unitsPerEm*i)}p<l.length-1&&(a+=o),g===" "&&(a+=s)}const c=P5(e,r),{ascender:h}=r.metrics,u=h/r.unitsPerEm*i;return{width:a,height:c,baseline:u}}const C5={fontFamily:"Alibaba PuHuiTi",fontWeight:400,fontStyle:"normal",unitsPerEm:1e3,metrics:{ascender:1060,descender:-340,lineGap:0},glyphs:{" ":257,"!":361,'"':405,"#":600,"%":821,"&":640,"'":253,"(":359,")":359,"*":430,",":302,"-":440,".":302,"/":500,":":378,";":378,"?":431,"@":860,B:620,C:599,D:699,F:527,G:685,H:708,J:271,K:614,L:507,M:830,N:737,P:597,R:614,S:566,T:528,V:617,W:898,X:624,Y:594,Z:626,"[":294,"\\":510,"]":294,_:500,"`":346,b:635,c:497,d:635,f:349,g:636,k:518,l:286,m:921,p:635,q:636,r:379,s:479,t:337,v:526,w:828,x:516,y:527,z:506,"{":299,"|":183,"}":299," ":257,"¡":357,"¦":183,"§":479,"¨":346,"©":806,ª:483,"«":511,"­":440,"®":404,"¯":346,"°":363,"´":346,"¶":593,"·":357,"¸":346,º:445,"»":511,"¼":902,"½":914,"¾":902,"¿":431,Æ:889,Ç:599,Ð:719,Ñ:737,Ý:594,Þ:597,ß:610,æ:926,ç:497,ý:527,þ:635,ÿ:527,Ć:599,ć:497,Ĉ:599,ĉ:497,Ċ:599,ċ:497,Č:599,č:497,Ď:699,ď:640,Đ:719,đ:635,Ĝ:685,ĝ:636,Ğ:685,ğ:636,Ġ:685,ġ:636,Ģ:685,ģ:636,Ĥ:708,Ħ:708,IJ:545,ij:536,Ĵ:271,Ķ:614,ķ:518,ĸ:518,Ĺ:507,ĺ:286,Ļ:507,ļ:286,Ľ:507,ľ:290,Ŀ:507,ŀ:291,Ł:507,ł:286,Ń:737,Ņ:737,Ň:737,ʼn:669,Ŋ:737,Œ:987,œ:917,Ŕ:614,ŕ:379,Ŗ:614,ŗ:379,Ř:614,ř:379,Ś:566,ś:479,Ŝ:566,ŝ:479,Ş:566,ş:479,Š:566,š:479,Ţ:528,ţ:337,Ť:528,ť:340,Ŧ:528,ŧ:337,Ŵ:898,ŵ:828,Ŷ:594,ŷ:527,Ÿ:594,Ź:626,ź:506,Ż:626,ż:506,Ž:626,ž:506,ſ:310,Ə:719,ǎ:608,ǐ:265,ǒ:614,ǔ:609,ǖ:609,ǘ:609,ǚ:609,ǜ:609,Ǽ:889,ǽ:926,Ș:566,ș:479,Ț:528,ț:337,"ʹ":255,"͵":255,";":378,"΄":346,"΅":346,Ά:670,"·":357,Έ:628,Ή:779,Ί:346,Ό:765,Ύ:726,Ώ:765,ΐ:312,Β:620,Γ:507,Ζ:626,Η:708,Κ:614,Λ:617,Μ:830,Ν:737,Π:708,Ρ:597,Σ:596,Τ:528,Υ:594,Φ:831,Χ:624,Ψ:804,Ϋ:594,έ:509,ή:643,ί:312,ΰ:593,β:610,γ:526,ε:509,ζ:465,η:643,θ:638,ι:312,κ:518,λ:514,ν:526,ξ:465,π:616,ρ:619,ς:497,σ:639,τ:437,υ:593,φ:774,χ:509,ψ:745,ω:782,ϊ:312,ϋ:593,ύ:593,ώ:782,"‐":440,"‑":440,"–":495,"—":684,"―":684,"‗":500,"‘":270,"’":270,"‚":270,"‛":270,"“":784,"”":784,"„":468,"†":500,"‡":500,"•":308,"…":1085,"‰":1174,"′":256,"″":472,"‴":689,"‵":256,"‶":472,"‷":689,"‹":312,"›":312,"‼":589,"‽":433,"‾":500,"⁄":120,"⁺":407,"⁻":407,"⁼":407,"⁽":225,"⁾":225,ⁿ:486,"₊":407,"₋":407,"₌":407,"₍":225,"₎":225,"ₙ":486,"₡":599,"₣":527,"₤":600,"₥":921,"₦":625,"₨":1093,"₩":769,"₪":754,"₫":635,"₭":614,"₮":528,"₯":1288,"₰":950,"₲":685,"₴":576,"₵":599,"₶":576,"₷":700,"₸":528,"₻":750,"₼":683,"₾":577,"₿":620,"℃":915,"℅":825,"℉":868,ℓ:385,"№":1176,"℗":806,"℡":1022,"™":903,"℮":903,"⅛":930,"⅜":931,"⅝":931,"⅞":871,"Ⅶ":1166,"∂":587,"∈":663,"∏":708,"∑":596,"√":604,"∞":679,"∧":617,"∫":531,"∮":654,"≈":600,"≒":662,"◊":600," ":0,"〞":472},glyphsByWidth:{268:"ijìíîïĩīĭįıĵȷ",274:"IÌÍÎÏĨĪĬĮİΙΪ",406:"²³¹⁰⁴⁵⁶⁷⁸⁹₀₁₂₃₄₅₆₇₈₉",552:"+<=>^~¬±×÷−∕∙≠≤≥≦≧≮≯",556:"EÈÉÊËĒĔĖĘĚΕΞ",575:"$0123456789¢£¤¥ƒ₢₧€₱₹₺₽",578:"eèéêëēĕėęě",612:"aàáâãäåāăąǻ",613:"uµùúûüũūŭůűųάαμ∨",618:"hnoðñòóôõöøĥħńņňŋōŏőǿδοό",667:"AÀÁÂÃÄÅĀĂĄǺΑΔ₳∆",701:"UÙÚÛÜŨŪŬŮŰŲ",743:"OQÒÓÔÕÖØŌŎŐǾΘΟΩΩ",1e3:"─━│┃┄┅┆┇┈┉┊┋┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬╭╮╯╰╱╲╳▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▓▔▕■□▲△▼▽◆◇○◎●◢◣◤◥★☆☉♀♂〾"},defaultWidth:984,kerning:{'""':-56,"\"'":-57,'",':-179,'".':-179,"'\"":-56,"''":-57,"',":-179,"'.":-179,"(j":60,',"':-160,",'":-160,",1":-140,",7":-41,",9":-39,'."':-160,".'":-160,".1":-140,".7":-41,".9":-39,"//":-120,"1,":-99,"1.":-99,"1:":-99,"1;":-99,"7,":-160,"7.":-160,"7:":-99,"7;":-99,":1":-79,":7":-59,";1":-79,";7":-59,'A"':-100,"A'":-100,AC:-20,AG:-20,AO:-20,AQ:-20,AT:-80,AU:-10,AV:-70,AW:-39,AY:-81,Af:-20,Al:-10,At:-20,Av:-20,Ay:-20,BC:-10,BG:-10,BO:-10,BQ:-10,BT:-40,BV:-20,BX:-20,BY:-21,"D,":-59,"D.":-59,DA:-20,DT:-36,DV:-30,DW:-19,DX:-20,DY:-40,DZ:-20,Da:-39,Ej:19,"F,":-159,"F.":-159,FA:-40,Fa:-59,Fh:1,Fk:1,GV:-11,GY:-21,JJ:7,KA:-19,KC:-20,KG:-20,KO:-20,KQ:-20,KT:-19,KU:-39,KV:-39,KW:-39,KY:-40,Kc:-39,Kd:-39,Ke:-39,Kg:-39,Kl:-39,Ko:-39,Kq:-39,Ks:-19,Kt:-10,Ku:-40,Kv:-60,Kw:-40,Ky:-60,'L"':-99,"L'":-99,LA:20,LC:-59,LG:-59,LO:-59,LQ:-59,LT:-79,LU:-19,LV:-79,LW:-39,LY:-100,Lv:-41,Lw:-21,Ly:-41,"O,":-59,"O.":-59,OA:-20,OT:-36,OV:-30,OW:-19,OX:-20,OY:-40,OZ:-20,Oa:-39,"P,":-199,"P.":-199,PA:-60,PT:-29,PV:-10,PW:-10,PX:-50,PY:-20,PZ:-39,Pa:-60,"Q,":-59,"Q.":-59,QA:-20,QJ:7,QT:-36,QV:-30,QW:-19,QX:-20,QY:-40,QZ:-20,Qa:-39,RC:-15,RG:-15,RO:-15,RQ:-15,RT:-40,RU:-10,RV:-21,RW:-10,RX:-29,RY:-41,Rc:-20,Rd:-20,Re:-20,Rg:-20,Ro:-20,Rq:-20,Rt:-20,Ru:-10,Rv:-10,Rx:20,Ry:-10,"S,":-20,"S.":-20,SS:-1,ST:-1,SV:-21,SW:-10,SY:-21,St:-1,Sv:-20,Sw:-10,Sx:-1,Sy:-20,'T"':2,"T'":2,"T,":-154,"T.":-154,TA:-80,TC:-20,TG:-20,TO:-20,TQ:-20,TS:-1,Ta:-80,Tc:-59,Td:-59,Te:-59,Tg:-59,Ti:-20,Tj:-19,Tm:-59,Tn:-59,To:-59,Tp:-58,Tq:-59,Tr:-59,Ts:-60,Tt:20,Tu:-79,Tv:-39,Tw:-19,Tx:-39,Ty:-39,Tz:-59,UA:-10,UX:-19,Ux:-1,"V,":-140,"V.":-140,"V:":-41,"V;":-41,VA:-70,VC:-30,VG:-30,VO:-30,VQ:-30,VS:-10,Va:-41,Vc:-21,Vd:-21,Ve:-21,Vg:-21,Vh:1,Vk:1,Vo:-21,Vq:-21,Vs:-21,Vv:-1,Vy:-1,"W,":-79,"W.":-79,"W:":-39,"W;":-39,WA:-40,WC:-19,WG:-19,WO:-19,WQ:-19,Wa:-40,Wc:-20,Wd:-20,We:-20,Wg:-20,Wo:-20,Wq:-20,Ws:-20,XA:-19,XC:-20,XG:-20,XO:-20,XQ:-20,XT:-19,XU:-39,XV:-39,XW:-39,XY:-40,Xc:-39,Xd:-39,Xe:-39,Xg:-39,Xl:-39,Xo:-39,Xq:-39,Xs:-19,Xt:-10,Xu:-40,Xv:-60,Xw:-40,Xy:-60,'Y"':1,"Y'":1,"Y,":-141,"Y.":-141,"Y:":-60,"Y;":-60,YA:-81,YC:-40,YG:-40,YO:-40,YQ:-40,YS:-1,Ya:-101,Yc:-60,Yd:-60,Ye:-60,Yf:-1,Yg:-60,Yh:1,Yi:-19,Yk:1,Ym:-41,Yn:-41,Yo:-60,Yp:-40,Yq:-60,Yr:-41,Ys:-61,Yt:-1,Yu:-40,Yv:-40,Yx:-41,Yy:-40,Yz:-41,ZC:-20,ZG:-20,ZO:-20,ZQ:-20,"[j":80,aT:-60,aV:-21,aY:-61,av:-10,aw:-10,ay:-10,"b,":-40,"b.":-40,bT:-59,bV:-21,bW:-20,bX:-39,bY:-60,bv:-10,bx:-20,by:-10,"e,":-20,"e.":-20,eT:-59,eY:-40,ej:20,'f"':3,"f'":3,"f)":1,"f*":61,"f,":-1,"f.":-1,"f?":40,fT:40,fV:21,fW:21,fX:21,fY:1,"f]":21,fa:-29,fc:-19,fd:-19,fe:-19,ff:1,fg:-39,fh:-19,fi:-19,fj:-19,fk:-19,fl:-19,fo:-19,fq:-19,fs:-19,ft:1,"f}":3,hT:-58,hY:-39,hv:-10,hy:-10,'i"':2,"i'":2,"i)":2,"i?":3,iT:-20,"i]":41,"i}":22,jT:-20,kT:-39,kU:-1,kW:-20,ka:-20,kc:-20,kd:-20,ke:-20,kg:-20,kl:-20,ko:-20,kq:-20,ku:-10,lf:-20,lv:-19,lw:-10,ly:-19,mT:-58,mY:-39,mv:-10,my:-10,nT:-58,nY:-39,nv:-10,ny:-10,"o,":-40,"o.":-40,oT:-59,oV:-21,oW:-20,oX:-39,oY:-60,ov:-10,ox:-20,oy:-10,"p,":-40,"p.":-40,pT:-59,pV:-21,pW:-20,pX:-39,pY:-60,pv:-10,px:-20,py:-10,qT:-19,qY:-19,qj:20,'r"':2,"r'":2,"r,":-90,"r.":-90,ra:-49,rc:-19,rd:-19,re:-19,rf:1,ro:-19,rq:-19,rt:20,sT:-59,sV:-21,sW:-20,sX:-19,sY:-60,sv:-19,sx:-10,sy:-19,tf:1,uT:-40,uY:-19,"v,":-90,"v.":-90,vT:-39,vX:-39,va:-35,vc:-10,vd:-10,ve:-10,vo:-10,vq:-10,"w,":-50,"w.":-50,wT:-19,wX:-39,wa:-30,xT:-39,xU:-1,xW:-20,xa:-20,xc:-20,xd:-20,xe:-20,xg:-20,xl:-20,xo:-20,xq:-20,xu:-10,"y,":-90,"y.":-90,yT:-39,yX:-39,ya:-35,yc:-10,yd:-10,ye:-10,yo:-10,yq:-10,zT:-59,"{h":2,"{j":79,"{k":2}};var M5=Object.defineProperty,gf=Object.getOwnPropertySymbols,S5=Object.prototype.hasOwnProperty,E5=Object.prototype.propertyIsEnumerable,mf=(t,e,n)=>e in t?M5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,I5=(t,e)=>{for(var n in e||(e={}))S5.call(e,n)&&mf(t,n,e[n]);if(gf)for(var n of gf(e))E5.call(e,n)&&mf(t,n,e[n]);return t};const _l=new Map;let $l="Alibaba PuHuiTi";function Pl(t){const e=qn(t);for(const n of e){const r=_l.get(Cr(n));if(r)return r}return null}function Ol(){return Array.from(_l.values())}function T5(t){$l=Un(t)}function yf(t){const e=I5({},t);return _l.set(e.fontFamily,e),e.fontFamily=Un(e.fontFamily),e}function vf(t){const e=qn(t).flatMap(n=>{const r=Pl(n);if(!r)return[];const{baseUrl:i,fontWeight:o}=r;return Object.values(o).filter(s=>!!s).map(s=>wl(i,s))});return Array.from(new Set(e))}function A5(t,e){const n=qn(t);let r=null;for(const s of n)if(r=Pl(s),r)break;if(!r)return null;const i=Vu(e),o=r.fontWeight[i];return o?wl(r.baseUrl,o.replace(/\/result.css$/,"")):null}const Cl=new WeakMap;function k5(t,e){const n=t.ownerDocument,r=(n==null?void 0:n.head)||document.head;if(!r)return;Cl.has(r)||Cl.set(r,new Map);const i=Cl.get(r),o=[];vf(e).forEach(a=>{const l=`${e}-${a}`;if(i.has(l))return;const c=n.createElement("link");c.id=l,c.rel="stylesheet",c.href=a,o.push(c),i.set(l,c)}),o.length&&r.tagName==="HEAD"&&o.forEach(a=>r.appendChild(a))}function z5(t){Ol().forEach(n=>k5(t,n.fontFamily))}const ai="https://assets.antv.antgroup.com",Ir=t=>`${t}/result.css`;[{fontFamily:"Alibaba PuHuiTi",name:"阿里巴巴普惠体",baseUrl:ai,fontWeight:{regular:Ir("AlibabaPuHuiTi-Regular"),bold:Ir("AlibabaPuHuiTi-Bold")}},{fontFamily:"Source Han Sans",name:"黑体",baseUrl:ai,fontWeight:{regular:Ir("SourceHanSansCN-Regular")}},{fontFamily:"Source Han Serif",name:"宋体",baseUrl:ai,fontWeight:{regular:Ir("SourceHanSerifCN-Regular")}},{fontFamily:"LXGW WenKai",name:"楷体",baseUrl:ai,fontWeight:{regular:Ir("LXGWWenKai-Regular")}},{fontFamily:"851tegakizatsu",name:"手写体",baseUrl:ai,fontWeight:{regular:Ir("851tegakizatsu-Regular")}}].forEach(yf);const bf=new Map;function Ml(t,e){bf.set(t,e)}function xf(t){return bf.get(t)}Ml("antv",["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#70CAF8"]),Ml("spectral",(t,e,n)=>{const r=[["#fc8d59","#ffffbf","#99d594"],["#d7191c","#fdae61","#abdda4","#2b83ba"],["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]],i=Math.min(Math.max(n,3),11);return r[i-3][e%i]});const Oo=(t=[],e,n)=>{var r;const i=typeof t=="string"?xf(t)||[]:t,o=(r=e[0])!=null?r:0;if(typeof i=="function"){const s=n?o/n:0;return i(s,o,n!=null?n:0)}if(Array.isArray(i))return i.length===0?void 0:i[o%i.length]};function L5(t,e){var n;const r=t.parentElement;r&&(r.style.backgroundColor=e||"none");const i=Sr(t,kt.Background);if(!e)return i==null?void 0:i.remove();if(t.style.backgroundColor=e,i)i.setAttribute("fill",e);else if((n=t.viewBox)!=null&&n.baseVal){const{x:o,y:s,width:a,height:l}=t.viewBox.baseVal,c=wt("rect",{x:o,y:s,width:a,height:l,fill:e,"data-element-type":kt.Background});t.prepend(c)}}function li(t,e){return Object.entries(e).reduce((r,[i,o])=>{if(typeof o=="function"){const s=o(t.getAttribute(i),t);s!=null&&(r[i]=s)}else Object.assign(r,{[i]:o});return r},{})}function wf(t){return t.replace(/#|%|\.| |\/|\(|\)/g,"").replace(/,/g,"-")}function R5(t,e){e&&Object.keys(e).length>0&&hl(t,n=>{const r=li(n,e);Yt(n,r)})}const _f="btn-add-icon",$f="btn-remove-icon";function H5(t,e){Yt(e,{display:"none"});const n=e.querySelectorAll('[id^="btn-add-"]'),r=e.querySelectorAll('[id^="btn-remove-"]');N5(t),n.forEach(j5),r.forEach(F5)}const D5="btn-icon-defs";function N5(t){const e=wt("defs");oi(e,D5);const n=Mr(`<symbol class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200">
12
+ </symbol>`)})}function ew(t){return t.startsWith("<svg")||t.startsWith("<symbol")}function Sr(t){if(!t||!ew(t))return null;const e=t.startsWith("<svg")?t.replace(/<svg/,"<symbol").replace(/svg>/,"symbol>"):t;return Or(e)}var nw=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function rw(t){try{return!!new URL(t)}catch(e){return!1}}function iw(t,e){return!!(t.toLowerCase().includes("image/svg")||!t&&e==="svg")}function of(t,e){return nw(this,null,function*(){if(!t||!rw(t))return null;const n=yield wo(t);if(!n.ok)throw new Error("Failed to load resource");const r=n.headers.get("Content-Type")||"";if(iw(r,e)){const s=yield n.text();return Sr(s)}const i=yield n.blob(),o=yield ow(i);return ai(o)})}function ow(t){return new Promise((e,n)=>{const r=new FileReader;r.onloadend=()=>{e(r.result)},r.onerror=n,r.readAsDataURL(t)})}var sf=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});const sw=t=>sf(null,null,function*(){var e;try{const n=new URLSearchParams({text:t,topK:"1"}),r=`${n4}?${n.toString()}`,i=yield wo(r);if(!i.ok)return null;const o=yield i.json();return!(o!=null&&o.status)||!Array.isArray((e=o.data)==null?void 0:e.data)?null:o.data.data[0]||null}catch(n){return console.error(`Failed to query icon for "${t}":`,n),null}});function aw(t){return t.startsWith("data:")}function lw(t){const e=t.trim();return e.startsWith("<svg")||e.startsWith("<symbol")}function af(t,e){return sf(this,null,function*(){var n;if(!t)return null;const r=yield sw(t);if(!r)return null;if(lw(r))return Sr(r);if(aw(r)){const i=((n=r.match(/^data:([^;]+)/))==null?void 0:n[1])||"",o=r.includes(";base64,");if(i==="image/svg+xml"&&!o){const s=r.indexOf(","),a=s>=0?r.slice(s+1):r;return Sr(a)}return ai(r)}return of(r,e)})}let lf=null;function cw(t){lf=t}function hw(){return lf}function dw(t){if(!t.startsWith("data:"))return null;const e=t.indexOf(",");if(e===-1)return null;const n=t.slice(5,e),r=t.slice(e+1),i=n.split(";"),o=i[0],s=i.includes("base64");return o==="image/svg+xml"&&!s?{source:"inline",format:"svg",encoding:"raw",data:r.startsWith("%3C")?decodeURIComponent(r):r}:o.startsWith("image/")?{source:"inline",format:o==="image/svg+xml"?"svg":"image",encoding:s?"base64":"data-uri",data:t}:null}const uw=new Set(["svg","png","jpg","jpeg","webp","gif"]);function fw(t){const e=t.trim();return e.startsWith("<svg")||e.startsWith("<symbol")}function pw(t){const e=t.toLowerCase();if(e.endsWith(".svg")||e.includes(".svg?"))return"svg";if(e.endsWith(".png")||e.endsWith(".jpg")||e.endsWith(".jpeg")||e.endsWith(".webp")||e.endsWith(".gif"))return"image"}function gw(t){var e;if(!t.startsWith("ref:"))return null;const n=t.slice(4),[r,...i]=n.split(":");if(!r||i.length===0)return null;let o;i.length>1&&uw.has(i[0].toLowerCase())&&(o=(e=i.shift())==null?void 0:e.toLowerCase());const s=i.join(":");if(!s)return null;const a=r==="url"?"remote":r;return a==="remote"?{source:"remote",format:o||pw(s)||void 0,data:s}:a==="search"?{source:"search",format:o||"svg",data:s}:a==="svg"?{source:"inline",format:"svg",data:s,encoding:"raw"}:{source:"custom",data:t,format:o}}function _o(t){if(!t)return null;if(typeof t!="string"){if(t.source)return t;const r=t;return r.type==="image"?{source:"inline",format:"image",data:r.data}:r.type==="svg"?{source:"inline",format:"svg",encoding:"raw",data:r.data}:r.type==="remote"?{source:"remote",format:r.format,data:r.data}:r.type==="search"?{source:"search",format:r.format||"svg",data:r.data}:r.type==="custom"?{source:"custom",data:r.data}:null}const e=dw(t);if(e)return e;const n=gw(t);return n||(fw(t)?{source:"inline",format:"svg",encoding:"raw",data:t}:{source:"custom",data:t})}function vl(t){const e=typeof t=="string"?_o(t):t;return e?"rsc-"+rf(JSON.stringify(e)):null}function cf(t){const e=vl(t);return e?`#${e}`:null}var hf=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function mw(t,e,n){return hf(this,null,function*(){const r=_o(e);if(!r)return null;r.scene||(r.scene=t);const{source:i,data:o,format:s,encoding:a}=r;let l=null;try{if(i==="inline"){const c=o.startsWith("data:");s==="svg"&&a==="raw"?l=Sr(o):s==="svg"&&c?l=yield ai(o):c||s==="image"?l=yield ai(o):l=Sr(o)}else if(i==="remote")l=yield of(o,s);else if(i==="search")l=yield af(o,s);else{const c=hw();c&&(l=yield c(r))}}catch(c){l=null}return l||(yield af(yw(r,t,n),s))})}const df=new Map,xl=new WeakMap;function uf(t,e,n,r){return hf(this,null,function*(){if(!t)return null;const i=_o(n);if(!i)return null;const o=vl(i),s=df.has(o)?df.get(o)||null:yield mw(e,i,r);if(!s)return null;xl.has(t)||xl.set(t,new Map);const a=xl.get(t);if(a.has(o))return o;const l=bo(t);return s.id=o,l.appendChild(s),a.set(o,s),o})}function yw(t,e,n){const r=e==="illus"?"illustration":"icon",i=bl(n==null?void 0:n.label)||bl(n==null?void 0:n.desc);if(i)return i;const o=bl(t.data);return!o||t.source==="inline"||o.startsWith("data:")||o.startsWith("<svg")||o.startsWith("<symbol")?r:o}function bl(t){if(typeof t!="string")return null;const e=t.trim();return e||null}var vw=Object.defineProperty,xw=Object.defineProperties,bw=Object.getOwnPropertyDescriptors,ff=Object.getOwnPropertySymbols,ww=Object.prototype.hasOwnProperty,_w=Object.prototype.propertyIsEnumerable,pf=(t,e,n)=>e in t?vw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$w=(t,e)=>{for(var n in e||(e={}))ww.call(e,n)&&pf(t,n,e[n]);if(ff)for(var n of ff(e))_w.call(e,n)&&pf(t,n,e[n]);return t},Pw=(t,e)=>xw(t,bw(e));const Cw=new WeakMap;function Ow(t,e={}){const n=wt("use",Pw($w({},e),{href:cf(t)}));return gf(n),Cw.set(n,t),n}function gf(t){const{stroke:e,fill:n}=ke(t,["fill","stroke"]);t.style.color=n||e||"currentColor"}function $o(t){return t.tagName==="use"?t:t.querySelector("use")}function wl(t){const e=$o(t);return e?ke(e,["width","height","x","y","width","height","fill","fill-opacity","stroke","opacity"]):{}}function Mw(t,e,n){const r=$o(t);r&&(n&&Yt(r,n),gf(r))}const Sw=",",Ew=(t,e=Sw)=>t.split(e).map(n=>parseInt(n,10)),mf=t=>Ew(t);function _l(...t){return t.map(e=>e.replace(/^\/+|\/+$/g,"")).filter(e=>e.trim().length>0).join("/")}const Po=new Map;let Iw="sans-serif";const Tw={fontFamily:"sans-serif",fontWeight:400,fontStyle:"normal",unitsPerEm:2048,metrics:{ascender:2189,descender:-555,lineGap:0},glyphs:{'"':727,"%":1821,"'":391,"(":682,")":682,"*":797,"+":1196,"-":682,"<":1196,"=":1196,">":1196,"@":2079,C:1479,D:1479,F:1251,G:1593,H:1479,J:1024,M:1706,N:1479,O:1593,Q:1593,R:1479,T:1251,U:1479,W:1933,Z:1251,"^":961,_:1024,"`":682,c:1024,i:455,j:455,k:1024,l:455,m:1706,r:682,s:1024,v:1024,w:1479,x:1024,y:1024,z:1024,"{":684,"|":532,"}":684,"~":1196},glyphsByWidth:{569:" !,./:;I[\\]ft",1139:"#$0123456789?Labdeghnopqu",1366:"&ABEKPSVXY"},defaultWidth:1139};function yf(t){if(t===void 0||t==="normal")return"400";if(t==="bold")return"700";const e={thin:"100",hairline:"100","extra-light":"200","ultra-light":"200",light:"300",regular:"400",normal:"400",medium:"500","semi-bold":"600",semibold:"600","demi-bold":"600",demibold:"600","extra-bold":"800",extrabold:"800","ultra-bold":"800",ultrabold:"800",black:"900",heavy:"900","extra-black":"950",extrablack:"950","ultra-black":"950",ultrablack:"950",bolder:"900",lighter:"300"};if(typeof t=="string"){const n=t.toLowerCase();return e[n]||t}return String(t)}function vf(t){return t||"normal"}function Aw(t){const e=t.fontFamily,n=yf(t.fontWeight),r=vf(t.fontStyle);if(t.glyphsByWidth){const s=xe({},t.glyphs||{});for(const[a,l]of Object.entries(t.glyphsByWidth))if(typeof l=="string"){const c=Number(a);for(const h of l)s[h]=c}else s[a]=l;t=Ae(xe({},t),{glyphs:s,glyphsByWidth:void 0})}Po.has(e)||Po.set(e,new Map);const i=Po.get(e);i.has(n)||i.set(n,new Map),i.get(n).set(r,t)}function kw(t,e,n){const r=t||Iw,i=yf(e),o=vf(n),s=Po.get(r);if(!s)return console.warn(`Font family "${r}" not registered, using fallback font data`),Tw;let a=s.get(i);if(a){let c=a.get(o);if(c||o!=="normal"&&(c=a.get("normal"),c))return c;const h=a.values().next().value;if(h)return h}if(a=s.get("400"),a){let c=a.get(o);if(c||o!=="normal"&&(c=a.get("normal"),c))return c;const h=a.values().next().value;if(h)return h}const l=s.values().next().value;if(l){const c=l.values().next().value;if(c)return c}throw new Error(`No font data found for family "${r}" with weight "${i}" and style "${o}"`)}function Lw(t,e){if(!e||e==="none")return t;switch(e){case"uppercase":return t.toUpperCase();case"lowercase":return t.toLowerCase();case"capitalize":return t.split(" ").map(n=>n.length===0?n:n[0].toUpperCase()+n.slice(1).toLowerCase()).join(" ");default:return t}}function xf(t){if(t===void 0)return 14;if(typeof t=="number")return t;const e=parseFloat(t);return isNaN(e)?16:e}function zw(t,e){const n=xf(t.fontSize),r=t.lineHeight;if(r===void 0){const{ascender:i,descender:o,lineGap:s=0}=e.metrics;return(i-o+s)/e.unitsPerEm*n}return typeof r=="number"?r*n:r.type==="pixel"?r.value:r.type==="percent"?r.value/100*n:n}function Hw(t,e={}){var f;const n=Lw(t,e.textTransform),r=kw(e.fontFamily,e.fontWeight,e.fontStyle),i=xf(e.fontSize),o=e.letterSpacing||0,s=e.wordSpacing||0;let a=0;const l=Array.from(n);for(let p=0;p<l.length;p++){const g=l[p],y=p<l.length-1?l[p+1]:void 0;let m=(f=r.glyphs)==null?void 0:f[g];m===void 0&&(m=r.defaultWidth||r.unitsPerEm/2);const x=m/r.unitsPerEm*i;if(a+=x,y&&r.kerning){const v=g+y,b=r.kerning[v];b!==void 0&&(a+=b/r.unitsPerEm*i)}p<l.length-1&&(a+=o),g===" "&&(a+=s)}const c=zw(e,r),{ascender:h}=r.metrics,u=h/r.unitsPerEm*i;return{width:a,height:c,baseline:u}}const Rw={fontFamily:"Alibaba PuHuiTi",fontWeight:400,fontStyle:"normal",unitsPerEm:1e3,metrics:{ascender:1060,descender:-340,lineGap:0},glyphs:{" ":257,"!":361,'"':405,"#":600,"%":821,"&":640,"'":253,"(":359,")":359,"*":430,",":302,"-":440,".":302,"/":500,":":378,";":378,"?":431,"@":860,B:620,C:599,D:699,F:527,G:685,H:708,J:271,K:614,L:507,M:830,N:737,P:597,R:614,S:566,T:528,V:617,W:898,X:624,Y:594,Z:626,"[":294,"\\":510,"]":294,_:500,"`":346,b:635,c:497,d:635,f:349,g:636,k:518,l:286,m:921,p:635,q:636,r:379,s:479,t:337,v:526,w:828,x:516,y:527,z:506,"{":299,"|":183,"}":299," ":257,"¡":357,"¦":183,"§":479,"¨":346,"©":806,ª:483,"«":511,"­":440,"®":404,"¯":346,"°":363,"´":346,"¶":593,"·":357,"¸":346,º:445,"»":511,"¼":902,"½":914,"¾":902,"¿":431,Æ:889,Ç:599,Ð:719,Ñ:737,Ý:594,Þ:597,ß:610,æ:926,ç:497,ý:527,þ:635,ÿ:527,Ć:599,ć:497,Ĉ:599,ĉ:497,Ċ:599,ċ:497,Č:599,č:497,Ď:699,ď:640,Đ:719,đ:635,Ĝ:685,ĝ:636,Ğ:685,ğ:636,Ġ:685,ġ:636,Ģ:685,ģ:636,Ĥ:708,Ħ:708,IJ:545,ij:536,Ĵ:271,Ķ:614,ķ:518,ĸ:518,Ĺ:507,ĺ:286,Ļ:507,ļ:286,Ľ:507,ľ:290,Ŀ:507,ŀ:291,Ł:507,ł:286,Ń:737,Ņ:737,Ň:737,ʼn:669,Ŋ:737,Œ:987,œ:917,Ŕ:614,ŕ:379,Ŗ:614,ŗ:379,Ř:614,ř:379,Ś:566,ś:479,Ŝ:566,ŝ:479,Ş:566,ş:479,Š:566,š:479,Ţ:528,ţ:337,Ť:528,ť:340,Ŧ:528,ŧ:337,Ŵ:898,ŵ:828,Ŷ:594,ŷ:527,Ÿ:594,Ź:626,ź:506,Ż:626,ż:506,Ž:626,ž:506,ſ:310,Ə:719,ǎ:608,ǐ:265,ǒ:614,ǔ:609,ǖ:609,ǘ:609,ǚ:609,ǜ:609,Ǽ:889,ǽ:926,Ș:566,ș:479,Ț:528,ț:337,"ʹ":255,"͵":255,";":378,"΄":346,"΅":346,Ά:670,"·":357,Έ:628,Ή:779,Ί:346,Ό:765,Ύ:726,Ώ:765,ΐ:312,Β:620,Γ:507,Ζ:626,Η:708,Κ:614,Λ:617,Μ:830,Ν:737,Π:708,Ρ:597,Σ:596,Τ:528,Υ:594,Φ:831,Χ:624,Ψ:804,Ϋ:594,έ:509,ή:643,ί:312,ΰ:593,β:610,γ:526,ε:509,ζ:465,η:643,θ:638,ι:312,κ:518,λ:514,ν:526,ξ:465,π:616,ρ:619,ς:497,σ:639,τ:437,υ:593,φ:774,χ:509,ψ:745,ω:782,ϊ:312,ϋ:593,ύ:593,ώ:782,"‐":440,"‑":440,"–":495,"—":684,"―":684,"‗":500,"‘":270,"’":270,"‚":270,"‛":270,"“":784,"”":784,"„":468,"†":500,"‡":500,"•":308,"…":1085,"‰":1174,"′":256,"″":472,"‴":689,"‵":256,"‶":472,"‷":689,"‹":312,"›":312,"‼":589,"‽":433,"‾":500,"⁄":120,"⁺":407,"⁻":407,"⁼":407,"⁽":225,"⁾":225,ⁿ:486,"₊":407,"₋":407,"₌":407,"₍":225,"₎":225,"ₙ":486,"₡":599,"₣":527,"₤":600,"₥":921,"₦":625,"₨":1093,"₩":769,"₪":754,"₫":635,"₭":614,"₮":528,"₯":1288,"₰":950,"₲":685,"₴":576,"₵":599,"₶":576,"₷":700,"₸":528,"₻":750,"₼":683,"₾":577,"₿":620,"℃":915,"℅":825,"℉":868,ℓ:385,"№":1176,"℗":806,"℡":1022,"™":903,"℮":903,"⅛":930,"⅜":931,"⅝":931,"⅞":871,"Ⅶ":1166,"∂":587,"∈":663,"∏":708,"∑":596,"√":604,"∞":679,"∧":617,"∫":531,"∮":654,"≈":600,"≒":662,"◊":600," ":0,"〞":472},glyphsByWidth:{268:"ijìíîïĩīĭįıĵȷ",274:"IÌÍÎÏĨĪĬĮİΙΪ",406:"²³¹⁰⁴⁵⁶⁷⁸⁹₀₁₂₃₄₅₆₇₈₉",552:"+<=>^~¬±×÷−∕∙≠≤≥≦≧≮≯",556:"EÈÉÊËĒĔĖĘĚΕΞ",575:"$0123456789¢£¤¥ƒ₢₧€₱₹₺₽",578:"eèéêëēĕėęě",612:"aàáâãäåāăąǻ",613:"uµùúûüũūŭůűųάαμ∨",618:"hnoðñòóôõöøĥħńņňŋōŏőǿδοό",667:"AÀÁÂÃÄÅĀĂĄǺΑΔ₳∆",701:"UÙÚÛÜŨŪŬŮŰŲ",743:"OQÒÓÔÕÖØŌŎŐǾΘΟΩΩ",1e3:"─━│┃┄┅┆┇┈┉┊┋┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬╭╮╯╰╱╲╳▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▓▔▕■□▲△▼▽◆◇○◎●◢◣◤◥★☆☉♀♂〾"},defaultWidth:984,kerning:{'""':-56,"\"'":-57,'",':-179,'".':-179,"'\"":-56,"''":-57,"',":-179,"'.":-179,"(j":60,',"':-160,",'":-160,",1":-140,",7":-41,",9":-39,'."':-160,".'":-160,".1":-140,".7":-41,".9":-39,"//":-120,"1,":-99,"1.":-99,"1:":-99,"1;":-99,"7,":-160,"7.":-160,"7:":-99,"7;":-99,":1":-79,":7":-59,";1":-79,";7":-59,'A"':-100,"A'":-100,AC:-20,AG:-20,AO:-20,AQ:-20,AT:-80,AU:-10,AV:-70,AW:-39,AY:-81,Af:-20,Al:-10,At:-20,Av:-20,Ay:-20,BC:-10,BG:-10,BO:-10,BQ:-10,BT:-40,BV:-20,BX:-20,BY:-21,"D,":-59,"D.":-59,DA:-20,DT:-36,DV:-30,DW:-19,DX:-20,DY:-40,DZ:-20,Da:-39,Ej:19,"F,":-159,"F.":-159,FA:-40,Fa:-59,Fh:1,Fk:1,GV:-11,GY:-21,JJ:7,KA:-19,KC:-20,KG:-20,KO:-20,KQ:-20,KT:-19,KU:-39,KV:-39,KW:-39,KY:-40,Kc:-39,Kd:-39,Ke:-39,Kg:-39,Kl:-39,Ko:-39,Kq:-39,Ks:-19,Kt:-10,Ku:-40,Kv:-60,Kw:-40,Ky:-60,'L"':-99,"L'":-99,LA:20,LC:-59,LG:-59,LO:-59,LQ:-59,LT:-79,LU:-19,LV:-79,LW:-39,LY:-100,Lv:-41,Lw:-21,Ly:-41,"O,":-59,"O.":-59,OA:-20,OT:-36,OV:-30,OW:-19,OX:-20,OY:-40,OZ:-20,Oa:-39,"P,":-199,"P.":-199,PA:-60,PT:-29,PV:-10,PW:-10,PX:-50,PY:-20,PZ:-39,Pa:-60,"Q,":-59,"Q.":-59,QA:-20,QJ:7,QT:-36,QV:-30,QW:-19,QX:-20,QY:-40,QZ:-20,Qa:-39,RC:-15,RG:-15,RO:-15,RQ:-15,RT:-40,RU:-10,RV:-21,RW:-10,RX:-29,RY:-41,Rc:-20,Rd:-20,Re:-20,Rg:-20,Ro:-20,Rq:-20,Rt:-20,Ru:-10,Rv:-10,Rx:20,Ry:-10,"S,":-20,"S.":-20,SS:-1,ST:-1,SV:-21,SW:-10,SY:-21,St:-1,Sv:-20,Sw:-10,Sx:-1,Sy:-20,'T"':2,"T'":2,"T,":-154,"T.":-154,TA:-80,TC:-20,TG:-20,TO:-20,TQ:-20,TS:-1,Ta:-80,Tc:-59,Td:-59,Te:-59,Tg:-59,Ti:-20,Tj:-19,Tm:-59,Tn:-59,To:-59,Tp:-58,Tq:-59,Tr:-59,Ts:-60,Tt:20,Tu:-79,Tv:-39,Tw:-19,Tx:-39,Ty:-39,Tz:-59,UA:-10,UX:-19,Ux:-1,"V,":-140,"V.":-140,"V:":-41,"V;":-41,VA:-70,VC:-30,VG:-30,VO:-30,VQ:-30,VS:-10,Va:-41,Vc:-21,Vd:-21,Ve:-21,Vg:-21,Vh:1,Vk:1,Vo:-21,Vq:-21,Vs:-21,Vv:-1,Vy:-1,"W,":-79,"W.":-79,"W:":-39,"W;":-39,WA:-40,WC:-19,WG:-19,WO:-19,WQ:-19,Wa:-40,Wc:-20,Wd:-20,We:-20,Wg:-20,Wo:-20,Wq:-20,Ws:-20,XA:-19,XC:-20,XG:-20,XO:-20,XQ:-20,XT:-19,XU:-39,XV:-39,XW:-39,XY:-40,Xc:-39,Xd:-39,Xe:-39,Xg:-39,Xl:-39,Xo:-39,Xq:-39,Xs:-19,Xt:-10,Xu:-40,Xv:-60,Xw:-40,Xy:-60,'Y"':1,"Y'":1,"Y,":-141,"Y.":-141,"Y:":-60,"Y;":-60,YA:-81,YC:-40,YG:-40,YO:-40,YQ:-40,YS:-1,Ya:-101,Yc:-60,Yd:-60,Ye:-60,Yf:-1,Yg:-60,Yh:1,Yi:-19,Yk:1,Ym:-41,Yn:-41,Yo:-60,Yp:-40,Yq:-60,Yr:-41,Ys:-61,Yt:-1,Yu:-40,Yv:-40,Yx:-41,Yy:-40,Yz:-41,ZC:-20,ZG:-20,ZO:-20,ZQ:-20,"[j":80,aT:-60,aV:-21,aY:-61,av:-10,aw:-10,ay:-10,"b,":-40,"b.":-40,bT:-59,bV:-21,bW:-20,bX:-39,bY:-60,bv:-10,bx:-20,by:-10,"e,":-20,"e.":-20,eT:-59,eY:-40,ej:20,'f"':3,"f'":3,"f)":1,"f*":61,"f,":-1,"f.":-1,"f?":40,fT:40,fV:21,fW:21,fX:21,fY:1,"f]":21,fa:-29,fc:-19,fd:-19,fe:-19,ff:1,fg:-39,fh:-19,fi:-19,fj:-19,fk:-19,fl:-19,fo:-19,fq:-19,fs:-19,ft:1,"f}":3,hT:-58,hY:-39,hv:-10,hy:-10,'i"':2,"i'":2,"i)":2,"i?":3,iT:-20,"i]":41,"i}":22,jT:-20,kT:-39,kU:-1,kW:-20,ka:-20,kc:-20,kd:-20,ke:-20,kg:-20,kl:-20,ko:-20,kq:-20,ku:-10,lf:-20,lv:-19,lw:-10,ly:-19,mT:-58,mY:-39,mv:-10,my:-10,nT:-58,nY:-39,nv:-10,ny:-10,"o,":-40,"o.":-40,oT:-59,oV:-21,oW:-20,oX:-39,oY:-60,ov:-10,ox:-20,oy:-10,"p,":-40,"p.":-40,pT:-59,pV:-21,pW:-20,pX:-39,pY:-60,pv:-10,px:-20,py:-10,qT:-19,qY:-19,qj:20,'r"':2,"r'":2,"r,":-90,"r.":-90,ra:-49,rc:-19,rd:-19,re:-19,rf:1,ro:-19,rq:-19,rt:20,sT:-59,sV:-21,sW:-20,sX:-19,sY:-60,sv:-19,sx:-10,sy:-19,tf:1,uT:-40,uY:-19,"v,":-90,"v.":-90,vT:-39,vX:-39,va:-35,vc:-10,vd:-10,ve:-10,vo:-10,vq:-10,"w,":-50,"w.":-50,wT:-19,wX:-39,wa:-30,xT:-39,xU:-1,xW:-20,xa:-20,xc:-20,xd:-20,xe:-20,xg:-20,xl:-20,xo:-20,xq:-20,xu:-10,"y,":-90,"y.":-90,yT:-39,yX:-39,ya:-35,yc:-10,yd:-10,ye:-10,yo:-10,yq:-10,zT:-59,"{h":2,"{j":79,"{k":2}};var Dw=Object.defineProperty,bf=Object.getOwnPropertySymbols,Nw=Object.prototype.hasOwnProperty,jw=Object.prototype.propertyIsEnumerable,wf=(t,e,n)=>e in t?Dw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fw=(t,e)=>{for(var n in e||(e={}))Nw.call(e,n)&&wf(t,n,e[n]);if(bf)for(var n of bf(e))jw.call(e,n)&&wf(t,n,e[n]);return t};const $l=new Map;let Pl="Alibaba PuHuiTi";function Cl(t){const e=qn(t);for(const n of e){const r=$l.get(Cr(n));if(r)return r}return null}function Ol(){return Array.from($l.values())}function Bw(t){Pl=Un(t)}function _f(t){const e=Fw({},t);return $l.set(e.fontFamily,e),e.fontFamily=Un(e.fontFamily),e}function $f(t){const e=qn(t).flatMap(n=>{const r=Cl(n);if(!r)return[];const{baseUrl:i,fontWeight:o}=r;return Object.values(o).filter(s=>!!s).map(s=>_l(i,s))});return Array.from(new Set(e))}function Ww(t,e){const n=qn(t);let r=null;for(const s of n)if(r=Cl(s),r)break;if(!r)return null;const i=qu(e),o=r.fontWeight[i];return o?_l(r.baseUrl,o.replace(/\/result.css$/,"")):null}const Ml=new WeakMap;function Vw(t,e){const n=t.ownerDocument,r=(n==null?void 0:n.head)||document.head;if(!r)return;Ml.has(r)||Ml.set(r,new Map);const i=Ml.get(r),o=[];$f(e).forEach(a=>{const l=`${e}-${a}`;if(i.has(l))return;const c=n.createElement("link");c.id=l,c.rel="stylesheet",c.href=a,o.push(c),i.set(l,c)}),o.length&&r.tagName==="HEAD"&&o.forEach(a=>r.appendChild(a))}function Yw(t){Ol().forEach(n=>Vw(t,n.fontFamily))}const li="https://assets.antv.antgroup.com",Er=t=>`${t}/result.css`;[{fontFamily:"Alibaba PuHuiTi",name:"阿里巴巴普惠体",baseUrl:li,fontWeight:{regular:Er("AlibabaPuHuiTi-Regular"),bold:Er("AlibabaPuHuiTi-Bold")}},{fontFamily:"Source Han Sans",name:"黑体",baseUrl:li,fontWeight:{regular:Er("SourceHanSansCN-Regular")}},{fontFamily:"Source Han Serif",name:"宋体",baseUrl:li,fontWeight:{regular:Er("SourceHanSerifCN-Regular")}},{fontFamily:"LXGW WenKai",name:"楷体",baseUrl:li,fontWeight:{regular:Er("LXGWWenKai-Regular")}},{fontFamily:"851tegakizatsu",name:"手写体",baseUrl:li,fontWeight:{regular:Er("851tegakizatsu-Regular")}}].forEach(_f);const Sl=new Map;function El(t,e){Sl.set(t,e)}function Pf(t){return Sl.get(t)}function Xw(){return Object.fromEntries(Sl)}El("antv",["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#70CAF8"]),El("spectral",(t,e,n)=>{const r=[["#fc8d59","#ffffbf","#99d594"],["#d7191c","#fdae61","#abdda4","#2b83ba"],["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]],i=Math.min(Math.max(n,3),11);return r[i-3][e%i]});const Co=(t=[],e,n)=>{var r;const i=typeof t=="string"?Pf(t)||[]:t,o=(r=e[0])!=null?r:0;if(typeof i=="function"){const s=n?o/n:0;return i(s,o,n!=null?n:0)}if(Array.isArray(i))return i.length===0?void 0:i[o%i.length]};function Gw(t,e){var n;const r=t.parentElement;r&&(r.style.backgroundColor=e||"none");const i=Mr(t,kt.Background);if(!e)return i==null?void 0:i.remove();if(t.style.backgroundColor=e,i)i.setAttribute("fill",e);else if((n=t.viewBox)!=null&&n.baseVal){const{x:o,y:s,width:a,height:l}=t.viewBox.baseVal,c=wt("rect",{x:o,y:s,width:a,height:l,fill:e,"data-element-type":kt.Background});t.prepend(c)}}function ci(t,e){return Object.entries(e).reduce((r,[i,o])=>{if(typeof o=="function"){const s=o(t.getAttribute(i),t);s!=null&&(r[i]=s)}else Object.assign(r,{[i]:o});return r},{})}function Cf(t){return t.replace(/#|%|\.| |\/|\(|\)/g,"").replace(/,/g,"-")}function qw(t,e){e&&Object.keys(e).length>0&&hl(t,n=>{const r=ci(n,e);Yt(n,r)})}const Of="btn-add-icon",Mf="btn-remove-icon";function Uw(t,e){Yt(e,{display:"none"});const n=e.querySelectorAll('[id^="btn-add-"]'),r=e.querySelectorAll('[id^="btn-remove-"]');Kw(t),n.forEach(Qw),r.forEach(Jw)}const Zw="btn-icon-defs";function Kw(t){const e=wt("defs");si(e,Zw);const n=Or(`<symbol class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200">
13
13
  <path
14
14
  d="M512 1024C229.216 1024 0 794.784 0 512S229.216 0 512 0s512 229.216 512 512-229.216 512-512 512z m0-960C264.576 64 64 264.576 64 512s200.576 448 448 448 448-200.576 448-448S759.424 64 512 64z m192 480h-160v160a32 32 0 0 1-64 0v-160h-160a32 32 0 0 1 0-64h160v-160a32 32 0 0 1 64 0v160h160a32 32 0 0 1 0 64z"
15
15
  fill="#339900"></path>
16
- </symbol>`);n&&(n.setAttribute("id",_f),e.appendChild(n));const r=Mr(`<symbol viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200">
16
+ </symbol>`);n&&(n.setAttribute("id",Of),e.appendChild(n));const r=Or(`<symbol viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200">
17
17
  <path d="M874.971429 149.942857C776.228571 54.857143 648.228571 0 512.914286 0S245.942857 54.857143 150.857143 149.942857c-201.142857 201.142857-201.142857 522.971429 0 724.114286C245.942857 969.142857 377.6 1024 512.914286 1024s266.971429-54.857143 362.057143-149.942857c201.142857-201.142857 201.142857-522.971429 0-724.114286m-51.2 672.914286C739.657143 906.971429 629.942857 950.857143 512.914286 950.857143s-226.742857-43.885714-310.857143-128c-171.885714-171.885714-171.885714-449.828571 0-621.714286C286.171429 117.028571 395.885714 73.142857 512.914286 73.142857s226.742857 43.885714 310.857143 128c171.885714 171.885714 171.885714 449.828571 0 621.714286" fill="#E63C33"></path>
18
18
  <path d="M772.571429 475.428571H253.257143c-21.942857 0-36.571429 14.628571-36.571429 36.571429 0 10.971429 3.657143 18.285714 10.971429 25.6s14.628571 10.971429 25.6 10.971429H768.914286c21.942857 0 36.571429-14.628571 36.571428-36.571429s-14.628571-36.571429-32.914285-36.571429" fill="#E63C33"></path>
19
- </symbol>`);r&&(r.setAttribute("id",$f),e.appendChild(r)),t.prepend(e)}function Pf(t,e){const{id:n,x:r=0,y:i=0,width:o=0,height:s=0}=ke(t,["id","x","y","width","height"]),a=wt("g",{id:n,class:"btn-group",transform:`translate(${r}, ${i})`}),l=t.getAttribute("data-items");l&&a.setAttribute("data-items",l);const c=Math.max(+o,+s)/2,h=wt("circle",{cx:c,cy:c,r:c,fill:"#fff",stroke:"transparent"});a.appendChild(h);const u=wt("use",{href:`#${e}`,width:o,height:s});a.appendChild(u),a.style.cursor="pointer",t.replaceWith(a)}function j5(t){Pf(t,_f)}function F5(t){Pf(t,$f)}var B5=Object.defineProperty,Of=Object.getOwnPropertySymbols,W5=Object.prototype.hasOwnProperty,V5=Object.prototype.propertyIsEnumerable,Cf=(t,e,n)=>e in t?B5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sl=(t,e)=>{for(var n in e||(e={}))W5.call(e,n)&&Cf(t,n,e[n]);if(Of)for(var n of Of(e))V5.call(e,n)&&Cf(t,n,e[n]);return t};function Y5(t,e,n,r){var i;if(!n)return null;const{themeConfig:o}=r,s=Sl({},(i=o.item)==null?void 0:i.icon),a=li(e,s);return X5(t,e,n,a)}function X5(t,e,n,r){return af(t,"icon",n),g5(n,Sl(Sl({},ke(e,["id","x","y","width","height","fill","stroke","data-element-type","data-indexes"])),r))}var G5=Object.defineProperty,q5=Object.defineProperties,U5=Object.getOwnPropertyDescriptors,Co=Object.getOwnPropertySymbols,Mf=Object.prototype.hasOwnProperty,Sf=Object.prototype.propertyIsEnumerable,Ef=(t,e,n)=>e in t?G5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mo=(t,e)=>{for(var n in e||(e={}))Mf.call(e,n)&&Ef(t,n,e[n]);if(Co)for(var n of Co(e))Sf.call(e,n)&&Ef(t,n,e[n]);return t},If=(t,e)=>q5(t,U5(e)),Z5=(t,e)=>{var n={};for(var r in t)Mf.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Co)for(var r of Co(t))e.indexOf(r)<0&&Sf.call(t,r)&&(n[r]=t[r]);return n};function Tf(t,e,n){if(!n)return null;const r=_o(n);if(!r)return null;const i=vl(r),o=K5(t,e,i);af(t,"illus",r);const{data:s,color:a}=r;return Q5(i,Mo(If(Mo({},J5(e)),{"clip-path":`url(#${o})`}),a?{color:a}:{}),s)}function K5(t,e,n){const r=`clip-${n}-${k$()}`;if(t.querySelector(`#${r}`))return r;const i=xo(t),o=wt("clipPath",{id:r}),s=e.cloneNode();return h4(s,["id","data-illus-bounds","data-element-type"]),o.appendChild(s),i.appendChild(o),r}function Q5(t,e,n){const r=e,{"clip-path":i}=r,o=Z5(r,["clip-path"]),{x:s="0",y:a="0",width:l="0",height:c="0"}=o,h=wt("rect",{id:`${t}-volume`,"data-element-type":kt.IllusVolume,x:s,y:a,width:l,height:c,fill:"transparent"}),u=wt("g",{"data-element-type":kt.IllusGroup,"clip-path":i,id:`${t}-group`});u.appendChild(h);const f=wt("use",If(Mo({id:t,fill:"lightgray"},o),{href:rf(n),"data-element-type":kt.Illus}));return u.appendChild(f),u}function J5(t){const e=t.getAttribute("data-illus-bounds");if(!e)return Mo({x:"0",y:"0",width:"0",height:"0"},ke(t,["x","y","width","height"]));const[n,r,i,o]=e.split(" ");return{x:n,y:r,width:i,height:o}}function So(t){"@babel/helpers - typeof";return So=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},So(t)}var t6=/^\s+/,e6=/\s+$/;function ot(t,e){if(t=t||"",e=e||{},t instanceof ot)return t;if(!(this instanceof ot))return new ot(t,e);var n=n6(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}ot.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n,r,i,o,s,a;return n=e.r/255,r=e.g/255,i=e.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*s+.0722*a},setAlpha:function(e){return this._a=Hf(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=kf(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=kf(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=Af(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Af(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return zf(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return s6(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Jt(this._r,255)*100)+"%",g:Math.round(Jt(this._g,255)*100)+"%",b:Math.round(Jt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Jt(this._r,255)*100)+"%, "+Math.round(Jt(this._g,255)*100)+"%, "+Math.round(Jt(this._b,255)*100)+"%)":"rgba("+Math.round(Jt(this._r,255)*100)+"%, "+Math.round(Jt(this._g,255)*100)+"%, "+Math.round(Jt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:v6[zf(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n="#"+Lf(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(e){var o=ot(e);r="#"+Lf(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(e){var n=!!e;e=e||this._format;var r=!1,i=this._a<1&&this._a>=0,o=!n&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return ot(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(h6,arguments)},brighten:function(){return this._applyModification(d6,arguments)},darken:function(){return this._applyModification(u6,arguments)},desaturate:function(){return this._applyModification(a6,arguments)},saturate:function(){return this._applyModification(l6,arguments)},greyscale:function(){return this._applyModification(c6,arguments)},spin:function(){return this._applyModification(f6,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(m6,arguments)},complement:function(){return this._applyCombination(p6,arguments)},monochromatic:function(){return this._applyCombination(y6,arguments)},splitcomplement:function(){return this._applyCombination(g6,arguments)},triad:function(){return this._applyCombination(Rf,[3])},tetrad:function(){return this._applyCombination(Rf,[4])}},ot.fromRatio=function(t,e){if(So(t)=="object"){var n={};for(var r in t)t.hasOwnProperty(r)&&(r==="a"?n[r]=t[r]:n[r]=ci(t[r]));t=n}return ot(t,e)};function n6(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,o=null,s=!1,a=!1;return typeof t=="string"&&(t=_6(t)),So(t)=="object"&&(yn(t.r)&&yn(t.g)&&yn(t.b)?(e=r6(t.r,t.g,t.b),s=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):yn(t.h)&&yn(t.s)&&yn(t.v)?(r=ci(t.s),i=ci(t.v),e=o6(t.h,r,i),s=!0,a="hsv"):yn(t.h)&&yn(t.s)&&yn(t.l)&&(r=ci(t.s),o=ci(t.l),e=i6(t.h,r,o),s=!0,a="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=Hf(n),{ok:s,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function r6(t,e,n){return{r:Jt(t,255)*255,g:Jt(e,255)*255,b:Jt(n,255)*255}}function Af(t,e,n){t=Jt(t,255),e=Jt(e,255),n=Jt(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,s,a=(r+i)/2;if(r==i)o=s=0;else{var l=r-i;switch(s=a>.5?l/(2-r-i):l/(r+i),r){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s,l:a}}function i6(t,e,n){var r,i,o;t=Jt(t,360),e=Jt(e,100),n=Jt(n,100);function s(c,h,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?c+(h-c)*6*u:u<1/2?h:u<2/3?c+(h-c)*(2/3-u)*6:c}if(e===0)r=i=o=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=s(l,a,t+1/3),i=s(l,a,t),o=s(l,a,t-1/3)}return{r:r*255,g:i*255,b:o*255}}function kf(t,e,n){t=Jt(t,255),e=Jt(e,255),n=Jt(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,s,a=r,l=r-i;if(s=r===0?0:l/r,r==i)o=0;else{switch(r){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s,v:a}}function o6(t,e,n){t=Jt(t,360)*6,e=Jt(e,100),n=Jt(n,100);var r=Math.floor(t),i=t-r,o=n*(1-e),s=n*(1-i*e),a=n*(1-(1-i)*e),l=r%6,c=[n,s,o,o,a,n][l],h=[a,n,n,s,o,o][l],u=[o,o,a,n,n,s][l];return{r:c*255,g:h*255,b:u*255}}function zf(t,e,n,r){var i=[Fe(Math.round(t).toString(16)),Fe(Math.round(e).toString(16)),Fe(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function s6(t,e,n,r,i){var o=[Fe(Math.round(t).toString(16)),Fe(Math.round(e).toString(16)),Fe(Math.round(n).toString(16)),Fe(Df(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Lf(t,e,n,r){var i=[Fe(Df(r)),Fe(Math.round(t).toString(16)),Fe(Math.round(e).toString(16)),Fe(Math.round(n).toString(16))];return i.join("")}ot.equals=function(t,e){return!t||!e?!1:ot(t).toRgbString()==ot(e).toRgbString()},ot.random=function(){return ot.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function a6(t,e){e=e===0?0:e||10;var n=ot(t).toHsl();return n.s-=e/100,n.s=Eo(n.s),ot(n)}function l6(t,e){e=e===0?0:e||10;var n=ot(t).toHsl();return n.s+=e/100,n.s=Eo(n.s),ot(n)}function c6(t){return ot(t).desaturate(100)}function h6(t,e){e=e===0?0:e||10;var n=ot(t).toHsl();return n.l+=e/100,n.l=Eo(n.l),ot(n)}function d6(t,e){e=e===0?0:e||10;var n=ot(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),ot(n)}function u6(t,e){e=e===0?0:e||10;var n=ot(t).toHsl();return n.l-=e/100,n.l=Eo(n.l),ot(n)}function f6(t,e){var n=ot(t).toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,ot(n)}function p6(t){var e=ot(t).toHsl();return e.h=(e.h+180)%360,ot(e)}function Rf(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var n=ot(t).toHsl(),r=[ot(t)],i=360/e,o=1;o<e;o++)r.push(ot({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function g6(t){var e=ot(t).toHsl(),n=e.h;return[ot(t),ot({h:(n+72)%360,s:e.s,l:e.l}),ot({h:(n+216)%360,s:e.s,l:e.l})]}function m6(t,e,n){e=e||6,n=n||30;var r=ot(t).toHsl(),i=360/n,o=[ot(t)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(ot(r));return o}function y6(t,e){e=e||6;for(var n=ot(t).toHsv(),r=n.h,i=n.s,o=n.v,s=[],a=1/e;e--;)s.push(ot({h:r,s:i,v:o})),o=(o+a)%1;return s}ot.mix=function(t,e,n){n=n===0?0:n||50;var r=ot(t).toRgb(),i=ot(e).toRgb(),o=n/100,s={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return ot(s)},ot.readability=function(t,e){var n=ot(t),r=ot(e);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},ot.isReadable=function(t,e,n){var r=ot.readability(t,e),i,o;switch(o=!1,i=$6(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o},ot.mostReadable=function(t,e,n){var r=null,i=0,o,s,a,l;n=n||{},s=n.includeFallbackColors,a=n.level,l=n.size;for(var c=0;c<e.length;c++)o=ot.readability(t,e[c]),o>i&&(i=o,r=ot(e[c]));return ot.isReadable(t,r,{level:a,size:l})||!s?r:(n.includeFallbackColors=!1,ot.mostReadable(t,["#fff","#000"],n))};var El=ot.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},v6=ot.hexNames=b6(El);function b6(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function Hf(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Jt(t,e){x6(t)&&(t="100%");var n=w6(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function Eo(t){return Math.min(1,Math.max(0,t))}function ze(t){return parseInt(t,16)}function x6(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function w6(t){return typeof t=="string"&&t.indexOf("%")!=-1}function Fe(t){return t.length==1?"0"+t:""+t}function ci(t){return t<=1&&(t=t*100+"%"),t}function Df(t){return Math.round(parseFloat(t)*255).toString(16)}function Nf(t){return ze(t)/255}var Be=(function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function yn(t){return!!Be.CSS_UNIT.exec(t)}function _6(t){t=t.replace(t6,"").replace(e6,"").toLowerCase();var e=!1;if(El[t])t=El[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Be.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=Be.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Be.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=Be.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Be.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=Be.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Be.hex8.exec(t))?{r:ze(n[1]),g:ze(n[2]),b:ze(n[3]),a:Nf(n[4]),format:e?"name":"hex8"}:(n=Be.hex6.exec(t))?{r:ze(n[1]),g:ze(n[2]),b:ze(n[3]),format:e?"name":"hex"}:(n=Be.hex4.exec(t))?{r:ze(n[1]+""+n[1]),g:ze(n[2]+""+n[2]),b:ze(n[3]+""+n[3]),a:Nf(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=Be.hex3.exec(t))?{r:ze(n[1]+""+n[1]),g:ze(n[2]+""+n[2]),b:ze(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function $6(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}var P6=Object.defineProperty,jf=Object.getOwnPropertySymbols,O6=Object.prototype.hasOwnProperty,C6=Object.prototype.propertyIsEnumerable,Ff=(t,e,n)=>e in t?P6(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,M6=(t,e)=>{for(var n in e||(e={}))O6.call(e,n)&&Ff(t,n,e[n]);if(jf)for(var n of jf(e))C6.call(e,n)&&Ff(t,n,e[n]);return t};function Bf(t,e,n,r){const i=t.getAttribute(r),o=S6(i,n),{type:s,colors:a=[]}=o,l=a.length-1,c=a.map((p,g)=>typeof p=="string"?wt("stop",{offset:`${g/l}`,"stop-color":p}):wt("stop",{offset:`${p.offset}`,"stop-color":p.color})),h=E6(n);if(s==="linear-gradient"){const{angle:p=0}=o,[[g,y],[m,b]]=I6(p),v=wt("linearGradient",{id:h,x1:g,y1:y,x2:m,y2:b});c.forEach(x=>v.appendChild(x)),Wf(e,h,v)}else if(s==="radial-gradient"){const p=wt("radialGradient",{id:h});c.forEach(g=>p.appendChild(g)),Wf(e,h,p)}const u=t.getAttribute("fill"),f=t.getAttribute("stroke");Wn(u)&&t.setAttribute("fill",`url(#${h})`),Wn(f)&&t.setAttribute("stroke",`url(#${h})`)}function Wf(t,e,n){const r=xo(t);n.setAttribute("id",e);const i=r.querySelector(`#${e}`);i?i.replaceWith(n):r.appendChild(n)}function S6(t,e){var n;if((n=e.colors)!=null&&n.length||!t)return e;const r=ot(t),i=M6({},e);return i.colors=r.isDark()?[t,r.lighten(20).toHexString()]:[r.darken(20).toHexString(),t],!("angle"in e)&&i.type==="linear-gradient"&&(i.angle=225),i}function E6(t){const{type:e,colors:n=[]}=t,r=wf(n.map(i=>typeof i=="string"?i:`${i.color}_${i.offset}`).join("-"));if(e==="linear-gradient"){const{angle:i=0}=t;return`${e}-${r}-${i}`}return`${e}-${r}`}function I6(t){const e=Math.PI/180*t,n=Math.cos(e),r=Math.sin(e);return[[.5-n/2,.5-r/2],[.5+n/2,.5+r/2]]}const T6=Object.freeze(Object.defineProperty({__proto__:null,diamond:({scale:t=.5,backgroundColor:e,foregroundColor:n})=>{const r=wt("pattern",{id:"pattern-diamond",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=wt("rect",{width:"100%",height:"100%",fill:e}),o=wt("path",{d:"M0,0 L20,20 M20,0 L0,20",stroke:n,"stroke-width":"1"});return r.appendChild(i),r.appendChild(o),r},dot:({scale:t=1,backgroundColor:e,foregroundColor:n})=>{const r=wt("pattern",{id:"pattern-dot",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=wt("rect",{width:"100%",height:"100%",fill:e}),o=wt("circle",{cx:"5",cy:"5",r:"3",fill:n}),s=wt("circle",{cx:"15",cy:"15",r:"3",fill:n});return r.appendChild(i),r.appendChild(o),r.appendChild(s),r},hex:({scale:t=.3,backgroundColor:e,foregroundColor:n})=>{const r=wt("pattern",{id:"pattern-hex",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=wt("rect",{width:"100%",height:"100%",fill:e}),o=wt("path",{d:"M10,0 L20,5 L20,15 L10,20 L0,15 L0,5 Z",fill:n});return r.appendChild(i),r.appendChild(o),r},line:({scale:t=1,backgroundColor:e,foregroundColor:n})=>{const o=wt("pattern",{id:"pattern-line",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),s=wt("rect",{width:"100%",height:"100%",fill:e}),a=wt("line",{x1:"7",y1:"-3",x2:"23",y2:"13",stroke:n,"stroke-width":6,"stroke-opacity":"0.5"}),l=wt("line",{x1:"-3",y1:"7",x2:"13",y2:"23",stroke:n,"stroke-width":6,"stroke-opacity":"0.5"});return o.appendChild(s),o.appendChild(a),o.appendChild(l),o},mosaic:({scale:t=1,backgroundColor:e="#ffffff",foregroundColor:n="#000000"})=>{const a=wt("pattern",{id:"pattern-mosaic",width:20,height:20,patternUnits:"userSpaceOnUse",patternTransform:`scale(${t})`}),l=wt("rect",{width:"100%",height:"100%",fill:e});a.appendChild(l);for(let c=0;c<4;c++)for(let h=0;h<4;h++)if((h+c)%2===0){const u=wt("rect",{x:h*5,y:c*5,width:5,height:5,fill:n});a.appendChild(u)}return a},square:({scale:t=.3,backgroundColor:e,foregroundColor:n})=>{const r=wt("pattern",{id:"pattern-square",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=wt("rect",{width:"100%",height:"100%",fill:e}),o=wt("path",{d:"M0,0 L20,0 L20,20 L0,20 Z",fill:n});return r.appendChild(i),r.appendChild(o),r}},Symbol.toStringTag,{value:"Module"}));var A6=Object.defineProperty,Io=Object.getOwnPropertySymbols,Vf=Object.prototype.hasOwnProperty,Yf=Object.prototype.propertyIsEnumerable,Xf=(t,e,n)=>e in t?A6(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Il=(t,e)=>{for(var n in e||(e={}))Vf.call(e,n)&&Xf(t,n,e[n]);if(Io)for(var n of Io(e))Yf.call(e,n)&&Xf(t,n,e[n]);return t},k6=(t,e)=>{var n={};for(var r in t)Vf.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Io)for(var r of Io(t))e.indexOf(r)<0&&Yf.call(t,r)&&(n[r]=t[r]);return n};const Tl=new Map;function Gf(t,e){Tl.has(t)&&console.warn(`Pattern ${t} will be overwritten`),Tl.set(t,e)}for(const[t,e]of Object.entries(T6))Gf(t,e);function z6(t,e,n){const r=n.themeConfig.stylize;if(!r||r.type!=="pattern")return;const i=r,{pattern:o}=i,s=k6(i,["pattern"]),a=Tl.get(o);if(!a)return console.warn(`Pattern ${o} not found`);const{fill:l}=ke(t,["fill","stroke"]),c=l,h=Il({backgroundColor:c&&ot(c).setAlpha(.5).toRgbString(),foregroundColor:c},s),u=R6(Il(Il({},r),h));L6(e,u,a(h)),Wn(l)&&(t.setAttribute("fill",`url(#${u})`),!t.getAttribute("stroke")&&l&&t.setAttribute("stroke",l))}function L6(t,e,n){const r=xo(t);n.setAttribute("id",e);const i=r.querySelector(`pattern#${e}`);i?i.replaceWith(n):r.appendChild(n)}function R6(t){const{pattern:e,foregroundColor:n="unset",backgroundColor:r="unset",scale:i="unset"}=t;return wf(`pattern-${e}-${n}-${r}-${i}`)}function Al(t,e,n){if(t&&t.length){const[r,i]=e,o=Math.PI/180*n,s=Math.cos(o),a=Math.sin(o);for(const l of t){const[c,h]=l;l[0]=(c-r)*s-(h-i)*a+r,l[1]=(c-r)*a+(h-i)*s+i}}}function H6(t,e){return t[0]===e[0]&&t[1]===e[1]}function D6(t,e,n,r=1){const i=n,o=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,a=[0,0];if(i)for(const c of s)Al(c,a,i);const l=(function(c,h,u){const f=[];for(const v of c){const x=[...v];H6(x[0],x[x.length-1])||x.push([x[0][0],x[0][1]]),x.length>2&&f.push(x)}const p=[];h=Math.max(h,.1);const g=[];for(const v of f)for(let x=0;x<v.length-1;x++){const w=v[x],_=v[x+1];if(w[1]!==_[1]){const $=Math.min(w[1],_[1]);g.push({ymin:$,ymax:Math.max(w[1],_[1]),x:$===w[1]?w[0]:_[0],islope:(_[0]-w[0])/(_[1]-w[1])})}}if(g.sort(((v,x)=>v.ymin<x.ymin?-1:v.ymin>x.ymin?1:v.x<x.x?-1:v.x>x.x?1:v.ymax===x.ymax?0:(v.ymax-x.ymax)/Math.abs(v.ymax-x.ymax))),!g.length)return p;let y=[],m=g[0].ymin,b=0;for(;y.length||g.length;){if(g.length){let v=-1;for(let x=0;x<g.length&&!(g[x].ymin>m);x++)v=x;g.splice(0,v+1).forEach((x=>{y.push({s:m,edge:x})}))}if(y=y.filter((v=>!(v.edge.ymax<=m))),y.sort(((v,x)=>v.edge.x===x.edge.x?0:(v.edge.x-x.edge.x)/Math.abs(v.edge.x-x.edge.x))),(u!==1||b%h==0)&&y.length>1)for(let v=0;v<y.length;v+=2){const x=v+1;if(x>=y.length)break;const w=y[v].edge,_=y[x].edge;p.push([[Math.round(w.x),m],[Math.round(_.x),m]])}m+=u,y.forEach((v=>{v.edge.x=v.edge.x+u*v.edge.islope})),b++}return p})(s,o,r);if(i){for(const c of s)Al(c,a,-i);(function(c,h,u){const f=[];c.forEach((p=>f.push(...p))),Al(f,h,u)})(l,a,-i)}return l}function hi(t,e){var n;const r=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let o=1;return e.roughness>=1&&(((n=e.randomizer)===null||n===void 0?void 0:n.next())||Math.random())>.7&&(o=i),D6(t,i,r,o||1)}class kl{constructor(e){this.helper=e}fillPolygons(e,n){return this._fillPolygons(e,n)}_fillPolygons(e,n){const r=hi(e,n);return{type:"fillSketch",ops:this.renderLines(r,n)}}renderLines(e,n){const r=[];for(const i of e)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],n));return r}}function To(t){const e=t[0],n=t[1];return Math.sqrt(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))}let N6=class extends kl{fillPolygons(e,n){let r=n.hachureGap;r<0&&(r=4*n.strokeWidth),r=Math.max(r,.1);const i=hi(e,Object.assign({},n,{hachureGap:r})),o=Math.PI/180*n.hachureAngle,s=[],a=.5*r*Math.cos(o),l=.5*r*Math.sin(o);for(const[c,h]of i)To([c,h])&&s.push([[c[0]-a,c[1]+l],[...h]],[[c[0]+a,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,n)}}},j6=class extends kl{fillPolygons(e,n){const r=this._fillPolygons(e,n),i=Object.assign({},n,{hachureAngle:n.hachureAngle+90}),o=this._fillPolygons(e,i);return r.ops=r.ops.concat(o.ops),r}},F6=class{constructor(e){this.helper=e}fillPolygons(e,n){const r=hi(e,n=Object.assign({},n,{hachureAngle:0}));return this.dotsOnLines(r,n)}dotsOnLines(e,n){const r=[];let i=n.hachureGap;i<0&&(i=4*n.strokeWidth),i=Math.max(i,.1);let o=n.fillWeight;o<0&&(o=n.strokeWidth/2);const s=i/4;for(const a of e){const l=To(a),c=l/i,h=Math.ceil(c)-1,u=l-h*i,f=(a[0][0]+a[1][0])/2-i/4,p=Math.min(a[0][1],a[1][1]);for(let g=0;g<h;g++){const y=p+u+g*i,m=f-s+2*Math.random()*s,b=y-s+2*Math.random()*s,v=this.helper.ellipse(m,b,o,o,n);r.push(...v.ops)}}return{type:"fillSketch",ops:r}}},B6=class{constructor(e){this.helper=e}fillPolygons(e,n){const r=hi(e,n);return{type:"fillSketch",ops:this.dashedLine(r,n)}}dashedLine(e,n){const r=n.dashOffset<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashOffset,i=n.dashGap<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashGap,o=[];return e.forEach((s=>{const a=To(s),l=Math.floor(a/(r+i)),c=(a+i-l*(r+i))/2;let h=s[0],u=s[1];h[0]>u[0]&&(h=s[1],u=s[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let p=0;p<l;p++){const g=p*(r+i),y=g+r,m=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)],b=[h[0]+y*Math.cos(f)+c*Math.cos(f),h[1]+y*Math.sin(f)+c*Math.sin(f)];o.push(...this.helper.doubleLineOps(m[0],m[1],b[0],b[1],n))}})),o}};class W6{constructor(e){this.helper=e}fillPolygons(e,n){const r=n.hachureGap<0?4*n.strokeWidth:n.hachureGap,i=n.zigzagOffset<0?r:n.zigzagOffset,o=hi(e,n=Object.assign({},n,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(o,i,n)}}zigzagLines(e,n,r){const i=[];return e.forEach((o=>{const s=To(o),a=Math.round(s/(2*n));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<a;u++){const f=2*u*n,p=2*(u+1)*n,g=Math.sqrt(2*Math.pow(n,2)),y=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],m=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],b=[y[0]+g*Math.cos(h+Math.PI/4),y[1]+g*Math.sin(h+Math.PI/4)];i.push(...this.helper.doubleLineOps(y[0],y[1],b[0],b[1],r),...this.helper.doubleLineOps(b[0],b[1],m[0],m[1],r))}})),i}}const Me={};let V6=class{constructor(e){this.seed=e}next(){return this.seed?(Xi(2,31)-1&(this.seed=Math.imul(48271,this.seed)))/Xi(2,31):Math.random()}};const Y6=0,zl=1,qf=2,Ao={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 Ll(t,e){return t.type===e}function Rl(t){const e=[],n=(function(s){const a=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))a[a.length]={type:Y6,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];a[a.length]={type:zl,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return a[a.length]={type:qf,text:""},a})(t);let r="BOD",i=0,o=n[i];for(;!Ll(o,qf);){let s=0;const a=[];if(r==="BOD"){if(o.text!=="M"&&o.text!=="m")return Rl("M0,0"+t);i++,s=Ao[o.text],r=o.text}else Ll(o,zl)?s=Ao[r]:(i++,s=Ao[o.text],r=o.text);if(!(i+s<n.length))throw new Error("Path data ended short");for(let l=i;l<i+s;l++){const c=n[l];if(!Ll(c,zl))throw new Error("Param not a number: "+r+","+c.text);a[a.length]=+c.text}if(typeof Ao[r]!="number")throw new Error("Bad segment: "+r);{const l={key:r,data:a};e.push(l),i+=s,o=n[i],r==="M"&&(r="L"),r==="m"&&(r="l")}}return e}function Uf(t){let e=0,n=0,r=0,i=0;const o=[];for(const{key:s,data:a}of t)switch(s){case"M":o.push({key:"M",data:[...a]}),[e,n]=a,[r,i]=a;break;case"m":e+=a[0],n+=a[1],o.push({key:"M",data:[e,n]}),r=e,i=n;break;case"L":o.push({key:"L",data:[...a]}),[e,n]=a;break;case"l":e+=a[0],n+=a[1],o.push({key:"L",data:[e,n]});break;case"C":o.push({key:"C",data:[...a]}),e=a[4],n=a[5];break;case"c":{const l=a.map(((c,h)=>h%2?c+n:c+e));o.push({key:"C",data:l}),e=l[4],n=l[5];break}case"Q":o.push({key:"Q",data:[...a]}),e=a[2],n=a[3];break;case"q":{const l=a.map(((c,h)=>h%2?c+n:c+e));o.push({key:"Q",data:l}),e=l[2],n=l[3];break}case"A":o.push({key:"A",data:[...a]}),e=a[5],n=a[6];break;case"a":e+=a[5],n+=a[6],o.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],e,n]});break;case"H":o.push({key:"H",data:[...a]}),e=a[0];break;case"h":e+=a[0],o.push({key:"H",data:[e]});break;case"V":o.push({key:"V",data:[...a]}),n=a[0];break;case"v":n+=a[0],o.push({key:"V",data:[n]});break;case"S":o.push({key:"S",data:[...a]}),e=a[2],n=a[3];break;case"s":{const l=a.map(((c,h)=>h%2?c+n:c+e));o.push({key:"S",data:l}),e=l[2],n=l[3];break}case"T":o.push({key:"T",data:[...a]}),e=a[0],n=a[1];break;case"t":e+=a[0],n+=a[1],o.push({key:"T",data:[e,n]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=r,n=i}return o}function Zf(t){const e=[];let n="",r=0,i=0,o=0,s=0,a=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[r,i]=h,[o,s]=h;break;case"C":e.push({key:"C",data:[...h]}),r=h[4],i=h[5],a=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[r,i]=h;break;case"H":r=h[0],e.push({key:"L",data:[r,i]});break;case"V":i=h[0],e.push({key:"L",data:[r,i]});break;case"S":{let u=0,f=0;n==="C"||n==="S"?(u=r+(r-a),f=i+(i-l)):(u=r,f=i),e.push({key:"C",data:[u,f,...h]}),a=h[0],l=h[1],r=h[2],i=h[3];break}case"T":{const[u,f]=h;let p=0,g=0;n==="Q"||n==="T"?(p=r+(r-a),g=i+(i-l)):(p=r,g=i);const y=r+2*(p-r)/3,m=i+2*(g-i)/3,b=u+2*(p-u)/3,v=f+2*(g-f)/3;e.push({key:"C",data:[y,m,b,v,u,f]}),a=p,l=g,r=u,i=f;break}case"Q":{const[u,f,p,g]=h,y=r+2*(u-r)/3,m=i+2*(f-i)/3,b=p+2*(u-p)/3,v=g+2*(f-g)/3;e.push({key:"C",data:[y,m,b,v,p,g]}),a=u,l=f,r=p,i=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),p=h[2],g=h[3],y=h[4],m=h[5],b=h[6];u===0||f===0?(e.push({key:"C",data:[r,i,m,b,m,b]}),r=m,i=b):(r!==m||i!==b)&&(Kf(r,i,m,b,u,f,p,g,y).forEach((function(v){e.push({key:"C",data:v})})),r=m,i=b);break}case"Z":e.push({key:"Z",data:[]}),r=o,i=s}n=c}return e}function di(t,e,n){return[t*Math.cos(n)-e*Math.sin(n),t*Math.sin(n)+e*Math.cos(n)]}function Kf(t,e,n,r,i,o,s,a,l,c){const h=(u=s,Math.PI*u/180);var u;let f=[],p=0,g=0,y=0,m=0;if(c)[p,g,y,m]=c;else{[t,e]=di(t,e,-h),[n,r]=di(n,r,-h);const C=(t-n)/2,A=(e-r)/2;let B=C*C/(i*i)+A*A/(o*o);B>1&&(B=Math.sqrt(B),i*=B,o*=B);const k=i*i,D=o*o,z=k*D-k*A*A-D*C*C,N=k*A*A+D*C*C,j=(a===l?-1:1)*Math.sqrt(Math.abs(z/N));y=j*i*A/o+(t+n)/2,m=j*-o*C/i+(e+r)/2,p=Math.asin(parseFloat(((e-m)/o).toFixed(9))),g=Math.asin(parseFloat(((r-m)/o).toFixed(9))),t<y&&(p=Math.PI-p),n<y&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let b=g-p;if(Math.abs(b)>120*Math.PI/180){const C=g,A=n,B=r;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=Kf(n=y+i*Math.cos(g),r=m+o*Math.sin(g),A,B,i,o,s,0,l,[g,C,y,m])}b=g-p;const v=Math.cos(p),x=Math.sin(p),w=Math.cos(g),_=Math.sin(g),$=Math.tan(b/4),P=4/3*i*$,O=4/3*o*$,T=[t,e],I=[t+P*x,e-O*v],S=[n+P*_,r-O*w],H=[n,r];if(I[0]=2*T[0]-I[0],I[1]=2*T[1]-I[1],c)return[I,S,H].concat(f);{f=[I,S,H].concat(f);const C=[];for(let A=0;A<f.length;A+=3){const B=di(f[A][0],f[A][1],h),k=di(f[A+1][0],f[A+1][1],h),D=di(f[A+2][0],f[A+2][1],h);C.push([B[0],B[1],k[0],k[1],D[0],D[1]])}return C}}const X6={randOffset:function(t,e){return _t(t,e)},randOffsetWithRange:function(t,e,n){return zo(t,e,n)},ellipse:function(t,e,n,r,i){const o=t0(n,r,i);return Hl(t,e,i,o).opset},doubleLineOps:function(t,e,n,r,i){return An(t,e,n,r,i,!0)}};function Qf(t,e,n,r,i){return{type:"path",ops:An(t,e,n,r,i)}}function ko(t,e,n){const r=(t||[]).length;if(r>2){const i=[];for(let o=0;o<r-1;o++)i.push(...An(t[o][0],t[o][1],t[o+1][0],t[o+1][1],n));return e&&i.push(...An(t[r-1][0],t[r-1][1],t[0][0],t[0][1],n)),{type:"path",ops:i}}return r===2?Qf(t[0][0],t[0][1],t[1][0],t[1][1],n):{type:"path",ops:[]}}function G6(t,e,n,r,i){return(function(o,s){return ko(o,!0,s)})([[t,e],[t+n,e],[t+n,e+r],[t,e+r]],i)}function Jf(t,e){if(t.length){const n=typeof t[0][0]=="number"?[t]:t,r=Lo(n[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:Lo(n[0],1.5*(1+.22*e.roughness),r0(e));for(let o=1;o<n.length;o++){const s=n[o];if(s.length){const a=Lo(s,1*(1+.2*e.roughness),e),l=e.disableMultiStroke?[]:Lo(s,1.5*(1+.22*e.roughness),r0(e));for(const c of a)c.op!=="move"&&r.push(c);for(const c of l)c.op!=="move"&&i.push(c)}}return{type:"path",ops:r.concat(i)}}return{type:"path",ops:[]}}function t0(t,e,n){const r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),o=2*Math.PI/i;let s=Math.abs(t/2),a=Math.abs(e/2);const l=1-n.curveFitting;return s+=_t(s*l,n),a+=_t(a*l,n),{increment:o,rx:s,ry:a}}function Hl(t,e,n,r){const[i,o]=o0(r.increment,t,e,r.rx,r.ry,1,r.increment*zo(.1,zo(.4,1,n),n),n);let s=Ro(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){const[a]=o0(r.increment,t,e,r.rx,r.ry,1.5,0,n),l=Ro(a,null,n);s=s.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:s}}}function e0(t,e,n,r,i,o,s,a,l){const c=t,h=e;let u=Math.abs(n/2),f=Math.abs(r/2);u+=_t(.01*u,l),f+=_t(.01*f,l);let p=i,g=o;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const y=2*Math.PI/l.curveStepCount,m=Math.min(y/2,(g-p)/2),b=s0(m,c,h,u,f,p,g,1,l);if(!l.disableMultiStroke){const v=s0(m,c,h,u,f,p,g,1.5,l);b.push(...v)}return s&&(a?b.push(...An(c,h,c+u*Math.cos(p),h+f*Math.sin(p),l),...An(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):b.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+f*Math.sin(p)]})),{type:"path",ops:b}}function n0(t,e){const n=Zf(Uf(Rl(t))),r=[];let i=[0,0],o=[0,0];for(const{key:s,data:a}of n)switch(s){case"M":o=[a[0],a[1]],i=[a[0],a[1]];break;case"L":r.push(...An(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]];break;case"C":{const[l,c,h,u,f,p]=a;r.push(...q6(l,c,h,u,f,p,o,e)),o=[f,p];break}case"Z":r.push(...An(o[0],o[1],i[0],i[1],e)),o=[i[0],i[1]]}return{type:"path",ops:r}}function Dl(t,e){const n=[];for(const r of t)if(r.length){const i=e.maxRandomnessOffset||0,o=r.length;if(o>2){n.push({op:"move",data:[r[0][0]+_t(i,e),r[0][1]+_t(i,e)]});for(let s=1;s<o;s++)n.push({op:"lineTo",data:[r[s][0]+_t(i,e),r[s][1]+_t(i,e)]})}}return{type:"fillPath",ops:n}}function Tr(t,e){return(function(n,r){let i=n.fillStyle||"hachure";if(!Me[i])switch(i){case"zigzag":Me[i]||(Me[i]=new N6(r));break;case"cross-hatch":Me[i]||(Me[i]=new j6(r));break;case"dots":Me[i]||(Me[i]=new F6(r));break;case"dashed":Me[i]||(Me[i]=new B6(r));break;case"zigzag-line":Me[i]||(Me[i]=new W6(r));break;default:i="hachure",Me[i]||(Me[i]=new kl(r))}return Me[i]})(e,X6).fillPolygons(t,e)}function r0(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function i0(t){return t.randomizer||(t.randomizer=new V6(t.seed||0)),t.randomizer.next()}function zo(t,e,n,r=1){return n.roughness*r*(i0(n)*(e-t)+t)}function _t(t,e,n=1){return zo(-t,t,e,n)}function An(t,e,n,r,i,o=!1){const s=o?i.disableMultiStrokeFill:i.disableMultiStroke,a=Nl(t,e,n,r,i,!0,!1);if(s)return a;const l=Nl(t,e,n,r,i,!0,!0);return a.concat(l)}function Nl(t,e,n,r,i,o,s){const a=Math.pow(t-n,2)+Math.pow(e-r,2),l=Math.sqrt(a);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>a&&(h=l/10);const u=h/2,f=.2+.2*i0(i);let p=i.bowing*i.maxRandomnessOffset*(r-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-n)/200;p=_t(p,i,c),g=_t(g,i,c);const y=[],m=()=>_t(u,i,c),b=()=>_t(h,i,c),v=i.preserveVertices;return s?y.push({op:"move",data:[t+(v?0:m()),e+(v?0:m())]}):y.push({op:"move",data:[t+(v?0:_t(h,i,c)),e+(v?0:_t(h,i,c))]}),s?y.push({op:"bcurveTo",data:[p+t+(n-t)*f+m(),g+e+(r-e)*f+m(),p+t+2*(n-t)*f+m(),g+e+2*(r-e)*f+m(),n+(v?0:m()),r+(v?0:m())]}):y.push({op:"bcurveTo",data:[p+t+(n-t)*f+b(),g+e+(r-e)*f+b(),p+t+2*(n-t)*f+b(),g+e+2*(r-e)*f+b(),n+(v?0:b()),r+(v?0:b())]}),y}function Lo(t,e,n){if(!t.length)return[];const r=[];r.push([t[0][0]+_t(e,n),t[0][1]+_t(e,n)]),r.push([t[0][0]+_t(e,n),t[0][1]+_t(e,n)]);for(let i=1;i<t.length;i++)r.push([t[i][0]+_t(e,n),t[i][1]+_t(e,n)]),i===t.length-1&&r.push([t[i][0]+_t(e,n),t[i][1]+_t(e,n)]);return Ro(r,null,n)}function Ro(t,e,n){const r=t.length,i=[];if(r>3){const o=[],s=1-n.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let a=1;a+2<r;a++){const l=t[a];o[0]=[l[0],l[1]],o[1]=[l[0]+(s*t[a+1][0]-s*t[a-1][0])/6,l[1]+(s*t[a+1][1]-s*t[a-1][1])/6],o[2]=[t[a+1][0]+(s*t[a][0]-s*t[a+2][0])/6,t[a+1][1]+(s*t[a][1]-s*t[a+2][1])/6],o[3]=[t[a+1][0],t[a+1][1]],i.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else r===3?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):r===2&&i.push(...Nl(t[0][0],t[0][1],t[1][0],t[1][1],n,!0,!0));return i}function o0(t,e,n,r,i,o,s,a){const l=[],c=[];if(a.roughness===0){t/=4,c.push([e+r*Math.cos(-t),n+i*Math.sin(-t)]);for(let h=0;h<=2*Math.PI;h+=t){const u=[e+r*Math.cos(h),n+i*Math.sin(h)];l.push(u),c.push(u)}c.push([e+r*Math.cos(0),n+i*Math.sin(0)]),c.push([e+r*Math.cos(t),n+i*Math.sin(t)])}else{const h=_t(.5,a)-Math.PI/2;c.push([_t(o,a)+e+.9*r*Math.cos(h-t),_t(o,a)+n+.9*i*Math.sin(h-t)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=t){const p=[_t(o,a)+e+r*Math.cos(f),_t(o,a)+n+i*Math.sin(f)];l.push(p),c.push(p)}c.push([_t(o,a)+e+r*Math.cos(h+2*Math.PI+.5*s),_t(o,a)+n+i*Math.sin(h+2*Math.PI+.5*s)]),c.push([_t(o,a)+e+.98*r*Math.cos(h+s),_t(o,a)+n+.98*i*Math.sin(h+s)]),c.push([_t(o,a)+e+.9*r*Math.cos(h+.5*s),_t(o,a)+n+.9*i*Math.sin(h+.5*s)])}return[c,l]}function s0(t,e,n,r,i,o,s,a,l){const c=o+_t(.1,l),h=[];h.push([_t(a,l)+e+.9*r*Math.cos(c-t),_t(a,l)+n+.9*i*Math.sin(c-t)]);for(let u=c;u<=s;u+=t)h.push([_t(a,l)+e+r*Math.cos(u),_t(a,l)+n+i*Math.sin(u)]);return h.push([e+r*Math.cos(s),n+i*Math.sin(s)]),h.push([e+r*Math.cos(s),n+i*Math.sin(s)]),Ro(h,null,l)}function q6(t,e,n,r,i,o,s,a){const l=[],c=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let h=[0,0];const u=a.disableMultiStroke?1:2,f=a.preserveVertices;for(let p=0;p<u;p++)p===0?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(f?0:_t(c[0],a)),s[1]+(f?0:_t(c[0],a))]}),h=f?[i,o]:[i+_t(c[p],a),o+_t(c[p],a)],l.push({op:"bcurveTo",data:[t+_t(c[p],a),e+_t(c[p],a),n+_t(c[p],a),r+_t(c[p],a),h[0],h[1]]});return l}function ui(t){return[...t]}function a0(t,e=0){const n=t.length;if(n<3)throw new Error("A curve must have at least three points.");const r=[];if(n===3)r.push(ui(t[0]),ui(t[1]),ui(t[2]),ui(t[2]));else{const i=[];i.push(t[0],t[0]);for(let a=1;a<t.length;a++)i.push(t[a]),a===t.length-1&&i.push(t[a]);const o=[],s=1-e;r.push(ui(i[0]));for(let a=1;a+2<i.length;a++){const l=i[a];o[0]=[l[0],l[1]],o[1]=[l[0]+(s*i[a+1][0]-s*i[a-1][0])/6,l[1]+(s*i[a+1][1]-s*i[a-1][1])/6],o[2]=[i[a+1][0]+(s*i[a][0]-s*i[a+2][0])/6,i[a+1][1]+(s*i[a][1]-s*i[a+2][1])/6],o[3]=[i[a+1][0],i[a+1][1]],r.push(o[1],o[2],o[3])}}return r}function Ho(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function U6(t,e,n){const r=Ho(e,n);if(r===0)return Ho(t,e);let i=((t[0]-e[0])*(n[0]-e[0])+(t[1]-e[1])*(n[1]-e[1]))/r;return i=Math.max(0,Math.min(1,i)),Ho(t,Kn(e,n,i))}function Kn(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function jl(t,e,n,r){const i=r||[];if((function(a,l){const c=a[l+0],h=a[l+1],u=a[l+2],f=a[l+3];let p=3*h[0]-2*c[0]-f[0];p*=p;let g=3*h[1]-2*c[1]-f[1];g*=g;let y=3*u[0]-2*f[0]-c[0];y*=y;let m=3*u[1]-2*f[1]-c[1];return m*=m,p<y&&(p=y),g<m&&(g=m),p+g})(t,e)<n){const a=t[e+0];i.length?(o=i[i.length-1],s=a,Math.sqrt(Ho(o,s))>1&&i.push(a)):i.push(a),i.push(t[e+3])}else{const l=t[e+0],c=t[e+1],h=t[e+2],u=t[e+3],f=Kn(l,c,.5),p=Kn(c,h,.5),g=Kn(h,u,.5),y=Kn(f,p,.5),m=Kn(p,g,.5),b=Kn(y,m,.5);jl([l,f,y,b],0,n,i),jl([b,m,g,u],0,n,i)}var o,s;return i}function Z6(t,e){return Do(t,0,t.length,e)}function Do(t,e,n,r,i){const o=i||[],s=t[e],a=t[n-1];let l=0,c=1;for(let h=e+1;h<n-1;++h){const u=U6(t[h],s,a);u>l&&(l=u,c=h)}return Math.sqrt(l)>r?(Do(t,e,c+1,r,o),Do(t,c,n,r,o)):(o.length||o.push(s),o.push(a)),o}function Fl(t,e=.15,n){const r=[],i=(t.length-1)/3;for(let o=0;o<i;o++)jl(t,3*o,e,r);return n&&n>0?Do(r,0,r.length,n):r}const Le="none";class No{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*Xi(2,31))}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,n,r){return{shape:e,sets:n||[],options:r||this.defaultOptions}}line(e,n,r,i,o){const s=this._o(o);return this._d("line",[Qf(e,n,r,i,s)],s)}rectangle(e,n,r,i,o){const s=this._o(o),a=[],l=G6(e,n,r,i,s);if(s.fill){const c=[[e,n],[e+r,n],[e+r,n+i],[e,n+i]];s.fillStyle==="solid"?a.push(Dl([c],s)):a.push(Tr([c],s))}return s.stroke!==Le&&a.push(l),this._d("rectangle",a,s)}ellipse(e,n,r,i,o){const s=this._o(o),a=[],l=t0(r,i,s),c=Hl(e,n,s,l);if(s.fill)if(s.fillStyle==="solid"){const h=Hl(e,n,s,l).opset;h.type="fillPath",a.push(h)}else a.push(Tr([c.estimatedPoints],s));return s.stroke!==Le&&a.push(c.opset),this._d("ellipse",a,s)}circle(e,n,r,i){const o=this.ellipse(e,n,r,r,i);return o.shape="circle",o}linearPath(e,n){const r=this._o(n);return this._d("linearPath",[ko(e,!1,r)],r)}arc(e,n,r,i,o,s,a=!1,l){const c=this._o(l),h=[],u=e0(e,n,r,i,o,s,a,!0,c);if(a&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const p=e0(e,n,r,i,o,s,!0,!1,f);p.type="fillPath",h.push(p)}else h.push((function(f,p,g,y,m,b,v){const x=f,w=p;let _=Math.abs(g/2),$=Math.abs(y/2);_+=_t(.01*_,v),$+=_t(.01*$,v);let P=m,O=b;for(;P<0;)P+=2*Math.PI,O+=2*Math.PI;O-P>2*Math.PI&&(P=0,O=2*Math.PI);const T=(O-P)/v.curveStepCount,I=[];for(let S=P;S<=O;S+=T)I.push([x+_*Math.cos(S),w+$*Math.sin(S)]);return I.push([x+_*Math.cos(O),w+$*Math.sin(O)]),I.push([x,w]),Tr([I],v)})(e,n,r,i,o,s,c));return c.stroke!==Le&&h.push(u),this._d("arc",h,c)}curve(e,n){const r=this._o(n),i=[],o=Jf(e,r);if(r.fill&&r.fill!==Le)if(r.fillStyle==="solid"){const s=Jf(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],a=e;if(a.length){const l=typeof a[0][0]=="number"?[a]:a;for(const c of l)c.length<3?s.push(...c):c.length===3?s.push(...Fl(a0([c[0],c[0],c[1],c[2]]),10,(1+r.roughness)/2)):s.push(...Fl(a0(c),10,(1+r.roughness)/2))}s.length&&i.push(Tr([s],r))}return r.stroke!==Le&&i.push(o),this._d("curve",i,r)}polygon(e,n){const r=this._o(n),i=[],o=ko(e,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(Dl([e],r)):i.push(Tr([e],r))),r.stroke!==Le&&i.push(o),this._d("polygon",i,r)}path(e,n){const r=this._o(n),i=[];if(!e)return this._d("path",i,r);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=r.fill&&r.fill!=="transparent"&&r.fill!==Le,s=r.stroke!==Le,a=!!(r.simplification&&r.simplification<1),l=(function(h,u,f){const p=Zf(Uf(Rl(h))),g=[];let y=[],m=[0,0],b=[];const v=()=>{b.length>=4&&y.push(...Fl(b,u)),b=[]},x=()=>{v(),y.length&&(g.push(y),y=[])};for(const{key:_,data:$}of p)switch(_){case"M":x(),m=[$[0],$[1]],y.push(m);break;case"L":v(),y.push([$[0],$[1]]);break;case"C":if(!b.length){const P=y.length?y[y.length-1]:m;b.push([P[0],P[1]])}b.push([$[0],$[1]]),b.push([$[2],$[3]]),b.push([$[4],$[5]]);break;case"Z":v(),y.push([m[0],m[1]])}if(x(),!f)return g;const w=[];for(const _ of g){const $=Z6(_,f);$.length&&w.push($)}return w})(e,1,a?4-4*(r.simplification||1):(1+r.roughness)/2),c=n0(e,r);if(o)if(r.fillStyle==="solid")if(l.length===1){const h=n0(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else i.push(Dl(l,r));else i.push(Tr(l,r));return s&&(a?l.forEach((h=>{i.push(ko(h,!1,r))})):i.push(c)),this._d("path",i,r)}opsToPath(e,n){let r="";for(const i of e.ops){const o=typeof n=="number"&&n>=0?i.data.map((s=>+s.toFixed(n))):i.data;switch(i.op){case"move":r+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":r+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":r+=`L${o[0]} ${o[1]} `}}return r.trim()}toPaths(e){const n=e.sets||[],r=e.options||this.defaultOptions,i=[];for(const o of n){let s=null;switch(o.type){case"path":s={d:this.opsToPath(o),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:Le};break;case"fillPath":s={d:this.opsToPath(o),stroke:Le,strokeWidth:0,fill:r.fill||Le};break;case"fillSketch":s=this.fillSketch(o,r)}s&&i.push(s)}return i}fillSketch(e,n){let r=n.fillWeight;return r<0&&(r=n.strokeWidth/2),{d:this.opsToPath(e),stroke:n.fill||Le,strokeWidth:r,fill:Le}}_mergedShape(e){return e.filter(((n,r)=>r===0||n.op!=="move"))}}class K6{constructor(e,n){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new No(n)}draw(e){const n=e.sets||[],r=e.options||this.getDefaultOptions(),i=this.ctx,o=e.options.fixedDecimalPlaceDigits;for(const s of n)switch(s.type){case"path":i.save(),i.strokeStyle=r.stroke==="none"?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,s,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const a=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,o,a),i.restore();break}case"fillSketch":this.fillSketch(i,s,r)}}fillSketch(e,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),e.save(),r.fillLineDash&&e.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(e.lineDashOffset=r.fillLineDashOffset),e.strokeStyle=r.fill||"",e.lineWidth=i,this._drawToContext(e,n,r.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,n,r,i="nonzero"){e.beginPath();for(const o of n.ops){const s=typeof r=="number"&&r>=0?o.data.map((a=>+a.toFixed(r))):o.data;switch(o.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}n.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,n,r,i,o){const s=this.gen.line(e,n,r,i,o);return this.draw(s),s}rectangle(e,n,r,i,o){const s=this.gen.rectangle(e,n,r,i,o);return this.draw(s),s}ellipse(e,n,r,i,o){const s=this.gen.ellipse(e,n,r,i,o);return this.draw(s),s}circle(e,n,r,i){const o=this.gen.circle(e,n,r,i);return this.draw(o),o}linearPath(e,n){const r=this.gen.linearPath(e,n);return this.draw(r),r}polygon(e,n){const r=this.gen.polygon(e,n);return this.draw(r),r}arc(e,n,r,i,o,s,a=!1,l){const c=this.gen.arc(e,n,r,i,o,s,a,l);return this.draw(c),c}curve(e,n){const r=this.gen.curve(e,n);return this.draw(r),r}path(e,n){const r=this.gen.path(e,n);return this.draw(r),r}}const jo="http://www.w3.org/2000/svg";class Q6{constructor(e,n){this.svg=e,this.gen=new No(n)}draw(e){const n=e.sets||[],r=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(jo,"g"),s=e.options.fixedDecimalPlaceDigits;for(const a of n){let l=null;switch(a.type){case"path":l=i.createElementNS(jo,"path"),l.setAttribute("d",this.opsToPath(a,s)),l.setAttribute("stroke",r.stroke),l.setAttribute("stroke-width",r.strokeWidth+""),l.setAttribute("fill","none"),r.strokeLineDash&&l.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(jo,"path"),l.setAttribute("d",this.opsToPath(a,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",r.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,a,r)}l&&o.appendChild(l)}return o}fillSketch(e,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const o=e.createElementNS(jo,"path");return o.setAttribute("d",this.opsToPath(n,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,n){return this.gen.opsToPath(e,n)}line(e,n,r,i,o){const s=this.gen.line(e,n,r,i,o);return this.draw(s)}rectangle(e,n,r,i,o){const s=this.gen.rectangle(e,n,r,i,o);return this.draw(s)}ellipse(e,n,r,i,o){const s=this.gen.ellipse(e,n,r,i,o);return this.draw(s)}circle(e,n,r,i){const o=this.gen.circle(e,n,r,i);return this.draw(o)}linearPath(e,n){const r=this.gen.linearPath(e,n);return this.draw(r)}polygon(e,n){const r=this.gen.polygon(e,n);return this.draw(r)}arc(e,n,r,i,o,s,a=!1,l){const c=this.gen.arc(e,n,r,i,o,s,a,l);return this.draw(c)}curve(e,n){const r=this.gen.curve(e,n);return this.draw(r)}path(e,n){const r=this.gen.path(e,n);return this.draw(r)}}var J6={canvas:(t,e)=>new K6(t,e),svg:(t,e)=>new Q6(t,e),generator:t=>new No(t),newSeed:()=>No.newSeed()},t7=Object.defineProperty,l0=Object.getOwnPropertySymbols,e7=Object.prototype.hasOwnProperty,n7=Object.prototype.propertyIsEnumerable,c0=(t,e,n)=>e in t?t7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,r7=(t,e)=>{for(var n in e||(e={}))e7.call(e,n)&&c0(t,n,e[n]);if(l0)for(var n of l0(e))n7.call(e,n)&&c0(t,n,e[n]);return t};function i7(t,e,n){if(!t||!e){console.warn("Invalid node or svg element");return}const r=J6.svg(e,{options:{seed:1e3}}),i=wt("g");t.hasAttribute("transform")&&i.setAttribute("transform",t.getAttribute("transform")||"");const o=t.cloneNode();Yt(o,{opacity:.5}),o.hasAttribute("transform")&&o.removeAttribute("transform"),o.dataset.elementType="rough-volume",i.appendChild(o);const s=s7(r,t,n);if(s){const{element:l,svgAttributes:c}=s;l.dataset.elementType="rough-element",l.style.pointerEvents="none",o7(l,c),i.appendChild(l)}t.id&&(i.id=t.id),Array.from(t.classList).forEach(l=>{i.classList.contains(l)||i.classList.add(l)}),Array.from(t.attributes).forEach(l=>{l.name.startsWith("data-")&&i.setAttribute(l.name,l.value)}),i.childElementCount>0?t.replaceWith(i):t.remove()}function o7(t,e){e.opacity!==void 0&&t.setAttribute("opacity",String(e.opacity)),e.fillOpacity!==void 0&&t.setAttribute("fill-opacity",String(e.fillOpacity)),e.strokeOpacity!==void 0&&t.setAttribute("stroke-opacity",String(e.strokeOpacity)),e.strokeLinecap&&t.setAttribute("stroke-linecap",e.strokeLinecap),e.strokeLinejoin&&t.setAttribute("stroke-linejoin",e.strokeLinejoin),e.strokeDasharray&&t.setAttribute("stroke-dasharray",e.strokeDasharray),e.filter&&t.setAttribute("filter",e.filter),e.clipPath&&t.setAttribute("clip-path",e.clipPath),e.mask&&t.setAttribute("mask",e.mask)}function s7(t,e,n){const r=e.nodeName.toLowerCase(),i=(o,s)=>{const a=ke(o,[...s,"fill","fill-opacity","stroke","stroke-opacity","stroke-width","stroke-dasharray","stroke-linecap","stroke-linejoin","opacity","filter","clip-path","mask"],!0),l={},c=r7({},n),h={};s.forEach(P=>{a[P]!==void 0&&(l[P]=a[P])});const{fill:u,"fill-opacity":f,stroke:p,"stroke-opacity":g,"stroke-width":y,"stroke-dasharray":m,"stroke-linecap":b,"stroke-linejoin":v,opacity:x,filter:w,"clip-path":_,mask:$}=a;if(c.fill=u||"none",c.stroke=p||(u&&u!=="none"?u:"currentColor"),y&&(c.strokeWidth=parseFloat(y)),m&&m!=="none"){const P=m.split(/[\s,]+/).map(O=>parseFloat(O)).filter(O=>!isNaN(O));P.length>0&&(c.strokeLineDash=P)}return f&&(h.fillOpacity=parseFloat(f)),g&&(h.strokeOpacity=parseFloat(g)),x&&(h.opacity=parseFloat(x)),b&&(h.strokeLinecap=b),v&&(h.strokeLinejoin=v),m&&m!=="none"&&(h.strokeDasharray=m),w&&(h.filter=w),_&&(h.clipPath=_),$&&(h.mask=$),[l,c,h]};try{let o=null,s={};switch(r){case"circle":{const[a,l,c]=i(e,["cx","cy","r"]),h=parseFloat(a.cx)||0,u=parseFloat(a.cy)||0,f=parseFloat(a.r)||0;o=t.circle(h,u,f*2,l),s=c;break}case"ellipse":{const[a,l,c]=i(e,["cx","cy","rx","ry"]),h=parseFloat(a.cx)||0,u=parseFloat(a.cy)||0,f=parseFloat(a.rx)||0,p=parseFloat(a.ry)||0;o=t.ellipse(h,u,f*2,p*2,l),s=c;break}case"line":{const[a,l,c]=i(e,["x1","y1","x2","y2"]),h=parseFloat(a.x1)||0,u=parseFloat(a.y1)||0,f=parseFloat(a.x2)||0,p=parseFloat(a.y2)||0;o=t.line(h,u,f,p,l),s=c;break}case"rect":{const[a,l,c]=i(e,["x","y","width","height","rx","ry"]),h=parseFloat(a.x)||0,u=parseFloat(a.y)||0,f=parseFloat(a.width)||0,p=parseFloat(a.height)||0,g=parseFloat(a.rx)||0,y=parseFloat(a.ry)||0;if(g>0||y>0){const v=a7(h,u,f,p,g||y,y||g);o=t.path(v,l)}else o=t.rectangle(h,u,f,p,l);s=c;break}case"path":{const[a,l,c]=i(e,["d"]),h=a.d||"";if(!h)return console.warn("Path element has no d attribute"),null;o=t.path(h,l),s=c;break}case"polygon":{const[a,l,c]=i(e,["points"]),h=h0(a.points||"");if(h.length<3)return console.warn("Polygon needs at least 3 points"),null;o=t.polygon(h,l),s=c;break}case"polyline":{const[a,l,c]=i(e,["points"]),h=h0(a.points||"");if(h.length<2)return console.warn("Polyline needs at least 2 points"),null;o=t.linearPath(h,l),s=c;break}default:return console.warn(`Unsupported shape type: ${r}`),null}return o?{element:o,svgAttributes:s}:null}catch(o){return console.error(`Error creating rough shape for ${r}:`,o),null}}function a7(t,e,n,r,i,o){return i=Math.min(i,n/2),o=Math.min(o,r/2),`
19
+ </symbol>`);r&&(r.setAttribute("id",Mf),e.appendChild(r)),t.prepend(e)}function Sf(t,e){const{id:n,x:r=0,y:i=0,width:o=0,height:s=0}=ke(t,["id","x","y","width","height"]),a=wt("g",{id:n,class:"btn-group",transform:`translate(${r}, ${i})`}),l=t.getAttribute("data-items");l&&a.setAttribute("data-items",l);const c=Math.max(+o,+s)/2,h=wt("circle",{cx:c,cy:c,r:c,fill:"#fff",stroke:"transparent"});a.appendChild(h);const u=wt("use",{href:`#${e}`,width:o,height:s});a.appendChild(u),a.style.cursor="pointer",t.replaceWith(a)}function Qw(t){Sf(t,Of)}function Jw(t){Sf(t,Mf)}var t_=Object.defineProperty,Ef=Object.getOwnPropertySymbols,e_=Object.prototype.hasOwnProperty,n_=Object.prototype.propertyIsEnumerable,If=(t,e,n)=>e in t?t_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Il=(t,e)=>{for(var n in e||(e={}))e_.call(e,n)&&If(t,n,e[n]);if(Ef)for(var n of Ef(e))n_.call(e,n)&&If(t,n,e[n]);return t};function r_(t,e,n,r){var i;const o=n.icon;if(!o)return null;const{themeConfig:s}=r,a=Il({},(i=s.item)==null?void 0:i.icon),l=ci(e,a);return i_(t,e,o,l,n)}function i_(t,e,n,r,i){return uf(t,"icon",n,i),Ow(n,Il(Il({},ke(e,["id","x","y","width","height","fill","stroke","data-element-type","data-indexes"])),r))}var o_=Object.defineProperty,s_=Object.defineProperties,a_=Object.getOwnPropertyDescriptors,Oo=Object.getOwnPropertySymbols,Tf=Object.prototype.hasOwnProperty,Af=Object.prototype.propertyIsEnumerable,kf=(t,e,n)=>e in t?o_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mo=(t,e)=>{for(var n in e||(e={}))Tf.call(e,n)&&kf(t,n,e[n]);if(Oo)for(var n of Oo(e))Af.call(e,n)&&kf(t,n,e[n]);return t},Lf=(t,e)=>s_(t,a_(e)),l_=(t,e)=>{var n={};for(var r in t)Tf.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Oo)for(var r of Oo(t))e.indexOf(r)<0&&Af.call(t,r)&&(n[r]=t[r]);return n};function zf(t,e,n,r){if(!n)return null;const i=_o(n);if(!i)return null;const o=vl(i),s=h_(t,e,o);uf(t,"illus",i,r);const{data:a,color:l}=i;return d_(o,Mo(Lf(Mo({},u_(e)),{"clip-path":`url(#${s})`}),l?{color:l}:{}),a)}function c_(t,e,n){const r=n.illus;return zf(t,e,r,n)}function h_(t,e,n){const r=`clip-${n}-${X$()}`;if(t.querySelector(`#${r}`))return r;const i=bo(t),o=wt("clipPath",{id:r}),s=e.cloneNode();return w6(s,["id","data-illus-bounds","data-element-type"]),o.appendChild(s),i.appendChild(o),r}function d_(t,e,n){const r=e,{"clip-path":i}=r,o=l_(r,["clip-path"]),{x:s="0",y:a="0",width:l="0",height:c="0"}=o,h=wt("rect",{id:`${t}-volume`,"data-element-type":kt.IllusVolume,x:s,y:a,width:l,height:c,fill:"transparent"}),u=wt("g",{"data-element-type":kt.IllusGroup,"clip-path":i,id:`${t}-group`});u.appendChild(h);const f=wt("use",Lf(Mo({id:t,fill:"lightgray"},o),{href:cf(n),"data-element-type":kt.Illus}));return u.appendChild(f),u}function u_(t){const e=t.getAttribute("data-illus-bounds");if(!e)return Mo({x:"0",y:"0",width:"0",height:"0"},ke(t,["x","y","width","height"]));const[n,r,i,o]=e.split(" ");return{x:n,y:r,width:i,height:o}}function So(t){"@babel/helpers - typeof";return So=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},So(t)}var f_=/^\s+/,p_=/\s+$/;function rt(t,e){if(t=t||"",e=e||{},t instanceof rt)return t;if(!(this instanceof rt))return new rt(t,e);var n=g_(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}rt.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n,r,i,o,s,a;return n=e.r/255,r=e.g/255,i=e.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*s+.0722*a},setAlpha:function(e){return this._a=Ff(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Rf(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Rf(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=Hf(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Hf(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return Df(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return x_(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Jt(this._r,255)*100)+"%",g:Math.round(Jt(this._g,255)*100)+"%",b:Math.round(Jt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Jt(this._r,255)*100)+"%, "+Math.round(Jt(this._g,255)*100)+"%, "+Math.round(Jt(this._b,255)*100)+"%)":"rgba("+Math.round(Jt(this._r,255)*100)+"%, "+Math.round(Jt(this._g,255)*100)+"%, "+Math.round(Jt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:T_[Df(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n="#"+Nf(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(e){var o=rt(e);r="#"+Nf(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(e){var n=!!e;e=e||this._format;var r=!1,i=this._a<1&&this._a>=0,o=!n&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return rt(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification($_,arguments)},brighten:function(){return this._applyModification(P_,arguments)},darken:function(){return this._applyModification(C_,arguments)},desaturate:function(){return this._applyModification(b_,arguments)},saturate:function(){return this._applyModification(w_,arguments)},greyscale:function(){return this._applyModification(__,arguments)},spin:function(){return this._applyModification(O_,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(E_,arguments)},complement:function(){return this._applyCombination(M_,arguments)},monochromatic:function(){return this._applyCombination(I_,arguments)},splitcomplement:function(){return this._applyCombination(S_,arguments)},triad:function(){return this._applyCombination(jf,[3])},tetrad:function(){return this._applyCombination(jf,[4])}},rt.fromRatio=function(t,e){if(So(t)=="object"){var n={};for(var r in t)t.hasOwnProperty(r)&&(r==="a"?n[r]=t[r]:n[r]=hi(t[r]));t=n}return rt(t,e)};function g_(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,o=null,s=!1,a=!1;return typeof t=="string"&&(t=z_(t)),So(t)=="object"&&(yn(t.r)&&yn(t.g)&&yn(t.b)?(e=m_(t.r,t.g,t.b),s=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):yn(t.h)&&yn(t.s)&&yn(t.v)?(r=hi(t.s),i=hi(t.v),e=v_(t.h,r,i),s=!0,a="hsv"):yn(t.h)&&yn(t.s)&&yn(t.l)&&(r=hi(t.s),o=hi(t.l),e=y_(t.h,r,o),s=!0,a="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=Ff(n),{ok:s,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function m_(t,e,n){return{r:Jt(t,255)*255,g:Jt(e,255)*255,b:Jt(n,255)*255}}function Hf(t,e,n){t=Jt(t,255),e=Jt(e,255),n=Jt(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,s,a=(r+i)/2;if(r==i)o=s=0;else{var l=r-i;switch(s=a>.5?l/(2-r-i):l/(r+i),r){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s,l:a}}function y_(t,e,n){var r,i,o;t=Jt(t,360),e=Jt(e,100),n=Jt(n,100);function s(c,h,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?c+(h-c)*6*u:u<1/2?h:u<2/3?c+(h-c)*(2/3-u)*6:c}if(e===0)r=i=o=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=s(l,a,t+1/3),i=s(l,a,t),o=s(l,a,t-1/3)}return{r:r*255,g:i*255,b:o*255}}function Rf(t,e,n){t=Jt(t,255),e=Jt(e,255),n=Jt(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,s,a=r,l=r-i;if(s=r===0?0:l/r,r==i)o=0;else{switch(r){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s,v:a}}function v_(t,e,n){t=Jt(t,360)*6,e=Jt(e,100),n=Jt(n,100);var r=Math.floor(t),i=t-r,o=n*(1-e),s=n*(1-i*e),a=n*(1-(1-i)*e),l=r%6,c=[n,s,o,o,a,n][l],h=[a,n,n,s,o,o][l],u=[o,o,a,n,n,s][l];return{r:c*255,g:h*255,b:u*255}}function Df(t,e,n,r){var i=[Fe(Math.round(t).toString(16)),Fe(Math.round(e).toString(16)),Fe(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function x_(t,e,n,r,i){var o=[Fe(Math.round(t).toString(16)),Fe(Math.round(e).toString(16)),Fe(Math.round(n).toString(16)),Fe(Bf(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Nf(t,e,n,r){var i=[Fe(Bf(r)),Fe(Math.round(t).toString(16)),Fe(Math.round(e).toString(16)),Fe(Math.round(n).toString(16))];return i.join("")}rt.equals=function(t,e){return!t||!e?!1:rt(t).toRgbString()==rt(e).toRgbString()},rt.random=function(){return rt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function b_(t,e){e=e===0?0:e||10;var n=rt(t).toHsl();return n.s-=e/100,n.s=Eo(n.s),rt(n)}function w_(t,e){e=e===0?0:e||10;var n=rt(t).toHsl();return n.s+=e/100,n.s=Eo(n.s),rt(n)}function __(t){return rt(t).desaturate(100)}function $_(t,e){e=e===0?0:e||10;var n=rt(t).toHsl();return n.l+=e/100,n.l=Eo(n.l),rt(n)}function P_(t,e){e=e===0?0:e||10;var n=rt(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),rt(n)}function C_(t,e){e=e===0?0:e||10;var n=rt(t).toHsl();return n.l-=e/100,n.l=Eo(n.l),rt(n)}function O_(t,e){var n=rt(t).toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,rt(n)}function M_(t){var e=rt(t).toHsl();return e.h=(e.h+180)%360,rt(e)}function jf(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var n=rt(t).toHsl(),r=[rt(t)],i=360/e,o=1;o<e;o++)r.push(rt({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function S_(t){var e=rt(t).toHsl(),n=e.h;return[rt(t),rt({h:(n+72)%360,s:e.s,l:e.l}),rt({h:(n+216)%360,s:e.s,l:e.l})]}function E_(t,e,n){e=e||6,n=n||30;var r=rt(t).toHsl(),i=360/n,o=[rt(t)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(rt(r));return o}function I_(t,e){e=e||6;for(var n=rt(t).toHsv(),r=n.h,i=n.s,o=n.v,s=[],a=1/e;e--;)s.push(rt({h:r,s:i,v:o})),o=(o+a)%1;return s}rt.mix=function(t,e,n){n=n===0?0:n||50;var r=rt(t).toRgb(),i=rt(e).toRgb(),o=n/100,s={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return rt(s)},rt.readability=function(t,e){var n=rt(t),r=rt(e);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},rt.isReadable=function(t,e,n){var r=rt.readability(t,e),i,o;switch(o=!1,i=H_(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o},rt.mostReadable=function(t,e,n){var r=null,i=0,o,s,a,l;n=n||{},s=n.includeFallbackColors,a=n.level,l=n.size;for(var c=0;c<e.length;c++)o=rt.readability(t,e[c]),o>i&&(i=o,r=rt(e[c]));return rt.isReadable(t,r,{level:a,size:l})||!s?r:(n.includeFallbackColors=!1,rt.mostReadable(t,["#fff","#000"],n))};var Tl=rt.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},T_=rt.hexNames=A_(Tl);function A_(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function Ff(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Jt(t,e){k_(t)&&(t="100%");var n=L_(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function Eo(t){return Math.min(1,Math.max(0,t))}function Le(t){return parseInt(t,16)}function k_(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function L_(t){return typeof t=="string"&&t.indexOf("%")!=-1}function Fe(t){return t.length==1?"0"+t:""+t}function hi(t){return t<=1&&(t=t*100+"%"),t}function Bf(t){return Math.round(parseFloat(t)*255).toString(16)}function Wf(t){return Le(t)/255}var Be=(function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function yn(t){return!!Be.CSS_UNIT.exec(t)}function z_(t){t=t.replace(f_,"").replace(p_,"").toLowerCase();var e=!1;if(Tl[t])t=Tl[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Be.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=Be.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Be.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=Be.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Be.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=Be.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Be.hex8.exec(t))?{r:Le(n[1]),g:Le(n[2]),b:Le(n[3]),a:Wf(n[4]),format:e?"name":"hex8"}:(n=Be.hex6.exec(t))?{r:Le(n[1]),g:Le(n[2]),b:Le(n[3]),format:e?"name":"hex"}:(n=Be.hex4.exec(t))?{r:Le(n[1]+""+n[1]),g:Le(n[2]+""+n[2]),b:Le(n[3]+""+n[3]),a:Wf(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=Be.hex3.exec(t))?{r:Le(n[1]+""+n[1]),g:Le(n[2]+""+n[2]),b:Le(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function H_(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}var R_=Object.defineProperty,Vf=Object.getOwnPropertySymbols,D_=Object.prototype.hasOwnProperty,N_=Object.prototype.propertyIsEnumerable,Yf=(t,e,n)=>e in t?R_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j_=(t,e)=>{for(var n in e||(e={}))D_.call(e,n)&&Yf(t,n,e[n]);if(Vf)for(var n of Vf(e))N_.call(e,n)&&Yf(t,n,e[n]);return t};function Xf(t,e,n,r){const i=t.getAttribute(r),o=F_(i,n),{type:s,colors:a=[]}=o,l=a.length-1,c=a.map((p,g)=>typeof p=="string"?wt("stop",{offset:`${g/l}`,"stop-color":p}):wt("stop",{offset:`${p.offset}`,"stop-color":p.color})),h=B_(n);if(s==="linear-gradient"){const{angle:p=0}=o,[[g,y],[m,x]]=W_(p),v=wt("linearGradient",{id:h,x1:g,y1:y,x2:m,y2:x});c.forEach(b=>v.appendChild(b)),Gf(e,h,v)}else if(s==="radial-gradient"){const p=wt("radialGradient",{id:h});c.forEach(g=>p.appendChild(g)),Gf(e,h,p)}const u=t.getAttribute("fill"),f=t.getAttribute("stroke");Wn(u)&&t.setAttribute("fill",`url(#${h})`),Wn(f)&&t.setAttribute("stroke",`url(#${h})`)}function Gf(t,e,n){const r=bo(t);n.setAttribute("id",e);const i=r.querySelector(`#${e}`);i?i.replaceWith(n):r.appendChild(n)}function F_(t,e){var n;if((n=e.colors)!=null&&n.length||!t)return e;const r=rt(t),i=j_({},e);return i.colors=r.isDark()?[t,r.lighten(20).toHexString()]:[r.darken(20).toHexString(),t],!("angle"in e)&&i.type==="linear-gradient"&&(i.angle=225),i}function B_(t){const{type:e,colors:n=[]}=t,r=Cf(n.map(i=>typeof i=="string"?i:`${i.color}_${i.offset}`).join("-"));if(e==="linear-gradient"){const{angle:i=0}=t;return`${e}-${r}-${i}`}return`${e}-${r}`}function W_(t){const e=Math.PI/180*t,n=Math.cos(e),r=Math.sin(e);return[[.5-n/2,.5-r/2],[.5+n/2,.5+r/2]]}const V_=Object.freeze(Object.defineProperty({__proto__:null,diamond:({scale:t=.5,backgroundColor:e,foregroundColor:n})=>{const r=wt("pattern",{id:"pattern-diamond",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=wt("rect",{width:"100%",height:"100%",fill:e}),o=wt("path",{d:"M0,0 L20,20 M20,0 L0,20",stroke:n,"stroke-width":"1"});return r.appendChild(i),r.appendChild(o),r},dot:({scale:t=1,backgroundColor:e,foregroundColor:n})=>{const r=wt("pattern",{id:"pattern-dot",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=wt("rect",{width:"100%",height:"100%",fill:e}),o=wt("circle",{cx:"5",cy:"5",r:"3",fill:n}),s=wt("circle",{cx:"15",cy:"15",r:"3",fill:n});return r.appendChild(i),r.appendChild(o),r.appendChild(s),r},hex:({scale:t=.3,backgroundColor:e,foregroundColor:n})=>{const r=wt("pattern",{id:"pattern-hex",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=wt("rect",{width:"100%",height:"100%",fill:e}),o=wt("path",{d:"M10,0 L20,5 L20,15 L10,20 L0,15 L0,5 Z",fill:n});return r.appendChild(i),r.appendChild(o),r},line:({scale:t=1,backgroundColor:e,foregroundColor:n})=>{const o=wt("pattern",{id:"pattern-line",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),s=wt("rect",{width:"100%",height:"100%",fill:e}),a=wt("line",{x1:"7",y1:"-3",x2:"23",y2:"13",stroke:n,"stroke-width":6,"stroke-opacity":"0.5"}),l=wt("line",{x1:"-3",y1:"7",x2:"13",y2:"23",stroke:n,"stroke-width":6,"stroke-opacity":"0.5"});return o.appendChild(s),o.appendChild(a),o.appendChild(l),o},mosaic:({scale:t=1,backgroundColor:e="#ffffff",foregroundColor:n="#000000"})=>{const a=wt("pattern",{id:"pattern-mosaic",width:20,height:20,patternUnits:"userSpaceOnUse",patternTransform:`scale(${t})`}),l=wt("rect",{width:"100%",height:"100%",fill:e});a.appendChild(l);for(let c=0;c<4;c++)for(let h=0;h<4;h++)if((h+c)%2===0){const u=wt("rect",{x:h*5,y:c*5,width:5,height:5,fill:n});a.appendChild(u)}return a},square:({scale:t=.3,backgroundColor:e,foregroundColor:n})=>{const r=wt("pattern",{id:"pattern-square",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=wt("rect",{width:"100%",height:"100%",fill:e}),o=wt("path",{d:"M0,0 L20,0 L20,20 L0,20 Z",fill:n});return r.appendChild(i),r.appendChild(o),r}},Symbol.toStringTag,{value:"Module"}));var Y_=Object.defineProperty,Io=Object.getOwnPropertySymbols,qf=Object.prototype.hasOwnProperty,Uf=Object.prototype.propertyIsEnumerable,Zf=(t,e,n)=>e in t?Y_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Al=(t,e)=>{for(var n in e||(e={}))qf.call(e,n)&&Zf(t,n,e[n]);if(Io)for(var n of Io(e))Uf.call(e,n)&&Zf(t,n,e[n]);return t},X_=(t,e)=>{var n={};for(var r in t)qf.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Io)for(var r of Io(t))e.indexOf(r)<0&&Uf.call(t,r)&&(n[r]=t[r]);return n};const kl=new Map;function Kf(t,e){kl.has(t)&&console.warn(`Pattern ${t} will be overwritten`),kl.set(t,e)}for(const[t,e]of Object.entries(V_))Kf(t,e);function G_(t,e,n){const r=n.themeConfig.stylize;if(!r||r.type!=="pattern")return;const i=r,{pattern:o}=i,s=X_(i,["pattern"]),a=kl.get(o);if(!a)return console.warn(`Pattern ${o} not found`);const{fill:l}=ke(t,["fill","stroke"]),c=l,h=Al({backgroundColor:c&&rt(c).setAlpha(.5).toRgbString(),foregroundColor:c},s),u=U_(Al(Al({},r),h));q_(e,u,a(h)),Wn(l)&&(t.setAttribute("fill",`url(#${u})`),!t.getAttribute("stroke")&&l&&t.setAttribute("stroke",l))}function q_(t,e,n){const r=bo(t);n.setAttribute("id",e);const i=r.querySelector(`pattern#${e}`);i?i.replaceWith(n):r.appendChild(n)}function U_(t){const{pattern:e,foregroundColor:n="unset",backgroundColor:r="unset",scale:i="unset"}=t;return Cf(`pattern-${e}-${n}-${r}-${i}`)}function Ll(t,e,n){if(t&&t.length){const[r,i]=e,o=Math.PI/180*n,s=Math.cos(o),a=Math.sin(o);for(const l of t){const[c,h]=l;l[0]=(c-r)*s-(h-i)*a+r,l[1]=(c-r)*a+(h-i)*s+i}}}function Z_(t,e){return t[0]===e[0]&&t[1]===e[1]}function K_(t,e,n,r=1){const i=n,o=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,a=[0,0];if(i)for(const c of s)Ll(c,a,i);const l=(function(c,h,u){const f=[];for(const v of c){const b=[...v];Z_(b[0],b[b.length-1])||b.push([b[0][0],b[0][1]]),b.length>2&&f.push(b)}const p=[];h=Math.max(h,.1);const g=[];for(const v of f)for(let b=0;b<v.length-1;b++){const w=v[b],_=v[b+1];if(w[1]!==_[1]){const $=Math.min(w[1],_[1]);g.push({ymin:$,ymax:Math.max(w[1],_[1]),x:$===w[1]?w[0]:_[0],islope:(_[0]-w[0])/(_[1]-w[1])})}}if(g.sort(((v,b)=>v.ymin<b.ymin?-1:v.ymin>b.ymin?1:v.x<b.x?-1:v.x>b.x?1:v.ymax===b.ymax?0:(v.ymax-b.ymax)/Math.abs(v.ymax-b.ymax))),!g.length)return p;let y=[],m=g[0].ymin,x=0;for(;y.length||g.length;){if(g.length){let v=-1;for(let b=0;b<g.length&&!(g[b].ymin>m);b++)v=b;g.splice(0,v+1).forEach((b=>{y.push({s:m,edge:b})}))}if(y=y.filter((v=>!(v.edge.ymax<=m))),y.sort(((v,b)=>v.edge.x===b.edge.x?0:(v.edge.x-b.edge.x)/Math.abs(v.edge.x-b.edge.x))),(u!==1||x%h==0)&&y.length>1)for(let v=0;v<y.length;v+=2){const b=v+1;if(b>=y.length)break;const w=y[v].edge,_=y[b].edge;p.push([[Math.round(w.x),m],[Math.round(_.x),m]])}m+=u,y.forEach((v=>{v.edge.x=v.edge.x+u*v.edge.islope})),x++}return p})(s,o,r);if(i){for(const c of s)Ll(c,a,-i);(function(c,h,u){const f=[];c.forEach((p=>f.push(...p))),Ll(f,h,u)})(l,a,-i)}return l}function di(t,e){var n;const r=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let o=1;return e.roughness>=1&&(((n=e.randomizer)===null||n===void 0?void 0:n.next())||Math.random())>.7&&(o=i),K_(t,i,r,o||1)}class zl{constructor(e){this.helper=e}fillPolygons(e,n){return this._fillPolygons(e,n)}_fillPolygons(e,n){const r=di(e,n);return{type:"fillSketch",ops:this.renderLines(r,n)}}renderLines(e,n){const r=[];for(const i of e)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],n));return r}}function To(t){const e=t[0],n=t[1];return Math.sqrt(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))}let Q_=class extends zl{fillPolygons(e,n){let r=n.hachureGap;r<0&&(r=4*n.strokeWidth),r=Math.max(r,.1);const i=di(e,Object.assign({},n,{hachureGap:r})),o=Math.PI/180*n.hachureAngle,s=[],a=.5*r*Math.cos(o),l=.5*r*Math.sin(o);for(const[c,h]of i)To([c,h])&&s.push([[c[0]-a,c[1]+l],[...h]],[[c[0]+a,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,n)}}},J_=class extends zl{fillPolygons(e,n){const r=this._fillPolygons(e,n),i=Object.assign({},n,{hachureAngle:n.hachureAngle+90}),o=this._fillPolygons(e,i);return r.ops=r.ops.concat(o.ops),r}},t7=class{constructor(e){this.helper=e}fillPolygons(e,n){const r=di(e,n=Object.assign({},n,{hachureAngle:0}));return this.dotsOnLines(r,n)}dotsOnLines(e,n){const r=[];let i=n.hachureGap;i<0&&(i=4*n.strokeWidth),i=Math.max(i,.1);let o=n.fillWeight;o<0&&(o=n.strokeWidth/2);const s=i/4;for(const a of e){const l=To(a),c=l/i,h=Math.ceil(c)-1,u=l-h*i,f=(a[0][0]+a[1][0])/2-i/4,p=Math.min(a[0][1],a[1][1]);for(let g=0;g<h;g++){const y=p+u+g*i,m=f-s+2*Math.random()*s,x=y-s+2*Math.random()*s,v=this.helper.ellipse(m,x,o,o,n);r.push(...v.ops)}}return{type:"fillSketch",ops:r}}},e7=class{constructor(e){this.helper=e}fillPolygons(e,n){const r=di(e,n);return{type:"fillSketch",ops:this.dashedLine(r,n)}}dashedLine(e,n){const r=n.dashOffset<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashOffset,i=n.dashGap<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashGap,o=[];return e.forEach((s=>{const a=To(s),l=Math.floor(a/(r+i)),c=(a+i-l*(r+i))/2;let h=s[0],u=s[1];h[0]>u[0]&&(h=s[1],u=s[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let p=0;p<l;p++){const g=p*(r+i),y=g+r,m=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)],x=[h[0]+y*Math.cos(f)+c*Math.cos(f),h[1]+y*Math.sin(f)+c*Math.sin(f)];o.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],n))}})),o}};class n7{constructor(e){this.helper=e}fillPolygons(e,n){const r=n.hachureGap<0?4*n.strokeWidth:n.hachureGap,i=n.zigzagOffset<0?r:n.zigzagOffset,o=di(e,n=Object.assign({},n,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(o,i,n)}}zigzagLines(e,n,r){const i=[];return e.forEach((o=>{const s=To(o),a=Math.round(s/(2*n));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<a;u++){const f=2*u*n,p=2*(u+1)*n,g=Math.sqrt(2*Math.pow(n,2)),y=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],m=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],x=[y[0]+g*Math.cos(h+Math.PI/4),y[1]+g*Math.sin(h+Math.PI/4)];i.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r),...this.helper.doubleLineOps(x[0],x[1],m[0],m[1],r))}})),i}}const Me={};let r7=class{constructor(e){this.seed=e}next(){return this.seed?(Gi(2,31)-1&(this.seed=Math.imul(48271,this.seed)))/Gi(2,31):Math.random()}};const i7=0,Hl=1,Qf=2,Ao={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 Rl(t,e){return t.type===e}function Dl(t){const e=[],n=(function(s){const a=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))a[a.length]={type:i7,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];a[a.length]={type:Hl,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return a[a.length]={type:Qf,text:""},a})(t);let r="BOD",i=0,o=n[i];for(;!Rl(o,Qf);){let s=0;const a=[];if(r==="BOD"){if(o.text!=="M"&&o.text!=="m")return Dl("M0,0"+t);i++,s=Ao[o.text],r=o.text}else Rl(o,Hl)?s=Ao[r]:(i++,s=Ao[o.text],r=o.text);if(!(i+s<n.length))throw new Error("Path data ended short");for(let l=i;l<i+s;l++){const c=n[l];if(!Rl(c,Hl))throw new Error("Param not a number: "+r+","+c.text);a[a.length]=+c.text}if(typeof Ao[r]!="number")throw new Error("Bad segment: "+r);{const l={key:r,data:a};e.push(l),i+=s,o=n[i],r==="M"&&(r="L"),r==="m"&&(r="l")}}return e}function Jf(t){let e=0,n=0,r=0,i=0;const o=[];for(const{key:s,data:a}of t)switch(s){case"M":o.push({key:"M",data:[...a]}),[e,n]=a,[r,i]=a;break;case"m":e+=a[0],n+=a[1],o.push({key:"M",data:[e,n]}),r=e,i=n;break;case"L":o.push({key:"L",data:[...a]}),[e,n]=a;break;case"l":e+=a[0],n+=a[1],o.push({key:"L",data:[e,n]});break;case"C":o.push({key:"C",data:[...a]}),e=a[4],n=a[5];break;case"c":{const l=a.map(((c,h)=>h%2?c+n:c+e));o.push({key:"C",data:l}),e=l[4],n=l[5];break}case"Q":o.push({key:"Q",data:[...a]}),e=a[2],n=a[3];break;case"q":{const l=a.map(((c,h)=>h%2?c+n:c+e));o.push({key:"Q",data:l}),e=l[2],n=l[3];break}case"A":o.push({key:"A",data:[...a]}),e=a[5],n=a[6];break;case"a":e+=a[5],n+=a[6],o.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],e,n]});break;case"H":o.push({key:"H",data:[...a]}),e=a[0];break;case"h":e+=a[0],o.push({key:"H",data:[e]});break;case"V":o.push({key:"V",data:[...a]}),n=a[0];break;case"v":n+=a[0],o.push({key:"V",data:[n]});break;case"S":o.push({key:"S",data:[...a]}),e=a[2],n=a[3];break;case"s":{const l=a.map(((c,h)=>h%2?c+n:c+e));o.push({key:"S",data:l}),e=l[2],n=l[3];break}case"T":o.push({key:"T",data:[...a]}),e=a[0],n=a[1];break;case"t":e+=a[0],n+=a[1],o.push({key:"T",data:[e,n]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=r,n=i}return o}function t0(t){const e=[];let n="",r=0,i=0,o=0,s=0,a=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[r,i]=h,[o,s]=h;break;case"C":e.push({key:"C",data:[...h]}),r=h[4],i=h[5],a=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[r,i]=h;break;case"H":r=h[0],e.push({key:"L",data:[r,i]});break;case"V":i=h[0],e.push({key:"L",data:[r,i]});break;case"S":{let u=0,f=0;n==="C"||n==="S"?(u=r+(r-a),f=i+(i-l)):(u=r,f=i),e.push({key:"C",data:[u,f,...h]}),a=h[0],l=h[1],r=h[2],i=h[3];break}case"T":{const[u,f]=h;let p=0,g=0;n==="Q"||n==="T"?(p=r+(r-a),g=i+(i-l)):(p=r,g=i);const y=r+2*(p-r)/3,m=i+2*(g-i)/3,x=u+2*(p-u)/3,v=f+2*(g-f)/3;e.push({key:"C",data:[y,m,x,v,u,f]}),a=p,l=g,r=u,i=f;break}case"Q":{const[u,f,p,g]=h,y=r+2*(u-r)/3,m=i+2*(f-i)/3,x=p+2*(u-p)/3,v=g+2*(f-g)/3;e.push({key:"C",data:[y,m,x,v,p,g]}),a=u,l=f,r=p,i=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),p=h[2],g=h[3],y=h[4],m=h[5],x=h[6];u===0||f===0?(e.push({key:"C",data:[r,i,m,x,m,x]}),r=m,i=x):(r!==m||i!==x)&&(e0(r,i,m,x,u,f,p,g,y).forEach((function(v){e.push({key:"C",data:v})})),r=m,i=x);break}case"Z":e.push({key:"Z",data:[]}),r=o,i=s}n=c}return e}function ui(t,e,n){return[t*Math.cos(n)-e*Math.sin(n),t*Math.sin(n)+e*Math.cos(n)]}function e0(t,e,n,r,i,o,s,a,l,c){const h=(u=s,Math.PI*u/180);var u;let f=[],p=0,g=0,y=0,m=0;if(c)[p,g,y,m]=c;else{[t,e]=ui(t,e,-h),[n,r]=ui(n,r,-h);const O=(t-n)/2,A=(e-r)/2;let B=O*O/(i*i)+A*A/(o*o);B>1&&(B=Math.sqrt(B),i*=B,o*=B);const L=i*i,D=o*o,k=L*D-L*A*A-D*O*O,N=L*A*A+D*O*O,j=(a===l?-1:1)*Math.sqrt(Math.abs(k/N));y=j*i*A/o+(t+n)/2,m=j*-o*O/i+(e+r)/2,p=Math.asin(parseFloat(((e-m)/o).toFixed(9))),g=Math.asin(parseFloat(((r-m)/o).toFixed(9))),t<y&&(p=Math.PI-p),n<y&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let x=g-p;if(Math.abs(x)>120*Math.PI/180){const O=g,A=n,B=r;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=e0(n=y+i*Math.cos(g),r=m+o*Math.sin(g),A,B,i,o,s,0,l,[g,O,y,m])}x=g-p;const v=Math.cos(p),b=Math.sin(p),w=Math.cos(g),_=Math.sin(g),$=Math.tan(x/4),P=4/3*i*$,C=4/3*o*$,T=[t,e],E=[t+P*b,e-C*v],S=[n+P*_,r-C*w],R=[n,r];if(E[0]=2*T[0]-E[0],E[1]=2*T[1]-E[1],c)return[E,S,R].concat(f);{f=[E,S,R].concat(f);const O=[];for(let A=0;A<f.length;A+=3){const B=ui(f[A][0],f[A][1],h),L=ui(f[A+1][0],f[A+1][1],h),D=ui(f[A+2][0],f[A+2][1],h);O.push([B[0],B[1],L[0],L[1],D[0],D[1]])}return O}}const o7={randOffset:function(t,e){return _t(t,e)},randOffsetWithRange:function(t,e,n){return Lo(t,e,n)},ellipse:function(t,e,n,r,i){const o=i0(n,r,i);return Nl(t,e,i,o).opset},doubleLineOps:function(t,e,n,r,i){return An(t,e,n,r,i,!0)}};function n0(t,e,n,r,i){return{type:"path",ops:An(t,e,n,r,i)}}function ko(t,e,n){const r=(t||[]).length;if(r>2){const i=[];for(let o=0;o<r-1;o++)i.push(...An(t[o][0],t[o][1],t[o+1][0],t[o+1][1],n));return e&&i.push(...An(t[r-1][0],t[r-1][1],t[0][0],t[0][1],n)),{type:"path",ops:i}}return r===2?n0(t[0][0],t[0][1],t[1][0],t[1][1],n):{type:"path",ops:[]}}function s7(t,e,n,r,i){return(function(o,s){return ko(o,!0,s)})([[t,e],[t+n,e],[t+n,e+r],[t,e+r]],i)}function r0(t,e){if(t.length){const n=typeof t[0][0]=="number"?[t]:t,r=zo(n[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:zo(n[0],1.5*(1+.22*e.roughness),a0(e));for(let o=1;o<n.length;o++){const s=n[o];if(s.length){const a=zo(s,1*(1+.2*e.roughness),e),l=e.disableMultiStroke?[]:zo(s,1.5*(1+.22*e.roughness),a0(e));for(const c of a)c.op!=="move"&&r.push(c);for(const c of l)c.op!=="move"&&i.push(c)}}return{type:"path",ops:r.concat(i)}}return{type:"path",ops:[]}}function i0(t,e,n){const r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),o=2*Math.PI/i;let s=Math.abs(t/2),a=Math.abs(e/2);const l=1-n.curveFitting;return s+=_t(s*l,n),a+=_t(a*l,n),{increment:o,rx:s,ry:a}}function Nl(t,e,n,r){const[i,o]=c0(r.increment,t,e,r.rx,r.ry,1,r.increment*Lo(.1,Lo(.4,1,n),n),n);let s=Ho(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){const[a]=c0(r.increment,t,e,r.rx,r.ry,1.5,0,n),l=Ho(a,null,n);s=s.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:s}}}function o0(t,e,n,r,i,o,s,a,l){const c=t,h=e;let u=Math.abs(n/2),f=Math.abs(r/2);u+=_t(.01*u,l),f+=_t(.01*f,l);let p=i,g=o;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const y=2*Math.PI/l.curveStepCount,m=Math.min(y/2,(g-p)/2),x=h0(m,c,h,u,f,p,g,1,l);if(!l.disableMultiStroke){const v=h0(m,c,h,u,f,p,g,1.5,l);x.push(...v)}return s&&(a?x.push(...An(c,h,c+u*Math.cos(p),h+f*Math.sin(p),l),...An(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+f*Math.sin(p)]})),{type:"path",ops:x}}function s0(t,e){const n=t0(Jf(Dl(t))),r=[];let i=[0,0],o=[0,0];for(const{key:s,data:a}of n)switch(s){case"M":o=[a[0],a[1]],i=[a[0],a[1]];break;case"L":r.push(...An(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]];break;case"C":{const[l,c,h,u,f,p]=a;r.push(...a7(l,c,h,u,f,p,o,e)),o=[f,p];break}case"Z":r.push(...An(o[0],o[1],i[0],i[1],e)),o=[i[0],i[1]]}return{type:"path",ops:r}}function jl(t,e){const n=[];for(const r of t)if(r.length){const i=e.maxRandomnessOffset||0,o=r.length;if(o>2){n.push({op:"move",data:[r[0][0]+_t(i,e),r[0][1]+_t(i,e)]});for(let s=1;s<o;s++)n.push({op:"lineTo",data:[r[s][0]+_t(i,e),r[s][1]+_t(i,e)]})}}return{type:"fillPath",ops:n}}function Ir(t,e){return(function(n,r){let i=n.fillStyle||"hachure";if(!Me[i])switch(i){case"zigzag":Me[i]||(Me[i]=new Q_(r));break;case"cross-hatch":Me[i]||(Me[i]=new J_(r));break;case"dots":Me[i]||(Me[i]=new t7(r));break;case"dashed":Me[i]||(Me[i]=new e7(r));break;case"zigzag-line":Me[i]||(Me[i]=new n7(r));break;default:i="hachure",Me[i]||(Me[i]=new zl(r))}return Me[i]})(e,o7).fillPolygons(t,e)}function a0(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function l0(t){return t.randomizer||(t.randomizer=new r7(t.seed||0)),t.randomizer.next()}function Lo(t,e,n,r=1){return n.roughness*r*(l0(n)*(e-t)+t)}function _t(t,e,n=1){return Lo(-t,t,e,n)}function An(t,e,n,r,i,o=!1){const s=o?i.disableMultiStrokeFill:i.disableMultiStroke,a=Fl(t,e,n,r,i,!0,!1);if(s)return a;const l=Fl(t,e,n,r,i,!0,!0);return a.concat(l)}function Fl(t,e,n,r,i,o,s){const a=Math.pow(t-n,2)+Math.pow(e-r,2),l=Math.sqrt(a);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>a&&(h=l/10);const u=h/2,f=.2+.2*l0(i);let p=i.bowing*i.maxRandomnessOffset*(r-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-n)/200;p=_t(p,i,c),g=_t(g,i,c);const y=[],m=()=>_t(u,i,c),x=()=>_t(h,i,c),v=i.preserveVertices;return s?y.push({op:"move",data:[t+(v?0:m()),e+(v?0:m())]}):y.push({op:"move",data:[t+(v?0:_t(h,i,c)),e+(v?0:_t(h,i,c))]}),s?y.push({op:"bcurveTo",data:[p+t+(n-t)*f+m(),g+e+(r-e)*f+m(),p+t+2*(n-t)*f+m(),g+e+2*(r-e)*f+m(),n+(v?0:m()),r+(v?0:m())]}):y.push({op:"bcurveTo",data:[p+t+(n-t)*f+x(),g+e+(r-e)*f+x(),p+t+2*(n-t)*f+x(),g+e+2*(r-e)*f+x(),n+(v?0:x()),r+(v?0:x())]}),y}function zo(t,e,n){if(!t.length)return[];const r=[];r.push([t[0][0]+_t(e,n),t[0][1]+_t(e,n)]),r.push([t[0][0]+_t(e,n),t[0][1]+_t(e,n)]);for(let i=1;i<t.length;i++)r.push([t[i][0]+_t(e,n),t[i][1]+_t(e,n)]),i===t.length-1&&r.push([t[i][0]+_t(e,n),t[i][1]+_t(e,n)]);return Ho(r,null,n)}function Ho(t,e,n){const r=t.length,i=[];if(r>3){const o=[],s=1-n.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let a=1;a+2<r;a++){const l=t[a];o[0]=[l[0],l[1]],o[1]=[l[0]+(s*t[a+1][0]-s*t[a-1][0])/6,l[1]+(s*t[a+1][1]-s*t[a-1][1])/6],o[2]=[t[a+1][0]+(s*t[a][0]-s*t[a+2][0])/6,t[a+1][1]+(s*t[a][1]-s*t[a+2][1])/6],o[3]=[t[a+1][0],t[a+1][1]],i.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else r===3?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):r===2&&i.push(...Fl(t[0][0],t[0][1],t[1][0],t[1][1],n,!0,!0));return i}function c0(t,e,n,r,i,o,s,a){const l=[],c=[];if(a.roughness===0){t/=4,c.push([e+r*Math.cos(-t),n+i*Math.sin(-t)]);for(let h=0;h<=2*Math.PI;h+=t){const u=[e+r*Math.cos(h),n+i*Math.sin(h)];l.push(u),c.push(u)}c.push([e+r*Math.cos(0),n+i*Math.sin(0)]),c.push([e+r*Math.cos(t),n+i*Math.sin(t)])}else{const h=_t(.5,a)-Math.PI/2;c.push([_t(o,a)+e+.9*r*Math.cos(h-t),_t(o,a)+n+.9*i*Math.sin(h-t)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=t){const p=[_t(o,a)+e+r*Math.cos(f),_t(o,a)+n+i*Math.sin(f)];l.push(p),c.push(p)}c.push([_t(o,a)+e+r*Math.cos(h+2*Math.PI+.5*s),_t(o,a)+n+i*Math.sin(h+2*Math.PI+.5*s)]),c.push([_t(o,a)+e+.98*r*Math.cos(h+s),_t(o,a)+n+.98*i*Math.sin(h+s)]),c.push([_t(o,a)+e+.9*r*Math.cos(h+.5*s),_t(o,a)+n+.9*i*Math.sin(h+.5*s)])}return[c,l]}function h0(t,e,n,r,i,o,s,a,l){const c=o+_t(.1,l),h=[];h.push([_t(a,l)+e+.9*r*Math.cos(c-t),_t(a,l)+n+.9*i*Math.sin(c-t)]);for(let u=c;u<=s;u+=t)h.push([_t(a,l)+e+r*Math.cos(u),_t(a,l)+n+i*Math.sin(u)]);return h.push([e+r*Math.cos(s),n+i*Math.sin(s)]),h.push([e+r*Math.cos(s),n+i*Math.sin(s)]),Ho(h,null,l)}function a7(t,e,n,r,i,o,s,a){const l=[],c=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let h=[0,0];const u=a.disableMultiStroke?1:2,f=a.preserveVertices;for(let p=0;p<u;p++)p===0?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(f?0:_t(c[0],a)),s[1]+(f?0:_t(c[0],a))]}),h=f?[i,o]:[i+_t(c[p],a),o+_t(c[p],a)],l.push({op:"bcurveTo",data:[t+_t(c[p],a),e+_t(c[p],a),n+_t(c[p],a),r+_t(c[p],a),h[0],h[1]]});return l}function fi(t){return[...t]}function d0(t,e=0){const n=t.length;if(n<3)throw new Error("A curve must have at least three points.");const r=[];if(n===3)r.push(fi(t[0]),fi(t[1]),fi(t[2]),fi(t[2]));else{const i=[];i.push(t[0],t[0]);for(let a=1;a<t.length;a++)i.push(t[a]),a===t.length-1&&i.push(t[a]);const o=[],s=1-e;r.push(fi(i[0]));for(let a=1;a+2<i.length;a++){const l=i[a];o[0]=[l[0],l[1]],o[1]=[l[0]+(s*i[a+1][0]-s*i[a-1][0])/6,l[1]+(s*i[a+1][1]-s*i[a-1][1])/6],o[2]=[i[a+1][0]+(s*i[a][0]-s*i[a+2][0])/6,i[a+1][1]+(s*i[a][1]-s*i[a+2][1])/6],o[3]=[i[a+1][0],i[a+1][1]],r.push(o[1],o[2],o[3])}}return r}function Ro(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function l7(t,e,n){const r=Ro(e,n);if(r===0)return Ro(t,e);let i=((t[0]-e[0])*(n[0]-e[0])+(t[1]-e[1])*(n[1]-e[1]))/r;return i=Math.max(0,Math.min(1,i)),Ro(t,Kn(e,n,i))}function Kn(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function Bl(t,e,n,r){const i=r||[];if((function(a,l){const c=a[l+0],h=a[l+1],u=a[l+2],f=a[l+3];let p=3*h[0]-2*c[0]-f[0];p*=p;let g=3*h[1]-2*c[1]-f[1];g*=g;let y=3*u[0]-2*f[0]-c[0];y*=y;let m=3*u[1]-2*f[1]-c[1];return m*=m,p<y&&(p=y),g<m&&(g=m),p+g})(t,e)<n){const a=t[e+0];i.length?(o=i[i.length-1],s=a,Math.sqrt(Ro(o,s))>1&&i.push(a)):i.push(a),i.push(t[e+3])}else{const l=t[e+0],c=t[e+1],h=t[e+2],u=t[e+3],f=Kn(l,c,.5),p=Kn(c,h,.5),g=Kn(h,u,.5),y=Kn(f,p,.5),m=Kn(p,g,.5),x=Kn(y,m,.5);Bl([l,f,y,x],0,n,i),Bl([x,m,g,u],0,n,i)}var o,s;return i}function c7(t,e){return Do(t,0,t.length,e)}function Do(t,e,n,r,i){const o=i||[],s=t[e],a=t[n-1];let l=0,c=1;for(let h=e+1;h<n-1;++h){const u=l7(t[h],s,a);u>l&&(l=u,c=h)}return Math.sqrt(l)>r?(Do(t,e,c+1,r,o),Do(t,c,n,r,o)):(o.length||o.push(s),o.push(a)),o}function Wl(t,e=.15,n){const r=[],i=(t.length-1)/3;for(let o=0;o<i;o++)Bl(t,3*o,e,r);return n&&n>0?Do(r,0,r.length,n):r}const ze="none";class No{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*Gi(2,31))}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,n,r){return{shape:e,sets:n||[],options:r||this.defaultOptions}}line(e,n,r,i,o){const s=this._o(o);return this._d("line",[n0(e,n,r,i,s)],s)}rectangle(e,n,r,i,o){const s=this._o(o),a=[],l=s7(e,n,r,i,s);if(s.fill){const c=[[e,n],[e+r,n],[e+r,n+i],[e,n+i]];s.fillStyle==="solid"?a.push(jl([c],s)):a.push(Ir([c],s))}return s.stroke!==ze&&a.push(l),this._d("rectangle",a,s)}ellipse(e,n,r,i,o){const s=this._o(o),a=[],l=i0(r,i,s),c=Nl(e,n,s,l);if(s.fill)if(s.fillStyle==="solid"){const h=Nl(e,n,s,l).opset;h.type="fillPath",a.push(h)}else a.push(Ir([c.estimatedPoints],s));return s.stroke!==ze&&a.push(c.opset),this._d("ellipse",a,s)}circle(e,n,r,i){const o=this.ellipse(e,n,r,r,i);return o.shape="circle",o}linearPath(e,n){const r=this._o(n);return this._d("linearPath",[ko(e,!1,r)],r)}arc(e,n,r,i,o,s,a=!1,l){const c=this._o(l),h=[],u=o0(e,n,r,i,o,s,a,!0,c);if(a&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const p=o0(e,n,r,i,o,s,!0,!1,f);p.type="fillPath",h.push(p)}else h.push((function(f,p,g,y,m,x,v){const b=f,w=p;let _=Math.abs(g/2),$=Math.abs(y/2);_+=_t(.01*_,v),$+=_t(.01*$,v);let P=m,C=x;for(;P<0;)P+=2*Math.PI,C+=2*Math.PI;C-P>2*Math.PI&&(P=0,C=2*Math.PI);const T=(C-P)/v.curveStepCount,E=[];for(let S=P;S<=C;S+=T)E.push([b+_*Math.cos(S),w+$*Math.sin(S)]);return E.push([b+_*Math.cos(C),w+$*Math.sin(C)]),E.push([b,w]),Ir([E],v)})(e,n,r,i,o,s,c));return c.stroke!==ze&&h.push(u),this._d("arc",h,c)}curve(e,n){const r=this._o(n),i=[],o=r0(e,r);if(r.fill&&r.fill!==ze)if(r.fillStyle==="solid"){const s=r0(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],a=e;if(a.length){const l=typeof a[0][0]=="number"?[a]:a;for(const c of l)c.length<3?s.push(...c):c.length===3?s.push(...Wl(d0([c[0],c[0],c[1],c[2]]),10,(1+r.roughness)/2)):s.push(...Wl(d0(c),10,(1+r.roughness)/2))}s.length&&i.push(Ir([s],r))}return r.stroke!==ze&&i.push(o),this._d("curve",i,r)}polygon(e,n){const r=this._o(n),i=[],o=ko(e,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(jl([e],r)):i.push(Ir([e],r))),r.stroke!==ze&&i.push(o),this._d("polygon",i,r)}path(e,n){const r=this._o(n),i=[];if(!e)return this._d("path",i,r);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=r.fill&&r.fill!=="transparent"&&r.fill!==ze,s=r.stroke!==ze,a=!!(r.simplification&&r.simplification<1),l=(function(h,u,f){const p=t0(Jf(Dl(h))),g=[];let y=[],m=[0,0],x=[];const v=()=>{x.length>=4&&y.push(...Wl(x,u)),x=[]},b=()=>{v(),y.length&&(g.push(y),y=[])};for(const{key:_,data:$}of p)switch(_){case"M":b(),m=[$[0],$[1]],y.push(m);break;case"L":v(),y.push([$[0],$[1]]);break;case"C":if(!x.length){const P=y.length?y[y.length-1]:m;x.push([P[0],P[1]])}x.push([$[0],$[1]]),x.push([$[2],$[3]]),x.push([$[4],$[5]]);break;case"Z":v(),y.push([m[0],m[1]])}if(b(),!f)return g;const w=[];for(const _ of g){const $=c7(_,f);$.length&&w.push($)}return w})(e,1,a?4-4*(r.simplification||1):(1+r.roughness)/2),c=s0(e,r);if(o)if(r.fillStyle==="solid")if(l.length===1){const h=s0(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else i.push(jl(l,r));else i.push(Ir(l,r));return s&&(a?l.forEach((h=>{i.push(ko(h,!1,r))})):i.push(c)),this._d("path",i,r)}opsToPath(e,n){let r="";for(const i of e.ops){const o=typeof n=="number"&&n>=0?i.data.map((s=>+s.toFixed(n))):i.data;switch(i.op){case"move":r+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":r+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":r+=`L${o[0]} ${o[1]} `}}return r.trim()}toPaths(e){const n=e.sets||[],r=e.options||this.defaultOptions,i=[];for(const o of n){let s=null;switch(o.type){case"path":s={d:this.opsToPath(o),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:ze};break;case"fillPath":s={d:this.opsToPath(o),stroke:ze,strokeWidth:0,fill:r.fill||ze};break;case"fillSketch":s=this.fillSketch(o,r)}s&&i.push(s)}return i}fillSketch(e,n){let r=n.fillWeight;return r<0&&(r=n.strokeWidth/2),{d:this.opsToPath(e),stroke:n.fill||ze,strokeWidth:r,fill:ze}}_mergedShape(e){return e.filter(((n,r)=>r===0||n.op!=="move"))}}class h7{constructor(e,n){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new No(n)}draw(e){const n=e.sets||[],r=e.options||this.getDefaultOptions(),i=this.ctx,o=e.options.fixedDecimalPlaceDigits;for(const s of n)switch(s.type){case"path":i.save(),i.strokeStyle=r.stroke==="none"?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,s,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const a=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,o,a),i.restore();break}case"fillSketch":this.fillSketch(i,s,r)}}fillSketch(e,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),e.save(),r.fillLineDash&&e.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(e.lineDashOffset=r.fillLineDashOffset),e.strokeStyle=r.fill||"",e.lineWidth=i,this._drawToContext(e,n,r.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,n,r,i="nonzero"){e.beginPath();for(const o of n.ops){const s=typeof r=="number"&&r>=0?o.data.map((a=>+a.toFixed(r))):o.data;switch(o.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}n.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,n,r,i,o){const s=this.gen.line(e,n,r,i,o);return this.draw(s),s}rectangle(e,n,r,i,o){const s=this.gen.rectangle(e,n,r,i,o);return this.draw(s),s}ellipse(e,n,r,i,o){const s=this.gen.ellipse(e,n,r,i,o);return this.draw(s),s}circle(e,n,r,i){const o=this.gen.circle(e,n,r,i);return this.draw(o),o}linearPath(e,n){const r=this.gen.linearPath(e,n);return this.draw(r),r}polygon(e,n){const r=this.gen.polygon(e,n);return this.draw(r),r}arc(e,n,r,i,o,s,a=!1,l){const c=this.gen.arc(e,n,r,i,o,s,a,l);return this.draw(c),c}curve(e,n){const r=this.gen.curve(e,n);return this.draw(r),r}path(e,n){const r=this.gen.path(e,n);return this.draw(r),r}}const jo="http://www.w3.org/2000/svg";class d7{constructor(e,n){this.svg=e,this.gen=new No(n)}draw(e){const n=e.sets||[],r=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(jo,"g"),s=e.options.fixedDecimalPlaceDigits;for(const a of n){let l=null;switch(a.type){case"path":l=i.createElementNS(jo,"path"),l.setAttribute("d",this.opsToPath(a,s)),l.setAttribute("stroke",r.stroke),l.setAttribute("stroke-width",r.strokeWidth+""),l.setAttribute("fill","none"),r.strokeLineDash&&l.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(jo,"path"),l.setAttribute("d",this.opsToPath(a,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",r.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,a,r)}l&&o.appendChild(l)}return o}fillSketch(e,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const o=e.createElementNS(jo,"path");return o.setAttribute("d",this.opsToPath(n,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,n){return this.gen.opsToPath(e,n)}line(e,n,r,i,o){const s=this.gen.line(e,n,r,i,o);return this.draw(s)}rectangle(e,n,r,i,o){const s=this.gen.rectangle(e,n,r,i,o);return this.draw(s)}ellipse(e,n,r,i,o){const s=this.gen.ellipse(e,n,r,i,o);return this.draw(s)}circle(e,n,r,i){const o=this.gen.circle(e,n,r,i);return this.draw(o)}linearPath(e,n){const r=this.gen.linearPath(e,n);return this.draw(r)}polygon(e,n){const r=this.gen.polygon(e,n);return this.draw(r)}arc(e,n,r,i,o,s,a=!1,l){const c=this.gen.arc(e,n,r,i,o,s,a,l);return this.draw(c)}curve(e,n){const r=this.gen.curve(e,n);return this.draw(r)}path(e,n){const r=this.gen.path(e,n);return this.draw(r)}}var u7={canvas:(t,e)=>new h7(t,e),svg:(t,e)=>new d7(t,e),generator:t=>new No(t),newSeed:()=>No.newSeed()},f7=Object.defineProperty,u0=Object.getOwnPropertySymbols,p7=Object.prototype.hasOwnProperty,g7=Object.prototype.propertyIsEnumerable,f0=(t,e,n)=>e in t?f7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,m7=(t,e)=>{for(var n in e||(e={}))p7.call(e,n)&&f0(t,n,e[n]);if(u0)for(var n of u0(e))g7.call(e,n)&&f0(t,n,e[n]);return t};function y7(t,e,n){if(!t||!e){console.warn("Invalid node or svg element");return}const r=u7.svg(e,{options:{seed:1e3}}),i=wt("g");t.hasAttribute("transform")&&i.setAttribute("transform",t.getAttribute("transform")||"");const o=t.cloneNode();Yt(o,{opacity:.5}),o.hasAttribute("transform")&&o.removeAttribute("transform"),o.dataset.elementType="rough-volume",i.appendChild(o);const s=x7(r,t,n);if(s){const{element:l,svgAttributes:c}=s;l.dataset.elementType="rough-element",l.style.pointerEvents="none",v7(l,c),i.appendChild(l)}t.id&&(i.id=t.id),Array.from(t.classList).forEach(l=>{i.classList.contains(l)||i.classList.add(l)}),Array.from(t.attributes).forEach(l=>{l.name.startsWith("data-")&&i.setAttribute(l.name,l.value)}),i.childElementCount>0?t.replaceWith(i):t.remove()}function v7(t,e){e.opacity!==void 0&&t.setAttribute("opacity",String(e.opacity)),e.fillOpacity!==void 0&&t.setAttribute("fill-opacity",String(e.fillOpacity)),e.strokeOpacity!==void 0&&t.setAttribute("stroke-opacity",String(e.strokeOpacity)),e.strokeLinecap&&t.setAttribute("stroke-linecap",e.strokeLinecap),e.strokeLinejoin&&t.setAttribute("stroke-linejoin",e.strokeLinejoin),e.strokeDasharray&&t.setAttribute("stroke-dasharray",e.strokeDasharray),e.filter&&t.setAttribute("filter",e.filter),e.clipPath&&t.setAttribute("clip-path",e.clipPath),e.mask&&t.setAttribute("mask",e.mask)}function x7(t,e,n){const r=e.nodeName.toLowerCase(),i=(o,s)=>{const a=ke(o,[...s,"fill","fill-opacity","stroke","stroke-opacity","stroke-width","stroke-dasharray","stroke-linecap","stroke-linejoin","opacity","filter","clip-path","mask"],!0),l={},c=m7({},n),h={};s.forEach(P=>{a[P]!==void 0&&(l[P]=a[P])});const{fill:u,"fill-opacity":f,stroke:p,"stroke-opacity":g,"stroke-width":y,"stroke-dasharray":m,"stroke-linecap":x,"stroke-linejoin":v,opacity:b,filter:w,"clip-path":_,mask:$}=a;if(c.fill=u||"none",c.stroke=p||(u&&u!=="none"?u:"currentColor"),y&&(c.strokeWidth=parseFloat(y)),m&&m!=="none"){const P=m.split(/[\s,]+/).map(C=>parseFloat(C)).filter(C=>!isNaN(C));P.length>0&&(c.strokeLineDash=P)}return f&&(h.fillOpacity=parseFloat(f)),g&&(h.strokeOpacity=parseFloat(g)),b&&(h.opacity=parseFloat(b)),x&&(h.strokeLinecap=x),v&&(h.strokeLinejoin=v),m&&m!=="none"&&(h.strokeDasharray=m),w&&(h.filter=w),_&&(h.clipPath=_),$&&(h.mask=$),[l,c,h]};try{let o=null,s={};switch(r){case"circle":{const[a,l,c]=i(e,["cx","cy","r"]),h=parseFloat(a.cx)||0,u=parseFloat(a.cy)||0,f=parseFloat(a.r)||0;o=t.circle(h,u,f*2,l),s=c;break}case"ellipse":{const[a,l,c]=i(e,["cx","cy","rx","ry"]),h=parseFloat(a.cx)||0,u=parseFloat(a.cy)||0,f=parseFloat(a.rx)||0,p=parseFloat(a.ry)||0;o=t.ellipse(h,u,f*2,p*2,l),s=c;break}case"line":{const[a,l,c]=i(e,["x1","y1","x2","y2"]),h=parseFloat(a.x1)||0,u=parseFloat(a.y1)||0,f=parseFloat(a.x2)||0,p=parseFloat(a.y2)||0;o=t.line(h,u,f,p,l),s=c;break}case"rect":{const[a,l,c]=i(e,["x","y","width","height","rx","ry"]),h=parseFloat(a.x)||0,u=parseFloat(a.y)||0,f=parseFloat(a.width)||0,p=parseFloat(a.height)||0,g=parseFloat(a.rx)||0,y=parseFloat(a.ry)||0;if(g>0||y>0){const v=b7(h,u,f,p,g||y,y||g);o=t.path(v,l)}else o=t.rectangle(h,u,f,p,l);s=c;break}case"path":{const[a,l,c]=i(e,["d"]),h=a.d||"";if(!h)return console.warn("Path element has no d attribute"),null;o=t.path(h,l),s=c;break}case"polygon":{const[a,l,c]=i(e,["points"]),h=p0(a.points||"");if(h.length<3)return console.warn("Polygon needs at least 3 points"),null;o=t.polygon(h,l),s=c;break}case"polyline":{const[a,l,c]=i(e,["points"]),h=p0(a.points||"");if(h.length<2)return console.warn("Polyline needs at least 2 points"),null;o=t.linearPath(h,l),s=c;break}default:return console.warn(`Unsupported shape type: ${r}`),null}return o?{element:o,svgAttributes:s}:null}catch(o){return console.error(`Error creating rough shape for ${r}:`,o),null}}function b7(t,e,n,r,i,o){return i=Math.min(i,n/2),o=Math.min(o,r/2),`
20
20
  M ${t+i} ${e}
21
21
  L ${t+n-i} ${e}
22
22
  A ${i} ${o} 0 0 1 ${t+n} ${e+o}
@@ -27,7 +27,7 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
27
27
  L ${t} ${e+o}
28
28
  A ${i} ${o} 0 0 1 ${t+i} ${e}
29
29
  Z
30
- `.replace(/\s+/g," ").trim()}function h0(t){if(!t||typeof t!="string")return[];try{const n=t.trim().replace(/,/g," ").replace(/\s+/g," ").split(" ").filter(Boolean),r=[];for(let i=0;i<n.length-1;i+=2){const o=parseFloat(n[i]),s=parseFloat(n[i+1]);if(isNaN(o)||isNaN(s)){console.warn(`Invalid coordinate pair at index ${i}: "${n[i]}", "${n[i+1]}"`);continue}r.push([o,s])}return n.length%2!==0&&console.warn(`Odd number of coordinates in points attribute, last value ignored: "${n[n.length-1]}"`),r}catch(e){return console.error("Failed to parse polygon points:",t,e),[]}}function d0(t,e,n){var r;const{themeConfig:i}=n,o=Object.assign({},(r=i.base)==null?void 0:r.shape,i.shape),s=li(e,o);return Yt(e,s),c7(e,t,n),e}function l7(t,e){var n;Yt(t,((n=e.themeConfig.base)==null?void 0:n.shape)||{})}function c7(t,e,n){const r=n.themeConfig.stylize;if(!r)return t;const{type:i}=r;if(!i)return t;if(i==="rough")return i7(t,e,r);if(i==="pattern")return z6(t,e,n);if(i==="linear-gradient"||i==="radial-gradient"){const{fill:o,stroke:s}=ke(t,["fill","stroke"]);Wn(o)&&Bf(t,e,r,"fill"),Wn(s)&&Bf(t,e,r,"stroke");return}}function h7(t,e){var n;const{themeConfig:r}=e,{"font-family":i=$l}=((n=r.base)==null?void 0:n.text)||{};t.setAttribute("font-family",i)}var d7=/\s/;function u7(t){for(var e=t.length;e--&&d7.test(t.charAt(e)););return e}var f7=/^\s+/;function p7(t){return t&&t.slice(0,u7(t)+1).replace(f7,"")}var u0=NaN,g7=/^[-+]0x[0-9a-f]+$/i,m7=/^0b[01]+$/i,y7=/^0o[0-7]+$/i,v7=parseInt;function Bl(t){if(typeof t=="number")return t;if(mo(t))return u0;if(nn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=nn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=p7(t);var n=m7.test(t);return n||y7.test(t)?v7(t.slice(2),n?2:8):g7.test(t)?u0:+t}function f0(t){return t}var Wl=Xn(en,"WeakMap"),p0=Object.create,b7=(function(){function t(){}return function(e){if(!nn(e))return{};if(p0)return p0(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function x7(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function w7(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var _7=800,$7=16,P7=Date.now;function O7(t){var e=0,n=0;return function(){var r=P7(),i=$7-(r-n);if(n=r,i>0){if(++e>=_7)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function C7(t){return function(){return t}}var Fo=(function(){try{var t=Xn(Object,"defineProperty");return t({},"",{}),t}catch(e){}})(),M7=Fo?function(t,e){return Fo(t,"toString",{configurable:!0,enumerable:!1,value:C7(e),writable:!0})}:f0,S7=O7(M7);function E7(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var I7=9007199254740991,T7=/^(?:0|[1-9]\d*)$/;function g0(t,e){var n=typeof t;return e=e==null?I7:e,!!e&&(n=="number"||n!="symbol"&&T7.test(t))&&t>-1&&t%1==0&&t<e}function Vl(t,e,n){e=="__proto__"&&Fo?Fo(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var A7=Object.prototype,k7=A7.hasOwnProperty;function m0(t,e,n){var r=t[e];(!(k7.call(t,e)&&yo(r,n))||n===void 0&&!(e in t))&&Vl(t,e,n)}function z7(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=void 0;l===void 0&&(l=t[a]),i?Vl(n,a,l):m0(n,a,l)}return n}var y0=Math.max;function L7(t,e,n){return e=y0(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=y0(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(s),x7(t,this,a)}}function R7(t,e){return S7(L7(t,e,f0),t+"")}var H7=9007199254740991;function v0(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=H7}function Bo(t){return t!=null&&v0(t.length)&&!ol(t)}function D7(t,e,n){if(!nn(n))return!1;var r=typeof e;return(r=="number"?Bo(n)&&g0(e,n.length):r=="string"&&e in n)?yo(n[e],t):!1}function N7(t){return R7(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,s&&D7(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,o)}return e})}var j7=Object.prototype;function Yl(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||j7;return t===n}function F7(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var B7="[object Arguments]";function b0(t){return En(t)&&Vn(t)==B7}var x0=Object.prototype,W7=x0.hasOwnProperty,V7=x0.propertyIsEnumerable,Xl=b0((function(){return arguments})())?b0:function(t){return En(t)&&W7.call(t,"callee")&&!V7.call(t,"callee")};function Y7(){return!1}var w0=typeof F=="object"&&F&&!F.nodeType&&F,_0=w0&&typeof module=="object"&&module&&!module.nodeType&&module,X7=_0&&_0.exports===w0,$0=X7?en.Buffer:void 0,G7=$0?$0.isBuffer:void 0,Gl=G7||Y7,q7="[object Arguments]",U7="[object Array]",Z7="[object Boolean]",K7="[object Date]",Q7="[object Error]",J7="[object Function]",t9="[object Map]",e9="[object Number]",n9="[object Object]",r9="[object RegExp]",i9="[object Set]",o9="[object String]",s9="[object WeakMap]",a9="[object ArrayBuffer]",l9="[object DataView]",c9="[object Float32Array]",h9="[object Float64Array]",d9="[object Int8Array]",u9="[object Int16Array]",f9="[object Int32Array]",p9="[object Uint8Array]",g9="[object Uint8ClampedArray]",m9="[object Uint16Array]",y9="[object Uint32Array]",Zt={};Zt[c9]=Zt[h9]=Zt[d9]=Zt[u9]=Zt[f9]=Zt[p9]=Zt[g9]=Zt[m9]=Zt[y9]=!0,Zt[q7]=Zt[U7]=Zt[a9]=Zt[Z7]=Zt[l9]=Zt[K7]=Zt[Q7]=Zt[J7]=Zt[t9]=Zt[e9]=Zt[n9]=Zt[r9]=Zt[i9]=Zt[o9]=Zt[s9]=!1;function v9(t){return En(t)&&v0(t.length)&&!!Zt[Vn(t)]}function ql(t){return function(e){return t(e)}}var P0=typeof F=="object"&&F&&!F.nodeType&&F,fi=P0&&typeof module=="object"&&module&&!module.nodeType&&module,b9=fi&&fi.exports===P0,Ul=b9&&cu.process,Ar=(function(){try{var t=fi&&fi.require&&fi.require("util").types;return t||Ul&&Ul.binding&&Ul.binding("util")}catch(e){}})(),O0=Ar&&Ar.isTypedArray,C0=O0?ql(O0):v9,x9=Object.prototype,w9=x9.hasOwnProperty;function M0(t,e){var n=Mn(t),r=!n&&Xl(t),i=!n&&!r&&Gl(t),o=!n&&!r&&!i&&C0(t),s=n||r||i||o,a=s?F7(t.length,String):[],l=a.length;for(var c in t)(e||w9.call(t,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||g0(c,l)))&&a.push(c);return a}function S0(t,e){return function(n){return t(e(n))}}var _9=S0(Object.keys,Object),$9=Object.prototype,P9=$9.hasOwnProperty;function O9(t){if(!Yl(t))return _9(t);var e=[];for(var n in Object(t))P9.call(t,n)&&n!="constructor"&&e.push(n);return e}function C9(t){return Bo(t)?M0(t):O9(t)}function M9(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var S9=Object.prototype,E9=S9.hasOwnProperty;function I9(t){if(!nn(t))return M9(t);var e=Yl(t),n=[];for(var r in t)r=="constructor"&&(e||!E9.call(t,r))||n.push(r);return n}function E0(t){return Bo(t)?M0(t,!0):I9(t)}function T9(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var I0=S0(Object.getPrototypeOf,Object),A9="[object Object]",k9=Function.prototype,z9=Object.prototype,T0=k9.toString,L9=z9.hasOwnProperty,R9=T0.call(Object);function H9(t){if(!En(t)||Vn(t)!=A9)return!1;var e=I0(t);if(e===null)return!0;var n=L9.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&T0.call(n)==R9}function D9(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function N9(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=Bl(n),n=n===n?n:0),e!==void 0&&(e=Bl(e),e=e===e?e:0),D9(Bl(t),e,n)}function j9(){this.__data__=new gn,this.size=0}function F9(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function B9(t){return this.__data__.get(t)}function W9(t){return this.__data__.has(t)}var V9=200;function Y9(t,e){var n=this.__data__;if(n instanceof gn){var r=n.__data__;if(!ri||r.length<V9-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new In(r)}return n.set(t,e),this.size=n.size,this}function Qn(t){var e=this.__data__=new gn(t);this.size=e.size}Qn.prototype.clear=j9,Qn.prototype.delete=F9,Qn.prototype.get=B9,Qn.prototype.has=W9,Qn.prototype.set=Y9;var A0=typeof F=="object"&&F&&!F.nodeType&&F,k0=A0&&typeof module=="object"&&module&&!module.nodeType&&module,X9=k0&&k0.exports===A0,z0=X9?en.Buffer:void 0,L0=z0?z0.allocUnsafe:void 0;function R0(t,e){if(e)return t.slice();var n=t.length,r=L0?L0(n):new t.constructor(n);return t.copy(r),r}function G9(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function q9(){return[]}var U9=Object.prototype,Z9=U9.propertyIsEnumerable,H0=Object.getOwnPropertySymbols,K9=H0?function(t){return t==null?[]:(t=Object(t),G9(H0(t),function(e){return Z9.call(t,e)}))}:q9;function Q9(t,e,n){var r=e(t);return Mn(t)?r:T9(r,n(t))}function J9(t){return Q9(t,C9,K9)}var Zl=Xn(en,"DataView"),Kl=Xn(en,"Promise"),Ql=Xn(en,"Set"),D0="[object Map]",t8="[object Object]",N0="[object Promise]",j0="[object Set]",F0="[object WeakMap]",B0="[object DataView]",e8=Yn(Zl),n8=Yn(ri),r8=Yn(Kl),i8=Yn(Ql),o8=Yn(Wl),vn=Vn;(Zl&&vn(new Zl(new ArrayBuffer(1)))!=B0||ri&&vn(new ri)!=D0||Kl&&vn(Kl.resolve())!=N0||Ql&&vn(new Ql)!=j0||Wl&&vn(new Wl)!=F0)&&(vn=function(t){var e=Vn(t),n=e==t8?t.constructor:void 0,r=n?Yn(n):"";if(r)switch(r){case e8:return B0;case n8:return D0;case r8:return N0;case i8:return j0;case o8:return F0}return e});var s8=Object.prototype,a8=s8.hasOwnProperty;function l8(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&a8.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var W0=en.Uint8Array;function Jl(t){var e=new t.constructor(t.byteLength);return new W0(e).set(new W0(t)),e}function c8(t,e){var n=Jl(t.buffer);return new t.constructor(n,t.byteOffset,t.byteLength)}var h8=/\w*$/;function d8(t){var e=new t.constructor(t.source,h8.exec(t));return e.lastIndex=t.lastIndex,e}var V0=Sn?Sn.prototype:void 0,Y0=V0?V0.valueOf:void 0;function u8(t){return Y0?Object(Y0.call(t)):{}}function X0(t,e){var n=e?Jl(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var f8="[object Boolean]",p8="[object Date]",g8="[object Map]",m8="[object Number]",y8="[object RegExp]",v8="[object Set]",b8="[object String]",x8="[object Symbol]",w8="[object ArrayBuffer]",_8="[object DataView]",$8="[object Float32Array]",P8="[object Float64Array]",O8="[object Int8Array]",C8="[object Int16Array]",M8="[object Int32Array]",S8="[object Uint8Array]",E8="[object Uint8ClampedArray]",I8="[object Uint16Array]",T8="[object Uint32Array]";function A8(t,e,n){var r=t.constructor;switch(e){case w8:return Jl(t);case f8:case p8:return new r(+t);case _8:return c8(t);case $8:case P8:case O8:case C8:case M8:case S8:case E8:case I8:case T8:return X0(t,n);case g8:return new r;case m8:case b8:return new r(t);case y8:return d8(t);case v8:return new r;case x8:return u8(t)}}function G0(t){return typeof t.constructor=="function"&&!Yl(t)?b7(I0(t)):{}}var k8="[object Map]";function z8(t){return En(t)&&vn(t)==k8}var q0=Ar&&Ar.isMap,L8=q0?ql(q0):z8,R8="[object Set]";function H8(t){return En(t)&&vn(t)==R8}var U0=Ar&&Ar.isSet,D8=U0?ql(U0):H8,N8=1,Z0="[object Arguments]",j8="[object Array]",F8="[object Boolean]",B8="[object Date]",W8="[object Error]",K0="[object Function]",V8="[object GeneratorFunction]",Y8="[object Map]",X8="[object Number]",Q0="[object Object]",G8="[object RegExp]",q8="[object Set]",U8="[object String]",Z8="[object Symbol]",K8="[object WeakMap]",Q8="[object ArrayBuffer]",J8="[object DataView]",t$="[object Float32Array]",e$="[object Float64Array]",n$="[object Int8Array]",r$="[object Int16Array]",i$="[object Int32Array]",o$="[object Uint8Array]",s$="[object Uint8ClampedArray]",a$="[object Uint16Array]",l$="[object Uint32Array]",qt={};qt[Z0]=qt[j8]=qt[Q8]=qt[J8]=qt[F8]=qt[B8]=qt[t$]=qt[e$]=qt[n$]=qt[r$]=qt[i$]=qt[Y8]=qt[X8]=qt[Q0]=qt[G8]=qt[q8]=qt[U8]=qt[Z8]=qt[o$]=qt[s$]=qt[a$]=qt[l$]=!0,qt[W8]=qt[K0]=qt[K8]=!1;function Wo(t,e,n,r,i,o){var s,a=e&N8;if(s!==void 0)return s;if(!nn(t))return t;var l=Mn(t);if(l)s=l8(t);else{var c=vn(t),h=c==K0||c==V8;if(Gl(t))return R0(t,a);if(c==Q0||c==Z0||h&&!i)s=h?{}:G0(t);else{if(!qt[c])return i?t:{};s=A8(t,c,a)}}o||(o=new Qn);var u=o.get(t);if(u)return u;o.set(t,s),D8(t)?t.forEach(function(g){s.add(Wo(g,e,n,g,t,o))}):L8(t)&&t.forEach(function(g,y){s.set(y,Wo(g,e,n,y,t,o))});var f=J9,p=l?void 0:f(t);return E7(p||t,function(g,y){p&&(y=g,g=t[y]),m0(s,y,Wo(g,e,n,y,t,o))}),s}var c$=1,h$=4;function J0(t){return Wo(t,c$|h$)}function d$(t){return function(e,n,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[++i];if(n(o[l],l,o)===!1)break}return e}}var u$=d$();function tc(t,e,n){(n!==void 0&&!yo(t[e],n)||n===void 0&&!(e in t))&&Vl(t,e,n)}function f$(t){return En(t)&&Bo(t)}function ec(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function p$(t){return z7(t,E0(t))}function g$(t,e,n,r,i,o,s){var a=ec(t,n),l=ec(e,n),c=s.get(l);if(c){tc(t,n,c);return}var h=o?o(a,l,n+"",t,e,s):void 0,u=h===void 0;if(u){var f=Mn(l),p=!f&&Gl(l),g=!f&&!p&&C0(l);h=l,f||p||g?Mn(a)?h=a:f$(a)?h=w7(a):p?(u=!1,h=R0(l,!0)):g?(u=!1,h=X0(l,!0)):h=[]:H9(l)||Xl(l)?(h=a,Xl(a)?h=p$(a):(!nn(a)||ol(a))&&(h=G0(l))):u=!1}u&&(s.set(l,h),i(h,l,r,o,s),s.delete(l)),tc(t,n,h)}function tp(t,e,n,r,i){t!==e&&u$(e,function(o,s){if(i||(i=new Qn),nn(o))g$(t,e,s,n,tp,r,i);else{var a=r?r(ec(t,s),o,s+"",t,e,i):void 0;a===void 0&&(a=o),tc(t,s,a)}},E0)}var m$=Bu(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),ep=N7(function(t,e,n){tp(t,e,n)});function nc(t,e,n={}){if(!e)return null;const r=t,i=li(r,n);Yt(r,i);const o=b$(e,r);for(const s in r.dataset)o.setAttribute(`data-${m$(s)}`,r.dataset[s]);return o}function y$(t,e,n){var r,i;const o=e.nodeName==="text"?e:null;if(!o)return null;const{data:s,themeConfig:a}=n,l=df(e.dataset.indexes||"0"),c=String(mu(Pr(s,l),t,"")),h=Object.assign({},(r=a.base)==null?void 0:r.text,(i=a.item)==null?void 0:i[t]),u=li(o,h);return nc(e,e.textContent||c,u)}function v$(t,e){var n;const r=((n=e.themeConfig.base)==null?void 0:n.text)||{};Yt(t,r),r["font-family"]&&t.setAttribute("font-family",Un(r["font-family"])),t.style.userSelect="none",t.style.pointerEvents="none"}const Vo=(t,e)=>t?parseFloat(t):e;function b$(t,e){const n=Vo(e.dataset.x,0),r=Vo(e.dataset.y,0),i=Vo(e.getAttribute("width")),o=Vo(e.getAttribute("height")),s=x$(e);return Object.assign(s,{x:n,y:r,width:i,height:o,"data-horizontal-align":e.dataset.horizontalAlign||"LEFT","data-vertical-align":e.dataset.verticalAlign||"TOP"}),p4(t,s)}function x$(t){return ke(t,["font-family","font-size","font-weight","font-style","font-variant","letter-spacing","line-height","fill","stroke","stroke-width"])}const Jn=(t,e)=>{t!==e&&(e?t.replaceWith(e):t.remove())};class w${constructor(e,n){this.options=e,this.template=n,this.rendered=!1}getOptions(){return this.options}getSVG(){return this.template}render(){const e=this.getSVG();if(this.rendered)return e;_$(e,this.options),e.style.visibility="hidden";const n=new MutationObserver(r=>{r.forEach(i=>{i.addedNodes.forEach(o=>{(o===e||o.contains(e))&&(O$(this.template,this.options),z5(this.template),n.disconnect(),e.style.visibility="")})})});return n.observe(document,{childList:!0,subtree:!0}),this.rendered=!0,e}}function _$(t,e){$$(t,e),P$(t,e);const{themeConfig:n}=e;L5(t,n==null?void 0:n.colorBg)}function $$(t,e){var n;const{themeConfig:r,data:i}=e;R5(t,(n=r.base)==null?void 0:n.global),t.querySelectorAll("[data-element-type]").forEach(s=>{var a,l,c,h,u,f;const p=s.id||"";if(b4(s)){const g=nc(s,i.title||"",Object.assign({},(a=r.base)==null?void 0:a.text,r.title));return Jn(s,g)}if(x4(s)){const g=nc(s,i.desc||"",Object.assign({},(l=r.base)==null?void 0:l.text,r.desc));return Jn(s,g)}if($4(s)){const g=Tf(t,s,(c=i.illus)==null?void 0:c[p]);return Jn(s,g)}if(_4(s))return Array.from(s.children).forEach(g=>{d0(t,g,e)});if(w4(s)){const g=d0(t,s,e);return Jn(s,g)}if(T4(s))return H5(t,s);if((h=s.dataset.elementType)!=null&&h.startsWith("item-")){const g=df(s.dataset.indexes||"0"),y=s.dataset.elementType.replace("item-","");if(C4(s)||M4(s)||S4(s)){const m=y$(y,s,e);return Jn(s,m)}if(E4(s)){const m=Tf(t,s,(u=Pr(i,g))==null?void 0:u.illus);return Jn(s,m)}if(pl(s)){const m=Y5(t,s,(f=Pr(i,g))==null?void 0:f.icon,e);return Jn(s,m)}}if(P4(s))return v$(s,e);if(!O4(s))return l7(s,e)}),h7(t,e)}function P$(t,e){const{width:n,height:r}=e,{style:i={},attributes:o={},id:s,className:a}=e.svg||{};s&&(t.id=s),a&&t.classList.add(a),n!==void 0&&t.setAttribute("width",typeof n=="number"?`${n}px`:n),r!==void 0&&t.setAttribute("height",typeof r=="number"?`${r}px`:r),Object.assign(t.style,i),Yt(t,o)}function O$(t,e){const{padding:n=0,viewBox:r}=e;r?t.setAttribute("viewBox",r):n!==void 0&&np(t,tr(n))}const rc=!!(typeof process!="undefined"&&process.versions&&process.versions.node);rc&&w5(C5);const ic=!rc&&typeof window!="undefined"&&typeof document!="undefined";let Yo=null,Se=null;function C$(){return ic?Yo||(Yo=document.createElement("canvas").getContext("2d"),Yo):null}function M$(){return!ic||!document.body?null:Se||(Se=document.createElement("span"),Se.style.position="absolute",Se.style.top="-10000px",Se.style.left="-10000px",Se.style.visibility="hidden",Se.style.pointerEvents="none",Se.style.whiteSpace="pre",Se.style.display="inline-block",Se.style.padding="0",Se.style.margin="0",document.body.appendChild(Se),Se)}function S$(t,e){if(e==null)return t*1.4;if(typeof e=="string"){const n=e.trim();if(n.endsWith("px")){const r=Number.parseFloat(n);return Number.isFinite(r)?r:t*1.4}e=Number(n)}return typeof e!="number"||!Number.isFinite(e)?t*1.4:e>4?e:e*t}function E$(t,{fontFamily:e,fontSize:n,fontWeight:r,lineHeight:i}){const o=t.split(/\r?\n/),s=Un(e),a=r||"normal",l=S$(n,i),c=C$();if(c)return c.font=`${a} ${n}px ${s}`,{width:o.reduce((p,g)=>{const y=c.measureText(g);return Math.max(p,y.width)},0),height:l*Math.max(o.length,1)};const h=M$();if(!h)return null;h.style.fontFamily=s,h.style.fontSize=`${n}px`,h.style.fontWeight=String(a),h.style.lineHeight=`${l}px`,h.textContent=t;const u=h.getBoundingClientRect();return{width:u.width,height:u.height}}function I$(t="",e){var n;if(e.width&&e.height)return{width:e.width,height:e.height};const{fontFamily:r=$l,fontSize:i=14,fontWeight:o="normal",lineHeight:s=1.4}=e,a=t.toString(),l={fontFamily:r,fontSize:parseFloat(i.toString()),fontWeight:o,lineHeight:s},c=()=>O5(a,l),h=ic&&(n=E$(a,l))!=null?n:c();return{width:Math.ceil(h.width*1.01),height:Math.ceil(h.height*1.01)}}function oc(t){const e=t.getAttribute("viewBox");if(e){const[s,a,l,c]=e.split(" ").map(Number);return{x:s,y:a,width:l,height:c}}const n=t.getAttribute("width"),r=t.getAttribute("height"),i=Number(n)||0,o=Number(r)||0;return{x:0,y:0,width:i,height:o}}function tr(t){return t?typeof t=="number"?[t,t,t,t]:t.length===1?[t[0],t[0],t[0],t[0]]:t.length===2?[t[0],t[1],t[0],t[1]]:t.length===3?[t[0],t[1],t[2],t[1]]:t.length===4?[t[0],t[1],t[2],t[3]]:[0,0,0,0]:[0,0,0,0]}function np(t,e){if(rc)T$(t,e);else if(document.contains(t))rp(t,e);else{const n=new MutationObserver(r=>{r.forEach(i=>{i.addedNodes.forEach(o=>{(o===t||o.contains(t))&&(A$(t,()=>{rp(t,e)}),n.disconnect())})})});n.observe(document,{childList:!0,subtree:!0})}}function T$(t,e){const n=oc(t),[r,i,o,s]=e;Yt(t,{viewBox:`${n.x-s} ${n.y-r} ${n.width+s+i} ${n.height+r+o}`})}function rp(t,e){const n=t.getBBox(),r=t.getBoundingClientRect(),i=r.width>0?n.width/r.width:1,o=r.height>0?n.height/r.height:1,[s,a,l,c]=e,h=s*o,u=a*i,f=l*o,p=c*i,g=n.x-p,y=n.y-h,m=n.width+p+u,b=n.height+h+f;Yt(t,{viewBox:`${g} ${y} ${m} ${b}`})}function A$(t,e){requestAnimationFrame(()=>{const n=()=>{const r=t.getBoundingClientRect();r.width>0&&r.height>0?e():requestAnimationFrame(n)};n()})}function rn(t,e){if(document.getElementById(t))return;const n=document.createElement("style");n.id=t,n.textContent=e,document.head.appendChild(n)}function k$(){return crypto&&crypto.randomUUID?crypto.randomUUID():"xxxx-xxxx-4xxx-yxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var z$=Object.defineProperty,L$=Object.defineProperties,R$=Object.getOwnPropertyDescriptors,Xo=Object.getOwnPropertySymbols,ip=Object.prototype.hasOwnProperty,op=Object.prototype.propertyIsEnumerable,sp=(t,e,n)=>e in t?z$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$e=(t,e)=>{for(var n in e||(e={}))ip.call(e,n)&&sp(t,n,e[n]);if(Xo)for(var n of Xo(e))op.call(e,n)&&sp(t,n,e[n]);return t},sc=(t,e)=>L$(t,R$(e)),H$=(t,e)=>{var n={};for(var r in t)ip.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Xo)for(var r of Xo(t))e.indexOf(r)<0&&op.call(t,r)&&(n[r]=t[r]);return n};function Et(t){const e=t,{id:n,x:r=0,y:i=0,width:o,height:s,alignHorizontal:a="left",alignVertical:l="top",children:c,fontSize:h=14,fontFamily:u,fontStyle:f,fontWeight:p,textDecoration:g,letterSpacing:y,wordSpacing:m,opacity:b,fill:v="black",lineHeight:x,wordWrap:w,backgroundColor:_="none",backgroundOpacity:$=1,backgroundRadius:P=0}=e,O=H$(e,["id","x","y","width","height","alignHorizontal","alignVertical","children","fontSize","fontFamily","fontStyle","fontWeight","textDecoration","letterSpacing","wordSpacing","opacity","fill","lineHeight","wordWrap","backgroundColor","backgroundOpacity","backgroundRadius"]);let T=o,I=s,S=0,H=0;if(!T||!I){const j=I$(c,t);T||(T=j.width),I||(I=j.height)}o&&(S=a==="center"?T/2:a==="right"?T:0),s&&(H=l==="middle"?I/2:l==="bottom"?I:0);const C=Object.entries($e($e({width:T,height:I},x!==void 0&&{"line-height":x}),w!==void 0&&{"data-word-wrap":w})).reduce((j,[X,L])=>sc($e({},j),{[X]:L}),{}),k=$e($e($e($e($e($e($e($e($e({"data-element-type":"text",width:T,height:I,x:S,y:H,"data-x":0,"data-y":0,fill:v,fontSize:h,textAnchor:a==="center"?"middle":a==="right"?"end":"start",dominantBaseline:l==="middle"?"central":l==="bottom"?"baseline":"hanging","data-horizontal-align":a.toUpperCase(),"data-vertical-align":l.toUpperCase(),children:c},C),O),u&&{fontFamily:u}),f&&{fontStyle:f}),p&&{fontWeight:p}),g&&g!=="none"&&{textDecoration:g}),y&&{letterSpacing:y}),m&&{wordSpacing:m}),b!==void 0&&b!==1&&{opacity:b}),D=$e(sc($e({},r!==0||i!==0?{x:r,y:i,transform:`translate(${r}, ${i})`}:{}),{width:T,height:I}),n&&{id:n}),N=_&&_!=="none"?{"data-element-type":"shape",x:0,y:0,width:T,height:I,fill:_,fillOpacity:$,rx:P,ry:P}:void 0;return{type:"g",props:sc($e({},D),{children:[...N?[{type:"rect",props:N}]:[],{type:"text",props:k}]})}}const pi=Symbol.for("@antv/infographic/Fragment");function Go(t,e={}){return{type:t,props:e}}function D$(t={}){return Go(pi,t)}const N$=Go,j$=Go;function F$(t){return!t||typeof t!="object"||Array.isArray(t)?!1:t.type===pi}function ap(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&"type"in t}function gi(t){return mi(t).filter(ap)}function mi(t,e=[]){var n;if(!t||typeof t=="boolean")return e;if(Array.isArray(t))t.forEach(r=>mi(r,e));else if(F$(t)){const r=(n=t.props)==null?void 0:n.children;(Array.isArray(r)?r:[r]).filter(Boolean).forEach(i=>{mi(i,e)})}else e.push(t);return e}function jt(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}const qo=()=>({x:0,y:0,width:0,height:0});function kr(t){if(!t||t.length===0)return qo();let e=1/0,n=1/0,r=-1/0,i=-1/0;for(const o of t){const{x:s,y:a,width:l,height:c}=o,h=s+l,u=a+c;s<e&&(e=s),a<n&&(n=a),h>r&&(r=h),u>i&&(i=u)}return e===1/0||n===1/0||r===-1/0||i===-1/0?{x:0,y:0,width:0,height:0}:{x:e,y:n,width:Math.max(0,r-e),height:Math.max(0,i-n)}}function Q(t){var e,n,r,i;if(!t)return qo();if(Array.isArray(t)){const p=gi(t);return er(p)}if(typeof t!="object")return qo();const{type:o,props:s={}}=t;if(uc(t)){const p=pp(t);return Q(p)}if(typeof o=="function"){const p=(e=s.x)!=null?e:0,g=(n=s.y)!=null?n:0,y=s.width,m=s.height;if(jt(y)&&jt(m))return{x:p,y:g,width:y,height:m};const b=o(s);if(!b)return{x:p,y:g,width:y!=null?y:0,height:m!=null?m:0};if(Array.isArray(b)){const v=gi(b),x=er(v);if(jt(y)&&jt(m))return{x:p,y:g,width:y,height:m};const w=x.width!==0?x.width:y!=null?y:0,_=x.height!==0?x.height:m!=null?m:0;return{x:p+x.x,y:g+x.y,width:w,height:_}}if(ap(b)){const v=b,x=Q(v);if(B$(v,s))return x;const w=v.props&&jt(v.props.width)&&jt(v.props.height),P=lp(v).flatMap(S=>gi(S)).length>0,O=v.props&&v.props.x===s.x&&v.props.y===s.y;if(w)return{x:O?x.x:p+x.x,y:O?x.y:g+x.y,width:x.width,height:x.height};if(jt(y)&&jt(m))return P?{x:O?x.x:p,y:O?x.y:g,width:y,height:m}:{x:O?x.x:p+x.x,y:O?x.y:g+x.y,width:y,height:m};const T=x.width!==0?x.width:y!=null?y:0,I=x.height!==0?x.height:m!=null?m:0;return{x:O?x.x:p+x.x,y:O?x.y:g+x.y,width:T,height:I}}return{x:p,y:g,width:y!=null?y:0,height:m!=null?m:0}}const a=(r=s.x)!=null?r:0,l=(i=s.y)!=null?i:0,c=jt(s.width)?s.width:void 0,h=jt(s.height)?s.height:void 0;if(jt(c)&&jt(h))return{x:a,y:l,width:c,height:h};const f=lp(t).flatMap(p=>gi(p));if(f.length>0){const p=er(f);return{x:a+p.x,y:l+p.y,width:jt(c)?c:p.width,height:jt(h)?h:p.height}}return{x:a,y:l,width:c!=null?c:0,height:h!=null?h:0}}function er(t){if(!t||!Array.isArray(t)||t.length===0)return qo();const e=[];for(const n of t){const r=gi(n);for(const i of r){const o=Q(i);o&&e.push(o)}}return kr(e)}function B$(t,e){if(!(t!=null&&t.props)||!e)return!1;const n=t.props;if(jt(n.x)&&jt(n.y)&&jt(e.x)&&jt(e.y)&&n.x===e.x&&n.y===e.y){const r=jt(n.width)&&jt(n.height),i=jt(e.width)&&jt(e.height);if(!r&&!i)return!0}return jt(n.x)&&jt(n.y)&&jt(n.width)&&jt(n.height)&&jt(e.x)&&jt(e.y)&&jt(e.width)&&jt(e.height)?n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height:!1}function lp(t){var e;const n=(e=t.props)==null?void 0:e.children;return n?Array.isArray(n)?n:[n]:[]}function ac(t){var e;return t==null||typeof t=="boolean"?[]:Array.isArray(t)?mi(t):typeof t=="object"?mi((e=t.props)==null?void 0:e.children):[t]}var W$=Object.defineProperty,Uo=Object.getOwnPropertySymbols,cp=Object.prototype.hasOwnProperty,hp=Object.prototype.propertyIsEnumerable,dp=(t,e,n)=>e in t?W$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lc=(t,e)=>{for(var n in e||(e={}))cp.call(e,n)&&dp(t,n,e[n]);if(Uo)for(var n of Uo(e))hp.call(e,n)&&dp(t,n,e[n]);return t},V$=(t,e)=>{var n={};for(var r in t)cp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Uo)for(var r of Uo(t))e.indexOf(r)<0&&hp.call(t,r)&&(n[r]=t[r]);return n};const kn=(t,e)=>{const n=t,{type:r,props:i}=n,o=V$(n,["type","props"]);return lc({type:r,props:lc(lc({},i),e)},o)},up=()=>({defs:new Map});function cc(t){const e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return String(t).replace(/[&<>"']/g,n=>e[n])}const fp={className:"class",viewBox:"viewBox",preserveAspectRatio:"preserveAspectRatio",gradientUnits:"gradientUnits",gradientTransform:"gradientTransform",patternUnits:"patternUnits",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",maskUnits:"maskUnits",maskContentUnits:"maskContentUnits",clipPathUnits:"clipPathUnits",primitiveUnits:"primitiveUnits",filterUnits:"filterUnits",markerUnits:"markerUnits",markerWidth:"markerWidth",markerHeight:"markerHeight",refX:"refX",refY:"refY",xmlLang:"xml:lang",xmlSpace:"xml:space",xmlnsXlink:"xmlns:xlink",xlinkHref:"href",xlinkTitle:"xlink:title",xlinkShow:"xlink:show",xlinkActuate:"xlink:actuate",textLength:"textLength",lengthAdjust:"lengthAdjust",repeatCount:"repeatCount",repeatDur:"repeatDur",calcMode:"calcMode",keyTimes:"keyTimes",keySplines:"keySplines",keyPoints:"keyPoints",stdDeviation:"stdDeviation",baseFrequency:"baseFrequency",numOctaves:"numOctaves",pathLength:"pathLength",systemLanguage:"systemLanguage",requiredFeatures:"requiredFeatures",requiredExtensions:"requiredExtensions"};function Y$(t){return fp[t]?fp[t]:t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}const hc=new Map;function dc(t){const e=Symbol("layout");return hc.set(e,t),r=>({type:e,props:r})}function uc(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)&&typeof t.type=="symbol"&&hc.has(t.type)}function pp(t,e=up()){const n=hc.get(t.type);if(!n)return console.warn("Layout function not found for symbol:",t.type),t;const r=ac(t).filter(i=>typeof i=="object");return n(r,t.props,e)}var X$=Object.defineProperty,G$=Object.defineProperties,q$=Object.getOwnPropertyDescriptors,Zo=Object.getOwnPropertySymbols,gp=Object.prototype.hasOwnProperty,mp=Object.prototype.propertyIsEnumerable,yp=(t,e,n)=>e in t?X$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,U$=(t,e)=>{for(var n in e||(e={}))gp.call(e,n)&&yp(t,n,e[n]);if(Zo)for(var n of Zo(e))mp.call(e,n)&&yp(t,n,e[n]);return t},Z$=(t,e)=>G$(t,q$(e)),vp=(t,e)=>{var n={};for(var r in t)gp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Zo)for(var r of Zo(t))e.indexOf(r)<0&&mp.call(t,r)&&(n[r]=t[r]);return n};function yi(t,e){if(t==null||typeof t=="boolean")return null;if(typeof t=="string"||typeof t=="number")return t;if(Array.isArray(t))return t.map(r=>yi(r,e)).filter(Boolean);if(uc(t)){const r=pp(t,e);return yi(r,e)}if(typeof t.type=="function"){const r=t.type(t.props);return yi(r,e)}const n=ac(t).map(r=>yi(r,e)).filter(Boolean);return t.type===pi?n:t.type===va?(n.forEach(r=>{typeof r=="object"&&r.props.id&&e.defs.set(r.props.id,r)}),null):n.length?kn(t,{children:n}):t}function vi(t,e){if(t==null)return"";if(typeof t=="string")return cc(t);if(typeof t=="number")return String(t);const{type:n,props:r}=t;if(!n)return"";const i=ac(t);if(n===pi)return i.map(l=>vi(l)).filter(Boolean).join("");if(n===va)return"";if(typeof n=="function"||uc(t))return console.warn("Unexpected unprocessed component in render:",t),"";const o=xp(r),s=i.map(l=>vi(l)).filter(Boolean).join(""),a=String(n);return s?`<${a}${o}>${s}</${a}>`:`<${a}${o} />`}function bp(t,e={}){const n=up(),r=yi(t,n);if(!r)return"";const i=Array.isArray(r)?r.map(m=>vi(m)).join(""):vi(r),o=e,{x:s,y:a,width:l,height:c,style:h}=o,u=vp(o,["x","y","width","height","style"]),f=Z$(U$({},u),{xmlns:"http://www.w3.org/2000/svg"});if(!f.viewBox)if(l&&c)f.viewBox=`${s!=null?s:0} ${a!=null?a:0} ${l!=null?l:0} ${c!=null?c:0}`;else{const m=Q(r);if(m){const{x:b,y:v,width:x,height:w}=m;f.viewBox=`${b} ${v} ${x} ${w}`}}const p=xp(f),g=K$(h),y=n.defs.size?`<defs>${Array.from(n.defs.values()).map(m=>vi(m)).join("")}</defs>`:"";return`<svg${p}${g}>${y}${i}</svg>`}function xp(t){if(!t)return"";const e=t,{children:n}=e,r=vp(e,["children"]);return Object.entries(r).filter(([,i])=>i!=null).map(([i,o])=>{const s=Y$(i),a=typeof o=="string"?cc(String(o)):String(o);return` ${s}="${a}"`}).join("")}function K$(t){if(!t||Object.keys(t).length===0)return"";const e=Object.entries(t).map(([n,r])=>`${n.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`)}: ${r};`).join("");return` style="${cc(e)}"`}var Q$=Object.defineProperty,Ko=Object.getOwnPropertySymbols,wp=Object.prototype.hasOwnProperty,_p=Object.prototype.propertyIsEnumerable,$p=(t,e,n)=>e in t?Q$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qo=(t,e)=>{for(var n in e||(e={}))wp.call(e,n)&&$p(t,n,e[n]);if(Ko)for(var n of Ko(e))_p.call(e,n)&&$p(t,n,e[n]);return t},Pp=(t,e)=>{var n={};for(var r in t)wp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ko)for(var r of Ko(t))e.indexOf(r)<0&&_p.call(t,r)&&(n[r]=t[r]);return n};const q=t=>{const e=t,{indexes:n}=e,r=Pp(e,["indexes"]),i={fill:"#B9EBCA",fillOpacity:.3,width:20,height:20,"data-indexes":n,"data-element-type":kt.BtnAdd};return d(St,Qo(Qo({},i),r))},Ft=t=>{const e=t,{indexes:n}=e,r=Pp(e,["indexes"]),i={fill:"#F9C0C0",fillOpacity:.3,width:20,height:20,"data-indexes":n,"data-element-type":kt.BtnRemove};return d(St,Qo(Qo({},i),r))};var J$=Object.defineProperty,tP=Object.defineProperties,eP=Object.getOwnPropertyDescriptors,Op=Object.getOwnPropertySymbols,nP=Object.prototype.hasOwnProperty,rP=Object.prototype.propertyIsEnumerable,Cp=(t,e,n)=>e in t?J$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iP=(t,e)=>{for(var n in e||(e={}))nP.call(e,n)&&Cp(t,n,e[n]);if(Op)for(var n of Op(e))rP.call(e,n)&&Cp(t,n,e[n]);return t},oP=(t,e)=>tP(t,eP(e));const Ot=t=>d(Y,oP(iP({"data-element-type":kt.BtnsGroup,width:0,height:0},t),{display:"none"})),Kt=()=>d(Rt,{});var sP=Object.defineProperty,Jo=Object.getOwnPropertySymbols,Mp=Object.prototype.hasOwnProperty,Sp=Object.prototype.propertyIsEnumerable,Ep=(t,e,n)=>e in t?sP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fc=(t,e)=>{for(var n in e||(e={}))Mp.call(e,n)&&Ep(t,n,e[n]);if(Jo)for(var n of Jo(e))Sp.call(e,n)&&Ep(t,n,e[n]);return t},aP=(t,e)=>{var n={};for(var r in t)Mp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Jo)for(var r of Jo(t))e.indexOf(r)<0&&Sp.call(t,r)&&(n[r]=t[r]);return n};const Ip=t=>{var e=t,{indexes:n}=e,r=aP(e,["indexes"]);const o=fc(fc({},{fill:"lightgray"}),r);return n?(o["data-indexes"]=n,o["data-element-type"]=kt.ItemIllus):o["data-element-type"]=kt.Illus,d(St,fc({},o))};var lP=Object.defineProperty,cP=Object.defineProperties,hP=Object.getOwnPropertyDescriptors,ts=Object.getOwnPropertySymbols,Tp=Object.prototype.hasOwnProperty,Ap=Object.prototype.propertyIsEnumerable,kp=(t,e,n)=>e in t?lP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zp=(t,e)=>{for(var n in e||(e={}))Tp.call(e,n)&&kp(t,n,e[n]);if(ts)for(var n of ts(e))Ap.call(e,n)&&kp(t,n,e[n]);return t},dP=(t,e)=>cP(t,hP(e)),uP=(t,e)=>{var n={};for(var r in t)Tp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ts)for(var r of ts(t))e.indexOf(r)<0&&Ap.call(t,r)&&(n[r]=t[r]);return n};const Xt=t=>{var e=t,{indexes:n,lineNumber:r=2,children:i}=e,o=uP(e,["indexes","lineNumber","children"]),s;if(!i)return null;const a=zp({fontSize:14,fill:"#666",wordWrap:!0,lineHeight:1.4,children:i},o);return(s=a.height)!=null||(a.height=Math.ceil(r*+a.lineHeight*+a.fontSize)),d(Et,dP(zp({},a),{"data-indexes":n,"data-element-type":kt.ItemDesc}))};var fP=Object.defineProperty,pP=Object.defineProperties,gP=Object.getOwnPropertyDescriptors,es=Object.getOwnPropertySymbols,Lp=Object.prototype.hasOwnProperty,Rp=Object.prototype.propertyIsEnumerable,Hp=(t,e,n)=>e in t?fP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bi=(t,e)=>{for(var n in e||(e={}))Lp.call(e,n)&&Hp(t,n,e[n]);if(es)for(var n of es(e))Rp.call(e,n)&&Hp(t,n,e[n]);return t},ns=(t,e)=>pP(t,gP(e)),Dp=(t,e)=>{var n={};for(var r in t)Lp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&es)for(var r of es(t))e.indexOf(r)<0&&Rp.call(t,r)&&(n[r]=t[r]);return n};const be=t=>{const e=t,{indexes:n,size:r=32}=e,i=Dp(e,["indexes","size"]),o=bi({fill:"lightgray",width:r,height:r},i);return d(St,ns(bi({},o),{"data-indexes":n,"data-element-type":"item-icon"}))},nr=t=>{const e=t,{indexes:n,size:r=50,fill:i,colorBg:o="white"}=e,s=Dp(e,["indexes","size","fill","colorBg"]),a=r/Math.SQRT2*.9,l=(r-a)/2,c=ns(bi({fill:o},s),{x:l,y:l,width:a,height:a});return E(Y,ns(bi({},s),{width:r,height:r,"data-element-type":kt.ItemIconGroup,children:[d(Lt,{width:r,height:r,fill:i,"data-element-type":"shape"}),d(St,ns(bi({},c),{"data-indexes":n,"data-element-type":kt.ItemIcon}))]}))};var mP=Object.defineProperty,yP=Object.defineProperties,vP=Object.getOwnPropertyDescriptors,rs=Object.getOwnPropertySymbols,Np=Object.prototype.hasOwnProperty,jp=Object.prototype.propertyIsEnumerable,Fp=(t,e,n)=>e in t?mP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bp=(t,e)=>{for(var n in e||(e={}))Np.call(e,n)&&Fp(t,n,e[n]);if(rs)for(var n of rs(e))jp.call(e,n)&&Fp(t,n,e[n]);return t},bP=(t,e)=>yP(t,vP(e)),xP=(t,e)=>{var n={};for(var r in t)Np.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&rs)for(var r of rs(t))e.indexOf(r)<0&&jp.call(t,r)&&(n[r]=t[r]);return n};const $t=t=>{var e=t,{indexes:n,children:r}=e,i=xP(e,["indexes","children"]),o;const s=Bp({fontSize:18,fontWeight:"bold",fill:"#252525",lineHeight:1.4,children:r},i);return(o=s.height)!=null||(s.height=Math.ceil(+s.lineHeight*+s.fontSize)),d(Et,bP(Bp({},s),{"data-indexes":n,"data-element-type":kt.ItemLabel}))};var wP=Object.defineProperty,Wp=Object.getOwnPropertySymbols,_P=Object.prototype.hasOwnProperty,$P=Object.prototype.propertyIsEnumerable,Vp=(t,e,n)=>e in t?wP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PP=(t,e)=>{for(var n in e||(e={}))_P.call(e,n)&&Vp(t,n,e[n]);if(Wp)for(var n of Wp(e))$P.call(e,n)&&Vp(t,n,e[n]);return t};const It=t=>d(Y,PP({"data-element-type":kt.ItemsGroup},t));var OP=Object.defineProperty,CP=Object.defineProperties,MP=Object.getOwnPropertyDescriptors,is=Object.getOwnPropertySymbols,Yp=Object.prototype.hasOwnProperty,Xp=Object.prototype.propertyIsEnumerable,Gp=(t,e,n)=>e in t?OP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qp=(t,e)=>{for(var n in e||(e={}))Yp.call(e,n)&&Gp(t,n,e[n]);if(is)for(var n of is(e))Xp.call(e,n)&&Gp(t,n,e[n]);return t},SP=(t,e)=>CP(t,MP(e)),EP=(t,e)=>{var n={};for(var r in t)Yp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&is)for(var r of is(t))e.indexOf(r)<0&&Xp.call(t,r)&&(n[r]=t[r]);return n};const xi=t=>{var e=t,{indexes:n,value:r,formatter:i=l=>String(l)}=e,o=EP(e,["indexes","value","formatter"]),s;const a=qp({fontSize:14,fill:"#666",wordWrap:!0,lineHeight:1.4,children:i(r),"data-value":r},o);return(s=a.height)!=null||(a.height=Math.ceil(+a.lineHeight*+a.fontSize)),d(Et,SP(qp({},a),{"data-indexes":n,"data-element-type":kt.ItemValue}))};var IP=Object.defineProperty,Up=Object.getOwnPropertySymbols,TP=Object.prototype.hasOwnProperty,AP=Object.prototype.propertyIsEnumerable,Zp=(t,e,n)=>e in t?IP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kP=(t,e)=>{for(var n in e||(e={}))TP.call(e,n)&&Zp(t,n,e[n]);if(Up)for(var n of Up(e))AP.call(e,n)&&Zp(t,n,e[n]);return t};const ne=t=>d(Y,kP({"data-element-type":"shapes-group"},t));var zP=Object.defineProperty,LP=Object.defineProperties,RP=Object.getOwnPropertyDescriptors,os=Object.getOwnPropertySymbols,Kp=Object.prototype.hasOwnProperty,Qp=Object.prototype.propertyIsEnumerable,Jp=(t,e,n)=>e in t?zP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ss=(t,e)=>{for(var n in e||(e={}))Kp.call(e,n)&&Jp(t,n,e[n]);if(os)for(var n of os(e))Qp.call(e,n)&&Jp(t,n,e[n]);return t},tg=(t,e)=>LP(t,RP(e)),HP=(t,e)=>{var n={};for(var r in t)Kp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&os)for(var r of os(t))e.indexOf(r)<0&&Qp.call(t,r)&&(n[r]=t[r]);return n};const wi=dc((t,e)=>{var n=e,{horizontal:r,vertical:i}=n,o=HP(n,["horizontal","vertical"]),s,a,l,c;if(!t||t.length===0)return d(Y,ss({},o));const h=t.map(v=>Q(v)),u=er(t),f=(s=o.x)!=null?s:u.x,p=(a=o.y)!=null?a:u.y,g=(l=o.width)!=null?l:u.width,y=(c=o.height)!=null?c:u.height,m=t.map((v,x)=>{const w=h[x],_=ss({},v.props);if(r!==void 0)switch(r){case"left":_.x=0;break;case"center":_.x=(g-w.width)/2;break;case"right":_.x=g-w.width;break}else _.x===void 0&&(_.x=w.x-f);if(i!==void 0)switch(i){case"top":_.y=0;break;case"middle":_.y=(y-w.height)/2;break;case"bottom":_.y=y-w.height;break}else _.y===void 0&&(_.y=w.y-p);return kn(v,_)}),b=tg(ss({},o),{x:f,y:p,width:g,height:y});return d(Y,tg(ss({},b),{children:m}))});var DP=Object.defineProperty,NP=Object.defineProperties,jP=Object.getOwnPropertyDescriptors,as=Object.getOwnPropertySymbols,eg=Object.prototype.hasOwnProperty,ng=Object.prototype.propertyIsEnumerable,rg=(t,e,n)=>e in t?DP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rr=(t,e)=>{for(var n in e||(e={}))eg.call(e,n)&&rg(t,n,e[n]);if(as)for(var n of as(e))ng.call(e,n)&&rg(t,n,e[n]);return t},ig=(t,e)=>NP(t,jP(e)),FP=(t,e)=>{var n={};for(var r in t)eg.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&as)for(var r of as(t))e.indexOf(r)<0&&ng.call(t,r)&&(n[r]=t[r]);return n};const lt=dc((t,e)=>{var n=e,{flexDirection:r="row",justifyContent:i="flex-start",alignItems:o="flex-start",alignContent:s="flex-start",flexWrap:a="nowrap",gap:l=0}=n,c=FP(n,["flexDirection","justifyContent","alignItems","alignContent","flexWrap","gap"]),h,u,f,p,g,y;if(!t||t.length===0)return d(Y,rr({},c));const m=r==="row"||r==="row-reverse",b=r==="row-reverse"||r==="column-reverse",v=t.map(C=>Q(C)),x=er(t),w=(h=c.width)!=null?h:x.width,_=(u=c.height)!=null?u:x.height,$=c.width!==void 0&&c.height!==void 0,P=[];if(a==="wrap"&&$){let C=[],A=[],B=0;for(let k=0;k<t.length;k++){const D=t[k],z=v[k],N=m?z.width:z.height,j=m?w:_;C.length===0||B+l+N<=j?(C.push(D),A.push(z),B+=(C.length>1?l:0)+N):(P.push({children:C,bounds:A}),C=[D],A=[z],B=N)}C.length>0&&P.push({children:C,bounds:A})}else P.push({children:t,bounds:v});const O=[];let T=0;const I=[];if(P.forEach(C=>{const{children:A,bounds:B}=C,k=B.reduce((L,M,R)=>{const W=m?M.width:M.height;return L+W+(R>0?l:0)},0),D=Math.max(...B.map(L=>m?L.height:L.width));I.push(D);let z=0;const N=(m?w:_)-k;if($)switch(i){case"flex-end":z=N;break;case"center":z=N/2;break;case"space-between":z=0;break;default:z=0;break}let j=l;$&&i==="space-between"&&A.length>1&&(j=N/(A.length-1)+l);let X=z;A.forEach((L,M)=>{const R=B[M],W=m?R.width:R.height,U=m?R.height:R.width;let V=T;if($)switch(o){case"flex-end":V=T+D-U;break;case"center":V=T+(D-U)/2;break;default:V=T;break}let G,Z;m?(G=b?w-X-W:X,Z=V):(G=V,Z=b?_-X-W:X);const K=kn(L,{x:G,y:Z});O.push(K),X+=W+j}),T+=D+l}),P.length>1&&$){const C=I.reduce((k,D)=>k+D,0)+(P.length-1)*l,A=(m?_:w)-C;let B=0;switch(s){case"flex-end":B=A;break;case"center":B=A/2;break;case"space-between":if(P.length>1){const k=A/(P.length-1);let D=0;P.forEach((z,N)=>{const j=P.slice(0,N).reduce((L,M)=>L+M.children.length,0),X=j+z.children.length;for(let L=j;L<X;L++){const M=O[L],R=rr({},M.props);m?R.y=(R.y||0)+D:R.x=(R.x||0)+D,O[L]=kn(M,R)}D+=I[N]+l+(N<P.length-1?k:0)});break}break;default:B=0;break}B!==0&&s!=="space-between"&&O.forEach((k,D)=>{const z=rr({},k.props);m?z.y=(z.y||0)+B:z.x=(z.x||0)+B,O[D]=kn(k,z)})}if(!$&&o==="center")if(m){const C=Math.max(...v.map(A=>A.height));O.forEach((A,B)=>{const k=v[B],D=(C-k.height)/2,z=rr({},A.props);z.y=(z.y||0)+D,O[B]=kn(A,z)})}else{const C=Math.max(...v.map(A=>A.width));O.forEach((A,B)=>{const k=v[B],D=(C-k.width)/2,z=rr({},A.props);z.x=(z.x||0)+D,O[B]=kn(A,z)})}const S=er(O),H=ig(rr({},c),{x:(f=c.x)!=null?f:x.x,y:(p=c.y)!=null?p:x.y,width:(g=c.width)!=null?g:S.width,height:(y=c.height)!=null?y:S.height});return d(Y,ig(rr({},H),{children:O}))});var BP=Object.defineProperty,WP=Object.defineProperties,VP=Object.getOwnPropertyDescriptors,og=Object.getOwnPropertySymbols,YP=Object.prototype.hasOwnProperty,XP=Object.prototype.propertyIsEnumerable,sg=(t,e,n)=>e in t?BP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ls=(t,e)=>{for(var n in e||(e={}))YP.call(e,n)&&sg(t,n,e[n]);if(og)for(var n of og(e))XP.call(e,n)&&sg(t,n,e[n]);return t},ag=(t,e)=>WP(t,VP(e));const lg=t=>{const{x:e=0,y:n=0,alignHorizontal:r="center",title:i,desc:o,descLineNumber:s=2,themeColors:a}=t,l=h=>{const u={fontSize:24,fill:a.colorPrimaryText,lineHeight:1.4,alignHorizontal:r};return d(Et,ag(ls(ls({},u),h),{"data-element-type":"title",children:i}))},c=h=>{const u={fontSize:16,fill:a.colorTextSecondary,alignHorizontal:r,lineHeight:1.4,height:s*24};return d(Et,ag(ls(ls({},u),h),{"data-element-type":"desc",children:o}))};return!i&&!o?null:E(lt,{flexDirection:"column",justifyContent:"center",alignItems:"center",x:e,y:n,gap:8,children:[i&&d(l,{}),o&&d(c,{})]})},pc=new Map;function gc(t,e){pc.set(t,e)}function cg(t){return pc.get(t)}function GP(){return Array.from(pc.keys())}gc("dark",{colorBg:"#1F1F1F",base:{text:{fill:"#fff"}}}),gc("hand-drawn",{base:{text:{"font-family":"851tegakizatsu"}},stylize:{type:"rough"}});var qP=Object.defineProperty,UP=Object.defineProperties,ZP=Object.getOwnPropertyDescriptors,hg=Object.getOwnPropertySymbols,KP=Object.prototype.hasOwnProperty,QP=Object.prototype.propertyIsEnumerable,dg=(t,e,n)=>e in t?qP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_i=(t,e)=>{for(var n in e||(e={}))KP.call(e,n)&&dg(t,n,e[n]);if(hg)for(var n of hg(e))QP.call(e,n)&&dg(t,n,e[n]);return t},$i=(t,e)=>UP(t,ZP(e));Ht(Ud);const ug=({colorPrimary:t,colorBg:e="#ffffff",isDarkMode:n=!1})=>{const r=tn(t),i=tn(e),o=iO({primaryColor:r,bgColor:i});return oO(o,{primaryColor:r,bgColor:i,isDarkMode:n})},JP=(t,e)=>Ax($i(_i({},t),{alpha:e?.2:.1}))||"#ffffff",tO=(t,e)=>{if(e)return"#ffffff";const n=tn("#262626");return il(n,t)>=7?ti(n):"#000000"},eO=t=>{const e=au(tn(t)),n=$i(_i({},e),{l:Math.min(1,e.l+.2)});return ti(n)},nO=(t,e)=>{const n=tn(t),r=tn("#262626"),i=tn("#ffffff"),o=il(r,n);return il(i,n)>=3?ti(i):o>=4.5?ti(r):"#ffffff"},rO=(t,e)=>{const n=au(t);if(e){const r=$i(_i({},n),{l:Math.min(1,n.l+.1)});return cs(r,"#1f1f1f")}else{if(n.l>.95)return"#ffffff";{const r=$i(_i({},n),{l:Math.min(1,n.l+.05)});return cs(r,"#ffffff")}}},iO=({primaryColor:t,bgColor:e})=>({colorPrimary:cs(t,"#FF356A"),colorBg:cs(e,"#ffffff"),colorWhite:"#ffffff"}),oO=(t,{primaryColor:e,bgColor:n,isDarkMode:r})=>{const i=tO(n,r),o=JP(e,r);return $i(_i({},t),{isDarkMode:r,colorPrimaryBg:o,colorText:i,colorTextSecondary:eO(i),colorPrimaryText:nO(o,r),colorBgElevated:rO(n,r)})};function cs(t,e="#000000"){var n;return(n=ti(t))!=null?n:e}const mc="#FF356A";function re(t){var e;return((e=t==null?void 0:t.themeConfig)==null?void 0:e.colorPrimary)||mc}function fg(t){var e;const{themeConfig:n={},data:r}=t,{colorPrimary:i,palette:o}=n;return!o||o.length===0?Array(((e=r==null?void 0:r.items)==null?void 0:e.length)||1).fill(i||mc):r.items.map((s,a)=>Oo(o,[a],r.items.length)||mc)}function Ct(t,e){var n,r,i;return Oo((n=t==null?void 0:t.themeConfig)==null?void 0:n.palette,e,(i=(r=t.data)==null?void 0:r.items)==null?void 0:i.length)}function xe(t,e){var n;const{colorBg:r=((n=e==null?void 0:e.themeConfig)==null?void 0:n.colorBg)||"white",colorPrimary:i=e?re(e):"black"}=t;return ug({colorPrimary:i,isDarkMode:lu(r),colorBg:r})}function Pi(t,e){const{depth:n,originalIndexes:r,flatIndex:i}=t;switch(e){case"level":return[n];case"branch":return n===0?[0]:n===1?[r[1]+1]:[r[1]+1];case"node":return r;case"node-flat":return i!==void 0?[i]:(console.warn("node-flat mode requires flatIndex in HierarchyNode, falling back to originalIndexes"),r);default:return[0]}}var sO=Object.defineProperty,pg=Object.getOwnPropertySymbols,aO=Object.prototype.hasOwnProperty,lO=Object.prototype.propertyIsEnumerable,gg=(t,e,n)=>e in t?sO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cO=(t,e)=>{for(var n in e||(e={}))aO.call(e,n)&&gg(t,n,e[n]);if(pg)for(var n of pg(e))lO.call(e,n)&&gg(t,n,e[n]);return t};function Wt(t,e=[]){const n=cO({},t),r={};return["indexes","data","datum","positionH","positionV","themeColors","valueFormatter",...e].forEach(o=>{o in n&&(r[o]=n[o],delete n[o])}),["x","y","width","height"].forEach(o=>{o in t&&(n[o]=t[o])}),[r,n]}function hs(t,e){var n;return t.length===0?()=>null:e===void 0?t[0]:(n=t[e])!=null?n:t[0]}const yc=new Map;function Vt(t,e){yc.set(t,e)}function mg(t){return yc.get(t)}function hO(){return Array.from(yc.keys())}var dO=Object.defineProperty,uO=Object.defineProperties,fO=Object.getOwnPropertyDescriptors,yg=Object.getOwnPropertySymbols,pO=Object.prototype.hasOwnProperty,gO=Object.prototype.propertyIsEnumerable,vg=(t,e,n)=>e in t?dO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mO=(t,e)=>{for(var n in e||(e={}))pO.call(e,n)&&vg(t,n,e[n]);if(yg)for(var n of yg(e))gO.call(e,n)&&vg(t,n,e[n]);return t},yO=(t,e)=>uO(t,fO(e));const bg=t=>{const[{datum:e,indexes:n,width:r=200,height:i=80,iconSize:o=24,badgeSize:s=32,gap:a=8,positionH:l="normal",themeColors:c,valueFormatter:h},u]=Wt(t,["width","height","iconSize","badgeSize","gap"]),f=e.value,p=f!==void 0,g=!!e.desc,y=!!e.icon,m=`${c.colorPrimary}-badge`,b=l==="flipped"?r-a-s:a,v=y?l==="flipped"?a:s+2*a:a,x=r-a*2,w=y?r-s-3*a:x,_=a+14+18+8,$=_-a,P=g?a:(i-s)/2,O=!p&&!g?(i-14)/2:a;return E(Y,yO(mO({},u),{width:r,height:i,children:[d(zt,{children:E("radialGradient",{id:m,cx:"50%",cy:"50%",r:"50%",children:[d("stop",{offset:"0%",stopColor:c.colorPrimary}),d("stop",{offset:"100%",stopColor:ot(c.colorPrimary).darken(20).toHexString()})]})}),d(St,{"data-element-type":"shape",x:0,y:0,width:r,height:i,fill:c.colorPrimaryBg,rx:8,ry:8}),y&&E(Rt,{children:[d(Lt,{x:b,y:P,width:s,height:s,fill:`url(#${m})`}),d(be,{indexes:n,x:b+(s-o)/2,y:P+(s-o)/2,size:o,fill:c.colorWhite})]}),E(lt,{flexDirection:"column",x:v,y:O,width:w,height:!p&&!g?void 0:$,alignItems:"center",justifyContent:"center",children:[d($t,{indexes:n,width:w,alignHorizontal:l==="flipped"?"right":"left",alignVertical:"middle",fontSize:14,fill:c.colorText,children:e.label}),p&&d(xi,{indexes:n,width:w,alignHorizontal:l==="flipped"?"right":"left",alignVertical:"middle",fontSize:18,lineHeight:1,fontWeight:"bold",fill:c.colorPrimary,value:f,formatter:h})]}),g&&d(Xt,{indexes:n,x:a,y:_,width:x,alignHorizontal:l==="flipped"?"right":"left",fontSize:11,fill:c.colorTextSecondary,lineNumber:2,lineHeight:1.2,wordWrap:!0,children:e.desc})]}))};Vt("badge-card",{component:bg,composites:["icon","label","value","desc"]});var vO=Object.defineProperty,bO=Object.defineProperties,xO=Object.getOwnPropertyDescriptors,xg=Object.getOwnPropertySymbols,wO=Object.prototype.hasOwnProperty,_O=Object.prototype.propertyIsEnumerable,wg=(t,e,n)=>e in t?vO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$O=(t,e)=>{for(var n in e||(e={}))wO.call(e,n)&&wg(t,n,e[n]);if(xg)for(var n of xg(e))_O.call(e,n)&&wg(t,n,e[n]);return t},PO=(t,e)=>bO(t,xO(e));const _g=t=>{const[{indexes:e,datum:n,width:r=280,height:i=140,themeColors:o},s]=Wt(t,["width","height"]);return E(Y,PO($O({},s),{children:[d("rect",{x:0,y:0,width:r,height:i,rx:22,ry:22,fill:o.colorPrimaryBg,stroke:o.colorPrimary,"data-element-type":"shape"}),d(ht,{x:r-85,y:.5,width:85,height:65,d:"M0 0H62.4495C74.9557 0 85.4549 10.8574 84.4557 23.1875V60.1875L77.8772 62.5839C64.3776 67.6876 48.51 64.6893 37.8662 53.7441L10.2361 25.3312C4.91402 19.8571 1.65356 13.1736 0.435652 6.21819L0 0Z",fill:o.colorBg,"data-element-type":"shape"}),d($t,{indexes:e,x:20,y:24,width:200,alignHorizontal:"left",alignVertical:"middle",fill:o.colorText,children:n.label}),d(Xt,{indexes:e,x:20,y:58,width:220,height:70,fill:o.colorTextSecondary,alignHorizontal:"left",alignVertical:"top",children:n.desc}),d(be,{indexes:e,x:r-48,y:12,width:32,height:32,fill:o.colorPrimary})]}))};Vt("candy-card-lite",{component:_g,composites:["icon","label","desc"]});var OO=Object.defineProperty,CO=Object.defineProperties,MO=Object.getOwnPropertyDescriptors,ds=Object.getOwnPropertySymbols,$g=Object.prototype.hasOwnProperty,Pg=Object.prototype.propertyIsEnumerable,Og=(t,e,n)=>e in t?OO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,SO=(t,e)=>{for(var n in e||(e={}))$g.call(e,n)&&Og(t,n,e[n]);if(ds)for(var n of ds(e))Pg.call(e,n)&&Og(t,n,e[n]);return t},EO=(t,e)=>CO(t,MO(e)),IO=(t,e)=>{var n={};for(var r in t)$g.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ds)for(var r of ds(t))e.indexOf(r)<0&&Pg.call(t,r)&&(n[r]=t[r]);return n};const vc=t=>{const e=t,{color:n="black",opacity:r=.8}=e,i=IO(e,["color","opacity"]);return d("filter",EO(SO({id:"drop-shadow",x:"-25%",y:"-25%",width:"200%",height:"200%"},i),{children:d("feDropShadow",{dx:"4",dy:"4",stdDeviation:"4","flood-color":n,"flood-opacity":r})}))};var TO=Object.defineProperty,AO=Object.defineProperties,kO=Object.getOwnPropertyDescriptors,Cg=Object.getOwnPropertySymbols,zO=Object.prototype.hasOwnProperty,LO=Object.prototype.propertyIsEnumerable,Mg=(t,e,n)=>e in t?TO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,RO=(t,e)=>{for(var n in e||(e={}))zO.call(e,n)&&Mg(t,n,e[n]);if(Cg)for(var n of Cg(e))LO.call(e,n)&&Mg(t,n,e[n]);return t},HO=(t,e)=>AO(t,kO(e));const bc=t=>{const{id:e="linear-gradient",startColor:n="black",stopColor:r="white",direction:i="left-right"}=t;return E("linearGradient",HO(RO({id:e},{"left-right":{x1:"0%",y1:"0%",x2:"100%",y2:"0%"},"right-left":{x1:"100%",y1:"0%",x2:"0%",y2:"0%"},"top-bottom":{x1:"0%",y1:"0%",x2:"0%",y2:"100%"},"bottom-top":{x1:"0%",y1:"100%",x2:"0%",y2:"0%"}}[i]),{children:[d("stop",{offset:"0%",stopColor:n}),d("stop",{offset:"100%",stopColor:r})]}))};var DO=Object.defineProperty,NO=Object.defineProperties,jO=Object.getOwnPropertyDescriptors,Sg=Object.getOwnPropertySymbols,FO=Object.prototype.hasOwnProperty,BO=Object.prototype.propertyIsEnumerable,Eg=(t,e,n)=>e in t?DO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Oi=(t,e)=>{for(var n in e||(e={}))FO.call(e,n)&&Eg(t,n,e[n]);if(Sg)for(var n of Sg(e))BO.call(e,n)&&Eg(t,n,e[n]);return t},Ci=(t,e)=>NO(t,jO(e));const Ig=t=>{const[{datum:e,indexes:n,width:r=300,height:i=80,gap:o=12,positionH:s="normal",iconPadding:a=i/10,themeColors:l},c]=Wt(t,["width","height","gap","iconPadding"]),h=i/2,u=i-a*2,f=s==="flipped",p=!!e.icon,g=p?r-i-o:r-o*2,y=p?f?o:i:o,m=p?f?"right":"left":"center",b={indexes:n,width:g,alignHorizontal:m,alignVertical:"middle",fontSize:16,fontWeight:"600",fill:l.colorWhite},v=Q(d($t,Ci(Oi({},b),{children:e.label}))),x={indexes:n,width:g,alignHorizontal:m,alignVertical:"top",fontSize:12,lineNumber:1,fill:l.colorWhite},w=Q(e.desc?d(Xt,Ci(Oi({},x),{children:e.desc})):null),_=4,$=v.height+_+w.height,O=(i-$)/2,T=O+v.height+_,I=f?r-i+a:a,S=a;return E(Y,Ci(Oi({},c),{children:[d(zt,{children:d(vc,{})}),d(St,{x:0,y:0,width:r,height:i,fill:l.colorPrimary,rx:h,ry:h,"data-element-type":"shape"}),e.icon&&E(Rt,{children:[d(Lt,{x:I,y:S,width:u,height:u,fillOpacity:.5,fill:l.colorBg,filter:"url(#drop-shadow)"}),d(nr,{indexes:n,x:I,y:S,size:u,fill:l.colorBg,colorBg:l.colorPrimary})]}),e.label&&d($t,Ci(Oi({x:y,y:O},b),{children:e.label})),e.desc&&d(Xt,Ci(Oi({x:y,y:T},x),{children:e.desc}))]}))};Vt("capsule-item",{component:Ig,composites:["icon","label","desc"]});var WO=Object.defineProperty,VO=Object.defineProperties,YO=Object.getOwnPropertyDescriptors,Tg=Object.getOwnPropertySymbols,XO=Object.prototype.hasOwnProperty,GO=Object.prototype.propertyIsEnumerable,Ag=(t,e,n)=>e in t?WO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xc=(t,e)=>{for(var n in e||(e={}))XO.call(e,n)&&Ag(t,n,e[n]);if(Tg)for(var n of Tg(e))GO.call(e,n)&&Ag(t,n,e[n]);return t},wc=(t,e)=>VO(t,YO(e));const kg=t=>{const[{indexes:e,datum:n,themeColors:r,positionH:i="normal",width:o=240,height:s=o},a]=Wt(t,["width","height"]),l=Math.min(o,s),c=l*.7,h=(l-c)/2,u=c*Math.sqrt(2)/2,f=(l-u)/2,p=ot(r.colorPrimary),g=us(p,80,.2),y=us(p,20,.8),m=us(p,75,.32),b=us(p,45,.4),v=p.clone().darken(5).toRgbString(),x=`${r.colorPrimary}-${i}-outer`,w=`${r.colorPrimary}-${i}-inner`,_=i==="flipped"?{x1:"0%",y1:"0%",x2:"100%",y2:"0%"}:{x1:"100%",y1:"0%",x2:"0%",y2:"0%"};return E(Y,wc(xc({},a),{children:[E(zt,{children:[E("linearGradient",wc(xc({id:x},_),{children:[d("stop",{offset:"0%",stopColor:g}),d("stop",{offset:"100%",stopColor:y})]})),E("linearGradient",wc(xc({id:w},_),{children:[d("stop",{offset:"0%",stopColor:m}),d("stop",{offset:"100%",stopColor:b})]}))]}),d(Lt,{width:l,height:l,fill:`url(#${x})`,"data-element-type":"shape"}),d(Lt,{x:h,y:h,width:c,height:c,fill:`url(#${w})`,stroke:"#FFFFFF",strokeWidth:1,"data-element-type":"shape"}),d($t,{indexes:e,x:f,y:f,width:u,height:u,lineHeight:1.1,alignHorizontal:"center",alignVertical:"middle",fill:v,fontWeight:"500",children:n.label})]}))};Vt("circle-node",{component:kg,composites:["label"]});function us(t,e,n){return ot.mix(t,"#ffffff",e).setAlpha(n).toRgbString()}var qO=Object.defineProperty,UO=Object.defineProperties,ZO=Object.getOwnPropertyDescriptors,zg=Object.getOwnPropertySymbols,KO=Object.prototype.hasOwnProperty,QO=Object.prototype.propertyIsEnumerable,Lg=(t,e,n)=>e in t?qO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_c=(t,e)=>{for(var n in e||(e={}))KO.call(e,n)&&Lg(t,n,e[n]);if(zg)for(var n of zg(e))QO.call(e,n)&&Lg(t,n,e[n]);return t},$c=(t,e)=>UO(t,ZO(e));const Rg=t=>{var e;const[{datum:n,indexes:r,size:i=120,strokeWidth:o=12,gap:s=8,themeColors:a,valueFormatter:l=_=>`${Math.round(_)}%`},c]=Wt(t,["size","strokeWidth","gap"]),h=(e=n.value)!=null?e:0,f=Math.min(Math.max(h/100,0),1),p=(i-o)/2,g=i/2,y=o/2,m=i-o,b=f>=1,v=f*360,x=JO(g,g,p,0,v),w={x:y,y,width:m,height:m};return E(Y,$c(_c({},c),{width:i,height:i+s+20,children:[d(St,{width:i,height:i,fill:"none"}),d(Lt,$c(_c({},w),{fill:"none",stroke:"#f0f0f0",strokeWidth:o,"data-element-type":"shape"})),b?d(Lt,$c(_c({},w),{fill:"none",stroke:a.colorPrimary,strokeWidth:o,"data-element-type":"shape"})):d(ht,{d:x,fill:"none",stroke:a.colorPrimary,strokeWidth:o,strokeLinecap:"round","data-element-type":"shape"}),d(xi,{indexes:r,x:o,y:o,width:m-o,height:m-o,fontSize:24,fontWeight:"bold",fill:a.colorPrimary,alignHorizontal:"center",alignVertical:"middle",value:h,formatter:l}),d($t,{indexes:r,x:0,y:i+s,width:i,alignHorizontal:"center",fontSize:12,fill:a.colorTextSecondary,children:n.label})]}))};function JO(t,e,n,r,i){const o=Hg(t,e,n,i),s=Hg(t,e,n,r),a=i-r<=180?"0":"1";return`M ${o.x} ${o.y} A ${n} ${n} 0 ${a} 0 ${s.x} ${s.y}`}function Hg(t,e,n,r){const i=(r-90)*Math.PI/180;return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}}Vt("circular-progress",{component:Rg,composites:["label","value"]});var tC=Object.defineProperty,eC=Object.defineProperties,nC=Object.getOwnPropertyDescriptors,Dg=Object.getOwnPropertySymbols,rC=Object.prototype.hasOwnProperty,iC=Object.prototype.propertyIsEnumerable,Ng=(t,e,n)=>e in t?tC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,oC=(t,e)=>{for(var n in e||(e={}))rC.call(e,n)&&Ng(t,n,e[n]);if(Dg)for(var n of Dg(e))iC.call(e,n)&&Ng(t,n,e[n]);return t},sC=(t,e)=>eC(t,nC(e));const jg=t=>{const[{datum:e,indexes:n,width:r=200,height:i=60,iconSize:o=20,gap:s=8,positionH:a="normal",themeColors:l,valueFormatter:c},h]=Wt(t,["width","height","iconSize","gap"]),u=e.value,f=u!=null,p="compact-shadow",g=a==="flipped"?r-s-o:s,y=a==="flipped"?s:o+2*s,m=r-o-3*s,b=f?m*.8:m,v=f?m*.2:0;return E(Y,sC(oC({},h),{children:[d(zt,{children:d("filter",{id:p,children:d("feDropShadow",{dx:"0",dy:"2",stdDeviation:"2",floodOpacity:"0.15"})})}),d(St,{x:0,y:0,width:r,height:i,fill:l.colorBgElevated,stroke:l.colorBgElevated,strokeWidth:1,rx:6,ry:6,filter:`url(#${p})`,"data-element-type":"shape"}),d(St,{x:a==="flipped"?r-3:0,y:0,width:3,height:i,fill:l.colorPrimary,rx:1.5,ry:1.5,"data-element-type":"shape"}),d(be,{indexes:n,x:g,y:(i-o)/2,size:o,fill:l.colorPrimary}),E(lt,{x:y,y:s,width:m,height:i-s*2,flexDirection:"column",justifyContent:"center",alignItems:"flex-start",children:[E(lt,{width:m,flexDirection:"row",justifyContent:"space-between",alignItems:"center",children:[d($t,{indexes:n,width:b,alignHorizontal:"left",fontSize:12,fill:l.colorText,children:e.label}),f&&d(xi,{indexes:n,width:v,alignHorizontal:"right",fontSize:12,fontWeight:"bold",fill:l.colorPrimary,value:u,formatter:c})]}),d(Xt,{indexes:n,width:m,alignHorizontal:"left",alignVertical:"middle",fontSize:10,fill:l.colorTextSecondary,lineNumber:2,wordWrap:!0,children:e.desc})]})]}))};Vt("compact-card",{component:jg,composites:["icon","label","value","desc"]});var aC=Object.defineProperty,lC=Object.defineProperties,cC=Object.getOwnPropertyDescriptors,Fg=Object.getOwnPropertySymbols,hC=Object.prototype.hasOwnProperty,dC=Object.prototype.propertyIsEnumerable,Bg=(t,e,n)=>e in t?aC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uC=(t,e)=>{for(var n in e||(e={}))hC.call(e,n)&&Bg(t,n,e[n]);if(Fg)for(var n of Fg(e))dC.call(e,n)&&Bg(t,n,e[n]);return t},fC=(t,e)=>lC(t,cC(e));const Wg=t=>{const[{datum:e,indexes:n,width:r=300,height:i=30,iconSize:o=30,gap:s=5,positionH:a="normal",positionV:l="middle",themeColors:c},h]=Wt(t,["width","height","iconSize","gap"]),u=r-o-s,f=l==="middle"?(i-o)/2:l==="flipped"?i-o:0;return E(Y,fC(uC({},h),{children:[d(ht,{"data-element-type":"shape",x:a==="flipped"?u+s:0,y:f,fill:c.colorPrimary,width:o,height:o,d:"M14.7273 30C6.54538 30 0 22.9077 0 14.7269C0 6.54617 6.54538 0 14.7273 0C22.9092 0 30 6.54617 30 14.7269C30 22.9077 22.9092 30 14.7273 30ZM24.5454 10.9077C22.9092 9.27307 22.9092 9.27307 22.9092 9.27307C22.3638 8.72692 22.3638 8.7269 21.8181 8.7269C21.2727 8.7269 21.2727 8.72692 20.7273 9.27307C13.0908 16.9077 13.0908 16.9077 13.0908 16.9077C8.72731 12.5461 8.72731 12.5462 8.72731 12.5462C8.18193 12.5462 8.18193 12 7.63654 12L7.09077 12.5462C4.90923 14.1808 4.90923 14.1808 4.90923 14.1808C4.90923 14.7269 4.90923 14.7269 4.90923 15.2731C4.90923 15.8192 4.90923 15.8192 4.90923 16.3654C12 23.4539 12 23.4538 12 23.4538C12.5454 23.4538 12.5454 23.4538 13.0908 23.4538C13.6365 23.4538 13.6365 23.4538 14.1819 23.4538C24.5454 12.5461 24.5454 12.5462 24.5454 12.5462L25.0908 12C25.0908 11.4538 24.5454 10.9077 24.5454 10.9077Z"}),d($t,{indexes:n,x:a==="flipped"?0:o+s,width:u,height:i,fontWeight:"normal",alignVertical:"middle",wordWrap:!1,fill:"#666",children:e.label||e.desc})]}))};Vt("done-list",{component:Wg,composites:["label"]});var pC=Object.defineProperty,gC=Object.defineProperties,mC=Object.getOwnPropertyDescriptors,Vg=Object.getOwnPropertySymbols,yC=Object.prototype.hasOwnProperty,vC=Object.prototype.propertyIsEnumerable,Yg=(t,e,n)=>e in t?pC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bC=(t,e)=>{for(var n in e||(e={}))yC.call(e,n)&&Yg(t,n,e[n]);if(Vg)for(var n of Vg(e))vC.call(e,n)&&Yg(t,n,e[n]);return t},xC=(t,e)=>gC(t,mC(e));const Xg=t=>{const[{indexes:e,datum:n,width:r=140,themeColors:i,positionV:o="normal"},s]=Wt(t,["width"]),a=o!=="flipped",l=o==="normal"?"bottom":"top",c=d($t,{indexes:e,width:r,fill:i.colorText,alignHorizontal:"center",alignVertical:l,fontSize:14,children:n.label}),h=d(Xt,{indexes:e,width:r,fill:i.colorTextSecondary,alignHorizontal:"center",alignVertical:l,children:n.desc}),u=d(nr,{indexes:e,fill:i.colorPrimary,colorBg:i.colorWhite}),f=d(_C,{width:8,height:30,fill:i.colorPrimary,positionV:o}),p=5,g=25,y=30,m=Q(c),b=Q(h),v=Q(u),x=Q(f),w=m.height+b.height+p+x.height-v.height-g,_=v.height+g+y+x.height+p+m.height+b.height;return d(Y,xC(bC({width:r,height:_},s),{children:E(lt,{flexDirection:"column",alignItems:"center",children:[a?E(Rt,{children:[h,c,d(Kt,{height:p}),f]}):E(Rt,{children:[d(Kt,{height:w}),u,d(Kt,{height:g})]}),E(Y,{children:[d(wC,{width:r,height:y,fill:i.colorPrimary}),d(Et,{x:r/2,y:y/2,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:n.time?n.time:String(e[0]+1).padStart(2,"0").slice(-2)})]}),a?E(Rt,{children:[d(Kt,{height:g}),u]}):E(Rt,{children:[f,d(Kt,{height:p}),c,h]})]})}))},wC=t=>{const{x:e=0,y:n=0,width:r=100,height:i=40,fill:o="#FF356A",size:s=10}=t;return d(Ne,{width:r,height:i,points:[{x:e,y:n},{x:e+r-s,y:n},{x:e+r,y:n+i/2},{x:e+r-s,y:n+i},{x:e,y:n+i},{x:e+s,y:n+i/2}],fill:o,"data-element-type":"shape"})},_C=t=>{const{x:e=0,y:n=0,width:r=10,height:i=50,fill:o,positionV:s="top"}=t,a=r/2,l=i-a,c=2,h=a;return E(ne,{x:e,y:n,width:r,height:i,children:[d(Lt,{width:r,height:r,fill:o,y:s==="top"?0:l-a}),d(ht,{d:s==="top"?`M${h},${a} L${h},${a+l}`:`M${h},0 L${h},${l-a}`,strokeWidth:c,stroke:o})]})};Vt("horizontal-icon-arrow",{component:Xg,composites:["icon","label","desc","time"]});var $C=Object.defineProperty,PC=Object.defineProperties,OC=Object.getOwnPropertyDescriptors,Gg=Object.getOwnPropertySymbols,CC=Object.prototype.hasOwnProperty,MC=Object.prototype.propertyIsEnumerable,qg=(t,e,n)=>e in t?$C(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ug=(t,e)=>{for(var n in e||(e={}))CC.call(e,n)&&qg(t,n,e[n]);if(Gg)for(var n of Gg(e))MC.call(e,n)&&qg(t,n,e[n]);return t},Zg=(t,e)=>PC(t,OC(e));const Kg=t=>{const[{indexes:e,datum:n,width:r=160,themeColors:i,positionH:o="center",positionV:s="normal"},a]=Wt(t,["width"]),l=o==="normal"?"left":o==="flipped"?"right":"center",c=d($t,{indexes:e,width:r,alignHorizontal:l,fill:i.colorPrimary,children:n.label}),h=Q(c),u=n.desc?d(Xt,{indexes:e,width:r,fill:i.colorTextSecondary,alignHorizontal:l,alignVertical:s==="flipped"?"top":"bottom",children:n.desc}):null,f=Q(u),g=n.icon?d(nr,{size:45,indexes:e,colorBg:i.colorBg,fill:i.colorPrimary}):null,y=Q(g),m=n.time?d(Et,{width:r,height:30,alignHorizontal:"center",alignVertical:"middle",fill:i.colorPrimary,fontSize:18,fontWeight:"bold",children:n.time}):null,b=Q(m),v=18,x=E(wi,{horizontal:"center",vertical:"middle",width:r,height:v,children:[d(St,{width:r,height:v,fill:i.colorPrimary,"data-element-type":"shape"}),d(Lt,{width:v+6,height:v+6,fill:i.colorBg,fillOpacity:.5,"data-element-type":"shape"}),d(Lt,{width:12,height:12,fill:"white","data-element-type":"shape"})]}),w=h.height+f.height,_=y.height+b.height+5,$=Math.abs(_-w),P=_>w?$:0,O=w>_?$:0;return s==="flipped"?E(lt,Zg(Ug({},a),{flexDirection:"column",alignItems:"center",children:[d(Kt,{height:O}),m,g,d(Kt,{height:5}),x,c,u,d(Kt,{height:P})]})):E(lt,Zg(Ug({},a),{flexDirection:"column",alignItems:"center",children:[d(Kt,{height:P}),c,u,x,d(Kt,{height:5}),g,m,d(Kt,{height:O})]}))};Vt("horizontal-icon-line",{component:Kg,composites:["icon","label","desc"]});var SC=Object.defineProperty,EC=Object.defineProperties,IC=Object.getOwnPropertyDescriptors,Qg=Object.getOwnPropertySymbols,TC=Object.prototype.hasOwnProperty,AC=Object.prototype.propertyIsEnumerable,Jg=(t,e,n)=>e in t?SC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kC=(t,e)=>{for(var n in e||(e={}))TC.call(e,n)&&Jg(t,n,e[n]);if(Qg)for(var n of Qg(e))AC.call(e,n)&&Jg(t,n,e[n]);return t},zC=(t,e)=>EC(t,IC(e));const t1=t=>{var e;const[{datum:n,indexes:r,size:i=80,iconSize:o=28,badgeSize:s=24,gap:a=8,themeColors:l,width:c=84,height:h=105},u]=Wt(t,["size","iconSize","badgeSize","gap"]),f=(e=n.value)!=null?e:0,p=`${l.colorPrimary}-icon`,g="#ff6b6b-badge";return E(Y,zC(kC({},u),{width:c,height:h,children:[E(zt,{children:[E("radialGradient",{id:p,cx:"50%",cy:"30%",r:"70%",children:[d("stop",{offset:"0%",stopColor:ot(l.colorPrimary).lighten(30).toHexString()}),d("stop",{offset:"100%",stopColor:l.colorPrimary})]}),E("linearGradient",{id:g,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#ff6b6b"}),d("stop",{offset:"100%",stopColor:"#ee5a52"})]})]}),d(Lt,{x:0,y:0,width:i,height:i,fill:`url(#${p})`,"data-element-type":"shape"}),d(be,{indexes:r,x:(i-o)/2,y:(i-o)/2,size:o,fill:l.colorPrimaryText}),d(Lt,{x:i-s+4,width:s,height:s,fill:`url(#${g})`}),d(Et,{x:i-s+4,width:s,height:s,fontSize:10,fontWeight:"bold",fill:l.colorWhite,alignHorizontal:"center",alignVertical:"middle",children:f>99?"99+":Math.round(f)}),d($t,{indexes:r,x:0,y:i+a,width:i,alignHorizontal:"center",fontSize:12,fill:l.colorText,children:n.label})]}))};Vt("icon-badge",{component:t1,composites:["icon","label"]});var LC=Object.defineProperty,RC=Object.defineProperties,HC=Object.getOwnPropertyDescriptors,e1=Object.getOwnPropertySymbols,DC=Object.prototype.hasOwnProperty,NC=Object.prototype.propertyIsEnumerable,n1=(t,e,n)=>e in t?LC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jC=(t,e)=>{for(var n in e||(e={}))DC.call(e,n)&&n1(t,n,e[n]);if(e1)for(var n of e1(e))NC.call(e,n)&&n1(t,n,e[n]);return t},FC=(t,e)=>RC(t,HC(e));const r1=t=>{const[{datum:e,indexes:n,width:r=200,borderRadius:i=12,padding:o=16,separatorHeight:s=2,indexFontSize:a=20,labelFontSize:l=16,gap:c=8,themeColors:h},u]=Wt(t,["width","height","borderRadius","padding","separatorHeight","indexFontSize","labelFontSize","gap"]),f=n[0]+1,p=String(f).padStart(2,"0"),g=e.label!==void 0,y=e.desc!==void 0,m=ot.mix(h.colorPrimary,h.colorWhite,40).toHexString(),b=h.colorBgElevated||h.colorWhite,v=r-2*o,x=Q(d(Et,{fontSize:a,fontWeight:"bold",children:p})),w=v-x.width-c,_=g?Q(d($t,{indexes:n,width:w,fontSize:l,fontWeight:"bold",x:a,children:e.label})):{height:0},$=y?Q(d(Xt,{indexes:n,width:v,fontSize:14,lineHeight:1.5,wordWrap:!0,children:e.desc})):{height:0},P=Math.max(x.height,_.height),O=o*2+P+(g||y?c:0)+s+(y?c:0)+$.height;return E(Y,FC(jC({},u),{width:r,height:O,children:[d(St,{x:0,y:0,width:r,height:O,rx:i,ry:i,fill:b,stroke:ot(b).darken(5).toHexString(),strokeWidth:.5,"data-element-type":"shape"}),E(Y,{x:o,y:o,children:[E(Y,{x:0,y:0,children:[d(Et,{x:0,y:0,fontSize:a,fontWeight:"bold",fill:h.colorPrimary,alignVertical:"top",children:p}),g&&d($t,{indexes:n,x:a+c,y:0,width:w,fontSize:l,fontWeight:"bold",fill:h.colorTextSecondary,alignVertical:"top",children:e.label})]}),d(St,{x:0,y:P+c,width:v,height:s,fill:m,"data-element-type":"shape"}),y&&d(Xt,{indexes:n,x:0,y:P+c+s+c,width:v,fontSize:14,lineHeight:1.5,wordWrap:!0,fill:h.colorTextSecondary,children:e.desc})]})]}))};Vt("indexed-card",{component:r1,composites:["label","desc"]});var BC=Object.defineProperty,WC=Object.defineProperties,VC=Object.getOwnPropertyDescriptors,i1=Object.getOwnPropertySymbols,YC=Object.prototype.hasOwnProperty,XC=Object.prototype.propertyIsEnumerable,o1=(t,e,n)=>e in t?BC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,GC=(t,e)=>{for(var n in e||(e={}))YC.call(e,n)&&o1(t,n,e[n]);if(i1)for(var n of i1(e))XC.call(e,n)&&o1(t,n,e[n]);return t},qC=(t,e)=>WC(t,VC(e));const s1=t=>{const[{indexes:e,datum:n,width:r=140,iconSize:i=24,themeColors:o},s]=Wt(t,["width","iconSize"]),{label:a,desc:l}=n,c=8,h=16,u=12,f=h+u,p=r-f,g=60,y=i+44,m=h,b=g+u,v=g+h+u,x=[{x:0,y:v},{x:m,y:b},{x:m,y:v}],w=r-m-u,_=m+u,$=_+w,P=b+c/2,O=P+y,T=`M ${_} ${O} L ${_} ${P} L ${$} ${P}`,I=c/2,S=_+I,H=P+I,C=8;return E(Y,qC(GC({},s),{children:[d(Xt,{indexes:e,x:f,width:p,height:g,fontSize:12,alignHorizontal:"left",alignVertical:"bottom",fill:o.colorTextSecondary,children:l}),d(Ne,{points:x,fill:o.colorPrimary,opacity:.9,width:h,height:h,"data-element-type":"shape"}),d(ht,{d:T,stroke:o.colorPrimary,strokeWidth:c,fill:"none","data-element-type":"shape"}),d(be,{indexes:e,x:S+w/2-i/2,y:H+C,size:i,fill:o.colorPrimary}),d($t,{indexes:e,x:S,y:H+i+C*2,width:w,fontSize:14,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:o.colorText,children:a})]}))};Vt("l-corner-card",{component:s1,composites:["icon","label","desc"]});var UC=Object.defineProperty,ZC=Object.defineProperties,KC=Object.getOwnPropertyDescriptors,a1=Object.getOwnPropertySymbols,QC=Object.prototype.hasOwnProperty,JC=Object.prototype.propertyIsEnumerable,l1=(t,e,n)=>e in t?UC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tM=(t,e)=>{for(var n in e||(e={}))QC.call(e,n)&&l1(t,n,e[n]);if(a1)for(var n of a1(e))JC.call(e,n)&&l1(t,n,e[n]);return t},eM=(t,e)=>ZC(t,KC(e));const c1=t=>{var e,n;const[{datum:r,indexes:i,width:o=280,height:s=160,showStripe:a=!0,showGradient:l=!0,showBottomShade:c=!0,themeColors:h},u]=Wt(t,["width","height","showStripe","showGradient","showBottomShade"]),f=(e=r.label)==null?void 0:e[0].toUpperCase(),p=(n=r.label)==null?void 0:n.toUpperCase(),g=h.colorPrimary,y=ot(g),m=4,b=6,v=45,x=40,w=12,$=y.clone().darken(4).toHexString(),P=y.clone().lighten(w).toHexString(),O="rgba(255, 255, 255, 0)",T="rgba(0, 0, 0, 0.03)",I=`letter-card-${i.join("-")}`,S=`${I}-gradient`,H=`${I}-pattern`,C=`${I}-shade`,A=m+b,B=1,k=96,D=k*B,z=16,N=z*B,j=s/16,X=D+j+N,L=(s-X)/2,M=L+D+j;return E(Y,eM(tM({},u),{width:o,height:s,children:[E(zt,{children:[l&&E("linearGradient",{id:S,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:$}),d("stop",{offset:"100%",stopColor:P})]}),a&&E("pattern",{id:H,patternUnits:"userSpaceOnUse",width:A,height:A,patternTransform:`rotate(${v})`,children:[d("rect",{x:"0",y:"0",width:A,height:A,fill:O}),d("rect",{x:"0",y:"0",width:m,height:A,fill:T})]}),c&&E("linearGradient",{id:C,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"rgba(0,0,0,0)"}),d("stop",{offset:"100%",stopColor:"rgba(0,0,0,0.16)"})]})]}),d(St,{x:0,y:0,width:o,height:s,fill:l?`url(#${S})`:g,rx:0,ry:0,"data-element-type":"shape"}),a&&d(St,{x:0,y:0,width:o,height:s,fill:`url(#${H})`,rx:0,ry:0}),c&&d(St,{x:0,y:s-x,width:o,height:x,fill:`url(#${C})`,rx:0,ry:0}),f&&d($t,{indexes:i,x:0,y:L,width:o,fontSize:k,fontWeight:"bold",fill:"#FFFFFF",alignHorizontal:"center",alignVertical:"top",lineHeight:1,children:f}),d($t,{indexes:i,x:0,y:M,width:o,fontSize:z,fontWeight:"bold",fill:"#FFFFFF",alignHorizontal:"center",alignVertical:"middle",lineHeight:1,children:p})]}))};Vt("letter-card",{component:c1,composites:["label"]});var nM=Object.defineProperty,rM=Object.defineProperties,iM=Object.getOwnPropertyDescriptors,h1=Object.getOwnPropertySymbols,oM=Object.prototype.hasOwnProperty,sM=Object.prototype.propertyIsEnumerable,d1=(t,e,n)=>e in t?nM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aM=(t,e)=>{for(var n in e||(e={}))oM.call(e,n)&&d1(t,n,e[n]);if(h1)for(var n of h1(e))sM.call(e,n)&&d1(t,n,e[n]);return t},lM=(t,e)=>rM(t,iM(e));const u1=t=>{var e,n,r;const[{datum:i,indexes:o,width:s,themeColors:a,positionH:l="normal",positionV:c="center",formatter:h=B=>B||"",usePaletteColor:u=!1,showUnderline:f=!1,underlineGap:p=6,underlineExtend:g=8,underlineThickness:y=2},m]=Wt(t,["width","formatter","usePaletteColor","showUnderline","underlineGap","underlineExtend","underlineThickness"]),b=h((n=(e=i.label)!=null?e:i.desc)!=null?n:""),v=l==="flipped"?"right":l==="center"?"center":"left",x=Q(d($t,{indexes:o,width:s,children:b})),w=s!=null?s:x.width,_=x.height,$=f?w+g*2:0,P=_+(f?p+y:0),O=f?Math.max(w,$):w,T=(r=m.height)!=null?r:P,I=c==="middle"?(T-P)/2:c==="flipped"?T-P:0,S=v==="right"?O-w:v==="center"?(O-w)/2:0,H=I,C=v==="right"?O-$:v==="center"?(O-$)/2:0,A=T;return E(Y,lM(aM({},m),{width:O,height:T,children:[d($t,{indexes:o,x:S,y:H,width:w,height:_,alignHorizontal:v,alignVertical:c==="flipped"?"bottom":c==="center"?"middle":"top",fill:u?a.colorPrimary:a.colorText,children:b}),f&&d(ht,{d:`M 0 ${y/2} L ${$} ${y/2}`,x:C,y:A-y/2,width:$,height:y,stroke:a.colorPrimary,strokeWidth:y,fill:"none",strokeLinecap:"round","data-element-type":"shape"})]}))};Vt("lined-text",{component:u1,composites:["label"]});var cM=Object.defineProperty,hM=Object.defineProperties,dM=Object.getOwnPropertyDescriptors,f1=Object.getOwnPropertySymbols,uM=Object.prototype.hasOwnProperty,fM=Object.prototype.propertyIsEnumerable,p1=(t,e,n)=>e in t?cM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pM=(t,e)=>{for(var n in e||(e={}))uM.call(e,n)&&p1(t,n,e[n]);if(f1)for(var n of f1(e))fM.call(e,n)&&p1(t,n,e[n]);return t},gM=(t,e)=>hM(t,dM(e));const g1=t=>{const[{datum:e,indexes:n,width:r=300,pillWidth:i=120,pillHeight:o=36,gap:s=16,positionH:a="normal",themeColors:l},c]=Wt(t,["width","pillWidth","pillHeight","gap"]),h=!!e.desc,u=h?r:i,f=h?a==="center"?(u-i)/2:a==="flipped"?u-i:0:0,p=0,g=0,y=o+s,m=u,b=`drop-shadow-${l.colorPrimary}`,v="linear-gradient-white-top-bottom";return E(Y,gM(pM({},c),{children:[E(zt,{children:[d(vc,{id:b,color:l.colorPrimary}),d(bc,{id:v,startColor:"#fff",stopColor:"#ffffff33",direction:"top-bottom"})]}),d(St,{x:f,y:p,width:i,height:o,fill:l.colorPrimaryBg,stroke:l.colorPrimary,rx:o/2,ry:o/2,filter:`url(#${b})`,"data-element-type":"shape"}),d(St,{x:f,y:p,width:i,height:o,fill:`url(#${v})`,opacity:l.isDarkMode?.4:.7,rx:o/2,ry:o/2}),d($t,{indexes:n,x:f,y:p,width:i,height:o,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"500",fill:l.colorText,children:e.label}),e.desc&&d(Xt,{indexes:n,x:g,y,width:m,alignHorizontal:a==="center"?"center":a==="flipped"?"right":"left",fontSize:12,fill:l.colorTextSecondary,lineNumber:2,wordWrap:!0,children:e.desc})]}))};Vt("pill-badge",{component:g1,composites:["label","desc"]});var mM=Object.defineProperty,yM=Object.defineProperties,vM=Object.getOwnPropertyDescriptors,m1=Object.getOwnPropertySymbols,bM=Object.prototype.hasOwnProperty,xM=Object.prototype.propertyIsEnumerable,y1=(t,e,n)=>e in t?mM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wM=(t,e)=>{for(var n in e||(e={}))bM.call(e,n)&&y1(t,n,e[n]);if(m1)for(var n of m1(e))xM.call(e,n)&&y1(t,n,e[n]);return t},_M=(t,e)=>yM(t,vM(e));const v1=t=>{var e;const[{indexes:n,datum:r,width:i=120,themeColors:o,positionH:s="normal",positionV:a="center",formatter:l=y=>y||"",usePaletteColor:c=!1,lineNumber:h=1},u]=Wt(t,["width","formatter","usePaletteColor","lineNumber"]),f=14,p=1.4,g=(e=u.height)!=null?e:Math.ceil(h*p*f);return d($t,_M(wM({},u),{indexes:n,width:i,height:g,lineHeight:p,fill:c?o.colorPrimary:o.colorText,fontSize:f,fontWeight:"regular",alignHorizontal:s==="flipped"?"right":s==="center"?"center":"left",alignVertical:a==="flipped"?"bottom":a==="center"?"middle":"top",children:l(r.label||r.desc)}))};Vt("plain-text",{component:v1,composites:["label"]});function fs(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function $M(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function b1(t){let e,n,r;t.length!==2?(e=fs,n=(a,l)=>fs(t(a),l),r=(a,l)=>t(a)-l):(e=t===fs||t===$M?t:PM,n=t,r=t);function i(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<0?c=u+1:h=u}while(c<h)}return c}function o(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<=0?c=u+1:h=u}while(c<h)}return c}function s(a,l,c=0,h=a.length){const u=i(a,l,c,h-1);return u>c&&r(a[u-1],l)>-r(a[u],l)?u-1:u}return{left:i,center:s,right:o}}function PM(){return 0}function OM(t){return t===null?NaN:+t}const CM=b1(fs).right;b1(OM).center;const MM=Math.sqrt(50),SM=Math.sqrt(10),EM=Math.sqrt(2);function ps(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=MM?10:o>=SM?5:o>=EM?2:1;let a,l,c;return i<0?(c=Math.pow(10,-i)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,i)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?ps(t,e,n*2):[a,l,c]}function IM(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,s]=r?ps(e,t,n):ps(t,e,n);if(!(o>=i))return[];const a=o-i+1,l=new Array(a);if(r)if(s<0)for(let c=0;c<a;++c)l[c]=(o-c)/-s;else for(let c=0;c<a;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(i+c)/-s;else for(let c=0;c<a;++c)l[c]=(i+c)*s;return l}function Pc(t,e,n){return e=+e,t=+t,n=+n,ps(t,e,n)[2]}function TM(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Pc(e,t,n):Pc(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}var AM={value:()=>{}};function Oc(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new gs(n)}function gs(t){this._=t}function kM(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}gs.prototype=Oc.prototype={constructor:gs,on:function(t,e){var n=this._,r=kM(t+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=zM(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(i=(t=r[o]).type)n[i]=x1(n[i],t.name,e);else if(e==null)for(i in n)n[i]=x1(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new gs(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function zM(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function x1(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=AM,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Cc="http://www.w3.org/1999/xhtml";const w1={svg:"http://www.w3.org/2000/svg",xhtml:Cc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ms(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),w1.hasOwnProperty(e)?{space:w1[e],local:t}:t}function LM(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Cc&&e.documentElement.namespaceURI===Cc?e.createElement(t):e.createElementNS(n,t)}}function RM(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function _1(t){var e=ms(t);return(e.local?RM:LM)(e)}function HM(){}function Mc(t){return t==null?HM:function(){return this.querySelector(t)}}function DM(t){typeof t!="function"&&(t=Mc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=new Array(s),l,c,h=0;h<s;++h)(l=o[h])&&(c=t.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),a[h]=c);return new We(r,this._parents)}function NM(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function jM(){return[]}function $1(t){return t==null?jM:function(){return this.querySelectorAll(t)}}function FM(t){return function(){return NM(t.apply(this,arguments))}}function BM(t){typeof t=="function"?t=FM(t):t=$1(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var s=e[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(r.push(t.call(l,l.__data__,c,s)),i.push(l));return new We(r,i)}function P1(t){return function(){return this.matches(t)}}function O1(t){return function(e){return e.matches(t)}}var WM=Array.prototype.find;function VM(t){return function(){return WM.call(this.children,t)}}function YM(){return this.firstElementChild}function XM(t){return this.select(t==null?YM:VM(typeof t=="function"?t:O1(t)))}var GM=Array.prototype.filter;function qM(){return Array.from(this.children)}function UM(t){return function(){return GM.call(this.children,t)}}function ZM(t){return this.selectAll(t==null?qM:UM(typeof t=="function"?t:O1(t)))}function KM(t){typeof t!="function"&&(t=P1(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new We(r,this._parents)}function C1(t){return new Array(t.length)}function QM(){return new We(this._enter||this._groups.map(C1),this._parents)}function ys(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ys.prototype={constructor:ys,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function JM(t){return function(){return t}}function tS(t,e,n,r,i,o){for(var s=0,a,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new ys(t,o[s]);for(;s<l;++s)(a=e[s])&&(i[s]=a)}function eS(t,e,n,r,i,o,s){var a,l,c=new Map,h=e.length,u=o.length,f=new Array(h),p;for(a=0;a<h;++a)(l=e[a])&&(f[a]=p=s.call(l,l.__data__,a,e)+"",c.has(p)?i[a]=l:c.set(p,l));for(a=0;a<u;++a)p=s.call(t,o[a],a,o)+"",(l=c.get(p))?(r[a]=l,l.__data__=o[a],c.delete(p)):n[a]=new ys(t,o[a]);for(a=0;a<h;++a)(l=e[a])&&c.get(f[a])===l&&(i[a]=l)}function nS(t){return t.__data__}function rS(t,e){if(!arguments.length)return Array.from(this,nS);var n=e?eS:tS,r=this._parents,i=this._groups;typeof t!="function"&&(t=JM(t));for(var o=i.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var h=r[c],u=i[c],f=u.length,p=iS(t.call(h,h&&h.__data__,c,r)),g=p.length,y=a[c]=new Array(g),m=s[c]=new Array(g),b=l[c]=new Array(f);n(h,u,y,m,b,p,e);for(var v=0,x=0,w,_;v<g;++v)if(w=y[v]){for(v>=x&&(x=v+1);!(_=m[x])&&++x<g;);w._next=_||null}}return s=new We(s,r),s._enter=a,s._exit=l,s}function iS(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function oS(){return new We(this._exit||this._groups.map(C1),this._parents)}function sS(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function aS(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),l=0;l<s;++l)for(var c=n[l],h=r[l],u=c.length,f=a[l]=new Array(u),p,g=0;g<u;++g)(p=c[g]||h[g])&&(f[g]=p);for(;l<i;++l)a[l]=n[l];return new We(a,this._parents)}function lS(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function cS(t){t||(t=hS);function e(u,f){return u&&f?t(u.__data__,f.__data__):!u-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s=n[o],a=s.length,l=i[o]=new Array(a),c,h=0;h<a;++h)(c=s[h])&&(l[h]=c);l.sort(e)}return new We(i,this._parents).order()}function hS(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function dS(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function uS(){return Array.from(this)}function fS(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function pS(){let t=0;for(const e of this)++t;return t}function gS(){return!this.node()}function mS(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,s=i.length,a;o<s;++o)(a=i[o])&&t.call(a,a.__data__,o,i);return this}function yS(t){return function(){this.removeAttribute(t)}}function vS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function bS(t,e){return function(){this.setAttribute(t,e)}}function xS(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function wS(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function _S(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function $S(t,e){var n=ms(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?vS:yS:typeof e=="function"?n.local?_S:wS:n.local?xS:bS)(n,e))}function M1(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function PS(t){return function(){this.style.removeProperty(t)}}function OS(t,e,n){return function(){this.style.setProperty(t,e,n)}}function CS(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function MS(t,e,n){return arguments.length>1?this.each((e==null?PS:typeof e=="function"?CS:OS)(t,e,n==null?"":n)):zr(this.node(),t)}function zr(t,e){return t.style.getPropertyValue(e)||M1(t).getComputedStyle(t,null).getPropertyValue(e)}function SS(t){return function(){delete this[t]}}function ES(t,e){return function(){this[t]=e}}function IS(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function TS(t,e){return arguments.length>1?this.each((e==null?SS:typeof e=="function"?IS:ES)(t,e)):this.node()[t]}function S1(t){return t.trim().split(/^|\s+/)}function Sc(t){return t.classList||new E1(t)}function E1(t){this._node=t,this._names=S1(t.getAttribute("class")||"")}E1.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function I1(t,e){for(var n=Sc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function T1(t,e){for(var n=Sc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function AS(t){return function(){I1(this,t)}}function kS(t){return function(){T1(this,t)}}function zS(t,e){return function(){(e.apply(this,arguments)?I1:T1)(this,t)}}function LS(t,e){var n=S1(t+"");if(arguments.length<2){for(var r=Sc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?zS:e?AS:kS)(n,e))}function RS(){this.textContent=""}function HS(t){return function(){this.textContent=t}}function DS(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function NS(t){return arguments.length?this.each(t==null?RS:(typeof t=="function"?DS:HS)(t)):this.node().textContent}function jS(){this.innerHTML=""}function FS(t){return function(){this.innerHTML=t}}function BS(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function WS(t){return arguments.length?this.each(t==null?jS:(typeof t=="function"?BS:FS)(t)):this.node().innerHTML}function VS(){this.nextSibling&&this.parentNode.appendChild(this)}function YS(){return this.each(VS)}function XS(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function GS(){return this.each(XS)}function qS(t){var e=typeof t=="function"?t:_1(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function US(){return null}function ZS(t,e){var n=typeof t=="function"?t:_1(t),r=e==null?US:typeof e=="function"?e:Mc(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function KS(){var t=this.parentNode;t&&t.removeChild(this)}function QS(){return this.each(KS)}function JS(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function tE(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function eE(t){return this.select(t?tE:JS)}function nE(t){return arguments.length?this.property("__data__",t):this.node().__data__}function rE(t){return function(e){t.call(this,e,this.__data__)}}function iE(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function oE(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function sE(t,e,n){return function(){var r=this.__on,i,o=rE(e);if(r){for(var s=0,a=r.length;s<a;++s)if((i=r[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function aE(t,e,n){var r=iE(t+""),i,o=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,h;l<c;++l)for(i=0,h=a[l];i<o;++i)if((s=r[i]).type===h.type&&s.name===h.name)return h.value}return}for(a=e?sE:oE,i=0;i<o;++i)this.each(a(r[i],e,n));return this}function A1(t,e,n){var r=M1(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function lE(t,e){return function(){return A1(this,t,e)}}function cE(t,e){return function(){return A1(this,t,e.apply(this,arguments))}}function hE(t,e){return this.each((typeof e=="function"?cE:lE)(t,e))}function*dE(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var uE=[null];function We(t,e){this._groups=t,this._parents=e}function Mi(){return new We([[document.documentElement]],uE)}function fE(){return this}We.prototype=Mi.prototype={constructor:We,select:DM,selectAll:BM,selectChild:XM,selectChildren:ZM,filter:KM,data:rS,enter:QM,exit:oS,join:sS,merge:aS,selection:fE,order:lS,sort:cS,call:dS,nodes:uS,node:fS,size:pS,empty:gS,each:mS,attr:$S,style:MS,property:TS,classed:LS,text:NS,html:WS,raise:YS,lower:GS,append:qS,insert:ZS,remove:QS,clone:eE,datum:nE,on:aE,dispatch:hE,[Symbol.iterator]:dE};function Ec(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function k1(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Si(){}var Ei=.7,vs=1/Ei,Lr="\\s*([+-]?\\d+)\\s*",Ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",on="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",pE=/^#([0-9a-f]{3,8})$/,gE=new RegExp(`^rgb\\(${Lr},${Lr},${Lr}\\)$`),mE=new RegExp(`^rgb\\(${on},${on},${on}\\)$`),yE=new RegExp(`^rgba\\(${Lr},${Lr},${Lr},${Ii}\\)$`),vE=new RegExp(`^rgba\\(${on},${on},${on},${Ii}\\)$`),bE=new RegExp(`^hsl\\(${Ii},${on},${on}\\)$`),xE=new RegExp(`^hsla\\(${Ii},${on},${on},${Ii}\\)$`),z1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ec(Si,ir,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:L1,formatHex:L1,formatHex8:wE,formatHsl:_E,formatRgb:R1,toString:R1});function L1(){return this.rgb().formatHex()}function wE(){return this.rgb().formatHex8()}function _E(){return F1(this).formatHsl()}function R1(){return this.rgb().formatRgb()}function ir(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=pE.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?H1(e):n===3?new Ee(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?bs(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?bs(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=gE.exec(t))?new Ee(e[1],e[2],e[3],1):(e=mE.exec(t))?new Ee(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=yE.exec(t))?bs(e[1],e[2],e[3],e[4]):(e=vE.exec(t))?bs(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=bE.exec(t))?j1(e[1],e[2]/100,e[3]/100,1):(e=xE.exec(t))?j1(e[1],e[2]/100,e[3]/100,e[4]):z1.hasOwnProperty(t)?H1(z1[t]):t==="transparent"?new Ee(NaN,NaN,NaN,0):null}function H1(t){return new Ee(t>>16&255,t>>8&255,t&255,1)}function bs(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ee(t,e,n,r)}function $E(t){return t instanceof Si||(t=ir(t)),t?(t=t.rgb(),new Ee(t.r,t.g,t.b,t.opacity)):new Ee}function Ic(t,e,n,r){return arguments.length===1?$E(t):new Ee(t,e,n,r==null?1:r)}function Ee(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Ec(Ee,Ic,k1(Si,{brighter(t){return t=t==null?vs:Math.pow(vs,t),new Ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ei:Math.pow(Ei,t),new Ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ee(or(this.r),or(this.g),or(this.b),xs(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:D1,formatHex:D1,formatHex8:PE,formatRgb:N1,toString:N1}));function D1(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}`}function PE(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}${sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function N1(){const t=xs(this.opacity);return`${t===1?"rgb(":"rgba("}${or(this.r)}, ${or(this.g)}, ${or(this.b)}${t===1?")":`, ${t})`}`}function xs(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function or(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function sr(t){return t=or(t),(t<16?"0":"")+t.toString(16)}function j1(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ve(t,e,n,r)}function F1(t){if(t instanceof Ve)return new Ve(t.h,t.s,t.l,t.opacity);if(t instanceof Si||(t=ir(t)),!t)return new Ve;if(t instanceof Ve)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,l=(o+i)/2;return a?(e===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-e)/a+2:s=(e-n)/a+4,a/=l<.5?o+i:2-o-i,s*=60):a=l>0&&l<1?0:s,new Ve(s,a,l,t.opacity)}function OE(t,e,n,r){return arguments.length===1?F1(t):new Ve(t,e,n,r==null?1:r)}function Ve(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ec(Ve,OE,k1(Si,{brighter(t){return t=t==null?vs:Math.pow(vs,t),new Ve(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ei:Math.pow(Ei,t),new Ve(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ee(Tc(t>=240?t-240:t+120,i,r),Tc(t,i,r),Tc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ve(B1(this.h),ws(this.s),ws(this.l),xs(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=xs(this.opacity);return`${t===1?"hsl(":"hsla("}${B1(this.h)}, ${ws(this.s)*100}%, ${ws(this.l)*100}%${t===1?")":`, ${t})`}`}}));function B1(t){return t=(t||0)%360,t<0?t+360:t}function ws(t){return Math.max(0,Math.min(1,t||0))}function Tc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Ac=t=>()=>t;function CE(t,e){return function(n){return t+n*e}}function ME(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function SE(t){return(t=+t)==1?W1:function(e,n){return n-e?ME(e,n,t):Ac(isNaN(e)?n:e)}}function W1(t,e){var n=e-t;return n?CE(t,n):Ac(isNaN(t)?e:t)}const _s=(function t(e){var n=SE(e);function r(i,o){var s=n((i=Ic(i)).r,(o=Ic(o)).r),a=n(i.g,o.g),l=n(i.b,o.b),c=W1(i.opacity,o.opacity);return function(h){return i.r=s(h),i.g=a(h),i.b=l(h),i.opacity=c(h),i+""}}return r.gamma=t,r})(1);function EE(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function IE(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function TE(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=Lc(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(a){for(s=0;s<r;++s)o[s]=i[s](a);return o}}function AE(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Ye(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function kE(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Lc(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var kc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zc=new RegExp(kc.source,"g");function zE(t){return function(){return t}}function LE(t){return function(e){return t(e)+""}}function V1(t,e){var n=kc.lastIndex=zc.lastIndex=0,r,i,o,s=-1,a=[],l=[];for(t=t+"",e=e+"";(r=kc.exec(t))&&(i=zc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Ye(r,i)})),n=zc.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?LE(l[0].x):zE(e):(e=l.length,function(c){for(var h=0,u;h<e;++h)a[(u=l[h]).i]=u.x(c);return a.join("")})}function Lc(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ac(e):(n==="number"?Ye:n==="string"?(r=ir(e))?(e=r,_s):V1:e instanceof ir?_s:e instanceof Date?AE:IE(e)?EE:Array.isArray(e)?TE:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?kE:Ye)(t,e)}function RE(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Y1=180/Math.PI,Rc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function X1(t,e,n,r,i,o){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),t*r<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Y1,skewX:Math.atan(l)*Y1,scaleX:s,scaleY:a}}var $s;function HE(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Rc:X1(e.a,e.b,e.c,e.d,e.e,e.f)}function DE(t){return t==null||($s||($s=document.createElementNS("http://www.w3.org/2000/svg","g")),$s.setAttribute("transform",t),!(t=$s.transform.baseVal.consolidate()))?Rc:(t=t.matrix,X1(t.a,t.b,t.c,t.d,t.e,t.f))}function G1(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,h,u,f,p,g){if(c!==u||h!==f){var y=p.push("translate(",null,e,null,n);g.push({i:y-4,x:Ye(c,u)},{i:y-2,x:Ye(h,f)})}else(u||f)&&p.push("translate("+u+e+f+n)}function s(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(i(u)+"rotate(",null,r)-2,x:Ye(c,h)})):h&&u.push(i(u)+"rotate("+h+r)}function a(c,h,u,f){c!==h?f.push({i:u.push(i(u)+"skewX(",null,r)-2,x:Ye(c,h)}):h&&u.push(i(u)+"skewX("+h+r)}function l(c,h,u,f,p,g){if(c!==u||h!==f){var y=p.push(i(p)+"scale(",null,",",null,")");g.push({i:y-4,x:Ye(c,u)},{i:y-2,x:Ye(h,f)})}else(u!==1||f!==1)&&p.push(i(p)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=t(c),h=t(h),o(c.translateX,c.translateY,h.translateX,h.translateY,u,f),s(c.rotate,h.rotate,u,f),a(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(p){for(var g=-1,y=f.length,m;++g<y;)u[(m=f[g]).i]=m.x(p);return u.join("")}}}var NE=G1(HE,"px, ","px)","deg)"),jE=G1(DE,", ",")",")"),Rr=0,Ti=0,Ai=0,q1=1e3,Ps,ki,Os=0,ar=0,Cs=0,zi=typeof performance=="object"&&performance.now?performance:Date,U1=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Hc(){return ar||(U1(FE),ar=zi.now()+Cs)}function FE(){ar=0}function Ms(){this._call=this._time=this._next=null}Ms.prototype=Dc.prototype={constructor:Ms,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Hc():+n)+(e==null?0:+e),!this._next&&ki!==this&&(ki?ki._next=this:Ps=this,ki=this),this._call=t,this._time=n,Nc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Nc())}};function Dc(t,e,n){var r=new Ms;return r.restart(t,e,n),r}function BE(){Hc(),++Rr;for(var t=Ps,e;t;)(e=ar-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Rr}function Z1(){ar=(Os=zi.now())+Cs,Rr=Ti=0;try{BE()}finally{Rr=0,VE(),ar=0}}function WE(){var t=zi.now(),e=t-Os;e>q1&&(Cs-=e,Os=t)}function VE(){for(var t,e=Ps,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ps=n);ki=t,Nc(r)}function Nc(t){if(!Rr){Ti&&(Ti=clearTimeout(Ti));var e=t-ar;e>24?(t<1/0&&(Ti=setTimeout(Z1,t-zi.now()-Cs)),Ai&&(Ai=clearInterval(Ai))):(Ai||(Os=zi.now(),Ai=setInterval(WE,q1)),Rr=1,U1(Z1))}}function K1(t,e,n){var r=new Ms;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var YE=Oc("start","end","cancel","interrupt"),XE=[],Q1=0,J1=1,jc=2,Ss=3,tm=4,Fc=5,Es=6;function Is(t,e,n,r,i,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;GE(t,n,{name:e,index:r,group:i,on:YE,tween:XE,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Q1})}function Bc(t,e){var n=Xe(t,e);if(n.state>Q1)throw new Error("too late; already scheduled");return n}function sn(t,e){var n=Xe(t,e);if(n.state>Ss)throw new Error("too late; already running");return n}function Xe(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function GE(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Dc(o,0,n.time);function o(c){n.state=J1,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var h,u,f,p;if(n.state!==J1)return l();for(h in r)if(p=r[h],p.name===n.name){if(p.state===Ss)return K1(s);p.state===tm?(p.state=Es,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[h]):+h<e&&(p.state=Es,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[h])}if(K1(function(){n.state===Ss&&(n.state=tm,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=jc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===jc){for(n.state=Ss,i=new Array(f=n.tween.length),h=0,u=-1;h<f;++h)(p=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(i[++u]=p);i.length=u+1}}function a(c){for(var h=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Fc,1),u=-1,f=i.length;++u<f;)i[u].call(t,h);n.state===Fc&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=Es,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function qE(t,e){var n=t.__transition,r,i,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((r=n[s]).name!==e){o=!1;continue}i=r.state>jc&&r.state<Fc,r.state=Es,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[s]}o&&delete t.__transition}}function UE(t){return this.each(function(){qE(this,t)})}function ZE(t,e){var n,r;return function(){var i=sn(this,t),o=i.tween;if(o!==n){r=n=o;for(var s=0,a=r.length;s<a;++s)if(r[s].name===e){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function KE(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=sn(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:e,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===e){i[l]=a;break}l===c&&i.push(a)}o.tween=i}}function QE(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Xe(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===t)return s.value;return null}return this.each((e==null?ZE:KE)(n,t,e))}function Wc(t,e,n){var r=t._id;return t.each(function(){var i=sn(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Xe(i,r).value[e]}}function em(t,e){var n;return(typeof e=="number"?Ye:e instanceof ir?_s:(n=ir(e))?(e=n,_s):V1)(t,e)}function JE(t){return function(){this.removeAttribute(t)}}function tI(t){return function(){this.removeAttributeNS(t.space,t.local)}}function eI(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttribute(t);return s===i?null:s===r?o:o=e(r=s,n)}}function nI(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===r?o:o=e(r=s,n)}}function rI(t,e,n){var r,i,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=a+"",s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a)))}}function iI(t,e,n){var r,i,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=a+"",s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a)))}}function oI(t,e){var n=ms(t),r=n==="transform"?jE:em;return this.attrTween(t,typeof e=="function"?(n.local?iI:rI)(n,r,Wc(this,"attr."+t,e)):e==null?(n.local?tI:JE)(n):(n.local?nI:eI)(n,r,e))}function sI(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function aI(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function lI(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&aI(t,o)),n}return i._value=e,i}function cI(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&sI(t,o)),n}return i._value=e,i}function hI(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=ms(t);return this.tween(n,(r.local?lI:cI)(r,e))}function dI(t,e){return function(){Bc(this,t).delay=+e.apply(this,arguments)}}function uI(t,e){return e=+e,function(){Bc(this,t).delay=e}}function fI(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?dI:uI)(e,t)):Xe(this.node(),e).delay}function pI(t,e){return function(){sn(this,t).duration=+e.apply(this,arguments)}}function gI(t,e){return e=+e,function(){sn(this,t).duration=e}}function mI(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?pI:gI)(e,t)):Xe(this.node(),e).duration}function yI(t,e){if(typeof e!="function")throw new Error;return function(){sn(this,t).ease=e}}function vI(t){var e=this._id;return arguments.length?this.each(yI(e,t)):Xe(this.node(),e).ease}function bI(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;sn(this,t).ease=n}}function xI(t){if(typeof t!="function")throw new Error;return this.each(bI(this._id,t))}function wI(t){typeof t!="function"&&(t=P1(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new bn(r,this._parents,this._name,this._id)}function _I(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var l=e[a],c=n[a],h=l.length,u=s[a]=new Array(h),f,p=0;p<h;++p)(f=l[p]||c[p])&&(u[p]=f);for(;a<r;++a)s[a]=e[a];return new bn(s,this._parents,this._name,this._id)}function $I(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function PI(t,e,n){var r,i,o=$I(e)?Bc:sn;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(e,n),s.on=i}}function OI(t,e){var n=this._id;return arguments.length<2?Xe(this.node(),n).on.on(t):this.each(PI(n,t,e))}function CI(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function MI(){return this.on("end.remove",CI(this._id))}function SI(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Mc(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a=r[s],l=a.length,c=o[s]=new Array(l),h,u,f=0;f<l;++f)(h=a[f])&&(u=t.call(h,h.__data__,f,a))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,Is(c[f],e,n,f,c,Xe(h,n)));return new bn(o,this._parents,e,n)}function EI(t){var e=this._name,n=this._id;typeof t!="function"&&(t=$1(t));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var l=r[a],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=t.call(h,h.__data__,u,l),p,g=Xe(h,n),y=0,m=f.length;y<m;++y)(p=f[y])&&Is(p,e,n,y,f,g);o.push(f),s.push(h)}return new bn(o,s,e,n)}var II=Mi.prototype.constructor;function TI(){return new II(this._groups,this._parents)}function AI(t,e){var n,r,i;return function(){var o=zr(this,t),s=(this.style.removeProperty(t),zr(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}function nm(t){return function(){this.style.removeProperty(t)}}function kI(t,e,n){var r,i=n+"",o;return function(){var s=zr(this,t);return s===i?null:s===r?o:o=e(r=s,n)}}function zI(t,e,n){var r,i,o;return function(){var s=zr(this,t),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),zr(this,t))),s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a))}}function LI(t,e){var n,r,i,o="style."+e,s="end."+o,a;return function(){var l=sn(this,t),c=l.on,h=l.value[o]==null?a||(a=nm(e)):void 0;(c!==n||i!==h)&&(r=(n=c).copy()).on(s,i=h),l.on=r}}function RI(t,e,n){var r=(t+="")=="transform"?NE:em;return e==null?this.styleTween(t,AI(t,r)).on("end.style."+t,nm(t)):typeof e=="function"?this.styleTween(t,zI(t,r,Wc(this,"style."+t,e))).each(LI(this._id,t)):this.styleTween(t,kI(t,r,e),n).on("end.style."+t,null)}function HI(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function DI(t,e,n){var r,i;function o(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&HI(t,s,n)),r}return o._value=e,o}function NI(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,DI(t,e,n==null?"":n))}function jI(t){return function(){this.textContent=t}}function FI(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function BI(t){return this.tween("text",typeof t=="function"?FI(Wc(this,"text",t)):jI(t==null?"":t+""))}function WI(t){return function(e){this.textContent=t.call(this,e)}}function VI(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&WI(i)),e}return r._value=t,r}function YI(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,VI(t))}function XI(){for(var t=this._name,e=this._id,n=rm(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var h=Xe(l,e);Is(l,t,n,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new bn(r,this._parents,t,n)}function GI(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var a={value:s},l={value:function(){--i===0&&o()}};n.each(function(){var c=sn(this,r),h=c.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),c.on=e}),i===0&&o()})}var qI=0;function bn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function rm(){return++qI}var xn=Mi.prototype;bn.prototype={constructor:bn,select:SI,selectAll:EI,selectChild:xn.selectChild,selectChildren:xn.selectChildren,filter:wI,merge:_I,selection:TI,transition:XI,call:xn.call,nodes:xn.nodes,node:xn.node,size:xn.size,empty:xn.empty,each:xn.each,on:OI,attr:oI,attrTween:hI,style:RI,styleTween:NI,text:BI,textTween:YI,remove:MI,tween:QE,delay:fI,duration:mI,ease:vI,easeVarying:xI,end:GI,[Symbol.iterator]:xn[Symbol.iterator]};function UI(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ZI={time:null,delay:0,duration:250,ease:UI};function KI(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function QI(t){var e,n;t instanceof bn?(e=t._id,t=t._name):(e=rm(),(n=ZI).time=Hc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&Is(l,t,e,c,s,n||KI(l,e));return new bn(r,this._parents,t,e)}Mi.prototype.interrupt=UE,Mi.prototype.transition=QI;const Vc=Math.PI,Yc=2*Vc,lr=1e-6,JI=Yc-lr;function im(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function tT(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return im;const n=Xi(10,e);return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class eT{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?im:tT(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,s){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,l=r-e,c=i-n,h=s-e,u=a-n,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>lr)if(!(Math.abs(u*l-c*h)>lr)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-s,g=i-a,y=l*l+c*c,m=p*p+g*g,b=Math.sqrt(y),v=Math.sqrt(f),x=o*Math.tan((Vc-Math.acos((y+f-m)/(2*b*v)))/2),w=x/v,_=x/b;Math.abs(w-1)>lr&&this._append`L${e+w*h},${n+w*u}`,this._append`A${o},${o},0,0,${+(u*p>h*g)},${this._x1=e+_*l},${this._y1=n+_*c}`}}arc(e,n,r,i,o,s){if(e=+e,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),l=r*Math.sin(i),c=e+a,h=n+l,u=1^s,f=s?i-o:o-i;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>lr||Math.abs(this._y1-h)>lr)&&this._append`L${c},${h}`,r&&(f<0&&(f=f%Yc+Yc),f>JI?this._append`A${r},${r},0,1,${u},${e-a},${n-l}A${r},${r},0,1,${u},${this._x1=c},${this._y1=h}`:f>lr&&this._append`A${r},${r},0,${+(f>=Vc)},${u},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function nT(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,s=n.length,a,l=0,c=0;for(o=0;o<s;++o)a=n[o],l+=a.x,c+=a.y;for(l=(l/s-t)*r,c=(c/s-e)*r,o=0;o<s;++o)a=n[o],a.x-=l,a.y-=c}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function rT(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return om(this.cover(e,n),e,n,t)}function om(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,s={data:r},a=t._x0,l=t._y0,c=t._x1,h=t._y1,u,f,p,g,y,m,b,v;if(!o)return t._root=s,t;for(;o.length;)if((y=e>=(u=(a+c)/2))?a=u:c=u,(m=n>=(f=(l+h)/2))?l=f:h=f,i=o,!(o=o[b=m<<1|y]))return i[b]=s,t;if(p=+t._x.call(null,o.data),g=+t._y.call(null,o.data),e===p&&n===g)return s.next=o,i?i[b]=s:t._root=s,t;do i=i?i[b]=new Array(4):t._root=new Array(4),(y=e>=(u=(a+c)/2))?a=u:c=u,(m=n>=(f=(l+h)/2))?l=f:h=f;while((b=m<<1|y)===(v=(g>=f)<<1|p>=u));return i[v]=o,i[b]=s,t}function iT(t){var e,n,r=t.length,i,o,s=new Array(r),a=new Array(r),l=1/0,c=1/0,h=-1/0,u=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(s[n]=i,a[n]=o,i<l&&(l=i),i>h&&(h=i),o<c&&(c=o),o>u&&(u=o));if(l>h||c>u)return this;for(this.cover(l,c).cover(h,u),n=0;n<r;++n)om(this,s[n],a[n],t[n]);return this}function oT(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var s=i-n||1,a=this._root,l,c;n>t||t>=i||r>e||e>=o;)switch(c=(e<r)<<1|t<n,l=new Array(4),l[c]=a,a=l,s*=2,c){case 0:i=n+s,o=r+s;break;case 1:n=i-s,o=r+s;break;case 2:i=n+s,r=o-s;break;case 3:n=i-s,r=o-s;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function sT(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function aT(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Pe(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function lT(t,e,n){var r,i=this._x0,o=this._y0,s,a,l,c,h=this._x1,u=this._y1,f=[],p=this._root,g,y;for(p&&f.push(new Pe(p,i,o,h,u)),n==null?n=1/0:(i=t-n,o=e-n,h=t+n,u=e+n,n*=n);g=f.pop();)if(!(!(p=g.node)||(s=g.x0)>h||(a=g.y0)>u||(l=g.x1)<i||(c=g.y1)<o))if(p.length){var m=(s+l)/2,b=(a+c)/2;f.push(new Pe(p[3],m,b,l,c),new Pe(p[2],s,b,m,c),new Pe(p[1],m,a,l,b),new Pe(p[0],s,a,m,b)),(y=(e>=b)<<1|t>=m)&&(g=f[f.length-1],f[f.length-1]=f[f.length-1-y],f[f.length-1-y]=g)}else{var v=t-+this._x.call(null,p.data),x=e-+this._y.call(null,p.data),w=v*v+x*x;if(w<n){var _=Math.sqrt(n=w);i=t-_,o=e-_,h=t+_,u=e+_,r=p.data}}return r}function cT(t){if(isNaN(h=+this._x.call(null,t))||isNaN(u=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,s=this._x0,a=this._y0,l=this._x1,c=this._y1,h,u,f,p,g,y,m,b;if(!n)return this;if(n.length)for(;;){if((g=h>=(f=(s+l)/2))?s=f:l=f,(y=u>=(p=(a+c)/2))?a=p:c=p,e=n,!(n=n[m=y<<1|g]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,b=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[b]=n:this._root=n),this):(this._root=o,this)}function hT(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function dT(){return this._root}function uT(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function fT(t){var e=[],n,r=this._root,i,o,s,a,l;for(r&&e.push(new Pe(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,s=n.y0,a=n.x1,l=n.y1)&&r.length){var c=(o+a)/2,h=(s+l)/2;(i=r[3])&&e.push(new Pe(i,c,h,a,l)),(i=r[2])&&e.push(new Pe(i,o,h,c,l)),(i=r[1])&&e.push(new Pe(i,c,s,a,h)),(i=r[0])&&e.push(new Pe(i,o,s,c,h))}return this}function pT(t){var e=[],n=[],r;for(this._root&&e.push(new Pe(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,s=r.x0,a=r.y0,l=r.x1,c=r.y1,h=(s+l)/2,u=(a+c)/2;(o=i[0])&&e.push(new Pe(o,s,a,h,u)),(o=i[1])&&e.push(new Pe(o,h,a,l,u)),(o=i[2])&&e.push(new Pe(o,s,u,h,c)),(o=i[3])&&e.push(new Pe(o,h,u,l,c))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function gT(t){return t[0]}function mT(t){return arguments.length?(this._x=t,this):this._x}function yT(t){return t[1]}function vT(t){return arguments.length?(this._y=t,this):this._y}function Xc(t,e,n){var r=new Gc(e==null?gT:e,n==null?yT:n,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Gc(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function sm(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Oe=Xc.prototype=Gc.prototype;Oe.copy=function(){var t=new Gc(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=sm(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=sm(r));return t},Oe.add=rT,Oe.addAll=iT,Oe.cover=oT,Oe.data=sT,Oe.extent=aT,Oe.find=lT,Oe.remove=cT,Oe.removeAll=hT,Oe.root=dT,Oe.size=uT,Oe.visit=fT,Oe.visitAfter=pT,Oe.x=mT,Oe.y=vT;function cr(t){return function(){return t}}function zn(t){return(t()-.5)*1e-6}function bT(t){return t.x+t.vx}function xT(t){return t.y+t.vy}function wT(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=cr(t==null?1:+t));function s(){for(var c,h=e.length,u,f,p,g,y,m,b=0;b<o;++b)for(u=Xc(e,bT,xT).visitAfter(a),c=0;c<h;++c)f=e[c],y=n[f.index],m=y*y,p=f.x+f.vx,g=f.y+f.vy,u.visit(v);function v(x,w,_,$,P){var O=x.data,T=x.r,I=y+T;if(O){if(O.index>f.index){var S=p-O.x-O.vx,H=g-O.y-O.vy,C=S*S+H*H;C<I*I&&(S===0&&(S=zn(r),C+=S*S),H===0&&(H=zn(r),C+=H*H),C=(I-(C=Math.sqrt(C)))/C*i,f.vx+=(S*=C)*(I=(T*=T)/(m+T)),f.vy+=(H*=C)*I,O.vx-=S*(I=1-I),O.vy-=H*I)}return}return w>p+I||$<p-I||_>g+I||P<g-I}}function a(c){if(c.data)return c.r=n[c.data.index];for(var h=c.r=0;h<4;++h)c[h]&&c[h].r>c.r&&(c.r=c[h].r)}function l(){if(e){var c,h=e.length,u;for(n=new Array(h),c=0;c<h;++c)u=e[c],n[u.index]=+t(u,c,e)}}return s.initialize=function(c,h){e=c,r=h,l()},s.iterations=function(c){return arguments.length?(o=+c,s):o},s.strength=function(c){return arguments.length?(i=+c,s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:cr(+c),l(),s):t},s}function _T(t){return t.index}function am(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function $T(t){var e=_T,n=u,r,i=cr(30),o,s,a,l,c,h=1;t==null&&(t=[]);function u(m){return 1/Math.min(a[m.source.index],a[m.target.index])}function f(m){for(var b=0,v=t.length;b<h;++b)for(var x=0,w,_,$,P,O,T,I;x<v;++x)w=t[x],_=w.source,$=w.target,P=$.x+$.vx-_.x-_.vx||zn(c),O=$.y+$.vy-_.y-_.vy||zn(c),T=Math.sqrt(P*P+O*O),T=(T-o[x])/T*m*r[x],P*=T,O*=T,$.vx-=P*(I=l[x]),$.vy-=O*I,_.vx+=P*(I=1-I),_.vy+=O*I}function p(){if(s){var m,b=s.length,v=t.length,x=new Map(s.map((_,$)=>[e(_,$,s),_])),w;for(m=0,a=new Array(b);m<v;++m)w=t[m],w.index=m,typeof w.source!="object"&&(w.source=am(x,w.source)),typeof w.target!="object"&&(w.target=am(x,w.target)),a[w.source.index]=(a[w.source.index]||0)+1,a[w.target.index]=(a[w.target.index]||0)+1;for(m=0,l=new Array(v);m<v;++m)w=t[m],l[m]=a[w.source.index]/(a[w.source.index]+a[w.target.index]);r=new Array(v),g(),o=new Array(v),y()}}function g(){if(s)for(var m=0,b=t.length;m<b;++m)r[m]=+n(t[m],m,t)}function y(){if(s)for(var m=0,b=t.length;m<b;++m)o[m]=+i(t[m],m,t)}return f.initialize=function(m,b){s=m,c=b,p()},f.links=function(m){return arguments.length?(t=m,p(),f):t},f.id=function(m){return arguments.length?(e=m,f):e},f.iterations=function(m){return arguments.length?(h=+m,f):h},f.strength=function(m){return arguments.length?(n=typeof m=="function"?m:cr(+m),g(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:cr(+m),y(),f):i},f}const PT=1664525,OT=1013904223,lm=4294967296;function CT(){let t=1;return()=>(t=(PT*t+OT)%lm)/lm}function MT(t){return t.x}function ST(t){return t.y}var ET=10,IT=Math.PI*(3-Math.sqrt(5));function TT(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,s=.6,a=new Map,l=Dc(u),c=Oc("tick","end"),h=CT();t==null&&(t=[]);function u(){f(),c.call("tick",e),n<r&&(l.stop(),c.call("end",e))}function f(y){var m,b=t.length,v;y===void 0&&(y=1);for(var x=0;x<y;++x)for(n+=(o-n)*i,a.forEach(function(w){w(n)}),m=0;m<b;++m)v=t[m],v.fx==null?v.x+=v.vx*=s:(v.x=v.fx,v.vx=0),v.fy==null?v.y+=v.vy*=s:(v.y=v.fy,v.vy=0);return e}function p(){for(var y=0,m=t.length,b;y<m;++y){if(b=t[y],b.index=y,b.fx!=null&&(b.x=b.fx),b.fy!=null&&(b.y=b.fy),isNaN(b.x)||isNaN(b.y)){var v=ET*Math.sqrt(.5+y),x=y*IT;b.x=v*Math.cos(x),b.y=v*Math.sin(x)}(isNaN(b.vx)||isNaN(b.vy))&&(b.vx=b.vy=0)}}function g(y){return y.initialize&&y.initialize(t,h),y}return p(),e={tick:f,restart:function(){return l.restart(u),e},stop:function(){return l.stop(),e},nodes:function(y){return arguments.length?(t=y,p(),a.forEach(g),e):t},alpha:function(y){return arguments.length?(n=+y,e):n},alphaMin:function(y){return arguments.length?(r=+y,e):r},alphaDecay:function(y){return arguments.length?(i=+y,e):+i},alphaTarget:function(y){return arguments.length?(o=+y,e):o},velocityDecay:function(y){return arguments.length?(s=1-y,e):1-s},randomSource:function(y){return arguments.length?(h=y,a.forEach(g),e):h},force:function(y,m){return arguments.length>1?(m==null?a.delete(y):a.set(y,g(m)),e):a.get(y)},find:function(y,m,b){var v=0,x=t.length,w,_,$,P,O;for(b==null?b=1/0:b*=b,v=0;v<x;++v)P=t[v],w=y-P.x,_=m-P.y,$=w*w+_*_,$<b&&(O=P,b=$);return O},on:function(y,m){return arguments.length>1?(c.on(y,m),e):c.on(y)}}}function AT(){var t,e,n,r,i=cr(-30),o,s=1,a=1/0,l=.81;function c(p){var g,y=t.length,m=Xc(t,MT,ST).visitAfter(u);for(r=p,g=0;g<y;++g)e=t[g],m.visit(f)}function h(){if(t){var p,g=t.length,y;for(o=new Array(g),p=0;p<g;++p)y=t[p],o[y.index]=+i(y,p,t)}}function u(p){var g=0,y,m,b=0,v,x,w;if(p.length){for(v=x=w=0;w<4;++w)(y=p[w])&&(m=Math.abs(y.value))&&(g+=y.value,b+=m,v+=m*y.x,x+=m*y.y);p.x=v/b,p.y=x/b}else{y=p,y.x=y.data.x,y.y=y.data.y;do g+=o[y.data.index];while(y=y.next)}p.value=g}function f(p,g,y,m){if(!p.value)return!0;var b=p.x-e.x,v=p.y-e.y,x=m-g,w=b*b+v*v;if(x*x/l<w)return w<a&&(b===0&&(b=zn(n),w+=b*b),v===0&&(v=zn(n),w+=v*v),w<s&&(w=Math.sqrt(s*w)),e.vx+=b*p.value*r/w,e.vy+=v*p.value*r/w),!0;if(p.length||w>=a)return;(p.data!==e||p.next)&&(b===0&&(b=zn(n),w+=b*b),v===0&&(v=zn(n),w+=v*v),w<s&&(w=Math.sqrt(s*w)));do p.data!==e&&(x=o[p.data.index]*r/w,e.vx+=b*x,e.vy+=v*x);while(p=p.next)}return c.initialize=function(p,g){t=p,n=g,h()},c.strength=function(p){return arguments.length?(i=typeof p=="function"?p:cr(+p),h(),c):i},c.distanceMin=function(p){return arguments.length?(s=p*p,c):Math.sqrt(s)},c.distanceMax=function(p){return arguments.length?(a=p*p,c):Math.sqrt(a)},c.theta=function(p){return arguments.length?(l=p*p,c):Math.sqrt(l)},c}function kT(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ts(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Hr(t){return t=Ts(Math.abs(t)),t?t[1]:NaN}function zT(t,e){return function(n,r){for(var i=n.length,o=[],s=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),o.push(n.substring(i-=a,i+a)),!((l+=a+1)>r));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function LT(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var RT=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function As(t){if(!(e=RT.exec(t)))throw new Error("invalid format: "+t);var e;return new qc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}As.prototype=qc.prototype;function qc(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}qc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function HT(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var cm;function DT(t,e){var n=Ts(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(cm=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Ts(t,Math.max(0,e+o-1))[0]}function hm(t,e){var n=Ts(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const dm={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:kT,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>hm(t*100,e),r:hm,s:DT,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function um(t){return t}var fm=Array.prototype.map,pm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function NT(t){var e=t.grouping===void 0||t.thousands===void 0?um:zT(fm.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?um:LT(fm.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(u){u=As(u);var f=u.fill,p=u.align,g=u.sign,y=u.symbol,m=u.zero,b=u.width,v=u.comma,x=u.precision,w=u.trim,_=u.type;_==="n"?(v=!0,_="g"):dm[_]||(x===void 0&&(x=12),w=!0,_="g"),(m||f==="0"&&p==="=")&&(m=!0,f="0",p="=");var $=y==="$"?n:y==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",P=y==="$"?r:/[%p]/.test(_)?s:"",O=dm[_],T=/[defgprs%]/.test(_);x=x===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function I(S){var H=$,C=P,A,B,k;if(_==="c")C=O(S)+C,S="";else{S=+S;var D=S<0||1/S<0;if(S=isNaN(S)?l:O(Math.abs(S),x),w&&(S=HT(S)),D&&+S==0&&g!=="+"&&(D=!1),H=(D?g==="("?g:a:g==="-"||g==="("?"":g)+H,C=(_==="s"?pm[8+cm/3]:"")+C+(D&&g==="("?")":""),T){for(A=-1,B=S.length;++A<B;)if(k=S.charCodeAt(A),48>k||k>57){C=(k===46?i+S.slice(A+1):S.slice(A))+C,S=S.slice(0,A);break}}}v&&!m&&(S=e(S,1/0));var z=H.length+S.length+C.length,N=z<b?new Array(b-z+1).join(f):"";switch(v&&m&&(S=e(N+S,N.length?b-C.length:1/0),N=""),p){case"<":S=H+S+C+N;break;case"=":S=H+N+S+C;break;case"^":S=N.slice(0,z=N.length>>1)+H+S+C+N.slice(z);break;default:S=N+H+S+C;break}return o(S)}return I.toString=function(){return u+""},I}function h(u,f){var p=c((u=As(u),u.type="f",u)),g=Math.max(-8,Math.min(8,Math.floor(Hr(f)/3)))*3,y=Math.pow(10,-g),m=pm[8+g/3];return function(b){return p(y*b)+m}}return{format:c,formatPrefix:h}}var ks,gm,mm;jT({thousands:",",grouping:[3],currency:["$",""]});function jT(t){return ks=NT(t),gm=ks.format,mm=ks.formatPrefix,ks}function FT(t){return Math.max(0,-Hr(Math.abs(t)))}function BT(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Hr(e)/3)))*3-Hr(Math.abs(t)))}function WT(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Hr(e)-Hr(t))+1}function VT(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function YT(){return this.eachAfter(VT)}function XT(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function GT(t,e){for(var n=this,r=[n],i,o,s=-1;n=r.pop();)if(t.call(e,n,++s,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function qT(t,e){for(var n=this,r=[n],i=[],o,s,a,l=-1;n=r.pop();)if(i.push(n),o=n.children)for(s=0,a=o.length;s<a;++s)r.push(o[s]);for(;n=i.pop();)t.call(e,n,++l,this);return this}function UT(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function ZT(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function KT(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function QT(t){for(var e=this,n=JT(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function JT(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function tA(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function eA(){return Array.from(this)}function nA(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function rA(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*iA(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Uc(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=aA)):e===void 0&&(e=sA);for(var n=new Li(t),r,i=[n],o,s,a,l;r=i.pop();)if((s=e(r.data))&&(l=(s=Array.from(s)).length))for(r.children=s,a=l-1;a>=0;--a)i.push(o=s[a]=new Li(s[a])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(cA)}function oA(){return Uc(this).eachBefore(lA)}function sA(t){return t.children}function aA(t){return Array.isArray(t)?t[1]:null}function lA(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function cA(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Li(t){this.data=t,this.depth=this.height=0,this.parent=null}Li.prototype=Uc.prototype={constructor:Li,count:YT,each:XT,eachAfter:qT,eachBefore:GT,find:UT,sum:ZT,sort:KT,path:QT,ancestors:tA,descendants:eA,leaves:nA,links:rA,copy:oA,[Symbol.iterator]:iA};function hA(t,e){return t.parent===e.parent?1:2}function Zc(t){var e=t.children;return e?e[0]:t.t}function Kc(t){var e=t.children;return e?e[e.length-1]:t.t}function dA(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function uA(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function fA(t,e,n){return t.a.parent===e.parent?t.a:n}function zs(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}zs.prototype=Object.create(Li.prototype);function pA(t){for(var e=new zs(t,0),n,r=[e],i,o,s,a;n=r.pop();)if(o=n._.children)for(n.children=new Array(a=o.length),s=a-1;s>=0;--s)r.push(i=n.children[s]=new zs(o[s],s)),i.parent=n;return(e.parent=new zs(null,0)).children=[e],e}function gA(){var t=hA,e=1,n=1,r=null;function i(c){var h=pA(c);if(h.eachAfter(o),h.parent.m=-h.z,h.eachBefore(s),r)c.eachBefore(l);else{var u=c,f=c,p=c;c.eachBefore(function(v){v.x<u.x&&(u=v),v.x>f.x&&(f=v),v.depth>p.depth&&(p=v)});var g=u===f?1:t(u,f)/2,y=g-u.x,m=e/(f.x+g+y),b=n/(p.depth||1);c.eachBefore(function(v){v.x=(v.x+y)*m,v.y=v.depth*b})}return c}function o(c){var h=c.children,u=c.parent.children,f=c.i?u[c.i-1]:null;if(h){uA(c);var p=(h[0].z+h[h.length-1].z)/2;f?(c.z=f.z+t(c._,f._),c.m=c.z-p):c.z=p}else f&&(c.z=f.z+t(c._,f._));c.parent.A=a(c,f,c.parent.A||u[0])}function s(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function a(c,h,u){if(h){for(var f=c,p=c,g=h,y=f.parent.children[0],m=f.m,b=p.m,v=g.m,x=y.m,w;g=Kc(g),f=Zc(f),g&&f;)y=Zc(y),p=Kc(p),p.a=c,w=g.z+v-f.z-m+t(g._,f._),w>0&&(dA(fA(g,c,u),c,w),m+=w,b+=w),v+=g.m,m+=f.m,x+=y.m,b+=p.m;g&&!Kc(p)&&(p.t=g,p.m+=v-b),f&&!Zc(y)&&(y.t=f,y.m+=m-x,u=c)}return u}function l(c){c.x*=e,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(t=c,i):t},i.size=function(c){return arguments.length?(r=!1,e=+c[0],n=+c[1],i):r?null:[e,n]},i.nodeSize=function(c){return arguments.length?(r=!0,e=+c[0],n=+c[1],i):r?[e,n]:null},i}function mA(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function yA(t){return function(){return t}}function vA(t){return+t}var ym=[0,1];function Dr(t){return t}function Qc(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:yA(isNaN(e)?NaN:.5)}function bA(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function xA(t,e,n){var r=t[0],i=t[1],o=e[0],s=e[1];return i<r?(r=Qc(i,r),o=n(s,o)):(r=Qc(r,i),o=n(o,s)),function(a){return o(r(a))}}function wA(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),s=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<r;)i[s]=Qc(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(a){var l=CM(t,a,1,r)-1;return o[l](i[l](a))}}function _A(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function $A(){var t=ym,e=ym,n=Lc,r,i,o,s=Dr,a,l,c;function h(){var f=Math.min(t.length,e.length);return s!==Dr&&(s=bA(t[0],t[f-1])),a=f>2?wA:xA,l=c=null,u}function u(f){return f==null||isNaN(f=+f)?o:(l||(l=a(t.map(r),e,n)))(r(s(f)))}return u.invert=function(f){return s(i((c||(c=a(e,t.map(r),Ye)))(f)))},u.domain=function(f){return arguments.length?(t=Array.from(f,vA),h()):t.slice()},u.range=function(f){return arguments.length?(e=Array.from(f),h()):e.slice()},u.rangeRound=function(f){return e=Array.from(f),n=RE,h()},u.clamp=function(f){return arguments.length?(s=f?!0:Dr,h()):s!==Dr},u.interpolate=function(f){return arguments.length?(n=f,h()):n},u.unknown=function(f){return arguments.length?(o=f,u):o},function(f,p){return r=f,i=p,h()}}function PA(){return $A()(Dr,Dr)}function OA(t,e,n,r){var i=TM(t,e,n),o;switch(r=As(r==null?",f":r),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=BT(i,s))&&(r.precision=o),mm(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=WT(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=FT(i))&&(r.precision=o-(r.type==="%")*2);break}}return gm(r)}function CA(t){var e=t.domain;return t.ticks=function(n){var r=e();return IM(r[0],r[r.length-1],n==null?10:n)},t.tickFormat=function(n,r){var i=e();return OA(i[0],i[i.length-1],n==null?10:n,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,s=r[i],a=r[o],l,c,h=10;for(a<s&&(c=s,s=a,a=c,c=i,i=o,o=c);h-- >0;){if(c=Pc(s,a,n),c===l)return r[i]=s,r[o]=a,e(r);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function Ri(){var t=PA();return t.copy=function(){return _A(t,Ri())},mA.apply(t,arguments),CA(t)}function ie(t){return function(){return t}}const vm=Math.abs,we=Math.atan2,hr=Math.cos,MA=Math.max,Jc=Math.min,an=Math.sin,Nr=Math.sqrt,Ie=1e-12,Hi=Math.PI,Ls=Hi/2,Rs=2*Hi;function SA(t){return t>1?0:t<-1?Hi:Math.acos(t)}function bm(t){return t>=1?Ls:t<=-1?-Ls:Math.asin(t)}function xm(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new eT(e)}function EA(t){return t.innerRadius}function IA(t){return t.outerRadius}function TA(t){return t.startAngle}function AA(t){return t.endAngle}function kA(t){return t&&t.padAngle}function zA(t,e,n,r,i,o,s,a){var l=n-t,c=r-e,h=s-i,u=a-o,f=u*l-h*c;if(!(f*f<Ie))return f=(h*(e-o)-u*(t-i))/f,[t+f*l,e+f*c]}function Hs(t,e,n,r,i,o,s){var a=t-n,l=e-r,c=(s?o:-o)/Nr(a*a+l*l),h=c*l,u=-c*a,f=t+h,p=e+u,g=n+h,y=r+u,m=(f+g)/2,b=(p+y)/2,v=g-f,x=y-p,w=v*v+x*x,_=i-o,$=f*y-g*p,P=(x<0?-1:1)*Nr(MA(0,_*_*w-$*$)),O=($*x-v*P)/w,T=(-$*v-x*P)/w,I=($*x+v*P)/w,S=(-$*v+x*P)/w,H=O-m,C=T-b,A=I-m,B=S-b;return H*H+C*C>A*A+B*B&&(O=I,T=S),{cx:O,cy:T,x01:-h,y01:-u,x11:O*(i/_-1),y11:T*(i/_-1)}}function Di(){var t=EA,e=IA,n=ie(0),r=null,i=TA,o=AA,s=kA,a=null,l=xm(c);function c(){var h,u,f=+t.apply(this,arguments),p=+e.apply(this,arguments),g=i.apply(this,arguments)-Ls,y=o.apply(this,arguments)-Ls,m=vm(y-g),b=y>g;if(a||(a=h=l()),p<f&&(u=p,p=f,f=u),!(p>Ie))a.moveTo(0,0);else if(m>Rs-Ie)a.moveTo(p*hr(g),p*an(g)),a.arc(0,0,p,g,y,!b),f>Ie&&(a.moveTo(f*hr(y),f*an(y)),a.arc(0,0,f,y,g,b));else{var v=g,x=y,w=g,_=y,$=m,P=m,O=s.apply(this,arguments)/2,T=O>Ie&&(r?+r.apply(this,arguments):Nr(f*f+p*p)),I=Jc(vm(p-f)/2,+n.apply(this,arguments)),S=I,H=I,C,A;if(T>Ie){var B=bm(T/f*an(O)),k=bm(T/p*an(O));($-=B*2)>Ie?(B*=b?1:-1,w+=B,_-=B):($=0,w=_=(g+y)/2),(P-=k*2)>Ie?(k*=b?1:-1,v+=k,x-=k):(P=0,v=x=(g+y)/2)}var D=p*hr(v),z=p*an(v),N=f*hr(_),j=f*an(_);if(I>Ie){var X=p*hr(x),L=p*an(x),M=f*hr(w),R=f*an(w),W;if(m<Hi)if(W=zA(D,z,M,R,X,L,N,j)){var U=D-W[0],V=z-W[1],G=X-W[0],Z=L-W[1],K=1/an(SA((U*G+V*Z)/(Nr(U*U+V*V)*Nr(G*G+Z*Z)))/2),nt=Nr(W[0]*W[0]+W[1]*W[1]);S=Jc(I,(f-nt)/(K-1)),H=Jc(I,(p-nt)/(K+1))}else S=H=0}P>Ie?H>Ie?(C=Hs(M,R,D,z,p,H,b),A=Hs(X,L,N,j,p,H,b),a.moveTo(C.cx+C.x01,C.cy+C.y01),H<I?a.arc(C.cx,C.cy,H,we(C.y01,C.x01),we(A.y01,A.x01),!b):(a.arc(C.cx,C.cy,H,we(C.y01,C.x01),we(C.y11,C.x11),!b),a.arc(0,0,p,we(C.cy+C.y11,C.cx+C.x11),we(A.cy+A.y11,A.cx+A.x11),!b),a.arc(A.cx,A.cy,H,we(A.y11,A.x11),we(A.y01,A.x01),!b))):(a.moveTo(D,z),a.arc(0,0,p,v,x,!b)):a.moveTo(D,z),!(f>Ie)||!($>Ie)?a.lineTo(N,j):S>Ie?(C=Hs(N,j,X,L,f,-S,b),A=Hs(D,z,M,R,f,-S,b),a.lineTo(C.cx+C.x01,C.cy+C.y01),S<I?a.arc(C.cx,C.cy,S,we(C.y01,C.x01),we(A.y01,A.x01),!b):(a.arc(C.cx,C.cy,S,we(C.y01,C.x01),we(C.y11,C.x11),!b),a.arc(0,0,f,we(C.cy+C.y11,C.cx+C.x11),we(A.cy+A.y11,A.cx+A.x11),b),a.arc(A.cx,A.cy,S,we(A.y11,A.x11),we(A.y01,A.x01),!b))):a.arc(0,0,f,_,w,b)}if(a.closePath(),h)return a=null,h+""||null}return c.centroid=function(){var h=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,u=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Hi/2;return[hr(u)*h,an(u)*h]},c.innerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:ie(+h),c):t},c.outerRadius=function(h){return arguments.length?(e=typeof h=="function"?h:ie(+h),c):e},c.cornerRadius=function(h){return arguments.length?(n=typeof h=="function"?h:ie(+h),c):n},c.padRadius=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:ie(+h),c):r},c.startAngle=function(h){return arguments.length?(i=typeof h=="function"?h:ie(+h),c):i},c.endAngle=function(h){return arguments.length?(o=typeof h=="function"?h:ie(+h),c):o},c.padAngle=function(h){return arguments.length?(s=typeof h=="function"?h:ie(+h),c):s},c.context=function(h){return arguments.length?(a=h==null?null:h,c):a},c}function wm(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function _m(t){this._context=t}_m.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function $m(t){return new _m(t)}function LA(t){return t[0]}function RA(t){return t[1]}function HA(t,e){var n=ie(!0),r=null,i=$m,o=null,s=xm(a);t=typeof t=="function"?t:t===void 0?LA:ie(t),e=typeof e=="function"?e:e===void 0?RA:ie(e);function a(l){var c,h=(l=wm(l)).length,u,f=!1,p;for(r==null&&(o=i(p=s())),c=0;c<=h;++c)!(c<h&&n(u=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(u,c,l),+e(u,c,l));if(p)return o=null,p+""||null}return a.x=function(l){return arguments.length?(t=typeof l=="function"?l:ie(+l),a):t},a.y=function(l){return arguments.length?(e=typeof l=="function"?l:ie(+l),a):e},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ie(!!l),a):n},a.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),a):i},a.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),a):r},a}function DA(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function NA(t){return t}function jA(){var t=NA,e=DA,n=null,r=ie(0),i=ie(Rs),o=ie(0);function s(a){var l,c=(a=wm(a)).length,h,u,f=0,p=new Array(c),g=new Array(c),y=+r.apply(this,arguments),m=Math.min(Rs,Math.max(-Rs,i.apply(this,arguments)-y)),b,v=Math.min(Math.abs(m)/c,o.apply(this,arguments)),x=v*(m<0?-1:1),w;for(l=0;l<c;++l)(w=g[p[l]=l]=+t(a[l],l,a))>0&&(f+=w);for(e!=null?p.sort(function(_,$){return e(g[_],g[$])}):n!=null&&p.sort(function(_,$){return n(a[_],a[$])}),l=0,u=f?(m-c*x)/f:0;l<c;++l,y=b)h=p[l],w=g[h],b=y+(w>0?w*u:0)+x,g[h]={data:a[h],index:l,value:w,startAngle:y,endAngle:b,padAngle:v};return g}return s.value=function(a){return arguments.length?(t=typeof a=="function"?a:ie(+a),s):t},s.sortValues=function(a){return arguments.length?(e=a,n=null,s):e},s.sort=function(a){return arguments.length?(n=a,e=null,s):n},s.startAngle=function(a){return arguments.length?(r=typeof a=="function"?a:ie(+a),s):r},s.endAngle=function(a){return arguments.length?(i=typeof a=="function"?a:ie(+a),s):i},s.padAngle=function(a){return arguments.length?(o=typeof a=="function"?a:ie(+a),s):o},s}function Ni(t,e,n){this.k=t,this.x=e,this.y=n}Ni.prototype={constructor:Ni,scale:function(t){return t===1?this:new Ni(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Ni(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Ni.prototype;var FA=Object.defineProperty,BA=Object.defineProperties,WA=Object.getOwnPropertyDescriptors,Pm=Object.getOwnPropertySymbols,VA=Object.prototype.hasOwnProperty,YA=Object.prototype.propertyIsEnumerable,Om=(t,e,n)=>e in t?FA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,XA=(t,e)=>{for(var n in e||(e={}))VA.call(e,n)&&Om(t,n,e[n]);if(Pm)for(var n of Pm(e))YA.call(e,n)&&Om(t,n,e[n]);return t},GA=(t,e)=>BA(t,WA(e));const Cm=t=>{const[{datum:e,data:n,indexes:r,width:i=280,height:o=120,iconSize:s=32,gap:a=12,progressHeight:l=8,borderRadius:c=12,positionH:h="normal",themeColors:u,valueFormatter:f=B=>`${B}%`},p]=Wt(t,["width","height","iconSize","gap","progressHeight","borderRadius"]),g=e.value,y=g!=null?g:0,m=Math.max(...n.items.map(B=>{var k;return(k=B.value)!=null?k:0}),100),b=i-2*a,x=Ri().domain([0,m]).range([0,b])(y),w=`${u.colorPrimary}-progress`,_=`${u.colorPrimaryBg}-progress-bg`,$=Q(d($t,{indexes:r})),P=a,O=h==="flipped"?i-a-s:a,T=P,I=h==="flipped"?a:s+2*a,S=i-s-3*a,H=T,C=o-a-l,A=g!==void 0;return E(Y,GA(XA({},p),{children:[E(zt,{children:[E("linearGradient",{id:w,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:u.colorPrimary}),d("stop",{offset:"100%",stopColor:ot.mix(u.colorPrimary,"#fff",20).toHexString()})]}),E("linearGradient",{id:_,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:u.colorPrimaryBg}),d("stop",{offset:"100%",stopColor:u.colorBg})]})]}),d(St,{x:0,y:0,width:i,height:o,fill:u.colorBgElevated,stroke:u.colorPrimaryBg,strokeWidth:1,rx:c,ry:c,"data-element-type":"shape"}),d(be,{indexes:r,x:O,y:T,size:s,fill:u.colorPrimary}),d($t,{indexes:r,x:I,y:H,width:S,alignHorizontal:h==="flipped"?"right":"left",alignVertical:"top",fontSize:16,fontWeight:"medium",fill:u.colorText,children:e.label}),A&&d(xi,{indexes:r,x:I,y:H+$.height,width:S,alignHorizontal:h==="flipped"?"right":"left",alignVertical:"top",lineHeight:1,fontSize:24,fontWeight:"bold",fill:u.colorPrimary,value:y,formatter:f}),d(Xt,{indexes:r,x:I,y:H+$.height+(A?27:4),width:S,alignHorizontal:h==="flipped"?"right":"left",alignVertical:"top",fontSize:11,fill:u.colorTextSecondary,lineNumber:A?2:3,wordWrap:!0,children:e.desc}),d(St,{x:a,y:C,width:b,height:l,fill:`url(#${_})`,rx:l/2,ry:l/2,"data-element-type":"shape"}),d(St,{x:a,y:C,width:x,height:l,fill:`url(#${w})`,rx:l/2,ry:l/2,"data-element-type":"shape"})]}))};Vt("progress-card",{component:Cm,composites:["icon","label","value","desc"]});var qA=Object.defineProperty,UA=Object.defineProperties,ZA=Object.getOwnPropertyDescriptors,Mm=Object.getOwnPropertySymbols,KA=Object.prototype.hasOwnProperty,QA=Object.prototype.propertyIsEnumerable,Sm=(t,e,n)=>e in t?qA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,JA=(t,e)=>{for(var n in e||(e={}))KA.call(e,n)&&Sm(t,n,e[n]);if(Mm)for(var n of Mm(e))QA.call(e,n)&&Sm(t,n,e[n]);return t},tk=(t,e)=>UA(t,ZA(e));const Em=t=>{const[{datum:e,indexes:n,width:r=280,height:i=120,iconSize:o=30,circleRadius:s=80,positionH:a="normal",positionV:l="normal",themeColors:c},h]=Wt(t,["width","height","iconSize","circleRadius"]),u=4*s/(3*Math.PI),f=2,p=4,g=28,y=20,m=y+20,b=y,v=8,x=35,w=40,_=30,$=String(n[0]+1).padStart(2,"0"),P=a==="flipped",O=l==="flipped",T=()=>P?{diagonalStartX:r-p,diagonalStartY:O?i-x:x,diagonalEndX:r-w,diagonalEndY:O?i-p:p,topLineStartX:r-w,topLineEndX:u,topLineY:O?i-p:p}:{diagonalStartX:p,diagonalStartY:O?i-x:x,diagonalEndX:w,diagonalEndY:O?i-p:p,topLineStartX:w,topLineEndX:r-u,topLineY:O?i-p:p},I=()=>{if(P){const D=s+10,z=r-D-w;return{valueX:r-_,contentX:D,contentWidth:z,circleX:0,circleY:O?0:i,iconX:u-o/2}}else return{valueX:0,contentX:w,contentWidth:r-w-s-10,circleX:r,circleY:O?0:i,iconX:r-u-o/2}},S=T(),H=I(),C=O?u-o/2:i-u-o/2,A=Q(d($t,{indexes:n,width:H.contentWidth,children:e.label})),B=b+A.height+v,k=()=>{const{circleX:D,circleY:z}=H;return P?O?`M ${D} ${z} L ${D} ${z+s} A ${s} ${s} 0 0 0 ${D+s} ${z} Z`:`M ${D} ${z} L ${D} ${z-s} A ${s} ${s} 0 0 1 ${D+s} ${z} Z`:O?`M ${D} ${z} L ${D} ${z+s} A ${s} ${s} 0 0 1 ${D-s} ${z} Z`:`M ${D} ${z} L ${D} ${z-s} A ${s} ${s} 0 0 0 ${D-s} ${z} Z`};return E(Y,tk(JA({},h),{width:r,height:i,children:[E(ne,{children:[d(ht,{d:`M ${S.diagonalStartX} ${S.diagonalStartY} L ${S.diagonalEndX} ${S.diagonalEndY}`,stroke:c.colorPrimary,strokeWidth:f,fill:"none"}),d(ht,{d:`M ${S.topLineStartX} ${S.topLineY} L ${S.topLineEndX} ${S.topLineY}`,stroke:c.colorPrimary,strokeWidth:f,fill:"none"}),d(Lt,{x:S.diagonalStartX-p,y:S.diagonalStartY-p,width:p*2,height:p*2,fill:c.colorPrimary}),d(Lt,{x:S.topLineEndX-p,y:S.topLineY-p,width:p*2,height:p*2,fill:c.colorPrimary})]}),E(Y,{children:[d(Et,{x:H.valueX,y:m,fontSize:g,fontWeight:"bold",fill:c.colorPrimary,children:$}),d(ht,{d:k(),fill:c.colorPrimary,"data-element-type":"shape"}),e.icon&&d(be,{indexes:n,x:H.iconX,y:C,size:o,fill:c.colorWhite}),e.label&&d($t,{indexes:n,x:H.contentX,y:b,width:H.contentWidth,fontWeight:"bold",fill:c.colorText,alignHorizontal:P?"right":"left",children:e.label}),e.desc&&d(Xt,{indexes:n,x:H.contentX,y:B,width:H.contentWidth,fill:c.colorTextSecondary,alignHorizontal:P?"right":"left",children:e.desc})]})]}))};Vt("quarter-circular",{component:Em,composites:["icon","label","desc"]});var ek=Object.defineProperty,nk=Object.defineProperties,rk=Object.getOwnPropertyDescriptors,Im=Object.getOwnPropertySymbols,ik=Object.prototype.hasOwnProperty,ok=Object.prototype.propertyIsEnumerable,Tm=(t,e,n)=>e in t?ek(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sk=(t,e)=>{for(var n in e||(e={}))ik.call(e,n)&&Tm(t,n,e[n]);if(Im)for(var n of Im(e))ok.call(e,n)&&Tm(t,n,e[n]);return t},ak=(t,e)=>nk(t,rk(e));const Am=t=>{const[{datum:e,indexes:n,width:r=150,height:i=150,iconSize:o=30,padding:s=20,borderRadius:a=16,positionH:l="center",positionV:c="middle",themeColors:h},u]=Wt(t,["width","height","iconSize","padding","borderRadius"]),f=r-s*2,p=s,g=s,y=l==="flipped"?r-s-o:l==="center"?(r-o)/2:p,m=g,b=m+o+8,v=Q(d($t,{indexes:n,width:f,children:e.label})),x=l==="flipped"?r-s-f:l==="center"?s:p,w=b+v.height+4,_=x,$=a;let P="";return l==="center"&&c==="middle"?P=`
30
+ `.replace(/\s+/g," ").trim()}function p0(t){if(!t||typeof t!="string")return[];try{const n=t.trim().replace(/,/g," ").replace(/\s+/g," ").split(" ").filter(Boolean),r=[];for(let i=0;i<n.length-1;i+=2){const o=parseFloat(n[i]),s=parseFloat(n[i+1]);if(isNaN(o)||isNaN(s)){console.warn(`Invalid coordinate pair at index ${i}: "${n[i]}", "${n[i+1]}"`);continue}r.push([o,s])}return n.length%2!==0&&console.warn(`Odd number of coordinates in points attribute, last value ignored: "${n[n.length-1]}"`),r}catch(e){return console.error("Failed to parse polygon points:",t,e),[]}}function g0(t,e,n){var r;const{themeConfig:i}=n,o=Object.assign({},(r=i.base)==null?void 0:r.shape,i.shape),s=ci(e,o);return Yt(e,s),_7(e,t,n),e}function w7(t,e){var n;Yt(t,((n=e.themeConfig.base)==null?void 0:n.shape)||{})}function _7(t,e,n){const r=n.themeConfig.stylize;if(!r)return t;const{type:i}=r;if(!i)return t;if(i==="rough")return y7(t,e,r);if(i==="pattern")return G_(t,e,n);if(i==="linear-gradient"||i==="radial-gradient"){const{fill:o,stroke:s}=ke(t,["fill","stroke"]);Wn(o)&&Xf(t,e,r,"fill"),Wn(s)&&Xf(t,e,r,"stroke");return}}function $7(t,e){var n;const{themeConfig:r}=e,{"font-family":i=Pl}=((n=r.base)==null?void 0:n.text)||{};t.setAttribute("font-family",i)}var P7=/\s/;function C7(t){for(var e=t.length;e--&&P7.test(t.charAt(e)););return e}var O7=/^\s+/;function M7(t){return t&&t.slice(0,C7(t)+1).replace(O7,"")}var m0=NaN,S7=/^[-+]0x[0-9a-f]+$/i,E7=/^0b[01]+$/i,I7=/^0o[0-7]+$/i,T7=parseInt;function Vl(t){if(typeof t=="number")return t;if(mo(t))return m0;if(nn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=nn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=M7(t);var n=E7.test(t);return n||I7.test(t)?T7(t.slice(2),n?2:8):S7.test(t)?m0:+t}function y0(t){return t}var Yl=Xn(en,"WeakMap"),v0=Object.create,A7=(function(){function t(){}return function(e){if(!nn(e))return{};if(v0)return v0(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function k7(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function L7(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var z7=800,H7=16,R7=Date.now;function D7(t){var e=0,n=0;return function(){var r=R7(),i=H7-(r-n);if(n=r,i>0){if(++e>=z7)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function N7(t){return function(){return t}}var Fo=(function(){try{var t=Xn(Object,"defineProperty");return t({},"",{}),t}catch(e){}})(),j7=Fo?function(t,e){return Fo(t,"toString",{configurable:!0,enumerable:!1,value:N7(e),writable:!0})}:y0,F7=D7(j7);function B7(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var W7=9007199254740991,V7=/^(?:0|[1-9]\d*)$/;function x0(t,e){var n=typeof t;return e=e==null?W7:e,!!e&&(n=="number"||n!="symbol"&&V7.test(t))&&t>-1&&t%1==0&&t<e}function Xl(t,e,n){e=="__proto__"&&Fo?Fo(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var Y7=Object.prototype,X7=Y7.hasOwnProperty;function b0(t,e,n){var r=t[e];(!(X7.call(t,e)&&yo(r,n))||n===void 0&&!(e in t))&&Xl(t,e,n)}function G7(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=void 0;l===void 0&&(l=t[a]),i?Xl(n,a,l):b0(n,a,l)}return n}var w0=Math.max;function q7(t,e,n){return e=w0(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=w0(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(s),k7(t,this,a)}}function U7(t,e){return F7(q7(t,e,y0),t+"")}var Z7=9007199254740991;function _0(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Z7}function Bo(t){return t!=null&&_0(t.length)&&!ol(t)}function K7(t,e,n){if(!nn(n))return!1;var r=typeof e;return(r=="number"?Bo(n)&&x0(e,n.length):r=="string"&&e in n)?yo(n[e],t):!1}function Q7(t){return U7(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,s&&K7(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,o)}return e})}var J7=Object.prototype;function Gl(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||J7;return t===n}function t9(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var e9="[object Arguments]";function $0(t){return En(t)&&Vn(t)==e9}var P0=Object.prototype,n9=P0.hasOwnProperty,r9=P0.propertyIsEnumerable,ql=$0((function(){return arguments})())?$0:function(t){return En(t)&&n9.call(t,"callee")&&!r9.call(t,"callee")};function i9(){return!1}var C0=typeof F=="object"&&F&&!F.nodeType&&F,O0=C0&&typeof module=="object"&&module&&!module.nodeType&&module,o9=O0&&O0.exports===C0,M0=o9?en.Buffer:void 0,s9=M0?M0.isBuffer:void 0,Ul=s9||i9,a9="[object Arguments]",l9="[object Array]",c9="[object Boolean]",h9="[object Date]",d9="[object Error]",u9="[object Function]",f9="[object Map]",p9="[object Number]",g9="[object Object]",m9="[object RegExp]",y9="[object Set]",v9="[object String]",x9="[object WeakMap]",b9="[object ArrayBuffer]",w9="[object DataView]",_9="[object Float32Array]",$9="[object Float64Array]",P9="[object Int8Array]",C9="[object Int16Array]",O9="[object Int32Array]",M9="[object Uint8Array]",S9="[object Uint8ClampedArray]",E9="[object Uint16Array]",I9="[object Uint32Array]",Zt={};Zt[_9]=Zt[$9]=Zt[P9]=Zt[C9]=Zt[O9]=Zt[M9]=Zt[S9]=Zt[E9]=Zt[I9]=!0,Zt[a9]=Zt[l9]=Zt[b9]=Zt[c9]=Zt[w9]=Zt[h9]=Zt[d9]=Zt[u9]=Zt[f9]=Zt[p9]=Zt[g9]=Zt[m9]=Zt[y9]=Zt[v9]=Zt[x9]=!1;function T9(t){return En(t)&&_0(t.length)&&!!Zt[Vn(t)]}function Zl(t){return function(e){return t(e)}}var S0=typeof F=="object"&&F&&!F.nodeType&&F,pi=S0&&typeof module=="object"&&module&&!module.nodeType&&module,A9=pi&&pi.exports===S0,Kl=A9&&fu.process,Tr=(function(){try{var t=pi&&pi.require&&pi.require("util").types;return t||Kl&&Kl.binding&&Kl.binding("util")}catch(e){}})(),E0=Tr&&Tr.isTypedArray,I0=E0?Zl(E0):T9,k9=Object.prototype,L9=k9.hasOwnProperty;function T0(t,e){var n=Mn(t),r=!n&&ql(t),i=!n&&!r&&Ul(t),o=!n&&!r&&!i&&I0(t),s=n||r||i||o,a=s?t9(t.length,String):[],l=a.length;for(var c in t)(e||L9.call(t,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||x0(c,l)))&&a.push(c);return a}function A0(t,e){return function(n){return t(e(n))}}var z9=A0(Object.keys,Object),H9=Object.prototype,R9=H9.hasOwnProperty;function D9(t){if(!Gl(t))return z9(t);var e=[];for(var n in Object(t))R9.call(t,n)&&n!="constructor"&&e.push(n);return e}function N9(t){return Bo(t)?T0(t):D9(t)}function j9(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var F9=Object.prototype,B9=F9.hasOwnProperty;function W9(t){if(!nn(t))return j9(t);var e=Gl(t),n=[];for(var r in t)r=="constructor"&&(e||!B9.call(t,r))||n.push(r);return n}function k0(t){return Bo(t)?T0(t,!0):W9(t)}function V9(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var L0=A0(Object.getPrototypeOf,Object),Y9="[object Object]",X9=Function.prototype,G9=Object.prototype,z0=X9.toString,q9=G9.hasOwnProperty,U9=z0.call(Object);function Z9(t){if(!En(t)||Vn(t)!=Y9)return!1;var e=L0(t);if(e===null)return!0;var n=q9.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&z0.call(n)==U9}function K9(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function Q9(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=Vl(n),n=n===n?n:0),e!==void 0&&(e=Vl(e),e=e===e?e:0),K9(Vl(t),e,n)}function J9(){this.__data__=new gn,this.size=0}function t8(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function e8(t){return this.__data__.get(t)}function n8(t){return this.__data__.has(t)}var r8=200;function i8(t,e){var n=this.__data__;if(n instanceof gn){var r=n.__data__;if(!ri||r.length<r8-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new In(r)}return n.set(t,e),this.size=n.size,this}function Qn(t){var e=this.__data__=new gn(t);this.size=e.size}Qn.prototype.clear=J9,Qn.prototype.delete=t8,Qn.prototype.get=e8,Qn.prototype.has=n8,Qn.prototype.set=i8;var H0=typeof F=="object"&&F&&!F.nodeType&&F,R0=H0&&typeof module=="object"&&module&&!module.nodeType&&module,o8=R0&&R0.exports===H0,D0=o8?en.Buffer:void 0,N0=D0?D0.allocUnsafe:void 0;function j0(t,e){if(e)return t.slice();var n=t.length,r=N0?N0(n):new t.constructor(n);return t.copy(r),r}function s8(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function a8(){return[]}var l8=Object.prototype,c8=l8.propertyIsEnumerable,F0=Object.getOwnPropertySymbols,h8=F0?function(t){return t==null?[]:(t=Object(t),s8(F0(t),function(e){return c8.call(t,e)}))}:a8;function d8(t,e,n){var r=e(t);return Mn(t)?r:V9(r,n(t))}function u8(t){return d8(t,N9,h8)}var Ql=Xn(en,"DataView"),Jl=Xn(en,"Promise"),tc=Xn(en,"Set"),B0="[object Map]",f8="[object Object]",W0="[object Promise]",V0="[object Set]",Y0="[object WeakMap]",X0="[object DataView]",p8=Yn(Ql),g8=Yn(ri),m8=Yn(Jl),y8=Yn(tc),v8=Yn(Yl),vn=Vn;(Ql&&vn(new Ql(new ArrayBuffer(1)))!=X0||ri&&vn(new ri)!=B0||Jl&&vn(Jl.resolve())!=W0||tc&&vn(new tc)!=V0||Yl&&vn(new Yl)!=Y0)&&(vn=function(t){var e=Vn(t),n=e==f8?t.constructor:void 0,r=n?Yn(n):"";if(r)switch(r){case p8:return X0;case g8:return B0;case m8:return W0;case y8:return V0;case v8:return Y0}return e});var x8=Object.prototype,b8=x8.hasOwnProperty;function w8(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&b8.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var G0=en.Uint8Array;function ec(t){var e=new t.constructor(t.byteLength);return new G0(e).set(new G0(t)),e}function _8(t,e){var n=ec(t.buffer);return new t.constructor(n,t.byteOffset,t.byteLength)}var $8=/\w*$/;function P8(t){var e=new t.constructor(t.source,$8.exec(t));return e.lastIndex=t.lastIndex,e}var q0=Sn?Sn.prototype:void 0,U0=q0?q0.valueOf:void 0;function C8(t){return U0?Object(U0.call(t)):{}}function Z0(t,e){var n=e?ec(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var O8="[object Boolean]",M8="[object Date]",S8="[object Map]",E8="[object Number]",I8="[object RegExp]",T8="[object Set]",A8="[object String]",k8="[object Symbol]",L8="[object ArrayBuffer]",z8="[object DataView]",H8="[object Float32Array]",R8="[object Float64Array]",D8="[object Int8Array]",N8="[object Int16Array]",j8="[object Int32Array]",F8="[object Uint8Array]",B8="[object Uint8ClampedArray]",W8="[object Uint16Array]",V8="[object Uint32Array]";function Y8(t,e,n){var r=t.constructor;switch(e){case L8:return ec(t);case O8:case M8:return new r(+t);case z8:return _8(t);case H8:case R8:case D8:case N8:case j8:case F8:case B8:case W8:case V8:return Z0(t,n);case S8:return new r;case E8:case A8:return new r(t);case I8:return P8(t);case T8:return new r;case k8:return C8(t)}}function K0(t){return typeof t.constructor=="function"&&!Gl(t)?A7(L0(t)):{}}var X8="[object Map]";function G8(t){return En(t)&&vn(t)==X8}var Q0=Tr&&Tr.isMap,q8=Q0?Zl(Q0):G8,U8="[object Set]";function Z8(t){return En(t)&&vn(t)==U8}var J0=Tr&&Tr.isSet,K8=J0?Zl(J0):Z8,Q8=1,tp="[object Arguments]",J8="[object Array]",t$="[object Boolean]",e$="[object Date]",n$="[object Error]",ep="[object Function]",r$="[object GeneratorFunction]",i$="[object Map]",o$="[object Number]",np="[object Object]",s$="[object RegExp]",a$="[object Set]",l$="[object String]",c$="[object Symbol]",h$="[object WeakMap]",d$="[object ArrayBuffer]",u$="[object DataView]",f$="[object Float32Array]",p$="[object Float64Array]",g$="[object Int8Array]",m$="[object Int16Array]",y$="[object Int32Array]",v$="[object Uint8Array]",x$="[object Uint8ClampedArray]",b$="[object Uint16Array]",w$="[object Uint32Array]",qt={};qt[tp]=qt[J8]=qt[d$]=qt[u$]=qt[t$]=qt[e$]=qt[f$]=qt[p$]=qt[g$]=qt[m$]=qt[y$]=qt[i$]=qt[o$]=qt[np]=qt[s$]=qt[a$]=qt[l$]=qt[c$]=qt[v$]=qt[x$]=qt[b$]=qt[w$]=!0,qt[n$]=qt[ep]=qt[h$]=!1;function Wo(t,e,n,r,i,o){var s,a=e&Q8;if(s!==void 0)return s;if(!nn(t))return t;var l=Mn(t);if(l)s=w8(t);else{var c=vn(t),h=c==ep||c==r$;if(Ul(t))return j0(t,a);if(c==np||c==tp||h&&!i)s=h?{}:K0(t);else{if(!qt[c])return i?t:{};s=Y8(t,c,a)}}o||(o=new Qn);var u=o.get(t);if(u)return u;o.set(t,s),K8(t)?t.forEach(function(g){s.add(Wo(g,e,n,g,t,o))}):q8(t)&&t.forEach(function(g,y){s.set(y,Wo(g,e,n,y,t,o))});var f=u8,p=l?void 0:f(t);return B7(p||t,function(g,y){p&&(y=g,g=t[y]),b0(s,y,Wo(g,e,n,y,t,o))}),s}var _$=1,$$=4;function rp(t){return Wo(t,_$|$$)}function P$(t){return function(e,n,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[++i];if(n(o[l],l,o)===!1)break}return e}}var C$=P$();function nc(t,e,n){(n!==void 0&&!yo(t[e],n)||n===void 0&&!(e in t))&&Xl(t,e,n)}function O$(t){return En(t)&&Bo(t)}function rc(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function M$(t){return G7(t,k0(t))}function S$(t,e,n,r,i,o,s){var a=rc(t,n),l=rc(e,n),c=s.get(l);if(c){nc(t,n,c);return}var h=o?o(a,l,n+"",t,e,s):void 0,u=h===void 0;if(u){var f=Mn(l),p=!f&&Ul(l),g=!f&&!p&&I0(l);h=l,f||p||g?Mn(a)?h=a:O$(a)?h=L7(a):p?(u=!1,h=j0(l,!0)):g?(u=!1,h=Z0(l,!0)):h=[]:Z9(l)||ql(l)?(h=a,ql(a)?h=M$(a):(!nn(a)||ol(a))&&(h=K0(l))):u=!1}u&&(s.set(l,h),i(h,l,r,o,s),s.delete(l)),nc(t,n,h)}function ip(t,e,n,r,i){t!==e&&C$(e,function(o,s){if(i||(i=new Qn),nn(o))S$(t,e,s,n,ip,r,i);else{var a=r?r(rc(t,s),o,s+"",t,e,i):void 0;a===void 0&&(a=o),nc(t,s,a)}},k0)}var E$=Xu(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),op=Q7(function(t,e,n){ip(t,e,n)});function ic(t,e,n={}){if(!e)return null;const r=t,i=ci(r,n);Yt(r,i);const o=A$(e,r);for(const s in r.dataset)o.setAttribute(`data-${E$(s)}`,r.dataset[s]);return o}function I$(t,e,n){var r,i;const o=e.nodeName==="text"?e:null;if(!o)return null;const{data:s,themeConfig:a}=n,l=mf(e.dataset.indexes||"0"),c=String(bu(oi(s,l),t,"")),h=Object.assign({},(r=a.base)==null?void 0:r.text,(i=a.item)==null?void 0:i[t]),u=ci(o,h);return ic(e,e.textContent||c,u)}function T$(t,e){var n;const r=((n=e.themeConfig.base)==null?void 0:n.text)||{};Yt(t,r),r["font-family"]&&t.setAttribute("font-family",Un(r["font-family"])),t.style.userSelect="none",t.style.pointerEvents="none"}const Vo=(t,e)=>t?parseFloat(t):e;function A$(t,e){const n=Vo(e.dataset.x,0),r=Vo(e.dataset.y,0),i=Vo(e.getAttribute("width")),o=Vo(e.getAttribute("height")),s=k$(e);return Object.assign(s,{x:n,y:r,width:i,height:o,"data-horizontal-align":e.dataset.horizontalAlign||"LEFT","data-vertical-align":e.dataset.verticalAlign||"TOP"}),C6(t,s)}function k$(t){return ke(t,["font-family","font-size","font-weight","font-style","font-variant","letter-spacing","line-height","fill","stroke","stroke-width"])}const Jn=(t,e)=>{t!==e&&(e?t.replaceWith(e):t.remove())};class L${constructor(e,n){this.options=e,this.template=n,this.rendered=!1}getOptions(){return this.options}getSVG(){return this.template}render(){const e=this.getSVG();if(this.rendered)return e;z$(e,this.options),e.style.visibility="hidden";const n=new MutationObserver(r=>{r.forEach(i=>{i.addedNodes.forEach(o=>{(o===e||o.contains(e))&&(D$(this.template,this.options),Yw(this.template),n.disconnect(),e.style.visibility="")})})});return n.observe(document,{childList:!0,subtree:!0}),this.rendered=!0,e}}function z$(t,e){H$(t,e),R$(t,e);const{themeConfig:n}=e;Gw(t,n==null?void 0:n.colorBg)}function H$(t,e){var n;const{themeConfig:r,data:i}=e;qw(t,(n=r.base)==null?void 0:n.global),t.querySelectorAll("[data-element-type]").forEach(s=>{var a,l,c,h;const u=s.id||"";if(I6(s)){const f=ic(s,i.title||"",Object.assign({},(a=r.base)==null?void 0:a.text,r.title));return Jn(s,f)}if(T6(s)){const f=ic(s,i.desc||"",Object.assign({},(l=r.base)==null?void 0:l.text,r.desc));return Jn(s,f)}if(L6(s)){const f=zf(t,s,(c=i.illus)==null?void 0:c[u]);return Jn(s,f)}if(k6(s))return Array.from(s.children).forEach(f=>{g0(t,f,e)});if(A6(s)){const f=g0(t,s,e);return Jn(s,f)}if(B6(s))return Uw(t,s);if((h=s.dataset.elementType)!=null&&h.startsWith("item-")){const f=mf(s.dataset.indexes||"0"),p=s.dataset.elementType.replace("item-",""),g=oi(i,f);if(R6(s)||D6(s)||N6(s)){const y=I$(p,s,e);return Jn(s,y)}if(!g)return;if(j6(s)){const y=c_(t,s,g);return Jn(s,y)}if(pl(s)){const y=r_(t,s,g,e);return Jn(s,y)}}if(z6(s))return T$(s,e);if(!H6(s))return w7(s,e)}),$7(t,e)}function R$(t,e){const{width:n,height:r}=e,{style:i={},attributes:o={},id:s,className:a}=e.svg||{};s&&(t.id=s),a&&t.classList.add(a),n!==void 0&&t.setAttribute("width",typeof n=="number"?`${n}px`:n),r!==void 0&&t.setAttribute("height",typeof r=="number"?`${r}px`:r),Object.assign(t.style,i),Yt(t,o)}function D$(t,e){const{padding:n=0,viewBox:r}=e;r?t.setAttribute("viewBox",r):n!==void 0&&sp(t,tr(n))}const oc=!!(typeof process!="undefined"&&process.versions&&process.versions.node);oc&&Aw(Rw);const sc=!oc&&typeof window!="undefined"&&typeof document!="undefined";let Yo=null,Se=null;function N$(){return sc?Yo||(Yo=document.createElement("canvas").getContext("2d"),Yo):null}function j$(){return!sc||!document.body?null:Se||(Se=document.createElement("span"),Se.style.position="absolute",Se.style.top="-10000px",Se.style.left="-10000px",Se.style.visibility="hidden",Se.style.pointerEvents="none",Se.style.whiteSpace="pre",Se.style.display="inline-block",Se.style.padding="0",Se.style.margin="0",document.body.appendChild(Se),Se)}function F$(t,e){if(e==null)return t*1.4;if(typeof e=="string"){const n=e.trim();if(n.endsWith("px")){const r=Number.parseFloat(n);return Number.isFinite(r)?r:t*1.4}e=Number(n)}return typeof e!="number"||!Number.isFinite(e)?t*1.4:e>4?e:e*t}function B$(t,{fontFamily:e,fontSize:n,fontWeight:r,lineHeight:i}){const o=t.split(/\r?\n/),s=Un(e),a=r||"normal",l=F$(n,i),c=N$();if(c)return c.font=`${a} ${n}px ${s}`,{width:o.reduce((p,g)=>{const y=c.measureText(g);return Math.max(p,y.width)},0),height:l*Math.max(o.length,1)};const h=j$();if(!h)return null;h.style.fontFamily=s,h.style.fontSize=`${n}px`,h.style.fontWeight=String(a),h.style.lineHeight=`${l}px`,h.textContent=t;const u=h.getBoundingClientRect();return{width:u.width,height:u.height}}function W$(t="",e){var n;if(e.width&&e.height)return{width:e.width,height:e.height};const{fontFamily:r=Pl,fontSize:i=14,fontWeight:o="normal",lineHeight:s=1.4}=e,a=t.toString(),l={fontFamily:r,fontSize:parseFloat(i.toString()),fontWeight:o,lineHeight:s},c=()=>Hw(a,l),h=sc&&(n=B$(a,l))!=null?n:c();return{width:Math.ceil(h.width*1.01),height:Math.ceil(h.height*1.01)}}function ac(t){const e=t.getAttribute("viewBox");if(e){const[s,a,l,c]=e.split(" ").map(Number);return{x:s,y:a,width:l,height:c}}const n=t.getAttribute("width"),r=t.getAttribute("height"),i=Number(n)||0,o=Number(r)||0;return{x:0,y:0,width:i,height:o}}function tr(t){return t?typeof t=="number"?[t,t,t,t]:t.length===1?[t[0],t[0],t[0],t[0]]:t.length===2?[t[0],t[1],t[0],t[1]]:t.length===3?[t[0],t[1],t[2],t[1]]:t.length===4?[t[0],t[1],t[2],t[3]]:[0,0,0,0]:[0,0,0,0]}function sp(t,e){if(oc)V$(t,e);else if(document.contains(t))ap(t,e);else{const n=new MutationObserver(r=>{r.forEach(i=>{i.addedNodes.forEach(o=>{(o===t||o.contains(t))&&(Y$(t,()=>{ap(t,e)}),n.disconnect())})})});n.observe(document,{childList:!0,subtree:!0})}}function V$(t,e){const n=ac(t),[r,i,o,s]=e;Yt(t,{viewBox:`${n.x-s} ${n.y-r} ${n.width+s+i} ${n.height+r+o}`})}function ap(t,e){const n=t.getBBox(),r=t.getBoundingClientRect(),i=r.width>0?n.width/r.width:1,o=r.height>0?n.height/r.height:1,[s,a,l,c]=e,h=s*o,u=a*i,f=l*o,p=c*i,g=n.x-p,y=n.y-h,m=n.width+p+u,x=n.height+h+f;Yt(t,{viewBox:`${g} ${y} ${m} ${x}`})}function Y$(t,e){requestAnimationFrame(()=>{const n=()=>{const r=t.getBoundingClientRect();r.width>0&&r.height>0?e():requestAnimationFrame(n)};n()})}function rn(t,e){if(document.getElementById(t))return;const n=document.createElement("style");n.id=t,n.textContent=e,document.head.appendChild(n)}function X$(){return crypto&&crypto.randomUUID?crypto.randomUUID():"xxxx-xxxx-4xxx-yxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var G$=Object.defineProperty,q$=Object.defineProperties,U$=Object.getOwnPropertyDescriptors,Xo=Object.getOwnPropertySymbols,lp=Object.prototype.hasOwnProperty,cp=Object.prototype.propertyIsEnumerable,hp=(t,e,n)=>e in t?G$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$e=(t,e)=>{for(var n in e||(e={}))lp.call(e,n)&&hp(t,n,e[n]);if(Xo)for(var n of Xo(e))cp.call(e,n)&&hp(t,n,e[n]);return t},lc=(t,e)=>q$(t,U$(e)),Z$=(t,e)=>{var n={};for(var r in t)lp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Xo)for(var r of Xo(t))e.indexOf(r)<0&&cp.call(t,r)&&(n[r]=t[r]);return n};function Tt(t){const e=t,{id:n,x:r=0,y:i=0,width:o,height:s,alignHorizontal:a="left",alignVertical:l="top",children:c,fontSize:h=14,fontFamily:u,fontStyle:f,fontWeight:p,textDecoration:g,letterSpacing:y,wordSpacing:m,opacity:x,fill:v="black",lineHeight:b,wordWrap:w,backgroundColor:_="none",backgroundOpacity:$=1,backgroundRadius:P=0}=e,C=Z$(e,["id","x","y","width","height","alignHorizontal","alignVertical","children","fontSize","fontFamily","fontStyle","fontWeight","textDecoration","letterSpacing","wordSpacing","opacity","fill","lineHeight","wordWrap","backgroundColor","backgroundOpacity","backgroundRadius"]);let T=o,E=s,S=0,R=0;if(!T||!E){const j=W$(c,t);T||(T=j.width),E||(E=j.height)}o&&(S=a==="center"?T/2:a==="right"?T:0),s&&(R=l==="middle"?E/2:l==="bottom"?E:0);const O=Object.entries($e($e({width:T,height:E},b!==void 0&&{"line-height":b}),w!==void 0&&{"data-word-wrap":w})).reduce((j,[X,z])=>lc($e({},j),{[X]:z}),{}),L=$e($e($e($e($e($e($e($e($e({"data-element-type":"text",width:T,height:E,x:S,y:R,"data-x":0,"data-y":0,fill:v,fontSize:h,textAnchor:a==="center"?"middle":a==="right"?"end":"start",dominantBaseline:l==="middle"?"central":l==="bottom"?"baseline":"hanging","data-horizontal-align":a.toUpperCase(),"data-vertical-align":l.toUpperCase(),children:c},O),C),u&&{fontFamily:u}),f&&{fontStyle:f}),p&&{fontWeight:p}),g&&g!=="none"&&{textDecoration:g}),y&&{letterSpacing:y}),m&&{wordSpacing:m}),x!==void 0&&x!==1&&{opacity:x}),D=$e(lc($e({},r!==0||i!==0?{x:r,y:i,transform:`translate(${r}, ${i})`}:{}),{width:T,height:E}),n&&{id:n}),N=_&&_!=="none"?{"data-element-type":"shape",x:0,y:0,width:T,height:E,fill:_,fillOpacity:$,rx:P,ry:P}:void 0;return{type:"g",props:lc($e({},D),{children:[...N?[{type:"rect",props:N}]:[],{type:"text",props:L}]})}}const gi=Symbol.for("@antv/infographic/Fragment");function Go(t,e={}){return{type:t,props:e}}function K$(t={}){return Go(gi,t)}const Q$=Go,J$=Go;function tP(t){return!t||typeof t!="object"||Array.isArray(t)?!1:t.type===gi}function dp(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&"type"in t}function mi(t){return yi(t).filter(dp)}function yi(t,e=[]){var n;if(!t||typeof t=="boolean")return e;if(Array.isArray(t))t.forEach(r=>yi(r,e));else if(tP(t)){const r=(n=t.props)==null?void 0:n.children;(Array.isArray(r)?r:[r]).filter(Boolean).forEach(i=>{yi(i,e)})}else e.push(t);return e}function Ft(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}const qo=()=>({x:0,y:0,width:0,height:0});function Ar(t){if(!t||t.length===0)return qo();let e=1/0,n=1/0,r=-1/0,i=-1/0;for(const o of t){const{x:s,y:a,width:l,height:c}=o,h=s+l,u=a+c;s<e&&(e=s),a<n&&(n=a),h>r&&(r=h),u>i&&(i=u)}return e===1/0||n===1/0||r===-1/0||i===-1/0?{x:0,y:0,width:0,height:0}:{x:e,y:n,width:Math.max(0,r-e),height:Math.max(0,i-n)}}function Q(t){var e,n,r,i;if(!t)return qo();if(Array.isArray(t)){const p=mi(t);return er(p)}if(typeof t!="object")return qo();const{type:o,props:s={}}=t;if(pc(t)){const p=vp(t);return Q(p)}if(typeof o=="function"){const p=(e=s.x)!=null?e:0,g=(n=s.y)!=null?n:0,y=s.width,m=s.height;if(Ft(y)&&Ft(m))return{x:p,y:g,width:y,height:m};const x=o(s);if(!x)return{x:p,y:g,width:y!=null?y:0,height:m!=null?m:0};if(Array.isArray(x)){const v=mi(x),b=er(v);if(Ft(y)&&Ft(m))return{x:p,y:g,width:y,height:m};const w=b.width!==0?b.width:y!=null?y:0,_=b.height!==0?b.height:m!=null?m:0;return{x:p+b.x,y:g+b.y,width:w,height:_}}if(dp(x)){const v=x,b=Q(v);if(eP(v,s))return b;const w=v.props&&Ft(v.props.width)&&Ft(v.props.height),P=up(v).flatMap(S=>mi(S)).length>0,C=v.props&&v.props.x===s.x&&v.props.y===s.y;if(w)return{x:C?b.x:p+b.x,y:C?b.y:g+b.y,width:b.width,height:b.height};if(Ft(y)&&Ft(m))return P?{x:C?b.x:p,y:C?b.y:g,width:y,height:m}:{x:C?b.x:p+b.x,y:C?b.y:g+b.y,width:y,height:m};const T=b.width!==0?b.width:y!=null?y:0,E=b.height!==0?b.height:m!=null?m:0;return{x:C?b.x:p+b.x,y:C?b.y:g+b.y,width:T,height:E}}return{x:p,y:g,width:y!=null?y:0,height:m!=null?m:0}}const a=(r=s.x)!=null?r:0,l=(i=s.y)!=null?i:0,c=Ft(s.width)?s.width:void 0,h=Ft(s.height)?s.height:void 0;if(Ft(c)&&Ft(h))return{x:a,y:l,width:c,height:h};const f=up(t).flatMap(p=>mi(p));if(f.length>0){const p=er(f);return{x:a+p.x,y:l+p.y,width:Ft(c)?c:p.width,height:Ft(h)?h:p.height}}return{x:a,y:l,width:c!=null?c:0,height:h!=null?h:0}}function er(t){if(!t||!Array.isArray(t)||t.length===0)return qo();const e=[];for(const n of t){const r=mi(n);for(const i of r){const o=Q(i);o&&e.push(o)}}return Ar(e)}function eP(t,e){if(!(t!=null&&t.props)||!e)return!1;const n=t.props;if(Ft(n.x)&&Ft(n.y)&&Ft(e.x)&&Ft(e.y)&&n.x===e.x&&n.y===e.y){const r=Ft(n.width)&&Ft(n.height),i=Ft(e.width)&&Ft(e.height);if(!r&&!i)return!0}return Ft(n.x)&&Ft(n.y)&&Ft(n.width)&&Ft(n.height)&&Ft(e.x)&&Ft(e.y)&&Ft(e.width)&&Ft(e.height)?n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height:!1}function up(t){var e;const n=(e=t.props)==null?void 0:e.children;return n?Array.isArray(n)?n:[n]:[]}function cc(t){var e;return t==null||typeof t=="boolean"?[]:Array.isArray(t)?yi(t):typeof t=="object"?yi((e=t.props)==null?void 0:e.children):[t]}var nP=Object.defineProperty,Uo=Object.getOwnPropertySymbols,fp=Object.prototype.hasOwnProperty,pp=Object.prototype.propertyIsEnumerable,gp=(t,e,n)=>e in t?nP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hc=(t,e)=>{for(var n in e||(e={}))fp.call(e,n)&&gp(t,n,e[n]);if(Uo)for(var n of Uo(e))pp.call(e,n)&&gp(t,n,e[n]);return t},rP=(t,e)=>{var n={};for(var r in t)fp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Uo)for(var r of Uo(t))e.indexOf(r)<0&&pp.call(t,r)&&(n[r]=t[r]);return n};const kn=(t,e)=>{const n=t,{type:r,props:i}=n,o=rP(n,["type","props"]);return hc({type:r,props:hc(hc({},i),e)},o)},mp=()=>({defs:new Map});function dc(t){const e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return String(t).replace(/[&<>"']/g,n=>e[n])}const yp={className:"class",viewBox:"viewBox",preserveAspectRatio:"preserveAspectRatio",gradientUnits:"gradientUnits",gradientTransform:"gradientTransform",patternUnits:"patternUnits",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",maskUnits:"maskUnits",maskContentUnits:"maskContentUnits",clipPathUnits:"clipPathUnits",primitiveUnits:"primitiveUnits",filterUnits:"filterUnits",markerUnits:"markerUnits",markerWidth:"markerWidth",markerHeight:"markerHeight",refX:"refX",refY:"refY",xmlLang:"xml:lang",xmlSpace:"xml:space",xmlnsXlink:"xmlns:xlink",xlinkHref:"href",xlinkTitle:"xlink:title",xlinkShow:"xlink:show",xlinkActuate:"xlink:actuate",textLength:"textLength",lengthAdjust:"lengthAdjust",repeatCount:"repeatCount",repeatDur:"repeatDur",calcMode:"calcMode",keyTimes:"keyTimes",keySplines:"keySplines",keyPoints:"keyPoints",stdDeviation:"stdDeviation",baseFrequency:"baseFrequency",numOctaves:"numOctaves",pathLength:"pathLength",systemLanguage:"systemLanguage",requiredFeatures:"requiredFeatures",requiredExtensions:"requiredExtensions"};function iP(t){return yp[t]?yp[t]:t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}const uc=new Map;function fc(t){const e=Symbol("layout");return uc.set(e,t),r=>({type:e,props:r})}function pc(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)&&typeof t.type=="symbol"&&uc.has(t.type)}function vp(t,e=mp()){const n=uc.get(t.type);if(!n)return console.warn("Layout function not found for symbol:",t.type),t;const r=cc(t).filter(i=>typeof i=="object");return n(r,t.props,e)}var oP=Object.defineProperty,sP=Object.defineProperties,aP=Object.getOwnPropertyDescriptors,Zo=Object.getOwnPropertySymbols,xp=Object.prototype.hasOwnProperty,bp=Object.prototype.propertyIsEnumerable,wp=(t,e,n)=>e in t?oP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lP=(t,e)=>{for(var n in e||(e={}))xp.call(e,n)&&wp(t,n,e[n]);if(Zo)for(var n of Zo(e))bp.call(e,n)&&wp(t,n,e[n]);return t},cP=(t,e)=>sP(t,aP(e)),_p=(t,e)=>{var n={};for(var r in t)xp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Zo)for(var r of Zo(t))e.indexOf(r)<0&&bp.call(t,r)&&(n[r]=t[r]);return n};function vi(t,e){if(t==null||typeof t=="boolean")return null;if(typeof t=="string"||typeof t=="number")return t;if(Array.isArray(t))return t.map(r=>vi(r,e)).filter(Boolean);if(pc(t)){const r=vp(t,e);return vi(r,e)}if(typeof t.type=="function"){const r=t.type(t.props);return vi(r,e)}const n=cc(t).map(r=>vi(r,e)).filter(Boolean);return t.type===gi?n:t.type===va?(n.forEach(r=>{typeof r=="object"&&r.props.id&&e.defs.set(r.props.id,r)}),null):n.length?kn(t,{children:n}):t}function xi(t,e){if(t==null)return"";if(typeof t=="string")return dc(t);if(typeof t=="number")return String(t);const{type:n,props:r}=t;if(!n)return"";const i=cc(t);if(n===gi)return i.map(l=>xi(l)).filter(Boolean).join("");if(n===va)return"";if(typeof n=="function"||pc(t))return console.warn("Unexpected unprocessed component in render:",t),"";const o=Pp(r),s=i.map(l=>xi(l)).filter(Boolean).join(""),a=String(n);return s?`<${a}${o}>${s}</${a}>`:`<${a}${o} />`}function $p(t,e={}){const n=mp(),r=vi(t,n);if(!r)return"";const i=Array.isArray(r)?r.map(m=>xi(m)).join(""):xi(r),o=e,{x:s,y:a,width:l,height:c,style:h}=o,u=_p(o,["x","y","width","height","style"]),f=cP(lP({},u),{xmlns:"http://www.w3.org/2000/svg"});if(!f.viewBox)if(l&&c)f.viewBox=`${s!=null?s:0} ${a!=null?a:0} ${l!=null?l:0} ${c!=null?c:0}`;else{const m=Q(r);if(m){const{x,y:v,width:b,height:w}=m;f.viewBox=`${x} ${v} ${b} ${w}`}}const p=Pp(f),g=hP(h),y=n.defs.size?`<defs>${Array.from(n.defs.values()).map(m=>xi(m)).join("")}</defs>`:"";return`<svg${p}${g}>${y}${i}</svg>`}function Pp(t){if(!t)return"";const e=t,{children:n}=e,r=_p(e,["children"]);return Object.entries(r).filter(([,i])=>i!=null).map(([i,o])=>{const s=iP(i),a=typeof o=="string"?dc(String(o)):String(o);return` ${s}="${a}"`}).join("")}function hP(t){if(!t||Object.keys(t).length===0)return"";const e=Object.entries(t).map(([n,r])=>`${n.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`)}: ${r};`).join("");return` style="${dc(e)}"`}var dP=Object.defineProperty,Ko=Object.getOwnPropertySymbols,Cp=Object.prototype.hasOwnProperty,Op=Object.prototype.propertyIsEnumerable,Mp=(t,e,n)=>e in t?dP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qo=(t,e)=>{for(var n in e||(e={}))Cp.call(e,n)&&Mp(t,n,e[n]);if(Ko)for(var n of Ko(e))Op.call(e,n)&&Mp(t,n,e[n]);return t},Sp=(t,e)=>{var n={};for(var r in t)Cp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ko)for(var r of Ko(t))e.indexOf(r)<0&&Op.call(t,r)&&(n[r]=t[r]);return n};const q=t=>{const e=t,{indexes:n}=e,r=Sp(e,["indexes"]),i={fill:"#B9EBCA",fillOpacity:.3,width:20,height:20,"data-indexes":n,"data-element-type":kt.BtnAdd};return d(Et,Qo(Qo({},i),r))},Dt=t=>{const e=t,{indexes:n}=e,r=Sp(e,["indexes"]),i={fill:"#F9C0C0",fillOpacity:.3,width:20,height:20,"data-indexes":n,"data-element-type":kt.BtnRemove};return d(Et,Qo(Qo({},i),r))};var uP=Object.defineProperty,fP=Object.defineProperties,pP=Object.getOwnPropertyDescriptors,Ep=Object.getOwnPropertySymbols,gP=Object.prototype.hasOwnProperty,mP=Object.prototype.propertyIsEnumerable,Ip=(t,e,n)=>e in t?uP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yP=(t,e)=>{for(var n in e||(e={}))gP.call(e,n)&&Ip(t,n,e[n]);if(Ep)for(var n of Ep(e))mP.call(e,n)&&Ip(t,n,e[n]);return t},vP=(t,e)=>fP(t,pP(e));const $t=t=>d(V,vP(yP({"data-element-type":kt.BtnsGroup,width:0,height:0},t),{display:"none"})),Kt=()=>d(Ht,{});var xP=Object.defineProperty,Jo=Object.getOwnPropertySymbols,Tp=Object.prototype.hasOwnProperty,Ap=Object.prototype.propertyIsEnumerable,kp=(t,e,n)=>e in t?xP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gc=(t,e)=>{for(var n in e||(e={}))Tp.call(e,n)&&kp(t,n,e[n]);if(Jo)for(var n of Jo(e))Ap.call(e,n)&&kp(t,n,e[n]);return t},bP=(t,e)=>{var n={};for(var r in t)Tp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Jo)for(var r of Jo(t))e.indexOf(r)<0&&Ap.call(t,r)&&(n[r]=t[r]);return n};const Lp=t=>{var e=t,{indexes:n}=e,r=bP(e,["indexes"]);const o=gc(gc({},{fill:"lightgray"}),r);return n?(o["data-indexes"]=n,o["data-element-type"]=kt.ItemIllus):o["data-element-type"]=kt.Illus,d(Et,gc({},o))};var wP=Object.defineProperty,_P=Object.defineProperties,$P=Object.getOwnPropertyDescriptors,ts=Object.getOwnPropertySymbols,zp=Object.prototype.hasOwnProperty,Hp=Object.prototype.propertyIsEnumerable,Rp=(t,e,n)=>e in t?wP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Dp=(t,e)=>{for(var n in e||(e={}))zp.call(e,n)&&Rp(t,n,e[n]);if(ts)for(var n of ts(e))Hp.call(e,n)&&Rp(t,n,e[n]);return t},PP=(t,e)=>_P(t,$P(e)),CP=(t,e)=>{var n={};for(var r in t)zp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ts)for(var r of ts(t))e.indexOf(r)<0&&Hp.call(t,r)&&(n[r]=t[r]);return n};const Xt=t=>{var e=t,{indexes:n,lineNumber:r=2,children:i}=e,o=CP(e,["indexes","lineNumber","children"]),s;if(!i)return null;const a=Dp({fontSize:14,fill:"#666",wordWrap:!0,lineHeight:1.4,children:i},o);return(s=a.height)!=null||(a.height=Math.ceil(r*+a.lineHeight*+a.fontSize)),d(Tt,PP(Dp({},a),{"data-indexes":n,"data-element-type":kt.ItemDesc}))};var OP=Object.defineProperty,MP=Object.defineProperties,SP=Object.getOwnPropertyDescriptors,es=Object.getOwnPropertySymbols,Np=Object.prototype.hasOwnProperty,jp=Object.prototype.propertyIsEnumerable,Fp=(t,e,n)=>e in t?OP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bi=(t,e)=>{for(var n in e||(e={}))Np.call(e,n)&&Fp(t,n,e[n]);if(es)for(var n of es(e))jp.call(e,n)&&Fp(t,n,e[n]);return t},ns=(t,e)=>MP(t,SP(e)),Bp=(t,e)=>{var n={};for(var r in t)Np.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&es)for(var r of es(t))e.indexOf(r)<0&&jp.call(t,r)&&(n[r]=t[r]);return n};const be=t=>{const e=t,{indexes:n,size:r=32}=e,i=Bp(e,["indexes","size"]),o=bi({fill:"lightgray",width:r,height:r},i);return d(Et,ns(bi({},o),{"data-indexes":n,"data-element-type":"item-icon"}))},nr=t=>{const e=t,{indexes:n,size:r=50,fill:i,colorBg:o="white"}=e,s=Bp(e,["indexes","size","fill","colorBg"]),a=r/Math.SQRT2*.9,l=(r-a)/2,c=ns(bi({fill:o},s),{x:l,y:l,width:a,height:a});return I(V,ns(bi({},s),{width:r,height:r,"data-element-type":kt.ItemIconGroup,children:[d(zt,{width:r,height:r,fill:i,"data-element-type":"shape"}),d(Et,ns(bi({},c),{"data-indexes":n,"data-element-type":kt.ItemIcon}))]}))};var EP=Object.defineProperty,IP=Object.defineProperties,TP=Object.getOwnPropertyDescriptors,rs=Object.getOwnPropertySymbols,Wp=Object.prototype.hasOwnProperty,Vp=Object.prototype.propertyIsEnumerable,Yp=(t,e,n)=>e in t?EP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xp=(t,e)=>{for(var n in e||(e={}))Wp.call(e,n)&&Yp(t,n,e[n]);if(rs)for(var n of rs(e))Vp.call(e,n)&&Yp(t,n,e[n]);return t},AP=(t,e)=>IP(t,TP(e)),kP=(t,e)=>{var n={};for(var r in t)Wp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&rs)for(var r of rs(t))e.indexOf(r)<0&&Vp.call(t,r)&&(n[r]=t[r]);return n};const Pt=t=>{var e=t,{indexes:n,children:r}=e,i=kP(e,["indexes","children"]),o;const s=Xp({fontSize:18,fontWeight:"bold",fill:"#252525",lineHeight:1.4,children:r},i);return(o=s.height)!=null||(s.height=Math.ceil(+s.lineHeight*+s.fontSize)),d(Tt,AP(Xp({},s),{"data-indexes":n,"data-element-type":kt.ItemLabel}))};var LP=Object.defineProperty,Gp=Object.getOwnPropertySymbols,zP=Object.prototype.hasOwnProperty,HP=Object.prototype.propertyIsEnumerable,qp=(t,e,n)=>e in t?LP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,RP=(t,e)=>{for(var n in e||(e={}))zP.call(e,n)&&qp(t,n,e[n]);if(Gp)for(var n of Gp(e))HP.call(e,n)&&qp(t,n,e[n]);return t};const Ct=t=>d(V,RP({"data-element-type":kt.ItemsGroup},t));var DP=Object.defineProperty,NP=Object.defineProperties,jP=Object.getOwnPropertyDescriptors,is=Object.getOwnPropertySymbols,Up=Object.prototype.hasOwnProperty,Zp=Object.prototype.propertyIsEnumerable,Kp=(t,e,n)=>e in t?DP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qp=(t,e)=>{for(var n in e||(e={}))Up.call(e,n)&&Kp(t,n,e[n]);if(is)for(var n of is(e))Zp.call(e,n)&&Kp(t,n,e[n]);return t},FP=(t,e)=>NP(t,jP(e)),BP=(t,e)=>{var n={};for(var r in t)Up.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&is)for(var r of is(t))e.indexOf(r)<0&&Zp.call(t,r)&&(n[r]=t[r]);return n};const wi=t=>{var e=t,{indexes:n,value:r,formatter:i=l=>String(l)}=e,o=BP(e,["indexes","value","formatter"]),s;const a=Qp({fontSize:14,fill:"#666",wordWrap:!0,lineHeight:1.4,children:i(r),"data-value":r},o);return(s=a.height)!=null||(a.height=Math.ceil(+a.lineHeight*+a.fontSize)),d(Tt,FP(Qp({},a),{"data-indexes":n,"data-element-type":kt.ItemValue}))};var WP=Object.defineProperty,Jp=Object.getOwnPropertySymbols,VP=Object.prototype.hasOwnProperty,YP=Object.prototype.propertyIsEnumerable,t1=(t,e,n)=>e in t?WP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,XP=(t,e)=>{for(var n in e||(e={}))VP.call(e,n)&&t1(t,n,e[n]);if(Jp)for(var n of Jp(e))YP.call(e,n)&&t1(t,n,e[n]);return t};const ne=t=>d(V,XP({"data-element-type":"shapes-group"},t));var GP=Object.defineProperty,qP=Object.defineProperties,UP=Object.getOwnPropertyDescriptors,os=Object.getOwnPropertySymbols,e1=Object.prototype.hasOwnProperty,n1=Object.prototype.propertyIsEnumerable,r1=(t,e,n)=>e in t?GP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ss=(t,e)=>{for(var n in e||(e={}))e1.call(e,n)&&r1(t,n,e[n]);if(os)for(var n of os(e))n1.call(e,n)&&r1(t,n,e[n]);return t},i1=(t,e)=>qP(t,UP(e)),ZP=(t,e)=>{var n={};for(var r in t)e1.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&os)for(var r of os(t))e.indexOf(r)<0&&n1.call(t,r)&&(n[r]=t[r]);return n};const _i=fc((t,e)=>{var n=e,{horizontal:r,vertical:i}=n,o=ZP(n,["horizontal","vertical"]),s,a,l,c;if(!t||t.length===0)return d(V,ss({},o));const h=t.map(v=>Q(v)),u=er(t),f=(s=o.x)!=null?s:u.x,p=(a=o.y)!=null?a:u.y,g=(l=o.width)!=null?l:u.width,y=(c=o.height)!=null?c:u.height,m=t.map((v,b)=>{const w=h[b],_=ss({},v.props);if(r!==void 0)switch(r){case"left":_.x=-w.x;break;case"center":_.x=(g-w.width)/2-w.x;break;case"right":_.x=g-w.width-w.x;break}else _.x===void 0&&(_.x=w.x-f);if(i!==void 0)switch(i){case"top":_.y=-w.y;break;case"middle":_.y=(y-w.height)/2-w.y;break;case"bottom":_.y=y-w.height-w.y;break}else _.y===void 0&&(_.y=w.y-p);return kn(v,_)}),x=i1(ss({},o),{x:f,y:p,width:g,height:y});return d(V,i1(ss({},x),{children:m}))});var KP=Object.defineProperty,QP=Object.defineProperties,JP=Object.getOwnPropertyDescriptors,as=Object.getOwnPropertySymbols,o1=Object.prototype.hasOwnProperty,s1=Object.prototype.propertyIsEnumerable,a1=(t,e,n)=>e in t?KP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rr=(t,e)=>{for(var n in e||(e={}))o1.call(e,n)&&a1(t,n,e[n]);if(as)for(var n of as(e))s1.call(e,n)&&a1(t,n,e[n]);return t},l1=(t,e)=>QP(t,JP(e)),tC=(t,e)=>{var n={};for(var r in t)o1.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&as)for(var r of as(t))e.indexOf(r)<0&&s1.call(t,r)&&(n[r]=t[r]);return n};const lt=fc((t,e)=>{var n=e,{flexDirection:r="row",justifyContent:i="flex-start",alignItems:o="flex-start",alignContent:s="flex-start",flexWrap:a="nowrap",gap:l=0}=n,c=tC(n,["flexDirection","justifyContent","alignItems","alignContent","flexWrap","gap"]),h,u,f,p,g,y;if(!t||t.length===0)return d(V,rr({},c));const m=r==="row"||r==="row-reverse",x=r==="row-reverse"||r==="column-reverse",v=t.map(O=>Q(O)),b=er(t),w=(h=c.width)!=null?h:b.width,_=(u=c.height)!=null?u:b.height,$=c.width!==void 0&&c.height!==void 0,P=[];if(a==="wrap"&&$){let O=[],A=[],B=0;for(let L=0;L<t.length;L++){const D=t[L],k=v[L],N=m?k.width:k.height,j=m?w:_;O.length===0||B+l+N<=j?(O.push(D),A.push(k),B+=(O.length>1?l:0)+N):(P.push({children:O,bounds:A}),O=[D],A=[k],B=N)}O.length>0&&P.push({children:O,bounds:A})}else P.push({children:t,bounds:v});const C=[];let T=0;const E=[];if(P.forEach(O=>{const{children:A,bounds:B}=O,L=B.reduce((z,M,H)=>{const W=m?M.width:M.height;return z+W+(H>0?l:0)},0),D=Math.max(...B.map(z=>m?z.height:z.width));E.push(D);let k=0;const N=(m?w:_)-L;if($)switch(i){case"flex-end":k=N;break;case"center":k=N/2;break;case"space-between":k=0;break;default:k=0;break}let j=l;$&&i==="space-between"&&A.length>1&&(j=N/(A.length-1)+l);let X=k;A.forEach((z,M)=>{const H=B[M],W=m?H.width:H.height,U=m?H.height:H.width,Y=m?H.x:H.y,G=m?H.y:H.x;let Z=T;if($)switch(o){case"flex-end":Z=T+D-U;break;case"center":Z=T+(D-U)/2;break;default:Z=T;break}let K,et;m?(K=x?w-X-W-Y:X-Y,et=Z-G):(K=Z-G,et=x?_-X-W-Y:X-Y);const st=kn(z,{x:K,y:et});C.push(st),X+=W+j}),T+=D+l}),P.length>1&&$){const O=E.reduce((L,D)=>L+D,0)+(P.length-1)*l,A=(m?_:w)-O;let B=0;switch(s){case"flex-end":B=A;break;case"center":B=A/2;break;case"space-between":if(P.length>1){const L=A/(P.length-1);let D=0;P.forEach((k,N)=>{const j=P.slice(0,N).reduce((z,M)=>z+M.children.length,0),X=j+k.children.length;for(let z=j;z<X;z++){const M=C[z],H=rr({},M.props);m?H.y=(H.y||0)+D:H.x=(H.x||0)+D,C[z]=kn(M,H)}D+=E[N]+l+(N<P.length-1?L:0)});break}break;default:B=0;break}B!==0&&s!=="space-between"&&C.forEach((L,D)=>{const k=rr({},L.props);m?k.y=(k.y||0)+B:k.x=(k.x||0)+B,C[D]=kn(L,k)})}if(!$&&o==="center")if(m){const O=Math.max(...v.map(A=>A.height));C.forEach((A,B)=>{const L=v[B],D=(O-L.height)/2,k=rr({},A.props);k.y=(k.y||0)+D,C[B]=kn(A,k)})}else{const O=Math.max(...v.map(A=>A.width));C.forEach((A,B)=>{const L=v[B],D=(O-L.width)/2,k=rr({},A.props);k.x=(k.x||0)+D,C[B]=kn(A,k)})}const S=er(C),R=l1(rr({},c),{x:(f=c.x)!=null?f:b.x,y:(p=c.y)!=null?p:b.y,width:(g=c.width)!=null?g:S.width,height:(y=c.height)!=null?y:S.height});return d(V,l1(rr({},R),{children:C}))});var eC=Object.defineProperty,nC=Object.defineProperties,rC=Object.getOwnPropertyDescriptors,c1=Object.getOwnPropertySymbols,iC=Object.prototype.hasOwnProperty,oC=Object.prototype.propertyIsEnumerable,h1=(t,e,n)=>e in t?eC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ls=(t,e)=>{for(var n in e||(e={}))iC.call(e,n)&&h1(t,n,e[n]);if(c1)for(var n of c1(e))oC.call(e,n)&&h1(t,n,e[n]);return t},d1=(t,e)=>nC(t,rC(e));const u1=t=>{const{x:e=0,y:n=0,alignHorizontal:r="center",title:i,desc:o,descLineNumber:s=2,themeColors:a}=t,l=h=>{const u={fontSize:24,fill:a.colorPrimaryText,lineHeight:1.4,alignHorizontal:r};return d(Tt,d1(ls(ls({},u),h),{"data-element-type":"title",children:i}))},c=h=>{const u={fontSize:16,fill:a.colorTextSecondary,alignHorizontal:r,lineHeight:1.4,height:s*24};return d(Tt,d1(ls(ls({},u),h),{"data-element-type":"desc",children:o}))};return!i&&!o?null:I(lt,{flexDirection:"column",justifyContent:"center",alignItems:"center",x:e,y:n,gap:8,children:[i&&d(l,{}),o&&d(c,{})]})},mc=new Map;function yc(t,e){mc.set(t,e)}function f1(t){return mc.get(t)}function sC(){return Array.from(mc.keys())}yc("dark",{colorBg:"#1F1F1F",base:{text:{fill:"#fff"}}}),yc("hand-drawn",{base:{text:{"font-family":"851tegakizatsu"}},stylize:{type:"rough"}});var aC=Object.defineProperty,lC=Object.defineProperties,cC=Object.getOwnPropertyDescriptors,p1=Object.getOwnPropertySymbols,hC=Object.prototype.hasOwnProperty,dC=Object.prototype.propertyIsEnumerable,g1=(t,e,n)=>e in t?aC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$i=(t,e)=>{for(var n in e||(e={}))hC.call(e,n)&&g1(t,n,e[n]);if(p1)for(var n of p1(e))dC.call(e,n)&&g1(t,n,e[n]);return t},Pi=(t,e)=>lC(t,cC(e));Rt(Jd);const m1=({colorPrimary:t,colorBg:e="#ffffff",isDarkMode:n=!1})=>{const r=tn(t),i=tn(e),o=yC({primaryColor:r,bgColor:i});return vC(o,{primaryColor:r,bgColor:i,isDarkMode:n})},uC=(t,e)=>Wx(Pi($i({},t),{alpha:e?.2:.1}))||"#ffffff",fC=(t,e)=>{if(e)return"#ffffff";const n=tn("#262626");return il(n,t)>=7?ti(n):"#000000"},pC=t=>{const e=du(tn(t)),n=Pi($i({},e),{l:Math.min(1,e.l+.2)});return ti(n)},gC=(t,e)=>{const n=tn(t),r=tn("#262626"),i=tn("#ffffff"),o=il(r,n);return il(i,n)>=3?ti(i):o>=4.5?ti(r):"#ffffff"},mC=(t,e)=>{const n=du(t);if(e){const r=Pi($i({},n),{l:Math.min(1,n.l+.1)});return cs(r,"#1f1f1f")}else{if(n.l>.95)return"#ffffff";{const r=Pi($i({},n),{l:Math.min(1,n.l+.05)});return cs(r,"#ffffff")}}},yC=({primaryColor:t,bgColor:e})=>({colorPrimary:cs(t,"#FF356A"),colorBg:cs(e,"#ffffff"),colorWhite:"#ffffff"}),vC=(t,{primaryColor:e,bgColor:n,isDarkMode:r})=>{const i=fC(n,r),o=uC(e,r);return Pi($i({},t),{isDarkMode:r,colorPrimaryBg:o,colorText:i,colorTextSecondary:pC(i),colorPrimaryText:gC(o,r),colorBgElevated:mC(n,r)})};function cs(t,e="#000000"){var n;return(n=ti(t))!=null?n:e}const vc="#FF356A";function re(t){var e;return((e=t==null?void 0:t.themeConfig)==null?void 0:e.colorPrimary)||vc}function y1(t){var e;const{themeConfig:n={},data:r}=t,{colorPrimary:i,palette:o}=n;return!o||o.length===0?Array(((e=r==null?void 0:r.items)==null?void 0:e.length)||1).fill(i||vc):r.items.map((s,a)=>Co(o,[a],r.items.length)||vc)}function Mt(t,e){var n,r,i;return Co((n=t==null?void 0:t.themeConfig)==null?void 0:n.palette,e,(i=(r=t.data)==null?void 0:r.items)==null?void 0:i.length)}function ye(t,e){var n;const{colorBg:r=((n=e==null?void 0:e.themeConfig)==null?void 0:n.colorBg)||"white",colorPrimary:i=e?re(e):"black"}=t;return m1({colorPrimary:i,isDarkMode:uu(r),colorBg:r})}function Ci(t,e){const{depth:n,originalIndexes:r,flatIndex:i}=t;switch(e){case"level":return[n];case"branch":return n===0?[0]:n===1?[r[1]+1]:[r[1]+1];case"node":return r;case"node-flat":return i!==void 0?[i]:(console.warn("node-flat mode requires flatIndex in HierarchyNode, falling back to originalIndexes"),r);default:return[0]}}var xC=Object.defineProperty,v1=Object.getOwnPropertySymbols,bC=Object.prototype.hasOwnProperty,wC=Object.prototype.propertyIsEnumerable,x1=(t,e,n)=>e in t?xC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_C=(t,e)=>{for(var n in e||(e={}))bC.call(e,n)&&x1(t,n,e[n]);if(v1)for(var n of v1(e))wC.call(e,n)&&x1(t,n,e[n]);return t};function Wt(t,e=[]){const n=_C({},t),r={};return["indexes","data","datum","positionH","positionV","themeColors","valueFormatter",...e].forEach(o=>{o in n&&(r[o]=n[o],delete n[o])}),["x","y","width","height"].forEach(o=>{o in t&&(n[o]=t[o])}),[r,n]}function hs(t,e){var n;return t.length===0?()=>null:e===void 0?t[0]:(n=t[e])!=null?n:t[0]}const xc=new Map;function Vt(t,e){xc.set(t,e)}function b1(t){return xc.get(t)}function $C(){return Array.from(xc.keys())}var PC=Object.defineProperty,CC=Object.defineProperties,OC=Object.getOwnPropertyDescriptors,w1=Object.getOwnPropertySymbols,MC=Object.prototype.hasOwnProperty,SC=Object.prototype.propertyIsEnumerable,_1=(t,e,n)=>e in t?PC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,EC=(t,e)=>{for(var n in e||(e={}))MC.call(e,n)&&_1(t,n,e[n]);if(w1)for(var n of w1(e))SC.call(e,n)&&_1(t,n,e[n]);return t},IC=(t,e)=>CC(t,OC(e));const $1=t=>{const[{datum:e,indexes:n,width:r=200,height:i=80,iconSize:o=24,badgeSize:s=32,gap:a=8,positionH:l="normal",themeColors:c,valueFormatter:h},u]=Wt(t,["width","height","iconSize","badgeSize","gap"]),f=e.value,p=f!==void 0,g=!!e.desc,y=!!e.icon,m=`${c.colorPrimary}-badge`,x=l==="flipped"?r-a-s:a,v=y?l==="flipped"?a:s+2*a:a,b=r-a*2,w=y?r-s-3*a:b,_=a+14+18+8,$=_-a,P=g?a:(i-s)/2,C=!p&&!g?(i-14)/2:a;return I(V,IC(EC({},u),{width:r,height:i,children:[d(Lt,{children:I("radialGradient",{id:m,cx:"50%",cy:"50%",r:"50%",children:[d("stop",{offset:"0%",stopColor:c.colorPrimary}),d("stop",{offset:"100%",stopColor:rt(c.colorPrimary).darken(20).toHexString()})]})}),d(Et,{"data-element-type":"shape",x:0,y:0,width:r,height:i,fill:c.colorPrimaryBg,rx:8,ry:8}),y&&I(Ht,{children:[d(zt,{x,y:P,width:s,height:s,fill:`url(#${m})`}),d(be,{indexes:n,x:x+(s-o)/2,y:P+(s-o)/2,size:o,fill:c.colorWhite})]}),I(lt,{flexDirection:"column",x:v,y:C,width:w,height:!p&&!g?void 0:$,alignItems:"center",justifyContent:"center",children:[d(Pt,{indexes:n,width:w,alignHorizontal:l==="flipped"?"right":"left",alignVertical:"middle",fontSize:14,fill:c.colorText,children:e.label}),p&&d(wi,{indexes:n,width:w,alignHorizontal:l==="flipped"?"right":"left",alignVertical:"middle",fontSize:18,lineHeight:1,fontWeight:"bold",fill:c.colorPrimary,value:f,formatter:h})]}),g&&d(Xt,{indexes:n,x:a,y:_,width:b,alignHorizontal:l==="flipped"?"right":"left",fontSize:11,fill:c.colorTextSecondary,lineNumber:2,lineHeight:1.2,wordWrap:!0,children:e.desc})]}))};Vt("badge-card",{component:$1,composites:["icon","label","value","desc"]});var TC=Object.defineProperty,AC=Object.defineProperties,kC=Object.getOwnPropertyDescriptors,P1=Object.getOwnPropertySymbols,LC=Object.prototype.hasOwnProperty,zC=Object.prototype.propertyIsEnumerable,C1=(t,e,n)=>e in t?TC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,HC=(t,e)=>{for(var n in e||(e={}))LC.call(e,n)&&C1(t,n,e[n]);if(P1)for(var n of P1(e))zC.call(e,n)&&C1(t,n,e[n]);return t},RC=(t,e)=>AC(t,kC(e));const O1=t=>{const[{indexes:e,datum:n,width:r=280,height:i=140,themeColors:o},s]=Wt(t,["width","height"]);return I(V,RC(HC({},s),{children:[d("rect",{x:0,y:0,width:r,height:i,rx:22,ry:22,fill:o.colorPrimaryBg,stroke:o.colorPrimary,"data-element-type":"shape"}),d(ht,{x:r-85,y:.5,width:85,height:65,d:"M0 0H62.4495C74.9557 0 85.4549 10.8574 84.4557 23.1875V60.1875L77.8772 62.5839C64.3776 67.6876 48.51 64.6893 37.8662 53.7441L10.2361 25.3312C4.91402 19.8571 1.65356 13.1736 0.435652 6.21819L0 0Z",fill:o.colorBg,"data-element-type":"shape"}),d(Pt,{indexes:e,x:20,y:24,width:200,alignHorizontal:"left",alignVertical:"middle",fill:o.colorText,children:n.label}),d(Xt,{indexes:e,x:20,y:58,width:220,height:70,fill:o.colorTextSecondary,alignHorizontal:"left",alignVertical:"top",children:n.desc}),d(be,{indexes:e,x:r-48,y:12,width:32,height:32,fill:o.colorPrimary})]}))};Vt("candy-card-lite",{component:O1,composites:["icon","label","desc"]});var DC=Object.defineProperty,NC=Object.defineProperties,jC=Object.getOwnPropertyDescriptors,ds=Object.getOwnPropertySymbols,M1=Object.prototype.hasOwnProperty,S1=Object.prototype.propertyIsEnumerable,E1=(t,e,n)=>e in t?DC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,FC=(t,e)=>{for(var n in e||(e={}))M1.call(e,n)&&E1(t,n,e[n]);if(ds)for(var n of ds(e))S1.call(e,n)&&E1(t,n,e[n]);return t},BC=(t,e)=>NC(t,jC(e)),WC=(t,e)=>{var n={};for(var r in t)M1.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ds)for(var r of ds(t))e.indexOf(r)<0&&S1.call(t,r)&&(n[r]=t[r]);return n};const bc=t=>{const e=t,{color:n="black",opacity:r=.8}=e,i=WC(e,["color","opacity"]);return d("filter",BC(FC({id:"drop-shadow",x:"-25%",y:"-25%",width:"200%",height:"200%"},i),{children:d("feDropShadow",{dx:"4",dy:"4",stdDeviation:"4","flood-color":n,"flood-opacity":r})}))};var VC=Object.defineProperty,YC=Object.defineProperties,XC=Object.getOwnPropertyDescriptors,I1=Object.getOwnPropertySymbols,GC=Object.prototype.hasOwnProperty,qC=Object.prototype.propertyIsEnumerable,T1=(t,e,n)=>e in t?VC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,UC=(t,e)=>{for(var n in e||(e={}))GC.call(e,n)&&T1(t,n,e[n]);if(I1)for(var n of I1(e))qC.call(e,n)&&T1(t,n,e[n]);return t},ZC=(t,e)=>YC(t,XC(e));const wc=t=>{const{id:e="linear-gradient",startColor:n="black",stopColor:r="white",direction:i="left-right"}=t;return I("linearGradient",ZC(UC({id:e},{"left-right":{x1:"0%",y1:"0%",x2:"100%",y2:"0%"},"right-left":{x1:"100%",y1:"0%",x2:"0%",y2:"0%"},"top-bottom":{x1:"0%",y1:"0%",x2:"0%",y2:"100%"},"bottom-top":{x1:"0%",y1:"100%",x2:"0%",y2:"0%"}}[i]),{children:[d("stop",{offset:"0%",stopColor:n}),d("stop",{offset:"100%",stopColor:r})]}))};var KC=Object.defineProperty,QC=Object.defineProperties,JC=Object.getOwnPropertyDescriptors,A1=Object.getOwnPropertySymbols,tO=Object.prototype.hasOwnProperty,eO=Object.prototype.propertyIsEnumerable,k1=(t,e,n)=>e in t?KC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Oi=(t,e)=>{for(var n in e||(e={}))tO.call(e,n)&&k1(t,n,e[n]);if(A1)for(var n of A1(e))eO.call(e,n)&&k1(t,n,e[n]);return t},Mi=(t,e)=>QC(t,JC(e));const L1=t=>{const[{datum:e,indexes:n,width:r=300,height:i=80,gap:o=12,positionH:s="normal",iconPadding:a=i/10,themeColors:l},c]=Wt(t,["width","height","gap","iconPadding"]),h=i/2,u=i-a*2,f=s==="flipped",p=!!e.icon,g=p?r-i-o:r-o*2,y=p?f?o:i:o,m=p?f?"right":"left":"center",x={indexes:n,width:g,alignHorizontal:m,alignVertical:"middle",fontSize:16,fontWeight:"600",fill:l.colorWhite},v=Q(d(Pt,Mi(Oi({},x),{children:e.label}))),b={indexes:n,width:g,alignHorizontal:m,alignVertical:"top",fontSize:12,lineNumber:1,fill:l.colorWhite},w=Q(e.desc?d(Xt,Mi(Oi({},b),{children:e.desc})):null),_=4,$=v.height+_+w.height,C=(i-$)/2,T=C+v.height+_,E=f?r-i+a:a,S=a;return I(V,Mi(Oi({},c),{children:[d(Lt,{children:d(bc,{})}),d(Et,{x:0,y:0,width:r,height:i,fill:l.colorPrimary,rx:h,ry:h,"data-element-type":"shape"}),e.icon&&I(Ht,{children:[d(zt,{x:E,y:S,width:u,height:u,fillOpacity:.5,fill:l.colorBg,filter:"url(#drop-shadow)"}),d(nr,{indexes:n,x:E,y:S,size:u,fill:l.colorBg,colorBg:l.colorPrimary})]}),e.label&&d(Pt,Mi(Oi({x:y,y:C},x),{children:e.label})),e.desc&&d(Xt,Mi(Oi({x:y,y:T},b),{children:e.desc}))]}))};Vt("capsule-item",{component:L1,composites:["icon","label","desc"]});var nO=Object.defineProperty,rO=Object.defineProperties,iO=Object.getOwnPropertyDescriptors,z1=Object.getOwnPropertySymbols,oO=Object.prototype.hasOwnProperty,sO=Object.prototype.propertyIsEnumerable,H1=(t,e,n)=>e in t?nO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_c=(t,e)=>{for(var n in e||(e={}))oO.call(e,n)&&H1(t,n,e[n]);if(z1)for(var n of z1(e))sO.call(e,n)&&H1(t,n,e[n]);return t},$c=(t,e)=>rO(t,iO(e));const R1=t=>{const[{indexes:e,datum:n,themeColors:r,positionH:i="normal",width:o=240,height:s=o},a]=Wt(t,["width","height"]),l=Math.min(o,s),c=l*.7,h=(l-c)/2,u=c*Math.sqrt(2)/2,f=(l-u)/2,p=rt(r.colorPrimary),g=us(p,80,.2),y=us(p,20,.8),m=us(p,75,.32),x=us(p,45,.4),v=p.clone().darken(5).toRgbString(),b=`${r.colorPrimary}-${i}-outer`,w=`${r.colorPrimary}-${i}-inner`,_=i==="flipped"?{x1:"0%",y1:"0%",x2:"100%",y2:"0%"}:{x1:"100%",y1:"0%",x2:"0%",y2:"0%"};return I(V,$c(_c({},a),{children:[I(Lt,{children:[I("linearGradient",$c(_c({id:b},_),{children:[d("stop",{offset:"0%",stopColor:g}),d("stop",{offset:"100%",stopColor:y})]})),I("linearGradient",$c(_c({id:w},_),{children:[d("stop",{offset:"0%",stopColor:m}),d("stop",{offset:"100%",stopColor:x})]}))]}),d(zt,{width:l,height:l,fill:`url(#${b})`,"data-element-type":"shape"}),d(zt,{x:h,y:h,width:c,height:c,fill:`url(#${w})`,stroke:"#FFFFFF",strokeWidth:1,"data-element-type":"shape"}),d(Pt,{indexes:e,x:f,y:f,width:u,height:u,lineHeight:1.1,alignHorizontal:"center",alignVertical:"middle",fill:v,fontWeight:"500",children:n.label})]}))};Vt("circle-node",{component:R1,composites:["label"]});function us(t,e,n){return rt.mix(t,"#ffffff",e).setAlpha(n).toRgbString()}var aO=Object.defineProperty,lO=Object.defineProperties,cO=Object.getOwnPropertyDescriptors,D1=Object.getOwnPropertySymbols,hO=Object.prototype.hasOwnProperty,dO=Object.prototype.propertyIsEnumerable,N1=(t,e,n)=>e in t?aO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Pc=(t,e)=>{for(var n in e||(e={}))hO.call(e,n)&&N1(t,n,e[n]);if(D1)for(var n of D1(e))dO.call(e,n)&&N1(t,n,e[n]);return t},Cc=(t,e)=>lO(t,cO(e));const j1=t=>{var e;const[{datum:n,indexes:r,size:i=120,strokeWidth:o=12,gap:s=8,themeColors:a,valueFormatter:l=_=>`${Math.round(_)}%`},c]=Wt(t,["size","strokeWidth","gap"]),h=(e=n.value)!=null?e:0,f=Math.min(Math.max(h/100,0),1),p=(i-o)/2,g=i/2,y=o/2,m=i-o,x=f>=1,v=f*360,b=uO(g,g,p,0,v),w={x:y,y,width:m,height:m};return I(V,Cc(Pc({},c),{width:i,height:i+s+20,children:[d(Et,{width:i,height:i,fill:"none"}),d(zt,Cc(Pc({},w),{fill:"none",stroke:"#f0f0f0",strokeWidth:o,"data-element-type":"shape"})),x?d(zt,Cc(Pc({},w),{fill:"none",stroke:a.colorPrimary,strokeWidth:o,"data-element-type":"shape"})):d(ht,{d:b,fill:"none",stroke:a.colorPrimary,strokeWidth:o,strokeLinecap:"round","data-element-type":"shape"}),d(wi,{indexes:r,x:o,y:o,width:m-o,height:m-o,fontSize:24,fontWeight:"bold",fill:a.colorPrimary,alignHorizontal:"center",alignVertical:"middle",value:h,formatter:l}),d(Pt,{indexes:r,x:0,y:i+s,width:i,alignHorizontal:"center",fontSize:12,fill:a.colorTextSecondary,children:n.label})]}))};function uO(t,e,n,r,i){const o=F1(t,e,n,i),s=F1(t,e,n,r),a=i-r<=180?"0":"1";return`M ${o.x} ${o.y} A ${n} ${n} 0 ${a} 0 ${s.x} ${s.y}`}function F1(t,e,n,r){const i=(r-90)*Math.PI/180;return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}}Vt("circular-progress",{component:j1,composites:["label","value"]});var fO=Object.defineProperty,pO=Object.defineProperties,gO=Object.getOwnPropertyDescriptors,B1=Object.getOwnPropertySymbols,mO=Object.prototype.hasOwnProperty,yO=Object.prototype.propertyIsEnumerable,W1=(t,e,n)=>e in t?fO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vO=(t,e)=>{for(var n in e||(e={}))mO.call(e,n)&&W1(t,n,e[n]);if(B1)for(var n of B1(e))yO.call(e,n)&&W1(t,n,e[n]);return t},xO=(t,e)=>pO(t,gO(e));const V1=t=>{const[{datum:e,indexes:n,width:r=200,height:i=60,iconSize:o=20,gap:s=8,positionH:a="normal",themeColors:l,valueFormatter:c},h]=Wt(t,["width","height","iconSize","gap"]),u=e.value,f=u!=null,p="compact-shadow",g=a==="flipped"?r-s-o:s,y=a==="flipped"?s:o+2*s,m=r-o-3*s,x=f?m*.8:m,v=f?m*.2:0;return I(V,xO(vO({},h),{children:[d(Lt,{children:d("filter",{id:p,children:d("feDropShadow",{dx:"0",dy:"2",stdDeviation:"2",floodOpacity:"0.15"})})}),d(Et,{x:0,y:0,width:r,height:i,fill:l.colorBgElevated,stroke:l.colorBgElevated,strokeWidth:1,rx:6,ry:6,filter:`url(#${p})`,"data-element-type":"shape"}),d(Et,{x:a==="flipped"?r-3:0,y:0,width:3,height:i,fill:l.colorPrimary,rx:1.5,ry:1.5,"data-element-type":"shape"}),d(be,{indexes:n,x:g,y:(i-o)/2,size:o,fill:l.colorPrimary}),I(lt,{x:y,y:s,width:m,height:i-s*2,flexDirection:"column",justifyContent:"center",alignItems:"flex-start",children:[I(lt,{width:m,flexDirection:"row",justifyContent:"space-between",alignItems:"center",children:[d(Pt,{indexes:n,width:x,alignHorizontal:"left",fontSize:12,fill:l.colorText,children:e.label}),f&&d(wi,{indexes:n,width:v,alignHorizontal:"right",fontSize:12,fontWeight:"bold",fill:l.colorPrimary,value:u,formatter:c})]}),d(Xt,{indexes:n,width:m,alignHorizontal:"left",alignVertical:"middle",fontSize:10,fill:l.colorTextSecondary,lineNumber:2,wordWrap:!0,children:e.desc})]})]}))};Vt("compact-card",{component:V1,composites:["icon","label","value","desc"]});var bO=Object.defineProperty,wO=Object.defineProperties,_O=Object.getOwnPropertyDescriptors,Y1=Object.getOwnPropertySymbols,$O=Object.prototype.hasOwnProperty,PO=Object.prototype.propertyIsEnumerable,X1=(t,e,n)=>e in t?bO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,CO=(t,e)=>{for(var n in e||(e={}))$O.call(e,n)&&X1(t,n,e[n]);if(Y1)for(var n of Y1(e))PO.call(e,n)&&X1(t,n,e[n]);return t},OO=(t,e)=>wO(t,_O(e));const G1=t=>{const[{datum:e,indexes:n,width:r=300,height:i=30,iconSize:o=30,gap:s=5,positionH:a="normal",positionV:l="middle",themeColors:c},h]=Wt(t,["width","height","iconSize","gap"]),u=r-o-s,f=l==="middle"?(i-o)/2:l==="flipped"?i-o:0;return I(V,OO(CO({},h),{children:[d(ht,{"data-element-type":"shape",x:a==="flipped"?u+s:0,y:f,fill:c.colorPrimary,width:o,height:o,d:"M14.7273 30C6.54538 30 0 22.9077 0 14.7269C0 6.54617 6.54538 0 14.7273 0C22.9092 0 30 6.54617 30 14.7269C30 22.9077 22.9092 30 14.7273 30ZM24.5454 10.9077C22.9092 9.27307 22.9092 9.27307 22.9092 9.27307C22.3638 8.72692 22.3638 8.7269 21.8181 8.7269C21.2727 8.7269 21.2727 8.72692 20.7273 9.27307C13.0908 16.9077 13.0908 16.9077 13.0908 16.9077C8.72731 12.5461 8.72731 12.5462 8.72731 12.5462C8.18193 12.5462 8.18193 12 7.63654 12L7.09077 12.5462C4.90923 14.1808 4.90923 14.1808 4.90923 14.1808C4.90923 14.7269 4.90923 14.7269 4.90923 15.2731C4.90923 15.8192 4.90923 15.8192 4.90923 16.3654C12 23.4539 12 23.4538 12 23.4538C12.5454 23.4538 12.5454 23.4538 13.0908 23.4538C13.6365 23.4538 13.6365 23.4538 14.1819 23.4538C24.5454 12.5461 24.5454 12.5462 24.5454 12.5462L25.0908 12C25.0908 11.4538 24.5454 10.9077 24.5454 10.9077Z"}),d(Pt,{indexes:n,x:a==="flipped"?0:o+s,width:u,height:i,fontWeight:"normal",alignVertical:"middle",wordWrap:!1,fill:"#666",children:e.label||e.desc})]}))};Vt("done-list",{component:G1,composites:["label"]});var MO=Object.defineProperty,SO=Object.defineProperties,EO=Object.getOwnPropertyDescriptors,q1=Object.getOwnPropertySymbols,IO=Object.prototype.hasOwnProperty,TO=Object.prototype.propertyIsEnumerable,U1=(t,e,n)=>e in t?MO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AO=(t,e)=>{for(var n in e||(e={}))IO.call(e,n)&&U1(t,n,e[n]);if(q1)for(var n of q1(e))TO.call(e,n)&&U1(t,n,e[n]);return t},kO=(t,e)=>SO(t,EO(e));const Z1=t=>{const[{indexes:e,datum:n,width:r=140,themeColors:i,positionV:o="normal"},s]=Wt(t,["width"]),a=o!=="flipped",l=o==="normal"?"bottom":"top",c=d(Pt,{indexes:e,width:r,fill:i.colorText,alignHorizontal:"center",alignVertical:l,fontSize:14,children:n.label}),h=d(Xt,{indexes:e,width:r,fill:i.colorTextSecondary,alignHorizontal:"center",alignVertical:l,children:n.desc}),u=d(nr,{indexes:e,fill:i.colorPrimary,colorBg:i.colorWhite}),f=d(zO,{width:8,height:30,fill:i.colorPrimary,positionV:o}),p=5,g=25,y=30,m=Q(c),x=Q(h),v=Q(u),b=Q(f),w=m.height+x.height+p+b.height-v.height-g,_=v.height+g+y+b.height+p+m.height+x.height;return d(V,kO(AO({width:r,height:_},s),{children:I(lt,{flexDirection:"column",alignItems:"center",children:[a?I(Ht,{children:[h,c,d(Kt,{height:p}),f]}):I(Ht,{children:[d(Kt,{height:w}),u,d(Kt,{height:g})]}),I(V,{children:[d(LO,{width:r,height:y,fill:i.colorPrimary}),d(Tt,{x:r/2,y:y/2,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:n.time?n.time:String(e[0]+1).padStart(2,"0").slice(-2)})]}),a?I(Ht,{children:[d(Kt,{height:g}),u]}):I(Ht,{children:[f,d(Kt,{height:p}),c,h]})]})}))},LO=t=>{const{x:e=0,y:n=0,width:r=100,height:i=40,fill:o="#FF356A",size:s=10}=t;return d(Ne,{width:r,height:i,points:[{x:e,y:n},{x:e+r-s,y:n},{x:e+r,y:n+i/2},{x:e+r-s,y:n+i},{x:e,y:n+i},{x:e+s,y:n+i/2}],fill:o,"data-element-type":"shape"})},zO=t=>{const{x:e=0,y:n=0,width:r=10,height:i=50,fill:o,positionV:s="top"}=t,a=r/2,l=i-a,c=2,h=a;return I(ne,{x:e,y:n,width:r,height:i,children:[d(zt,{width:r,height:r,fill:o,y:s==="top"?0:l-a}),d(ht,{d:s==="top"?`M${h},${a} L${h},${a+l}`:`M${h},0 L${h},${l-a}`,strokeWidth:c,stroke:o})]})};Vt("horizontal-icon-arrow",{component:Z1,composites:["icon","label","desc","time"]});var HO=Object.defineProperty,RO=Object.defineProperties,DO=Object.getOwnPropertyDescriptors,K1=Object.getOwnPropertySymbols,NO=Object.prototype.hasOwnProperty,jO=Object.prototype.propertyIsEnumerable,Q1=(t,e,n)=>e in t?HO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,J1=(t,e)=>{for(var n in e||(e={}))NO.call(e,n)&&Q1(t,n,e[n]);if(K1)for(var n of K1(e))jO.call(e,n)&&Q1(t,n,e[n]);return t},tg=(t,e)=>RO(t,DO(e));const eg=t=>{const[{indexes:e,datum:n,width:r=160,themeColors:i,positionH:o="center",positionV:s="normal"},a]=Wt(t,["width"]),l=o==="normal"?"left":o==="flipped"?"right":"center",c=d(Pt,{indexes:e,width:r,alignHorizontal:l,fill:i.colorPrimary,children:n.label}),h=Q(c),u=n.desc?d(Xt,{indexes:e,width:r,fill:i.colorTextSecondary,alignHorizontal:l,alignVertical:s==="flipped"?"top":"bottom",children:n.desc}):null,f=Q(u),g=n.icon?d(nr,{size:45,indexes:e,colorBg:i.colorBg,fill:i.colorPrimary}):null,y=Q(g),m=n.time?d(Tt,{width:r,height:30,alignHorizontal:"center",alignVertical:"middle",fill:i.colorPrimary,fontSize:18,fontWeight:"bold",children:n.time}):null,x=Q(m),v=18,b=I(_i,{horizontal:"center",vertical:"middle",width:r,height:v,children:[d(Et,{width:r,height:v,fill:i.colorPrimary,"data-element-type":"shape"}),d(zt,{width:v+6,height:v+6,fill:i.colorBg,fillOpacity:.5,"data-element-type":"shape"}),d(zt,{width:12,height:12,fill:"white","data-element-type":"shape"})]}),w=h.height+f.height,_=y.height+x.height+5,$=Math.abs(_-w),P=_>w?$:0,C=w>_?$:0;return s==="flipped"?I(lt,tg(J1({},a),{flexDirection:"column",alignItems:"center",children:[d(Kt,{height:C}),m,g,d(Kt,{height:5}),b,c,u,d(Kt,{height:P})]})):I(lt,tg(J1({},a),{flexDirection:"column",alignItems:"center",children:[d(Kt,{height:P}),c,u,b,d(Kt,{height:5}),g,m,d(Kt,{height:C})]}))};Vt("horizontal-icon-line",{component:eg,composites:["icon","label","desc"]});var FO=Object.defineProperty,BO=Object.defineProperties,WO=Object.getOwnPropertyDescriptors,ng=Object.getOwnPropertySymbols,VO=Object.prototype.hasOwnProperty,YO=Object.prototype.propertyIsEnumerable,rg=(t,e,n)=>e in t?FO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,XO=(t,e)=>{for(var n in e||(e={}))VO.call(e,n)&&rg(t,n,e[n]);if(ng)for(var n of ng(e))YO.call(e,n)&&rg(t,n,e[n]);return t},GO=(t,e)=>BO(t,WO(e));const ig=t=>{var e;const[{datum:n,indexes:r,size:i=80,iconSize:o=28,badgeSize:s=24,gap:a=8,themeColors:l,width:c=84,height:h=105},u]=Wt(t,["size","iconSize","badgeSize","gap"]),f=(e=n.value)!=null?e:0,p=`${l.colorPrimary}-icon`,g="#ff6b6b-badge";return I(V,GO(XO({},u),{width:c,height:h,children:[I(Lt,{children:[I("radialGradient",{id:p,cx:"50%",cy:"30%",r:"70%",children:[d("stop",{offset:"0%",stopColor:rt(l.colorPrimary).lighten(30).toHexString()}),d("stop",{offset:"100%",stopColor:l.colorPrimary})]}),I("linearGradient",{id:g,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#ff6b6b"}),d("stop",{offset:"100%",stopColor:"#ee5a52"})]})]}),d(zt,{x:0,y:0,width:i,height:i,fill:`url(#${p})`,"data-element-type":"shape"}),d(be,{indexes:r,x:(i-o)/2,y:(i-o)/2,size:o,fill:l.colorPrimaryText}),d(zt,{x:i-s+4,width:s,height:s,fill:`url(#${g})`}),d(Tt,{x:i-s+4,width:s,height:s,fontSize:10,fontWeight:"bold",fill:l.colorWhite,alignHorizontal:"center",alignVertical:"middle",children:f>99?"99+":Math.round(f)}),d(Pt,{indexes:r,x:0,y:i+a,width:i,alignHorizontal:"center",fontSize:12,fill:l.colorText,children:n.label})]}))};Vt("icon-badge",{component:ig,composites:["icon","label"]});var qO=Object.defineProperty,UO=Object.defineProperties,ZO=Object.getOwnPropertyDescriptors,og=Object.getOwnPropertySymbols,KO=Object.prototype.hasOwnProperty,QO=Object.prototype.propertyIsEnumerable,sg=(t,e,n)=>e in t?qO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,JO=(t,e)=>{for(var n in e||(e={}))KO.call(e,n)&&sg(t,n,e[n]);if(og)for(var n of og(e))QO.call(e,n)&&sg(t,n,e[n]);return t},tM=(t,e)=>UO(t,ZO(e));const ag=t=>{const[{datum:e,indexes:n,width:r=200,borderRadius:i=12,padding:o=16,separatorHeight:s=2,indexFontSize:a=20,labelFontSize:l=16,gap:c=8,themeColors:h},u]=Wt(t,["width","height","borderRadius","padding","separatorHeight","indexFontSize","labelFontSize","gap"]),f=n[0]+1,p=String(f).padStart(2,"0"),g=e.label!==void 0,y=e.desc!==void 0,m=rt.mix(h.colorPrimary,h.colorWhite,40).toHexString(),x=h.colorBgElevated||h.colorWhite,v=r-2*o,b=Q(d(Tt,{fontSize:a,fontWeight:"bold",children:p})),w=v-b.width-c,_=g?Q(d(Pt,{indexes:n,width:w,fontSize:l,fontWeight:"bold",x:a,children:e.label})):{height:0},$=y?Q(d(Xt,{indexes:n,width:v,fontSize:14,lineHeight:1.5,wordWrap:!0,children:e.desc})):{height:0},P=Math.max(b.height,_.height),C=o*2+P+(g||y?c:0)+s+(y?c:0)+$.height;return I(V,tM(JO({},u),{width:r,height:C,children:[d(Et,{x:0,y:0,width:r,height:C,rx:i,ry:i,fill:x,stroke:rt(x).darken(5).toHexString(),strokeWidth:.5,"data-element-type":"shape"}),I(V,{x:o,y:o,children:[I(V,{x:0,y:0,children:[d(Tt,{x:0,y:0,fontSize:a,fontWeight:"bold",fill:h.colorPrimary,alignVertical:"top",children:p}),g&&d(Pt,{indexes:n,x:a+c,y:0,width:w,fontSize:l,fontWeight:"bold",fill:h.colorTextSecondary,alignVertical:"top",children:e.label})]}),d(Et,{x:0,y:P+c,width:v,height:s,fill:m,"data-element-type":"shape"}),y&&d(Xt,{indexes:n,x:0,y:P+c+s+c,width:v,fontSize:14,lineHeight:1.5,wordWrap:!0,fill:h.colorTextSecondary,children:e.desc})]})]}))};Vt("indexed-card",{component:ag,composites:["label","desc"]});var eM=Object.defineProperty,nM=Object.defineProperties,rM=Object.getOwnPropertyDescriptors,lg=Object.getOwnPropertySymbols,iM=Object.prototype.hasOwnProperty,oM=Object.prototype.propertyIsEnumerable,cg=(t,e,n)=>e in t?eM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sM=(t,e)=>{for(var n in e||(e={}))iM.call(e,n)&&cg(t,n,e[n]);if(lg)for(var n of lg(e))oM.call(e,n)&&cg(t,n,e[n]);return t},aM=(t,e)=>nM(t,rM(e));const hg=t=>{const[{indexes:e,datum:n,width:r=140,iconSize:i=24,themeColors:o},s]=Wt(t,["width","iconSize"]),{label:a,desc:l}=n,c=8,h=16,u=12,f=h+u,p=r-f,g=60,y=i+44,m=h,x=g+u,v=g+h+u,b=[{x:0,y:v},{x:m,y:x},{x:m,y:v}],w=r-m-u,_=m+u,$=_+w,P=x+c/2,C=P+y,T=`M ${_} ${C} L ${_} ${P} L ${$} ${P}`,E=c/2,S=_+E,R=P+E,O=8;return I(V,aM(sM({},s),{children:[d(Xt,{indexes:e,x:f,width:p,height:g,fontSize:12,alignHorizontal:"left",alignVertical:"bottom",fill:o.colorTextSecondary,children:l}),d(Ne,{points:b,fill:o.colorPrimary,opacity:.9,width:h,height:h,"data-element-type":"shape"}),d(ht,{d:T,stroke:o.colorPrimary,strokeWidth:c,fill:"none","data-element-type":"shape"}),d(be,{indexes:e,x:S+w/2-i/2,y:R+O,size:i,fill:o.colorPrimary}),d(Pt,{indexes:e,x:S,y:R+i+O*2,width:w,fontSize:14,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:o.colorText,children:a})]}))};Vt("l-corner-card",{component:hg,composites:["icon","label","desc"]});var lM=Object.defineProperty,cM=Object.defineProperties,hM=Object.getOwnPropertyDescriptors,dg=Object.getOwnPropertySymbols,dM=Object.prototype.hasOwnProperty,uM=Object.prototype.propertyIsEnumerable,ug=(t,e,n)=>e in t?lM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fM=(t,e)=>{for(var n in e||(e={}))dM.call(e,n)&&ug(t,n,e[n]);if(dg)for(var n of dg(e))uM.call(e,n)&&ug(t,n,e[n]);return t},pM=(t,e)=>cM(t,hM(e));const fg=t=>{var e,n;const[{datum:r,indexes:i,width:o=280,height:s=160,showStripe:a=!0,showGradient:l=!0,showBottomShade:c=!0,themeColors:h},u]=Wt(t,["width","height","showStripe","showGradient","showBottomShade"]),f=(e=r.label)==null?void 0:e[0].toUpperCase(),p=(n=r.label)==null?void 0:n.toUpperCase(),g=h.colorPrimary,y=rt(g),m=4,x=6,v=45,b=40,w=12,$=y.clone().darken(4).toHexString(),P=y.clone().lighten(w).toHexString(),C="rgba(255, 255, 255, 0)",T="rgba(0, 0, 0, 0.03)",E=`letter-card-${i.join("-")}`,S=`${E}-gradient`,R=`${E}-pattern`,O=`${E}-shade`,A=m+x,B=1,L=96,D=L*B,k=16,N=k*B,j=s/16,X=D+j+N,z=(s-X)/2,M=z+D+j;return I(V,pM(fM({},u),{width:o,height:s,children:[I(Lt,{children:[l&&I("linearGradient",{id:S,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:$}),d("stop",{offset:"100%",stopColor:P})]}),a&&I("pattern",{id:R,patternUnits:"userSpaceOnUse",width:A,height:A,patternTransform:`rotate(${v})`,children:[d("rect",{x:"0",y:"0",width:A,height:A,fill:C}),d("rect",{x:"0",y:"0",width:m,height:A,fill:T})]}),c&&I("linearGradient",{id:O,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"rgba(0,0,0,0)"}),d("stop",{offset:"100%",stopColor:"rgba(0,0,0,0.16)"})]})]}),d(Et,{x:0,y:0,width:o,height:s,fill:l?`url(#${S})`:g,rx:0,ry:0,"data-element-type":"shape"}),a&&d(Et,{x:0,y:0,width:o,height:s,fill:`url(#${R})`,rx:0,ry:0}),c&&d(Et,{x:0,y:s-b,width:o,height:b,fill:`url(#${O})`,rx:0,ry:0}),f&&d(Pt,{indexes:i,x:0,y:z,width:o,fontSize:L,fontWeight:"bold",fill:"#FFFFFF",alignHorizontal:"center",alignVertical:"top",lineHeight:1,children:f}),d(Pt,{indexes:i,x:0,y:M,width:o,fontSize:k,fontWeight:"bold",fill:"#FFFFFF",alignHorizontal:"center",alignVertical:"middle",lineHeight:1,children:p})]}))};Vt("letter-card",{component:fg,composites:["label"]});var gM=Object.defineProperty,mM=Object.defineProperties,yM=Object.getOwnPropertyDescriptors,pg=Object.getOwnPropertySymbols,vM=Object.prototype.hasOwnProperty,xM=Object.prototype.propertyIsEnumerable,gg=(t,e,n)=>e in t?gM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bM=(t,e)=>{for(var n in e||(e={}))vM.call(e,n)&&gg(t,n,e[n]);if(pg)for(var n of pg(e))xM.call(e,n)&&gg(t,n,e[n]);return t},wM=(t,e)=>mM(t,yM(e));const mg=t=>{var e,n,r;const[{datum:i,indexes:o,width:s,themeColors:a,positionH:l="normal",positionV:c="center",formatter:h=B=>B||"",usePaletteColor:u=!1,showUnderline:f=!1,underlineGap:p=6,underlineExtend:g=8,underlineThickness:y=2},m]=Wt(t,["width","formatter","usePaletteColor","showUnderline","underlineGap","underlineExtend","underlineThickness"]),x=h((n=(e=i.label)!=null?e:i.desc)!=null?n:""),v=l==="flipped"?"right":l==="center"?"center":"left",b=Q(d(Pt,{indexes:o,width:s,children:x})),w=s!=null?s:b.width,_=b.height,$=f?w+g*2:0,P=_+(f?p+y:0),C=f?Math.max(w,$):w,T=(r=m.height)!=null?r:P,E=c==="middle"?(T-P)/2:c==="flipped"?T-P:0,S=v==="right"?C-w:v==="center"?(C-w)/2:0,R=E,O=v==="right"?C-$:v==="center"?(C-$)/2:0,A=T;return I(V,wM(bM({},m),{width:C,height:T,children:[d(Pt,{indexes:o,x:S,y:R,width:w,height:_,alignHorizontal:v,alignVertical:c==="flipped"?"bottom":c==="center"?"middle":"top",fill:u?a.colorPrimary:a.colorText,children:x}),f&&d(ht,{d:`M 0 ${y/2} L ${$} ${y/2}`,x:O,y:A-y/2,width:$,height:y,stroke:a.colorPrimary,strokeWidth:y,fill:"none",strokeLinecap:"round","data-element-type":"shape"})]}))};Vt("lined-text",{component:mg,composites:["label"]});var _M=Object.defineProperty,$M=Object.defineProperties,PM=Object.getOwnPropertyDescriptors,yg=Object.getOwnPropertySymbols,CM=Object.prototype.hasOwnProperty,OM=Object.prototype.propertyIsEnumerable,vg=(t,e,n)=>e in t?_M(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,MM=(t,e)=>{for(var n in e||(e={}))CM.call(e,n)&&vg(t,n,e[n]);if(yg)for(var n of yg(e))OM.call(e,n)&&vg(t,n,e[n]);return t},SM=(t,e)=>$M(t,PM(e));const xg=t=>{const[{datum:e,indexes:n,width:r=300,pillWidth:i=120,pillHeight:o=36,gap:s=16,positionH:a="normal",themeColors:l},c]=Wt(t,["width","pillWidth","pillHeight","gap"]),h=!!e.desc,u=h?r:i,f=h?a==="center"?(u-i)/2:a==="flipped"?u-i:0:0,p=0,g=0,y=o+s,m=u,x=`drop-shadow-${l.colorPrimary}`,v="linear-gradient-white-top-bottom";return I(V,SM(MM({},c),{children:[I(Lt,{children:[d(bc,{id:x,color:l.colorPrimary}),d(wc,{id:v,startColor:"#fff",stopColor:"#ffffff33",direction:"top-bottom"})]}),d(Et,{x:f,y:p,width:i,height:o,fill:l.colorPrimaryBg,stroke:l.colorPrimary,rx:o/2,ry:o/2,filter:`url(#${x})`,"data-element-type":"shape"}),d(Et,{x:f,y:p,width:i,height:o,fill:`url(#${v})`,opacity:l.isDarkMode?.4:.7,rx:o/2,ry:o/2}),d(Pt,{indexes:n,x:f,y:p,width:i,height:o,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"500",fill:l.colorText,children:e.label}),e.desc&&d(Xt,{indexes:n,x:g,y,width:m,alignHorizontal:a==="center"?"center":a==="flipped"?"right":"left",fontSize:12,fill:l.colorTextSecondary,lineNumber:2,wordWrap:!0,children:e.desc})]}))};Vt("pill-badge",{component:xg,composites:["label","desc"]});var EM=Object.defineProperty,IM=Object.defineProperties,TM=Object.getOwnPropertyDescriptors,bg=Object.getOwnPropertySymbols,AM=Object.prototype.hasOwnProperty,kM=Object.prototype.propertyIsEnumerable,wg=(t,e,n)=>e in t?EM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,LM=(t,e)=>{for(var n in e||(e={}))AM.call(e,n)&&wg(t,n,e[n]);if(bg)for(var n of bg(e))kM.call(e,n)&&wg(t,n,e[n]);return t},zM=(t,e)=>IM(t,TM(e));const _g=t=>{var e;const[{indexes:n,datum:r,width:i=120,themeColors:o,positionH:s="normal",positionV:a="center",formatter:l=y=>y||"",usePaletteColor:c=!1,lineNumber:h=1},u]=Wt(t,["width","formatter","usePaletteColor","lineNumber"]),f=14,p=1.4,g=(e=u.height)!=null?e:Math.ceil(h*p*f);return d(Pt,zM(LM({},u),{indexes:n,width:i,height:g,lineHeight:p,fill:c?o.colorPrimary:o.colorText,fontSize:f,fontWeight:"regular",alignHorizontal:s==="flipped"?"right":s==="center"?"center":"left",alignVertical:a==="flipped"?"bottom":a==="center"?"middle":"top",children:l(r.label||r.desc)}))};Vt("plain-text",{component:_g,composites:["label"]});function fs(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function HM(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function $g(t){let e,n,r;t.length!==2?(e=fs,n=(a,l)=>fs(t(a),l),r=(a,l)=>t(a)-l):(e=t===fs||t===HM?t:RM,n=t,r=t);function i(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<0?c=u+1:h=u}while(c<h)}return c}function o(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<=0?c=u+1:h=u}while(c<h)}return c}function s(a,l,c=0,h=a.length){const u=i(a,l,c,h-1);return u>c&&r(a[u-1],l)>-r(a[u],l)?u-1:u}return{left:i,center:s,right:o}}function RM(){return 0}function DM(t){return t===null?NaN:+t}const NM=$g(fs).right;$g(DM).center;const jM=Math.sqrt(50),FM=Math.sqrt(10),BM=Math.sqrt(2);function ps(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=jM?10:o>=FM?5:o>=BM?2:1;let a,l,c;return i<0?(c=Math.pow(10,-i)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,i)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?ps(t,e,n*2):[a,l,c]}function WM(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,s]=r?ps(e,t,n):ps(t,e,n);if(!(o>=i))return[];const a=o-i+1,l=new Array(a);if(r)if(s<0)for(let c=0;c<a;++c)l[c]=(o-c)/-s;else for(let c=0;c<a;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(i+c)/-s;else for(let c=0;c<a;++c)l[c]=(i+c)*s;return l}function Oc(t,e,n){return e=+e,t=+t,n=+n,ps(t,e,n)[2]}function VM(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Oc(e,t,n):Oc(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}var YM={value:()=>{}};function Mc(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new gs(n)}function gs(t){this._=t}function XM(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}gs.prototype=Mc.prototype={constructor:gs,on:function(t,e){var n=this._,r=XM(t+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=GM(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(i=(t=r[o]).type)n[i]=Pg(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Pg(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new gs(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function GM(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Pg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=YM,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Sc="http://www.w3.org/1999/xhtml";const Cg={svg:"http://www.w3.org/2000/svg",xhtml:Sc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ms(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Cg.hasOwnProperty(e)?{space:Cg[e],local:t}:t}function qM(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Sc&&e.documentElement.namespaceURI===Sc?e.createElement(t):e.createElementNS(n,t)}}function UM(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Og(t){var e=ms(t);return(e.local?UM:qM)(e)}function ZM(){}function Ec(t){return t==null?ZM:function(){return this.querySelector(t)}}function KM(t){typeof t!="function"&&(t=Ec(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=new Array(s),l,c,h=0;h<s;++h)(l=o[h])&&(c=t.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),a[h]=c);return new We(r,this._parents)}function QM(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function JM(){return[]}function Mg(t){return t==null?JM:function(){return this.querySelectorAll(t)}}function tS(t){return function(){return QM(t.apply(this,arguments))}}function eS(t){typeof t=="function"?t=tS(t):t=Mg(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var s=e[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(r.push(t.call(l,l.__data__,c,s)),i.push(l));return new We(r,i)}function Sg(t){return function(){return this.matches(t)}}function Eg(t){return function(e){return e.matches(t)}}var nS=Array.prototype.find;function rS(t){return function(){return nS.call(this.children,t)}}function iS(){return this.firstElementChild}function oS(t){return this.select(t==null?iS:rS(typeof t=="function"?t:Eg(t)))}var sS=Array.prototype.filter;function aS(){return Array.from(this.children)}function lS(t){return function(){return sS.call(this.children,t)}}function cS(t){return this.selectAll(t==null?aS:lS(typeof t=="function"?t:Eg(t)))}function hS(t){typeof t!="function"&&(t=Sg(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new We(r,this._parents)}function Ig(t){return new Array(t.length)}function dS(){return new We(this._enter||this._groups.map(Ig),this._parents)}function ys(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ys.prototype={constructor:ys,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function uS(t){return function(){return t}}function fS(t,e,n,r,i,o){for(var s=0,a,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new ys(t,o[s]);for(;s<l;++s)(a=e[s])&&(i[s]=a)}function pS(t,e,n,r,i,o,s){var a,l,c=new Map,h=e.length,u=o.length,f=new Array(h),p;for(a=0;a<h;++a)(l=e[a])&&(f[a]=p=s.call(l,l.__data__,a,e)+"",c.has(p)?i[a]=l:c.set(p,l));for(a=0;a<u;++a)p=s.call(t,o[a],a,o)+"",(l=c.get(p))?(r[a]=l,l.__data__=o[a],c.delete(p)):n[a]=new ys(t,o[a]);for(a=0;a<h;++a)(l=e[a])&&c.get(f[a])===l&&(i[a]=l)}function gS(t){return t.__data__}function mS(t,e){if(!arguments.length)return Array.from(this,gS);var n=e?pS:fS,r=this._parents,i=this._groups;typeof t!="function"&&(t=uS(t));for(var o=i.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var h=r[c],u=i[c],f=u.length,p=yS(t.call(h,h&&h.__data__,c,r)),g=p.length,y=a[c]=new Array(g),m=s[c]=new Array(g),x=l[c]=new Array(f);n(h,u,y,m,x,p,e);for(var v=0,b=0,w,_;v<g;++v)if(w=y[v]){for(v>=b&&(b=v+1);!(_=m[b])&&++b<g;);w._next=_||null}}return s=new We(s,r),s._enter=a,s._exit=l,s}function yS(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function vS(){return new We(this._exit||this._groups.map(Ig),this._parents)}function xS(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function bS(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),l=0;l<s;++l)for(var c=n[l],h=r[l],u=c.length,f=a[l]=new Array(u),p,g=0;g<u;++g)(p=c[g]||h[g])&&(f[g]=p);for(;l<i;++l)a[l]=n[l];return new We(a,this._parents)}function wS(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function _S(t){t||(t=$S);function e(u,f){return u&&f?t(u.__data__,f.__data__):!u-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s=n[o],a=s.length,l=i[o]=new Array(a),c,h=0;h<a;++h)(c=s[h])&&(l[h]=c);l.sort(e)}return new We(i,this._parents).order()}function $S(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function PS(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function CS(){return Array.from(this)}function OS(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function MS(){let t=0;for(const e of this)++t;return t}function SS(){return!this.node()}function ES(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,s=i.length,a;o<s;++o)(a=i[o])&&t.call(a,a.__data__,o,i);return this}function IS(t){return function(){this.removeAttribute(t)}}function TS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function AS(t,e){return function(){this.setAttribute(t,e)}}function kS(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function LS(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function zS(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function HS(t,e){var n=ms(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?TS:IS:typeof e=="function"?n.local?zS:LS:n.local?kS:AS)(n,e))}function Tg(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function RS(t){return function(){this.style.removeProperty(t)}}function DS(t,e,n){return function(){this.style.setProperty(t,e,n)}}function NS(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function jS(t,e,n){return arguments.length>1?this.each((e==null?RS:typeof e=="function"?NS:DS)(t,e,n==null?"":n)):kr(this.node(),t)}function kr(t,e){return t.style.getPropertyValue(e)||Tg(t).getComputedStyle(t,null).getPropertyValue(e)}function FS(t){return function(){delete this[t]}}function BS(t,e){return function(){this[t]=e}}function WS(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function VS(t,e){return arguments.length>1?this.each((e==null?FS:typeof e=="function"?WS:BS)(t,e)):this.node()[t]}function Ag(t){return t.trim().split(/^|\s+/)}function Ic(t){return t.classList||new kg(t)}function kg(t){this._node=t,this._names=Ag(t.getAttribute("class")||"")}kg.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Lg(t,e){for(var n=Ic(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function zg(t,e){for(var n=Ic(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function YS(t){return function(){Lg(this,t)}}function XS(t){return function(){zg(this,t)}}function GS(t,e){return function(){(e.apply(this,arguments)?Lg:zg)(this,t)}}function qS(t,e){var n=Ag(t+"");if(arguments.length<2){for(var r=Ic(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?GS:e?YS:XS)(n,e))}function US(){this.textContent=""}function ZS(t){return function(){this.textContent=t}}function KS(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function QS(t){return arguments.length?this.each(t==null?US:(typeof t=="function"?KS:ZS)(t)):this.node().textContent}function JS(){this.innerHTML=""}function tE(t){return function(){this.innerHTML=t}}function eE(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function nE(t){return arguments.length?this.each(t==null?JS:(typeof t=="function"?eE:tE)(t)):this.node().innerHTML}function rE(){this.nextSibling&&this.parentNode.appendChild(this)}function iE(){return this.each(rE)}function oE(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function sE(){return this.each(oE)}function aE(t){var e=typeof t=="function"?t:Og(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function lE(){return null}function cE(t,e){var n=typeof t=="function"?t:Og(t),r=e==null?lE:typeof e=="function"?e:Ec(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function hE(){var t=this.parentNode;t&&t.removeChild(this)}function dE(){return this.each(hE)}function uE(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function fE(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function pE(t){return this.select(t?fE:uE)}function gE(t){return arguments.length?this.property("__data__",t):this.node().__data__}function mE(t){return function(e){t.call(this,e,this.__data__)}}function yE(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function vE(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function xE(t,e,n){return function(){var r=this.__on,i,o=mE(e);if(r){for(var s=0,a=r.length;s<a;++s)if((i=r[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function bE(t,e,n){var r=yE(t+""),i,o=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,h;l<c;++l)for(i=0,h=a[l];i<o;++i)if((s=r[i]).type===h.type&&s.name===h.name)return h.value}return}for(a=e?xE:vE,i=0;i<o;++i)this.each(a(r[i],e,n));return this}function Hg(t,e,n){var r=Tg(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function wE(t,e){return function(){return Hg(this,t,e)}}function _E(t,e){return function(){return Hg(this,t,e.apply(this,arguments))}}function $E(t,e){return this.each((typeof e=="function"?_E:wE)(t,e))}function*PE(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var CE=[null];function We(t,e){this._groups=t,this._parents=e}function Si(){return new We([[document.documentElement]],CE)}function OE(){return this}We.prototype=Si.prototype={constructor:We,select:KM,selectAll:eS,selectChild:oS,selectChildren:cS,filter:hS,data:mS,enter:dS,exit:vS,join:xS,merge:bS,selection:OE,order:wS,sort:_S,call:PS,nodes:CS,node:OS,size:MS,empty:SS,each:ES,attr:HS,style:jS,property:VS,classed:qS,text:QS,html:nE,raise:iE,lower:sE,append:aE,insert:cE,remove:dE,clone:pE,datum:gE,on:bE,dispatch:$E,[Symbol.iterator]:PE};function Tc(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Rg(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ei(){}var Ii=.7,vs=1/Ii,Lr="\\s*([+-]?\\d+)\\s*",Ti="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",on="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ME=/^#([0-9a-f]{3,8})$/,SE=new RegExp(`^rgb\\(${Lr},${Lr},${Lr}\\)$`),EE=new RegExp(`^rgb\\(${on},${on},${on}\\)$`),IE=new RegExp(`^rgba\\(${Lr},${Lr},${Lr},${Ti}\\)$`),TE=new RegExp(`^rgba\\(${on},${on},${on},${Ti}\\)$`),AE=new RegExp(`^hsl\\(${Ti},${on},${on}\\)$`),kE=new RegExp(`^hsla\\(${Ti},${on},${on},${Ti}\\)$`),Dg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Tc(Ei,ir,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ng,formatHex:Ng,formatHex8:LE,formatHsl:zE,formatRgb:jg,toString:jg});function Ng(){return this.rgb().formatHex()}function LE(){return this.rgb().formatHex8()}function zE(){return Yg(this).formatHsl()}function jg(){return this.rgb().formatRgb()}function ir(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ME.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Fg(e):n===3?new Ee(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?xs(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?xs(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=SE.exec(t))?new Ee(e[1],e[2],e[3],1):(e=EE.exec(t))?new Ee(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=IE.exec(t))?xs(e[1],e[2],e[3],e[4]):(e=TE.exec(t))?xs(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=AE.exec(t))?Vg(e[1],e[2]/100,e[3]/100,1):(e=kE.exec(t))?Vg(e[1],e[2]/100,e[3]/100,e[4]):Dg.hasOwnProperty(t)?Fg(Dg[t]):t==="transparent"?new Ee(NaN,NaN,NaN,0):null}function Fg(t){return new Ee(t>>16&255,t>>8&255,t&255,1)}function xs(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ee(t,e,n,r)}function HE(t){return t instanceof Ei||(t=ir(t)),t?(t=t.rgb(),new Ee(t.r,t.g,t.b,t.opacity)):new Ee}function Ac(t,e,n,r){return arguments.length===1?HE(t):new Ee(t,e,n,r==null?1:r)}function Ee(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Tc(Ee,Ac,Rg(Ei,{brighter(t){return t=t==null?vs:Math.pow(vs,t),new Ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ii:Math.pow(Ii,t),new Ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ee(or(this.r),or(this.g),or(this.b),bs(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Bg,formatHex:Bg,formatHex8:RE,formatRgb:Wg,toString:Wg}));function Bg(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}`}function RE(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}${sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Wg(){const t=bs(this.opacity);return`${t===1?"rgb(":"rgba("}${or(this.r)}, ${or(this.g)}, ${or(this.b)}${t===1?")":`, ${t})`}`}function bs(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function or(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function sr(t){return t=or(t),(t<16?"0":"")+t.toString(16)}function Vg(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ve(t,e,n,r)}function Yg(t){if(t instanceof Ve)return new Ve(t.h,t.s,t.l,t.opacity);if(t instanceof Ei||(t=ir(t)),!t)return new Ve;if(t instanceof Ve)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,l=(o+i)/2;return a?(e===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-e)/a+2:s=(e-n)/a+4,a/=l<.5?o+i:2-o-i,s*=60):a=l>0&&l<1?0:s,new Ve(s,a,l,t.opacity)}function DE(t,e,n,r){return arguments.length===1?Yg(t):new Ve(t,e,n,r==null?1:r)}function Ve(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Tc(Ve,DE,Rg(Ei,{brighter(t){return t=t==null?vs:Math.pow(vs,t),new Ve(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ii:Math.pow(Ii,t),new Ve(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ee(kc(t>=240?t-240:t+120,i,r),kc(t,i,r),kc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ve(Xg(this.h),ws(this.s),ws(this.l),bs(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=bs(this.opacity);return`${t===1?"hsl(":"hsla("}${Xg(this.h)}, ${ws(this.s)*100}%, ${ws(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Xg(t){return t=(t||0)%360,t<0?t+360:t}function ws(t){return Math.max(0,Math.min(1,t||0))}function kc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Lc=t=>()=>t;function NE(t,e){return function(n){return t+n*e}}function jE(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function FE(t){return(t=+t)==1?Gg:function(e,n){return n-e?jE(e,n,t):Lc(isNaN(e)?n:e)}}function Gg(t,e){var n=e-t;return n?NE(t,n):Lc(isNaN(t)?e:t)}const _s=(function t(e){var n=FE(e);function r(i,o){var s=n((i=Ac(i)).r,(o=Ac(o)).r),a=n(i.g,o.g),l=n(i.b,o.b),c=Gg(i.opacity,o.opacity);return function(h){return i.r=s(h),i.g=a(h),i.b=l(h),i.opacity=c(h),i+""}}return r.gamma=t,r})(1);function BE(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function WE(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function VE(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=Rc(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(a){for(s=0;s<r;++s)o[s]=i[s](a);return o}}function YE(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Ye(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function XE(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Rc(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var zc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hc=new RegExp(zc.source,"g");function GE(t){return function(){return t}}function qE(t){return function(e){return t(e)+""}}function qg(t,e){var n=zc.lastIndex=Hc.lastIndex=0,r,i,o,s=-1,a=[],l=[];for(t=t+"",e=e+"";(r=zc.exec(t))&&(i=Hc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Ye(r,i)})),n=Hc.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?qE(l[0].x):GE(e):(e=l.length,function(c){for(var h=0,u;h<e;++h)a[(u=l[h]).i]=u.x(c);return a.join("")})}function Rc(t,e){var n=typeof e,r;return e==null||n==="boolean"?Lc(e):(n==="number"?Ye:n==="string"?(r=ir(e))?(e=r,_s):qg:e instanceof ir?_s:e instanceof Date?YE:WE(e)?BE:Array.isArray(e)?VE:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?XE:Ye)(t,e)}function UE(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Ug=180/Math.PI,Dc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Zg(t,e,n,r,i,o){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),t*r<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Ug,skewX:Math.atan(l)*Ug,scaleX:s,scaleY:a}}var $s;function ZE(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Dc:Zg(e.a,e.b,e.c,e.d,e.e,e.f)}function KE(t){return t==null||($s||($s=document.createElementNS("http://www.w3.org/2000/svg","g")),$s.setAttribute("transform",t),!(t=$s.transform.baseVal.consolidate()))?Dc:(t=t.matrix,Zg(t.a,t.b,t.c,t.d,t.e,t.f))}function Kg(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,h,u,f,p,g){if(c!==u||h!==f){var y=p.push("translate(",null,e,null,n);g.push({i:y-4,x:Ye(c,u)},{i:y-2,x:Ye(h,f)})}else(u||f)&&p.push("translate("+u+e+f+n)}function s(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(i(u)+"rotate(",null,r)-2,x:Ye(c,h)})):h&&u.push(i(u)+"rotate("+h+r)}function a(c,h,u,f){c!==h?f.push({i:u.push(i(u)+"skewX(",null,r)-2,x:Ye(c,h)}):h&&u.push(i(u)+"skewX("+h+r)}function l(c,h,u,f,p,g){if(c!==u||h!==f){var y=p.push(i(p)+"scale(",null,",",null,")");g.push({i:y-4,x:Ye(c,u)},{i:y-2,x:Ye(h,f)})}else(u!==1||f!==1)&&p.push(i(p)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=t(c),h=t(h),o(c.translateX,c.translateY,h.translateX,h.translateY,u,f),s(c.rotate,h.rotate,u,f),a(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(p){for(var g=-1,y=f.length,m;++g<y;)u[(m=f[g]).i]=m.x(p);return u.join("")}}}var QE=Kg(ZE,"px, ","px)","deg)"),JE=Kg(KE,", ",")",")"),zr=0,Ai=0,ki=0,Qg=1e3,Ps,Li,Cs=0,ar=0,Os=0,zi=typeof performance=="object"&&performance.now?performance:Date,Jg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Nc(){return ar||(Jg(tI),ar=zi.now()+Os)}function tI(){ar=0}function Ms(){this._call=this._time=this._next=null}Ms.prototype=jc.prototype={constructor:Ms,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Nc():+n)+(e==null?0:+e),!this._next&&Li!==this&&(Li?Li._next=this:Ps=this,Li=this),this._call=t,this._time=n,Fc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fc())}};function jc(t,e,n){var r=new Ms;return r.restart(t,e,n),r}function eI(){Nc(),++zr;for(var t=Ps,e;t;)(e=ar-t._time)>=0&&t._call.call(void 0,e),t=t._next;--zr}function tm(){ar=(Cs=zi.now())+Os,zr=Ai=0;try{eI()}finally{zr=0,rI(),ar=0}}function nI(){var t=zi.now(),e=t-Cs;e>Qg&&(Os-=e,Cs=t)}function rI(){for(var t,e=Ps,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ps=n);Li=t,Fc(r)}function Fc(t){if(!zr){Ai&&(Ai=clearTimeout(Ai));var e=t-ar;e>24?(t<1/0&&(Ai=setTimeout(tm,t-zi.now()-Os)),ki&&(ki=clearInterval(ki))):(ki||(Cs=zi.now(),ki=setInterval(nI,Qg)),zr=1,Jg(tm))}}function em(t,e,n){var r=new Ms;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var iI=Mc("start","end","cancel","interrupt"),oI=[],nm=0,rm=1,Bc=2,Ss=3,im=4,Wc=5,Es=6;function Is(t,e,n,r,i,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;sI(t,n,{name:e,index:r,group:i,on:iI,tween:oI,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:nm})}function Vc(t,e){var n=Xe(t,e);if(n.state>nm)throw new Error("too late; already scheduled");return n}function sn(t,e){var n=Xe(t,e);if(n.state>Ss)throw new Error("too late; already running");return n}function Xe(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function sI(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=jc(o,0,n.time);function o(c){n.state=rm,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var h,u,f,p;if(n.state!==rm)return l();for(h in r)if(p=r[h],p.name===n.name){if(p.state===Ss)return em(s);p.state===im?(p.state=Es,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[h]):+h<e&&(p.state=Es,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[h])}if(em(function(){n.state===Ss&&(n.state=im,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=Bc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Bc){for(n.state=Ss,i=new Array(f=n.tween.length),h=0,u=-1;h<f;++h)(p=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(i[++u]=p);i.length=u+1}}function a(c){for(var h=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Wc,1),u=-1,f=i.length;++u<f;)i[u].call(t,h);n.state===Wc&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=Es,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function aI(t,e){var n=t.__transition,r,i,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((r=n[s]).name!==e){o=!1;continue}i=r.state>Bc&&r.state<Wc,r.state=Es,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[s]}o&&delete t.__transition}}function lI(t){return this.each(function(){aI(this,t)})}function cI(t,e){var n,r;return function(){var i=sn(this,t),o=i.tween;if(o!==n){r=n=o;for(var s=0,a=r.length;s<a;++s)if(r[s].name===e){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function hI(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=sn(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:e,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===e){i[l]=a;break}l===c&&i.push(a)}o.tween=i}}function dI(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Xe(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===t)return s.value;return null}return this.each((e==null?cI:hI)(n,t,e))}function Yc(t,e,n){var r=t._id;return t.each(function(){var i=sn(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Xe(i,r).value[e]}}function om(t,e){var n;return(typeof e=="number"?Ye:e instanceof ir?_s:(n=ir(e))?(e=n,_s):qg)(t,e)}function uI(t){return function(){this.removeAttribute(t)}}function fI(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pI(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttribute(t);return s===i?null:s===r?o:o=e(r=s,n)}}function gI(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===r?o:o=e(r=s,n)}}function mI(t,e,n){var r,i,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=a+"",s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a)))}}function yI(t,e,n){var r,i,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=a+"",s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a)))}}function vI(t,e){var n=ms(t),r=n==="transform"?JE:om;return this.attrTween(t,typeof e=="function"?(n.local?yI:mI)(n,r,Yc(this,"attr."+t,e)):e==null?(n.local?fI:uI)(n):(n.local?gI:pI)(n,r,e))}function xI(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function bI(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function wI(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&bI(t,o)),n}return i._value=e,i}function _I(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&xI(t,o)),n}return i._value=e,i}function $I(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=ms(t);return this.tween(n,(r.local?wI:_I)(r,e))}function PI(t,e){return function(){Vc(this,t).delay=+e.apply(this,arguments)}}function CI(t,e){return e=+e,function(){Vc(this,t).delay=e}}function OI(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?PI:CI)(e,t)):Xe(this.node(),e).delay}function MI(t,e){return function(){sn(this,t).duration=+e.apply(this,arguments)}}function SI(t,e){return e=+e,function(){sn(this,t).duration=e}}function EI(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?MI:SI)(e,t)):Xe(this.node(),e).duration}function II(t,e){if(typeof e!="function")throw new Error;return function(){sn(this,t).ease=e}}function TI(t){var e=this._id;return arguments.length?this.each(II(e,t)):Xe(this.node(),e).ease}function AI(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;sn(this,t).ease=n}}function kI(t){if(typeof t!="function")throw new Error;return this.each(AI(this._id,t))}function LI(t){typeof t!="function"&&(t=Sg(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new xn(r,this._parents,this._name,this._id)}function zI(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var l=e[a],c=n[a],h=l.length,u=s[a]=new Array(h),f,p=0;p<h;++p)(f=l[p]||c[p])&&(u[p]=f);for(;a<r;++a)s[a]=e[a];return new xn(s,this._parents,this._name,this._id)}function HI(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function RI(t,e,n){var r,i,o=HI(e)?Vc:sn;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(e,n),s.on=i}}function DI(t,e){var n=this._id;return arguments.length<2?Xe(this.node(),n).on.on(t):this.each(RI(n,t,e))}function NI(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function jI(){return this.on("end.remove",NI(this._id))}function FI(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ec(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a=r[s],l=a.length,c=o[s]=new Array(l),h,u,f=0;f<l;++f)(h=a[f])&&(u=t.call(h,h.__data__,f,a))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,Is(c[f],e,n,f,c,Xe(h,n)));return new xn(o,this._parents,e,n)}function BI(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Mg(t));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var l=r[a],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=t.call(h,h.__data__,u,l),p,g=Xe(h,n),y=0,m=f.length;y<m;++y)(p=f[y])&&Is(p,e,n,y,f,g);o.push(f),s.push(h)}return new xn(o,s,e,n)}var WI=Si.prototype.constructor;function VI(){return new WI(this._groups,this._parents)}function YI(t,e){var n,r,i;return function(){var o=kr(this,t),s=(this.style.removeProperty(t),kr(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}function sm(t){return function(){this.style.removeProperty(t)}}function XI(t,e,n){var r,i=n+"",o;return function(){var s=kr(this,t);return s===i?null:s===r?o:o=e(r=s,n)}}function GI(t,e,n){var r,i,o;return function(){var s=kr(this,t),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),kr(this,t))),s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a))}}function qI(t,e){var n,r,i,o="style."+e,s="end."+o,a;return function(){var l=sn(this,t),c=l.on,h=l.value[o]==null?a||(a=sm(e)):void 0;(c!==n||i!==h)&&(r=(n=c).copy()).on(s,i=h),l.on=r}}function UI(t,e,n){var r=(t+="")=="transform"?QE:om;return e==null?this.styleTween(t,YI(t,r)).on("end.style."+t,sm(t)):typeof e=="function"?this.styleTween(t,GI(t,r,Yc(this,"style."+t,e))).each(qI(this._id,t)):this.styleTween(t,XI(t,r,e),n).on("end.style."+t,null)}function ZI(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function KI(t,e,n){var r,i;function o(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&ZI(t,s,n)),r}return o._value=e,o}function QI(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,KI(t,e,n==null?"":n))}function JI(t){return function(){this.textContent=t}}function tT(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function eT(t){return this.tween("text",typeof t=="function"?tT(Yc(this,"text",t)):JI(t==null?"":t+""))}function nT(t){return function(e){this.textContent=t.call(this,e)}}function rT(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&nT(i)),e}return r._value=t,r}function iT(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,rT(t))}function oT(){for(var t=this._name,e=this._id,n=am(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var h=Xe(l,e);Is(l,t,n,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new xn(r,this._parents,t,n)}function sT(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var a={value:s},l={value:function(){--i===0&&o()}};n.each(function(){var c=sn(this,r),h=c.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),c.on=e}),i===0&&o()})}var aT=0;function xn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function am(){return++aT}var bn=Si.prototype;xn.prototype={constructor:xn,select:FI,selectAll:BI,selectChild:bn.selectChild,selectChildren:bn.selectChildren,filter:LI,merge:zI,selection:VI,transition:oT,call:bn.call,nodes:bn.nodes,node:bn.node,size:bn.size,empty:bn.empty,each:bn.each,on:DI,attr:vI,attrTween:$I,style:UI,styleTween:QI,text:eT,textTween:iT,remove:jI,tween:dI,delay:OI,duration:EI,ease:TI,easeVarying:kI,end:sT,[Symbol.iterator]:bn[Symbol.iterator]};function lT(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var cT={time:null,delay:0,duration:250,ease:lT};function hT(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function dT(t){var e,n;t instanceof xn?(e=t._id,t=t._name):(e=am(),(n=cT).time=Nc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&Is(l,t,e,c,s,n||hT(l,e));return new xn(r,this._parents,t,e)}Si.prototype.interrupt=lI,Si.prototype.transition=dT;const Xc=Math.PI,Gc=2*Xc,lr=1e-6,uT=Gc-lr;function lm(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function fT(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return lm;const n=Gi(10,e);return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class pT{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?lm:fT(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,s){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,l=r-e,c=i-n,h=s-e,u=a-n,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>lr)if(!(Math.abs(u*l-c*h)>lr)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-s,g=i-a,y=l*l+c*c,m=p*p+g*g,x=Math.sqrt(y),v=Math.sqrt(f),b=o*Math.tan((Xc-Math.acos((y+f-m)/(2*x*v)))/2),w=b/v,_=b/x;Math.abs(w-1)>lr&&this._append`L${e+w*h},${n+w*u}`,this._append`A${o},${o},0,0,${+(u*p>h*g)},${this._x1=e+_*l},${this._y1=n+_*c}`}}arc(e,n,r,i,o,s){if(e=+e,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),l=r*Math.sin(i),c=e+a,h=n+l,u=1^s,f=s?i-o:o-i;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>lr||Math.abs(this._y1-h)>lr)&&this._append`L${c},${h}`,r&&(f<0&&(f=f%Gc+Gc),f>uT?this._append`A${r},${r},0,1,${u},${e-a},${n-l}A${r},${r},0,1,${u},${this._x1=c},${this._y1=h}`:f>lr&&this._append`A${r},${r},0,${+(f>=Xc)},${u},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function gT(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,s=n.length,a,l=0,c=0;for(o=0;o<s;++o)a=n[o],l+=a.x,c+=a.y;for(l=(l/s-t)*r,c=(c/s-e)*r,o=0;o<s;++o)a=n[o],a.x-=l,a.y-=c}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function mT(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return cm(this.cover(e,n),e,n,t)}function cm(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,s={data:r},a=t._x0,l=t._y0,c=t._x1,h=t._y1,u,f,p,g,y,m,x,v;if(!o)return t._root=s,t;for(;o.length;)if((y=e>=(u=(a+c)/2))?a=u:c=u,(m=n>=(f=(l+h)/2))?l=f:h=f,i=o,!(o=o[x=m<<1|y]))return i[x]=s,t;if(p=+t._x.call(null,o.data),g=+t._y.call(null,o.data),e===p&&n===g)return s.next=o,i?i[x]=s:t._root=s,t;do i=i?i[x]=new Array(4):t._root=new Array(4),(y=e>=(u=(a+c)/2))?a=u:c=u,(m=n>=(f=(l+h)/2))?l=f:h=f;while((x=m<<1|y)===(v=(g>=f)<<1|p>=u));return i[v]=o,i[x]=s,t}function yT(t){var e,n,r=t.length,i,o,s=new Array(r),a=new Array(r),l=1/0,c=1/0,h=-1/0,u=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(s[n]=i,a[n]=o,i<l&&(l=i),i>h&&(h=i),o<c&&(c=o),o>u&&(u=o));if(l>h||c>u)return this;for(this.cover(l,c).cover(h,u),n=0;n<r;++n)cm(this,s[n],a[n],t[n]);return this}function vT(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var s=i-n||1,a=this._root,l,c;n>t||t>=i||r>e||e>=o;)switch(c=(e<r)<<1|t<n,l=new Array(4),l[c]=a,a=l,s*=2,c){case 0:i=n+s,o=r+s;break;case 1:n=i-s,o=r+s;break;case 2:i=n+s,r=o-s;break;case 3:n=i-s,r=o-s;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function xT(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function bT(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Pe(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function wT(t,e,n){var r,i=this._x0,o=this._y0,s,a,l,c,h=this._x1,u=this._y1,f=[],p=this._root,g,y;for(p&&f.push(new Pe(p,i,o,h,u)),n==null?n=1/0:(i=t-n,o=e-n,h=t+n,u=e+n,n*=n);g=f.pop();)if(!(!(p=g.node)||(s=g.x0)>h||(a=g.y0)>u||(l=g.x1)<i||(c=g.y1)<o))if(p.length){var m=(s+l)/2,x=(a+c)/2;f.push(new Pe(p[3],m,x,l,c),new Pe(p[2],s,x,m,c),new Pe(p[1],m,a,l,x),new Pe(p[0],s,a,m,x)),(y=(e>=x)<<1|t>=m)&&(g=f[f.length-1],f[f.length-1]=f[f.length-1-y],f[f.length-1-y]=g)}else{var v=t-+this._x.call(null,p.data),b=e-+this._y.call(null,p.data),w=v*v+b*b;if(w<n){var _=Math.sqrt(n=w);i=t-_,o=e-_,h=t+_,u=e+_,r=p.data}}return r}function _T(t){if(isNaN(h=+this._x.call(null,t))||isNaN(u=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,s=this._x0,a=this._y0,l=this._x1,c=this._y1,h,u,f,p,g,y,m,x;if(!n)return this;if(n.length)for(;;){if((g=h>=(f=(s+l)/2))?s=f:l=f,(y=u>=(p=(a+c)/2))?a=p:c=p,e=n,!(n=n[m=y<<1|g]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,x=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[x]=n:this._root=n),this):(this._root=o,this)}function $T(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function PT(){return this._root}function CT(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function OT(t){var e=[],n,r=this._root,i,o,s,a,l;for(r&&e.push(new Pe(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,s=n.y0,a=n.x1,l=n.y1)&&r.length){var c=(o+a)/2,h=(s+l)/2;(i=r[3])&&e.push(new Pe(i,c,h,a,l)),(i=r[2])&&e.push(new Pe(i,o,h,c,l)),(i=r[1])&&e.push(new Pe(i,c,s,a,h)),(i=r[0])&&e.push(new Pe(i,o,s,c,h))}return this}function MT(t){var e=[],n=[],r;for(this._root&&e.push(new Pe(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,s=r.x0,a=r.y0,l=r.x1,c=r.y1,h=(s+l)/2,u=(a+c)/2;(o=i[0])&&e.push(new Pe(o,s,a,h,u)),(o=i[1])&&e.push(new Pe(o,h,a,l,u)),(o=i[2])&&e.push(new Pe(o,s,u,h,c)),(o=i[3])&&e.push(new Pe(o,h,u,l,c))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function ST(t){return t[0]}function ET(t){return arguments.length?(this._x=t,this):this._x}function IT(t){return t[1]}function TT(t){return arguments.length?(this._y=t,this):this._y}function qc(t,e,n){var r=new Uc(e==null?ST:e,n==null?IT:n,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Uc(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function hm(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Ce=qc.prototype=Uc.prototype;Ce.copy=function(){var t=new Uc(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=hm(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=hm(r));return t},Ce.add=mT,Ce.addAll=yT,Ce.cover=vT,Ce.data=xT,Ce.extent=bT,Ce.find=wT,Ce.remove=_T,Ce.removeAll=$T,Ce.root=PT,Ce.size=CT,Ce.visit=OT,Ce.visitAfter=MT,Ce.x=ET,Ce.y=TT;function cr(t){return function(){return t}}function Ln(t){return(t()-.5)*1e-6}function AT(t){return t.x+t.vx}function kT(t){return t.y+t.vy}function LT(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=cr(t==null?1:+t));function s(){for(var c,h=e.length,u,f,p,g,y,m,x=0;x<o;++x)for(u=qc(e,AT,kT).visitAfter(a),c=0;c<h;++c)f=e[c],y=n[f.index],m=y*y,p=f.x+f.vx,g=f.y+f.vy,u.visit(v);function v(b,w,_,$,P){var C=b.data,T=b.r,E=y+T;if(C){if(C.index>f.index){var S=p-C.x-C.vx,R=g-C.y-C.vy,O=S*S+R*R;O<E*E&&(S===0&&(S=Ln(r),O+=S*S),R===0&&(R=Ln(r),O+=R*R),O=(E-(O=Math.sqrt(O)))/O*i,f.vx+=(S*=O)*(E=(T*=T)/(m+T)),f.vy+=(R*=O)*E,C.vx-=S*(E=1-E),C.vy-=R*E)}return}return w>p+E||$<p-E||_>g+E||P<g-E}}function a(c){if(c.data)return c.r=n[c.data.index];for(var h=c.r=0;h<4;++h)c[h]&&c[h].r>c.r&&(c.r=c[h].r)}function l(){if(e){var c,h=e.length,u;for(n=new Array(h),c=0;c<h;++c)u=e[c],n[u.index]=+t(u,c,e)}}return s.initialize=function(c,h){e=c,r=h,l()},s.iterations=function(c){return arguments.length?(o=+c,s):o},s.strength=function(c){return arguments.length?(i=+c,s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:cr(+c),l(),s):t},s}function zT(t){return t.index}function dm(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function HT(t){var e=zT,n=u,r,i=cr(30),o,s,a,l,c,h=1;t==null&&(t=[]);function u(m){return 1/Math.min(a[m.source.index],a[m.target.index])}function f(m){for(var x=0,v=t.length;x<h;++x)for(var b=0,w,_,$,P,C,T,E;b<v;++b)w=t[b],_=w.source,$=w.target,P=$.x+$.vx-_.x-_.vx||Ln(c),C=$.y+$.vy-_.y-_.vy||Ln(c),T=Math.sqrt(P*P+C*C),T=(T-o[b])/T*m*r[b],P*=T,C*=T,$.vx-=P*(E=l[b]),$.vy-=C*E,_.vx+=P*(E=1-E),_.vy+=C*E}function p(){if(s){var m,x=s.length,v=t.length,b=new Map(s.map((_,$)=>[e(_,$,s),_])),w;for(m=0,a=new Array(x);m<v;++m)w=t[m],w.index=m,typeof w.source!="object"&&(w.source=dm(b,w.source)),typeof w.target!="object"&&(w.target=dm(b,w.target)),a[w.source.index]=(a[w.source.index]||0)+1,a[w.target.index]=(a[w.target.index]||0)+1;for(m=0,l=new Array(v);m<v;++m)w=t[m],l[m]=a[w.source.index]/(a[w.source.index]+a[w.target.index]);r=new Array(v),g(),o=new Array(v),y()}}function g(){if(s)for(var m=0,x=t.length;m<x;++m)r[m]=+n(t[m],m,t)}function y(){if(s)for(var m=0,x=t.length;m<x;++m)o[m]=+i(t[m],m,t)}return f.initialize=function(m,x){s=m,c=x,p()},f.links=function(m){return arguments.length?(t=m,p(),f):t},f.id=function(m){return arguments.length?(e=m,f):e},f.iterations=function(m){return arguments.length?(h=+m,f):h},f.strength=function(m){return arguments.length?(n=typeof m=="function"?m:cr(+m),g(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:cr(+m),y(),f):i},f}const RT=1664525,DT=1013904223,um=4294967296;function NT(){let t=1;return()=>(t=(RT*t+DT)%um)/um}function jT(t){return t.x}function FT(t){return t.y}var BT=10,WT=Math.PI*(3-Math.sqrt(5));function VT(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,s=.6,a=new Map,l=jc(u),c=Mc("tick","end"),h=NT();t==null&&(t=[]);function u(){f(),c.call("tick",e),n<r&&(l.stop(),c.call("end",e))}function f(y){var m,x=t.length,v;y===void 0&&(y=1);for(var b=0;b<y;++b)for(n+=(o-n)*i,a.forEach(function(w){w(n)}),m=0;m<x;++m)v=t[m],v.fx==null?v.x+=v.vx*=s:(v.x=v.fx,v.vx=0),v.fy==null?v.y+=v.vy*=s:(v.y=v.fy,v.vy=0);return e}function p(){for(var y=0,m=t.length,x;y<m;++y){if(x=t[y],x.index=y,x.fx!=null&&(x.x=x.fx),x.fy!=null&&(x.y=x.fy),isNaN(x.x)||isNaN(x.y)){var v=BT*Math.sqrt(.5+y),b=y*WT;x.x=v*Math.cos(b),x.y=v*Math.sin(b)}(isNaN(x.vx)||isNaN(x.vy))&&(x.vx=x.vy=0)}}function g(y){return y.initialize&&y.initialize(t,h),y}return p(),e={tick:f,restart:function(){return l.restart(u),e},stop:function(){return l.stop(),e},nodes:function(y){return arguments.length?(t=y,p(),a.forEach(g),e):t},alpha:function(y){return arguments.length?(n=+y,e):n},alphaMin:function(y){return arguments.length?(r=+y,e):r},alphaDecay:function(y){return arguments.length?(i=+y,e):+i},alphaTarget:function(y){return arguments.length?(o=+y,e):o},velocityDecay:function(y){return arguments.length?(s=1-y,e):1-s},randomSource:function(y){return arguments.length?(h=y,a.forEach(g),e):h},force:function(y,m){return arguments.length>1?(m==null?a.delete(y):a.set(y,g(m)),e):a.get(y)},find:function(y,m,x){var v=0,b=t.length,w,_,$,P,C;for(x==null?x=1/0:x*=x,v=0;v<b;++v)P=t[v],w=y-P.x,_=m-P.y,$=w*w+_*_,$<x&&(C=P,x=$);return C},on:function(y,m){return arguments.length>1?(c.on(y,m),e):c.on(y)}}}function YT(){var t,e,n,r,i=cr(-30),o,s=1,a=1/0,l=.81;function c(p){var g,y=t.length,m=qc(t,jT,FT).visitAfter(u);for(r=p,g=0;g<y;++g)e=t[g],m.visit(f)}function h(){if(t){var p,g=t.length,y;for(o=new Array(g),p=0;p<g;++p)y=t[p],o[y.index]=+i(y,p,t)}}function u(p){var g=0,y,m,x=0,v,b,w;if(p.length){for(v=b=w=0;w<4;++w)(y=p[w])&&(m=Math.abs(y.value))&&(g+=y.value,x+=m,v+=m*y.x,b+=m*y.y);p.x=v/x,p.y=b/x}else{y=p,y.x=y.data.x,y.y=y.data.y;do g+=o[y.data.index];while(y=y.next)}p.value=g}function f(p,g,y,m){if(!p.value)return!0;var x=p.x-e.x,v=p.y-e.y,b=m-g,w=x*x+v*v;if(b*b/l<w)return w<a&&(x===0&&(x=Ln(n),w+=x*x),v===0&&(v=Ln(n),w+=v*v),w<s&&(w=Math.sqrt(s*w)),e.vx+=x*p.value*r/w,e.vy+=v*p.value*r/w),!0;if(p.length||w>=a)return;(p.data!==e||p.next)&&(x===0&&(x=Ln(n),w+=x*x),v===0&&(v=Ln(n),w+=v*v),w<s&&(w=Math.sqrt(s*w)));do p.data!==e&&(b=o[p.data.index]*r/w,e.vx+=x*b,e.vy+=v*b);while(p=p.next)}return c.initialize=function(p,g){t=p,n=g,h()},c.strength=function(p){return arguments.length?(i=typeof p=="function"?p:cr(+p),h(),c):i},c.distanceMin=function(p){return arguments.length?(s=p*p,c):Math.sqrt(s)},c.distanceMax=function(p){return arguments.length?(a=p*p,c):Math.sqrt(a)},c.theta=function(p){return arguments.length?(l=p*p,c):Math.sqrt(l)},c}function XT(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ts(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Hr(t){return t=Ts(Math.abs(t)),t?t[1]:NaN}function GT(t,e){return function(n,r){for(var i=n.length,o=[],s=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),o.push(n.substring(i-=a,i+a)),!((l+=a+1)>r));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function qT(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var UT=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function As(t){if(!(e=UT.exec(t)))throw new Error("invalid format: "+t);var e;return new Zc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}As.prototype=Zc.prototype;function Zc(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Zc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function ZT(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var fm;function KT(t,e){var n=Ts(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(fm=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Ts(t,Math.max(0,e+o-1))[0]}function pm(t,e){var n=Ts(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const gm={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:XT,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>pm(t*100,e),r:pm,s:KT,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function mm(t){return t}var ym=Array.prototype.map,vm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function QT(t){var e=t.grouping===void 0||t.thousands===void 0?mm:GT(ym.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?mm:qT(ym.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(u){u=As(u);var f=u.fill,p=u.align,g=u.sign,y=u.symbol,m=u.zero,x=u.width,v=u.comma,b=u.precision,w=u.trim,_=u.type;_==="n"?(v=!0,_="g"):gm[_]||(b===void 0&&(b=12),w=!0,_="g"),(m||f==="0"&&p==="=")&&(m=!0,f="0",p="=");var $=y==="$"?n:y==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",P=y==="$"?r:/[%p]/.test(_)?s:"",C=gm[_],T=/[defgprs%]/.test(_);b=b===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function E(S){var R=$,O=P,A,B,L;if(_==="c")O=C(S)+O,S="";else{S=+S;var D=S<0||1/S<0;if(S=isNaN(S)?l:C(Math.abs(S),b),w&&(S=ZT(S)),D&&+S==0&&g!=="+"&&(D=!1),R=(D?g==="("?g:a:g==="-"||g==="("?"":g)+R,O=(_==="s"?vm[8+fm/3]:"")+O+(D&&g==="("?")":""),T){for(A=-1,B=S.length;++A<B;)if(L=S.charCodeAt(A),48>L||L>57){O=(L===46?i+S.slice(A+1):S.slice(A))+O,S=S.slice(0,A);break}}}v&&!m&&(S=e(S,1/0));var k=R.length+S.length+O.length,N=k<x?new Array(x-k+1).join(f):"";switch(v&&m&&(S=e(N+S,N.length?x-O.length:1/0),N=""),p){case"<":S=R+S+O+N;break;case"=":S=R+N+S+O;break;case"^":S=N.slice(0,k=N.length>>1)+R+S+O+N.slice(k);break;default:S=N+R+S+O;break}return o(S)}return E.toString=function(){return u+""},E}function h(u,f){var p=c((u=As(u),u.type="f",u)),g=Math.max(-8,Math.min(8,Math.floor(Hr(f)/3)))*3,y=Math.pow(10,-g),m=vm[8+g/3];return function(x){return p(y*x)+m}}return{format:c,formatPrefix:h}}var ks,xm,bm;JT({thousands:",",grouping:[3],currency:["$",""]});function JT(t){return ks=QT(t),xm=ks.format,bm=ks.formatPrefix,ks}function tA(t){return Math.max(0,-Hr(Math.abs(t)))}function eA(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Hr(e)/3)))*3-Hr(Math.abs(t)))}function nA(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Hr(e)-Hr(t))+1}function rA(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function iA(){return this.eachAfter(rA)}function oA(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function sA(t,e){for(var n=this,r=[n],i,o,s=-1;n=r.pop();)if(t.call(e,n,++s,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function aA(t,e){for(var n=this,r=[n],i=[],o,s,a,l=-1;n=r.pop();)if(i.push(n),o=n.children)for(s=0,a=o.length;s<a;++s)r.push(o[s]);for(;n=i.pop();)t.call(e,n,++l,this);return this}function lA(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function cA(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function hA(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function dA(t){for(var e=this,n=uA(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function uA(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function fA(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function pA(){return Array.from(this)}function gA(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function mA(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*yA(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Kc(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=bA)):e===void 0&&(e=xA);for(var n=new Hi(t),r,i=[n],o,s,a,l;r=i.pop();)if((s=e(r.data))&&(l=(s=Array.from(s)).length))for(r.children=s,a=l-1;a>=0;--a)i.push(o=s[a]=new Hi(s[a])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(_A)}function vA(){return Kc(this).eachBefore(wA)}function xA(t){return t.children}function bA(t){return Array.isArray(t)?t[1]:null}function wA(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function _A(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Hi(t){this.data=t,this.depth=this.height=0,this.parent=null}Hi.prototype=Kc.prototype={constructor:Hi,count:iA,each:oA,eachAfter:aA,eachBefore:sA,find:lA,sum:cA,sort:hA,path:dA,ancestors:fA,descendants:pA,leaves:gA,links:mA,copy:vA,[Symbol.iterator]:yA};function $A(t,e){return t.parent===e.parent?1:2}function Qc(t){var e=t.children;return e?e[0]:t.t}function Jc(t){var e=t.children;return e?e[e.length-1]:t.t}function PA(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function CA(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function OA(t,e,n){return t.a.parent===e.parent?t.a:n}function Ls(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Ls.prototype=Object.create(Hi.prototype);function MA(t){for(var e=new Ls(t,0),n,r=[e],i,o,s,a;n=r.pop();)if(o=n._.children)for(n.children=new Array(a=o.length),s=a-1;s>=0;--s)r.push(i=n.children[s]=new Ls(o[s],s)),i.parent=n;return(e.parent=new Ls(null,0)).children=[e],e}function SA(){var t=$A,e=1,n=1,r=null;function i(c){var h=MA(c);if(h.eachAfter(o),h.parent.m=-h.z,h.eachBefore(s),r)c.eachBefore(l);else{var u=c,f=c,p=c;c.eachBefore(function(v){v.x<u.x&&(u=v),v.x>f.x&&(f=v),v.depth>p.depth&&(p=v)});var g=u===f?1:t(u,f)/2,y=g-u.x,m=e/(f.x+g+y),x=n/(p.depth||1);c.eachBefore(function(v){v.x=(v.x+y)*m,v.y=v.depth*x})}return c}function o(c){var h=c.children,u=c.parent.children,f=c.i?u[c.i-1]:null;if(h){CA(c);var p=(h[0].z+h[h.length-1].z)/2;f?(c.z=f.z+t(c._,f._),c.m=c.z-p):c.z=p}else f&&(c.z=f.z+t(c._,f._));c.parent.A=a(c,f,c.parent.A||u[0])}function s(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function a(c,h,u){if(h){for(var f=c,p=c,g=h,y=f.parent.children[0],m=f.m,x=p.m,v=g.m,b=y.m,w;g=Jc(g),f=Qc(f),g&&f;)y=Qc(y),p=Jc(p),p.a=c,w=g.z+v-f.z-m+t(g._,f._),w>0&&(PA(OA(g,c,u),c,w),m+=w,x+=w),v+=g.m,m+=f.m,b+=y.m,x+=p.m;g&&!Jc(p)&&(p.t=g,p.m+=v-x),f&&!Qc(y)&&(y.t=f,y.m+=m-b,u=c)}return u}function l(c){c.x*=e,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(t=c,i):t},i.size=function(c){return arguments.length?(r=!1,e=+c[0],n=+c[1],i):r?null:[e,n]},i.nodeSize=function(c){return arguments.length?(r=!0,e=+c[0],n=+c[1],i):r?[e,n]:null},i}function EA(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function IA(t){return function(){return t}}function TA(t){return+t}var wm=[0,1];function Rr(t){return t}function th(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:IA(isNaN(e)?NaN:.5)}function AA(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function kA(t,e,n){var r=t[0],i=t[1],o=e[0],s=e[1];return i<r?(r=th(i,r),o=n(s,o)):(r=th(r,i),o=n(o,s)),function(a){return o(r(a))}}function LA(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),s=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<r;)i[s]=th(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(a){var l=NM(t,a,1,r)-1;return o[l](i[l](a))}}function zA(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function HA(){var t=wm,e=wm,n=Rc,r,i,o,s=Rr,a,l,c;function h(){var f=Math.min(t.length,e.length);return s!==Rr&&(s=AA(t[0],t[f-1])),a=f>2?LA:kA,l=c=null,u}function u(f){return f==null||isNaN(f=+f)?o:(l||(l=a(t.map(r),e,n)))(r(s(f)))}return u.invert=function(f){return s(i((c||(c=a(e,t.map(r),Ye)))(f)))},u.domain=function(f){return arguments.length?(t=Array.from(f,TA),h()):t.slice()},u.range=function(f){return arguments.length?(e=Array.from(f),h()):e.slice()},u.rangeRound=function(f){return e=Array.from(f),n=UE,h()},u.clamp=function(f){return arguments.length?(s=f?!0:Rr,h()):s!==Rr},u.interpolate=function(f){return arguments.length?(n=f,h()):n},u.unknown=function(f){return arguments.length?(o=f,u):o},function(f,p){return r=f,i=p,h()}}function RA(){return HA()(Rr,Rr)}function DA(t,e,n,r){var i=VM(t,e,n),o;switch(r=As(r==null?",f":r),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=eA(i,s))&&(r.precision=o),bm(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=nA(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=tA(i))&&(r.precision=o-(r.type==="%")*2);break}}return xm(r)}function NA(t){var e=t.domain;return t.ticks=function(n){var r=e();return WM(r[0],r[r.length-1],n==null?10:n)},t.tickFormat=function(n,r){var i=e();return DA(i[0],i[i.length-1],n==null?10:n,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,s=r[i],a=r[o],l,c,h=10;for(a<s&&(c=s,s=a,a=c,c=i,i=o,o=c);h-- >0;){if(c=Oc(s,a,n),c===l)return r[i]=s,r[o]=a,e(r);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function Ri(){var t=RA();return t.copy=function(){return zA(t,Ri())},EA.apply(t,arguments),NA(t)}function ie(t){return function(){return t}}const _m=Math.abs,we=Math.atan2,hr=Math.cos,jA=Math.max,eh=Math.min,an=Math.sin,Dr=Math.sqrt,Ie=1e-12,Di=Math.PI,zs=Di/2,Hs=2*Di;function FA(t){return t>1?0:t<-1?Di:Math.acos(t)}function $m(t){return t>=1?zs:t<=-1?-zs:Math.asin(t)}function Pm(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new pT(e)}function BA(t){return t.innerRadius}function WA(t){return t.outerRadius}function VA(t){return t.startAngle}function YA(t){return t.endAngle}function XA(t){return t&&t.padAngle}function GA(t,e,n,r,i,o,s,a){var l=n-t,c=r-e,h=s-i,u=a-o,f=u*l-h*c;if(!(f*f<Ie))return f=(h*(e-o)-u*(t-i))/f,[t+f*l,e+f*c]}function Rs(t,e,n,r,i,o,s){var a=t-n,l=e-r,c=(s?o:-o)/Dr(a*a+l*l),h=c*l,u=-c*a,f=t+h,p=e+u,g=n+h,y=r+u,m=(f+g)/2,x=(p+y)/2,v=g-f,b=y-p,w=v*v+b*b,_=i-o,$=f*y-g*p,P=(b<0?-1:1)*Dr(jA(0,_*_*w-$*$)),C=($*b-v*P)/w,T=(-$*v-b*P)/w,E=($*b+v*P)/w,S=(-$*v+b*P)/w,R=C-m,O=T-x,A=E-m,B=S-x;return R*R+O*O>A*A+B*B&&(C=E,T=S),{cx:C,cy:T,x01:-h,y01:-u,x11:C*(i/_-1),y11:T*(i/_-1)}}function Ni(){var t=BA,e=WA,n=ie(0),r=null,i=VA,o=YA,s=XA,a=null,l=Pm(c);function c(){var h,u,f=+t.apply(this,arguments),p=+e.apply(this,arguments),g=i.apply(this,arguments)-zs,y=o.apply(this,arguments)-zs,m=_m(y-g),x=y>g;if(a||(a=h=l()),p<f&&(u=p,p=f,f=u),!(p>Ie))a.moveTo(0,0);else if(m>Hs-Ie)a.moveTo(p*hr(g),p*an(g)),a.arc(0,0,p,g,y,!x),f>Ie&&(a.moveTo(f*hr(y),f*an(y)),a.arc(0,0,f,y,g,x));else{var v=g,b=y,w=g,_=y,$=m,P=m,C=s.apply(this,arguments)/2,T=C>Ie&&(r?+r.apply(this,arguments):Dr(f*f+p*p)),E=eh(_m(p-f)/2,+n.apply(this,arguments)),S=E,R=E,O,A;if(T>Ie){var B=$m(T/f*an(C)),L=$m(T/p*an(C));($-=B*2)>Ie?(B*=x?1:-1,w+=B,_-=B):($=0,w=_=(g+y)/2),(P-=L*2)>Ie?(L*=x?1:-1,v+=L,b-=L):(P=0,v=b=(g+y)/2)}var D=p*hr(v),k=p*an(v),N=f*hr(_),j=f*an(_);if(E>Ie){var X=p*hr(b),z=p*an(b),M=f*hr(w),H=f*an(w),W;if(m<Di)if(W=GA(D,k,M,H,X,z,N,j)){var U=D-W[0],Y=k-W[1],G=X-W[0],Z=z-W[1],K=1/an(FA((U*G+Y*Z)/(Dr(U*U+Y*Y)*Dr(G*G+Z*Z)))/2),et=Dr(W[0]*W[0]+W[1]*W[1]);S=eh(E,(f-et)/(K-1)),R=eh(E,(p-et)/(K+1))}else S=R=0}P>Ie?R>Ie?(O=Rs(M,H,D,k,p,R,x),A=Rs(X,z,N,j,p,R,x),a.moveTo(O.cx+O.x01,O.cy+O.y01),R<E?a.arc(O.cx,O.cy,R,we(O.y01,O.x01),we(A.y01,A.x01),!x):(a.arc(O.cx,O.cy,R,we(O.y01,O.x01),we(O.y11,O.x11),!x),a.arc(0,0,p,we(O.cy+O.y11,O.cx+O.x11),we(A.cy+A.y11,A.cx+A.x11),!x),a.arc(A.cx,A.cy,R,we(A.y11,A.x11),we(A.y01,A.x01),!x))):(a.moveTo(D,k),a.arc(0,0,p,v,b,!x)):a.moveTo(D,k),!(f>Ie)||!($>Ie)?a.lineTo(N,j):S>Ie?(O=Rs(N,j,X,z,f,-S,x),A=Rs(D,k,M,H,f,-S,x),a.lineTo(O.cx+O.x01,O.cy+O.y01),S<E?a.arc(O.cx,O.cy,S,we(O.y01,O.x01),we(A.y01,A.x01),!x):(a.arc(O.cx,O.cy,S,we(O.y01,O.x01),we(O.y11,O.x11),!x),a.arc(0,0,f,we(O.cy+O.y11,O.cx+O.x11),we(A.cy+A.y11,A.cx+A.x11),x),a.arc(A.cx,A.cy,S,we(A.y11,A.x11),we(A.y01,A.x01),!x))):a.arc(0,0,f,_,w,x)}if(a.closePath(),h)return a=null,h+""||null}return c.centroid=function(){var h=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,u=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Di/2;return[hr(u)*h,an(u)*h]},c.innerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:ie(+h),c):t},c.outerRadius=function(h){return arguments.length?(e=typeof h=="function"?h:ie(+h),c):e},c.cornerRadius=function(h){return arguments.length?(n=typeof h=="function"?h:ie(+h),c):n},c.padRadius=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:ie(+h),c):r},c.startAngle=function(h){return arguments.length?(i=typeof h=="function"?h:ie(+h),c):i},c.endAngle=function(h){return arguments.length?(o=typeof h=="function"?h:ie(+h),c):o},c.padAngle=function(h){return arguments.length?(s=typeof h=="function"?h:ie(+h),c):s},c.context=function(h){return arguments.length?(a=h==null?null:h,c):a},c}function Cm(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Om(t){this._context=t}Om.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Mm(t){return new Om(t)}function qA(t){return t[0]}function UA(t){return t[1]}function ZA(t,e){var n=ie(!0),r=null,i=Mm,o=null,s=Pm(a);t=typeof t=="function"?t:t===void 0?qA:ie(t),e=typeof e=="function"?e:e===void 0?UA:ie(e);function a(l){var c,h=(l=Cm(l)).length,u,f=!1,p;for(r==null&&(o=i(p=s())),c=0;c<=h;++c)!(c<h&&n(u=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(u,c,l),+e(u,c,l));if(p)return o=null,p+""||null}return a.x=function(l){return arguments.length?(t=typeof l=="function"?l:ie(+l),a):t},a.y=function(l){return arguments.length?(e=typeof l=="function"?l:ie(+l),a):e},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ie(!!l),a):n},a.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),a):i},a.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),a):r},a}function KA(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function QA(t){return t}function JA(){var t=QA,e=KA,n=null,r=ie(0),i=ie(Hs),o=ie(0);function s(a){var l,c=(a=Cm(a)).length,h,u,f=0,p=new Array(c),g=new Array(c),y=+r.apply(this,arguments),m=Math.min(Hs,Math.max(-Hs,i.apply(this,arguments)-y)),x,v=Math.min(Math.abs(m)/c,o.apply(this,arguments)),b=v*(m<0?-1:1),w;for(l=0;l<c;++l)(w=g[p[l]=l]=+t(a[l],l,a))>0&&(f+=w);for(e!=null?p.sort(function(_,$){return e(g[_],g[$])}):n!=null&&p.sort(function(_,$){return n(a[_],a[$])}),l=0,u=f?(m-c*b)/f:0;l<c;++l,y=x)h=p[l],w=g[h],x=y+(w>0?w*u:0)+b,g[h]={data:a[h],index:l,value:w,startAngle:y,endAngle:x,padAngle:v};return g}return s.value=function(a){return arguments.length?(t=typeof a=="function"?a:ie(+a),s):t},s.sortValues=function(a){return arguments.length?(e=a,n=null,s):e},s.sort=function(a){return arguments.length?(n=a,e=null,s):n},s.startAngle=function(a){return arguments.length?(r=typeof a=="function"?a:ie(+a),s):r},s.endAngle=function(a){return arguments.length?(i=typeof a=="function"?a:ie(+a),s):i},s.padAngle=function(a){return arguments.length?(o=typeof a=="function"?a:ie(+a),s):o},s}function ji(t,e,n){this.k=t,this.x=e,this.y=n}ji.prototype={constructor:ji,scale:function(t){return t===1?this:new ji(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ji(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},ji.prototype;var tk=Object.defineProperty,ek=Object.defineProperties,nk=Object.getOwnPropertyDescriptors,Sm=Object.getOwnPropertySymbols,rk=Object.prototype.hasOwnProperty,ik=Object.prototype.propertyIsEnumerable,Em=(t,e,n)=>e in t?tk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ok=(t,e)=>{for(var n in e||(e={}))rk.call(e,n)&&Em(t,n,e[n]);if(Sm)for(var n of Sm(e))ik.call(e,n)&&Em(t,n,e[n]);return t},sk=(t,e)=>ek(t,nk(e));const Im=t=>{const[{datum:e,data:n,indexes:r,width:i=280,height:o=120,iconSize:s=32,gap:a=12,progressHeight:l=8,borderRadius:c=12,positionH:h="normal",themeColors:u,valueFormatter:f=B=>`${B}%`},p]=Wt(t,["width","height","iconSize","gap","progressHeight","borderRadius"]),g=e.value,y=g!=null?g:0,m=Math.max(...n.items.map(B=>{var L;return(L=B.value)!=null?L:0}),100),x=i-2*a,b=Ri().domain([0,m]).range([0,x])(y),w=`${u.colorPrimary}-progress`,_=`${u.colorPrimaryBg}-progress-bg`,$=Q(d(Pt,{indexes:r})),P=a,C=h==="flipped"?i-a-s:a,T=P,E=h==="flipped"?a:s+2*a,S=i-s-3*a,R=T,O=o-a-l,A=g!==void 0;return I(V,sk(ok({},p),{children:[I(Lt,{children:[I("linearGradient",{id:w,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:u.colorPrimary}),d("stop",{offset:"100%",stopColor:rt.mix(u.colorPrimary,"#fff",20).toHexString()})]}),I("linearGradient",{id:_,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:u.colorPrimaryBg}),d("stop",{offset:"100%",stopColor:u.colorBg})]})]}),d(Et,{x:0,y:0,width:i,height:o,fill:u.colorBgElevated,stroke:u.colorPrimaryBg,strokeWidth:1,rx:c,ry:c,"data-element-type":"shape"}),d(be,{indexes:r,x:C,y:T,size:s,fill:u.colorPrimary}),d(Pt,{indexes:r,x:E,y:R,width:S,alignHorizontal:h==="flipped"?"right":"left",alignVertical:"top",fontSize:16,fontWeight:"medium",fill:u.colorText,children:e.label}),A&&d(wi,{indexes:r,x:E,y:R+$.height,width:S,alignHorizontal:h==="flipped"?"right":"left",alignVertical:"top",lineHeight:1,fontSize:24,fontWeight:"bold",fill:u.colorPrimary,value:y,formatter:f}),d(Xt,{indexes:r,x:E,y:R+$.height+(A?27:4),width:S,alignHorizontal:h==="flipped"?"right":"left",alignVertical:"top",fontSize:11,fill:u.colorTextSecondary,lineNumber:A?2:3,wordWrap:!0,children:e.desc}),d(Et,{x:a,y:O,width:x,height:l,fill:`url(#${_})`,rx:l/2,ry:l/2,"data-element-type":"shape"}),d(Et,{x:a,y:O,width:b,height:l,fill:`url(#${w})`,rx:l/2,ry:l/2,"data-element-type":"shape"})]}))};Vt("progress-card",{component:Im,composites:["icon","label","value","desc"]});var ak=Object.defineProperty,lk=Object.defineProperties,ck=Object.getOwnPropertyDescriptors,Tm=Object.getOwnPropertySymbols,hk=Object.prototype.hasOwnProperty,dk=Object.prototype.propertyIsEnumerable,Am=(t,e,n)=>e in t?ak(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uk=(t,e)=>{for(var n in e||(e={}))hk.call(e,n)&&Am(t,n,e[n]);if(Tm)for(var n of Tm(e))dk.call(e,n)&&Am(t,n,e[n]);return t},fk=(t,e)=>lk(t,ck(e));const km=t=>{const[{datum:e,indexes:n,width:r=280,height:i=120,iconSize:o=30,circleRadius:s=80,positionH:a="normal",positionV:l="normal",themeColors:c},h]=Wt(t,["width","height","iconSize","circleRadius"]),u=4*s/(3*Math.PI),f=2,p=4,g=28,y=20,m=y+20,x=y,v=8,b=35,w=40,_=30,$=String(n[0]+1).padStart(2,"0"),P=a==="flipped",C=l==="flipped",T=()=>P?{diagonalStartX:r-p,diagonalStartY:C?i-b:b,diagonalEndX:r-w,diagonalEndY:C?i-p:p,topLineStartX:r-w,topLineEndX:u,topLineY:C?i-p:p}:{diagonalStartX:p,diagonalStartY:C?i-b:b,diagonalEndX:w,diagonalEndY:C?i-p:p,topLineStartX:w,topLineEndX:r-u,topLineY:C?i-p:p},E=()=>{if(P){const D=s+10,k=r-D-w;return{valueX:r-_,contentX:D,contentWidth:k,circleX:0,circleY:C?0:i,iconX:u-o/2}}else return{valueX:0,contentX:w,contentWidth:r-w-s-10,circleX:r,circleY:C?0:i,iconX:r-u-o/2}},S=T(),R=E(),O=C?u-o/2:i-u-o/2,A=Q(d(Pt,{indexes:n,width:R.contentWidth,children:e.label})),B=x+A.height+v,L=()=>{const{circleX:D,circleY:k}=R;return P?C?`M ${D} ${k} L ${D} ${k+s} A ${s} ${s} 0 0 0 ${D+s} ${k} Z`:`M ${D} ${k} L ${D} ${k-s} A ${s} ${s} 0 0 1 ${D+s} ${k} Z`:C?`M ${D} ${k} L ${D} ${k+s} A ${s} ${s} 0 0 1 ${D-s} ${k} Z`:`M ${D} ${k} L ${D} ${k-s} A ${s} ${s} 0 0 0 ${D-s} ${k} Z`};return I(V,fk(uk({},h),{width:r,height:i,children:[I(ne,{children:[d(ht,{d:`M ${S.diagonalStartX} ${S.diagonalStartY} L ${S.diagonalEndX} ${S.diagonalEndY}`,stroke:c.colorPrimary,strokeWidth:f,fill:"none"}),d(ht,{d:`M ${S.topLineStartX} ${S.topLineY} L ${S.topLineEndX} ${S.topLineY}`,stroke:c.colorPrimary,strokeWidth:f,fill:"none"}),d(zt,{x:S.diagonalStartX-p,y:S.diagonalStartY-p,width:p*2,height:p*2,fill:c.colorPrimary}),d(zt,{x:S.topLineEndX-p,y:S.topLineY-p,width:p*2,height:p*2,fill:c.colorPrimary})]}),I(V,{children:[d(Tt,{x:R.valueX,y:m,fontSize:g,fontWeight:"bold",fill:c.colorPrimary,children:$}),d(ht,{d:L(),fill:c.colorPrimary,"data-element-type":"shape"}),e.icon&&d(be,{indexes:n,x:R.iconX,y:O,size:o,fill:c.colorWhite}),e.label&&d(Pt,{indexes:n,x:R.contentX,y:x,width:R.contentWidth,fontWeight:"bold",fill:c.colorText,alignHorizontal:P?"right":"left",children:e.label}),e.desc&&d(Xt,{indexes:n,x:R.contentX,y:B,width:R.contentWidth,fill:c.colorTextSecondary,alignHorizontal:P?"right":"left",children:e.desc})]})]}))};Vt("quarter-circular",{component:km,composites:["icon","label","desc"]});var pk=Object.defineProperty,gk=Object.defineProperties,mk=Object.getOwnPropertyDescriptors,Lm=Object.getOwnPropertySymbols,yk=Object.prototype.hasOwnProperty,vk=Object.prototype.propertyIsEnumerable,zm=(t,e,n)=>e in t?pk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xk=(t,e)=>{for(var n in e||(e={}))yk.call(e,n)&&zm(t,n,e[n]);if(Lm)for(var n of Lm(e))vk.call(e,n)&&zm(t,n,e[n]);return t},bk=(t,e)=>gk(t,mk(e));const Hm=t=>{const[{datum:e,indexes:n,width:r=150,height:i=150,iconSize:o=30,padding:s=20,borderRadius:a=16,positionH:l="center",positionV:c="middle",themeColors:h},u]=Wt(t,["width","height","iconSize","padding","borderRadius"]),f=r-s*2,p=s,g=s,y=l==="flipped"?r-s-o:l==="center"?(r-o)/2:p,m=g,x=m+o+8,v=Q(d(Pt,{indexes:n,width:f,children:e.label})),b=l==="flipped"?r-s-f:l==="center"?s:p,w=x+v.height+4,_=b,$=a;let P="";return l==="center"&&c==="middle"?P=`
31
31
  M ${$} 0
32
32
  L ${r-$} 0
33
33
  Q ${r} 0 ${r} ${$}
@@ -79,32 +79,32 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
79
79
  L 0 ${$}
80
80
  Q 0 0 ${$} 0
81
81
  Z
82
- `,E(Y,ak(sk({},u),{children:[d(ht,{d:P,x:0,y:0,width:r,height:i,fill:h.colorPrimary,"data-element-type":"shape"}),d(be,{indexes:n,x:y,y:m,size:o,fill:h.colorBg}),d($t,{indexes:n,x,y:b,width:f,fontSize:14,fontWeight:"bold",fill:h.colorBg,alignHorizontal:l==="flipped"?"right":"left",children:e.label}),e.desc&&d(Xt,{indexes:n,x:_,y:w,width:f,fontSize:11,wordWrap:!0,fill:h.colorBg,alignHorizontal:l==="flipped"?"right":"left",children:e.desc})]}))};Vt("quarter-simple-card",{component:Am,composites:["icon","label","desc"]});var lk=Object.defineProperty,ck=Object.defineProperties,hk=Object.getOwnPropertyDescriptors,km=Object.getOwnPropertySymbols,dk=Object.prototype.hasOwnProperty,uk=Object.prototype.propertyIsEnumerable,zm=(t,e,n)=>e in t?lk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fk=(t,e)=>{for(var n in e||(e={}))dk.call(e,n)&&zm(t,n,e[n]);if(km)for(var n of km(e))uk.call(e,n)&&zm(t,n,e[n]);return t},pk=(t,e)=>ck(t,hk(e));const Lm=t=>{const[{datum:e,indexes:n,width:r=240,height:i=140,iconSize:o=28,gap:s=12,ribbonHeight:a=32,themeColors:l},c]=Wt(t,["width","height","iconSize","gap","ribbonHeight"]),h=`${l.colorPrimary}-ribbon`;return E(Y,pk(fk({},c),{children:[d(zt,{children:E("linearGradient",{id:h,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:l.colorPrimary}),d("stop",{offset:"100%",stopColor:ot(l.colorPrimary).darken(15).toHexString()})]})}),E(ne,{children:[d(St,{x:0,y:0,width:r,height:i,fill:l.colorBgElevated,stroke:l.colorPrimaryBg,strokeWidth:1,rx:8,ry:8}),d(St,{x:0,y:0,width:r,height:a,fill:`url(#${h})`,rx:8,ry:8}),d(St,{x:0,y:8,width:r,height:a-8,fill:`url(#${h})`}),d(ht,{x:r-20,y:a,width:20,height:8,fill:ot(l.colorPrimary).darken(25).toHexString(),d:"M0,0 L20,0 L15,8 L5,8 Z"})]}),d(be,{indexes:n,x:s,y:a+s,size:o,fill:l.colorPrimary}),d($t,{indexes:n,x:o+2*s,y:a+s,width:r-o-3*s,height:o,alignHorizontal:"left",alignVertical:"middle",lineHeight:1,fontWeight:"bold",fill:l.colorText,children:e.label}),d(Xt,{indexes:n,x:s,y:a+o+s+5,width:r-2*s,alignHorizontal:"left",fill:l.colorTextSecondary,lineNumber:3,wordWrap:!0,children:e.desc}),d(be,{indexes:n,x:r-s-8,y:s/2,size:16,fill:l.colorWhite})]}))};Vt("ribbon-card",{component:Lm,composites:["icon","label","desc"]});var gk=Object.defineProperty,mk=Object.defineProperties,yk=Object.getOwnPropertyDescriptors,Rm=Object.getOwnPropertySymbols,vk=Object.prototype.hasOwnProperty,bk=Object.prototype.propertyIsEnumerable,Hm=(t,e,n)=>e in t?gk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xk=(t,e)=>{for(var n in e||(e={}))vk.call(e,n)&&Hm(t,n,e[n]);if(Rm)for(var n of Rm(e))bk.call(e,n)&&Hm(t,n,e[n]);return t},wk=(t,e)=>mk(t,yk(e));const Dm=t=>{const[{indexes:e,datum:n,themeColors:r,width:i=300,height:o=40,padding:s=4,positionH:a="normal"},l]=Wt(t,["width","height","borderRadius","padding"]),c=o/2,h=c,u=s,f=i-c*2,p=o-s*2;return E(Y,wk(xk({},l),{children:[d(St,{"data-element-type":"shape",width:i,height:o,rx:c,ry:c,fill:r.colorPrimaryBg,stroke:r.colorPrimary,strokeWidth:1,opacity:.8}),d($t,{indexes:e,x:h,y:u,width:f,height:p,alignHorizontal:a==="flipped"?"right":a==="center"?"center":"left",alignVertical:"middle",fontSize:14,fontWeight:"500",fill:r.colorText,children:n.label})]}))};Vt("rounded-rect-node",{component:Dm,composites:["label"]});var _k=Object.defineProperty,$k=Object.defineProperties,Pk=Object.getOwnPropertyDescriptors,Nm=Object.getOwnPropertySymbols,Ok=Object.prototype.hasOwnProperty,Ck=Object.prototype.propertyIsEnumerable,jm=(t,e,n)=>e in t?_k(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mk=(t,e)=>{for(var n in e||(e={}))Ok.call(e,n)&&jm(t,n,e[n]);if(Nm)for(var n of Nm(e))Ck.call(e,n)&&jm(t,n,e[n]);return t},Sk=(t,e)=>$k(t,Pk(e));const Fm=t=>{const[{indexes:e,datum:n,width:r=140,themeColors:i,positionV:o="normal"},s]=Wt(t,["width"]),a=o!=="flipped",l=a?"bottom":"top",c=d($t,{indexes:e,width:r,fill:i.colorText,alignHorizontal:"center",alignVertical:l,fontSize:14,children:n.label}),h=d(Xt,{indexes:e,width:r,fill:i.colorTextSecondary,alignHorizontal:"center",alignVertical:l,children:n.desc}),u=30,f=10,p=Q(c),g=Q(h),y=p.height+g.height,m=y+f+u+f+y;return d(Y,Sk(Mk({width:r,height:m},s),{children:E(lt,{flexDirection:"column",alignItems:"center",children:[a?E(Rt,{children:[h,c,d(Kt,{height:f})]}):d(Rt,{children:d(Kt,{height:y+f})}),E(wi,{horizontal:"center",vertical:"middle",children:[d(Ek,{width:r,height:u,fill:i.colorPrimary}),d(Et,{width:r,height:u,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:n.time?n.time:String(e[0]+1).padStart(2,"0").slice(-2)})]}),a?d(Rt,{children:d(Kt,{height:y+f})}):E(Rt,{children:[d(Kt,{height:f}),c,h]})]})}))},Ek=t=>{const{x:e=0,y:n=0,width:r=100,height:i=40,fill:o="#FF356A",size:s=10}=t;return d(Ne,{width:r,height:i,points:[{x:e,y:n},{x:e+r-s,y:n},{x:e+r,y:n+i/2},{x:e+r-s,y:n+i},{x:e,y:n+i},{x:e+s,y:n+i/2}],fill:o,"data-element-type":"shape"})};Vt("simple-horizontal-arrow",{component:Fm,composites:["label","desc","time"]});var Ik=Object.defineProperty,Tk=Object.defineProperties,Ak=Object.getOwnPropertyDescriptors,Bm=Object.getOwnPropertySymbols,kk=Object.prototype.hasOwnProperty,zk=Object.prototype.propertyIsEnumerable,Wm=(t,e,n)=>e in t?Ik(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Lk=(t,e)=>{for(var n in e||(e={}))kk.call(e,n)&&Wm(t,n,e[n]);if(Bm)for(var n of Bm(e))zk.call(e,n)&&Wm(t,n,e[n]);return t},Rk=(t,e)=>Tk(t,Ak(e));const Vm=t=>{const[{indexes:e,datum:n,width:r=180,illusSize:i=r,gap:o=8,themeColors:s,usePaletteColor:a=!1},l]=Wt(t,["width","illusSize","gap","usePaletteColor"]),{label:c,desc:h}=n,u=a?s.colorPrimary:s.colorText,f=d($t,{indexes:e,width:r,alignHorizontal:"center",alignVertical:"middle",fill:u,children:c}),p=Q(f);return E(lt,Rk(Lk({},l),{width:r,height:i+o+p.height+o+48,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o,children:[d(Ip,{indexes:e,width:i,height:i}),f,d(Xt,{indexes:e,width:r,alignHorizontal:"center",alignVertical:"top",fill:s.colorTextSecondary,lineNumber:3,children:h})]}))};Vt("simple-illus",{component:Vm,composites:["illus","label","desc"]});var Hk=Object.defineProperty,Dk=Object.defineProperties,Nk=Object.getOwnPropertyDescriptors,Ym=Object.getOwnPropertySymbols,jk=Object.prototype.hasOwnProperty,Fk=Object.prototype.propertyIsEnumerable,Xm=(t,e,n)=>e in t?Hk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,th=(t,e)=>{for(var n in e||(e={}))jk.call(e,n)&&Xm(t,n,e[n]);if(Ym)for(var n of Ym(e))Fk.call(e,n)&&Xm(t,n,e[n]);return t},eh=(t,e)=>Dk(t,Nk(e));const Gm=t=>{const[{indexes:e,datum:n,width:r=200,height:i,gap:o=4,showIcon:s=!0,iconSize:a=30,iconType:l="default",positionH:c="normal",positionV:h="normal",usePaletteColor:u=!1,themeColors:f},p]=Wt(t,["width","height","gap","showIcon","iconSize","iconType","usePaletteColor"]),{label:g,desc:y,icon:m}=n,v=(k=>k==="normal"?"left":k==="flipped"?"right":"center")(c),x=u?f.colorPrimary:f.colorText,w=14,_=1.4,P=Q(d($t,{indexes:e,width:r,alignHorizontal:"center",alignVertical:"middle",fill:x,children:g})),O=s?l==="circle"?d(nr,{indexes:e,size:a,fill:f.colorPrimary,colorBg:f.colorBg}):d(be,{indexes:e,size:a,fill:f.colorTextSecondary}):null;if(!s||!m){const k=i?Math.max(0,i-P.height-o):void 0,D=k?k<=60?1:Math.floor(k/(_*w)):2,z=i?h==="middle"?(i-P.height-(k||0)-o)/2:h==="flipped"?i-P.height-(k||0)-o:0:0;return E(Y,eh(th({},p),{children:[d($t,{indexes:e,width:r,y:z,alignHorizontal:v,alignVertical:"middle",fill:x,children:g}),d(Xt,{indexes:e,width:r,height:k,y:z+P.height+o,alignHorizontal:v,alignVertical:A(),lineNumber:D,fill:f.colorTextSecondary,children:y})]}))}if(c==="center"){const k=s&&m?a:0,D=i?Math.max(0,i-P.height-k-o*2):void 0,z=D?D<=60?1:Math.floor(D/(_*w)):2,N=P.height+(D||0)+o,j=i?h==="middle"?(i-N-k-o)/2:h==="flipped"?i-N-k-o:0:0;return d(lt,eh(th({},p),{flexDirection:"column",gap:o,alignItems:"center",children:h==="flipped"?E(Rt,{children:[E(Y,{children:[d($t,{indexes:e,width:r,y:j,alignHorizontal:"center",alignVertical:"middle",fill:x,children:g}),d(Xt,{indexes:e,width:r,height:D,y:j+P.height+o,alignHorizontal:"center",alignVertical:"bottom",lineNumber:z,fill:f.colorTextSecondary,children:y})]}),O]}):E(Rt,{children:[O,E(Y,{children:[d($t,{indexes:e,width:r,y:j,alignHorizontal:"center",alignVertical:"middle",fill:x,children:g}),d(Xt,{indexes:e,width:r,height:D,y:j+P.height+o,alignHorizontal:"center",alignVertical:"top",lineNumber:z,fill:f.colorTextSecondary,children:y})]})]})}))}const T=Q(O),I=Math.max(r-T.width-o,0),S=i?Math.max(0,i-P.height-o):void 0,H=S?S<=60?1:Math.floor(S/(_*w)):2,C=i?h==="middle"?(i-P.height-(S||0)-o)/2:h==="flipped"?i-P.height-(S||0)-o:0:0;return d(lt,eh(th({},p),{flexDirection:"row",gap:o,alignItems:B(h),children:c==="flipped"?E(Rt,{children:[E(Y,{children:[d($t,{indexes:e,width:I,y:C,alignHorizontal:"right",alignVertical:"middle",fill:x,children:g}),d(Xt,{indexes:e,width:I,height:S,y:C+P.height+o,alignHorizontal:"right",alignVertical:A(),lineNumber:H,fill:f.colorTextSecondary,children:y})]}),O]}):E(Rt,{children:[O,E(Y,{children:[d($t,{indexes:e,width:I,y:C,alignHorizontal:"left",alignVertical:"middle",fill:x,children:g}),d(Xt,{indexes:e,width:I,height:S,y:C+P.height+o,alignHorizontal:"left",alignVertical:A(),lineNumber:H,fill:f.colorTextSecondary,children:y})]})]})}));function A(k,D){return"top"}function B(k){return k==="normal"?"flex-start":k==="flipped"?"flex-end":"center"}};Vt("simple",{component:Gm,composites:["icon","label","desc"]});var Bk=Object.defineProperty,Wk=Object.defineProperties,Vk=Object.getOwnPropertyDescriptors,qm=Object.getOwnPropertySymbols,Yk=Object.prototype.hasOwnProperty,Xk=Object.prototype.propertyIsEnumerable,Um=(t,e,n)=>e in t?Bk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gk=(t,e)=>{for(var n in e||(e={}))Yk.call(e,n)&&Um(t,n,e[n]);if(qm)for(var n of qm(e))Xk.call(e,n)&&Um(t,n,e[n]);return t},qk=(t,e)=>Wk(t,Vk(e));const Zm=t=>{const[{indexes:e,datum:n,height:r=140,themeColors:i,positionH:o="normal"},s]=Wt(t,["height"]),a=o==="normal"?"right":"left",l=d($t,{indexes:e,width:120,fill:i.colorText,alignHorizontal:a,alignVertical:"middle",fontSize:14,children:n.label}),c=d(Xt,{indexes:e,width:120,fill:i.colorTextSecondary,alignHorizontal:a,alignVertical:"top",children:n.desc}),h=o!=="flipped",u=15,f=30,p=120,g=p+u+f+u+p;return d(Y,qk(Gk({width:g,height:r},s),{children:E(lt,{flexDirection:"row",alignItems:"center",children:[h?E(Rt,{children:[E(lt,{flexDirection:"column",alignItems:"flex-end",children:[l,c]}),d(Kt,{width:u})]}):d(Rt,{children:d(Kt,{width:p+u})}),E(wi,{horizontal:"center",vertical:"middle",children:[d(Uk,{width:f,height:r,fill:i.colorPrimary}),d(Et,{width:f,height:r,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:String(e[0]+1).padStart(2,"0").slice(-2)})]}),h?d(Rt,{children:d(Kt,{width:p+u})}):E(Rt,{children:[d(Kt,{width:u}),E(lt,{flexDirection:"column",alignItems:"flex-start",children:[l,c]})]})]})}))},Uk=t=>{const{x:e=0,y:n=0,width:r=30,height:i=100,fill:o="#FF356A",size:s=10}=t;return d(Ne,{width:r,height:i,points:[{x:e,y:n},{x:e+r/2,y:n+s},{x:e+r,y:n},{x:e+r,y:n+i-s},{x:e+r/2,y:n+i},{x:e,y:n+i-s}],fill:o,"data-element-type":"shape"})};Vt("simple-vertical-arrow",{component:Zm,composites:["label","desc"]});var Zk=Object.defineProperty,Kk=Object.defineProperties,Qk=Object.getOwnPropertyDescriptors,Km=Object.getOwnPropertySymbols,Jk=Object.prototype.hasOwnProperty,tz=Object.prototype.propertyIsEnumerable,Qm=(t,e,n)=>e in t?Zk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ez=(t,e)=>{for(var n in e||(e={}))Jk.call(e,n)&&Qm(t,n,e[n]);if(Km)for(var n of Km(e))tz.call(e,n)&&Qm(t,n,e[n]);return t},nz=(t,e)=>Kk(t,Qk(e));const nh=80,rh=3,Jm=t=>{const[{datum:e,indexes:n,width:r=200,gap:i=4,positionH:o="center",themeColors:s},a]=Wt(t,["width","height","gap"]),l=Q(d($t,{indexes:n,fontSize:18,fontWeight:"bold",width:r,children:e.label})),c=e.desc?Q(d(Xt,{indexes:n,width:r,wordWrap:!0,children:e.desc})):{height:0},h=l.height+i+rh+(e.desc?i*2+c.height:0),u=0,f=0,p=o==="center"?"center":o==="flipped"?"right":"left",g=o==="center"?(r-nh)/2:o==="flipped"?r-nh:0,y=f+l.height+i,m=0,b=y+rh+i*2;return E(Y,nz(ez({width:r,height:h},a),{children:[e.label&&d($t,{indexes:n,x:u,y:f,width:r,alignHorizontal:p,fill:s.colorPrimary,fontSize:18,fontWeight:"bold",children:e.label}),e.label&&d(St,{x:g,y,width:nh,height:rh,fill:s.colorPrimary,"data-element-type":"shape"}),e.desc&&d(Xt,{indexes:n,width:r,x:m,y:b,alignHorizontal:p,wordWrap:!0,fill:s.colorText,children:e.desc})]}))};Vt("underline-text",{component:Jm,composites:["label","desc"]});var rz=Object.defineProperty,iz=Object.defineProperties,oz=Object.getOwnPropertyDescriptors,t2=Object.getOwnPropertySymbols,sz=Object.prototype.hasOwnProperty,az=Object.prototype.propertyIsEnumerable,e2=(t,e,n)=>e in t?rz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lz=(t,e)=>{for(var n in e||(e={}))sz.call(e,n)&&e2(t,n,e[n]);if(t2)for(var n of t2(e))az.call(e,n)&&e2(t,n,e[n]);return t},cz=(t,e)=>iz(t,oz(e));const n2=t=>{const[{indexes:e,datum:n,height:r=140,themeColors:i,positionH:o="normal"},s]=Wt(t,["height"]),l=o!=="flipped"?"right":"left",c=d($t,{indexes:e,width:120,fill:i.colorText,alignHorizontal:l,alignVertical:"middle",fontSize:14,children:n.label}),h=d(Xt,{indexes:e,width:120,fill:i.colorTextSecondary,alignHorizontal:l,alignVertical:"top",children:n.desc}),u=d(nr,{indexes:e,fill:i.colorPrimary,colorBg:i.colorWhite}),f=d(dz,{width:30,height:8,fill:i.colorPrimary,positionH:o}),p=o!=="flipped",g=5,y=25,m=30,b=Q(c),v=Q(u),x=Q(f),w=b.width+g+x.width-v.width-y,_=Math.max(b.width+g+x.width,y+v.width)*2+m;return d(Y,cz(lz({width:_,height:r},s),{children:E(lt,{flexDirection:"row",alignItems:"center",children:[p?E(Rt,{children:[E(lt,{flexDirection:"column",alignItems:"flex-end",children:[c,h]}),d(Kt,{width:g}),f]}):E(Rt,{children:[d(Kt,{width:w}),u,d(Kt,{width:y})]}),E(wi,{horizontal:"center",vertical:"middle",children:[d(hz,{width:m,height:r,fill:i.colorPrimary}),d(Et,{width:m,height:r,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:String(e[0]+1).padStart(2,"0").slice(-2)})]}),p?E(Rt,{children:[d(Kt,{width:y}),u]}):E(Rt,{children:[f,d(Kt,{width:g}),E(lt,{flexDirection:"column",alignItems:"flex-start",children:[c,h]})]})]})}))},hz=t=>{const{x:e=0,y:n=0,width:r=30,height:i=100,fill:o="#FF356A",size:s=10}=t;return d(Ne,{width:r,height:i,points:[{x:e,y:n},{x:e+r/2,y:n+s},{x:e+r,y:n},{x:e+r,y:n+i-s},{x:e+r/2,y:n+i},{x:e,y:n+i-s}],fill:o,"data-element-type":"shape"})},dz=t=>{const{x:e=0,y:n=0,width:r=50,height:i=10,fill:o,positionH:s="normal"}=t,a=i/2,l=r-a,c=2,h=a;return E(Y,{x:e,y:n,width:r,height:i,children:[d(Lt,{width:i,height:i,fill:o,x:s==="normal"?0:l-a,"data-element-type":"shape"}),d(ht,{d:s==="normal"?`M${a},${h} L${a+l},${h}`:`M0,${h} L${l-a},${h}`,strokeWidth:c,stroke:o,"data-element-type":"shape"})]})};Vt("vertical-icon-arrow",{component:n2,composites:["icon","label","desc"]});const ih=new Map;function Tt(t,e){ih.set(t,e)}function r2(t){return ih.get(t)}function uz(){return Array.from(ih.keys())}const i2=t=>{var e,n,r;const{Title:i,Item:o,data:s,width:a,gap:l,barGap:c,barHeight:h=28,barAreaWidth:u,labelGap:f=16,padding:p=24,showValue:g=!0,options:y,valueFormatter:m=Ut=>Ut.toString()}=t,b=(e=u!=null?u:a)!=null?e:480,{title:v,desc:x,items:w=[],xTitle:_,yTitle:$}=s,P=i?d(i,{title:v,desc:x}):null;if(w.length===0)return d(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:P});const[O,T,I,S]=tr(p),H=(n=w[0])!=null?n:{label:"",value:0},C=Q(d(o,{indexes:[0],datum:H,data:s})),A=C.width||140,B=C.height||h,k=Math.max(h,B),D=Math.max(12,k*.35),z=(r=c!=null?c:l)!=null?r:D,N=w.map(Ut=>{var ae;return(ae=Ut.value)!=null?ae:0}),j=Math.max(...N,0),X=Math.min(...N,0),L=X<0?X*1.1:0;let M=j>0?j*1.1:0;M===L&&(M=L+1);const R=Ri().domain([L,M]).range([0,b]),W=Math.min(Math.max(R(0),0),b),U=Math.max(2,b*.02),V=w.length*(k+z)-z,G=$?24:0,Z=20,K=_?24:0,nt=O+G,at=S+A+f,pt=g?80:0,ft=Math.max(8,k*.2),rt=at+b+pt+T,tt=nt+V+ft+Z+K+I,et=xe(y.themeConfig),st=et.colorText||"#666",vt=re(y),gt=[],dt=[],ct=[],ut=[],mt=[],Pt=[],yt=[],Mt=nt+V+ft,te=Ut=>Number.isInteger(Ut)?Ut.toString():Ut.toFixed(1);w.forEach((Ut,ae)=>{var un;const je=[ae],Nt=(un=Ut.value)!=null?un:0,yr=nt+ae*(k+z),bt=yr+(k-h)/2,ee=Nt>=0?at+W:at+R(Nt),At=Nt>=0?R(Nt)-W:W-R(Nt),Bt=At===0?U:At,pe=Ct(y,[ae])||et.colorPrimary;if(gt.push(d(St,{x:ee,y:bt,width:Bt,height:h,fill:pe,rx:6,ry:6,"data-element-type":"shape"})),g){const le=Nt>=0?ee+Bt+8:ee-8;dt.push(d(Et,{x:le,y:bt+h/2,alignHorizontal:Nt>=0?"left":"right",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:pe,children:m(Nt,Ut)}))}ct.push(d(o,{indexes:je,datum:Ut,data:s,x:S,y:yr+(k-B)/2,width:A,height:B,positionV:"middle"}))});const he=Math.max(3,Math.min(7,Math.floor(b/80)));return R.ticks(he).forEach(Ut=>{const ae=at+R(Ut);Pt.push(d(ht,{d:`M${ae} ${nt} L${ae} ${nt+V}`,stroke:st,strokeOpacity:.08,"data-element-type":"shape"})),mt.push(d(ht,{d:`M${ae-.5} ${Mt} L${ae-.5} ${Mt+6}`,stroke:st,"data-element-type":"shape"})),mt.push(d(Et,{x:ae,y:Mt+14,alignHorizontal:"center",alignVertical:"middle",fontSize:12,fill:st,children:te(Ut)}))}),ut.push(d(ht,{d:`M${at} ${Mt} L${at+b} ${Mt}`,stroke:st,"data-element-type":"shape"})),L<0&&ut.push(d(St,{x:at+W-.5,y:nt,width:1,height:V,fill:vt,"data-element-type":"shape"})),$&&yt.push(d(Et,{x:S+A/2,y:O+G/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:st,children:$})),_&&yt.push(d(Et,{x:at+b/2,y:Mt+Z+K/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:st,children:_})),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[P,E(Y,{width:rt,height:tt,children:[d(Y,{children:Pt}),d(Y,{children:gt}),d(Y,{children:dt}),d(Y,{children:yt}),d(Y,{children:[...ut,...mt]}),d(It,{children:ct})]})]})};Tt("chart-bar",{component:i2,composites:["title","item","xTitle","yTitle"]});const o2=t=>{const{Title:e,Item:n,data:r,columnGap:i=60,columnWidth:o=50,padding:s=20,showValue:a=!0,options:l,valueFormatter:c=N=>N.toString()}=t,{title:h,desc:u,items:f=[]}=r,p=e?d(e,{title:h,desc:u}):null;if(f.length===0)return d(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:p});const g=xe(l.themeConfig),m=[...f.map(N=>{var j;return(j=N.value)!=null?j:0}),0].sort((N,j)=>N-j),b=m[0]<0,v=f.length*o+(f.length-1)*i,x=300,[w,_,$,P]=tr(s),O=a?24:0,T=10,I=b&&a?O+T:T,S=v+P+_,H=x+w+$+I,C=Ri().domain([m[0],m[m.length-1]]).range([x,0]),A=C(0),B=[],k=[],D=[],z=[];return f.forEach((N,j)=>{var X;const L=[j],M=(X=N.value)!=null?X:0,R=P+j*(o+i),W=M>=0?C(M):A,U=Math.abs(C(M)-A),V=Ct(l,[j])||g.colorPrimary,G=`${V}-column-positive-${j}`,Z=`${V}-column-negative-${j}`;z.push(E("linearGradient",{id:M>=0?G:Z,x1:"0%",y1:M>=0?"0%":"100%",x2:"0%",y2:M>=0?"100%":"0%",children:[d("stop",{offset:"0%",stopColor:V}),d("stop",{offset:"100%",stopColor:ot.mix(V,"#fff",40).toHexString()})]})),B.push(d(St,{x:R,y:w+W,width:o,height:U,fill:`url(#${M>=0?G:Z})`,rx:8,ry:8,"data-element-type":"shape"})),a&&k.push(d(Et,{x:R+o/2,y:M>=0?w+W-10:w+W+U+20,fontSize:16,fontWeight:"bold",alignHorizontal:"center",alignVertical:M>=0?"bottom":"top",fill:V,children:c(M,N)}));const K=o+i,nt=w+x+I;D.push(d(n,{indexes:L,datum:N,data:r,x:R+o/2-K/2,y:nt,width:K,positionH:"center"}))}),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,E(Y,{width:S,height:H,children:[d(zt,{children:z}),d(Y,{children:B}),d(Y,{children:k}),d(It,{children:D})]})]})};Tt("chart-column",{component:o2,composites:["title","item"]});var fz=Object.defineProperty,pz=Object.defineProperties,gz=Object.getOwnPropertyDescriptors,s2=Object.getOwnPropertySymbols,mz=Object.prototype.hasOwnProperty,yz=Object.prototype.propertyIsEnumerable,a2=(t,e,n)=>e in t?fz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,l2=(t,e)=>{for(var n in e||(e={}))mz.call(e,n)&&a2(t,n,e[n]);if(s2)for(var n of s2(e))yz.call(e,n)&&a2(t,n,e[n]);return t},vz=(t,e)=>pz(t,gz(e));const c2=t=>{const{Title:e,Item:n,data:r,width:i,height:o=260,gap:s=10,padding:a=24,showValue:l=!0,options:c,valueFormatter:h=bt=>bt.toString()}=t,{title:u,desc:f,items:p=[],xTitle:g,yTitle:y}=r,m=e?d(e,{title:u,desc:f}):null;if(p.length===0)return d(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:m});const[b,v,x,w]=tr(a),_={indexes:[0],datum:p[0],data:r,positionH:"center",positionV:"normal"},$=Q(d(n,l2({},_))),P=$.width,O=$.height,T=Math.max(28,O+14),I=44,S=y?26:0,H=g?22:0,C=P+s,A=p.length>0?(p.length-1)*C+P:0,B=i!==void 0?i:Math.max(200,A||320),k=p.length>1?Math.max(C,(B-P)/(p.length-1)):0,D=p.length>0?Math.max(P,(p.length-1)*k+P):0,z=w+I+S,N=b+S,j=z+D+v,X=N+o+T+H+x,L=p.map(bt=>{var ee;return(ee=bt.value)!=null?ee:0}),M=Math.max(...L,0),R=Math.min(...L,0),W=Math.max(Math.abs(M),Math.abs(R))*.1,U=R<0?R-W:0;let V=M>0?M+W:1;V===U&&(V=U+1);const G=Ri().domain([U,V]).nice().range([o,0]),Z=Math.max(0,Math.min(o,G(0))),K=V<=0?0:U>=0?o:Z,nt=re(c),at=xe(c.themeConfig),pt=at.colorText||"#666",ft=[],rt=[],tt=[],et=[],st=[],vt=[],gt=[];G.ticks(6).forEach(bt=>{const ee=N+G(bt);ft.push(d(ht,{d:`M ${z} ${ee} L ${z+D} ${ee}`,width:D,height:1,stroke:pt,strokeWidth:1,"data-element-type":"shape",opacity:.08})),gt.push(d(Et,{x:z-8,y:ee,alignHorizontal:"right",alignVertical:"middle",fontSize:12,fill:pt,children:Number.isInteger(bt)?bt.toString():bt.toFixed(1)}))});const ct=[],ut=[],mt=[],Pt=bt=>{if(bt.length===0)return"";if(bt.length===1){const At=bt[0];return`M ${At.x} ${At.y}`}const ee=[];ee.push(`M ${bt[0].x} ${bt[0].y}`);for(let At=0;At<bt.length-1;At++){const Bt=bt[At-1]||bt[At],pe=bt[At],le=bt[At+1],Te=bt[At+2]||le,He=pe.x+(le.x-Bt.x)/6,Nn=pe.y+(le.y-Bt.y)/6,ga=le.x-(Te.x-pe.x)/6,Lh=le.y-(Te.y-pe.y)/6;ee.push(`C ${He} ${Nn} ${ga} ${Lh} ${le.x} ${le.y}`)}return ee.join(" ")};p.forEach((bt,ee)=>{var At;const Bt=z+ee*k+P/2,pe=N+G((At=bt.value)!=null?At:0);ut.push({x:Bt,y:pe,datum:bt}),ct.push(d(n,vz(l2({},_),{indexes:[ee],datum:bt,x:Bt-P/2,y:N+o+4})));const le=Ct(c,[ee])||at.colorPrimary;mt.push({x:Bt,color:le})});const yt=mt.length>0?Math.min(...mt.map(bt=>bt.x)):z,Mt=mt.length>0?Math.max(...mt.map(bt=>bt.x)):z+D,te=Math.max(1,Mt-yt),he=mt.map(bt=>d("stop",{offset:`${(bt.x-yt)/te*100}%`,stopColor:bt.color})),ye=mt.map(bt=>d("stop",{offset:`${(bt.x-yt)/te*100}%`,stopColor:bt.color,stopOpacity:"0.18"}));if(mt.length>0){const bt=mt[mt.length-1].color;he.push(d("stop",{offset:"100%",stopColor:bt})),ye.push(d("stop",{offset:"100%",stopColor:bt,stopOpacity:"0.04"}))}const Ut=`chart-line-${Ju([D,o,pt,nt,mt.map(bt=>`${bt.x.toFixed(2)}-${bt.color}`).join()].join(":"))}`,ae=`${Ut}-stroke`,un=`${Ut}-area`,je=Pt(ut);tt.push(d(ht,{d:je,width:D,height:o,stroke:`url(#${ae})`,strokeWidth:3,fill:"none","data-element-type":"shape"}));const Nt=je.includes("C")?je.slice(je.indexOf("C")):"",yr=[`M ${ut[0].x} ${N+K}`,`L ${ut[0].x} ${ut[0].y}`,Nt,`L ${ut[ut.length-1].x} ${N+K}`,"Z"].join(" ");return tt.push(d(ht,{d:yr,width:D,height:o,fill:`url(#${un})`,stroke:"none","data-element-type":"shape"})),ut.forEach((bt,ee)=>{var At;const Bt=Ct(c,[ee])||at.colorPrimary;et.push(d(Lt,{x:bt.x-6,y:bt.y-6,width:12,height:12,fill:Bt,"data-element-type":"shape"})),l&&st.push(d(Et,{x:bt.x,y:bt.y-12,alignHorizontal:"center",alignVertical:"bottom",fontSize:12,fontWeight:"bold",fill:Bt,children:h((At=bt.datum.value)!=null?At:0,bt.datum)}))}),rt.push(d(ht,{d:`M ${z} ${N+K} L ${z+D} ${N+K}`,width:D,height:1,stroke:pt,strokeWidth:1,"data-element-type":"shape"})),rt.push(d(ht,{d:`M ${z} ${N} L ${z} ${N+o}`,width:1,height:o,stroke:pt,strokeWidth:1,"data-element-type":"shape"})),g&&vt.push(d(Et,{x:z+D/2,y:N+o+T+H/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:pt,children:g})),y&&vt.push(d(Et,{x:w+S/2,y:N+o/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:pt,children:y})),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[m,E(Y,{width:j,height:X,children:[E(zt,{children:[d("linearGradient",{id:ae,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:he}),E("linearGradient",{id:un,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[ye,d("stop",{offset:"100%",stopColor:nt,stopOpacity:"0.04"})]})]}),d(Y,{children:ft}),d(Y,{children:[...rt,...gt]}),d(Y,{children:tt}),d(Y,{children:et}),d(Y,{children:st}),d(Y,{children:vt}),d(It,{children:ct})]})]})};Tt("chart-line",{component:c2,composites:["title","item","xTitle","yTitle"]});const h2=t=>{var e;const{Title:n,Item:r,data:i,radius:o=140,innerRadius:s=0,padding:a=30,showPercentage:l=!0,options:c}=t,{title:h,desc:u,items:f=[]}=i,p=n?d(n,{title:h,desc:u}):null,g=Q(d(q,{indexes:[0]})),y=(e=f[0])!=null?e:{label:"",value:0},m=Q(d(r,{indexes:[0],datum:y,data:i,positionH:"center",positionV:"middle"})),b=m.width||140,v=m.height||32,x=Math.max(o,60),w=1.35,_=8,$=x*w+_+b,P=x,O=a+$,T=a+P,I=O*2,S=T*2;if(f.length===0)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,d(Y,{width:I,height:S,children:d(Ot,{children:d(q,{indexes:[0],x:O-g.width/2,y:T-g.height/2})})})]});const H=f.reduce((G,Z)=>{var K;return G+Math.max((K=Z.value)!=null?K:0,0)},0),C=re(c),A=xe(c.themeConfig),k=jA().value(G=>{var Z;return Math.max((Z=G.value)!=null?Z:0,0)}).sort(null).startAngle(0).endAngle(Math.PI*2)(f),D=Di().innerRadius(s).outerRadius(x).cornerRadius(2),z=Di().innerRadius(x).outerRadius(x),N=Di().innerRadius(x*1.15).outerRadius(x*1.15),j=s+(x-s)*.5,X=Di().innerRadius(j).outerRadius(j),L=Di().innerRadius(x*.85).outerRadius(x*.85),M=[],R=[],W=[],U=[],V=[];return k.forEach(G=>{const Z=G.data,K=G.index,nt=Ct(c,[K])||A.colorPrimary||C,at=D(G)||"";M.push(d(ht,{d:at,fill:nt,stroke:A.colorBg,strokeWidth:1,"data-element-type":"shape",width:x*2,height:x*2}));const ft=G.startAngle+(G.endAngle-G.startAngle)/2<Math.PI,rt=z.centroid(G),tt=N.centroid(G),st=[x*w*(ft?1:-1),tt[1]];W.push(d(ht,{d:`M${O+rt[0]} ${T+rt[1]} L${O+tt[0]} ${T+tt[1]} L${O+st[0]} ${T+st[1]}`,stroke:C,strokeOpacity:.45,strokeWidth:2,fill:"none","data-element-type":"shape"}));const vt=O+st[0]+(ft?_:-_-b),gt=T+st[1]-v/2;if(U.push(d(r,{indexes:[K],datum:Z,data:i,x:vt,y:gt,width:b,height:v,positionH:ft?"normal":"flipped",positionV:"middle",themeColors:xe({colorPrimary:nt},c)})),l&&H>0){const ct=X.centroid(G),ut=Math.max(G.value,0),mt=(ut*100/H).toFixed(1),Pt=50,yt=20;R.push(d(Et,{x:O+ct[0]-Pt/2,y:T+ct[1]-yt/2,width:Pt,height:yt,alignHorizontal:"center",alignVertical:"middle",fontSize:12,fontWeight:"bold",fill:"#ffffff","data-value":ut,"data-indexes":[K],"data-element-type":kt.ItemValue,children:`${mt}%`}))}const dt=L.centroid(G);V.push(d(Ft,{indexes:[K],x:O+dt[0]-g.width/2,y:T+dt[1]-g.height/2}))}),k.forEach((G,Z)=>{const K=(Z+1)%k.length,nt=G.endAngle,at=k[K].startAngle+(K===0?Math.PI*2:0),pt=(nt+at)/2,ft=x*1,rt=Math.sin(pt)*ft,tt=-Math.cos(pt)*ft;V.push(d(q,{indexes:[Z+1],x:O+rt-g.width/2,y:T+tt-g.height/2}))}),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[p,E(Y,{width:I,height:S,children:[d(Y,{x:O,y:T,children:M}),d(Y,{children:W}),d(Y,{children:R}),d(It,{children:U}),d(Ot,{children:V})]})]})};Tt("chart-pie",{component:h2,composites:["title","item"]});var bz=Object.defineProperty,xz=Object.defineProperties,wz=Object.getOwnPropertyDescriptors,d2=Object.getOwnPropertySymbols,_z=Object.prototype.hasOwnProperty,$z=Object.prototype.propertyIsEnumerable,u2=(t,e,n)=>e in t?bz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,f2=(t,e)=>{for(var n in e||(e={}))_z.call(e,n)&&u2(t,n,e[n]);if(d2)for(var n of d2(e))$z.call(e,n)&&u2(t,n,e[n]);return t},p2=(t,e)=>xz(t,wz(e));const Pz=[0,30,-30,60,-60],Oz=Math.PI*(3-Math.sqrt(5));function g2(t,e,n){const r=Math.PI/180*n,i=Math.cos(r),o=Math.sin(r);return{width:Math.abs(t*i)+Math.abs(e*o),height:Math.abs(t*o)+Math.abs(e*i)}}function Cz(t,e,n,r,i,o){const s=t-o,a=t+n+o,l=e-o,c=e+r+o;return i.some(h=>{const u=h.box.x-o,f=h.box.x+h.box.width+o,p=h.box.y-o,g=h.box.y+h.box.height+o;return!(a<=u||s>=f||c<=p||l>=g)})}function Mz(t,e,n,r,i){const o=[],s=e?Pz:[0],a=Math.max(1600,t.length*28);return t.forEach((l,c)=>{const h=Math.max(l.width,l.height),u=c*Oz;let f=0,p=null;for(let g=0;g<a&&!p;g++){g===Math.floor(a*.6)&&(f=h);const y=u+g*r,m=i*Math.sqrt(g+1)+f+h*.25,b=m*Math.cos(y),v=m*Math.sin(y);for(const x of s){const w=g2(l.width,l.height,x),_=b-w.width/2,$=v-w.height/2;if(!Cz(_,$,w.width,w.height,o,n)){p=p2(f2({},l),{angle:x,centerX:b,centerY:v,box:{x:_,y:$,width:w.width,height:w.height}});break}}}if(!p){const g=s[c%s.length],y=i*Math.sqrt(a+1)+h,m=u,b=y*Math.cos(m),v=y*Math.sin(m),x=g2(l.width,l.height,g);p=p2(f2({},l),{angle:g,centerX:b,centerY:v,box:{x:b-x.width/2,y:v-x.height/2,width:x.width,height:x.height}})}o.push(p)}),o}const m2=t=>{const{data:e,options:n,minFontSize:r=16,maxFontSize:i=48,enableRotate:o=!0,padding:s=6,spiralStep:a=.45,radiusStep:l=10}=t,{items:c=[]}=e,h=c.map((C,A)=>({datum:C,index:A})).filter(({datum:C})=>C.label);if(h.length===0)return d(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:d(Y,{children:d(It,{})})});const u=h.map(({datum:C})=>C.value).filter(C=>typeof C=="number"),f=u.length>0,p=f?Math.min(...u):0,g=f?Math.max(...u):0,y=f&&p===g,m=(r+i)/2,b=C=>{if(!f||y)return m;if(C==null)return r;const A=(C-p)/(g-p||1);return r+A*(i-r)},v=h.map(({datum:C,index:A})=>{const B=b(C.value),k=Q(d(Et,{fontSize:B,fontWeight:"bold",children:C.label})),D=Ct(n,[A])||re(n);return{label:C.label,value:C.value,color:D,fontSize:B,width:k.width*1.05,height:k.height}}).sort((C,A)=>A.fontSize-C.fontSize),x=Mz(v,o,s,a,l),w=Math.min(...x.map(C=>C.box.x)),_=Math.min(...x.map(C=>C.box.y)),$=Math.max(...x.map(C=>C.box.x+C.box.width)),P=Math.max(...x.map(C=>C.box.y+C.box.height)),O=-w+s,T=-_+s,I=$-w+s*2,S=P-_+s*2,H=x.map((C,A)=>{const B=C.centerX-C.width/2+O,k=C.centerY-C.height/2+T,D=C.width/2,z=C.height/2,N=`translate(${B}, ${k}) rotate(${C.angle}, ${D}, ${z})`;return d(Y,{transform:N,children:d(Et,{width:C.width,height:C.height,fontSize:C.fontSize,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:C.color,"data-indexes":A,"data-element-type":kt.ItemLabel,children:C.label})})});return d(It,{id:"infographic-container",width:I,height:S,children:H})};Tt("chart-wordcloud",{component:m2,composites:["item"]});const y2=new Map,oh=(t,e)=>{y2.set(t,e)},Sz=t=>{var e;return t&&(e=y2.get(t))!=null?e:null};var Ez=Object.defineProperty,Iz=Object.defineProperties,Tz=Object.getOwnPropertyDescriptors,v2=Object.getOwnPropertySymbols,Az=Object.prototype.hasOwnProperty,kz=Object.prototype.propertyIsEnumerable,b2=(t,e,n)=>e in t?Ez(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,x2=(t,e)=>{for(var n in e||(e={}))Az.call(e,n)&&b2(t,n,e[n]);if(v2)for(var n of v2(e))kz.call(e,n)&&b2(t,n,e[n]);return t},w2=(t,e)=>Iz(t,Tz(e));oh("pros-cons-arrow",t=>{const{x:e,y:n,colorPositive:r,colorNegative:i,colorBg:o}=t,s=200,a=141,l={width:90,height:40,fontSize:22,alignHorizontal:"center",alignVertical:"middle",fontWeight:"bold",fill:o};return E(Y,{x:e,y:n,width:s,height:a,children:[E(ne,{children:[d("path",{d:"M137 54C137 54.2903 137 54.5806 136.706 54.7742L108.614 86.0323H64.7619C64.4071 86.0204 64.0557 86.1043 63.7453 86.2747C63.4349 86.4452 63.1773 86.6959 63 87C63.0037 86.7447 63.1092 86.5012 63.2936 86.3226L91.3862 55.0645H135.238C135.593 55.0763 135.944 54.9925 136.255 54.822C136.565 54.6516 136.823 54.4009 137 54.0968V54Z",fill:"#D9D9D9"}),d("path",{d:"M39.3272 0.484649C39.6146 0.234929 39.9662 0.0736935 40.3407 0.0198929C40.7152 -0.0339076 41.0971 0.0219605 41.4414 0.180925C41.7857 0.33989 42.0783 0.595358 42.2846 0.917314C42.491 1.23927 42.6026 1.61434 42.6063 1.99848V14.8156H136.013C136.54 14.8156 137.045 15.0282 137.418 15.4068C137.791 15.7853 138 16.2987 138 16.834V53.166C138 53.7013 137.791 54.2147 137.418 54.5932C137.045 54.9718 136.54 55.1844 136.013 55.1844H42.6063V68.0015C42.6026 68.3857 42.491 68.7607 42.2846 69.0827C42.0783 69.4046 41.7857 69.6601 41.4414 69.8191C41.0971 69.9781 40.7152 70.0339 40.3407 69.9801C39.9662 69.9263 39.6146 69.7651 39.3272 69.5154L0.672847 36.5138C0.461378 36.3244 0.292014 36.0915 0.176005 35.8305C0.0599968 35.5695 0 35.2864 0 35C0 34.7136 0.0599968 34.4306 0.176005 34.1696C0.292014 33.9085 0.461378 33.6756 0.672847 33.4862L39.4265 0.484649H39.3272Z",fill:r}),d("path",{d:"M157.394 73.0007C157.397 72.6162 157.509 72.2407 157.715 71.9183C157.922 71.596 158.214 71.3403 158.559 71.1811C158.903 71.022 159.285 70.9661 159.659 71.0199C160.034 71.0738 160.385 71.2352 160.673 71.4852L199.327 104.524C199.539 104.714 199.708 104.947 199.824 105.208C199.94 105.47 200 105.753 200 106.04C200 106.326 199.94 106.61 199.824 106.871C199.708 107.132 199.539 107.366 199.327 107.555L160.573 140.594C160.285 140.815 159.943 140.951 159.584 140.989C159.225 141.027 158.862 140.965 158.535 140.809C158.208 140.653 157.929 140.41 157.728 140.105C157.527 139.8 157.411 139.445 157.394 139.078V126.247H63.9874C63.4603 126.247 62.9548 126.034 62.5821 125.655C62.2094 125.276 62 124.762 62 124.226V87.8531C62 87.3172 62.2094 86.8032 62.5821 86.4242C62.9548 86.0453 63.4603 85.8324 63.9874 85.8324H157.394V73.0007Z",fill:i})]}),d(Et,w2(x2({x:40,y:15},l),{children:"Pros"})),d(Et,w2(x2({x:70,y:85},l),{children:"Cons"}))]})});var zz=Object.defineProperty,Lz=Object.defineProperties,Rz=Object.getOwnPropertyDescriptors,_2=Object.getOwnPropertySymbols,Hz=Object.prototype.hasOwnProperty,Dz=Object.prototype.propertyIsEnumerable,$2=(t,e,n)=>e in t?zz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,P2=(t,e)=>{for(var n in e||(e={}))Hz.call(e,n)&&$2(t,n,e[n]);if(_2)for(var n of _2(e))Dz.call(e,n)&&$2(t,n,e[n]);return t},O2=(t,e)=>Lz(t,Rz(e));oh("pros-cons-fold",t=>{const{x:e,y:n,colorPositive:r,colorNegative:i,colorBg:o}=t,s=240,a=300,l={width:85,height:30,fontSize:20,alignHorizontal:"center",alignVertical:"middle",fontWeight:"bold",fill:o};return E(Y,{x:e,y:n,width:s,height:a,children:[E(ne,{children:[d("path",{d:"M136.914 38.7755C137.303 38.7733 137.683 38.6617 138.011 38.4534C138.339 38.2451 138.602 37.9485 138.77 37.5977C138.937 37.247 139.002 36.8561 138.957 36.4701C138.913 36.084 138.76 35.7183 138.517 35.415L110.741 0.982313C110.548 0.735138 110.301 0.535238 110.018 0.397762C109.736 0.260286 109.426 0.188841 109.112 0.188841C108.798 0.188841 108.488 0.260286 108.206 0.397762C107.924 0.535238 107.676 0.735138 107.483 0.982313L79.7069 35.415C79.4639 35.7183 79.3113 36.084 79.2667 36.4701C79.222 36.8561 79.2871 37.247 79.4545 37.5977C79.6219 37.9485 79.8847 38.2451 80.213 38.4534C80.5412 38.6617 80.9216 38.7733 81.3104 38.7755H92.8965C93.0517 57.1293 97.5517 64.9878 105.259 73.7252C107.017 75.7932 108.983 77.8612 111.103 80.1361C113.276 82.4626 122.121 88.9252 131.069 95.181C129.362 88.7701 128.172 81.2218 127.293 73.7252C125.224 55.9918 125.017 38.7755 125.017 38.7755H136.914Z",fill:r,fillOpacity:.4}),d("path",{d:"M237.931 109.967C238.48 109.967 239.006 109.749 239.394 109.362C239.782 108.974 240 108.448 240 107.899V75.7932C240 75.2447 239.782 74.7187 239.394 74.3309C239.006 73.9431 238.48 73.7252 237.931 73.7252H127.241C128.172 81.2218 129.362 88.7701 131.069 95.181C138.182 100.171 145.337 105.1 152.534 109.967H237.931Z",fill:r}),d("path",{d:"M152.586 109.967C152.586 109.967 141.724 102.678 131.069 95.181C124.122 90.5838 117.455 85.5772 111.103 80.1878C109.034 77.8612 107.017 75.7415 105.259 73.7252H48.6207V56.6639C48.6091 56.2797 48.4905 55.9063 48.2784 55.5857C48.0662 55.2651 47.7689 55.0099 47.4197 54.8488C47.0705 54.6878 46.6833 54.6271 46.3016 54.6738C45.9199 54.7204 45.5587 54.8725 45.2586 55.1129L1.50002 90.2694C1.26208 90.4633 1.07029 90.7078 0.938585 90.985C0.80688 91.2622 0.738558 91.5652 0.738558 91.8721C0.738558 92.179 0.80688 92.482 0.938585 92.7592C1.07029 93.0365 1.26208 93.2809 1.50002 93.4748L45.2586 128.631C45.5621 128.874 45.928 129.027 46.3142 129.071C46.7005 129.116 47.0914 129.051 47.4424 128.884C47.7933 128.716 48.09 128.454 48.2984 128.125C48.5068 127.797 48.6185 127.417 48.6207 127.029V109.967H152.586Z",fill:"#BFBFBF"}),d("path",{d:"M36.1034 88.9252H28.9655V93.785H36.1034V101.85H41.4828V93.785H48.6207V88.8735H41.4828V81.1701H36.1034V88.9252Z",fill:"#404040"}),d("path",{d:"M103.086 261.224C102.697 261.227 102.317 261.338 101.989 261.547C101.661 261.755 101.398 262.051 101.23 262.402C101.063 262.753 100.998 263.144 101.043 263.53C101.087 263.916 101.24 264.282 101.483 264.585L129.259 299.018C129.452 299.265 129.699 299.465 129.982 299.602C130.264 299.74 130.574 299.811 130.888 299.811C131.202 299.811 131.512 299.74 131.794 299.602C132.076 299.465 132.324 299.265 132.517 299.018L160.293 264.585C160.536 264.282 160.689 263.916 160.733 263.53C160.778 263.144 160.713 262.753 160.546 262.402C160.378 262.051 160.115 261.755 159.787 261.547C159.459 261.338 159.078 261.227 158.69 261.224H147.103C146.948 242.871 142.448 235.012 134.741 226.275C132.983 224.207 131.017 222.139 128.897 219.864C126.724 217.537 117.879 211.075 108.931 204.819C110.677 211.877 111.938 219.045 112.707 226.275C114.776 244.008 114.983 261.224 114.983 261.224H103.086Z",fill:i,fillOpacity:.4}),d("path",{d:"M2.06897 190.033C1.52025 190.033 0.993996 190.251 0.605989 190.638C0.217983 191.026 5.00679e-06 191.552 5.00679e-06 192.101V224.207C5.00679e-06 224.755 0.217983 225.281 0.605989 225.669C0.993996 226.057 1.52025 226.275 2.06897 226.275H112.759C111.828 218.778 110.638 211.23 108.931 204.819C99.9827 198.512 90.931 192.411 88.2414 190.55C87.7206 190.204 87.1077 190.024 86.4828 190.033H2.06897Z",fill:i}),d("path",{d:"M87.4138 190.033C87.4138 190.033 98.2759 197.322 108.931 204.819C115.878 209.416 122.545 214.423 128.897 219.812C130.966 222.139 132.983 224.258 134.741 226.275H191.379V243.336C191.391 243.72 191.51 244.094 191.722 244.414C191.934 244.735 192.231 244.99 192.58 245.151C192.929 245.312 193.317 245.373 193.698 245.326C194.08 245.28 194.441 245.128 194.741 244.887L238.5 209.731C238.738 209.537 238.93 209.292 239.061 209.015C239.193 208.738 239.261 208.435 239.261 208.128C239.261 207.821 239.193 207.518 239.061 207.241C238.93 206.964 238.738 206.719 238.5 206.525L194.741 171.369C194.438 171.126 194.072 170.973 193.686 170.929C193.3 170.884 192.909 170.949 192.558 171.116C192.207 171.284 191.91 171.546 191.702 171.875C191.493 172.203 191.382 172.583 191.379 172.971V190.033H87.4138Z",fill:"#BFBFBF"}),d("path",{d:"M192.414 205.905V210.816H212.069V205.905H192.414Z",fill:"#404040"})]}),d(Et,O2(P2({x:153,y:77},l),{children:"PROS"})),d(Et,O2(P2({x:2,y:193},l),{children:"CONS"}))]})}),oh("vs",t=>{const{x:e,y:n,colorPrimary:r,colorBg:i}=t,o=100,s=100,a=ot(r).lighten(20).toString();return E(Y,{x:e,y:n,width:o,height:s,children:[E(zt,{children:[d("filter",{id:"vs-divider-glow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",children:d("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"8",result:"blur"})}),d(vc,{})]}),d(Lt,{x:0,y:0,width:o,height:s,fill:a,filter:"url(#vs-divider-glow-filter)",opacity:.6}),d(Lt,{x:0,y:0,width:o,height:s,fill:r,"data-element-type":"shape"}),d("text",{x:o/2,y:s/2,fontSize:Math.min(o,s)/1.5,fontWeight:"bold",fill:i,textAnchor:"middle",dominantBaseline:"central",filter:"url(#drop-shadow)",children:"VS"})]})});const C2=t=>{const{Title:e,Item:n,data:r,gap:i=20,groupGap:o=20,opposite:s=!0,flipped:a=!0,dividerType:l="vs",options:c}=t,{title:h,desc:u,items:f=[]}=r,p=e?d(e,{title:h,desc:u}):null;if(f.length===0)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:0,y:0})})})]});const g=f[0]||{children:[]},y=f[1]||{children:[]},m=g.children||[],b=y.children||[],v=xe(c.themeConfig),x=Q(d(n,{indexes:[0,0],data:r,datum:m[0]||{}})),w=Q(d(q,{indexes:[0]})),_=Sz(l),$=_?Q(d(_,{x:0,y:0,colorPrimary:v.colorPrimary,colorBg:v.colorBg,colorPositive:v.colorPrimary,colorNegative:v.colorPrimary})):{width:0,height:0},P=[],O=[],T=[],I=Math.max(m.length,b.length),S=I>0?I*(x.height+i)-i:0,H=5,C=I>0?i/2+w.height/2:w.height/2,A=w.width+H,B=A+x.width+o,k=B+$.width+o,D=a?"flipped":"normal",z=a?"normal":s?"flipped":"normal";if(m.forEach((N,j)=>{const X=C+j*(x.height+i),L=[0,j];P.push(d(n,{indexes:L,datum:N,data:r,x:A,y:X,positionH:D,positionV:"middle"})),O.push(d(Ft,{indexes:L,x:A-w.width-H,y:X+(x.height-w.height)/2})),j<m.length-1&&O.push(d(q,{indexes:[0,j+1],x:A+(x.width-w.width)/2,y:X+x.height+i/2-w.height/2}))}),m.length>0){O.push(d(q,{indexes:[0,0],x:A+(x.width-w.width)/2,y:C-i/2-w.height/2}));const N=C+(m.length-1)*(x.height+i);O.push(d(q,{indexes:[0,m.length],x:A+(x.width-w.width)/2,y:N+x.height+i/2-w.height/2}))}else f.length>=1&&O.push(d(q,{indexes:[0,0],x:A+(x.width-w.width)/2,y:C-w.height/2}));if(b.forEach((N,j)=>{const X=C+j*(x.height+i),L=[1,j];P.push(d(n,{indexes:L,datum:N,data:r,x:k,y:X,positionH:z,positionV:"middle"})),O.push(d(Ft,{indexes:L,x:k+x.width+H,y:X+(x.height-w.height)/2})),j<b.length-1&&O.push(d(q,{indexes:[1,j+1],x:k+(x.width-w.width)/2,y:X+x.height+i/2-w.height/2}))}),b.length>0){O.push(d(q,{indexes:[1,0],x:k+(x.width-w.width)/2,y:C-i/2-w.height/2}));const N=C+(b.length-1)*(x.height+i);O.push(d(q,{indexes:[1,b.length],x:k+(x.width-w.width)/2,y:N+x.height+i/2-w.height/2}))}else f.length>=2&&O.push(d(q,{indexes:[1,0],x:k+(x.width-w.width)/2,y:C-w.height/2}));return f.length<2&&O.push(d(q,{indexes:[1],x:k+(x.width-w.width)/2,y:C+(S-w.height)/2})),_&&T.push(d(_,{x:B,y:C+(S-$.height)/2,colorPrimary:v.colorPrimary,colorBg:v.colorBg,colorPositive:Ct(c,[0])||v.colorPrimary,colorNegative:Ct(c,[1])||v.colorPrimary})),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,E(Y,{children:[d(Y,{children:T}),d(It,{children:P}),d(Ot,{children:O})]})]})};Tt("compare-binary-horizontal",{component:C2,composites:["title","item"]});var Nz=Object.defineProperty,M2=Object.getOwnPropertySymbols,jz=Object.prototype.hasOwnProperty,Fz=Object.prototype.propertyIsEnumerable,S2=(t,e,n)=>e in t?Nz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,E2=(t,e)=>{for(var n in e||(e={}))jz.call(e,n)&&S2(t,n,e[n]);if(M2)for(var n of M2(e))Fz.call(e,n)&&S2(t,n,e[n]);return t};const Bz={none:5,"dot-line":100,"arc-dot":20,"split-line":5},I2=t=>{var e,n;const{Title:r,Items:i,data:o,gap:s=20,groupGap:a=0,decoration:l="none",surround:c=!0,flipRoot:h=!1,flipLeaf:u=!1,options:f}=t,[p,g]=i,{title:y,desc:m,items:b=[]}=o,v=r?d(r,{title:y,desc:m}):null,x=d(p,{indexes:[0],data:o,datum:o.items[0],themeColors:{}}),w=d(g,{indexes:[0,0],data:o,datum:((n=(e=b[0])==null?void 0:e.children)==null?void 0:n[0])||b[2]}),_=Q(x),$=Q(w),P=[],O=[],[T,I]=b,S=(T==null?void 0:T.children)||[],H=(I==null?void 0:I.children)||[],C=Math.max(_.height,S.length*($.height+s)-s,H.length*($.height+s)-s),A=Bz[l]||0,B=$.width+A,k=B+_.width+a,D=(C-_.height)/2;T&&P.push(d(p,{indexes:[0],x:B,y:D,data:o,datum:T,positionH:h?"normal":"flipped"})),I&&P.push(d(p,{indexes:[1],x:k,y:D,data:o,datum:I,positionH:h?"flipped":"normal"}));const z=(N,j,X)=>{if(l==="none")return;const[L,M]=j,R=Ct(f,X),W={x:L,y:M,width:$.width,height:$.height,side:N,color:R||"#ccc",colorBg:f.themeConfig.colorBg||"#fff"};l==="split-line"?O.push(d(Wz,E2({},W))):l==="dot-line"&&O.push(d(Vz,E2({},W)))};if(c){const j=(2*_.width+a+$.width)/2+A,X=B+_.width+a/2,L=D+_.height/2;S.forEach((M,R)=>{const W=S.length*($.height+s)-s,V=(C-W)/2+R*($.height+s),Z=V+$.height/2-L,K=Math.max(0,j*j-Z*Z),at=X-Math.sqrt(K)-$.width/2;P.push(d(g,{indexes:[0,R],datum:M,data:o,x:at,y:V,positionH:u?"flipped":"normal"})),z("left",[at,V],[0,R])}),H.forEach((M,R)=>{const W=H.length*($.height+s)-s,V=(C-W)/2+R*($.height+s),Z=V+$.height/2-L,K=Math.max(0,j*j-Z*Z),at=X+Math.sqrt(K)-$.width/2;P.push(d(g,{indexes:[1,R],datum:M,data:o,x:at,y:V,positionH:u?"normal":"flipped"})),z("right",[at,V],[1,R])})}else S.forEach((N,j)=>{const X=S.length*($.height+s)-s,M=(C-X)/2+j*($.height+s),R=[0,j],W=0;P.push(d(g,{indexes:R,datum:N,data:o,x:W,y:M,positionH:u?"flipped":"normal"})),z("left",[W,M],R)}),H.forEach((N,j)=>{const X=H.length*($.height+s)-s,M=(C-X)/2+j*($.height+s),R=[1,j],W=k+_.width+A;P.push(d(g,{indexes:R,datum:N,data:o,x:W,y:M,positionH:u?"normal":"flipped"})),z("right",[W,M],R)});return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[v,E(Y,{children:[d(It,{children:P}),d(Y,{width:0,height:0,children:O})]})]})},Wz=t=>{const{x:e,y:n,width:r,height:i,color:o,colorBg:s,side:a}=t,l=n+i,c=`split-line-linear-gradient-${a}`;return E(Rt,{children:[d(zt,{children:d(bc,{id:c,startColor:o,stopColor:s,direction:a==="left"?"left-right":"right-left"})}),d(St,{x:e,y:l,width:r,height:1,fill:`url(#${c})`})]})},Vz=t=>{const{x:e,y:n,side:r,width:i,height:o,color:s,colorBg:a}=t,l=6,c=l/3,h=l*2,u=c*2,f=5,p=r==="left"?e+i+l+f:e-l-f,g=n+o/2,y=p-c,m=g-c,b=80,v=r==="left"?b:-b,x=`dot-line-linear-gradient-${r}`;return E(Y,{children:[d(zt,{children:d(bc,{id:x,startColor:s,stopColor:a,direction:r==="left"?"left-right":"right-left"})}),E(ne,{children:[d(Lt,{x:p-l,y:g-l,width:h,height:h,fill:"none",strokeWidth:1,stroke:s}),d(Lt,{x:y,y:m,width:u,height:u,fill:s})]}),d(St,{x:r==="left"?p:p+v,y:g-.5,width:b,height:1,fill:`url(#${x})`})]})};Tt("compare-hierarchy-left-right",{component:I2,composites:["title","item"]});const T2=t=>{var e,n;const{Title:r,Items:i,data:o,gap:s=0,itemGap:a=20,columnWidth:l=280,itemPadding:c=5,showColumnBackground:h=!0,columnBackgroundAlpha:u=.08,options:f}=t,[p,g]=i,{title:y,desc:m,items:b=[]}=o,v=r?d(r,{title:y,desc:m}):null,x=fg(f),w=[],_=[],$=l-c*2,P=Q(d(p,{indexes:[0],data:o,datum:b[0],width:l})),O=Q(d(g,{indexes:[0,0],data:o,datum:((n=(e=b[0])==null?void 0:e.children)==null?void 0:n[0])||{},width:$})),T=Q(d(q,{indexes:[0]})),I=Math.max(...b.map(H=>{var C;return((C=H.children)==null?void 0:C.length)||0}),0),S=P.height+a+I*(O.height+a);if(b.forEach((H,C)=>{const{children:A=[]}=H,B=C*(l+s),k=B,D=0;if(h){const X=`${x[C%x.length]}${Math.round(u*255).toString(16).padStart(2,"0")}`;w.push(d(St,{x:B,y:D,width:l,height:S,fill:X,rx:0,ry:0,"data-element-type":"shape"}))}w.push(d(p,{indexes:[C],datum:H,data:o,x:k,y:D,width:l})),_.push(d(Ft,{indexes:[C],x:k+P.width-T.width-10,y:D+10})),C===0&&_.push(d(q,{indexes:[C],x:k+P.width/2-T.width/2,y:D-T.height-5}));const z=D+P.height+a;A.forEach((j,X)=>{const L=z+X*(O.height+a),M=k+c,R=[C,X];w.push(d(g,{indexes:R,datum:j,data:o,x:M,y:L,width:$})),_.push(d(Ft,{indexes:R,x:M+O.width-T.width-10,y:L+(O.height-T.height)/2})),X<A.length-1&&_.push(d(q,{indexes:[C,X+1],x:M+O.width/2-T.width/2,y:L+O.height-T.height/2}))});const N=k+c;if(A.length>0){const j=z+A.length*(O.height+a);_.push(d(q,{indexes:[C,A.length],x:N+O.width/2-T.width/2,y:j-O.height/2-T.height/2}))}else _.push(d(q,{indexes:[C,0],x:N+O.width/2-T.width/2,y:z-a/2-T.height/2}))}),b.length>0){const H=b.length*(l+s);_.push(d(q,{indexes:[b.length],x:H-s/2-T.width/2,y:-T.height-5}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[v,E(Y,{children:[d(It,{children:w}),d(Ot,{children:_})]})]})};Tt("compare-hierarchy-row",{component:T2,composites:["title","item"]});const sh=Object.assign,Yz={getId:t=>t.id||t.name,getPreH:t=>t.preH||0,getPreV:t=>t.preV||0,getHGap:t=>t.hgap||18,getVGap:t=>t.vgap||18,getChildren:t=>t.children,getHeight:t=>t.height||36,getWidth(t){const e=t.label||" ";return t.width||18*e.split("").length}};class Ds{constructor(e,n){if(this.x=0,this.y=0,this.depth=0,this.children=[],this.hgap=0,this.vgap=0,e instanceof Ds||"x"in e&&"y"in e&&"children"in e){const o=e;return this.data=o.data,this.id=o.id,this.x=o.x,this.y=o.y,this.width=o.width,this.height=o.height,this.depth=o.depth,this.children=o.children,this.parent=o.parent,this.hgap=o.hgap,this.vgap=o.vgap,this.preH=o.preH,void(this.preV=o.preV)}this.data=e;const r=n.getHGap(e),i=n.getVGap(e);this.preH=n.getPreH(e),this.preV=n.getPreV(e),this.width=n.getWidth(e),this.height=n.getHeight(e),this.width+=this.preH,this.height+=this.preV,this.id=n.getId(e),this.addGap(r,i)}isRoot(){return this.depth===0}isLeaf(){return this.children.length===0}addGap(e,n){this.hgap+=e,this.vgap+=n,this.width+=2*e,this.height+=2*n}eachNode(e){let n,r=[this];for(;n=r.shift();)e(n),r=n.children.concat(r)}DFTraverse(e){this.eachNode(e)}BFTraverse(e){let n,r=[this];for(;n=r.shift();)e(n),r=r.concat(n.children)}getBoundingBox(){const e={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(n=>{e.left=Math.min(e.left,n.x),e.top=Math.min(e.top,n.y),e.width=Math.max(e.width,n.x+n.width),e.height=Math.max(e.height,n.y+n.height)}),e}translate(e=0,n=0){this.eachNode(r=>{r.x+=e,r.y+=n,r.x+=r.preH,r.y+=r.preV})}right2left(){const e=this.getBoundingBox();this.eachNode(n=>{n.x=n.x-2*(n.x-e.left)-n.width}),this.translate(e.width,0)}bottom2top(){const e=this.getBoundingBox();this.eachNode(n=>{n.y=n.y-2*(n.y-e.top)-n.height}),this.translate(0,e.height)}}function ah(t,e={},n){e=sh({},Yz,e);const r=new Ds(t,e),i=[r];let o;if(!n&&!t.collapsed){for(;o=i.shift();)if(!o.data.collapsed){const s=e.getChildren(o.data),a=s?s.length:0;if(o.children=new Array(a),s&&a)for(let l=0;l<a;l++){const c=new Ds(s[l],e);o.children[l]=c,i.push(c),c.parent=o,c.depth=o.depth+1}}}return r}class Xz{constructor(e,n={}){this.options=n,this.rootNode=ah(e,n)}execute(){throw new Error("please override this method")}}function Gz(t,e){const n=ah(t.data,e,!0),r=ah(t.data,e,!0),i=t.children.length,o=Math.round(i/2),s=e.getSide||function(a,l){return l<o?"right":"left"};for(let a=0;a<i;a++){const l=t.children[a];s(l,a)==="right"?r.children.push(l):n.children.push(l)}return n.eachNode(a=>{a.isRoot()||(a.side="left")}),r.eachNode(a=>{a.isRoot()||(a.side="right")}),{left:n,right:r}}const Ln=["LR","RL","TB","BT","H","V"],qz=["LR","RL","H"],Uz=Ln[0];function Zz(t,e,n){const r=e.direction||Uz;if(e.isHorizontal=(o=>qz.indexOf(o)>-1)(r),Ln.indexOf(r)===-1)throw new TypeError(`Invalid direction: ${r}`);if(r===Ln[0])n(t,e);else if(r===Ln[1])n(t,e),t.right2left();else if(r===Ln[2])n(t,e);else if(r===Ln[3])n(t,e),t.bottom2top();else if(r===Ln[4]||r===Ln[5]){const{left:o,right:s}=Gz(t,e);n(o,e),n(s,e),e.isHorizontal?o.right2left():o.bottom2top(),s.translate(o.x-s.x,o.y-s.y),t.x=o.x,t.y=s.y;const a=t.getBoundingBox();e.isHorizontal?a.top<0&&t.translate(0,-a.top):a.left<0&&t.translate(-a.left,0)}let i=e.fixedRoot;return i===void 0&&(i=!0),i&&t.translate(-(t.x+t.width/2+t.hgap),-(t.y+t.height/2+t.vgap)),(function(o,s){if(s.radial){const[a,l]=s.isHorizontal?["x","y"]:["y","x"],c={x:1/0,y:1/0},h={x:-1/0,y:-1/0};let u=0;o.DFTraverse(g=>{u++;const{x:y,y:m}=g;c.x=Math.min(c.x,y),c.y=Math.min(c.y,m),h.x=Math.max(h.x,y),h.y=Math.max(h.y,m)});const f=h[l]-c[l];if(f===0)return;const p=2*Math.PI/u;o.DFTraverse(g=>{const y=g[l],m=c[l],b=g[a],v=o[a],x=(y-m)/f*(2*Math.PI-p)+p,w=b-v;g.x=Math.cos(x)*w,g.y=Math.sin(x)*w})}})(t,e),t}function A2(t,e){let n=0;return t.children.length?t.children.forEach(r=>{n+=A2(r,e)}):n=t.height,t._subTreeSep=e.getSubTreeSep(t.data),t.totalHeight=Math.max(t.height,n)+2*t._subTreeSep,t.totalHeight}function k2(t){const e=t.children,n=e.length;if(n){e.forEach(a=>{k2(a)});const r=e[0],i=e[n-1],o=i.y-r.y+i.height;let s=0;if(e.forEach(a=>{s+=a.totalHeight}),o>t.height)t.y=r.y+o/2-t.height/2;else if(e.length!==1||t.height>s){const a=t.y+(t.height-o)/2-r.y;e.forEach(l=>{l.translate(0,a)})}else t.y=(r.y+r.height/2+i.y+i.height/2)/2-t.height/2}}const Kz={getSubTreeSep:()=>0};function Qz(t,e={}){return e=sh({},Kz,e),t.parent={x:0,width:0,height:0,y:0},t.BFTraverse(n=>{n.x=n.parent.x+n.parent.width}),t.parent=void 0,A2(t,e),t.startY=0,t.y=t.totalHeight/2-t.height/2,t.eachNode(n=>{const r=n.children,i=r.length;if(i){const o=r[0];if(o.startY=n.startY+n._subTreeSep,i===1)o.y=n.y+n.height/2-o.height/2;else{o.y=o.startY+o.totalHeight/2-o.height/2;for(let s=1;s<i;s++){const a=r[s];a.startY=r[s-1].startY+r[s-1].totalHeight,a.y=a.startY+a.totalHeight/2-a.height/2}}}}),k2(t),t}class Jz extends Xz{execute(){return Zz(this.rootNode,this.options,Qz)}}const tL={};function eL(t,e){const n=sh({},tL,e);return new Jz(t,n).execute()}var nL=Object.defineProperty,rL=Object.defineProperties,iL=Object.getOwnPropertyDescriptors,z2=Object.getOwnPropertySymbols,oL=Object.prototype.hasOwnProperty,sL=Object.prototype.propertyIsEnumerable,L2=(t,e,n)=>e in t?nL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aL=(t,e)=>{for(var n in e||(e={}))oL.call(e,n)&&L2(t,n,e[n]);if(z2)for(var n of z2(e))sL.call(e,n)&&L2(t,n,e[n]);return t},lL=(t,e)=>rL(t,iL(e));const cL=60,hL=14,R2=30,H2="center",dL="curved",uL=2,fL="node",pL="solid",D2=(t,e=[],n=0)=>{var r,i;const o=[...e,n];return lL(aL({},t),{_indexes:o,children:(i=(r=t.children)==null?void 0:r.map((s,a)=>D2(s,o,a)))!=null?i:[]})},N2=(t,e,n,r)=>{var i,o;e.push(t),(o=(i=t.data)._flatIndex)!=null||(i._flatIndex=e.length-1),r&&n.push({parent:r,child:t});const s=t.children;s==null||s.forEach(a=>N2(a,e,n,t))},gL=(t,e,n,r)=>{const i=Math.abs(n-t)/2,o=n>t?t+i:t-i,s=n>t?n-i:n+i;return`M ${t} ${e} C ${o} ${e} ${s} ${r} ${n} ${r}`},mL=(t,e,n,r)=>`M ${t} ${e} L ${n} ${r}`,yL=(t,e,n,r=H2)=>{const i=c=>Math.max(0,Math.min(1,c)),s=(c=>c==="top"?0:c==="bottom"?1:c==="center"?.5:i(c))(r),a=t.y+t.height*s,l=e.y+e.height*s;return n==="left"?{sx:t.x,sy:a,tx:e.x+e.width,ty:l}:{sx:t.x+t.width,sy:a,tx:e.x,ty:l}},j2=t=>{var e,n;const{Title:r,Items:i,data:o,levelGap:s=cL,nodeGap:a=hL,edgeAlign:l=H2,colorMode:c=fL,edgeColorMode:h=pL,edgeType:u=dL,edgeWidth:f=uL,options:p}=t,{title:g,desc:y,items:m=[]}=o,b=r?d(r,{title:g,desc:y}):null,v=re(p),x=Q(d(q,{indexes:[0]}));if(!m.length||!(i!=null&&i.length))return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[b,d(Y,{children:d(q,{indexes:[0],x:0,y:0})})]});const w=D2(m[0]),_=new WeakMap,$=new WeakMap,P=new WeakMap,O=(R,W)=>Pi({depth:W,originalIndexes:R._indexes,flatIndex:R._flatIndex},c),T=(R,W)=>{const U=P.get(R);if(U)return U;const V=O(R,W),G=Ct(p,V),Z=xe({colorPrimary:G},p);return P.set(R,Z),$.set(R,G),Z},I=R=>{const W=_.get(R);if(W)return W;const U=Math.max(R._indexes.length-1,0),V=hs(i,U),G=Q(d(V,{indexes:R._indexes,data:o,datum:R,positionH:"center",positionV:"middle",themeColors:T(R,U)}));return _.set(R,G),G},S=eL(w,{direction:"H",getSide:(R,W)=>{if(!R.parent)return"right";const U=(R.parent.children||[]).indexOf(R);return(U>=0?U:W)%2===0?"left":"right"},getWidth:R=>I(R).width,getHeight:R=>I(R).height,getHGap:()=>s,getVGap:()=>a}),H=[],C=[];N2(S,H,C);const A=H.length>0?Math.min(...H.map(R=>R.x)):0,B=H.length>0?Math.min(...H.map(R=>R.y)):0,k=R2-A,D=R2-B,z=[],N=[],j=[],X=[],L=new WeakMap;H.forEach(R=>{var W,U;const V=R.data,G=I(V),Z=R.x+k+((W=R.hgap)!=null?W:0),K=R.y+D+((U=R.vgap)!=null?U:0),nt=hs(i,R.depth),at=R.depth===0?"center":R.side==="left"?"flipped":"normal",pt=T(V,R.depth);j.push(d(nt,{indexes:V._indexes,data:o,datum:V,x:Z,y:K,positionH:at,positionV:"middle",themeColors:pt})),L.set(R,{x:Z,y:K,width:G.width,height:G.height,centerX:Z+G.width/2,centerY:K+G.height/2})}),C.forEach(R=>{var W,U,V,G;const{parent:Z,child:K}=R,nt=L.get(K),at=L.get(Z);if(!nt||!at)return;const pt=K.data,{sx:ft,sy:rt,tx:tt,ty:et}=yL(at,nt,K.side,l),st=(W=$.get(pt))!=null?W:Ct(p,O(pt,K.depth)),vt=(U=$.get(Z.data))!=null?U:Ct(p,O(Z.data,Z.depth)),gt=u==="straight"?mL(ft,rt,tt,et):gL(ft,rt,tt,et),dt=`edge-gradient-${pt._indexes.join("-")}`;N.push(d(ht,{d:gt,stroke:h==="gradient"?`url(#${dt})`:st!=null?st:v,strokeWidth:f,fill:"none"})),h==="gradient"&&z.push(E("linearGradient",{id:dt,gradientUnits:"userSpaceOnUse",x1:ft,y1:rt,x2:tt,y2:et,children:[d("stop",{offset:"0%",stopColor:vt!=null?vt:v}),d("stop",{offset:"100%",stopColor:st!=null?st:v})]}));const ct=(G=(V=pt.children)==null?void 0:V.length)!=null?G:0,ut=[...pt._indexes,ct],mt=nt.x+(nt.width-x.width)/2,Pt=nt.y+nt.height+8,yt=Pt+x.height+6;K.depth>0&&X.push(d(Ft,{indexes:pt._indexes,x:mt,y:Pt})),X.push(d(q,{indexes:ut,x:mt,y:yt}))});const M=L.get(S);if(M){const R=S.data,W=(n=(e=R.children)==null?void 0:e.length)!=null?n:0,U=[...R._indexes,W],V=M.x+(M.width-x.width)/2,G=M.y+M.height+8+x.height+6;X.push(d(q,{indexes:U,x:V,y:G}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[b,E(Y,{children:[z.length>0?d(zt,{children:z}):null,d(Y,{children:N}),d(It,{children:j}),d(Ot,{children:X})]})]})};Tt("hierarchy-mindmap",{component:j2,composites:["title","item"]});var vL=Object.defineProperty,bL=Object.defineProperties,xL=Object.getOwnPropertyDescriptors,F2=Object.getOwnPropertySymbols,wL=Object.prototype.hasOwnProperty,_L=Object.prototype.propertyIsEnumerable,B2=(t,e,n)=>e in t?vL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ns=(t,e)=>{for(var n in e||(e={}))wL.call(e,n)&&B2(t,n,e[n]);if(F2)for(var n of F2(e))_L.call(e,n)&&B2(t,n,e[n]);return t},js=(t,e)=>bL(t,xL(e));const W2=(t,e)=>{const n=Math.max(0,e/2-1);return Math.min(t,n)},V2=t=>{const{Title:e,Items:n,data:r,levelGap:i=80,nodeGap:o=60,edgeType:s="straight",edgeColorMode:a="gradient",edgeWidth:l=3,edgeStyle:c="solid",edgeDashPattern:h="5,5",edgeCornerRadius:u=0,edgeOffset:f=0,edgeOrigin:p="center",edgeOriginPadding:g=20,edgeMarker:y="none",markerSize:m=12,colorMode:b="branch",orientation:v="top-bottom",options:x}=t,w=v==="left-right"||v==="right-left",_=v==="bottom-top"||v==="right-left"?-1:1,{title:$,desc:P}=r,O=re(x),T=rt=>{var tt;const et=[...rt];return(tt=et[0])!=null&&tt.children||(et[0]=js(Ns({},et[0]),{children:et.slice(1)}),et.splice(1)),et},I=(rt,tt,et,st,vt,gt="vertical")=>{const dt=gt==="vertical",ct=dt?st-tt:et-rt,ut=dt?et-rt:st-tt,mt=ct===0?1:Math.sign(ct),Pt=ut===0?1:Math.sign(ut),yt=dt?tt+ct/2:rt+ct/2,Mt=Math.min(vt,Math.abs(ct)/2,Math.abs(ut)/2);return Mt===0?dt?`M ${rt} ${tt} L ${rt} ${yt} L ${et} ${yt} L ${et} ${st}`:`M ${rt} ${tt} L ${yt} ${tt} L ${yt} ${st} L ${et} ${st}`:dt?`M ${rt} ${tt}
83
- L ${rt} ${yt-mt*Mt}
84
- Q ${rt} ${yt} ${rt+Pt*Mt} ${yt}
85
- L ${et-Pt*Mt} ${yt}
86
- Q ${et} ${yt} ${et} ${yt+mt*Mt}
87
- L ${et} ${st}`:`M ${rt} ${tt}
88
- L ${yt-mt*Mt} ${tt}
89
- Q ${yt} ${tt} ${yt} ${tt+Pt*Mt}
90
- L ${yt} ${st-Pt*Mt}
91
- Q ${yt} ${st} ${yt+mt*Mt} ${st}
92
- L ${et} ${st}`},S=rt=>{const{x:tt,y:et}=rt;return w?{x:et*_,y:tt}:{x:tt,y:et*_}},H=(rt,tt,et)=>{const{x:st,y:vt}=S(rt),gt=st+et.x,dt=vt+et.y,ct=dt+tt.height/2;return{centerX:gt,centerY:ct,left:gt-tt.width/2,right:gt+tt.width/2,top:dt,bottom:dt+tt.height}},C=rt=>{var tt;if(!rt.length)return null;const et=rt[0],st=(vt,gt=[],dt=0)=>{var ct,ut;const mt=[...gt,dt];return js(Ns({},vt),{_originalIndex:mt,_depth:mt.length-1,children:(ut=(ct=vt.children)==null?void 0:ct.map((Pt,yt)=>st(Pt,mt,yt)))!=null?ut:[]})};return(tt=et.children)!=null&&tt.length?st(et):js(Ns({},et),{_originalIndex:[0],_depth:0,children:rt.slice(1).map((vt,gt)=>js(Ns({},vt),{_originalIndex:[gt+1],_depth:1}))})},A=rt=>{var tt,et;let st=0,vt=0;const gt=new Map,dt=new Map;rt.each(ct=>{dt.has(ct.depth)||dt.set(ct.depth,ct.data)});for(let ct=0;ct<rt.height+1;ct++){const ut=hs(n,ct),mt=(tt=dt.get(ct))!=null?tt:{},Pt=(et=mt._originalIndex)!=null?et:Array(ct+1).fill(0),yt=Q(d(ut,{indexes:Pt,data:r,datum:mt,positionH:"center"}));gt.set(ct,yt),st=Math.max(st,yt.width),vt=Math.max(vt,yt.height)}return{levelBounds:gt,maxWidth:st,maxHeight:vt}},B=(rt,tt,et,st,vt,gt)=>{const{depth:dt,data:ct,parent:ut}=rt,mt=ct._originalIndex,Pt=hs(n,dt),yt=tt.get(dt),Mt=H(rt,yt,st),te=Mt.left,he=Mt.top,ye={items:[],btns:[],deco:[]},Ut=Pi({depth:dt,originalIndexes:mt,flatIndex:ct._flatIndex},b),ae=Ct(x,Ut),un=xe({colorPrimary:ae},x);if(ye.items.push(d(Pt,{indexes:mt,datum:ct,data:r,x:te,y:he,positionH:"center",themeColors:un})),ye.btns.push(d(Ft,{indexes:mt,x:te+(yt.width-et.width)/2,y:he+yt.height+5}),d(q,{indexes:[...mt,0],x:te+(yt.width-et.width)/2,y:he+yt.height+et.height+10})),ut){const je=tt.get(ut.depth),Nt=H(ut,je,st),yr=gt.filter(Gt=>Gt.parent===ut),bt=yr.findIndex(Gt=>Gt===rt),ee=yr.length;let At,Bt;if(p==="distributed"&&ee>1)if(w){const Gt=W2(g,je.height),Ze=Nt.top+Gt,vr=(Nt.bottom-Gt-Ze)/ee;Bt=Ze+vr*bt+vr/2,At=(_>0?Nt.right:Nt.left)+f*_}else{const Gt=W2(g,je.width),Ze=Nt.left+Gt,vr=(Nt.right-Gt-Ze)/ee;At=Ze+vr*bt+vr/2,Bt=(_>0?Nt.bottom:Nt.top)+f*_}else At=w?(_>0?Nt.right:Nt.left)+f*_:Nt.centerX,Bt=w?Nt.centerY:(_>0?Nt.bottom:Nt.top)+f*_;const pe=w?(_>0?Mt.left:Mt.right)-f*_:Mt.centerX,le=w?Mt.centerY:(_>0?Mt.top:Mt.bottom)-f*_;let Te=pe,He=le;y==="arrow"&&(w?Te-=m*_:He-=m*_);let Nn;if(s==="curved")if(w){const Gt=At+(Te-At)/2;Nn=`M ${At} ${Bt} C ${Gt} ${Bt}, ${Gt} ${He}, ${Te} ${He}`}else{const Gt=Bt+(He-Bt)/2;Nn=`M ${At} ${Bt} C ${At} ${Gt}, ${Te} ${Gt}, ${Te} ${He}`}else if(u>0)Nn=I(At,Bt,Te,He,u,w?"horizontal":"vertical");else if(w){const Gt=At+(Te-At)/2;Nn=`M ${At} ${Bt} L ${Gt} ${Bt} L ${Gt} ${He} L ${Te} ${He}`}else{const Gt=Bt+(He-Bt)/2;Nn=`M ${At} ${Bt} L ${At} ${Gt} L ${Te} ${Gt} L ${Te} ${He}`}let ga=O;if(a==="gradient"){const Gt=Pi({depth:ut.depth,originalIndexes:ut.data._originalIndex,flatIndex:ut.data._flatIndex},b),Ze=Pi({depth:dt,originalIndexes:mt,flatIndex:ct._flatIndex},b),Yi=Ct(x,Gt),vr=Ct(x,Ze),$v=`gradient-${ut.data._originalIndex.join("-")}-${mt.join("-")}`;vt.push(E("linearGradient",{id:$v,x1:At,y1:Bt,x2:Te,y2:He,gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0%",stopColor:Yi}),d("stop",{offset:"100%",stopColor:vr})]})),ga=`url(#${$v})`}const Lh=c==="dashed"?h:"";if(ye.deco.push(d(ht,{d:Nn,stroke:ga,strokeWidth:l,strokeDasharray:Lh,fill:"none"})),y==="arrow"){const Gt=a==="gradient"?Ct(x,Ut):re(x),Ze=w?[{x:pe,y:le},{x:pe-m*_,y:le-m/2},{x:pe-m*_,y:le+m/2}]:[{x:pe,y:le},{x:pe-m/2,y:le-m*_},{x:pe+m/2,y:le-m*_}];ye.deco.push(d(Ne,{points:Ze,fill:Gt,width:m,height:m}))}if(y==="dot"){const Gt=Pi({depth:ut.depth,originalIndexes:ut.data._originalIndex,flatIndex:ut.data._flatIndex},b),Ze=a==="gradient"?Ct(x,Gt):re(x);ye.deco.push(d(Lt,{x:(w?_>0?Nt.right+f:Nt.left-f:At)-m,y:(w?Bt:_>0?Nt.bottom+f:Nt.top-f)-m,width:m*2,height:m*2,fill:Ze}));const Yi=a==="gradient"?Ct(x,Ut):re(x);ye.deco.push(d(Lt,{x:pe-m,y:le-m,width:m*2,height:m*2,fill:Yi}))}}return ye},k=(rt,tt,et)=>{const st=new Map;rt.forEach(gt=>{var dt;const ct=gt.parent?gt.parent.data._originalIndex.join("-"):"root";((dt=st.get(ct))!=null?dt:st.set(ct,[]).get(ct)).push(gt)});const vt=[];return st.forEach(gt=>{if(gt.length<=1)return;const dt=gt.slice().sort((ct,ut)=>w?S(ct).y-S(ut).y:S(ct).x-S(ut).x);if(dt.length!==0)for(let ct=0;ct<dt.length-1;ct++){const ut=S(dt[ct]),mt=S(dt[ct+1]),Pt=dt[ct].data._originalIndex.slice(0,-1),yt=dt[ct].data._originalIndex.at(-1)+1;if(w){const Mt=ut.x+et.x+(_>0?-tt.width-5:tt.width+5),te=(ut.y+mt.y)/2+et.y-tt.height/2;vt.push(d(q,{indexes:[...Pt,yt],x:Mt,y:te}))}else{const Mt=ut.y+et.y-tt.height-5,te=(ut.x+mt.x)/2+et.x-tt.width/2;vt.push(d(q,{indexes:[...Pt,yt],x:te,y:Mt}))}}}),vt},D=T(r.items),z=e?d(e,{title:$,desc:P}):null,N=Q(d(q,{indexes:[0]}));if(!D.length)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[z,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:-N.width/2,y:-N.height/2})})})]});const j=C(D),X=Uc(j),{levelBounds:L,maxWidth:M,maxHeight:R}=A(X),U=gA().nodeSize(w?[R+o,M+i]:[M+o,R+i]).separation(()=>1)(X).descendants(),V=U.map(rt=>S(rt)),G=Math.min(...V.map(rt=>rt.x)),Z=Math.min(...V.map(rt=>rt.y)),K={x:Math.max(0,-G+M/2),y:Math.max(0,-Z+N.height+10)},nt=[],at=[],pt=[],ft=[];return U.forEach((rt,tt)=>{rt.data._flatIndex=tt;const{x:et,y:st}=S(rt);rt.__layout={x:et,y:st}}),U.forEach(rt=>{const{items:tt,btns:et,deco:st}=B(rt,L,N,K,ft,U);nt.push(...tt),at.push(...et),pt.push(...st)}),at.push(...k(U,N,K)),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[z,E(Y,{children:[ft.length>0&&d(zt,{children:ft}),d(ne,{children:pt}),d(It,{children:nt}),d(Ot,{children:at})]})]})};Tt("hierarchy-tree",{component:V2,composites:["title","item"]});const Y2=t=>{const{Title:e,Item:n,data:r,gap:i=20,width:o,zigzag:s}=t,{title:a,desc:l,items:c=[]}=r,h=Q(d(q,{indexes:[0]})),u=Q(d(n,{indexes:[0],data:r,datum:c[0]})),f=o||u.width,p=e?d(e,{title:a,desc:l}):null,g=[],y=[],m=(f-h.width)/2;if(c.forEach((b,v)=>{const x=(u.height+i)*v,w=[v];y.push(d(n,{indexes:w,datum:b,data:r,y:x,width:f,positionV:"middle",positionH:s?v%2===0?"normal":"flipped":"normal"})),g.push(d(Ft,{indexes:w,x:-h.width-10,y:x+(u.height-h.height)/2}));const _=v===0?-h.height:x-i/2-h.height/2;g.push(d(q,{indexes:w,x:m,y:_}))}),c.length>0){const v=(u.height+i)*(c.length-1)+u.height;g.push(d(q,{indexes:[c.length],x:m,y:v}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,E(Y,{children:[d(It,{children:y}),d(Ot,{children:g})]})]})};Tt("list-column",{component:Y2,composites:["title","item"]});const X2=t=>{const{Title:e,Item:n,data:r,columns:i=3,gap:o=24,zigzag:s}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=Q(d(q,{indexes:[0]})),f=Q(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),p=[],g=[],y=f.height+o,m=f.width+o,b=new Set;return c.forEach((v,x)=>{const w=Math.floor(x/i),_=x%i,$=_*m,P=w*y,O=[x];g.push(d(n,{indexes:O,datum:v,data:r,x:$,y:P,positionH:"center",positionV:s&&x%2===0?"normal":"flipped"})),p.push(d(Ft,{indexes:O,x:$+(f.width-u.width)/2,y:P+f.height})),_<i-1&&p.push(d(q,{indexes:[x+1],x:$+f.width+(o-u.width)/2,y:P+(f.height-u.height)/2})),_===0&&!b.has(w)&&(p.push(d(q,{indexes:[x],x:$-o/2-u.width/2,y:P+(f.height-u.height)/2})),b.add(w)),(_===i-1||x===c.length-1)&&p.push(d(q,{indexes:[x+1],x:$+f.width+o/2-u.width/2,y:P+(f.height-u.height)/2}))}),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,E(Y,{children:[d(It,{children:g}),d(Ot,{children:p})]})]})};Tt("list-grid",{component:X2,composites:["title","item"]});const G2=t=>{const{Title:e,Item:n,data:r,gap:i=20,levelGap:o=20}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=Q(d(q,{indexes:[0]})),u=Q(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],p=[],g=Math.ceil(Math.sqrt(l.length)),y=[];let m=l.length;for(let _=0;_<g;_++){const $=Math.min(_+1,m);if(y.push($),m-=$,m<=0)break}let b=0;const v=Math.max(...y),w=(v*u.width+(v-1)*i)/2;return y.forEach((_,$)=>{const P=$*(u.height+o),O=_*u.width+(_-1)*i,T=w-O/2;for(let I=0;I<_&&b<l.length;I++){const S=T+I*(u.width+i),H=l[b],C=[b];p.push(d(n,{indexes:C,datum:H,data:r,x:S,y:P,positionH:"center"})),f.push(d(Ft,{indexes:C,x:S+(u.width-h.width)/2,y:P+u.height})),I<_-1&&f.push(d(q,{indexes:[b+1],x:S+u.width+(i-h.width)/2,y:P+(u.height-h.height)/2})),I===0&&f.push(d(q,{indexes:[b],x:S-i/2-h.width/2,y:P+(u.height-h.height)/2})),I===_-1&&f.push(d(q,{indexes:[b+1],x:S+u.width+i/2-h.width/2,y:P+(u.height-h.height)/2})),b++}}),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,E(Y,{children:[d(It,{children:p}),d(Ot,{children:f})]})]})};Tt("list-pyramid",{component:G2,composites:["title","item"]});const q2=t=>{const{Title:e,Item:n,data:r,gap:i=20,zigzag:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=Q(d(q,{indexes:[0]})),u=Q(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],p=[],g=(u.height-h.height)/2,y=u.height;if(l.forEach((m,b)=>{const v=(u.width+i)*b,x=[b];p.push(d(n,{indexes:x,datum:m,data:r,x:v,positionH:"center",positionV:o&&b%2===0?"normal":"flipped"})),f.push(d(Ft,{indexes:x,x:v+(u.width-h.width)/2,y}));const w=b===0?-(i+h.width)/2:v-(i+h.width)/2;f.push(d(q,{indexes:x,x:w,y:g}))}),l.length>0){const b=(u.width+i)*(l.length-1)+u.width+(i-h.width)/2;f.push(d(q,{indexes:[l.length],x:b,y:g}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,E(Y,{children:[d(It,{children:p}),d(Ot,{children:f})]})]})};Tt("list-row",{component:q2,composites:["title","item"]});var $L=Object.defineProperty,U2=Object.getOwnPropertySymbols,PL=Object.prototype.hasOwnProperty,OL=Object.prototype.propertyIsEnumerable,Z2=(t,e,n)=>e in t?$L(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,CL=(t,e)=>{for(var n in e||(e={}))PL.call(e,n)&&Z2(t,n,e[n]);if(U2)for(var n of U2(e))OL.call(e,n)&&Z2(t,n,e[n]);return t};const K2=t=>{const{Item:e,data:n,outerRadius:r=250,innerRadius:i=120,startAngle:o=-90,endAngle:s=270,gapAngle:a=1,options:l}=t,{title:c,items:h=[]}=n,u=xe(l.themeConfig),f=Q(d(q,{indexes:[0]})),p=[],g=[],y=[],m=r+100,b=r+100,v=s-o,x=Math.abs(v-360)<.01,w=h.length>0?a*(x?h.length:h.length-1):0,_=v-w,$=h.length>0?_/h.length:0;if(h.forEach((C,A)=>{var B;const k=[A],D=o+($+a)*A,z=D+$,j=a*Math.PI*r/180/i*(180/Math.PI),X=a,L=(D+X/2)*Math.PI/180,M=(z-X/2)*Math.PI/180,R=(D+j/2)*Math.PI/180,W=(z-j/2)*Math.PI/180,U=m+r*Math.cos(L),V=b+r*Math.sin(L),G=m+r*Math.cos(M),Z=b+r*Math.sin(M),K=m+i*Math.cos(R),nt=b+i*Math.sin(R),at=m+i*Math.cos(W),pt=b+i*Math.sin(W),ft=$>180?1:0,rt=`
93
- M ${U} ${V}
82
+ `,I(V,bk(xk({},u),{children:[d(ht,{d:P,x:0,y:0,width:r,height:i,fill:h.colorPrimary,"data-element-type":"shape"}),d(be,{indexes:n,x:y,y:m,size:o,fill:h.colorBg}),d(Pt,{indexes:n,x:b,y:x,width:f,fontSize:14,fontWeight:"bold",fill:h.colorBg,alignHorizontal:l==="flipped"?"right":"left",children:e.label}),e.desc&&d(Xt,{indexes:n,x:_,y:w,width:f,fontSize:11,wordWrap:!0,fill:h.colorBg,alignHorizontal:l==="flipped"?"right":"left",children:e.desc})]}))};Vt("quarter-simple-card",{component:Hm,composites:["icon","label","desc"]});var wk=Object.defineProperty,_k=Object.defineProperties,$k=Object.getOwnPropertyDescriptors,Rm=Object.getOwnPropertySymbols,Pk=Object.prototype.hasOwnProperty,Ck=Object.prototype.propertyIsEnumerable,Dm=(t,e,n)=>e in t?wk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ok=(t,e)=>{for(var n in e||(e={}))Pk.call(e,n)&&Dm(t,n,e[n]);if(Rm)for(var n of Rm(e))Ck.call(e,n)&&Dm(t,n,e[n]);return t},Mk=(t,e)=>_k(t,$k(e));const Nm=t=>{const[{datum:e,indexes:n,width:r=240,height:i=140,iconSize:o=28,gap:s=12,ribbonHeight:a=32,themeColors:l},c]=Wt(t,["width","height","iconSize","gap","ribbonHeight"]),h=`${l.colorPrimary}-ribbon`;return I(V,Mk(Ok({},c),{children:[d(Lt,{children:I("linearGradient",{id:h,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:l.colorPrimary}),d("stop",{offset:"100%",stopColor:rt(l.colorPrimary).darken(15).toHexString()})]})}),I(ne,{children:[d(Et,{x:0,y:0,width:r,height:i,fill:l.colorBgElevated,stroke:l.colorPrimaryBg,strokeWidth:1,rx:8,ry:8}),d(Et,{x:0,y:0,width:r,height:a,fill:`url(#${h})`,rx:8,ry:8}),d(Et,{x:0,y:8,width:r,height:a-8,fill:`url(#${h})`}),d(ht,{x:r-20,y:a,width:20,height:8,fill:rt(l.colorPrimary).darken(25).toHexString(),d:"M0,0 L20,0 L15,8 L5,8 Z"})]}),d(be,{indexes:n,x:s,y:a+s,size:o,fill:l.colorPrimary}),d(Pt,{indexes:n,x:o+2*s,y:a+s,width:r-o-3*s,height:o,alignHorizontal:"left",alignVertical:"middle",lineHeight:1,fontWeight:"bold",fill:l.colorText,children:e.label}),d(Xt,{indexes:n,x:s,y:a+o+s+5,width:r-2*s,alignHorizontal:"left",fill:l.colorTextSecondary,lineNumber:3,wordWrap:!0,children:e.desc}),d(be,{indexes:n,x:r-s-8,y:s/2,size:16,fill:l.colorWhite})]}))};Vt("ribbon-card",{component:Nm,composites:["icon","label","desc"]});var Sk=Object.defineProperty,Ek=Object.defineProperties,Ik=Object.getOwnPropertyDescriptors,jm=Object.getOwnPropertySymbols,Tk=Object.prototype.hasOwnProperty,Ak=Object.prototype.propertyIsEnumerable,Fm=(t,e,n)=>e in t?Sk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kk=(t,e)=>{for(var n in e||(e={}))Tk.call(e,n)&&Fm(t,n,e[n]);if(jm)for(var n of jm(e))Ak.call(e,n)&&Fm(t,n,e[n]);return t},Lk=(t,e)=>Ek(t,Ik(e));const Bm=t=>{const[{indexes:e,datum:n,themeColors:r,width:i=300,height:o=40,padding:s=4,positionH:a="normal"},l]=Wt(t,["width","height","borderRadius","padding"]),c=o/2,h=c,u=s,f=i-c*2,p=o-s*2;return I(V,Lk(kk({},l),{children:[d(Et,{"data-element-type":"shape",width:i,height:o,rx:c,ry:c,fill:r.colorPrimaryBg,stroke:r.colorPrimary,strokeWidth:1,opacity:.8}),d(Pt,{indexes:e,x:h,y:u,width:f,height:p,alignHorizontal:a==="flipped"?"right":a==="center"?"center":"left",alignVertical:"middle",fontSize:14,fontWeight:"500",fill:r.colorText,children:n.label})]}))};Vt("rounded-rect-node",{component:Bm,composites:["label"]});var zk=Object.defineProperty,Hk=Object.defineProperties,Rk=Object.getOwnPropertyDescriptors,Wm=Object.getOwnPropertySymbols,Dk=Object.prototype.hasOwnProperty,Nk=Object.prototype.propertyIsEnumerable,Vm=(t,e,n)=>e in t?zk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jk=(t,e)=>{for(var n in e||(e={}))Dk.call(e,n)&&Vm(t,n,e[n]);if(Wm)for(var n of Wm(e))Nk.call(e,n)&&Vm(t,n,e[n]);return t},Fk=(t,e)=>Hk(t,Rk(e));const Ym=t=>{const[{indexes:e,datum:n,width:r=140,themeColors:i,positionV:o="normal"},s]=Wt(t,["width"]),a=o!=="flipped",l=a?"bottom":"top",c=d(Pt,{indexes:e,width:r,fill:i.colorText,alignHorizontal:"center",alignVertical:l,fontSize:14,children:n.label}),h=d(Xt,{indexes:e,width:r,fill:i.colorTextSecondary,alignHorizontal:"center",alignVertical:l,children:n.desc}),u=30,f=10,p=Q(c),g=Q(h),y=p.height+g.height,m=y+f+u+f+y;return d(V,Fk(jk({width:r,height:m},s),{children:I(lt,{flexDirection:"column",alignItems:"center",children:[a?I(Ht,{children:[h,c,d(Kt,{height:f})]}):d(Ht,{children:d(Kt,{height:y+f})}),I(_i,{horizontal:"center",vertical:"middle",children:[d(Bk,{width:r,height:u,fill:i.colorPrimary}),d(Tt,{width:r,height:u,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:n.time?n.time:String(e[0]+1).padStart(2,"0").slice(-2)})]}),a?d(Ht,{children:d(Kt,{height:y+f})}):I(Ht,{children:[d(Kt,{height:f}),c,h]})]})}))},Bk=t=>{const{x:e=0,y:n=0,width:r=100,height:i=40,fill:o="#FF356A",size:s=10}=t;return d(Ne,{width:r,height:i,points:[{x:e,y:n},{x:e+r-s,y:n},{x:e+r,y:n+i/2},{x:e+r-s,y:n+i},{x:e,y:n+i},{x:e+s,y:n+i/2}],fill:o,"data-element-type":"shape"})};Vt("simple-horizontal-arrow",{component:Ym,composites:["label","desc","time"]});var Wk=Object.defineProperty,Vk=Object.defineProperties,Yk=Object.getOwnPropertyDescriptors,Xm=Object.getOwnPropertySymbols,Xk=Object.prototype.hasOwnProperty,Gk=Object.prototype.propertyIsEnumerable,Gm=(t,e,n)=>e in t?Wk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qk=(t,e)=>{for(var n in e||(e={}))Xk.call(e,n)&&Gm(t,n,e[n]);if(Xm)for(var n of Xm(e))Gk.call(e,n)&&Gm(t,n,e[n]);return t},Uk=(t,e)=>Vk(t,Yk(e));const qm=t=>{const[{indexes:e,datum:n,width:r=180,illusSize:i=r,gap:o=8,themeColors:s,usePaletteColor:a=!1},l]=Wt(t,["width","illusSize","gap","usePaletteColor"]),{label:c,desc:h}=n,u=a?s.colorPrimary:s.colorText,f=d(Pt,{indexes:e,width:r,alignHorizontal:"center",alignVertical:"middle",fill:u,children:c}),p=Q(f);return I(lt,Uk(qk({},l),{width:r,height:i+o+p.height+o+48,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o,children:[d(Lp,{indexes:e,width:i,height:i}),f,d(Xt,{indexes:e,width:r,alignHorizontal:"center",alignVertical:"top",fill:s.colorTextSecondary,lineNumber:3,children:h})]}))};Vt("simple-illus",{component:qm,composites:["illus","label","desc"]});var Zk=Object.defineProperty,Kk=Object.defineProperties,Qk=Object.getOwnPropertyDescriptors,Um=Object.getOwnPropertySymbols,Jk=Object.prototype.hasOwnProperty,tL=Object.prototype.propertyIsEnumerable,Zm=(t,e,n)=>e in t?Zk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nh=(t,e)=>{for(var n in e||(e={}))Jk.call(e,n)&&Zm(t,n,e[n]);if(Um)for(var n of Um(e))tL.call(e,n)&&Zm(t,n,e[n]);return t},rh=(t,e)=>Kk(t,Qk(e));const Km=t=>{const[{indexes:e,datum:n,width:r=200,height:i,gap:o=4,showIcon:s=!0,iconSize:a=30,iconType:l="default",positionH:c="normal",positionV:h="normal",usePaletteColor:u=!1,themeColors:f},p]=Wt(t,["width","height","gap","showIcon","iconSize","iconType","usePaletteColor"]),{label:g,desc:y,icon:m}=n,v=(L=>L==="normal"?"left":L==="flipped"?"right":"center")(c),b=u?f.colorPrimary:f.colorText,w=14,_=1.4,P=Q(d(Pt,{indexes:e,width:r,alignHorizontal:"center",alignVertical:"middle",fill:b,children:g})),C=s?l==="circle"?d(nr,{indexes:e,size:a,fill:f.colorPrimary,colorBg:f.colorBg}):d(be,{indexes:e,size:a,fill:f.colorTextSecondary}):null;if(!s||!m){const L=i?Math.max(0,i-P.height-o):void 0,D=L?L<=60?1:Math.floor(L/(_*w)):2,k=i?h==="middle"?(i-P.height-(L||0)-o)/2:h==="flipped"?i-P.height-(L||0)-o:0:0;return I(V,rh(nh({},p),{children:[d(Pt,{indexes:e,width:r,y:k,alignHorizontal:v,alignVertical:"middle",fill:b,children:g}),d(Xt,{indexes:e,width:r,height:L,y:k+P.height+o,alignHorizontal:v,alignVertical:A(),lineNumber:D,fill:f.colorTextSecondary,children:y})]}))}if(c==="center"){const L=s&&m?a:0,D=i?Math.max(0,i-P.height-L-o*2):void 0,k=D?D<=60?1:Math.floor(D/(_*w)):2,N=P.height+(D||0)+o,j=i?h==="middle"?(i-N-L-o)/2:h==="flipped"?i-N-L-o:0:0;return d(lt,rh(nh({},p),{flexDirection:"column",gap:o,alignItems:"center",children:h==="flipped"?I(Ht,{children:[I(V,{children:[d(Pt,{indexes:e,width:r,y:j,alignHorizontal:"center",alignVertical:"middle",fill:b,children:g}),d(Xt,{indexes:e,width:r,height:D,y:j+P.height+o,alignHorizontal:"center",alignVertical:"bottom",lineNumber:k,fill:f.colorTextSecondary,children:y})]}),C]}):I(Ht,{children:[C,I(V,{children:[d(Pt,{indexes:e,width:r,y:j,alignHorizontal:"center",alignVertical:"middle",fill:b,children:g}),d(Xt,{indexes:e,width:r,height:D,y:j+P.height+o,alignHorizontal:"center",alignVertical:"top",lineNumber:k,fill:f.colorTextSecondary,children:y})]})]})}))}const T=Q(C),E=Math.max(r-T.width-o,0),S=i?Math.max(0,i-P.height-o):void 0,R=S?S<=60?1:Math.floor(S/(_*w)):2,O=i?h==="middle"?(i-P.height-(S||0)-o)/2:h==="flipped"?i-P.height-(S||0)-o:0:0;return d(lt,rh(nh({},p),{flexDirection:"row",gap:o,alignItems:B(h),children:c==="flipped"?I(Ht,{children:[I(V,{children:[d(Pt,{indexes:e,width:E,y:O,alignHorizontal:"right",alignVertical:"middle",fill:b,children:g}),d(Xt,{indexes:e,width:E,height:S,y:O+P.height+o,alignHorizontal:"right",alignVertical:A(),lineNumber:R,fill:f.colorTextSecondary,children:y})]}),C]}):I(Ht,{children:[C,I(V,{children:[d(Pt,{indexes:e,width:E,y:O,alignHorizontal:"left",alignVertical:"middle",fill:b,children:g}),d(Xt,{indexes:e,width:E,height:S,y:O+P.height+o,alignHorizontal:"left",alignVertical:A(),lineNumber:R,fill:f.colorTextSecondary,children:y})]})]})}));function A(L,D){return"top"}function B(L){return L==="normal"?"flex-start":L==="flipped"?"flex-end":"center"}};Vt("simple",{component:Km,composites:["icon","label","desc"]});var eL=Object.defineProperty,nL=Object.defineProperties,rL=Object.getOwnPropertyDescriptors,Qm=Object.getOwnPropertySymbols,iL=Object.prototype.hasOwnProperty,oL=Object.prototype.propertyIsEnumerable,Jm=(t,e,n)=>e in t?eL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sL=(t,e)=>{for(var n in e||(e={}))iL.call(e,n)&&Jm(t,n,e[n]);if(Qm)for(var n of Qm(e))oL.call(e,n)&&Jm(t,n,e[n]);return t},aL=(t,e)=>nL(t,rL(e));const t2=t=>{const[{indexes:e,datum:n,height:r=140,themeColors:i,positionH:o="normal"},s]=Wt(t,["height"]),a=o==="normal"?"right":"left",l=d(Pt,{indexes:e,width:120,fill:i.colorText,alignHorizontal:a,alignVertical:"middle",fontSize:14,children:n.label}),c=d(Xt,{indexes:e,width:120,fill:i.colorTextSecondary,alignHorizontal:a,alignVertical:"top",children:n.desc}),h=o!=="flipped",u=15,f=30,p=120,g=p+u+f+u+p;return d(V,aL(sL({width:g,height:r},s),{children:I(lt,{flexDirection:"row",alignItems:"center",children:[h?I(Ht,{children:[I(lt,{flexDirection:"column",alignItems:"flex-end",children:[l,c]}),d(Kt,{width:u})]}):d(Ht,{children:d(Kt,{width:p+u})}),I(_i,{horizontal:"center",vertical:"middle",children:[d(lL,{width:f,height:r,fill:i.colorPrimary}),d(Tt,{width:f,height:r,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:String(e[0]+1).padStart(2,"0").slice(-2)})]}),h?d(Ht,{children:d(Kt,{width:p+u})}):I(Ht,{children:[d(Kt,{width:u}),I(lt,{flexDirection:"column",alignItems:"flex-start",children:[l,c]})]})]})}))},lL=t=>{const{x:e=0,y:n=0,width:r=30,height:i=100,fill:o="#FF356A",size:s=10}=t;return d(Ne,{width:r,height:i,points:[{x:e,y:n},{x:e+r/2,y:n+s},{x:e+r,y:n},{x:e+r,y:n+i-s},{x:e+r/2,y:n+i},{x:e,y:n+i-s}],fill:o,"data-element-type":"shape"})};Vt("simple-vertical-arrow",{component:t2,composites:["label","desc"]});var cL=Object.defineProperty,hL=Object.defineProperties,dL=Object.getOwnPropertyDescriptors,e2=Object.getOwnPropertySymbols,uL=Object.prototype.hasOwnProperty,fL=Object.prototype.propertyIsEnumerable,n2=(t,e,n)=>e in t?cL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pL=(t,e)=>{for(var n in e||(e={}))uL.call(e,n)&&n2(t,n,e[n]);if(e2)for(var n of e2(e))fL.call(e,n)&&n2(t,n,e[n]);return t},gL=(t,e)=>hL(t,dL(e));const ih=80,oh=3,r2=t=>{const[{datum:e,indexes:n,width:r=200,gap:i=4,positionH:o="center",themeColors:s},a]=Wt(t,["width","height","gap"]),l=Q(d(Pt,{indexes:n,fontSize:18,fontWeight:"bold",width:r,children:e.label})),c=e.desc?Q(d(Xt,{indexes:n,width:r,wordWrap:!0,children:e.desc})):{height:0},h=l.height+i+oh+(e.desc?i*2+c.height:0),u=0,f=0,p=o==="center"?"center":o==="flipped"?"right":"left",g=o==="center"?(r-ih)/2:o==="flipped"?r-ih:0,y=f+l.height+i,m=0,x=y+oh+i*2;return I(V,gL(pL({width:r,height:h},a),{children:[e.label&&d(Pt,{indexes:n,x:u,y:f,width:r,alignHorizontal:p,fill:s.colorPrimary,fontSize:18,fontWeight:"bold",children:e.label}),e.label&&d(Et,{x:g,y,width:ih,height:oh,fill:s.colorPrimary,"data-element-type":"shape"}),e.desc&&d(Xt,{indexes:n,width:r,x:m,y:x,alignHorizontal:p,wordWrap:!0,fill:s.colorText,children:e.desc})]}))};Vt("underline-text",{component:r2,composites:["label","desc"]});var mL=Object.defineProperty,yL=Object.defineProperties,vL=Object.getOwnPropertyDescriptors,i2=Object.getOwnPropertySymbols,xL=Object.prototype.hasOwnProperty,bL=Object.prototype.propertyIsEnumerable,o2=(t,e,n)=>e in t?mL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wL=(t,e)=>{for(var n in e||(e={}))xL.call(e,n)&&o2(t,n,e[n]);if(i2)for(var n of i2(e))bL.call(e,n)&&o2(t,n,e[n]);return t},_L=(t,e)=>yL(t,vL(e));const s2=t=>{const[{indexes:e,datum:n,height:r=140,themeColors:i,positionH:o="normal"},s]=Wt(t,["height"]),l=o!=="flipped"?"right":"left",c=d(Pt,{indexes:e,width:120,fill:i.colorText,alignHorizontal:l,alignVertical:"middle",fontSize:14,children:n.label}),h=d(Xt,{indexes:e,width:120,fill:i.colorTextSecondary,alignHorizontal:l,alignVertical:"top",children:n.desc}),u=d(nr,{indexes:e,fill:i.colorPrimary,colorBg:i.colorWhite}),f=d(PL,{width:30,height:8,fill:i.colorPrimary,positionH:o}),p=o!=="flipped",g=5,y=25,m=30,x=Q(c),v=Q(u),b=Q(f),w=x.width+g+b.width-v.width-y,_=Math.max(x.width+g+b.width,y+v.width)*2+m;return d(V,_L(wL({width:_,height:r},s),{children:I(lt,{flexDirection:"row",alignItems:"center",children:[p?I(Ht,{children:[I(lt,{flexDirection:"column",alignItems:"flex-end",children:[c,h]}),d(Kt,{width:g}),f]}):I(Ht,{children:[d(Kt,{width:w}),u,d(Kt,{width:y})]}),I(_i,{horizontal:"center",vertical:"middle",children:[d($L,{width:m,height:r,fill:i.colorPrimary}),d(Tt,{width:m,height:r,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:String(e[0]+1).padStart(2,"0").slice(-2)})]}),p?I(Ht,{children:[d(Kt,{width:y}),u]}):I(Ht,{children:[f,d(Kt,{width:g}),I(lt,{flexDirection:"column",alignItems:"flex-start",children:[c,h]})]})]})}))},$L=t=>{const{x:e=0,y:n=0,width:r=30,height:i=100,fill:o="#FF356A",size:s=10}=t;return d(Ne,{width:r,height:i,points:[{x:e,y:n},{x:e+r/2,y:n+s},{x:e+r,y:n},{x:e+r,y:n+i-s},{x:e+r/2,y:n+i},{x:e,y:n+i-s}],fill:o,"data-element-type":"shape"})},PL=t=>{const{x:e=0,y:n=0,width:r=50,height:i=10,fill:o,positionH:s="normal"}=t,a=i/2,l=r-a,c=2,h=a;return I(V,{x:e,y:n,width:r,height:i,children:[d(zt,{width:i,height:i,fill:o,x:s==="normal"?0:l-a,"data-element-type":"shape"}),d(ht,{d:s==="normal"?`M${a},${h} L${a+l},${h}`:`M0,${h} L${l-a},${h}`,strokeWidth:c,stroke:o,"data-element-type":"shape"})]})};Vt("vertical-icon-arrow",{component:s2,composites:["icon","label","desc"]});const sh=new Map;function It(t,e){sh.set(t,e)}function a2(t){return sh.get(t)}function CL(){return Array.from(sh.keys())}const l2=t=>{var e,n,r;const{Title:i,Item:o,data:s,width:a,gap:l,barGap:c,barHeight:h=28,barAreaWidth:u,labelGap:f=16,padding:p=24,showValue:g=!0,options:y,valueFormatter:m=Ut=>Ut.toString()}=t,x=(e=u!=null?u:a)!=null?e:480,{title:v,desc:b,items:w=[],xTitle:_,yTitle:$}=s,P=i?d(i,{title:v,desc:b}):null;if(w.length===0)return d(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:P});const[C,T,E,S]=tr(p),R=(n=w[0])!=null?n:{label:"",value:0},O=Q(d(o,{indexes:[0],datum:R,data:s})),A=O.width||140,B=O.height||h,L=Math.max(h,B),D=Math.max(12,L*.35),k=(r=c!=null?c:l)!=null?r:D,N=w.map(Ut=>{var ae;return(ae=Ut.value)!=null?ae:0}),j=Math.max(...N,0),X=Math.min(...N,0),z=X<0?X*1.1:0;let M=j>0?j*1.1:0;M===z&&(M=z+1);const H=Ri().domain([z,M]).range([0,x]),W=Math.min(Math.max(H(0),0),x),U=Math.max(2,x*.02),Y=w.length*(L+k)-k,G=$?24:0,Z=20,K=_?24:0,et=C+G,st=S+A+f,pt=g?80:0,ft=Math.max(8,L*.2),it=st+x+pt+T,tt=et+Y+ft+Z+K+E,nt=ye(y.themeConfig),at=nt.colorText||"#666",vt=re(y),gt=[],dt=[],ct=[],ut=[],mt=[],Ot=[],yt=[],St=et+Y+ft,te=Ut=>Number.isInteger(Ut)?Ut.toString():Ut.toFixed(1);w.forEach((Ut,ae)=>{var un;const je=[ae],jt=(un=Ut.value)!=null?un:0,yr=et+ae*(L+k),xt=yr+(L-h)/2,ee=jt>=0?st+W:st+H(jt),At=jt>=0?H(jt)-W:W-H(jt),Bt=At===0?U:At,pe=Mt(y,[ae])||nt.colorPrimary;if(gt.push(d(Et,{x:ee,y:xt,width:Bt,height:h,fill:pe,rx:6,ry:6,"data-element-type":"shape"})),g){const le=jt>=0?ee+Bt+8:ee-8;dt.push(d(Tt,{x:le,y:xt+h/2,alignHorizontal:jt>=0?"left":"right",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:pe,children:m(jt,Ut)}))}ct.push(d(o,{indexes:je,datum:Ut,data:s,x:S,y:yr+(L-B)/2,width:A,height:B,positionV:"middle"}))});const he=Math.max(3,Math.min(7,Math.floor(x/80)));return H.ticks(he).forEach(Ut=>{const ae=st+H(Ut);Ot.push(d(ht,{d:`M${ae} ${et} L${ae} ${et+Y}`,stroke:at,strokeOpacity:.08,"data-element-type":"shape"})),mt.push(d(ht,{d:`M${ae-.5} ${St} L${ae-.5} ${St+6}`,stroke:at,"data-element-type":"shape"})),mt.push(d(Tt,{x:ae,y:St+14,alignHorizontal:"center",alignVertical:"middle",fontSize:12,fill:at,children:te(Ut)}))}),ut.push(d(ht,{d:`M${st} ${St} L${st+x} ${St}`,stroke:at,"data-element-type":"shape"})),z<0&&ut.push(d(Et,{x:st+W-.5,y:et,width:1,height:Y,fill:vt,"data-element-type":"shape"})),$&&yt.push(d(Tt,{x:S+A/2,y:C+G/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:at,children:$})),_&&yt.push(d(Tt,{x:st+x/2,y:St+Z+K/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:at,children:_})),I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[P,I(V,{width:it,height:tt,children:[d(V,{children:Ot}),d(V,{children:gt}),d(V,{children:dt}),d(V,{children:yt}),d(V,{children:[...ut,...mt]}),d(Ct,{children:ct})]})]})};It("chart-bar",{component:l2,composites:["title","item","xTitle","yTitle"]});const c2=t=>{const{Title:e,Item:n,data:r,columnGap:i=60,columnWidth:o=50,padding:s=20,showValue:a=!0,options:l,valueFormatter:c=N=>N.toString()}=t,{title:h,desc:u,items:f=[]}=r,p=e?d(e,{title:h,desc:u}):null;if(f.length===0)return d(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:p});const g=ye(l.themeConfig),m=[...f.map(N=>{var j;return(j=N.value)!=null?j:0}),0].sort((N,j)=>N-j),x=m[0]<0,v=f.length*o+(f.length-1)*i,b=300,[w,_,$,P]=tr(s),C=a?24:0,T=10,E=x&&a?C+T:T,S=v+P+_,R=b+w+$+E,O=Ri().domain([m[0],m[m.length-1]]).range([b,0]),A=O(0),B=[],L=[],D=[],k=[];return f.forEach((N,j)=>{var X;const z=[j],M=(X=N.value)!=null?X:0,H=P+j*(o+i),W=M>=0?O(M):A,U=Math.abs(O(M)-A),Y=Mt(l,[j])||g.colorPrimary,G=`${Y}-column-positive-${j}`,Z=`${Y}-column-negative-${j}`;k.push(I("linearGradient",{id:M>=0?G:Z,x1:"0%",y1:M>=0?"0%":"100%",x2:"0%",y2:M>=0?"100%":"0%",children:[d("stop",{offset:"0%",stopColor:Y}),d("stop",{offset:"100%",stopColor:rt.mix(Y,"#fff",40).toHexString()})]})),B.push(d(Et,{x:H,y:w+W,width:o,height:U,fill:`url(#${M>=0?G:Z})`,rx:8,ry:8,"data-element-type":"shape"})),a&&L.push(d(Tt,{x:H+o/2,y:M>=0?w+W-10:w+W+U+20,fontSize:16,fontWeight:"bold",alignHorizontal:"center",alignVertical:M>=0?"bottom":"top",fill:Y,children:c(M,N)}));const K=o+i,et=w+b+E;D.push(d(n,{indexes:z,datum:N,data:r,x:H+o/2-K/2,y:et,width:K,positionH:"center"}))}),I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,I(V,{width:S,height:R,children:[d(Lt,{children:k}),d(V,{children:B}),d(V,{children:L}),d(Ct,{children:D})]})]})};It("chart-column",{component:c2,composites:["title","item"]});var OL=Object.defineProperty,ML=Object.defineProperties,SL=Object.getOwnPropertyDescriptors,h2=Object.getOwnPropertySymbols,EL=Object.prototype.hasOwnProperty,IL=Object.prototype.propertyIsEnumerable,d2=(t,e,n)=>e in t?OL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,u2=(t,e)=>{for(var n in e||(e={}))EL.call(e,n)&&d2(t,n,e[n]);if(h2)for(var n of h2(e))IL.call(e,n)&&d2(t,n,e[n]);return t},TL=(t,e)=>ML(t,SL(e));const f2=t=>{const{Title:e,Item:n,data:r,width:i,height:o=260,gap:s=10,padding:a=24,showValue:l=!0,options:c,valueFormatter:h=xt=>xt.toString()}=t,{title:u,desc:f,items:p=[],xTitle:g,yTitle:y}=r,m=e?d(e,{title:u,desc:f}):null;if(p.length===0)return d(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:m});const[x,v,b,w]=tr(a),_={indexes:[0],datum:p[0],data:r,positionH:"center",positionV:"normal"},$=Q(d(n,u2({},_))),P=$.width,C=$.height,T=Math.max(28,C+14),E=44,S=y?26:0,R=g?22:0,O=P+s,A=p.length>0?(p.length-1)*O+P:0,B=i!==void 0?i:Math.max(200,A||320),L=p.length>1?Math.max(O,(B-P)/(p.length-1)):0,D=p.length>0?Math.max(P,(p.length-1)*L+P):0,k=w+E+S,N=x+S,j=k+D+v,X=N+o+T+R+b,z=p.map(xt=>{var ee;return(ee=xt.value)!=null?ee:0}),M=Math.max(...z,0),H=Math.min(...z,0),W=Math.max(Math.abs(M),Math.abs(H))*.1,U=H<0?H-W:0;let Y=M>0?M+W:1;Y===U&&(Y=U+1);const G=Ri().domain([U,Y]).nice().range([o,0]),Z=Math.max(0,Math.min(o,G(0))),K=Y<=0?0:U>=0?o:Z,et=re(c),st=ye(c.themeConfig),pt=st.colorText||"#666",ft=[],it=[],tt=[],nt=[],at=[],vt=[],gt=[];G.ticks(6).forEach(xt=>{const ee=N+G(xt);ft.push(d(ht,{d:`M ${k} ${ee} L ${k+D} ${ee}`,width:D,height:1,stroke:pt,strokeWidth:1,"data-element-type":"shape",opacity:.08})),gt.push(d(Tt,{x:k-8,y:ee,alignHorizontal:"right",alignVertical:"middle",fontSize:12,fill:pt,children:Number.isInteger(xt)?xt.toString():xt.toFixed(1)}))});const ct=[],ut=[],mt=[],Ot=xt=>{if(xt.length===0)return"";if(xt.length===1){const At=xt[0];return`M ${At.x} ${At.y}`}const ee=[];ee.push(`M ${xt[0].x} ${xt[0].y}`);for(let At=0;At<xt.length-1;At++){const Bt=xt[At-1]||xt[At],pe=xt[At],le=xt[At+1],Te=xt[At+2]||le,Re=pe.x+(le.x-Bt.x)/6,Nn=pe.y+(le.y-Bt.y)/6,ga=le.x-(Te.x-pe.x)/6,Nh=le.y-(Te.y-pe.y)/6;ee.push(`C ${Re} ${Nn} ${ga} ${Nh} ${le.x} ${le.y}`)}return ee.join(" ")};p.forEach((xt,ee)=>{var At;const Bt=k+ee*L+P/2,pe=N+G((At=xt.value)!=null?At:0);ut.push({x:Bt,y:pe,datum:xt}),ct.push(d(n,TL(u2({},_),{indexes:[ee],datum:xt,x:Bt-P/2,y:N+o+4})));const le=Mt(c,[ee])||st.colorPrimary;mt.push({x:Bt,color:le})});const yt=mt.length>0?Math.min(...mt.map(xt=>xt.x)):k,St=mt.length>0?Math.max(...mt.map(xt=>xt.x)):k+D,te=Math.max(1,St-yt),he=mt.map(xt=>d("stop",{offset:`${(xt.x-yt)/te*100}%`,stopColor:xt.color})),ve=mt.map(xt=>d("stop",{offset:`${(xt.x-yt)/te*100}%`,stopColor:xt.color,stopOpacity:"0.18"}));if(mt.length>0){const xt=mt[mt.length-1].color;he.push(d("stop",{offset:"100%",stopColor:xt})),ve.push(d("stop",{offset:"100%",stopColor:xt,stopOpacity:"0.04"}))}const Ut=`chart-line-${rf([D,o,pt,et,mt.map(xt=>`${xt.x.toFixed(2)}-${xt.color}`).join()].join(":"))}`,ae=`${Ut}-stroke`,un=`${Ut}-area`,je=Ot(ut);tt.push(d(ht,{d:je,width:D,height:o,stroke:`url(#${ae})`,strokeWidth:3,fill:"none","data-element-type":"shape"}));const jt=je.includes("C")?je.slice(je.indexOf("C")):"",yr=[`M ${ut[0].x} ${N+K}`,`L ${ut[0].x} ${ut[0].y}`,jt,`L ${ut[ut.length-1].x} ${N+K}`,"Z"].join(" ");return tt.push(d(ht,{d:yr,width:D,height:o,fill:`url(#${un})`,stroke:"none","data-element-type":"shape"})),ut.forEach((xt,ee)=>{var At;const Bt=Mt(c,[ee])||st.colorPrimary;nt.push(d(zt,{x:xt.x-6,y:xt.y-6,width:12,height:12,fill:Bt,"data-element-type":"shape"})),l&&at.push(d(Tt,{x:xt.x,y:xt.y-12,alignHorizontal:"center",alignVertical:"bottom",fontSize:12,fontWeight:"bold",fill:Bt,children:h((At=xt.datum.value)!=null?At:0,xt.datum)}))}),it.push(d(ht,{d:`M ${k} ${N+K} L ${k+D} ${N+K}`,width:D,height:1,stroke:pt,strokeWidth:1,"data-element-type":"shape"})),it.push(d(ht,{d:`M ${k} ${N} L ${k} ${N+o}`,width:1,height:o,stroke:pt,strokeWidth:1,"data-element-type":"shape"})),g&&vt.push(d(Tt,{x:k+D/2,y:N+o+T+R/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:pt,children:g})),y&&vt.push(d(Tt,{x:w+S/2,y:N+o/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:pt,children:y})),I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[m,I(V,{width:j,height:X,children:[I(Lt,{children:[d("linearGradient",{id:ae,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:he}),I("linearGradient",{id:un,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[ve,d("stop",{offset:"100%",stopColor:et,stopOpacity:"0.04"})]})]}),d(V,{children:ft}),d(V,{children:[...it,...gt]}),d(V,{children:tt}),d(V,{children:nt}),d(V,{children:at}),d(V,{children:vt}),d(Ct,{children:ct})]})]})};It("chart-line",{component:f2,composites:["title","item","xTitle","yTitle"]});const p2=t=>{var e;const{Title:n,Item:r,data:i,radius:o=140,innerRadius:s=0,padding:a=30,showPercentage:l=!0,options:c}=t,{title:h,desc:u,items:f=[]}=i,p=n?d(n,{title:h,desc:u}):null,g=Q(d(q,{indexes:[0]})),y=(e=f[0])!=null?e:{label:"",value:0},m=Q(d(r,{indexes:[0],datum:y,data:i,positionH:"center",positionV:"middle"})),x=m.width||140,v=m.height||32,b=Math.max(o,60),w=1.35,_=8,$=b*w+_+x,P=b,C=a+$,T=a+P,E=C*2,S=T*2;if(f.length===0)return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,d(V,{width:E,height:S,children:d($t,{children:d(q,{indexes:[0],x:C-g.width/2,y:T-g.height/2})})})]});const R=f.reduce((G,Z)=>{var K;return G+Math.max((K=Z.value)!=null?K:0,0)},0),O=re(c),A=ye(c.themeConfig),L=JA().value(G=>{var Z;return Math.max((Z=G.value)!=null?Z:0,0)}).sort(null).startAngle(0).endAngle(Math.PI*2)(f),D=Ni().innerRadius(s).outerRadius(b).cornerRadius(2),k=Ni().innerRadius(b).outerRadius(b),N=Ni().innerRadius(b*1.15).outerRadius(b*1.15),j=s+(b-s)*.5,X=Ni().innerRadius(j).outerRadius(j),z=Ni().innerRadius(b*.85).outerRadius(b*.85),M=[],H=[],W=[],U=[],Y=[];return L.forEach(G=>{const Z=G.data,K=G.index,et=Mt(c,[K])||A.colorPrimary||O,st=D(G)||"";M.push(d(ht,{d:st,fill:et,stroke:A.colorBg,strokeWidth:1,"data-element-type":"shape",width:b*2,height:b*2}));const ft=G.startAngle+(G.endAngle-G.startAngle)/2<Math.PI,it=k.centroid(G),tt=N.centroid(G),at=[b*w*(ft?1:-1),tt[1]];W.push(d(ht,{d:`M${C+it[0]} ${T+it[1]} L${C+tt[0]} ${T+tt[1]} L${C+at[0]} ${T+at[1]}`,stroke:O,strokeOpacity:.45,strokeWidth:2,fill:"none","data-element-type":"shape"}));const vt=C+at[0]+(ft?_:-_-x),gt=T+at[1]-v/2;if(U.push(d(r,{indexes:[K],datum:Z,data:i,x:vt,y:gt,width:x,height:v,positionH:ft?"normal":"flipped",positionV:"middle",themeColors:ye({colorPrimary:et},c)})),l&&R>0){const ct=X.centroid(G),ut=Math.max(G.value,0),mt=(ut*100/R).toFixed(1),Ot=50,yt=20;H.push(d(Tt,{x:C+ct[0]-Ot/2,y:T+ct[1]-yt/2,width:Ot,height:yt,alignHorizontal:"center",alignVertical:"middle",fontSize:12,fontWeight:"bold",fill:"#ffffff","data-value":ut,"data-indexes":[K],"data-element-type":kt.ItemValue,children:`${mt}%`}))}const dt=z.centroid(G);Y.push(d(Dt,{indexes:[K],x:C+dt[0]-g.width/2,y:T+dt[1]-g.height/2}))}),L.forEach((G,Z)=>{const K=(Z+1)%L.length,et=G.endAngle,st=L[K].startAngle+(K===0?Math.PI*2:0),pt=(et+st)/2,ft=b*1,it=Math.sin(pt)*ft,tt=-Math.cos(pt)*ft;Y.push(d(q,{indexes:[Z+1],x:C+it-g.width/2,y:T+tt-g.height/2}))}),I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[p,I(V,{width:E,height:S,children:[d(V,{x:C,y:T,children:M}),d(V,{children:W}),d(V,{children:H}),d(Ct,{children:U}),d($t,{children:Y})]})]})};It("chart-pie",{component:p2,composites:["title","item"]});var AL=Object.defineProperty,kL=Object.defineProperties,LL=Object.getOwnPropertyDescriptors,g2=Object.getOwnPropertySymbols,zL=Object.prototype.hasOwnProperty,HL=Object.prototype.propertyIsEnumerable,m2=(t,e,n)=>e in t?AL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,y2=(t,e)=>{for(var n in e||(e={}))zL.call(e,n)&&m2(t,n,e[n]);if(g2)for(var n of g2(e))HL.call(e,n)&&m2(t,n,e[n]);return t},v2=(t,e)=>kL(t,LL(e));const RL=[0,30,-30,60,-60],DL=Math.PI*(3-Math.sqrt(5));function x2(t,e,n){const r=Math.PI/180*n,i=Math.cos(r),o=Math.sin(r);return{width:Math.abs(t*i)+Math.abs(e*o),height:Math.abs(t*o)+Math.abs(e*i)}}function NL(t,e,n,r,i,o){const s=t-o,a=t+n+o,l=e-o,c=e+r+o;return i.some(h=>{const u=h.box.x-o,f=h.box.x+h.box.width+o,p=h.box.y-o,g=h.box.y+h.box.height+o;return!(a<=u||s>=f||c<=p||l>=g)})}function jL(t,e,n,r,i){const o=[],s=e?RL:[0],a=Math.max(1600,t.length*28);return t.forEach((l,c)=>{const h=Math.max(l.width,l.height),u=c*DL;let f=0,p=null;for(let g=0;g<a&&!p;g++){g===Math.floor(a*.6)&&(f=h);const y=u+g*r,m=i*Math.sqrt(g+1)+f+h*.25,x=m*Math.cos(y),v=m*Math.sin(y);for(const b of s){const w=x2(l.width,l.height,b),_=x-w.width/2,$=v-w.height/2;if(!NL(_,$,w.width,w.height,o,n)){p=v2(y2({},l),{angle:b,centerX:x,centerY:v,box:{x:_,y:$,width:w.width,height:w.height}});break}}}if(!p){const g=s[c%s.length],y=i*Math.sqrt(a+1)+h,m=u,x=y*Math.cos(m),v=y*Math.sin(m),b=x2(l.width,l.height,g);p=v2(y2({},l),{angle:g,centerX:x,centerY:v,box:{x:x-b.width/2,y:v-b.height/2,width:b.width,height:b.height}})}o.push(p)}),o}const b2=t=>{const{data:e,options:n,minFontSize:r=16,maxFontSize:i=48,enableRotate:o=!0,padding:s=6,spiralStep:a=.45,radiusStep:l=10}=t,{items:c=[]}=e,h=c.map((O,A)=>({datum:O,index:A})).filter(({datum:O})=>O.label);if(h.length===0)return d(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:d(V,{children:d(Ct,{})})});const u=h.map(({datum:O})=>O.value).filter(O=>typeof O=="number"),f=u.length>0,p=f?Math.min(...u):0,g=f?Math.max(...u):0,y=f&&p===g,m=(r+i)/2,x=O=>{if(!f||y)return m;if(O==null)return r;const A=(O-p)/(g-p||1);return r+A*(i-r)},v=h.map(({datum:O,index:A})=>{const B=x(O.value),L=Q(d(Tt,{fontSize:B,fontWeight:"bold",children:O.label})),D=Mt(n,[A])||re(n);return{label:O.label,value:O.value,color:D,fontSize:B,width:L.width*1.05,height:L.height}}).sort((O,A)=>A.fontSize-O.fontSize),b=jL(v,o,s,a,l),w=Math.min(...b.map(O=>O.box.x)),_=Math.min(...b.map(O=>O.box.y)),$=Math.max(...b.map(O=>O.box.x+O.box.width)),P=Math.max(...b.map(O=>O.box.y+O.box.height)),C=-w+s,T=-_+s,E=$-w+s*2,S=P-_+s*2,R=b.map((O,A)=>{const B=O.centerX-O.width/2+C,L=O.centerY-O.height/2+T,D=O.width/2,k=O.height/2,N=`translate(${B}, ${L}) rotate(${O.angle}, ${D}, ${k})`;return d(V,{transform:N,children:d(Tt,{width:O.width,height:O.height,fontSize:O.fontSize,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:O.color,"data-indexes":A,"data-element-type":kt.ItemLabel,children:O.label})})});return d(Ct,{id:"infographic-container",width:E,height:S,children:R})};It("chart-wordcloud",{component:b2,composites:["item"]});const w2=new Map,ah=(t,e)=>{w2.set(t,e)},FL=t=>{var e;return t&&(e=w2.get(t))!=null?e:null};var BL=Object.defineProperty,WL=Object.defineProperties,VL=Object.getOwnPropertyDescriptors,_2=Object.getOwnPropertySymbols,YL=Object.prototype.hasOwnProperty,XL=Object.prototype.propertyIsEnumerable,$2=(t,e,n)=>e in t?BL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,P2=(t,e)=>{for(var n in e||(e={}))YL.call(e,n)&&$2(t,n,e[n]);if(_2)for(var n of _2(e))XL.call(e,n)&&$2(t,n,e[n]);return t},C2=(t,e)=>WL(t,VL(e));ah("pros-cons-arrow",t=>{const{x:e,y:n,colorPositive:r,colorNegative:i,colorBg:o}=t,s=200,a=141,l={width:90,height:40,fontSize:22,alignHorizontal:"center",alignVertical:"middle",fontWeight:"bold",fill:o};return I(V,{x:e,y:n,width:s,height:a,children:[I(ne,{children:[d("path",{d:"M137 54C137 54.2903 137 54.5806 136.706 54.7742L108.614 86.0323H64.7619C64.4071 86.0204 64.0557 86.1043 63.7453 86.2747C63.4349 86.4452 63.1773 86.6959 63 87C63.0037 86.7447 63.1092 86.5012 63.2936 86.3226L91.3862 55.0645H135.238C135.593 55.0763 135.944 54.9925 136.255 54.822C136.565 54.6516 136.823 54.4009 137 54.0968V54Z",fill:"#D9D9D9"}),d("path",{d:"M39.3272 0.484649C39.6146 0.234929 39.9662 0.0736935 40.3407 0.0198929C40.7152 -0.0339076 41.0971 0.0219605 41.4414 0.180925C41.7857 0.33989 42.0783 0.595358 42.2846 0.917314C42.491 1.23927 42.6026 1.61434 42.6063 1.99848V14.8156H136.013C136.54 14.8156 137.045 15.0282 137.418 15.4068C137.791 15.7853 138 16.2987 138 16.834V53.166C138 53.7013 137.791 54.2147 137.418 54.5932C137.045 54.9718 136.54 55.1844 136.013 55.1844H42.6063V68.0015C42.6026 68.3857 42.491 68.7607 42.2846 69.0827C42.0783 69.4046 41.7857 69.6601 41.4414 69.8191C41.0971 69.9781 40.7152 70.0339 40.3407 69.9801C39.9662 69.9263 39.6146 69.7651 39.3272 69.5154L0.672847 36.5138C0.461378 36.3244 0.292014 36.0915 0.176005 35.8305C0.0599968 35.5695 0 35.2864 0 35C0 34.7136 0.0599968 34.4306 0.176005 34.1696C0.292014 33.9085 0.461378 33.6756 0.672847 33.4862L39.4265 0.484649H39.3272Z",fill:r}),d("path",{d:"M157.394 73.0007C157.397 72.6162 157.509 72.2407 157.715 71.9183C157.922 71.596 158.214 71.3403 158.559 71.1811C158.903 71.022 159.285 70.9661 159.659 71.0199C160.034 71.0738 160.385 71.2352 160.673 71.4852L199.327 104.524C199.539 104.714 199.708 104.947 199.824 105.208C199.94 105.47 200 105.753 200 106.04C200 106.326 199.94 106.61 199.824 106.871C199.708 107.132 199.539 107.366 199.327 107.555L160.573 140.594C160.285 140.815 159.943 140.951 159.584 140.989C159.225 141.027 158.862 140.965 158.535 140.809C158.208 140.653 157.929 140.41 157.728 140.105C157.527 139.8 157.411 139.445 157.394 139.078V126.247H63.9874C63.4603 126.247 62.9548 126.034 62.5821 125.655C62.2094 125.276 62 124.762 62 124.226V87.8531C62 87.3172 62.2094 86.8032 62.5821 86.4242C62.9548 86.0453 63.4603 85.8324 63.9874 85.8324H157.394V73.0007Z",fill:i})]}),d(Tt,C2(P2({x:40,y:15},l),{children:"Pros"})),d(Tt,C2(P2({x:70,y:85},l),{children:"Cons"}))]})});var GL=Object.defineProperty,qL=Object.defineProperties,UL=Object.getOwnPropertyDescriptors,O2=Object.getOwnPropertySymbols,ZL=Object.prototype.hasOwnProperty,KL=Object.prototype.propertyIsEnumerable,M2=(t,e,n)=>e in t?GL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,S2=(t,e)=>{for(var n in e||(e={}))ZL.call(e,n)&&M2(t,n,e[n]);if(O2)for(var n of O2(e))KL.call(e,n)&&M2(t,n,e[n]);return t},E2=(t,e)=>qL(t,UL(e));ah("pros-cons-fold",t=>{const{x:e,y:n,colorPositive:r,colorNegative:i,colorBg:o}=t,s=240,a=300,l={width:85,height:30,fontSize:20,alignHorizontal:"center",alignVertical:"middle",fontWeight:"bold",fill:o};return I(V,{x:e,y:n,width:s,height:a,children:[I(ne,{children:[d("path",{d:"M136.914 38.7755C137.303 38.7733 137.683 38.6617 138.011 38.4534C138.339 38.2451 138.602 37.9485 138.77 37.5977C138.937 37.247 139.002 36.8561 138.957 36.4701C138.913 36.084 138.76 35.7183 138.517 35.415L110.741 0.982313C110.548 0.735138 110.301 0.535238 110.018 0.397762C109.736 0.260286 109.426 0.188841 109.112 0.188841C108.798 0.188841 108.488 0.260286 108.206 0.397762C107.924 0.535238 107.676 0.735138 107.483 0.982313L79.7069 35.415C79.4639 35.7183 79.3113 36.084 79.2667 36.4701C79.222 36.8561 79.2871 37.247 79.4545 37.5977C79.6219 37.9485 79.8847 38.2451 80.213 38.4534C80.5412 38.6617 80.9216 38.7733 81.3104 38.7755H92.8965C93.0517 57.1293 97.5517 64.9878 105.259 73.7252C107.017 75.7932 108.983 77.8612 111.103 80.1361C113.276 82.4626 122.121 88.9252 131.069 95.181C129.362 88.7701 128.172 81.2218 127.293 73.7252C125.224 55.9918 125.017 38.7755 125.017 38.7755H136.914Z",fill:r,fillOpacity:.4}),d("path",{d:"M237.931 109.967C238.48 109.967 239.006 109.749 239.394 109.362C239.782 108.974 240 108.448 240 107.899V75.7932C240 75.2447 239.782 74.7187 239.394 74.3309C239.006 73.9431 238.48 73.7252 237.931 73.7252H127.241C128.172 81.2218 129.362 88.7701 131.069 95.181C138.182 100.171 145.337 105.1 152.534 109.967H237.931Z",fill:r}),d("path",{d:"M152.586 109.967C152.586 109.967 141.724 102.678 131.069 95.181C124.122 90.5838 117.455 85.5772 111.103 80.1878C109.034 77.8612 107.017 75.7415 105.259 73.7252H48.6207V56.6639C48.6091 56.2797 48.4905 55.9063 48.2784 55.5857C48.0662 55.2651 47.7689 55.0099 47.4197 54.8488C47.0705 54.6878 46.6833 54.6271 46.3016 54.6738C45.9199 54.7204 45.5587 54.8725 45.2586 55.1129L1.50002 90.2694C1.26208 90.4633 1.07029 90.7078 0.938585 90.985C0.80688 91.2622 0.738558 91.5652 0.738558 91.8721C0.738558 92.179 0.80688 92.482 0.938585 92.7592C1.07029 93.0365 1.26208 93.2809 1.50002 93.4748L45.2586 128.631C45.5621 128.874 45.928 129.027 46.3142 129.071C46.7005 129.116 47.0914 129.051 47.4424 128.884C47.7933 128.716 48.09 128.454 48.2984 128.125C48.5068 127.797 48.6185 127.417 48.6207 127.029V109.967H152.586Z",fill:"#BFBFBF"}),d("path",{d:"M36.1034 88.9252H28.9655V93.785H36.1034V101.85H41.4828V93.785H48.6207V88.8735H41.4828V81.1701H36.1034V88.9252Z",fill:"#404040"}),d("path",{d:"M103.086 261.224C102.697 261.227 102.317 261.338 101.989 261.547C101.661 261.755 101.398 262.051 101.23 262.402C101.063 262.753 100.998 263.144 101.043 263.53C101.087 263.916 101.24 264.282 101.483 264.585L129.259 299.018C129.452 299.265 129.699 299.465 129.982 299.602C130.264 299.74 130.574 299.811 130.888 299.811C131.202 299.811 131.512 299.74 131.794 299.602C132.076 299.465 132.324 299.265 132.517 299.018L160.293 264.585C160.536 264.282 160.689 263.916 160.733 263.53C160.778 263.144 160.713 262.753 160.546 262.402C160.378 262.051 160.115 261.755 159.787 261.547C159.459 261.338 159.078 261.227 158.69 261.224H147.103C146.948 242.871 142.448 235.012 134.741 226.275C132.983 224.207 131.017 222.139 128.897 219.864C126.724 217.537 117.879 211.075 108.931 204.819C110.677 211.877 111.938 219.045 112.707 226.275C114.776 244.008 114.983 261.224 114.983 261.224H103.086Z",fill:i,fillOpacity:.4}),d("path",{d:"M2.06897 190.033C1.52025 190.033 0.993996 190.251 0.605989 190.638C0.217983 191.026 5.00679e-06 191.552 5.00679e-06 192.101V224.207C5.00679e-06 224.755 0.217983 225.281 0.605989 225.669C0.993996 226.057 1.52025 226.275 2.06897 226.275H112.759C111.828 218.778 110.638 211.23 108.931 204.819C99.9827 198.512 90.931 192.411 88.2414 190.55C87.7206 190.204 87.1077 190.024 86.4828 190.033H2.06897Z",fill:i}),d("path",{d:"M87.4138 190.033C87.4138 190.033 98.2759 197.322 108.931 204.819C115.878 209.416 122.545 214.423 128.897 219.812C130.966 222.139 132.983 224.258 134.741 226.275H191.379V243.336C191.391 243.72 191.51 244.094 191.722 244.414C191.934 244.735 192.231 244.99 192.58 245.151C192.929 245.312 193.317 245.373 193.698 245.326C194.08 245.28 194.441 245.128 194.741 244.887L238.5 209.731C238.738 209.537 238.93 209.292 239.061 209.015C239.193 208.738 239.261 208.435 239.261 208.128C239.261 207.821 239.193 207.518 239.061 207.241C238.93 206.964 238.738 206.719 238.5 206.525L194.741 171.369C194.438 171.126 194.072 170.973 193.686 170.929C193.3 170.884 192.909 170.949 192.558 171.116C192.207 171.284 191.91 171.546 191.702 171.875C191.493 172.203 191.382 172.583 191.379 172.971V190.033H87.4138Z",fill:"#BFBFBF"}),d("path",{d:"M192.414 205.905V210.816H212.069V205.905H192.414Z",fill:"#404040"})]}),d(Tt,E2(S2({x:153,y:77},l),{children:"PROS"})),d(Tt,E2(S2({x:2,y:193},l),{children:"CONS"}))]})}),ah("vs",t=>{const{x:e,y:n,colorPrimary:r,colorBg:i}=t,o=100,s=100,a=rt(r).lighten(20).toString();return I(V,{x:e,y:n,width:o,height:s,children:[I(Lt,{children:[d("filter",{id:"vs-divider-glow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",children:d("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"8",result:"blur"})}),d(bc,{})]}),d(zt,{x:0,y:0,width:o,height:s,fill:a,filter:"url(#vs-divider-glow-filter)",opacity:.6}),d(zt,{x:0,y:0,width:o,height:s,fill:r,"data-element-type":"shape"}),d("text",{x:o/2,y:s/2,fontSize:Math.min(o,s)/1.5,fontWeight:"bold",fill:i,textAnchor:"middle",dominantBaseline:"central",filter:"url(#drop-shadow)",children:"VS"})]})});const I2=t=>{const{Title:e,Item:n,data:r,gap:i=20,groupGap:o=20,opposite:s=!0,flipped:a=!0,dividerType:l="vs",options:c}=t,{title:h,desc:u,items:f=[]}=r,p=e?d(e,{title:h,desc:u}):null;if(f.length===0)return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,d(V,{children:d($t,{children:d(q,{indexes:[0],x:0,y:0})})})]});const g=f[0]||{children:[]},y=f[1]||{children:[]},m=g.children||[],x=y.children||[],v=ye(c.themeConfig),b=Q(d(n,{indexes:[0,0],data:r,datum:m[0]||{}})),w=Q(d(q,{indexes:[0]})),_=FL(l),$=_?Q(d(_,{x:0,y:0,colorPrimary:v.colorPrimary,colorBg:v.colorBg,colorPositive:v.colorPrimary,colorNegative:v.colorPrimary})):{width:0,height:0},P=[],C=[],T=[],E=Math.max(m.length,x.length),S=E>0?E*(b.height+i)-i:0,R=5,O=E>0?i/2+w.height/2:w.height/2,A=w.width+R,B=A+b.width+o,L=B+$.width+o,D=a?"flipped":"normal",k=a?"normal":s?"flipped":"normal";if(m.forEach((N,j)=>{const X=O+j*(b.height+i),z=[0,j];P.push(d(n,{indexes:z,datum:N,data:r,x:A,y:X,positionH:D,positionV:"middle"})),C.push(d(Dt,{indexes:z,x:A-w.width-R,y:X+(b.height-w.height)/2})),j<m.length-1&&C.push(d(q,{indexes:[0,j+1],x:A+(b.width-w.width)/2,y:X+b.height+i/2-w.height/2}))}),m.length>0){C.push(d(q,{indexes:[0,0],x:A+(b.width-w.width)/2,y:O-i/2-w.height/2}));const N=O+(m.length-1)*(b.height+i);C.push(d(q,{indexes:[0,m.length],x:A+(b.width-w.width)/2,y:N+b.height+i/2-w.height/2}))}else f.length>=1&&C.push(d(q,{indexes:[0,0],x:A+(b.width-w.width)/2,y:O-w.height/2}));if(x.forEach((N,j)=>{const X=O+j*(b.height+i),z=[1,j];P.push(d(n,{indexes:z,datum:N,data:r,x:L,y:X,positionH:k,positionV:"middle"})),C.push(d(Dt,{indexes:z,x:L+b.width+R,y:X+(b.height-w.height)/2})),j<x.length-1&&C.push(d(q,{indexes:[1,j+1],x:L+(b.width-w.width)/2,y:X+b.height+i/2-w.height/2}))}),x.length>0){C.push(d(q,{indexes:[1,0],x:L+(b.width-w.width)/2,y:O-i/2-w.height/2}));const N=O+(x.length-1)*(b.height+i);C.push(d(q,{indexes:[1,x.length],x:L+(b.width-w.width)/2,y:N+b.height+i/2-w.height/2}))}else f.length>=2&&C.push(d(q,{indexes:[1,0],x:L+(b.width-w.width)/2,y:O-w.height/2}));return f.length<2&&C.push(d(q,{indexes:[1],x:L+(b.width-w.width)/2,y:O+(S-w.height)/2})),_&&T.push(d(_,{x:B,y:O+(S-$.height)/2,colorPrimary:v.colorPrimary,colorBg:v.colorBg,colorPositive:Mt(c,[0])||v.colorPrimary,colorNegative:Mt(c,[1])||v.colorPrimary})),I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,I(V,{children:[d(V,{children:T}),d(Ct,{children:P}),d($t,{children:C})]})]})};It("compare-binary-horizontal",{component:I2,composites:["title","item"]});var QL=Object.defineProperty,T2=Object.getOwnPropertySymbols,JL=Object.prototype.hasOwnProperty,tz=Object.prototype.propertyIsEnumerable,A2=(t,e,n)=>e in t?QL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,k2=(t,e)=>{for(var n in e||(e={}))JL.call(e,n)&&A2(t,n,e[n]);if(T2)for(var n of T2(e))tz.call(e,n)&&A2(t,n,e[n]);return t};const ez={none:5,"dot-line":100,"arc-dot":20,"split-line":5},L2=t=>{var e,n;const{Title:r,Items:i,data:o,gap:s=20,groupGap:a=0,decoration:l="none",surround:c=!0,flipRoot:h=!1,flipLeaf:u=!1,options:f}=t,[p,g]=i,{title:y,desc:m,items:x=[]}=o,v=r?d(r,{title:y,desc:m}):null,b=d(p,{indexes:[0],data:o,datum:o.items[0],themeColors:{}}),w=d(g,{indexes:[0,0],data:o,datum:((n=(e=x[0])==null?void 0:e.children)==null?void 0:n[0])||x[2]}),_=Q(b),$=Q(w),P=[],C=[],[T,E]=x,S=(T==null?void 0:T.children)||[],R=(E==null?void 0:E.children)||[],O=Math.max(_.height,S.length*($.height+s)-s,R.length*($.height+s)-s),A=ez[l]||0,B=$.width+A,L=B+_.width+a,D=(O-_.height)/2;T&&P.push(d(p,{indexes:[0],x:B,y:D,data:o,datum:T,positionH:h?"normal":"flipped"})),E&&P.push(d(p,{indexes:[1],x:L,y:D,data:o,datum:E,positionH:h?"flipped":"normal"}));const k=(N,j,X)=>{if(l==="none")return;const[z,M]=j,H=Mt(f,X),W={x:z,y:M,width:$.width,height:$.height,side:N,color:H||"#ccc",colorBg:f.themeConfig.colorBg||"#fff"};l==="split-line"?C.push(d(nz,k2({},W))):l==="dot-line"&&C.push(d(rz,k2({},W)))};if(c){const j=(2*_.width+a+$.width)/2+A,X=B+_.width+a/2,z=D+_.height/2;S.forEach((M,H)=>{const W=S.length*($.height+s)-s,Y=(O-W)/2+H*($.height+s),Z=Y+$.height/2-z,K=Math.max(0,j*j-Z*Z),st=X-Math.sqrt(K)-$.width/2;P.push(d(g,{indexes:[0,H],datum:M,data:o,x:st,y:Y,positionH:u?"flipped":"normal"})),k("left",[st,Y],[0,H])}),R.forEach((M,H)=>{const W=R.length*($.height+s)-s,Y=(O-W)/2+H*($.height+s),Z=Y+$.height/2-z,K=Math.max(0,j*j-Z*Z),st=X+Math.sqrt(K)-$.width/2;P.push(d(g,{indexes:[1,H],datum:M,data:o,x:st,y:Y,positionH:u?"normal":"flipped"})),k("right",[st,Y],[1,H])})}else S.forEach((N,j)=>{const X=S.length*($.height+s)-s,M=(O-X)/2+j*($.height+s),H=[0,j],W=0;P.push(d(g,{indexes:H,datum:N,data:o,x:W,y:M,positionH:u?"flipped":"normal"})),k("left",[W,M],H)}),R.forEach((N,j)=>{const X=R.length*($.height+s)-s,M=(O-X)/2+j*($.height+s),H=[1,j],W=L+_.width+A;P.push(d(g,{indexes:H,datum:N,data:o,x:W,y:M,positionH:u?"normal":"flipped"})),k("right",[W,M],H)});return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[v,I(V,{children:[d(Ct,{children:P}),d(V,{width:0,height:0,children:C})]})]})},nz=t=>{const{x:e,y:n,width:r,height:i,color:o,colorBg:s,side:a}=t,l=n+i,c=`split-line-linear-gradient-${a}`;return I(Ht,{children:[d(Lt,{children:d(wc,{id:c,startColor:o,stopColor:s,direction:a==="left"?"left-right":"right-left"})}),d(Et,{x:e,y:l,width:r,height:1,fill:`url(#${c})`})]})},rz=t=>{const{x:e,y:n,side:r,width:i,height:o,color:s,colorBg:a}=t,l=6,c=l/3,h=l*2,u=c*2,f=5,p=r==="left"?e+i+l+f:e-l-f,g=n+o/2,y=p-c,m=g-c,x=80,v=r==="left"?x:-x,b=`dot-line-linear-gradient-${r}`;return I(V,{children:[d(Lt,{children:d(wc,{id:b,startColor:s,stopColor:a,direction:r==="left"?"left-right":"right-left"})}),I(ne,{children:[d(zt,{x:p-l,y:g-l,width:h,height:h,fill:"none",strokeWidth:1,stroke:s}),d(zt,{x:y,y:m,width:u,height:u,fill:s})]}),d(Et,{x:r==="left"?p:p+v,y:g-.5,width:x,height:1,fill:`url(#${b})`})]})};It("compare-hierarchy-left-right",{component:L2,composites:["title","item"]});const z2=t=>{var e,n;const{Title:r,Items:i,data:o,gap:s=0,itemGap:a=20,columnWidth:l=280,itemPadding:c=5,showColumnBackground:h=!0,columnBackgroundAlpha:u=.08,options:f}=t,[p,g]=i,{title:y,desc:m,items:x=[]}=o,v=r?d(r,{title:y,desc:m}):null,b=y1(f),w=[],_=[],$=l-c*2,P=Q(d(p,{indexes:[0],data:o,datum:x[0],width:l})),C=Q(d(g,{indexes:[0,0],data:o,datum:((n=(e=x[0])==null?void 0:e.children)==null?void 0:n[0])||{},width:$})),T=Q(d(q,{indexes:[0]})),E=Math.max(...x.map(R=>{var O;return((O=R.children)==null?void 0:O.length)||0}),0),S=P.height+a+E*(C.height+a);if(x.forEach((R,O)=>{const{children:A=[]}=R,B=O*(l+s),L=B,D=0;if(h){const X=`${b[O%b.length]}${Math.round(u*255).toString(16).padStart(2,"0")}`;w.push(d(Et,{x:B,y:D,width:l,height:S,fill:X,rx:0,ry:0,"data-element-type":"shape"}))}w.push(d(p,{indexes:[O],datum:R,data:o,x:L,y:D,width:l})),_.push(d(Dt,{indexes:[O],x:L+P.width-T.width-10,y:D+10})),O===0&&_.push(d(q,{indexes:[O],x:L+P.width/2-T.width/2,y:D-T.height-5}));const k=D+P.height+a;A.forEach((j,X)=>{const z=k+X*(C.height+a),M=L+c,H=[O,X];w.push(d(g,{indexes:H,datum:j,data:o,x:M,y:z,width:$})),_.push(d(Dt,{indexes:H,x:M+C.width-T.width-10,y:z+(C.height-T.height)/2})),X<A.length-1&&_.push(d(q,{indexes:[O,X+1],x:M+C.width/2-T.width/2,y:z+C.height-T.height/2}))});const N=L+c;if(A.length>0){const j=k+A.length*(C.height+a);_.push(d(q,{indexes:[O,A.length],x:N+C.width/2-T.width/2,y:j-C.height/2-T.height/2}))}else _.push(d(q,{indexes:[O,0],x:N+C.width/2-T.width/2,y:k-a/2-T.height/2}))}),x.length>0){const R=x.length*(l+s);_.push(d(q,{indexes:[x.length],x:R-s/2-T.width/2,y:-T.height-5}))}return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[v,I(V,{children:[d(Ct,{children:w}),d($t,{children:_})]})]})};It("compare-hierarchy-row",{component:z2,composites:["title","item"]});const lh=Object.assign,iz={getId:t=>t.id||t.name,getPreH:t=>t.preH||0,getPreV:t=>t.preV||0,getHGap:t=>t.hgap||18,getVGap:t=>t.vgap||18,getChildren:t=>t.children,getHeight:t=>t.height||36,getWidth(t){const e=t.label||" ";return t.width||18*e.split("").length}};class Ds{constructor(e,n){if(this.x=0,this.y=0,this.depth=0,this.children=[],this.hgap=0,this.vgap=0,e instanceof Ds||"x"in e&&"y"in e&&"children"in e){const o=e;return this.data=o.data,this.id=o.id,this.x=o.x,this.y=o.y,this.width=o.width,this.height=o.height,this.depth=o.depth,this.children=o.children,this.parent=o.parent,this.hgap=o.hgap,this.vgap=o.vgap,this.preH=o.preH,void(this.preV=o.preV)}this.data=e;const r=n.getHGap(e),i=n.getVGap(e);this.preH=n.getPreH(e),this.preV=n.getPreV(e),this.width=n.getWidth(e),this.height=n.getHeight(e),this.width+=this.preH,this.height+=this.preV,this.id=n.getId(e),this.addGap(r,i)}isRoot(){return this.depth===0}isLeaf(){return this.children.length===0}addGap(e,n){this.hgap+=e,this.vgap+=n,this.width+=2*e,this.height+=2*n}eachNode(e){let n,r=[this];for(;n=r.shift();)e(n),r=n.children.concat(r)}DFTraverse(e){this.eachNode(e)}BFTraverse(e){let n,r=[this];for(;n=r.shift();)e(n),r=r.concat(n.children)}getBoundingBox(){const e={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(n=>{e.left=Math.min(e.left,n.x),e.top=Math.min(e.top,n.y),e.width=Math.max(e.width,n.x+n.width),e.height=Math.max(e.height,n.y+n.height)}),e}translate(e=0,n=0){this.eachNode(r=>{r.x+=e,r.y+=n,r.x+=r.preH,r.y+=r.preV})}right2left(){const e=this.getBoundingBox();this.eachNode(n=>{n.x=n.x-2*(n.x-e.left)-n.width}),this.translate(e.width,0)}bottom2top(){const e=this.getBoundingBox();this.eachNode(n=>{n.y=n.y-2*(n.y-e.top)-n.height}),this.translate(0,e.height)}}function ch(t,e={},n){e=lh({},iz,e);const r=new Ds(t,e),i=[r];let o;if(!n&&!t.collapsed){for(;o=i.shift();)if(!o.data.collapsed){const s=e.getChildren(o.data),a=s?s.length:0;if(o.children=new Array(a),s&&a)for(let l=0;l<a;l++){const c=new Ds(s[l],e);o.children[l]=c,i.push(c),c.parent=o,c.depth=o.depth+1}}}return r}class oz{constructor(e,n={}){this.options=n,this.rootNode=ch(e,n)}execute(){throw new Error("please override this method")}}function sz(t,e){const n=ch(t.data,e,!0),r=ch(t.data,e,!0),i=t.children.length,o=Math.round(i/2),s=e.getSide||function(a,l){return l<o?"right":"left"};for(let a=0;a<i;a++){const l=t.children[a];s(l,a)==="right"?r.children.push(l):n.children.push(l)}return n.eachNode(a=>{a.isRoot()||(a.side="left")}),r.eachNode(a=>{a.isRoot()||(a.side="right")}),{left:n,right:r}}const zn=["LR","RL","TB","BT","H","V"],az=["LR","RL","H"],lz=zn[0];function cz(t,e,n){const r=e.direction||lz;if(e.isHorizontal=(o=>az.indexOf(o)>-1)(r),zn.indexOf(r)===-1)throw new TypeError(`Invalid direction: ${r}`);if(r===zn[0])n(t,e);else if(r===zn[1])n(t,e),t.right2left();else if(r===zn[2])n(t,e);else if(r===zn[3])n(t,e),t.bottom2top();else if(r===zn[4]||r===zn[5]){const{left:o,right:s}=sz(t,e);n(o,e),n(s,e),e.isHorizontal?o.right2left():o.bottom2top(),s.translate(o.x-s.x,o.y-s.y),t.x=o.x,t.y=s.y;const a=t.getBoundingBox();e.isHorizontal?a.top<0&&t.translate(0,-a.top):a.left<0&&t.translate(-a.left,0)}let i=e.fixedRoot;return i===void 0&&(i=!0),i&&t.translate(-(t.x+t.width/2+t.hgap),-(t.y+t.height/2+t.vgap)),(function(o,s){if(s.radial){const[a,l]=s.isHorizontal?["x","y"]:["y","x"],c={x:1/0,y:1/0},h={x:-1/0,y:-1/0};let u=0;o.DFTraverse(g=>{u++;const{x:y,y:m}=g;c.x=Math.min(c.x,y),c.y=Math.min(c.y,m),h.x=Math.max(h.x,y),h.y=Math.max(h.y,m)});const f=h[l]-c[l];if(f===0)return;const p=2*Math.PI/u;o.DFTraverse(g=>{const y=g[l],m=c[l],x=g[a],v=o[a],b=(y-m)/f*(2*Math.PI-p)+p,w=x-v;g.x=Math.cos(b)*w,g.y=Math.sin(b)*w})}})(t,e),t}function H2(t,e){let n=0;return t.children.length?t.children.forEach(r=>{n+=H2(r,e)}):n=t.height,t._subTreeSep=e.getSubTreeSep(t.data),t.totalHeight=Math.max(t.height,n)+2*t._subTreeSep,t.totalHeight}function R2(t){const e=t.children,n=e.length;if(n){e.forEach(a=>{R2(a)});const r=e[0],i=e[n-1],o=i.y-r.y+i.height;let s=0;if(e.forEach(a=>{s+=a.totalHeight}),o>t.height)t.y=r.y+o/2-t.height/2;else if(e.length!==1||t.height>s){const a=t.y+(t.height-o)/2-r.y;e.forEach(l=>{l.translate(0,a)})}else t.y=(r.y+r.height/2+i.y+i.height/2)/2-t.height/2}}const hz={getSubTreeSep:()=>0};function dz(t,e={}){return e=lh({},hz,e),t.parent={x:0,width:0,height:0,y:0},t.BFTraverse(n=>{n.x=n.parent.x+n.parent.width}),t.parent=void 0,H2(t,e),t.startY=0,t.y=t.totalHeight/2-t.height/2,t.eachNode(n=>{const r=n.children,i=r.length;if(i){const o=r[0];if(o.startY=n.startY+n._subTreeSep,i===1)o.y=n.y+n.height/2-o.height/2;else{o.y=o.startY+o.totalHeight/2-o.height/2;for(let s=1;s<i;s++){const a=r[s];a.startY=r[s-1].startY+r[s-1].totalHeight,a.y=a.startY+a.totalHeight/2-a.height/2}}}}),R2(t),t}class uz extends oz{execute(){return cz(this.rootNode,this.options,dz)}}const fz={};function pz(t,e){const n=lh({},fz,e);return new uz(t,n).execute()}var gz=Object.defineProperty,mz=Object.defineProperties,yz=Object.getOwnPropertyDescriptors,D2=Object.getOwnPropertySymbols,vz=Object.prototype.hasOwnProperty,xz=Object.prototype.propertyIsEnumerable,N2=(t,e,n)=>e in t?gz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bz=(t,e)=>{for(var n in e||(e={}))vz.call(e,n)&&N2(t,n,e[n]);if(D2)for(var n of D2(e))xz.call(e,n)&&N2(t,n,e[n]);return t},wz=(t,e)=>mz(t,yz(e));const _z=60,$z=14,j2=30,F2="center",Pz="curved",Cz=2,Oz="node",Mz="solid",B2=(t,e=[],n=0)=>{var r,i;const o=[...e,n];return wz(bz({},t),{_indexes:o,children:(i=(r=t.children)==null?void 0:r.map((s,a)=>B2(s,o,a)))!=null?i:[]})},W2=(t,e,n,r)=>{var i,o;e.push(t),(o=(i=t.data)._flatIndex)!=null||(i._flatIndex=e.length-1),r&&n.push({parent:r,child:t});const s=t.children;s==null||s.forEach(a=>W2(a,e,n,t))},Sz=(t,e,n,r)=>{const i=Math.abs(n-t)/2,o=n>t?t+i:t-i,s=n>t?n-i:n+i;return`M ${t} ${e} C ${o} ${e} ${s} ${r} ${n} ${r}`},Ez=(t,e,n,r)=>`M ${t} ${e} L ${n} ${r}`,Iz=(t,e,n,r=F2)=>{const i=c=>Math.max(0,Math.min(1,c)),s=(c=>c==="top"?0:c==="bottom"?1:c==="center"?.5:i(c))(r),a=t.y+t.height*s,l=e.y+e.height*s;return n==="left"?{sx:t.x,sy:a,tx:e.x+e.width,ty:l}:{sx:t.x+t.width,sy:a,tx:e.x,ty:l}},V2=t=>{var e,n;const{Title:r,Items:i,data:o,levelGap:s=_z,nodeGap:a=$z,edgeAlign:l=F2,colorMode:c=Oz,edgeColorMode:h=Mz,edgeType:u=Pz,edgeWidth:f=Cz,options:p}=t,{title:g,desc:y,items:m=[]}=o,x=r?d(r,{title:g,desc:y}):null,v=re(p),b=Q(d(q,{indexes:[0]}));if(!m.length||!(i!=null&&i.length))return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,d(V,{children:d(q,{indexes:[0],x:0,y:0})})]});const w=B2(m[0]),_=new WeakMap,$=new WeakMap,P=new WeakMap,C=(H,W)=>Ci({depth:W,originalIndexes:H._indexes,flatIndex:H._flatIndex},c),T=(H,W)=>{const U=P.get(H);if(U)return U;const Y=C(H,W),G=Mt(p,Y),Z=ye({colorPrimary:G},p);return P.set(H,Z),$.set(H,G),Z},E=H=>{const W=_.get(H);if(W)return W;const U=Math.max(H._indexes.length-1,0),Y=hs(i,U),G=Q(d(Y,{indexes:H._indexes,data:o,datum:H,positionH:"center",positionV:"middle",themeColors:T(H,U)}));return _.set(H,G),G},S=pz(w,{direction:"H",getSide:(H,W)=>{if(!H.parent)return"right";const U=(H.parent.children||[]).indexOf(H);return(U>=0?U:W)%2===0?"left":"right"},getWidth:H=>E(H).width,getHeight:H=>E(H).height,getHGap:()=>s,getVGap:()=>a}),R=[],O=[];W2(S,R,O);const A=R.length>0?Math.min(...R.map(H=>H.x)):0,B=R.length>0?Math.min(...R.map(H=>H.y)):0,L=j2-A,D=j2-B,k=[],N=[],j=[],X=[],z=new WeakMap;R.forEach(H=>{var W,U;const Y=H.data,G=E(Y),Z=H.x+L+((W=H.hgap)!=null?W:0),K=H.y+D+((U=H.vgap)!=null?U:0),et=hs(i,H.depth),st=H.depth===0?"center":H.side==="left"?"flipped":"normal",pt=T(Y,H.depth);j.push(d(et,{indexes:Y._indexes,data:o,datum:Y,x:Z,y:K,positionH:st,positionV:"middle",themeColors:pt})),z.set(H,{x:Z,y:K,width:G.width,height:G.height,centerX:Z+G.width/2,centerY:K+G.height/2})}),O.forEach(H=>{var W,U,Y,G;const{parent:Z,child:K}=H,et=z.get(K),st=z.get(Z);if(!et||!st)return;const pt=K.data,{sx:ft,sy:it,tx:tt,ty:nt}=Iz(st,et,K.side,l),at=(W=$.get(pt))!=null?W:Mt(p,C(pt,K.depth)),vt=(U=$.get(Z.data))!=null?U:Mt(p,C(Z.data,Z.depth)),gt=u==="straight"?Ez(ft,it,tt,nt):Sz(ft,it,tt,nt),dt=`edge-gradient-${pt._indexes.join("-")}`;N.push(d(ht,{d:gt,stroke:h==="gradient"?`url(#${dt})`:at!=null?at:v,strokeWidth:f,fill:"none"})),h==="gradient"&&k.push(I("linearGradient",{id:dt,gradientUnits:"userSpaceOnUse",x1:ft,y1:it,x2:tt,y2:nt,children:[d("stop",{offset:"0%",stopColor:vt!=null?vt:v}),d("stop",{offset:"100%",stopColor:at!=null?at:v})]}));const ct=(G=(Y=pt.children)==null?void 0:Y.length)!=null?G:0,ut=[...pt._indexes,ct],mt=et.x+(et.width-b.width)/2,Ot=et.y+et.height+8,yt=Ot+b.height+6;K.depth>0&&X.push(d(Dt,{indexes:pt._indexes,x:mt,y:Ot})),X.push(d(q,{indexes:ut,x:mt,y:yt}))});const M=z.get(S);if(M){const H=S.data,W=(n=(e=H.children)==null?void 0:e.length)!=null?n:0,U=[...H._indexes,W],Y=M.x+(M.width-b.width)/2,G=M.y+M.height+8+b.height+6;X.push(d(q,{indexes:U,x:Y,y:G}))}return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,I(V,{children:[k.length>0?d(Lt,{children:k}):null,d(V,{children:N}),d(Ct,{children:j}),d($t,{children:X})]})]})};It("hierarchy-mindmap",{component:V2,composites:["title","item"]});var Tz=Object.defineProperty,Az=Object.defineProperties,kz=Object.getOwnPropertyDescriptors,Y2=Object.getOwnPropertySymbols,Lz=Object.prototype.hasOwnProperty,zz=Object.prototype.propertyIsEnumerable,X2=(t,e,n)=>e in t?Tz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ns=(t,e)=>{for(var n in e||(e={}))Lz.call(e,n)&&X2(t,n,e[n]);if(Y2)for(var n of Y2(e))zz.call(e,n)&&X2(t,n,e[n]);return t},js=(t,e)=>Az(t,kz(e));const G2=(t,e)=>{const n=Math.max(0,e/2-1);return Math.min(t,n)},q2=t=>{const{Title:e,Items:n,data:r,levelGap:i=80,nodeGap:o=60,edgeType:s="straight",edgeColorMode:a="gradient",edgeWidth:l=3,edgeStyle:c="solid",edgeDashPattern:h="5,5",edgeCornerRadius:u=0,edgeOffset:f=0,edgeOrigin:p="center",edgeOriginPadding:g=20,edgeMarker:y="none",markerSize:m=12,colorMode:x="branch",orientation:v="top-bottom",options:b}=t,w=v==="left-right"||v==="right-left",_=v==="bottom-top"||v==="right-left"?-1:1,{title:$,desc:P}=r,C=re(b),T=it=>{var tt;const nt=[...it];return(tt=nt[0])!=null&&tt.children||(nt[0]=js(Ns({},nt[0]),{children:nt.slice(1)}),nt.splice(1)),nt},E=(it,tt,nt,at,vt,gt="vertical")=>{const dt=gt==="vertical",ct=dt?at-tt:nt-it,ut=dt?nt-it:at-tt,mt=ct===0?1:Math.sign(ct),Ot=ut===0?1:Math.sign(ut),yt=dt?tt+ct/2:it+ct/2,St=Math.min(vt,Math.abs(ct)/2,Math.abs(ut)/2);return St===0?dt?`M ${it} ${tt} L ${it} ${yt} L ${nt} ${yt} L ${nt} ${at}`:`M ${it} ${tt} L ${yt} ${tt} L ${yt} ${at} L ${nt} ${at}`:dt?`M ${it} ${tt}
83
+ L ${it} ${yt-mt*St}
84
+ Q ${it} ${yt} ${it+Ot*St} ${yt}
85
+ L ${nt-Ot*St} ${yt}
86
+ Q ${nt} ${yt} ${nt} ${yt+mt*St}
87
+ L ${nt} ${at}`:`M ${it} ${tt}
88
+ L ${yt-mt*St} ${tt}
89
+ Q ${yt} ${tt} ${yt} ${tt+Ot*St}
90
+ L ${yt} ${at-Ot*St}
91
+ Q ${yt} ${at} ${yt+mt*St} ${at}
92
+ L ${nt} ${at}`},S=it=>{const{x:tt,y:nt}=it;return w?{x:nt*_,y:tt}:{x:tt,y:nt*_}},R=(it,tt,nt)=>{const{x:at,y:vt}=S(it),gt=at+nt.x,dt=vt+nt.y,ct=dt+tt.height/2;return{centerX:gt,centerY:ct,left:gt-tt.width/2,right:gt+tt.width/2,top:dt,bottom:dt+tt.height}},O=it=>{var tt;if(!it.length)return null;const nt=it[0],at=(vt,gt=[],dt=0)=>{var ct,ut;const mt=[...gt,dt];return js(Ns({},vt),{_originalIndex:mt,_depth:mt.length-1,children:(ut=(ct=vt.children)==null?void 0:ct.map((Ot,yt)=>at(Ot,mt,yt)))!=null?ut:[]})};return(tt=nt.children)!=null&&tt.length?at(nt):js(Ns({},nt),{_originalIndex:[0],_depth:0,children:it.slice(1).map((vt,gt)=>js(Ns({},vt),{_originalIndex:[gt+1],_depth:1}))})},A=it=>{var tt,nt;let at=0,vt=0;const gt=new Map,dt=new Map;it.each(ct=>{dt.has(ct.depth)||dt.set(ct.depth,ct.data)});for(let ct=0;ct<it.height+1;ct++){const ut=hs(n,ct),mt=(tt=dt.get(ct))!=null?tt:{},Ot=(nt=mt._originalIndex)!=null?nt:Array(ct+1).fill(0),yt=Q(d(ut,{indexes:Ot,data:r,datum:mt,positionH:"center"}));gt.set(ct,yt),at=Math.max(at,yt.width),vt=Math.max(vt,yt.height)}return{levelBounds:gt,maxWidth:at,maxHeight:vt}},B=(it,tt,nt,at,vt,gt)=>{const{depth:dt,data:ct,parent:ut}=it,mt=ct._originalIndex,Ot=hs(n,dt),yt=tt.get(dt),St=R(it,yt,at),te=St.left,he=St.top,ve={items:[],btns:[],deco:[]},Ut=Ci({depth:dt,originalIndexes:mt,flatIndex:ct._flatIndex},x),ae=Mt(b,Ut),un=ye({colorPrimary:ae},b);if(ve.items.push(d(Ot,{indexes:mt,datum:ct,data:r,x:te,y:he,positionH:"center",themeColors:un})),ve.btns.push(d(Dt,{indexes:mt,x:te+(yt.width-nt.width)/2,y:he+yt.height+5}),d(q,{indexes:[...mt,0],x:te+(yt.width-nt.width)/2,y:he+yt.height+nt.height+10})),ut){const je=tt.get(ut.depth),jt=R(ut,je,at),yr=gt.filter(Gt=>Gt.parent===ut),xt=yr.findIndex(Gt=>Gt===it),ee=yr.length;let At,Bt;if(p==="distributed"&&ee>1)if(w){const Gt=G2(g,je.height),Ze=jt.top+Gt,vr=(jt.bottom-Gt-Ze)/ee;Bt=Ze+vr*xt+vr/2,At=(_>0?jt.right:jt.left)+f*_}else{const Gt=G2(g,je.width),Ze=jt.left+Gt,vr=(jt.right-Gt-Ze)/ee;At=Ze+vr*xt+vr/2,Bt=(_>0?jt.bottom:jt.top)+f*_}else At=w?(_>0?jt.right:jt.left)+f*_:jt.centerX,Bt=w?jt.centerY:(_>0?jt.bottom:jt.top)+f*_;const pe=w?(_>0?St.left:St.right)-f*_:St.centerX,le=w?St.centerY:(_>0?St.top:St.bottom)-f*_;let Te=pe,Re=le;y==="arrow"&&(w?Te-=m*_:Re-=m*_);let Nn;if(s==="curved")if(w){const Gt=At+(Te-At)/2;Nn=`M ${At} ${Bt} C ${Gt} ${Bt}, ${Gt} ${Re}, ${Te} ${Re}`}else{const Gt=Bt+(Re-Bt)/2;Nn=`M ${At} ${Bt} C ${At} ${Gt}, ${Te} ${Gt}, ${Te} ${Re}`}else if(u>0)Nn=E(At,Bt,Te,Re,u,w?"horizontal":"vertical");else if(w){const Gt=At+(Te-At)/2;Nn=`M ${At} ${Bt} L ${Gt} ${Bt} L ${Gt} ${Re} L ${Te} ${Re}`}else{const Gt=Bt+(Re-Bt)/2;Nn=`M ${At} ${Bt} L ${At} ${Gt} L ${Te} ${Gt} L ${Te} ${Re}`}let ga=C;if(a==="gradient"){const Gt=Ci({depth:ut.depth,originalIndexes:ut.data._originalIndex,flatIndex:ut.data._flatIndex},x),Ze=Ci({depth:dt,originalIndexes:mt,flatIndex:ct._flatIndex},x),Xi=Mt(b,Gt),vr=Mt(b,Ze),kv=`gradient-${ut.data._originalIndex.join("-")}-${mt.join("-")}`;vt.push(I("linearGradient",{id:kv,x1:At,y1:Bt,x2:Te,y2:Re,gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0%",stopColor:Xi}),d("stop",{offset:"100%",stopColor:vr})]})),ga=`url(#${kv})`}const Nh=c==="dashed"?h:"";if(ve.deco.push(d(ht,{d:Nn,stroke:ga,strokeWidth:l,strokeDasharray:Nh,fill:"none"})),y==="arrow"){const Gt=a==="gradient"?Mt(b,Ut):re(b),Ze=w?[{x:pe,y:le},{x:pe-m*_,y:le-m/2},{x:pe-m*_,y:le+m/2}]:[{x:pe,y:le},{x:pe-m/2,y:le-m*_},{x:pe+m/2,y:le-m*_}];ve.deco.push(d(Ne,{points:Ze,fill:Gt,width:m,height:m}))}if(y==="dot"){const Gt=Ci({depth:ut.depth,originalIndexes:ut.data._originalIndex,flatIndex:ut.data._flatIndex},x),Ze=a==="gradient"?Mt(b,Gt):re(b);ve.deco.push(d(zt,{x:(w?_>0?jt.right+f:jt.left-f:At)-m,y:(w?Bt:_>0?jt.bottom+f:jt.top-f)-m,width:m*2,height:m*2,fill:Ze}));const Xi=a==="gradient"?Mt(b,Ut):re(b);ve.deco.push(d(zt,{x:pe-m,y:le-m,width:m*2,height:m*2,fill:Xi}))}}return ve},L=(it,tt,nt)=>{const at=new Map;it.forEach(gt=>{var dt;const ct=gt.parent?gt.parent.data._originalIndex.join("-"):"root";((dt=at.get(ct))!=null?dt:at.set(ct,[]).get(ct)).push(gt)});const vt=[];return at.forEach(gt=>{if(gt.length<=1)return;const dt=gt.slice().sort((ct,ut)=>w?S(ct).y-S(ut).y:S(ct).x-S(ut).x);if(dt.length!==0)for(let ct=0;ct<dt.length-1;ct++){const ut=S(dt[ct]),mt=S(dt[ct+1]),Ot=dt[ct].data._originalIndex.slice(0,-1),yt=dt[ct].data._originalIndex.at(-1)+1;if(w){const St=ut.x+nt.x+(_>0?-tt.width-5:tt.width+5),te=(ut.y+mt.y)/2+nt.y-tt.height/2;vt.push(d(q,{indexes:[...Ot,yt],x:St,y:te}))}else{const St=ut.y+nt.y-tt.height-5,te=(ut.x+mt.x)/2+nt.x-tt.width/2;vt.push(d(q,{indexes:[...Ot,yt],x:te,y:St}))}}}),vt},D=T(r.items),k=e?d(e,{title:$,desc:P}):null,N=Q(d(q,{indexes:[0]}));if(!D.length)return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[k,d(V,{children:d($t,{children:d(q,{indexes:[0],x:-N.width/2,y:-N.height/2})})})]});const j=O(D),X=Kc(j),{levelBounds:z,maxWidth:M,maxHeight:H}=A(X),U=SA().nodeSize(w?[H+o,M+i]:[M+o,H+i]).separation(()=>1)(X).descendants(),Y=U.map(it=>S(it)),G=Math.min(...Y.map(it=>it.x)),Z=Math.min(...Y.map(it=>it.y)),K={x:Math.max(0,-G+M/2),y:Math.max(0,-Z+N.height+10)},et=[],st=[],pt=[],ft=[];return U.forEach((it,tt)=>{it.data._flatIndex=tt;const{x:nt,y:at}=S(it);it.__layout={x:nt,y:at}}),U.forEach(it=>{const{items:tt,btns:nt,deco:at}=B(it,z,N,K,ft,U);et.push(...tt),st.push(...nt),pt.push(...at)}),st.push(...L(U,N,K)),I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[k,I(V,{children:[ft.length>0&&d(Lt,{children:ft}),d(ne,{children:pt}),d(Ct,{children:et}),d($t,{children:st})]})]})};It("hierarchy-tree",{component:q2,composites:["title","item"]});const U2=t=>{const{Title:e,Item:n,data:r,gap:i=20,width:o,zigzag:s}=t,{title:a,desc:l,items:c=[]}=r,h=Q(d(q,{indexes:[0]})),u=Q(d(n,{indexes:[0],data:r,datum:c[0]})),f=o||u.width,p=e?d(e,{title:a,desc:l}):null,g=[],y=[],m=(f-h.width)/2;if(c.forEach((x,v)=>{const b=(u.height+i)*v,w=[v];y.push(d(n,{indexes:w,datum:x,data:r,y:b,width:f,positionV:"middle",positionH:s?v%2===0?"normal":"flipped":"normal"})),g.push(d(Dt,{indexes:w,x:-h.width-10,y:b+(u.height-h.height)/2}));const _=v===0?-h.height:b-i/2-h.height/2;g.push(d(q,{indexes:w,x:m,y:_}))}),c.length>0){const v=(u.height+i)*(c.length-1)+u.height;g.push(d(q,{indexes:[c.length],x:m,y:v}))}return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,I(V,{children:[d(Ct,{children:y}),d($t,{children:g})]})]})};It("list-column",{component:U2,composites:["title","item"]});const Z2=t=>{const{Title:e,Item:n,data:r,columns:i=3,gap:o=24,zigzag:s}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=Q(d(q,{indexes:[0]})),f=Q(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),p=[],g=[],y=f.height+o,m=f.width+o,x=new Set;return c.forEach((v,b)=>{const w=Math.floor(b/i),_=b%i,$=_*m,P=w*y,C=[b];g.push(d(n,{indexes:C,datum:v,data:r,x:$,y:P,positionH:"center",positionV:s&&b%2===0?"normal":"flipped"})),p.push(d(Dt,{indexes:C,x:$+(f.width-u.width)/2,y:P+f.height})),_<i-1&&p.push(d(q,{indexes:[b+1],x:$+f.width+(o-u.width)/2,y:P+(f.height-u.height)/2})),_===0&&!x.has(w)&&(p.push(d(q,{indexes:[b],x:$-o/2-u.width/2,y:P+(f.height-u.height)/2})),x.add(w)),(_===i-1||b===c.length-1)&&p.push(d(q,{indexes:[b+1],x:$+f.width+o/2-u.width/2,y:P+(f.height-u.height)/2}))}),I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,I(V,{children:[d(Ct,{children:g}),d($t,{children:p})]})]})};It("list-grid",{component:Z2,composites:["title","item"]});const K2=t=>{const{Title:e,Item:n,data:r,gap:i=20,levelGap:o=20}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=Q(d(q,{indexes:[0]})),u=Q(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],p=[],g=Math.ceil(Math.sqrt(l.length)),y=[];let m=l.length;for(let _=0;_<g;_++){const $=Math.min(_+1,m);if(y.push($),m-=$,m<=0)break}let x=0;const v=Math.max(...y),w=(v*u.width+(v-1)*i)/2;return y.forEach((_,$)=>{const P=$*(u.height+o),C=_*u.width+(_-1)*i,T=w-C/2;for(let E=0;E<_&&x<l.length;E++){const S=T+E*(u.width+i),R=l[x],O=[x];p.push(d(n,{indexes:O,datum:R,data:r,x:S,y:P,positionH:"center"})),f.push(d(Dt,{indexes:O,x:S+(u.width-h.width)/2,y:P+u.height})),E<_-1&&f.push(d(q,{indexes:[x+1],x:S+u.width+(i-h.width)/2,y:P+(u.height-h.height)/2})),E===0&&f.push(d(q,{indexes:[x],x:S-i/2-h.width/2,y:P+(u.height-h.height)/2})),E===_-1&&f.push(d(q,{indexes:[x+1],x:S+u.width+i/2-h.width/2,y:P+(u.height-h.height)/2})),x++}}),I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(V,{children:[d(Ct,{children:p}),d($t,{children:f})]})]})};It("list-pyramid",{component:K2,composites:["title","item"]});const Q2=t=>{const{Title:e,Item:n,data:r,gap:i=20,zigzag:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=Q(d(q,{indexes:[0]})),u=Q(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],p=[],g=(u.height-h.height)/2,y=u.height;if(l.forEach((m,x)=>{const v=(u.width+i)*x,b=[x];p.push(d(n,{indexes:b,datum:m,data:r,x:v,positionH:"center",positionV:o&&x%2===0?"normal":"flipped"})),f.push(d(Dt,{indexes:b,x:v+(u.width-h.width)/2,y}));const w=x===0?-(i+h.width)/2:v-(i+h.width)/2;f.push(d(q,{indexes:b,x:w,y:g}))}),l.length>0){const x=(u.width+i)*(l.length-1)+u.width+(i-h.width)/2;f.push(d(q,{indexes:[l.length],x,y:g}))}return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(V,{children:[d(Ct,{children:p}),d($t,{children:f})]})]})};It("list-row",{component:Q2,composites:["title","item"]});var Hz=Object.defineProperty,J2=Object.getOwnPropertySymbols,Rz=Object.prototype.hasOwnProperty,Dz=Object.prototype.propertyIsEnumerable,ty=(t,e,n)=>e in t?Hz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Nz=(t,e)=>{for(var n in e||(e={}))Rz.call(e,n)&&ty(t,n,e[n]);if(J2)for(var n of J2(e))Dz.call(e,n)&&ty(t,n,e[n]);return t};const ey=t=>{const{Item:e,data:n,outerRadius:r=250,innerRadius:i=120,startAngle:o=-90,endAngle:s=270,gapAngle:a=1,options:l}=t,{title:c,items:h=[]}=n,u=ye(l.themeConfig),f=Q(d(q,{indexes:[0]})),p=[],g=[],y=[],m=r+100,x=r+100,v=s-o,b=Math.abs(v-360)<.01,w=h.length>0?a*(b?h.length:h.length-1):0,_=v-w,$=h.length>0?_/h.length:0;if(h.forEach((O,A)=>{var B;const L=[A],D=o+($+a)*A,k=D+$,j=a*Math.PI*r/180/i*(180/Math.PI),X=a,z=(D+X/2)*Math.PI/180,M=(k-X/2)*Math.PI/180,H=(D+j/2)*Math.PI/180,W=(k-j/2)*Math.PI/180,U=m+r*Math.cos(z),Y=x+r*Math.sin(z),G=m+r*Math.cos(M),Z=x+r*Math.sin(M),K=m+i*Math.cos(H),et=x+i*Math.sin(H),st=m+i*Math.cos(W),pt=x+i*Math.sin(W),ft=$>180?1:0,it=`
93
+ M ${U} ${Y}
94
94
  A ${r} ${r} 0 ${ft} 1 ${G} ${Z}
95
- L ${at} ${pt}
96
- A ${i} ${i} 0 ${ft} 0 ${K} ${nt}
95
+ L ${st} ${pt}
96
+ A ${i} ${i} 0 ${ft} 0 ${K} ${et}
97
97
  Z
98
- `.trim(),tt=Ct(l,k);y.push(d(ht,{id:"shape-sector",d:rt,fill:tt,width:r*2+200,height:r*2+200,"data-element-type":"shape"}));const st=(D+$/2)*Math.PI/180,vt=(r+i)/2,gt=r-i,dt=$*Math.PI/180,ct=vt*dt,ut=Math.min(ct*.8,gt*.9),mt=Math.min(gt*.9,ct*.8),Pt=Q(d(e,{indexes:[0],data:n,datum:h[0],positionH:"center",width:ut,height:mt})),yt=m+vt*Math.cos(st)-Pt.width/2,Mt=b+vt*Math.sin(st)-Pt.height/2;g.push(d(e,{indexes:k,datum:C,data:n,x:yt,y:Mt,positionH:"center",width:ut,height:mt,themeColors:CL({},xe({colorBg:Ct(l,k),colorPrimary:((B=l.themeConfig)==null?void 0:B.colorBg)||"white"}))}));const te=r+10,he=m+te*Math.cos(st)-f.width/2,ye=b+te*Math.sin(st)-f.height/2;if(p.push(d(Ft,{indexes:k,x:he,y:ye})),x||A<h.length-1){const ae=(z+a/2)*Math.PI/180,un=vt,je=m+un*Math.cos(ae)-f.width/2,Nt=b+un*Math.sin(ae)-f.height/2;p.push(d(q,{indexes:[A+1],x:je,y:Nt}))}}),h.length>0){const A=(o-a/2)*Math.PI/180,B=(r+i)/2,k=m+B*Math.cos(A)-f.width/2,D=b+B*Math.sin(A)-f.height/2;p.push(d(q,{indexes:[0],x:k,y:D}))}const P=i*.9;let O=m,T=b,I=P*1.4,S=P*1.4;if(!x){const A=(o+s)/2*Math.PI/180,B=P*.5;O=m+B*Math.cos(A),T=b+B*Math.sin(A);const k=v*Math.PI*B/180;I=Math.min(k*.8,P*1.4),S=Math.min(B*1.5,P*1.4)}let H="";if(x)H="";else{const C=o*Math.PI/180,A=s*Math.PI/180,B=m+P*Math.cos(C),k=b+P*Math.sin(C),D=m+P*Math.cos(A),z=b+P*Math.sin(A),N=v>180?1:0;H=`
99
- M ${m} ${b}
100
- L ${B} ${k}
101
- A ${P} ${P} 0 ${N} 1 ${D} ${z}
98
+ `.trim(),tt=Mt(l,L);y.push(d(ht,{id:"shape-sector",d:it,fill:tt,width:r*2+200,height:r*2+200,"data-element-type":"shape"}));const at=(D+$/2)*Math.PI/180,vt=(r+i)/2,gt=r-i,dt=$*Math.PI/180,ct=vt*dt,ut=Math.min(ct*.8,gt*.9),mt=Math.min(gt*.9,ct*.8),Ot=Q(d(e,{indexes:[0],data:n,datum:h[0],positionH:"center",width:ut,height:mt})),yt=m+vt*Math.cos(at)-Ot.width/2,St=x+vt*Math.sin(at)-Ot.height/2;g.push(d(e,{indexes:L,datum:O,data:n,x:yt,y:St,positionH:"center",width:ut,height:mt,themeColors:Nz({},ye({colorBg:Mt(l,L),colorPrimary:((B=l.themeConfig)==null?void 0:B.colorBg)||"white"}))}));const te=r+10,he=m+te*Math.cos(at)-f.width/2,ve=x+te*Math.sin(at)-f.height/2;if(p.push(d(Dt,{indexes:L,x:he,y:ve})),b||A<h.length-1){const ae=(k+a/2)*Math.PI/180,un=vt,je=m+un*Math.cos(ae)-f.width/2,jt=x+un*Math.sin(ae)-f.height/2;p.push(d(q,{indexes:[A+1],x:je,y:jt}))}}),h.length>0){const A=(o-a/2)*Math.PI/180,B=(r+i)/2,L=m+B*Math.cos(A)-f.width/2,D=x+B*Math.sin(A)-f.height/2;p.push(d(q,{indexes:[0],x:L,y:D}))}const P=i*.9;let C=m,T=x,E=P*1.4,S=P*1.4;if(!b){const A=(o+s)/2*Math.PI/180,B=P*.5;C=m+B*Math.cos(A),T=x+B*Math.sin(A);const L=v*Math.PI*B/180;E=Math.min(L*.8,P*1.4),S=Math.min(B*1.5,P*1.4)}let R="";if(b)R="";else{const O=o*Math.PI/180,A=s*Math.PI/180,B=m+P*Math.cos(O),L=x+P*Math.sin(O),D=m+P*Math.cos(A),k=x+P*Math.sin(A),N=v>180?1:0;R=`
99
+ M ${m} ${x}
100
+ L ${B} ${L}
101
+ A ${P} ${P} 0 ${N} 1 ${D} ${k}
102
102
  Z
103
- `.trim()}return E(Y,{id:"infographic-container",children:[d(Y,{children:y}),x?d(Lt,{id:"shape-center-circle",x:m-P,y:b-P,width:P*2,height:P*2,fill:u.colorPrimaryBg,fillOpacity:.5,"data-element-type":"shape"}):d(ht,{id:"shape-center-sector",d:H,fill:u.colorPrimaryBg,fillOpacity:.5,width:r*2+200,height:r*2+200,"data-element-type":"shape"}),d(Et,{x:O-I/2,y:T-S/2,width:I,height:S,alignHorizontal:"center",alignVertical:"middle",fontSize:24,fontWeight:"bold",fill:u.colorText,"data-element-type":kt.Title,children:c}),d(It,{children:g}),d(Ot,{children:p})]})};Tt("list-sector",{component:K2,composites:["title","item"]});const Q2=t=>{const{Title:e,Item:n,data:r,columns:i=4,gap:o=20,stepOffset:s=40}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=Q(d(q,{indexes:[0]})),f=Q(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),p=[],g=[],y=f.width+o;return c.forEach((m,b)=>{const v=b%i,x=Math.floor(b/i),w=v*y,_=x*(f.height+o),$=v*s,P=_+$,O=[b];g.push(d(n,{indexes:O,datum:m,data:r,x:w,y:P,positionH:"center"})),p.push(d(Ft,{indexes:O,x:w+(f.width-u.width)/2,y:P+f.height+5}))}),c.forEach((m,b)=>{const v=b%i,x=Math.floor(b/i),w=v*y,_=x*(f.height+o),$=v*s,P=_+$;if(b===0&&p.push(d(q,{indexes:[0],x:w-o/2-u.width/2,y:P+(f.height-u.height)/2})),v<i-1&&b<c.length-1){const O=Math.floor((b+1)/i);x===O&&p.push(d(q,{indexes:[b+1],x:w+f.width+(o-u.width)/2,y:P+(f.height-u.height)/2}))}(v===i-1||b===c.length-1)&&p.push(d(q,{indexes:[b+1],x:w+f.width+(o-u.width)/2,y:P+(f.height-u.height)/2}))}),c.length===0&&p.push(d(q,{indexes:[0],x:(i-1)*y/2+(f.width-u.width)/2,y:0})),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,E(Y,{children:[d(It,{children:g}),d(Ot,{children:p})]})]})};Tt("list-waterfall",{component:Q2,composites:["title","item"]});const lh={axisColor:"#D9D9D9",axisArrowSize:5,strokeWidth:1,dashArray:"4,2",defaultExtraSpacing:20},J2=t=>{const{Title:e,Item:n,data:r,quadrantWidth:i,quadrantHeight:o,showAxis:s=!0,dashedAxis:a=!0}=t,{title:l,desc:c,items:h=[]}=r,u=e?d(e,{title:l,desc:c}):null,f=Array.from({length:4},(x,w)=>h[w]),p=f[0]?Q(d(n,{indexes:[0],data:r,datum:f[0]})):{width:0,height:0},g=i!=null?i:p.width+lh.defaultExtraSpacing,y=o!=null?o:p.height+lh.defaultExtraSpacing,m=SL(g,y,p),b=f.map((x,w)=>{if(!x)return null;const _=m[w];return d(n,{indexes:[w],datum:x,data:r,x:_.x,y:_.y,positionH:w%2?"flipped":"normal",positionV:w<2?"normal":"flipped"})}).filter(Boolean),v=ML(g,y,s,a);return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,E(Y,{width:g*2,height:y*2,children:[v,d(It,{children:b})]})]})};function ML(t,e,n,r){if(!n)return[];const{axisColor:i,axisArrowSize:o,strokeWidth:s,dashArray:a}=lh,l=t,c=e,h=t*2,u=e*2,f=r?a:void 0;return[d(ht,{d:`M 0 ${c} L ${h} ${c}`,stroke:i,strokeWidth:s,strokeDasharray:f,fill:"none","data-element-type":"shape"}),E(ne,{transform:`translate(${h}, ${c})`,children:[d(ht,{d:`M 0 0 L ${-o} ${-o/2}`,stroke:i,strokeWidth:s,fill:"none"}),d(ht,{d:`M 0 0 L ${-o} ${o/2}`,stroke:i,strokeWidth:s,fill:"none"})]}),E(ne,{transform:`translate(0, ${c})`,children:[d(ht,{d:`M 0 0 L ${o} ${-o/2}`,stroke:i,strokeWidth:s,fill:"none"}),d(ht,{d:`M 0 0 L ${o} ${o/2}`,stroke:i,strokeWidth:s,fill:"none"})]}),d(ht,{d:`M ${l} 0 L ${l} ${u}`,stroke:i,strokeWidth:s,strokeDasharray:f,fill:"none","data-element-type":"shape"}),E(ne,{transform:`translate(${l}, 0)`,children:[d(ht,{d:`M 0 0 L ${-o/2} ${o}`,stroke:i,strokeWidth:s,fill:"none"}),d(ht,{d:`M 0 0 L ${o/2} ${o}`,stroke:i,strokeWidth:s,fill:"none"})]}),E(ne,{transform:`translate(${l}, ${u})`,children:[d(ht,{d:`M 0 0 L ${-o/2} ${-o}`,stroke:i,strokeWidth:s,fill:"none"}),d(ht,{d:`M 0 0 L ${o/2} ${-o}`,stroke:i,strokeWidth:s,fill:"none"})]})]}function SL(t,e,n){const r=t/2,i=e/2;return[{x:r-n.width/2,y:i-n.height/2},{x:t+r-n.width/2,y:i-n.height/2},{x:r-n.width/2,y:e+i-n.height/2},{x:t+r-n.width/2,y:e+i-n.height/2}]}Tt("quadrant",{component:J2,composites:["title","item"]});const ty=t=>{const{Title:e,Item:n,data:r,radius:i=150,startMode:o="top"}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=Q(d(q,{indexes:[0]})),u=Q(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],p=[];if(l.length===0)return f.push(d(q,{indexes:[0],x:-h.width/2,y:-h.height/2})),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,d(Y,{children:d(Ot,{children:f})})]});const g=Math.max(u.width,u.height),y=Math.max(i,g),m=y+g/2,b=l.map(()=>{const $=u.width,P=u.height;return($+P)/2}),v=b.reduce(($,P)=>$+P,0);let x;o==="equal"?x=-Math.PI/2:x=-Math.PI/2+2*Math.PI/l.length/2;let w=x;l.forEach(($,P)=>{const O=b[P]/v*2*Math.PI,T=w+O/2;w+=O;const I=m+y*Math.cos(T)-u.width/2,S=m+y*Math.sin(T)-u.height/2;p.push(d(n,{indexes:[P],datum:$,data:r,x:I,y:S}));const H=y-Math.max(u.width,u.height)/2-20,C=m+H*Math.cos(T)-h.width/2,A=m+H*Math.sin(T)-h.height/2;f.push(d(Ft,{indexes:[P],x:C,y:A}))});const _=y-Math.max(u.width,u.height)/2-20;if(l.length>0)for(let $=0;$<l.length;$++){const P=$*2*Math.PI/l.length-Math.PI/2,O=($+1)%l.length*2*Math.PI/l.length-Math.PI/2;let T;if($===l.length-1){const H=O+2*Math.PI-P;T=P+H/2}else T=(P+O)/2;const I=m+_*Math.cos(T)-h.width/2,S=m+_*Math.sin(T)-h.height/2;f.push(d(q,{indexes:[$+1],x:I,y:S}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,E(Y,{children:[d(It,{children:p}),d(Ot,{children:f})]})]})};Tt("relation-circle",{component:ty,composites:["title","item"]});const ey=t=>{const{Title:e,Item:n,data:r,spacing:i=120,showConnections:o=!0,options:s}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null;if(c.length===0)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,d(Y,{children:d(It,{})})]});const u=Q(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"}));function f(){const P=c.map((I,S)=>({id:S,data:I,isCenter:S===0,_originalIndex:[S]})),O=c.slice(1).map((I,S)=>({source:0,target:S+1})),T=TT(P).force("link",$T(O).id(I=>I.id).distance(i)).force("charge",AT().strength(-50)).force("center",nT(0,0)).force("collision",wT().radius(Math.max(u.width,u.height)/2+10));for(let I=0;I<300;++I)T.tick();return{nodes:P,links:O}}const{nodes:p,links:g}=f(),y=Math.min(...p.map(P=>{var O;return(O=P.x)!=null?O:0})),m=Math.min(...p.map(P=>{var O;return(O=P.y)!=null?O:0})),b=Math.max(0,-y+u.width/2),v=Math.max(0,-m+u.height/2),x=(P,O)=>({positionH:P<-50?"flipped":P>50?"normal":"center",positionV:O<-50?"flipped":O>50?"normal":"middle"}),w=p.map(P=>{if(P.x==null||P.y==null)return null;const O=P.x+b-u.width/2,T=P.y+v-u.height/2,{positionH:I,positionV:S}=x(P.x,P.y);return d(n,{indexes:P._originalIndex,datum:P.data,data:r,x:O,y:T,positionH:I,positionV:S},P.id)}).filter(Boolean),_=new Map(p.map(P=>[P.id,P])),$=o?g.map(P=>{const O=typeof P.source=="object"?P.source:_.get(P.source),T=typeof P.target=="object"?P.target:_.get(P.target);if(!O||!T||O.x==null||O.y==null||T.x==null||T.y==null)return null;const I=`M ${O.x+b} ${O.y+v} L ${T.x+b} ${T.y+v}`;return d(ht,{d:I,stroke:re(s),strokeWidth:2,strokeOpacity:.6})}).filter(Boolean):[];return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,E(Y,{children:[d(Y,{children:$}),d(It,{children:w})]})]})};Tt("relation-network",{component:ey,composites:["title","item"]});var EL=Object.defineProperty,IL=Object.defineProperties,TL=Object.getOwnPropertyDescriptors,Fs=Object.getOwnPropertySymbols,ny=Object.prototype.hasOwnProperty,ry=Object.prototype.propertyIsEnumerable,iy=(t,e,n)=>e in t?EL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AL=(t,e)=>{for(var n in e||(e={}))ny.call(e,n)&&iy(t,n,e[n]);if(Fs)for(var n of Fs(e))ry.call(e,n)&&iy(t,n,e[n]);return t},kL=(t,e)=>IL(t,TL(e)),zL=(t,e)=>{var n={};for(var r in t)ny.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Fs)for(var r of Fs(t))e.indexOf(r)<0&&ry.call(t,r)&&(n[r]=t[r]);return n};const ch=t=>{var e=t,{width:n=25,height:r=25,colorPrimary:i="#6699FF",rotation:o=0}=e,s=zL(e,["width","height","colorPrimary","rotation"]);const a=`gradient-arrow-stroke-${i.replace("#","")}`,l=`gradient-arrow-fill-${i.replace("#","")}`,c=Math.round(n*.515),h=Math.round(r*.275),u=Math.round(r*.875),f=[{x:0,y:h},{x:c,y:h},{x:c,y:r*.075},{x:n,y:r*.575},{x:c,y:r*1.075},{x:c,y:u},{x:0,y:u}],p=n/2,g=r/2,y=`rotate(${o} ${p} ${g})`;return E(Rt,{children:[d(Ne,kL(AL({},s),{width:n,height:r,points:f,fill:`url(#${l})`,stroke:`url(#${a})`,transform:y,"data-element-type":"shape"})),E(zt,{children:[E("linearGradient",{id:l,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:[d("stop",{offset:"0%","stop-color":i,"stop-opacity":"0.36"}),d("stop",{offset:"100%","stop-color":i,"stop-opacity":"0"})]}),E("linearGradient",{id:a,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:[d("stop",{offset:"0%","stop-color":i}),d("stop",{offset:"58%","stop-color":i,"stop-opacity":"0"})]})]})]})},LL=({text:t,x:e=0,y:n=0,fontSize:r=56,fontWeight:i="bold",fill:o="#FFFFFF",textAnchor:s="middle",dominantBaseline:a="middle",shadowOffsetX:l=2,shadowOffsetY:c=4,midShadowOffsetX:h=1,midShadowOffsetY:u=2,deepShadowOpacity:f=.3,midShadowOpacity:p=.5})=>E(Y,{children:[d("text",{x:e,y:n,fontSize:r,fontWeight:i,fill:o,fillOpacity:f,textAnchor:s,dominantBaseline:a,transform:`translate(${l}, ${c})`,children:t}),d("text",{x:e,y:n,fontSize:r,fontWeight:i,fill:o,fillOpacity:p,textAnchor:s,dominantBaseline:a,transform:`translate(${h}, ${u})`,children:t}),d("text",{x:e,y:n,fontSize:r,fontWeight:i,fill:o,textAnchor:s,dominantBaseline:a,children:t})]});var RL=Object.defineProperty,HL=Object.defineProperties,DL=Object.getOwnPropertyDescriptors,Bs=Object.getOwnPropertySymbols,oy=Object.prototype.hasOwnProperty,sy=Object.prototype.propertyIsEnumerable,ay=(t,e,n)=>e in t?RL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,NL=(t,e)=>{for(var n in e||(e={}))oy.call(e,n)&&ay(t,n,e[n]);if(Bs)for(var n of Bs(e))sy.call(e,n)&&ay(t,n,e[n]);return t},jL=(t,e)=>HL(t,DL(e)),FL=(t,e)=>{var n={};for(var r in t)oy.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Bs)for(var r of Bs(t))e.indexOf(r)<0&&sy.call(t,r)&&(n[r]=t[r]);return n};const BL=t=>{var e=t,{width:n=25,height:r=25,colorPrimary:i="#6699FF",rotation:o=0,strokeWidth:s=4}=e,a=FL(e,["width","height","colorPrimary","rotation","strokeWidth"]);const l=[{x:n/2,y:0},{x:n,y:r},{x:0,y:r}],c=n/2,h=r/2,u=`rotate(${o} ${c} ${h})`;return d(Ne,jL(NL({},a),{width:n,height:r,points:l,fill:i,stroke:i,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round",transform:u}))},WL=-118,ly=118,cy=240,VL=180,YL=40,XL="M238.9 69.7a6 6 0 0 1-.1 1v.2l-.2.3v.3l-.1.3a6.2 6.2 0 0 1-.3.6l-.1.3-.2.3-.2.4-.3.5-.1.1a10.9 10.9 0 0 1-.8 1v.1l-.5.5h-.1l-.4.4-.3.3-.3.2-.3.3-.4.2a13 13 0 0 1-.7.5l-.4.3-.5.3-97.5 56.7-.7.4h-.2l-.6.4h-.1l-.8.4h-.2l-.6.4h-.2l-.8.3h-.2l-.5.3-.5.1-.5.1-.5.2h-.5a33.7 33.7 0 0 1-3.2.7h-.2l-1 .2h-1.6l-.7.1h-4.7l-.8-.1h-.2a38.2 38.2 0 0 1-2-.4h-.4l-.7-.2h-.4l-.7-.2-.4-.1a27.3 27.3 0 0 1-2.2-.7h-.2a44.2 44.2 0 0 1-.9-.3l-.5-.3-.4-.1-.5-.2-.3-.2-.5-.2-.3-.2-.8-.4L6.5 78C2.2 75.6 0 72.4 0 69v41.7c0 3.2 2.1 6.5 6.4 9l98.1 56.6a23.2 23.2 0 0 0 1 .6l.6.3.3.1.5.2.4.2.3.1h.2l.2.2a21.4 21.4 0 0 0 1.9.6l.3.1h.2l.7.2a77.6 77.6 0 0 1 1.1.3h.3l.7.2h.4a42.5 42.5 0 0 0 1 .2l1 .2h1.1l.4.1h2.1l.7.1h1.5a22 22 0 0 0 1.8-.2h.4l1.1-.1h.2l1.2-.2h.1l.3-.1.6-.1a12.5 12.5 0 0 0 1-.3h.5l.5-.2a29 29 0 0 0 1-.3h.2l.3-.2h.2a27 27 0 0 0 1.6-.7h.2l.8-.4a19.4 19.4 0 0 0 1.6-.9l97.5-56.7.3-.1.2-.2.4-.2.4-.3.3-.2.3-.3.4-.2.3-.3.3-.3h.1l.3-.3.5-.6h.1l.3-.5h.1v-.1l.4-.4v-.1l.4-.5v-.1l.1-.2.1-.2.2-.3.1-.3.1-.3.1-.1a6.9 6.9 0 0 0 .2-.8l.1-.3v-.4l.1-.3v-1l.2-41.4v.4Z",GL="M232.5 60.4c8.5 4.9 8.5 12.8.1 17.7l-97.5 56.7c-8.4 4.9-22 4.9-30.5 0L6.5 78C-2 73-2 65.3 6.4 60.4l97.5-56.7c8.4-5 22-5 30.5 0l98.1 56.7Z",qL="M119.1 0A31 31 0 0 0 104 3.7L6.4 60.4C-2 65.3-2 73.2 6.4 78l98.2 56.7c4.2 2.4 9.8 3.7 15.3 3.7a31 31 0 0 0 15.2-3.7L232.6 78c8.4-5 8.4-12.8 0-17.7L134.3 3.7A31.2 31.2 0 0 0 119.1 0Zm0 2.5c5.4 0 10.3 1.2 14 3.3l98.2 56.7c3.3 2 5.1 4.3 5.1 6.8 0 2.4-1.8 4.7-5 6.6l-97.5 56.7a28.3 28.3 0 0 1-14 3.4c-5.3 0-10.3-1.2-14-3.4L7.7 76c-3.3-1.9-5-4.3-5-6.7 0-2.4 1.7-4.8 5-6.7L105 5.8a29 29 0 0 1 14-3.3Z",hy=E("filter",{id:"sequence-ascending-stairs-3d-shadow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[d("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),d("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),d("feOffset",{dx:"0",dy:"4"}),d("feGaussianBlur",{stdDeviation:"6"}),d("feComposite",{in2:"hardAlpha",operator:"out"}),d("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),d("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),d("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})]}),dy=t=>{const{Title:e,Item:n,data:r,options:i,cubeWidth:o=cy}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null;if(l.length===0)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d(zt,{children:hy}),c,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:0,y:0})})})]});const h=Q(d(q,{indexes:[0]})),u=[],f=[],p=[],g=o/cy,y=VL*g;return l.forEach((m,b)=>{const v=[b],x=Ct(i,v),w=b*(o+WL),_=(l.length-1-b)*ly,$=`cube-gradient-bottom-${b}`,P=`cube-gradient-top-${b}`,O=`cube-gradient-stroke-${b}`;p.push(E(Y,{x:w,y:_,id:`cube-${b}`,width:o,height:y,filter:"url(#sequence-ascending-stairs-3d-shadow-filter)",children:[E(zt,{children:[E("linearGradient",{id:$,x1:"0",y1:"124.5",x2:"238.9",y2:"124.5",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:x,stopOpacity:"0.8"}),d("stop",{offset:"1",stopColor:x,stopOpacity:"0.4"})]}),E("linearGradient",{id:P,x1:"119.5",y1:"0",x2:"119.5",y2:"138.5",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:x,stopOpacity:"0.9"}),d("stop",{offset:"1",stopColor:x,stopOpacity:"0.5"})]}),E("linearGradient",{id:O,x1:"119.5",y1:"0",x2:"119.5",y2:"138.5",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:x}),d("stop",{offset:"1",stopColor:x,stopOpacity:"0.7"})]})]}),E(ne,{transform:`scale(${g})`,children:[d(ht,{d:XL,fill:`url(#${$})`}),d(ht,{d:GL,fill:`url(#${P})`}),d(ht,{d:qL,fill:`url(#${O})`})]}),d(LL,{text:b+1,x:115,y:65,fontSize:56})]}));const T=w+o+YL,I=_+y/2;if(f.push(d(n,{indexes:v,datum:m,data:r,x:T,y:I,positionH:"normal"})),u.push(d(Ft,{indexes:v,x:w+o-h.width/2,y:_-h.height/2})),b===0&&u.push(d(q,{indexes:[0],x:w-30-h.width/2,y:_+y/2-h.height/2})),b<l.length-1){const S=(l.length-1-(b+1))*ly,H=w+o-h.width/2,C=(_+y/2+S+y/2)/2-h.height/2;u.push(d(q,{indexes:[b+1],x:H,y:C}))}else u.push(d(q,{indexes:[l.length],x:w+o+30-h.width/2,y:_+y/2-h.height/2}))}),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[d(zt,{children:hy}),c,E(Y,{x:0,y:0,children:[d(Y,{children:p}),d(It,{children:f}),d(Ot,{children:u})]})]})};Tt("sequence-ascending-stairs-3d",{component:dy,composites:["title","item"]});const uy=t=>{const{Title:e,Item:n,data:r,hGap:i=0,vGap:o=0}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=Q(d(n,{indexes:[0],data:r,datum:l[0]})),u=[],f=[],p=l.length,g=h.width+i,y=h.height/2+o,m=h.width/2,v=0+(p-1)*y;return l.forEach((x,w)=>{const _=m+w*g,$=v-w*y,P=[w];u.push(d(n,{indexes:P,datum:x,data:r,x:_,y:$})),f.push(d(Ft,{indexes:P,x:_+h.width-30,y:$+h.height/2+10})),f.push(d(q,{indexes:P,x:_+h.width+i/2,y:$-30}))}),E(lt,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,E(Y,{children:[d(It,{children:u}),d(Ot,{children:f})]})]})};Tt("sequence-ascending-steps",{component:uy,composites:["title","item"]});const UL=20,fy=5,py=t=>{const{Title:e,Item:n,data:r,options:i,radius:o=150,arrowSize:s=4,strokeWidth:a=10}=t,{title:l,desc:c,items:h=[]}=r,u=Q(d(q,{indexes:[0]})),f=re(i);if(!n)return E(lt,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[e?d(e,{title:l,desc:c}):null,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:0,y:0})})})]});const p=h.length;if(p===0)return E(lt,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[e?d(e,{title:l,desc:c}):null,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:0,y:0})})})]});const g=Q(d(n,{indexes:[0],data:r,datum:h[0]})),y=0,m=0,b=2*Math.PI/p,v=[];let x=1/0,w=1/0,_=-1/0,$=-1/0;for(let k=0;k<p;k++){const D=k*b-Math.PI/2,z=y+o*Math.cos(D),N=m+o*Math.sin(D);v.push({x:z,y:N}),x=Math.min(x,z),w=Math.min(w,N),_=Math.max(_,z),$=Math.max($,N)}const P=[];for(let k=0;k<p;k++){const D=v[k],z=v[(k+1)%p],N=Math.sqrt(Math.pow(z.x-D.x,2)+Math.pow(z.y-D.y,2)),j=Math.min(N*.5,100),X=(D.x+z.x)/2,L=(D.y+z.y)/2;x=Math.min(x,X-j/2),w=Math.min(w,L-j/2),_=Math.max(_,X+j/2),$=Math.max($,L+j/2);const M=Math.atan2(L-m,X-y),R=M<0?M+2*Math.PI:M;let W,U;const V=R*180/Math.PI,G=j/2+UL,Z=X+Math.cos(M)*G,K=L+Math.sin(M)*G;V>=337.5||V<22.5?(W=Z,U=K-g.height/2):V>=22.5&&V<67.5?(W=Z,U=K):V>=67.5&&V<112.5?(W=Z-g.width/2,U=K):V>=112.5&&V<157.5?(W=Z-g.width,U=K):V>=157.5&&V<202.5?(W=Z-g.width,U=K-g.height/2):V>=202.5&&V<247.5?(W=Z-g.width,U=K-g.height):V>=247.5&&V<292.5?(W=Z-g.width/2,U=K-g.height):(W=Z,U=K-g.height),P.push({lineLength:N,circleBigW:j,midX:X,midY:L,itemX:W,itemY:U}),x=Math.min(x,W),w=Math.min(w,U),_=Math.max(_,W+g.width+u.width+5),$=Math.max($,U+g.height)}const O=Math.max(0,-x),T=Math.max(0,-w),I=e?d(e,{title:l,desc:c}):null,S=[],H=[],C=[],A=[],B=v.map(k=>({x:k.x+O,y:k.y+T}));for(let k=0;k<p;k++){const D=B[k],z=B[(k+1)%p],N=(k+1)%p,j=[k],{lineLength:X,circleBigW:L,midX:M,midY:R}=P[k],W=Math.max(L-20,20),U=Math.max(W*.4,16),V=Ct(i,j)||f,G=z.x-D.x,Z=z.y-D.y,K=X,nt=G/K,at=Z/K,pt=fy*2+s,ft=Math.min(fy,(K-pt)/2),rt=Math.max(0,D.x+nt*ft),tt=Math.max(0,D.y+at*ft),et=Math.max(0,z.x-nt*ft),st=Math.max(0,z.y-at*ft),gt=HA().x(he=>Math.max(0,he.x)).y(he=>Math.max(0,he.y)).curve($m)([{x:rt,y:tt},{x:et,y:st}])||"",ct=`fork-arrow-${V.replace(/[^a-zA-Z0-9]/g,"")}-${k}`,ut=`
103
+ `.trim()}return I(V,{id:"infographic-container",children:[d(V,{children:y}),b?d(zt,{id:"shape-center-circle",x:m-P,y:x-P,width:P*2,height:P*2,fill:u.colorPrimaryBg,fillOpacity:.5,"data-element-type":"shape"}):d(ht,{id:"shape-center-sector",d:R,fill:u.colorPrimaryBg,fillOpacity:.5,width:r*2+200,height:r*2+200,"data-element-type":"shape"}),d(Tt,{x:C-E/2,y:T-S/2,width:E,height:S,alignHorizontal:"center",alignVertical:"middle",fontSize:24,fontWeight:"bold",fill:u.colorText,"data-element-type":kt.Title,children:c}),d(Ct,{children:g}),d($t,{children:p})]})};It("list-sector",{component:ey,composites:["title","item"]});const ny=t=>{const{Title:e,Item:n,data:r,columns:i=4,gap:o=20,stepOffset:s=40}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=Q(d(q,{indexes:[0]})),f=Q(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),p=[],g=[],y=f.width+o;return c.forEach((m,x)=>{const v=x%i,b=Math.floor(x/i),w=v*y,_=b*(f.height+o),$=v*s,P=_+$,C=[x];g.push(d(n,{indexes:C,datum:m,data:r,x:w,y:P,positionH:"center"})),p.push(d(Dt,{indexes:C,x:w+(f.width-u.width)/2,y:P+f.height+5}))}),c.forEach((m,x)=>{const v=x%i,b=Math.floor(x/i),w=v*y,_=b*(f.height+o),$=v*s,P=_+$;if(x===0&&p.push(d(q,{indexes:[0],x:w-o/2-u.width/2,y:P+(f.height-u.height)/2})),v<i-1&&x<c.length-1){const C=Math.floor((x+1)/i);b===C&&p.push(d(q,{indexes:[x+1],x:w+f.width+(o-u.width)/2,y:P+(f.height-u.height)/2}))}(v===i-1||x===c.length-1)&&p.push(d(q,{indexes:[x+1],x:w+f.width+(o-u.width)/2,y:P+(f.height-u.height)/2}))}),c.length===0&&p.push(d(q,{indexes:[0],x:(i-1)*y/2+(f.width-u.width)/2,y:0})),I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,I(V,{children:[d(Ct,{children:g}),d($t,{children:p})]})]})};It("list-waterfall",{component:ny,composites:["title","item"]});const jz=6,hh=700,ry=330,iy=333,Fz={1:[{x:.5,y:.6,anchor:"top-right"}],2:[{x:.42,y:.5,anchor:"top-right"},{x:.72,y:.4,anchor:"bottom"}],3:[{x:.3,y:.5,anchor:"top-right"},{x:.48,y:.3,anchor:"bottom-left"},{x:.8,y:.75,anchor:"top-right"}],4:[{x:.3,y:.5,anchor:"top-right"},{x:.35,y:.2,anchor:"bottom-left"},{x:.65,y:.73,anchor:"top-right"},{x:.8,y:.52,anchor:"bottom-left"}],5:[{x:.19,y:.4,anchor:"top-right"},{x:.38,y:.2,anchor:"bottom"},{x:.52,y:.62,anchor:"top-right"},{x:.7,y:.43,anchor:"bottom"},{x:.82,y:.8,anchor:"top-right"}],6:[{x:.16,y:.35,anchor:"top-right"},{x:.38,y:.2,anchor:"bottom"},{x:.48,y:.54,anchor:"top-right"},{x:.55,y:.43,anchor:"bottom-left"},{x:.8,y:.75,anchor:"top-right"},{x:.86,y:.65,anchor:"bottom-left"}]},Bz={1:[{x:.5,y:.4,anchor:"bottom-right"}],2:[{x:.42,y:.5,anchor:"bottom-right"},{x:.72,y:.6,anchor:"top"}],3:[{x:.3,y:.5,anchor:"bottom-right"},{x:.48,y:.7,anchor:"top-left"},{x:.8,y:.25,anchor:"bottom-right"}],4:[{x:.3,y:.5,anchor:"bottom-right"},{x:.35,y:.8,anchor:"top-left"},{x:.65,y:.27,anchor:"bottom-right"},{x:.8,y:.48,anchor:"top-left"}],5:[{x:.19,y:.6,anchor:"bottom-right"},{x:.38,y:.8,anchor:"top"},{x:.52,y:.38,anchor:"bottom-right"},{x:.7,y:.57,anchor:"top"},{x:.82,y:.2,anchor:"bottom-right"}],6:[{x:.16,y:.65,anchor:"bottom-right"},{x:.38,y:.8,anchor:"top"},{x:.48,y:.46,anchor:"bottom-right"},{x:.55,y:.57,anchor:"top-left"},{x:.8,y:.25,anchor:"bottom-right"},{x:.86,y:.35,anchor:"top-left"}]},oy=(t,e,n)=>{const r=e[t];return r?r.map(i=>({x:i.x*hh,y:i.y*n,anchor:i.anchor})):null},Wz=(t,e)=>{const n=t.anchor||"center";let r=t.x-e.width/2,i=t.y-e.height/2,o=t.y;switch(n){case"top":r=t.x-e.width/2,i=t.y,o=t.y+e.height/2;break;case"bottom":r=t.x-e.width/2,i=t.y-e.height,o=t.y-e.height/2;break;case"top-left":r=t.x,i=t.y,o=t.y+e.height/2;break;case"top-right":r=t.x-e.width,i=t.y,o=t.y+e.height/2;break;case"bottom-left":r=t.x,i=t.y-e.height,o=t.y-e.height/2;break;case"bottom-right":r=t.x-e.width,i=t.y-e.height,o=t.y-e.height/2;break}return{x:r,y:i,centerY:o}},dh=(t,e)=>{const n=e.x-t.x,r=e.y-t.y,i=Math.hypot(n,r)||1;return{x:n/i,y:r/i}},sy=t=>{const{presetRatios:e,arrowHeight:n,Arrow:r}=t;return o=>{var s;const{Title:a,Item:l,data:c,options:h,itemGap:u=24}=o,{title:f,desc:p,items:g=[]}=c,y=Math.min(g.length,jz),m=g.slice(0,y),x=a?d(a,{title:f,desc:p}):null,v=re(h),w=ye({colorPrimary:v},h).colorTextSecondary||"#737373",_=Q(d(q,{indexes:[0]}));if(g.length===0){const L=(s=oy(1,e,n))==null?void 0:s[0];if(!L)return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,d(V,{children:d(r,{colorPrimary:v,colorShadow:w})})]});const D=L.x-_.width/2,k=L.y-_.height/2;return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,I(V,{children:[d(r,{colorPrimary:v,colorShadow:w}),d(Ct,{}),d($t,{children:d(q,{indexes:[0],x:D,y:k})})]})]})}const $=Q(d(l,{indexes:[0],data:c,datum:g[0],positionH:"center"})),P=[],C=[],T=oy(y,e,n);if(!T)return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,I(V,{children:[d(r,{colorPrimary:v,colorShadow:w}),d(Ct,{})]})]});const E=T,S=E.length>1?dh(E[0],E[E.length-1]):{x:1,y:0},R=E.length>1?dh(E[0],E[1]):S,O=E.length>1?dh(E[E.length-2],E[E.length-1]):S,A=Math.max($.width,$.height)*.45+u,B=L=>{const{x:D,y:k,centerY:N}=Wz(L,$);return{x:D,y:k,centerY:N}};if(E.forEach((L,D)=>{const k=B(L),N=k.centerY<n/2,j=[D],X=m[D];if(!X)return;C.push(d(l,{indexes:j,datum:X,data:c,x:k.x,y:k.y,positionH:"center"}));const z=k.x+$.width-_.width/2,M=N?k.y-_.height/2:k.y+$.height-_.height/2;P.push(d(Dt,{indexes:j,x:z,y:M}))}),E.length>0){const L=E[0],D=L.x-R.x*A-_.width/2,k=L.y-R.y*A-_.height/2;P.push(d(q,{indexes:[0],x:D,y:k}));for(let z=0;z<E.length-1;z++){const M=E[z],H=E[z+1],W=(M.x+H.x)/2,U=(M.y+H.y)/2,Y=W-_.width/2,G=U-_.height/2;P.push(d(q,{indexes:[z+1],x:Y,y:G}))}const N=E[E.length-1],j=N.x+O.x*A-_.width/2,X=N.y+O.y*A-_.height/2;P.push(d(q,{indexes:[y],x:j,y:X}))}return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,I(V,{children:[d(r,{colorPrimary:v,colorShadow:w}),d(Ct,{children:C}),d($t,{children:P})]})]})}},Vz=({colorPrimary:t="#17CA2C",colorShadow:e="#737373"})=>{const n=rt(t).darken(20).toHexString();return I(V,{width:hh,height:ry,children:[d("path",{d:"M228.864 159.446C230.266 159.446 231.623 158.768 232.689 157.535L274.263 110.162L265.717 102.923L227.311 148.082C225.977 149.623 224.281 150.47 222.529 150.47H175.404L182.03 158.367C182.795 159.445 182.795 159.446 183.734 159.446H228.864Z",fill:e}),d("path",{d:"M462.869 234.92C464.271 234.92 465.628 234.242 466.695 233.01L508.268 185.636L499.722 178.397L461.316 223.557C459.983 225.098 458.287 225.945 456.534 225.945H409.409L416.035 233.841C416.8 234.92 416.8 234.92 417.74 234.92H462.869Z",fill:e}),d("path",{d:"M697.005 330C698.783 330 700 328.82 700 327.001V256.638C700 254.857 697.848 253.965 696.591 255.225L693.409 258.411V320.402C693.409 322.058 692.069 323.401 690.414 323.401H630.718L627.536 326.587C626.278 327.847 627.169 330 628.947 330H697.005Z",fill:e}),d("path",{d:"M689.642 321.89C690.744 321.89 691.638 320.995 691.638 319.891V250.743C691.638 248.962 689.488 248.07 688.23 249.329L662.647 274.947L520.987 153.863C519.541 152.627 517.703 151.948 515.802 151.948H469.518C470.236 151.949 470.956 152.206 471.53 152.729L498.163 176.978L498.13 177.018L639.84 297.784L619.174 318.477C617.916 319.737 618.807 321.89 620.586 321.89H689.642Z",fill:t}),d("path",{d:"M429.279 198.995L467.208 153.03C468.3 151.716 470.268 151.579 471.531 152.729L498.163 176.978L460.69 221.107C459.173 222.894 456.946 223.924 454.6 223.924H408.473C409.366 223.924 410.252 223.527 410.845 222.764L429.279 198.995Z",fill:n}),d("path",{d:"M408.473 223.924H408.314L408.318 223.92C408.369 223.922 408.421 223.924 408.473 223.924Z",fill:n}),d("path",{d:"M406.524 223.203C407.826 224.318 409.796 224.116 410.845 222.761L429.279 198.932L287.411 77.8866C285.964 76.6523 284.125 75.9742 282.223 75.9742H234.606L234.625 75.9907C235.429 75.9118 236.263 76.1557 236.915 76.7378L263.662 100.621L263.546 100.758L406.524 223.203Z",fill:t}),d("path",{d:"M236.914 76.7386C235.651 75.6097 233.707 75.7513 232.621 77.0513L194.557 123.104L175.644 146.821C175.076 147.535 174.25 147.917 173.409 147.947L173.407 147.95H219.923C222.271 147.95 224.499 146.915 226.017 145.122L263.645 100.649L236.914 76.7386Z",fill:n}),d("path",{d:"M175.648 146.816C174.589 148.145 172.637 148.329 171.348 147.221L4.09334 3.51697C2.68586 2.30767 3.54106 0 5.39671 0H47.5805C49.4864 0 51.3297 0.680433 52.7785 1.91877L194.557 123.104L175.648 146.816Z",fill:t})]})},Yz=({colorPrimary:t="#17CA2C",colorShadow:e="#737373"})=>{const n=rt(t).darken(20).toHexString();return I(V,{width:hh,height:iy,children:[d("path",{d:"M19.0526 324L12.6762 329.482C11.2703 330.691 12.1234 333 13.976 333H56.1578C58.058 333 59.896 332.321 61.3413 331.085L201.854 210.901L194.249 201.693L54.0527 321.606C52.246 323.151 49.9486 324 47.5732 324H19.0526Z",fill:e}),d("path",{d:"M234.587 248L241.131 255.922C241.656 256.552 242.382 256.909 243.134 256.983L243.115 257H290.716C292.618 257 294.457 256.322 295.903 255.087L437.091 134.536L429.305 125.5L288.613 245.609C286.805 247.153 284.507 248 282.132 248H234.587Z",fill:e}),d("path",{d:"M461.123 162.429L475.642 179.918C476.237 180.635 477.092 181.001 477.951 181H524.22C526.121 181 527.959 180.321 529.404 179.085L670.786 58.1578L662.326 49.6809L522.115 169.606C520.309 171.151 518.011 172 515.636 172H469.369L461.123 162.429Z",fill:e}),d("path",{d:"M687.912 74.8875C690.374 75.9052 693.412 74.1668 693.412 71.1716V11H698.004C699.106 11 700 11.8954 700 13V82.1716C700 83.9534 697.85 84.8457 696.593 83.5858L687.912 74.8875Z",fill:e}),d("path",{d:"M689.419 0C690.522 0 691.415 0.895432 691.415 2V71.1716C691.415 72.9534 689.265 73.8457 688.008 72.5858L662.433 46.9598L520.819 168.085C519.374 169.321 517.536 170 515.636 170H469.367C470.084 169.999 470.804 169.742 471.379 169.219L498.003 144.961L497.969 144.922L639.634 24.115L618.975 3.41421C617.717 2.15428 618.608 0 620.386 0H689.419Z",fill:t}),d("path",{d:"M429.141 122.937L467.058 168.918C468.149 170.232 470.116 170.369 471.378 169.219L498.003 144.961L460.542 100.818C459.025 99.0305 456.798 98 454.453 98H408.341C409.234 98.0001 410.12 98.3968 410.712 99.1606L429.141 122.937Z",fill:n}),d("path",{d:"M408.341 98H408.183L408.186 98.004C408.237 98.0013 408.289 98 408.341 98Z",fill:n}),d("path",{d:"M406.393 98.721C407.695 97.606 409.664 97.8077 410.712 99.1633L429.141 123L287.318 244.087C285.872 245.322 284.033 246 282.132 246H234.53L234.55 245.983C235.353 246.062 236.187 245.818 236.839 245.236L263.577 221.345L263.461 221.208L406.393 98.721Z",fill:t}),d("path",{d:"M236.837 245.235C235.575 246.365 233.631 246.223 232.546 244.922L194.494 198.854L175.588 175.129C175.019 174.415 174.194 174.032 173.353 174.002L173.351 174H219.852C222.199 174 224.427 175.035 225.944 176.829L263.56 221.317L236.837 245.235Z",fill:n}),d("path",{d:"M175.593 175.135C174.533 173.805 172.581 173.622 171.291 174.73L4.09013 318.484C2.68329 319.693 3.53868 322 5.394 322H47.5627C49.4695 322 51.3136 321.319 52.7627 320.08L194.494 198.854L175.593 175.135Z",fill:t})]})},ay=sy({arrowHeight:ry,presetRatios:Fz,Arrow:Vz}),ly=sy({arrowHeight:iy,presetRatios:Bz,Arrow:Yz});It("list-zigzag-down",{component:ay,composites:["title","item"]}),It("list-zigzag-up",{component:ly,composites:["title","item"]});const uh={axisColor:"#D9D9D9",axisArrowSize:5,strokeWidth:1,dashArray:"4,2",defaultExtraSpacing:20},cy=t=>{const{Title:e,Item:n,data:r,quadrantWidth:i,quadrantHeight:o,showAxis:s=!0,dashedAxis:a=!0}=t,{title:l,desc:c,items:h=[]}=r,u=e?d(e,{title:l,desc:c}):null,f=Array.from({length:4},(b,w)=>h[w]),p=f[0]?Q(d(n,{indexes:[0],data:r,datum:f[0]})):{width:0,height:0},g=i!=null?i:p.width+uh.defaultExtraSpacing,y=o!=null?o:p.height+uh.defaultExtraSpacing,m=Gz(g,y,p),x=f.map((b,w)=>{if(!b)return null;const _=m[w];return d(n,{indexes:[w],datum:b,data:r,x:_.x,y:_.y,positionH:w%2?"flipped":"normal",positionV:w<2?"normal":"flipped"})}).filter(Boolean),v=Xz(g,y,s,a);return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,I(V,{width:g*2,height:y*2,children:[v,d(Ct,{children:x})]})]})};function Xz(t,e,n,r){if(!n)return[];const{axisColor:i,axisArrowSize:o,strokeWidth:s,dashArray:a}=uh,l=t,c=e,h=t*2,u=e*2,f=r?a:void 0;return[d(ht,{d:`M 0 ${c} L ${h} ${c}`,stroke:i,strokeWidth:s,strokeDasharray:f,fill:"none","data-element-type":"shape"}),I(ne,{transform:`translate(${h}, ${c})`,children:[d(ht,{d:`M 0 0 L ${-o} ${-o/2}`,stroke:i,strokeWidth:s,fill:"none"}),d(ht,{d:`M 0 0 L ${-o} ${o/2}`,stroke:i,strokeWidth:s,fill:"none"})]}),I(ne,{transform:`translate(0, ${c})`,children:[d(ht,{d:`M 0 0 L ${o} ${-o/2}`,stroke:i,strokeWidth:s,fill:"none"}),d(ht,{d:`M 0 0 L ${o} ${o/2}`,stroke:i,strokeWidth:s,fill:"none"})]}),d(ht,{d:`M ${l} 0 L ${l} ${u}`,stroke:i,strokeWidth:s,strokeDasharray:f,fill:"none","data-element-type":"shape"}),I(ne,{transform:`translate(${l}, 0)`,children:[d(ht,{d:`M 0 0 L ${-o/2} ${o}`,stroke:i,strokeWidth:s,fill:"none"}),d(ht,{d:`M 0 0 L ${o/2} ${o}`,stroke:i,strokeWidth:s,fill:"none"})]}),I(ne,{transform:`translate(${l}, ${u})`,children:[d(ht,{d:`M 0 0 L ${-o/2} ${-o}`,stroke:i,strokeWidth:s,fill:"none"}),d(ht,{d:`M 0 0 L ${o/2} ${-o}`,stroke:i,strokeWidth:s,fill:"none"})]})]}function Gz(t,e,n){const r=t/2,i=e/2;return[{x:r-n.width/2,y:i-n.height/2},{x:t+r-n.width/2,y:i-n.height/2},{x:r-n.width/2,y:e+i-n.height/2},{x:t+r-n.width/2,y:e+i-n.height/2}]}It("quadrant",{component:cy,composites:["title","item"]});const hy=t=>{const{Title:e,Item:n,data:r,radius:i=150,startMode:o="top"}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=Q(d(q,{indexes:[0]})),u=Q(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],p=[];if(l.length===0)return f.push(d(q,{indexes:[0],x:-h.width/2,y:-h.height/2})),I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,d(V,{children:d($t,{children:f})})]});const g=Math.max(u.width,u.height),y=Math.max(i,g),m=y+g/2,x=l.map(()=>{const $=u.width,P=u.height;return($+P)/2}),v=x.reduce(($,P)=>$+P,0);let b;o==="equal"?b=-Math.PI/2:b=-Math.PI/2+2*Math.PI/l.length/2;let w=b;l.forEach(($,P)=>{const C=x[P]/v*2*Math.PI,T=w+C/2;w+=C;const E=m+y*Math.cos(T)-u.width/2,S=m+y*Math.sin(T)-u.height/2;p.push(d(n,{indexes:[P],datum:$,data:r,x:E,y:S}));const R=y-Math.max(u.width,u.height)/2-20,O=m+R*Math.cos(T)-h.width/2,A=m+R*Math.sin(T)-h.height/2;f.push(d(Dt,{indexes:[P],x:O,y:A}))});const _=y-Math.max(u.width,u.height)/2-20;if(l.length>0)for(let $=0;$<l.length;$++){const P=$*2*Math.PI/l.length-Math.PI/2,C=($+1)%l.length*2*Math.PI/l.length-Math.PI/2;let T;if($===l.length-1){const R=C+2*Math.PI-P;T=P+R/2}else T=(P+C)/2;const E=m+_*Math.cos(T)-h.width/2,S=m+_*Math.sin(T)-h.height/2;f.push(d(q,{indexes:[$+1],x:E,y:S}))}return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(V,{children:[d(Ct,{children:p}),d($t,{children:f})]})]})};It("relation-circle",{component:hy,composites:["title","item"]});const dy=t=>{const{Title:e,Item:n,data:r,spacing:i=120,showConnections:o=!0,options:s}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null;if(c.length===0)return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,d(V,{children:d(Ct,{})})]});const u=Q(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"}));function f(){const P=c.map((E,S)=>({id:S,data:E,isCenter:S===0,_originalIndex:[S]})),C=c.slice(1).map((E,S)=>({source:0,target:S+1})),T=VT(P).force("link",HT(C).id(E=>E.id).distance(i)).force("charge",YT().strength(-50)).force("center",gT(0,0)).force("collision",LT().radius(Math.max(u.width,u.height)/2+10));for(let E=0;E<300;++E)T.tick();return{nodes:P,links:C}}const{nodes:p,links:g}=f(),y=Math.min(...p.map(P=>{var C;return(C=P.x)!=null?C:0})),m=Math.min(...p.map(P=>{var C;return(C=P.y)!=null?C:0})),x=Math.max(0,-y+u.width/2),v=Math.max(0,-m+u.height/2),b=(P,C)=>({positionH:P<-50?"flipped":P>50?"normal":"center",positionV:C<-50?"flipped":C>50?"normal":"middle"}),w=p.map(P=>{if(P.x==null||P.y==null)return null;const C=P.x+x-u.width/2,T=P.y+v-u.height/2,{positionH:E,positionV:S}=b(P.x,P.y);return d(n,{indexes:P._originalIndex,datum:P.data,data:r,x:C,y:T,positionH:E,positionV:S},P.id)}).filter(Boolean),_=new Map(p.map(P=>[P.id,P])),$=o?g.map(P=>{const C=typeof P.source=="object"?P.source:_.get(P.source),T=typeof P.target=="object"?P.target:_.get(P.target);if(!C||!T||C.x==null||C.y==null||T.x==null||T.y==null)return null;const E=`M ${C.x+x} ${C.y+v} L ${T.x+x} ${T.y+v}`;return d(ht,{d:E,stroke:re(s),strokeWidth:2,strokeOpacity:.6})}).filter(Boolean):[];return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,I(V,{children:[d(V,{children:$}),d(Ct,{children:w})]})]})};It("relation-network",{component:dy,composites:["title","item"]});var qz=Object.defineProperty,Uz=Object.defineProperties,Zz=Object.getOwnPropertyDescriptors,Fs=Object.getOwnPropertySymbols,uy=Object.prototype.hasOwnProperty,fy=Object.prototype.propertyIsEnumerable,py=(t,e,n)=>e in t?qz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Kz=(t,e)=>{for(var n in e||(e={}))uy.call(e,n)&&py(t,n,e[n]);if(Fs)for(var n of Fs(e))fy.call(e,n)&&py(t,n,e[n]);return t},Qz=(t,e)=>Uz(t,Zz(e)),Jz=(t,e)=>{var n={};for(var r in t)uy.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Fs)for(var r of Fs(t))e.indexOf(r)<0&&fy.call(t,r)&&(n[r]=t[r]);return n};const fh=t=>{var e=t,{width:n=25,height:r=25,colorPrimary:i="#6699FF",rotation:o=0}=e,s=Jz(e,["width","height","colorPrimary","rotation"]);const a=`gradient-arrow-stroke-${i.replace("#","")}`,l=`gradient-arrow-fill-${i.replace("#","")}`,c=Math.round(n*.515),h=Math.round(r*.275),u=Math.round(r*.875),f=[{x:0,y:h},{x:c,y:h},{x:c,y:r*.075},{x:n,y:r*.575},{x:c,y:r*1.075},{x:c,y:u},{x:0,y:u}],p=n/2,g=r/2,y=`rotate(${o} ${p} ${g})`;return I(Ht,{children:[d(Ne,Qz(Kz({},s),{width:n,height:r,points:f,fill:`url(#${l})`,stroke:`url(#${a})`,transform:y,"data-element-type":"shape"})),I(Lt,{children:[I("linearGradient",{id:l,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:[d("stop",{offset:"0%","stop-color":i,"stop-opacity":"0.36"}),d("stop",{offset:"100%","stop-color":i,"stop-opacity":"0"})]}),I("linearGradient",{id:a,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:[d("stop",{offset:"0%","stop-color":i}),d("stop",{offset:"58%","stop-color":i,"stop-opacity":"0"})]})]})]})},tH=({text:t,x:e=0,y:n=0,fontSize:r=56,fontWeight:i="bold",fill:o="#FFFFFF",textAnchor:s="middle",dominantBaseline:a="middle",shadowOffsetX:l=2,shadowOffsetY:c=4,midShadowOffsetX:h=1,midShadowOffsetY:u=2,deepShadowOpacity:f=.3,midShadowOpacity:p=.5})=>I(V,{children:[d("text",{x:e,y:n,fontSize:r,fontWeight:i,fill:o,fillOpacity:f,textAnchor:s,dominantBaseline:a,transform:`translate(${l}, ${c})`,children:t}),d("text",{x:e,y:n,fontSize:r,fontWeight:i,fill:o,fillOpacity:p,textAnchor:s,dominantBaseline:a,transform:`translate(${h}, ${u})`,children:t}),d("text",{x:e,y:n,fontSize:r,fontWeight:i,fill:o,textAnchor:s,dominantBaseline:a,children:t})]});var eH=Object.defineProperty,nH=Object.defineProperties,rH=Object.getOwnPropertyDescriptors,Bs=Object.getOwnPropertySymbols,gy=Object.prototype.hasOwnProperty,my=Object.prototype.propertyIsEnumerable,yy=(t,e,n)=>e in t?eH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iH=(t,e)=>{for(var n in e||(e={}))gy.call(e,n)&&yy(t,n,e[n]);if(Bs)for(var n of Bs(e))my.call(e,n)&&yy(t,n,e[n]);return t},oH=(t,e)=>nH(t,rH(e)),sH=(t,e)=>{var n={};for(var r in t)gy.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Bs)for(var r of Bs(t))e.indexOf(r)<0&&my.call(t,r)&&(n[r]=t[r]);return n};const aH=t=>{var e=t,{width:n=25,height:r=25,colorPrimary:i="#6699FF",rotation:o=0,strokeWidth:s=4}=e,a=sH(e,["width","height","colorPrimary","rotation","strokeWidth"]);const l=[{x:n/2,y:0},{x:n,y:r},{x:0,y:r}],c=n/2,h=r/2,u=`rotate(${o} ${c} ${h})`;return d(Ne,oH(iH({},a),{width:n,height:r,points:l,fill:i,stroke:i,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round",transform:u}))},lH=-118,vy=118,xy=240,cH=180,hH=40,dH="M238.9 69.7a6 6 0 0 1-.1 1v.2l-.2.3v.3l-.1.3a6.2 6.2 0 0 1-.3.6l-.1.3-.2.3-.2.4-.3.5-.1.1a10.9 10.9 0 0 1-.8 1v.1l-.5.5h-.1l-.4.4-.3.3-.3.2-.3.3-.4.2a13 13 0 0 1-.7.5l-.4.3-.5.3-97.5 56.7-.7.4h-.2l-.6.4h-.1l-.8.4h-.2l-.6.4h-.2l-.8.3h-.2l-.5.3-.5.1-.5.1-.5.2h-.5a33.7 33.7 0 0 1-3.2.7h-.2l-1 .2h-1.6l-.7.1h-4.7l-.8-.1h-.2a38.2 38.2 0 0 1-2-.4h-.4l-.7-.2h-.4l-.7-.2-.4-.1a27.3 27.3 0 0 1-2.2-.7h-.2a44.2 44.2 0 0 1-.9-.3l-.5-.3-.4-.1-.5-.2-.3-.2-.5-.2-.3-.2-.8-.4L6.5 78C2.2 75.6 0 72.4 0 69v41.7c0 3.2 2.1 6.5 6.4 9l98.1 56.6a23.2 23.2 0 0 0 1 .6l.6.3.3.1.5.2.4.2.3.1h.2l.2.2a21.4 21.4 0 0 0 1.9.6l.3.1h.2l.7.2a77.6 77.6 0 0 1 1.1.3h.3l.7.2h.4a42.5 42.5 0 0 0 1 .2l1 .2h1.1l.4.1h2.1l.7.1h1.5a22 22 0 0 0 1.8-.2h.4l1.1-.1h.2l1.2-.2h.1l.3-.1.6-.1a12.5 12.5 0 0 0 1-.3h.5l.5-.2a29 29 0 0 0 1-.3h.2l.3-.2h.2a27 27 0 0 0 1.6-.7h.2l.8-.4a19.4 19.4 0 0 0 1.6-.9l97.5-56.7.3-.1.2-.2.4-.2.4-.3.3-.2.3-.3.4-.2.3-.3.3-.3h.1l.3-.3.5-.6h.1l.3-.5h.1v-.1l.4-.4v-.1l.4-.5v-.1l.1-.2.1-.2.2-.3.1-.3.1-.3.1-.1a6.9 6.9 0 0 0 .2-.8l.1-.3v-.4l.1-.3v-1l.2-41.4v.4Z",uH="M232.5 60.4c8.5 4.9 8.5 12.8.1 17.7l-97.5 56.7c-8.4 4.9-22 4.9-30.5 0L6.5 78C-2 73-2 65.3 6.4 60.4l97.5-56.7c8.4-5 22-5 30.5 0l98.1 56.7Z",fH="M119.1 0A31 31 0 0 0 104 3.7L6.4 60.4C-2 65.3-2 73.2 6.4 78l98.2 56.7c4.2 2.4 9.8 3.7 15.3 3.7a31 31 0 0 0 15.2-3.7L232.6 78c8.4-5 8.4-12.8 0-17.7L134.3 3.7A31.2 31.2 0 0 0 119.1 0Zm0 2.5c5.4 0 10.3 1.2 14 3.3l98.2 56.7c3.3 2 5.1 4.3 5.1 6.8 0 2.4-1.8 4.7-5 6.6l-97.5 56.7a28.3 28.3 0 0 1-14 3.4c-5.3 0-10.3-1.2-14-3.4L7.7 76c-3.3-1.9-5-4.3-5-6.7 0-2.4 1.7-4.8 5-6.7L105 5.8a29 29 0 0 1 14-3.3Z",by=I("filter",{id:"sequence-ascending-stairs-3d-shadow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[d("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),d("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),d("feOffset",{dx:"0",dy:"4"}),d("feGaussianBlur",{stdDeviation:"6"}),d("feComposite",{in2:"hardAlpha",operator:"out"}),d("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),d("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),d("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})]}),wy=t=>{const{Title:e,Item:n,data:r,options:i,cubeWidth:o=xy}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null;if(l.length===0)return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d(Lt,{children:by}),c,d(V,{children:d($t,{children:d(q,{indexes:[0],x:0,y:0})})})]});const h=Q(d(q,{indexes:[0]})),u=[],f=[],p=[],g=o/xy,y=cH*g;return l.forEach((m,x)=>{const v=[x],b=Mt(i,v),w=x*(o+lH),_=(l.length-1-x)*vy,$=`cube-gradient-bottom-${x}`,P=`cube-gradient-top-${x}`,C=`cube-gradient-stroke-${x}`;p.push(I(V,{x:w,y:_,id:`cube-${x}`,width:o,height:y,filter:"url(#sequence-ascending-stairs-3d-shadow-filter)",children:[I(Lt,{children:[I("linearGradient",{id:$,x1:"0",y1:"124.5",x2:"238.9",y2:"124.5",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:b,stopOpacity:"0.8"}),d("stop",{offset:"1",stopColor:b,stopOpacity:"0.4"})]}),I("linearGradient",{id:P,x1:"119.5",y1:"0",x2:"119.5",y2:"138.5",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:b,stopOpacity:"0.9"}),d("stop",{offset:"1",stopColor:b,stopOpacity:"0.5"})]}),I("linearGradient",{id:C,x1:"119.5",y1:"0",x2:"119.5",y2:"138.5",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:b}),d("stop",{offset:"1",stopColor:b,stopOpacity:"0.7"})]})]}),I(ne,{transform:`scale(${g})`,children:[d(ht,{d:dH,fill:`url(#${$})`}),d(ht,{d:uH,fill:`url(#${P})`}),d(ht,{d:fH,fill:`url(#${C})`})]}),d(tH,{text:x+1,x:115,y:65,fontSize:56})]}));const T=w+o+hH,E=_+y/2;if(f.push(d(n,{indexes:v,datum:m,data:r,x:T,y:E,positionH:"normal"})),u.push(d(Dt,{indexes:v,x:w+o-h.width/2,y:_-h.height/2})),x===0&&u.push(d(q,{indexes:[0],x:w-30-h.width/2,y:_+y/2-h.height/2})),x<l.length-1){const S=(l.length-1-(x+1))*vy,R=w+o-h.width/2,O=(_+y/2+S+y/2)/2-h.height/2;u.push(d(q,{indexes:[x+1],x:R,y:O}))}else u.push(d(q,{indexes:[l.length],x:w+o+30-h.width/2,y:_+y/2-h.height/2}))}),I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[d(Lt,{children:by}),c,I(V,{x:0,y:0,children:[d(V,{children:p}),d(Ct,{children:f}),d($t,{children:u})]})]})};It("sequence-ascending-stairs-3d",{component:wy,composites:["title","item"]});const _y=t=>{const{Title:e,Item:n,data:r,hGap:i=0,vGap:o=0}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=Q(d(n,{indexes:[0],data:r,datum:l[0]})),u=[],f=[],p=l.length,g=h.width+i,y=h.height/2+o,m=h.width/2,v=0+(p-1)*y;return l.forEach((b,w)=>{const _=m+w*g,$=v-w*y,P=[w];u.push(d(n,{indexes:P,datum:b,data:r,x:_,y:$})),f.push(d(Dt,{indexes:P,x:_+h.width-30,y:$+h.height/2+10})),f.push(d(q,{indexes:P,x:_+h.width+i/2,y:$-30}))}),I(lt,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(V,{children:[d(Ct,{children:u}),d($t,{children:f})]})]})};It("sequence-ascending-steps",{component:_y,composites:["title","item"]});const pH=20,$y=5,Py=t=>{const{Title:e,Item:n,data:r,options:i,radius:o=150,arrowSize:s=4,strokeWidth:a=10}=t,{title:l,desc:c,items:h=[]}=r,u=Q(d(q,{indexes:[0]})),f=re(i);if(!n)return I(lt,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[e?d(e,{title:l,desc:c}):null,d(V,{children:d($t,{children:d(q,{indexes:[0],x:0,y:0})})})]});const p=h.length;if(p===0)return I(lt,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[e?d(e,{title:l,desc:c}):null,d(V,{children:d($t,{children:d(q,{indexes:[0],x:0,y:0})})})]});const g=Q(d(n,{indexes:[0],data:r,datum:h[0]})),y=0,m=0,x=2*Math.PI/p,v=[];let b=1/0,w=1/0,_=-1/0,$=-1/0;for(let L=0;L<p;L++){const D=L*x-Math.PI/2,k=y+o*Math.cos(D),N=m+o*Math.sin(D);v.push({x:k,y:N}),b=Math.min(b,k),w=Math.min(w,N),_=Math.max(_,k),$=Math.max($,N)}const P=[];for(let L=0;L<p;L++){const D=v[L],k=v[(L+1)%p],N=Math.sqrt(Math.pow(k.x-D.x,2)+Math.pow(k.y-D.y,2)),j=Math.min(N*.5,100),X=(D.x+k.x)/2,z=(D.y+k.y)/2;b=Math.min(b,X-j/2),w=Math.min(w,z-j/2),_=Math.max(_,X+j/2),$=Math.max($,z+j/2);const M=Math.atan2(z-m,X-y),H=M<0?M+2*Math.PI:M;let W,U;const Y=H*180/Math.PI,G=j/2+pH,Z=X+Math.cos(M)*G,K=z+Math.sin(M)*G;Y>=337.5||Y<22.5?(W=Z,U=K-g.height/2):Y>=22.5&&Y<67.5?(W=Z,U=K):Y>=67.5&&Y<112.5?(W=Z-g.width/2,U=K):Y>=112.5&&Y<157.5?(W=Z-g.width,U=K):Y>=157.5&&Y<202.5?(W=Z-g.width,U=K-g.height/2):Y>=202.5&&Y<247.5?(W=Z-g.width,U=K-g.height):Y>=247.5&&Y<292.5?(W=Z-g.width/2,U=K-g.height):(W=Z,U=K-g.height),P.push({lineLength:N,circleBigW:j,midX:X,midY:z,itemX:W,itemY:U}),b=Math.min(b,W),w=Math.min(w,U),_=Math.max(_,W+g.width+u.width+5),$=Math.max($,U+g.height)}const C=Math.max(0,-b),T=Math.max(0,-w),E=e?d(e,{title:l,desc:c}):null,S=[],R=[],O=[],A=[],B=v.map(L=>({x:L.x+C,y:L.y+T}));for(let L=0;L<p;L++){const D=B[L],k=B[(L+1)%p],N=(L+1)%p,j=[L],{lineLength:X,circleBigW:z,midX:M,midY:H}=P[L],W=Math.max(z-20,20),U=Math.max(W*.4,16),Y=Mt(i,j)||f,G=k.x-D.x,Z=k.y-D.y,K=X,et=G/K,st=Z/K,pt=$y*2+s,ft=Math.min($y,(K-pt)/2),it=Math.max(0,D.x+et*ft),tt=Math.max(0,D.y+st*ft),nt=Math.max(0,k.x-et*ft),at=Math.max(0,k.y-st*ft),gt=ZA().x(he=>Math.max(0,he.x)).y(he=>Math.max(0,he.y)).curve(Mm)([{x:it,y:tt},{x:nt,y:at}])||"",ct=`fork-arrow-${Y.replace(/[^a-zA-Z0-9]/g,"")}-${L}`,ut=`
104
104
  M ${-s*.6} ${-s*.4}
105
105
  L 0 0
106
106
  L ${-s*.6} ${s*.4}
107
- `;A.push(d("marker",{id:ct,viewBox:`${-s} ${-s*.6} ${s*1.2} ${s*1.2}`,refX:-s*.08,refY:0,markerWidth:s,markerHeight:s,orient:"auto",markerUnits:"strokeWidth",children:d("path",{d:ut,fill:"none",stroke:V,strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"})})),C.push(d(ht,{d:gt,stroke:V,strokeWidth:a,fill:"none",markerEnd:`url(#${ct})`,strokeLinecap:"round","data-element-type":"shape"}));const mt=M+O,Pt=R+T,yt=xe({colorPrimary:V},i);C.push(d(Lt,{x:Math.max(0,mt-L/2),y:Math.max(0,Pt-L/2),width:L,height:L,fill:yt.colorPrimaryBg,"data-element-type":"shape"})),C.push(d(Lt,{x:Math.max(0,mt-W/2),y:Math.max(0,Pt-W/2),width:W,height:W,fill:"#ffffff"})),C.push(d(be,{x:Math.max(0,mt-U/2),y:Math.max(0,Pt-U/2),size:U,indexes:j,fill:V}));const Mt=Math.max(0,mt-u.width/2),te=Math.max(0,Pt-u.height/2);S.push(d(q,{indexes:[N],x:Mt,y:te}))}for(let k=0;k<p;k++){const D=[k],z=h[k],{itemX:N,itemY:j}=P[k],X=Math.max(0,N+O),L=Math.max(0,j+T);H.push(d(n,{indexes:D,datum:z,data:r,x:X,y:L}));const M=Math.max(0,X+g.width+5),R=Math.max(0,L+g.height/2-u.height/2);S.push(d(Ft,{indexes:D,x:M,y:R}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[I,E(Y,{x:0,y:0,children:[d(zt,{children:A}),d(Y,{children:C}),d(It,{children:H}),d(Ot,{children:S})]})]})};Tt("sequence-circle-arrows",{component:py,composites:["title","item"]});const ZL=100,KL=50,QL=6,JL="40",gy=t=>{const{Title:e,Item:n,data:r,options:i,outerRadius:o=180,innerRadius:s=120,itemDistance:a=310,gapAngle:l=5,iconRadius:c=34,iconBgRadius:h=38,iconSize:u=36}=t,{title:f,desc:p,items:g=[]}=r,y=e?d(e,{title:f,desc:p}):null,m=Math.max(a+ZL,o+KL),b=Math.min(a,o),v=Q(d(q,{indexes:[0]}));if(g.length===0)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[y,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:m-20,y:b-20})})})]});const x=[],w=[],_=[],$=[],P=Q(d(n,{indexes:[0],data:r,datum:g[0]})),I=(360-g.length*l)/g.length,S=(j,X,L,M,R,W)=>{const U=R*Math.PI/180,V=W*Math.PI/180,G=j+L*Math.cos(U),Z=X+L*Math.sin(U),K=j+M*Math.cos(U),nt=X+M*Math.sin(U),at=j+M*Math.cos(V),pt=X+M*Math.sin(V),ft=j+L*Math.cos(V),rt=X+L*Math.sin(V),tt=W-R<=180?"0":"1";return[`M ${G} ${Z}`,`L ${K} ${nt}`,`A ${M} ${M} 0 ${tt} 1 ${at} ${pt}`,`L ${ft} ${rt}`,`A ${L} ${L} 0 ${tt} 0 ${G} ${Z}`,"Z"].join(" ")},H=({centerX:j,outerRadius:X,angleRad:L,btnBounds:M})=>{const R=j+(X+20)*Math.cos(L)-M.width/2,W=b+(X+20)*Math.sin(L)-M.height/2;return{x:R,y:W}},C=QL,A=(s+o)/2,B=C/A*(180/Math.PI);g.forEach((j,X)=>{const L=[X],M=X*(I+l)+270,R=M+I,W=(M+R)/2,U=W*Math.PI/180,V=Ct(i,L),G=V+JL,Z=S(m,b,s,o,M,R);_.push(d(ht,{d:Z,fill:G,width:o*2,height:o*2,"data-element-type":"shape"}));const K=S(m,b,s+C,o-C,M+B,R-B);_.push(d(ht,{d:K,fill:V,width:o*2,height:o*2,"data-element-type":"shape"}));const nt=(s+o)/2,at=m+nt*Math.cos(U),pt=b+nt*Math.sin(U);$.push(d(Lt,{x:at-h,y:pt-h,width:h*2,height:h*2,fill:"#ffffff","data-element-type":"shape"})),$.push(d(Lt,{x:at-c,y:pt-c,width:c*2,height:c*2,fill:V,"data-element-type":"shape"})),j.icon&&$.push(d(be,{x:at-u/2,y:pt-u/2,indexes:L,size:u,fill:"#fff"}));const ft=(W%360+360)%360,rt=ft>=270||ft<=90,tt=ft>=75&&ft<=105;let et,st="normal",vt="normal";tt?(et=ft,vt="normal",st="center"):rt?(ft>=270?et=-60+(ft-270)/90*60:et=ft/90*60,st="normal"):(et=120+(ft-90)/180*120,st="flipped");const gt=et*Math.PI/180,dt=m+a*Math.cos(gt)-P.width/2;let ct=b+a*Math.sin(gt)-P.height/2;tt&&(ct=b+o+P.height/2),w.push(d(n,{indexes:L,datum:j,data:r,x:dt,y:ct,positionH:st,positionV:vt}));const ut=a+40,mt=m+ut*Math.cos(gt)-v.width/2,Pt=b+ut*Math.sin(gt)-v.height/2;x.push(d(Ft,{indexes:L,x:mt,y:Pt}));const Mt=(M+I+l/2)*Math.PI/180,{x:te,y:he}=H({centerX:m,outerRadius:o,angleRad:Mt,btnBounds:v});x.push(d(q,{indexes:[X+1],x:te,y:he}))});const D=(270-l/2)*Math.PI/180,{x:z,y:N}=H({centerX:m,outerRadius:o,angleRad:D,btnBounds:v});return x.unshift(d(q,{indexes:[0],x:z,y:N})),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:70,children:[y,E(Y,{children:[d(Y,{children:_}),d(Y,{children:$}),d(It,{children:w}),d(Ot,{children:x})]})]})};Tt("sequence-circular",{component:gy,composites:["title","item"]});const my=t=>{const{Title:e,Item:n,data:r,gap:i=0,rowGap:o=0,itemsPerRow:s=3,circleStrokeWidth:a=18,options:l}=t,{title:c,desc:h,items:u=[]}=r,f=e?d(e,{title:c,desc:h}):null,p=re(l),g=Q(d(q,{indexes:[0]})),y=Q(d(n,{indexes:[0],data:r,datum:u[0],positionH:"center"})),m=[],b=[],v=[],x=(o+y.height)/2,w=x;if(u.forEach((_,$)=>{const P=Math.floor($/s),O=$%s,T=P%2===1,S=(T?s-1-O:O)*(y.width+i)+w,H=P*(y.height+o),C=[$];if(b.push(d(n,{indexes:C,datum:_,data:r,x:S,y:H,positionH:"center",positionV:$%2===1?"flipped":"normal"})),m.push(d(Ft,{indexes:C,x:S+(y.width-g.width)/2,y:H+y.height+10})),$===0&&m.push(d(q,{indexes:C,x:S+(y.width-g.width)/2,y:H-g.height-10})),$<u.length-1){const A=Math.floor(($+1)/s);if(P===A)m.push(d(q,{indexes:[$+1],x:S+(y.width-g.width)/2,y:H-g.height-10}));else{const k=H+y.height/2,D=H+y.height+o+y.height/2;let z,N,j;T?(z=S,j=0,N=`M ${z} ${k} A ${x} ${x} 0 0 ${j} ${z} ${D}`):(z=S+y.width,j=1,N=`M ${z} ${k} A ${x} ${x} 0 0 ${j} ${z} ${D}`);const X=D-k,L=Ct(l,C),M=Ct(l,[$+1]),R=`gradient-arc-${$}`;v.push(E(Rt,{children:[d(zt,{children:E("linearGradient",{id:R,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:L||p}),d("stop",{offset:"100%",stopColor:M||p})]})}),d(ht,{d:N,stroke:`url(#${R})`,strokeWidth:a,fill:"none",width:w,height:X,"data-element-type":"shape"})]}));const W=T?z-x-g.width/2:z+x-g.width/2,U=H+y.height+o/2-g.height/2;m.push(d(q,{indexes:[$+1],x:W,y:U}))}}}),u.length>0){const _=u.length-1,$=Math.floor(_/s),P=_%s,I=($%2===1?s-1-P:P)*(y.width+i),S=$*(y.height+o);m.push(d(q,{indexes:[u.length],x:I+(y.width-g.width)/2,y:S+y.height+g.height+20}))}if(u.length/s>2){const _=(o+y.height)/2,$=Ct(l,[0]);v.push(d(St,{x:0,y:y.height/2-a/2,width:_,height:a,fill:$||p,"data-element-type":"shape"}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,E(Y,{width:s*y.width+(s-1)*i+x*2,height:Math.ceil(u.length/s)*(y.height+o),children:[d(Y,{children:v}),d(It,{children:b}),d(Ot,{children:m})]})]})};Tt("sequence-color-snake-steps",{component:my,composites:["title","item"]});const Ws=(t,e)=>t===0?0:t===1?e/2:e/2+(t-1)*(e/2*3),Vs=(t,e,n)=>{if(t)return 0;const o=e===0?2:n;return n*2+o},tR=(t,e,n,r,i,o,s,a)=>{const l=Math.max(6,o*.15),c=r+(t-1)*i,h=t*l,u=100,p=c+h+u+50,g=p-u;let y=0,m=0,b=0,v=0;if(t>0){let w=1/0,_=-1/0;for(let A=0;A<t;A++){const B=A%2===0,k=Math.floor(A/2),D=Ws(k,n),N=0+Vs(B,k,n)+D;w=Math.min(w,N-n),_=Math.max(_,N+n)}const $=(w+_)/2,P=0;y=0,v=y+e.width+a+s+n,b=v-P+$;const S=y+e.width/2,H=b-S;m=b+H-e.width/2}return{canvasHeight:p,startY:g,leftItemAlignedX:y,rightItemAlignedX:m,cylinderAreaStartX:v}},eR=(t,e,n,r,i,o,s)=>{const a=t%2===0,l=Math.floor(t/2),c=Ws(l,e),h=Vs(a,l,e),u=s+h+c,f=o-t*i,p=n+t*r,g=f-p;return{x:u,y:g,height:p,bottomY:f,topY:g}},nR=(t,e,n,r,i,o,s,a,l)=>{const c=t%2===0,h=e.topY+e.height*.05;let u,f;c?(u=i,f=u+n.width+l):(u=o,f=u-l);let p;s==="top"?p=h:s==="bottom"?p=h-n.height:p=h-n.height/2,p+=a;const g=c?e.x-r:e.x+r,y=c?g-l:g+l;return{itemPos:{x:u,y:p},lineStartX:y,lineEndX:f,lineY:h}},rR=(t,e)=>{const n=ot(e),r=[];return r.push(E("linearGradient",{id:`cylinderGradient${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:n.toRgbString(),stopOpacity:.7}),d("stop",{offset:"40%",stopColor:n.clone().lighten(5).toRgbString(),stopOpacity:.65}),d("stop",{offset:"70%",stopColor:n.clone().lighten(15).toRgbString(),stopOpacity:.6}),d("stop",{offset:"100%",stopColor:n.clone().lighten(20).toRgbString(),stopOpacity:.55})]})),r.push(E("linearGradient",{id:`topGradient${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:n.clone().lighten(15).toRgbString(),stopOpacity:1}),d("stop",{offset:"100%",stopColor:"#fafafa",stopOpacity:1})]})),r.push(E("linearGradient",{id:`bottomGradient${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:n.clone().darken(8).toRgbString(),stopOpacity:.75}),d("stop",{offset:"50%",stopColor:n.clone().darken(5).toRgbString(),stopOpacity:.7}),d("stop",{offset:"100%",stopColor:n.clone().darken(12).toRgbString(),stopOpacity:.65})]})),r.push(E("linearGradient",{id:`numberGradient${t}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:n.clone().darken(0).toRgbString(),stopOpacity:.9}),d("stop",{offset:"50%",stopColor:n.clone().lighten(5).toRgbString(),stopOpacity:.85}),d("stop",{offset:"100%",stopColor:n.clone().lighten(10).toRgbString(),stopOpacity:.8})]})),r.push(E("linearGradient",{id:`glowGradient${t}`,x1:"0%",y1:"100%",x2:"0%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:"#FFFFFF",stopOpacity:.2}),d("stop",{offset:"90%",stopColor:"#FFFFFF",stopOpacity:0})]})),r},iR=(t,e,n,r)=>{const{x:i,topY:o,bottomY:s}=e,a=[];a.push(d("ellipse",{id:`cylinder-bottom-${t}`,cx:i,cy:s,rx:n,ry:r,fill:`url(#bottomGradient${t})`,opacity:.7})),a.push(d(ht,{id:`cylinder-body-${t}`,d:`
107
+ `;A.push(d("marker",{id:ct,viewBox:`${-s} ${-s*.6} ${s*1.2} ${s*1.2}`,refX:-s*.08,refY:0,markerWidth:s,markerHeight:s,orient:"auto",markerUnits:"strokeWidth",children:d("path",{d:ut,fill:"none",stroke:Y,strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"})})),O.push(d(ht,{d:gt,stroke:Y,strokeWidth:a,fill:"none",markerEnd:`url(#${ct})`,strokeLinecap:"round","data-element-type":"shape"}));const mt=M+C,Ot=H+T,yt=ye({colorPrimary:Y},i);O.push(d(zt,{x:Math.max(0,mt-z/2),y:Math.max(0,Ot-z/2),width:z,height:z,fill:yt.colorPrimaryBg,"data-element-type":"shape"})),O.push(d(zt,{x:Math.max(0,mt-W/2),y:Math.max(0,Ot-W/2),width:W,height:W,fill:"#ffffff"})),O.push(d(be,{x:Math.max(0,mt-U/2),y:Math.max(0,Ot-U/2),size:U,indexes:j,fill:Y}));const St=Math.max(0,mt-u.width/2),te=Math.max(0,Ot-u.height/2);S.push(d(q,{indexes:[N],x:St,y:te}))}for(let L=0;L<p;L++){const D=[L],k=h[L],{itemX:N,itemY:j}=P[L],X=Math.max(0,N+C),z=Math.max(0,j+T);R.push(d(n,{indexes:D,datum:k,data:r,x:X,y:z}));const M=Math.max(0,X+g.width+5),H=Math.max(0,z+g.height/2-u.height/2);S.push(d(Dt,{indexes:D,x:M,y:H}))}return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[E,I(V,{x:0,y:0,children:[d(Lt,{children:A}),d(V,{children:O}),d(Ct,{children:R}),d($t,{children:S})]})]})};It("sequence-circle-arrows",{component:Py,composites:["title","item"]});const gH=100,mH=50,yH=6,vH="40",Cy=t=>{const{Title:e,Item:n,data:r,options:i,outerRadius:o=180,innerRadius:s=120,itemDistance:a=310,gapAngle:l=5,iconRadius:c=34,iconBgRadius:h=38,iconSize:u=36}=t,{title:f,desc:p,items:g=[]}=r,y=e?d(e,{title:f,desc:p}):null,m=Math.max(a+gH,o+mH),x=Math.min(a,o),v=Q(d(q,{indexes:[0]}));if(g.length===0)return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[y,d(V,{children:d($t,{children:d(q,{indexes:[0],x:m-20,y:x-20})})})]});const b=[],w=[],_=[],$=[],P=Q(d(n,{indexes:[0],data:r,datum:g[0]})),E=(360-g.length*l)/g.length,S=(j,X,z,M,H,W)=>{const U=H*Math.PI/180,Y=W*Math.PI/180,G=j+z*Math.cos(U),Z=X+z*Math.sin(U),K=j+M*Math.cos(U),et=X+M*Math.sin(U),st=j+M*Math.cos(Y),pt=X+M*Math.sin(Y),ft=j+z*Math.cos(Y),it=X+z*Math.sin(Y),tt=W-H<=180?"0":"1";return[`M ${G} ${Z}`,`L ${K} ${et}`,`A ${M} ${M} 0 ${tt} 1 ${st} ${pt}`,`L ${ft} ${it}`,`A ${z} ${z} 0 ${tt} 0 ${G} ${Z}`,"Z"].join(" ")},R=({centerX:j,outerRadius:X,angleRad:z,btnBounds:M})=>{const H=j+(X+20)*Math.cos(z)-M.width/2,W=x+(X+20)*Math.sin(z)-M.height/2;return{x:H,y:W}},O=yH,A=(s+o)/2,B=O/A*(180/Math.PI);g.forEach((j,X)=>{const z=[X],M=X*(E+l)+270,H=M+E,W=(M+H)/2,U=W*Math.PI/180,Y=Mt(i,z),G=Y+vH,Z=S(m,x,s,o,M,H);_.push(d(ht,{d:Z,fill:G,width:o*2,height:o*2,"data-element-type":"shape"}));const K=S(m,x,s+O,o-O,M+B,H-B);_.push(d(ht,{d:K,fill:Y,width:o*2,height:o*2,"data-element-type":"shape"}));const et=(s+o)/2,st=m+et*Math.cos(U),pt=x+et*Math.sin(U);$.push(d(zt,{x:st-h,y:pt-h,width:h*2,height:h*2,fill:"#ffffff","data-element-type":"shape"})),$.push(d(zt,{x:st-c,y:pt-c,width:c*2,height:c*2,fill:Y,"data-element-type":"shape"})),j.icon&&$.push(d(be,{x:st-u/2,y:pt-u/2,indexes:z,size:u,fill:"#fff"}));const ft=(W%360+360)%360,it=ft>=270||ft<=90,tt=ft>=75&&ft<=105;let nt,at="normal",vt="normal";tt?(nt=ft,vt="normal",at="center"):it?(ft>=270?nt=-60+(ft-270)/90*60:nt=ft/90*60,at="normal"):(nt=120+(ft-90)/180*120,at="flipped");const gt=nt*Math.PI/180,dt=m+a*Math.cos(gt)-P.width/2;let ct=x+a*Math.sin(gt)-P.height/2;tt&&(ct=x+o+P.height/2),w.push(d(n,{indexes:z,datum:j,data:r,x:dt,y:ct,positionH:at,positionV:vt}));const ut=a+40,mt=m+ut*Math.cos(gt)-v.width/2,Ot=x+ut*Math.sin(gt)-v.height/2;b.push(d(Dt,{indexes:z,x:mt,y:Ot}));const St=(M+E+l/2)*Math.PI/180,{x:te,y:he}=R({centerX:m,outerRadius:o,angleRad:St,btnBounds:v});b.push(d(q,{indexes:[X+1],x:te,y:he}))});const D=(270-l/2)*Math.PI/180,{x:k,y:N}=R({centerX:m,outerRadius:o,angleRad:D,btnBounds:v});return b.unshift(d(q,{indexes:[0],x:k,y:N})),I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:70,children:[y,I(V,{children:[d(V,{children:_}),d(V,{children:$}),d(Ct,{children:w}),d($t,{children:b})]})]})};It("sequence-circular",{component:Cy,composites:["title","item"]});const Oy=t=>{const{Title:e,Item:n,data:r,gap:i=0,rowGap:o=0,itemsPerRow:s=3,circleStrokeWidth:a=18,options:l}=t,{title:c,desc:h,items:u=[]}=r,f=e?d(e,{title:c,desc:h}):null,p=re(l),g=Q(d(q,{indexes:[0]})),y=Q(d(n,{indexes:[0],data:r,datum:u[0],positionH:"center"})),m=[],x=[],v=[],b=(o+y.height)/2,w=b;if(u.forEach((_,$)=>{const P=Math.floor($/s),C=$%s,T=P%2===1,S=(T?s-1-C:C)*(y.width+i)+w,R=P*(y.height+o),O=[$];if(x.push(d(n,{indexes:O,datum:_,data:r,x:S,y:R,positionH:"center",positionV:$%2===1?"flipped":"normal"})),m.push(d(Dt,{indexes:O,x:S+(y.width-g.width)/2,y:R+y.height+10})),$===0&&m.push(d(q,{indexes:O,x:S+(y.width-g.width)/2,y:R-g.height-10})),$<u.length-1){const A=Math.floor(($+1)/s);if(P===A)m.push(d(q,{indexes:[$+1],x:S+(y.width-g.width)/2,y:R-g.height-10}));else{const L=R+y.height/2,D=R+y.height+o+y.height/2;let k,N,j;T?(k=S,j=0,N=`M ${k} ${L} A ${b} ${b} 0 0 ${j} ${k} ${D}`):(k=S+y.width,j=1,N=`M ${k} ${L} A ${b} ${b} 0 0 ${j} ${k} ${D}`);const X=D-L,z=Mt(l,O),M=Mt(l,[$+1]),H=`gradient-arc-${$}`;v.push(I(Ht,{children:[d(Lt,{children:I("linearGradient",{id:H,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:z||p}),d("stop",{offset:"100%",stopColor:M||p})]})}),d(ht,{d:N,stroke:`url(#${H})`,strokeWidth:a,fill:"none",width:w,height:X,"data-element-type":"shape"})]}));const W=T?k-b-g.width/2:k+b-g.width/2,U=R+y.height+o/2-g.height/2;m.push(d(q,{indexes:[$+1],x:W,y:U}))}}}),u.length>0){const _=u.length-1,$=Math.floor(_/s),P=_%s,E=($%2===1?s-1-P:P)*(y.width+i),S=$*(y.height+o);m.push(d(q,{indexes:[u.length],x:E+(y.width-g.width)/2,y:S+y.height+g.height+20}))}if(u.length/s>2){const _=(o+y.height)/2,$=Mt(l,[0]);v.push(d(Et,{x:0,y:y.height/2-a/2,width:_,height:a,fill:$||p,"data-element-type":"shape"}))}return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,I(V,{width:s*y.width+(s-1)*i+b*2,height:Math.ceil(u.length/s)*(y.height+o),children:[d(V,{children:v}),d(Ct,{children:x}),d($t,{children:m})]})]})};It("sequence-color-snake-steps",{component:Oy,composites:["title","item"]});const Ws=(t,e)=>t===0?0:t===1?e/2:e/2+(t-1)*(e/2*3),Vs=(t,e,n)=>{if(t)return 0;const o=e===0?2:n;return n*2+o},xH=(t,e,n,r,i,o,s,a)=>{const l=Math.max(6,o*.15),c=r+(t-1)*i,h=t*l,u=100,p=c+h+u+50,g=p-u;let y=0,m=0,x=0,v=0;if(t>0){let w=1/0,_=-1/0;for(let A=0;A<t;A++){const B=A%2===0,L=Math.floor(A/2),D=Ws(L,n),N=0+Vs(B,L,n)+D;w=Math.min(w,N-n),_=Math.max(_,N+n)}const $=(w+_)/2,P=0;y=0,v=y+e.width+a+s+n,x=v-P+$;const S=y+e.width/2,R=x-S;m=x+R-e.width/2}return{canvasHeight:p,startY:g,leftItemAlignedX:y,rightItemAlignedX:m,cylinderAreaStartX:v}},bH=(t,e,n,r,i,o,s)=>{const a=t%2===0,l=Math.floor(t/2),c=Ws(l,e),h=Vs(a,l,e),u=s+h+c,f=o-t*i,p=n+t*r,g=f-p;return{x:u,y:g,height:p,bottomY:f,topY:g}},wH=(t,e,n,r,i,o,s,a,l)=>{const c=t%2===0,h=e.topY+e.height*.05;let u,f;c?(u=i,f=u+n.width+l):(u=o,f=u-l);let p;s==="top"?p=h:s==="bottom"?p=h-n.height:p=h-n.height/2,p+=a;const g=c?e.x-r:e.x+r,y=c?g-l:g+l;return{itemPos:{x:u,y:p},lineStartX:y,lineEndX:f,lineY:h}},_H=(t,e)=>{const n=rt(e),r=[];return r.push(I("linearGradient",{id:`cylinderGradient${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:n.toRgbString(),stopOpacity:.7}),d("stop",{offset:"40%",stopColor:n.clone().lighten(5).toRgbString(),stopOpacity:.65}),d("stop",{offset:"70%",stopColor:n.clone().lighten(15).toRgbString(),stopOpacity:.6}),d("stop",{offset:"100%",stopColor:n.clone().lighten(20).toRgbString(),stopOpacity:.55})]})),r.push(I("linearGradient",{id:`topGradient${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:n.clone().lighten(15).toRgbString(),stopOpacity:1}),d("stop",{offset:"100%",stopColor:"#fafafa",stopOpacity:1})]})),r.push(I("linearGradient",{id:`bottomGradient${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:n.clone().darken(8).toRgbString(),stopOpacity:.75}),d("stop",{offset:"50%",stopColor:n.clone().darken(5).toRgbString(),stopOpacity:.7}),d("stop",{offset:"100%",stopColor:n.clone().darken(12).toRgbString(),stopOpacity:.65})]})),r.push(I("linearGradient",{id:`numberGradient${t}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:n.clone().darken(0).toRgbString(),stopOpacity:.9}),d("stop",{offset:"50%",stopColor:n.clone().lighten(5).toRgbString(),stopOpacity:.85}),d("stop",{offset:"100%",stopColor:n.clone().lighten(10).toRgbString(),stopOpacity:.8})]})),r.push(I("linearGradient",{id:`glowGradient${t}`,x1:"0%",y1:"100%",x2:"0%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:"#FFFFFF",stopOpacity:.2}),d("stop",{offset:"90%",stopColor:"#FFFFFF",stopOpacity:0})]})),r},$H=(t,e,n,r)=>{const{x:i,topY:o,bottomY:s}=e,a=[];a.push(d("ellipse",{id:`cylinder-bottom-${t}`,cx:i,cy:s,rx:n,ry:r,fill:`url(#bottomGradient${t})`,opacity:.7})),a.push(d(ht,{id:`cylinder-body-${t}`,d:`
108
108
  M ${i-n} ${o}
109
109
  A ${n} ${r} 0 0 0 ${i} ${o+r}
110
110
  A ${n} ${r} 0 0 0 ${i+n} ${o}
@@ -112,13 +112,13 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
112
112
  A ${n} ${r} 0 0 1 ${i} ${s+r}
113
113
  A ${n} ${r} 0 0 1 ${i-n} ${s}
114
114
  Z
115
- `,fill:`url(#cylinderGradient${t})`,stroke:"none"})),a.push(d(St,{id:`cylinder-glow-${t}`,x:i-n,y:o-r*3,width:n*2,height:r*3,fill:`url(#glowGradient${t})`})),a.push(d("ellipse",{id:`cylinder-top-${t}`,cx:i,cy:o,rx:n,ry:r,fill:`url(#topGradient${t})`}));const l=i-10,c=o-15,f=`translate(${l}, ${c}) matrix(1, 0, ${-.6}, ${.6}, 0, 0)`;return a.push(d(Et,{id:`cylinder-number-${t}`,width:50,height:50,fontFamily:"Arial Black, sans-serif",fontSize:32,fontWeight:900,fill:`url(#numberGradient${t})`,alignHorizontal:"center",alignVertical:"middle",transform:f,children:t+1})),a},oR=(t,e,n,r,i)=>{const s=[];return s.push(d("circle",{id:`decoration-dot-start-${t}`,cx:e,cy:r,r:2,fill:i})),s.push(d("line",{id:`decoration-line-${t}`,x1:e,y1:r,x2:n,y2:r,stroke:i,strokeWidth:1,opacity:.8})),s.push(d("circle",{id:`decoration-dot-end-${t}`,cx:n,cy:r,r:2,fill:i,opacity:.9})),s},sR=(t,e,n,r,i)=>{if(t===0)return null;const o=[];for(let w=0;w<t;w++){const _=w%2===0,$=Math.floor(w/2),P=Ws($,e),O=Vs(_,$,e),T=n+O+P,I=r-w*i;o.push({x:T,y:I})}const s=o[0],a=o[o.length-1],l=6,c=t>5?t*16:100,h=s.x-e-c,u=s.x+e+c,f=s.y+l+c/6,p=a.x-e-c,g=a.x+e+c,y=a.y+l-c/6,m=`
115
+ `,fill:`url(#cylinderGradient${t})`,stroke:"none"})),a.push(d(Et,{id:`cylinder-glow-${t}`,x:i-n,y:o-r*3,width:n*2,height:r*3,fill:`url(#glowGradient${t})`})),a.push(d("ellipse",{id:`cylinder-top-${t}`,cx:i,cy:o,rx:n,ry:r,fill:`url(#topGradient${t})`}));const l=i-10,c=o-15,f=`translate(${l}, ${c}) matrix(1, 0, ${-.6}, ${.6}, 0, 0)`;return a.push(d(Tt,{id:`cylinder-number-${t}`,width:50,height:50,fontFamily:"Arial Black, sans-serif",fontSize:32,fontWeight:900,fill:`url(#numberGradient${t})`,alignHorizontal:"center",alignVertical:"middle",transform:f,children:t+1})),a},PH=(t,e,n,r,i)=>{const s=[];return s.push(d("circle",{id:`decoration-dot-start-${t}`,cx:e,cy:r,r:2,fill:i})),s.push(d("line",{id:`decoration-line-${t}`,x1:e,y1:r,x2:n,y2:r,stroke:i,strokeWidth:1,opacity:.8})),s.push(d("circle",{id:`decoration-dot-end-${t}`,cx:n,cy:r,r:2,fill:i,opacity:.9})),s},CH=(t,e,n,r,i)=>{if(t===0)return null;const o=[];for(let w=0;w<t;w++){const _=w%2===0,$=Math.floor(w/2),P=Ws($,e),C=Vs(_,$,e),T=n+C+P,E=r-w*i;o.push({x:T,y:E})}const s=o[0],a=o[o.length-1],l=6,c=t>5?t*16:100,h=s.x-e-c,u=s.x+e+c,f=s.y+l+c/6,p=a.x-e-c,g=a.x+e+c,y=a.y+l-c/6,m=`
116
116
  M ${h} ${f}
117
117
  L ${u} ${f}
118
118
  L ${g} ${y}
119
119
  L ${p} ${y}
120
120
  Z
121
- `,b=`
121
+ `,x=`
122
122
  M ${u} ${f}
123
123
  L ${u} ${f+l}
124
124
  L ${g} ${y+l}
@@ -130,11 +130,11 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
130
130
  L ${u} ${f+l}
131
131
  L ${h} ${f+l}
132
132
  Z
133
- `;return E(Y,{children:[d(zt,{children:E(Rt,{children:[E("linearGradient",{id:"basePlateTopGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#fafafa",stopOpacity:1}),d("stop",{offset:"50%",stopColor:"#ffffff",stopOpacity:.98}),d("stop",{offset:"100%",stopColor:"#ececec",stopOpacity:.95})]}),E("linearGradient",{id:"basePlateFrontGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#e0e0e0",stopOpacity:.95}),d("stop",{offset:"50%",stopColor:"#d2d2d2",stopOpacity:.93}),d("stop",{offset:"100%",stopColor:"#c5c5c5",stopOpacity:.9})]}),E("linearGradient",{id:"basePlateSideGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#b8b8b8",stopOpacity:.92}),d("stop",{offset:"50%",stopColor:"#c0c0c0",stopOpacity:.88}),d("stop",{offset:"100%",stopColor:"#adadad",stopOpacity:.85})]})]})}),d(ht,{id:"base-plate-front",d:v,fill:"url(#basePlateFrontGradient)",stroke:"#c5c5c5",strokeWidth:.3,opacity:.92}),d(ht,{id:"base-plate-side",d:b,fill:"url(#basePlateSideGradient)",stroke:"#aaaaaa",strokeWidth:.3,opacity:.88}),d(ht,{id:"base-plate-top",d:m,fill:"url(#basePlateTopGradient)",stroke:"#e5e5e5",strokeWidth:.5,opacity:.93})]})},yy=t=>{const{Title:e,Item:n,data:r,options:i,cylinderRx:o=28,cylinderRy:s=18,baseHeight:a=120,heightIncrement:l=40,depthSpacing:c=60,itemVerticalAlign:h="top",itemVerticalOffset:u=-12,firstDecorationWidth:f=90}=t,{title:p,desc:g,items:y=[]}=r,m=e?d(e,{title:p,desc:g}):null,b=Q(d(n,{indexes:[0],data:r,datum:y[0],positionH:"center"})),v=Q(d(q,{indexes:[0]})),x=re(i),w=10,_=Math.max(6,c*.15),$=tR(y.length,b,o,a,l,c,f,w),{startY:P,leftItemAlignedX:O,rightItemAlignedX:T,cylinderAreaStartX:I}=$,S=[],H=[];y.forEach((L,M)=>{const R=Ct(i,[M])||x;S.push(...rR(M,R));const W=eR(M,o,a,l,_,P,I),U=iR(M,W,o,s),{itemPos:V,lineStartX:G,lineEndX:Z,lineY:K}=nR(M,W,b,o,O,T,h,u,w),nt=oR(M,G,Z,K,R);U.push(...nt);const at=d(n,{indexes:[M],datum:L,data:r,x:V.x,y:V.y,positionH:M%2===0?"flipped":"normal"}),pt=[d(Ft,{indexes:[M],x:V.x+b.width/2-v.width/2,y:V.y+b.height+10}),d(q,{indexes:[M],x:V.x+b.width/2-v.width/2,y:V.y-v.height-10})];H[M]={cylinderNodes:U,itemNode:at,btnNodes:pt,itemX:V.x,itemY:V.y}});let C=1/0,A=1/0,B=-1/0,k=-1/0;H.forEach(L=>{const{itemX:M,itemY:R}=L;C=Math.min(C,M),A=Math.min(A,R),B=Math.max(B,M+b.width),k=Math.max(k,R+b.height)});const D=B-C,z=k-A,N=[d(zt,{children:S})],j=[],X=sR(y.length,o,I,P,_);X&&N.push(X);for(let L=y.length-1;L>=0;L--){const M=H[L];M&&(N.push(E(Y,{children:[d(Y,{children:M.cylinderNodes}),M.itemNode]})),j.push(...M.btnNodes))}if(y.length>0){const L=y.length%2===0,M=Math.floor(y.length/2),R=Ws(M,o),W=Vs(L,M,o),U=I+W+R,V=P-y.length*_;j.push(d(q,{indexes:[y.length],x:U,y:V-100}))}return E(lt,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[m,E(Y,{width:D,height:z,children:[d(It,{children:N}),d(Ot,{children:j})]})]})};Tt("sequence-cylinders-3d",{component:yy,composites:["title","item"]});const Dt={WIDTH:160,HEIGHT:260,ARROW_HEIGHT:148,ARROW_WIDTH:100,LINE_X:100,RECT_X:0,RECT_Y:80,RECT_WIDTH:100,RECT_HEIGHT:130},ln={SIZE:8,MAX_COUNT:40,MIN_COUNT:5,ARROW_RATIO:.6,MIN_ARROW_COUNT:3};function aR(t,e,n){return(t+e*7+n*13)%100}function lR(t){const e=Math.ceil(Math.sqrt(t*1.5)),n=Math.ceil(t/e);return{cols:e,rows:n}}function cR(t,e,n,r,i,o,s,a){const l=Math.max(i,Math.min(t+n,o)),c=Math.max(s,Math.min(e+r,a));return{x:l,y:c}}function vy({count:t,rectX:e,rectY:n,rectWidth:r,rectHeight:i,seed:o}){const s=[],a=ln.SIZE/2,{cols:l,rows:c}=lR(t),h=(r-a*2)/(l+1),u=(i-a*2)/(c+1);let f=0;for(let p=0;p<c&&f<t;p++)for(let g=0;g<l&&f<t;g++){const y=aR(o,p,g),m=y%16-8,b=y*3%12-6,v=p%2===1?h/2:0,x=e+a+(g+1)*h+v,w=n+a+(p+1)*u,{x:_,y:$}=cR(x,w,m,b,e+a,e+r-a,n+a,n+i-a);s.push({x:_,y:$,colorIndex:f}),f++}return s}function hR(t,e){if(e<=1)return ln.MAX_COUNT;const n=t/(e-1),r=ln.MAX_COUNT-ln.MIN_COUNT;return Math.round(ln.MAX_COUNT-r*n)}function dR(){const s={topLeft:{x:40,y:25},topRight:{x:160,y:75},bottomLeft:{x:40,y:205},bottomRight:{x:160,y:255}},a=[];for(let l=0;l<=12;l++){const c=l/12,h={x:s.topLeft.x+(s.bottomLeft.x-s.topLeft.x)*c,y:s.topLeft.y+(s.bottomLeft.y-s.topLeft.y)*c},u={x:s.topRight.x+(s.bottomRight.x-s.topRight.x)*c,y:s.topRight.y+(s.bottomRight.y-s.topRight.y)*c};a.push(`M${h.x} ${h.y}L${u.x} ${u.y}`);const f={x:s.topLeft.x+(s.topRight.x-s.topLeft.x)*c,y:s.topLeft.y+(s.topRight.y-s.topLeft.y)*c},p={x:s.bottomLeft.x+(s.bottomRight.x-s.bottomLeft.x)*c,y:s.bottomLeft.y+(s.bottomRight.y-s.bottomLeft.y)*c};a.push(`M${f.x} ${f.y}L${p.x} ${p.y}`)}return a.join("")}function by(t,e){return t.map(n=>{const r=Ct(e,[n.colorIndex]);return d(ht,{d:"M4 0L8 4L4 8L0 4Z",fill:r,x:n.x,y:n.y,width:ln.SIZE,height:ln.SIZE,"data-element-type":"shape"})})}function uR(t,e,n,r,i){return E(Y,{x:e,y:0,width:Dt.WIDTH,height:Dt.HEIGHT,children:[E(ne,{children:[d(ht,{d:dR(),stroke:"#D9D9D9",strokeWidth:2}),d(ht,{d:`M${Dt.LINE_X} 25V260`,stroke:"#BFBFBF",strokeWidth:2,strokeLinecap:"round"}),d(St,{x:Dt.RECT_X,y:Dt.RECT_Y,width:Dt.RECT_WIDTH,height:Dt.RECT_HEIGHT,fill:"#FFCB0E",fillOpacity:.2})]}),d(Rt,{children:by(r,i)}),d(Et,{x:Dt.LINE_X-25,y:0,width:50,height:20,fontSize:20,fontWeight:"bold",alignHorizontal:"center",alignVertical:"top",fill:n,children:String(t+1).padStart(2,"0")})]})}function fR(t,e){const n=Dt.RECT_Y+Dt.RECT_HEIGHT/2-Dt.ARROW_HEIGHT/2,r=Math.max(Math.round(ln.MIN_COUNT*ln.ARROW_RATIO),ln.MIN_ARROW_COUNT),i=vy({count:r,rectX:0,rectY:14,rectWidth:57,rectHeight:120,seed:999});return E(Y,{x:t+Dt.WIDTH,y:n,children:[d(ht,{d:"M0 13.9679H57.1429V0L100 74L57.1429 148V134.032H0V13.9679Z",width:Dt.ARROW_WIDTH,height:Dt.ARROW_HEIGHT,fill:"#FFCB0E",fillOpacity:.2,"data-element-type":"shape"}),d(Rt,{children:by(i,e)})]})}const xy=t=>{const{Title:e,Item:n,data:r,gap:i=20,options:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=Q(d(q,{indexes:[0]})),u=Q(d(n,{indexes:[0],data:r,datum:l[0],width:Dt.WIDTH,positionH:"center"})),f=[],p=[],g=[],y=Dt.HEIGHT+i,m=y+u.height+10;if(l.forEach((b,v)=>{const x=v*Dt.WIDTH,w=[v],_=Ct(o,w),$=hR(v,l.length),P=vy({count:$,rectX:Dt.RECT_X,rectY:Dt.RECT_Y,rectWidth:Dt.RECT_WIDTH,rectHeight:Dt.RECT_HEIGHT,seed:v*100});f.push(uR(v,x,_,P,o)),v===l.length-1&&f.push(fR(x,o)),p.push(d(n,{indexes:w,datum:b,data:r,width:Dt.WIDTH,x:x+Dt.LINE_X-Dt.WIDTH/2,y,positionH:"center"})),g.push(d(Ft,{indexes:w,x:x+Dt.LINE_X-h.width/2,y:m})),v<l.length-1&&g.push(d(q,{indexes:[v+1],x:x+Dt.WIDTH-h.width/2,y:m}))}),l.length>0){g.unshift(d(q,{indexes:[0],x:-h.width/2,y:m}));const b=(l.length-1)*Dt.WIDTH;g.push(d(q,{indexes:[l.length],x:b+Dt.WIDTH-h.width/2,y:m}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,E(Y,{width:Dt.WIDTH*l.length+Dt.ARROW_WIDTH,height:Dt.HEIGHT+i+u.height,children:[d(Y,{children:f}),d(It,{children:p}),d(Ot,{children:g})]})]})};Tt("sequence-filter-mesh",{component:xy,composites:["title","item"]});const wy=t=>{const{Title:e,Item:n,data:r,gap:i=30,cardPadding:o=10,options:s}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=re(s),f=xe({colorPrimary:u},s),p=Q(d(q,{indexes:[0]})),g=Q(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),y=[],m=[],b=[],v=g.width+o*2,x=g.height+o*2+30,w=8,_=6,$=Math.max(p.height+20,40),P=40;if(c.forEach((O,T)=>{const I=T%2===0,S=T*(v+i);let H;I?T%4===2?H=$:H=$+P:H=$+P+60;const C=[T],A=Ct(s,C)||u;if(I){const z=A===u?f.colorPrimaryBg||"#E8F3FF":`${A}20`,N=d(St,{x:S,y:H,width:v,height:x,fill:z,rx:20,ry:20});b.push(N)}m.push(d(n,{indexes:C,datum:O,data:r,x:S+o,y:H+o,positionH:"center",positionV:"normal"}));const B=c.length*w+(c.length-1)*_,k=S+(v-B)/2,D=H+g.height+20;for(let z=0;z<c.length;z++){const N=k+z*(w+_),j=z===T;b.push(d(Lt,{x:N,y:D,width:w,height:w,fill:j?A:"transparent",stroke:A,strokeWidth:2}))}y.push(d(Ft,{indexes:C,x:S+(v-p.width)/2,y:H+x+10})),T===0?y.push(d(q,{indexes:C,x:S+(v-p.width)/2,y:H-p.height-10})):y.push(d(q,{indexes:C,x:S-i/2-p.width/2,y:$-p.height-10}))}),c.length>0){const O=[],I=i/2,S=6,H=$+P,C=0-I,A=H+x/2;O.push(`M ${C} ${A-S}`),c.forEach((U,V)=>{const G=V%2===0,Z=V*(v+i);let K;G?V%4===2?K=$:K=$+P:K=$+P+60;const nt=Z-I,at=Z+v+I,pt=K-I,ft=K+x+I,rt=K+x/2;G?(O.push(`L ${nt} ${pt+35}`),O.push(`Q ${nt} ${pt} ${nt+35} ${pt}`),O.push(`L ${at-35} ${pt}`),O.push(`Q ${at} ${pt} ${at} ${pt+35}`),O.push(`L ${at} ${rt-S}`)):(O.push(`L ${nt} ${rt}`),O.push(`L ${nt} ${ft-35}`),O.push(`Q ${nt} ${ft} ${nt+35} ${ft}`),O.push(`L ${at-35} ${ft}`),O.push(`Q ${at} ${ft} ${at} ${ft-35}`),O.push(`L ${at} ${rt+S}`))});const B=c.length-1,k=B%2===0,D=B*(v+i);let z;k?B%4===2?z=$:z=$+P:z=$+P+60;const N=D+v+I,j=z+x/2,X=O.join(" "),L="gradient-zigzag-path",M=Ct(s,[0])||u,R=Ct(s,[c.length-1])||u,W=c.map((U,V)=>{const G=V/(c.length-1)*100,Z=Ct(s,[V])||u;return d("stop",{offset:`${G}%`,stopColor:Z})});b.unshift(E(Rt,{children:[d(zt,{children:d("linearGradient",{id:L,x1:C,y1:A,x2:N,y2:j,gradientUnits:"userSpaceOnUse",children:W})}),d(ht,{d:X,stroke:`url(#${L})`,strokeWidth:2,fill:"none",width:(c.length-1)*(v+i)+v+I*2,height:x+120})]})),b.unshift(d(Lt,{x:C-S,y:A-S,width:S*2,height:S*2,fill:"transparent",stroke:M,strokeWidth:2})),b.unshift(d(Lt,{x:N-S,y:j-S,width:S*2,height:S*2,fill:"transparent",stroke:R,strokeWidth:2}))}if(c.length>0){const T=(c.length-1)*(v+i);y.push(d(q,{indexes:[c.length],x:T+v+(i-p.width)/2,y:$-p.height-10}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,E(Y,{children:[d(ne,{children:b}),d(It,{children:m}),d(Ot,{children:y})]})]})};Tt("sequence-horizontal-zigzag",{component:wy,composites:["title","item"]});var pR=Object.defineProperty,gR=Object.defineProperties,mR=Object.getOwnPropertyDescriptors,_y=Object.getOwnPropertySymbols,yR=Object.prototype.hasOwnProperty,vR=Object.prototype.propertyIsEnumerable,$y=(t,e,n)=>e in t?pR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ys=(t,e)=>{for(var n in e||(e={}))yR.call(e,n)&&$y(t,n,e[n]);if(_y)for(var n of _y(e))vR.call(e,n)&&$y(t,n,e[n]);return t},Xs=(t,e)=>gR(t,mR(e));function bR(t){const{width:e,height:n,colorPrimary:r}=t,i=r,o=ot.mix(r,"#000",20).toHexString(),s=ot.mix(r,"#fff",50).toHexString(),a=ot.mix(s,"#000",15).toHexString();function l(P,O){const I=[{position:.25,offset:.1},{position:.45,offset:-.02},{position:.6,offset:.04},{position:.75,offset:-.1}],S={x:0,y:O},H={x:P,y:O},C={x:P/2,y:0},A={x:P/2,y:O},B=O*.35,k=B/O,D={x:C.x*(1-k)+S.x*k,y:B},z={x:C.x,y:B},N={x:C.x*(1-k)+H.x*k,y:B},j=I.map(M=>{const R=D.x+(N.x-D.x)*M.position,W=B,U=O*M.offset;return{x:R,y:W+U,position:M.position,offset:M.offset}});j.sort((M,R)=>M.position-R.position);const X=j.filter(M=>M.x<=z.x),L=j.filter(M=>M.x>z.x);return{leftBottom:S,rightBottom:H,peak:C,centerBottom:A,snowLineY:B,leftEdge:D,centerSnow:z,rightEdge:N,leftRipples:X,rightRipples:L}}const{leftRipples:c,rightRipples:h,leftBottom:u,rightBottom:f,peak:p,centerBottom:g,leftEdge:y,centerSnow:m,rightEdge:b}=l(e,n),v=[p,y,...c,m],x=[p,m,...h,b],w=[y,...c,m,g,u],_=[m,...h,b,f,g],$=P=>P.map(O=>`${O.x},${O.y}`).join(" ");return E(ne,Xs(Ys({},t),{children:[d("polygon",{points:$(v),fill:s}),d("polygon",{points:$(x),fill:a}),d("polygon",{points:$(w),fill:i}),d("polygon",{points:$(_),fill:o})]}))}function xR(t){const n={tiny:27,small:48,medium:54,large:72}[t]||54,r="#17C76F",i="#139B57",o="#737373",s=n*.7,a=n-s,l=s*.8,c=l,h=c/6,u=(c-h)/2,f=s;return E(ne,{width:c,height:n,children:[d("ellipse",{cx:l/2,cy:s/2,rx:l/2,ry:s/2,fill:r,clipPath:"inset(0 50% 0 0)"}),d("ellipse",{cx:l/2,cy:s/2,rx:l/2,ry:s/2,fill:i,clipPath:"inset(0 0 0 50%)"}),d("rect",{x:u,y:f,width:h,height:a,fill:o})]})}function wR(t){const{width:e,height:n}=t,r=e/2,i=n/2,o=Math.min(e,n)*.28,s=Math.min(e,n)*.14,a=Math.min(e,n)*.07,l=0,c=i-a/2,h=a*.4,u=8,f=Array.from({length:u},(p,g)=>{const y=360/u*g;return d("rect",{x:l,y:c,width:s,height:a,rx:h,ry:h,fill:"#FFCB0E",transform:`rotate(${y}, ${r}, ${i})`})});return E(ne,Xs(Ys({},t),{children:[d("circle",{cx:r,cy:i,r:o,fill:"#FFCB0E"}),...f]}))}function _R(t){return t.type==="single"?d(ne,Xs(Ys({},t),{width:54,height:36,children:d("path",{d:"M10.2635 13.3806C11.0019 9.99045 12.7381 6.91002 15.2405 4.55004C17.743 2.19007 20.8929 0.662716 24.2701 0.171643C27.6473 -0.31943 31.0914 0.24912 34.143 1.80148C37.1946 3.35385 39.7087 5.81625 41.3501 8.86031C44.8835 9.0468 48.1994 10.6544 50.5684 13.3294C52.9373 16.0044 54.1653 19.5277 53.9821 23.1242C53.7989 26.7207 52.2195 30.0959 49.5914 32.5071C46.9634 34.9184 43.5019 36.1683 39.9684 35.9818H11.1517C4.93436 35.9818 0 30.9593 0 24.6309C0.0598447 21.8016 1.13799 19.093 3.02989 17.0192C4.9218 14.9454 7.49584 13.6506 10.2635 13.3806Z",fill:"#70CAF8"})})):E(ne,Xs(Ys({},t),{width:73,height:40,children:[d("path",{d:"M61.6461 14.9716C60.8681 11.1875 58.9581 7.73823 56.1763 5.09315C53.3944 2.44806 49.8758 0.735682 46.0992 0.189041C42.3226 -0.357601 38.4714 0.288046 35.0699 2.03812C31.6683 3.7882 28.8815 6.5577 27.0889 9.96971C23.161 10.1687 19.4719 11.9405 16.8333 14.8953C14.1947 17.8502 12.8227 21.746 13.0191 25.7258C13.2155 29.7055 14.9642 33.4433 17.8806 36.1167C20.7969 38.7901 24.642 40.1802 28.5699 39.9812H60.6588C67.5702 39.9812 73.0006 34.4791 73.0006 27.4764C73.0006 20.9739 67.8664 15.4718 61.6461 14.9716Z",fill:"#70CAF8"}),d("path",{d:"M21.9691 6.47136e-09C25.9369 6.47136e-09 29.5264 1.62125 32.0003 4.21094C30.0604 5.7917 28.4423 7.75571 27.2581 10C23.3149 10.1989 19.6111 11.9702 16.9622 14.9238C14.3136 17.8774 12.936 21.772 13.1331 25.75C13.2057 27.2131 13.4902 28.6432 13.9652 30H10.7689C7.96116 29.8907 5.29664 28.7203 3.30402 26.7217C1.31144 24.7231 0.135825 22.0419 0.0110544 19.21C-0.113702 16.378 0.821178 13.6017 2.63019 11.4326C4.43921 9.26356 6.99065 7.8602 9.77766 7.5C11.9582 3.00012 16.6168 8.76701e-05 21.9691 6.47136e-09Z",fill:"#5BA2C6"})]}))}const Py=t=>{const{Title:e,Item:n,data:r,gap:i=20,minHeight:o=100,maxHeight:s=200,minWidth:a=260,maxWidth:l=300,options:c}=t,{title:h,desc:u,items:f=[]}=r,p=e?d(e,{title:h,desc:u}):null,g=[],y=[],m=[],b=[],v=f.length,x=xe(c.themeConfig),w=60,_={single:{width:54,height:36},double:{width:73,height:40}},$=[],P=[];let O=0,T=0;f.forEach((j,X)=>{const L=v>1?X/(v-1):0,R=(o+(s-o)*L)*1.6,W=Math.max(a,Math.min(l,R));$.push(W);const U=T;P.push(U),T+=W/2,X===v-1&&(O=U+W)});const I=P[0],S=P[v-1]+$[v-1],H=S-I,C=v>1?(H-i*(v-1))/v:H,A=Q(d(n,{indexes:[0],data:r,datum:f[0],width:C})),B=32,k=s+i,D=k+B+10;f.forEach((j,X)=>{const L=[X],M=o+(s-o)*(v>1?X/(v-1):0),R=$[X],W=P[X],U=s-M,V=Ct(c,[X])||x.colorPrimary;m.push(d(bR,{colorPrimary:V,x:W,y:U,width:R,height:M}));const G=I+X*(C+i);b.push(d(Et,{x:G,y:k,width:C,height:B,fontSize:16,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:V,backgroundColor:V,backgroundOpacity:.5,backgroundRadius:4,children:String(X+1).padStart(2,"0")})),g.push(d(n,{indexes:L,datum:j,data:r,x:G,y:D,width:C}))});const z=Q(d(q,{indexes:[0]})),N=D+A.height+10;if(f.forEach((j,X)=>{const L=[X],M=I+X*(C+i);y.push(d(Ft,{indexes:L,x:M+C/2-z.width/2,y:N})),X<f.length-1&&y.push(d(q,{indexes:[X+1],x:M+C+i/2-z.width/2,y:N}))}),v>0){const j=I;y.unshift(d(q,{indexes:[0],x:j-i/2-z.width/2,y:N}));const X=I+(v-1)*(C+i);y.push(d(q,{indexes:[v],x:X+C+i/2-z.width/2,y:N})),m.push(d(wR,{x:O-w-20,y:-35,width:w,height:w}));const L=["tiny","small","medium","large"],M={tiny:27,small:48,medium:54,large:72},R={tiny:14.85,small:26.4,medium:29.7,large:39.6},W=[],U=(G,Z,K=5)=>W.some(nt=>!(G+Z+K<nt.x||G>nt.x+nt.width+K));f.forEach((G,Z)=>{const K=P[Z],nt=$[Z],pt=Z===v-1?3:Z===0?1:2;for(let ft=0;ft<pt;ft++){const rt=Z*100+ft*37,tt=rt*17%L.length,et=L[tt],st=M[et],vt=R[et];let gt=0,dt=0,ct=!1;for(;gt<20&&!ct;){const ut=(rt*13+gt*19)%100/100,mt=K+nt*.15,Pt=K+nt*.85-vt;dt=mt+(Pt-mt)*ut,U(dt,vt)||(ct=!0),gt++}if(ct){W.push({x:dt,width:vt});const ut=s-st;m.push(d(Y,{x:dt,y:ut,children:xR(et)}))}}});const V=Math.max(1,Math.floor(v/1.5));for(let G=0;G<V;G++){const Z=G*11+v*5+1,K=Z%2===0?"single":"double",nt=_[K],at=S-I-nt.width,pt=I+Z*7%100/100*at,ft=Z*13%40;m.push(d(_R,{type:K,x:pt,y:ft,width:nt.width,height:nt.height}))}}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,E(Y,{children:[d(Y,{children:m}),d(Y,{children:b}),d(It,{children:g}),d(Ot,{children:y})]})]})};Tt("sequence-mountain",{component:Py,composites:["title","item"]});const Gs=t=>Math.round(t*1e10)/1e10,hh=(t,e)=>Gs(Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))),qs=Math.PI,$R=qs*2,PR=(t,e)=>{const n=e-t;return n>qs&&n<$R||n<0&&n>-qs?-1:1},OR=(t,e,n,r,i,o)=>{const s=Math.atan2(t.y-e.y,t.x-e.x),a=Math.atan2(n.y-e.y,n.x-e.x),l=Math.acos((r*r+o*o-i*i)/(2*r*o)),c=1/Math.tan(l/2),h=PR(s,a),u=s+h*l/2;return{prev:s,next:a,main:l,vel:c,dir:h,bis:u}},dh=Math.PI,CR=(t,e,n)=>t.reduce((r,i)=>{const{x:o,y:s,angle:{prev:a,next:l},arc:{x:c,y:h,radius:u}}=i,f=i.angle.dir*-1,p=a+f*dh/2,g=(f*dh+l-a)%dh,y=n-1,m=g/y,b=[];if(!m)return r.concat({x:o,y:s});for(let v=0;v<=y;v++)b.push({x:c+Math.cos(p+m*v)*u,y:h+Math.sin(p+m*v)*u});return r.concat(b)},[]),MR=(t,e=0)=>{const n=t.length,r=[],i=[],o=[];t.forEach((l,c)=>{const h=t[(c-1+n)%n],u=t[(c+1)%n],f=hh(h,l),p=hh(h,u),g=hh(l,u),y=OR(h,l,u,f,p,g);y.main===0&&(y.main=Number.EPSILON,y.vel=Number.MAX_SAFE_INTEGER),y.main===qs&&(y.vel=0);const m={x:l.x,y:l.y,angle:y,offset:0,arc:{radius:e,hit:e,lim:Math.min(g/y.vel,f/y.vel,l.r||0)},in:{length:f,rest:f},out:{length:g,rest:g},locked:!1,id:c,get prev(){return r[(c-1+n)%n]},get next(){return r[(c+1)%n]}};isNaN(y.main)&&(y.main=0,y.bis=y.prev||y.next,o.push(m)),typeof l.r=="number"&&(l.r===0?o.push(m):i.push(m)),r.push(m)}),o.forEach(l=>{l.angle.vel=0,l.arc.radius=0,uh(l)}),r.forEach(l=>{l.arc.hit=Math.min(l.out.rest/(l.angle.vel+l.next.angle.vel),l.in.rest/(l.angle.vel+l.prev.angle.vel))});let s=Us(i);for(;s;)SR(s),s=Us(i);for(s=Us(r);s;)ER(s,e),s=Us(r);const a=r.map(l=>{const c=l.arc.radius/Math.sin(l.angle.main/2);return{id:l.id,x:l.x,y:l.y,angle:{main:Gs(l.angle.main),prev:l.angle.prev,next:l.angle.next,bis:l.angle.bis,dir:l.angle.dir},offset:Gs(l.offset),arc:{radius:Gs(l.arc.radius),x:l.x+(Math.cos(l.angle.bis)*c||0),y:l.y+(Math.sin(l.angle.bis)*c||0)},in:{length:l.in.length,x:l.x+Math.cos(l.angle.prev)*l.offset,y:l.y+Math.sin(l.angle.prev)*l.offset},out:{length:l.out.length,x:l.x+Math.cos(l.angle.next)*l.offset,y:l.y+Math.sin(l.angle.next)*l.offset},get prev(){return a[(l.id-1+n)%n]},get next(){return a[(l.id+1)%n]}}});return a},SR=t=>{const{prev:e,next:n}=t;e.locked&&!n.locked?t.arc.radius=Math.min(Math.max((t.out.length-n.arc.lim*n.angle.vel)/t.angle.vel,t.out.length/(t.angle.vel+n.angle.vel)),t.in.rest/t.angle.vel,t.arc.lim):n.locked&&!e.locked?t.arc.radius=Math.min(Math.max((t.in.length-e.arc.lim*e.angle.vel)/t.angle.vel,t.in.length/(t.angle.vel+e.angle.vel)),t.out.rest/t.angle.vel,t.arc.lim):n.locked&&e.locked?t.arc.radius=Math.min(t.in.rest/t.angle.vel,t.out.rest/t.angle.vel,t.arc.lim):t.arc.radius=Math.min(Math.max((t.in.length-e.arc.lim*e.angle.vel)/t.angle.vel,t.in.length/(t.angle.vel+e.angle.vel)),Math.max((t.out.length-n.arc.lim*n.angle.vel)/t.angle.vel,t.out.length/(t.angle.vel+n.angle.vel)),t.arc.lim),uh(t)},ER=(t,e)=>{if(e>t.arc.hit){const{prev:n,next:r}=t;n.locked&&!r.locked?t.arc.radius=Math.max(Math.min(t.in.rest/t.angle.vel,t.out.length/(t.angle.vel+r.angle.vel),t.arc.radius),0):r.locked&&!n.locked?t.arc.radius=Math.max(Math.min(t.out.rest/t.angle.vel,t.in.length/(t.angle.vel+n.angle.vel),t.arc.radius),0):r.locked&&n.locked?t.arc.radius=Math.max(Math.min(t.in.rest/t.angle.vel,t.out.rest/t.angle.vel,t.arc.radius),0):t.arc.radius=t.arc.hit}uh(t)},uh=t=>{const{prev:e,next:n}=t;t.offset=t.arc.radius*t.angle.vel,e.out.rest-=t.offset,t.in.rest-=t.offset,t.out.rest-=t.offset,n.in.rest-=t.offset,t.locked=!0,e.arc.hit=Math.min(e.in.length/(e.angle.vel+e.prev.angle.vel),e.in.rest/e.angle.vel,e.out.rest/e.angle.vel),n.arc.hit=Math.min(n.out.length/(n.angle.vel+n.next.angle.vel),n.out.rest/n.angle.vel,n.in.rest/n.angle.vel)},Us=t=>t.reduce((e,n)=>n.locked?e:e?n.arc.hit<e.arc.hit?n:e:n,null),Oy=t=>{const{Title:e,Item:n,data:r,gap:i=10,width:o=700,pyramidWidth:s,itemHeight:a=60,options:l}=t,{title:c,desc:h,items:u=[]}=r,f=e?d(e,{title:c,desc:h}):null;if(u.length===0)return d(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:f});const p=5,g=xe(l.themeConfig),y=30,m=[],b=[],v=[],x=[],w=s!=null?s:o*.6,_=o-w,$=a*1.2,P=u.length*$+(u.length-1)*i;return u.forEach((O,T)=>{const I=[T],S=T===0,H=Ct(l,[T])||g.colorPrimary,{points:C,topWidth:A,bottomWidth:B}=IR(w,$,i,u.length,T),k=MR(C,p),D=CR(k,"AMOUNT",10),z=w/2,N=T*($+i),j=($-a)/2,X=N+j,L=z+A/2,M=z+B/2,W=L-p,U=_+p,V=a,G=W+U,Z=z-y/2,K=N+$/2-y/2+(S?8:0),nt=M,at=G-M,pt=X;v.push(d(St,{x:W,y:X,width:U,height:V,ry:"10",fill:g.colorPrimaryBg,"data-element-type":"shape"}));const ft=`${H}-pyramid-${T}`;b.push(d(zt,{children:E("linearGradient",{id:ft,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0","stop-color":H}),d("stop",{offset:"100%","stop-color":ot.mix(H,"#fff",40).toHexString()})]})}),d(Ne,{points:D,fill:`url(#${ft})`,y:N,"data-element-type":"shape"})),x.push(d(be,{indexes:I,x:Z,y:K,size:y,fill:"#fff"})),m.push(d(n,{indexes:I,datum:O,data:r,x:nt,y:pt,width:at,height:a,positionV:"middle"}))}),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,E(Y,{width:o,height:P,children:[d(Y,{children:v}),d(Y,{children:b}),d(Y,{children:x}),d(It,{children:m}),d(Ot,{})]})]})};function IR(t,e,n,r,i){const o=t/2,s=r*e+(r-1)*n,a=i*(e+n),l=a+e,c=a/s*t,h=l/s*t;let u;if(i===0){const f={x:o,y:0},p={x:o+h/2,y:e},g={x:o-h/2,y:e};u=[f,p,g]}else{const f={x:o+c/2,y:0},p={x:o+h/2,y:e},g={x:o-h/2,y:e},y={x:o-c/2,y:0};u=[f,p,g,y]}return{points:u,topWidth:c,bottomWidth:h}}Tt("sequence-pyramid",{component:Oy,composites:["title","item"]});const ji={iconSize:50,roadWidth:24,outerRadius:60,rowWidth:400,spacing:30,colorDefault:"#666666"},Cy=(t,e)=>`M ${t} ${e}`,Qt=(t,e)=>`L ${t} ${e}`,jr=(t,e,n,r)=>`A ${t} ${t} 0 0 ${e} ${n} ${r}`,TR=(t,{roadWidth:e,innerRadius:n,outerRadius:r})=>{const i=(e+n*2)*t;return{y1:i,y2:i+e,y3:i+e+n,y4:i+e+n*2,y5:i+r*2}};function AR({i:t,direction:e,x:n,y:r,color:i,data:o,itemBounds:s,item:a,Item:l,flipped:c}){const{iconSize:h}=ji,u=e==="left",f=u?n.x4-h/2:n.x3-h/2,p=r.y3-h/2,g=u?n.x6+ji.spacing:n.x1-ji.spacing-s.width,y=r.y3-s.height/2,m=u?c?"flipped":"normal":c?"normal":"flipped";return{icon:d(nr,{indexes:[t],x:f,y:p,size:h,fill:i}),label:d(Et,{width:40,x:u?f-50:f+h+10,y:p+h/2-15,fontSize:30,fill:i,alignHorizontal:u?"right":"left",children:String(t+1).padStart(2,"0")}),item:d(l,{indexes:[t],data:o,datum:a,x:g,y,positionH:m})}}function kR({direction:t,x:e,y:n,color:r,elements:i}){const o=t==="left";i.push(d(BL,{x:o?e.x6+10:e.x1-20,y:n.y3-5,width:10,height:8,rotation:o?90:-90,colorPrimary:r,"data-element-type":"shape"}))}const My=t=>{const{Title:e,Item:n,data:r,spacing:i=ji.spacing,options:o,flipped:s=!1}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=Q(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),{roadWidth:f,outerRadius:p,rowWidth:g,colorDefault:y}=ji,m=f/2,b=p-f,v=(u.width+i)*2+g,x=u.width+i,w=x+p,_=x+g-p,P=_+b+f,O=x+g/2,T=[],I=[],S=[],H=[],C=[],A=[],B=[];for(let z=0;z<c.length;z++){const N=Ct(o,[z])||y,j=z%2===0?"right":"left",X=z===0,L=z===c.length-1,M=TR(z,{roadWidth:f,innerRadius:b,outerRadius:p});if(j==="right"){const V=X?[P,M.y1]:[_,M.y1],G=[w,M.y1],Z=[w,M.y5],K=X?[P,M.y2]:[_,M.y2],nt=[w,M.y2];if(T.push(X?Cy(P,M.y1+m):Qt(_,M.y1+m),Qt(w,M.y1+m),jr(p-m,0,w,M.y4+m)),I.push(X?Cy(...V):Qt(...V),Qt(...G),jr(p,0,...Z)),S.push(Qt(...K),Qt(...nt),jr(b,1,...nt)),L){const at=f/2;I.push(Qt(O,M.y5),Qt(O,M.y5+at),Qt(O+f,M.y5-at),Qt(O,M.y4-at),Qt(O,M.y4),Qt(w,M.y4)),T.push(Qt(O,M.y4+m))}}else{const V=[w,M.y2],G=[_,M.y2],Z=[_,M.y4],K=[w,M.y1],nt=[_,M.y1];if(T.push(Qt(_,M.y1+m),jr(p-m,1,_,M.y4+m)),I.push(Qt(...V),Qt(...G),jr(b,1,...Z)),S.push(Qt(...K),Qt(...nt),jr(p,0,...nt)),L){const at=f/2;I.push(Qt(O,M.y4),Qt(O,M.y4-at),Qt(O-f,M.y4+at),Qt(O,M.y5+at),Qt(O,M.y5),Qt(_,M.y5)),T.push(Qt(O,M.y4+m))}}kR({direction:j,x:{x1:x,x6:P},y:M,color:N,elements:B});const{icon:R,label:W,item:U}=AR({i:z,direction:j,x:{x1:x,x3:w,x4:_,x6:P},y:M,color:N,data:r,itemBounds:u,item:c[z],Item:n,flipped:s});H.push(R),C.push(W),A.push(U)}const k=[...I,...S.reverse(),"Z"],D=c.length*(f+b*2)+f*1.5;return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,E(Y,{width:v,height:u.height<=p*2?D:D+u.height-p*2,children:[d(ht,{width:g,height:D,d:k.join(" "),fill:y,stroke:y,strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"}),d(ht,{d:T.join(" "),stroke:"white",fill:"none",strokeWidth:"3",strokeDasharray:"8 8",strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"}),E(Rt,{children:[H,C,A,B]})]})]})};Tt("sequence-roadmap-vertical",{component:My,composites:["title","item"]});const Sy=t=>{const{Title:e,Item:n,data:r,gap:i=40,itemsPerRow:o=3,rowGap:s=80,options:a}=t,{title:l,desc:c,items:h=[]}=r,u=e?d(e,{title:l,desc:c}):null,f=re(a),p=Q(d(q,{indexes:[0]})),g=Q(d(n,{indexes:[0],data:r,datum:h[0],positionH:"center"})),y=[],m=[],b=[],v=25,x=25;if(h.forEach((w,_)=>{const $=Math.floor(_/o),P=_%o,O=$%2===1,I=(O?o-1-P:P)*(g.width+i),S=$*(g.height+s),H=[_];if(m.push(d(n,{indexes:H,datum:w,data:r,x:I,y:S,positionH:"center"})),y.push(d(Ft,{indexes:H,x:I+(g.width-p.width)/2,y:S+g.height+10})),_===0&&y.push(d(q,{indexes:H,x:I+(g.width-p.width)/2,y:S-p.height-10})),_<h.length-1){const C=Math.floor((_+1)/o),A=(_+1)%o,D=(C%2===1?o-1-A:A)*(g.width+i);if($===C){const N=O,j=N?D+g.width+(i-v)/2:I+g.width+(i-v)/2,X=S+g.height/2-x/2;b.push(d(ch,{x:j,y:X,width:v,height:x,colorPrimary:f,rotation:N?180:0})),y.push(d(q,{indexes:[_+1],x:j+(v-p.width)/2,y:S-p.height-10}))}else{const N=I+g.width/2-v/2,j=S+g.height+(s-x)/2;b.push(d(ch,{x:N,y:j,width:v,height:x,colorPrimary:f,rotation:90})),y.push(d(q,{indexes:[_+1],x:N+(v-p.width)/2,y:j+(x-p.height)/2}))}}}),h.length>0){const w=h.length-1,_=Math.floor(w/o),$=w%o,T=(_%2===1?o-1-$:$)*(g.width+i),I=_*(g.height+s);y.push(d(q,{indexes:[h.length],x:T+(g.width-p.width)/2,y:I+g.height+p.height+20}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,E(Y,{children:[d(Y,{children:b}),d(It,{children:m}),d(Ot,{children:y})]})]})};Tt("sequence-snake-steps",{component:Sy,composites:["title","item"]});const Ey=t=>{const{Title:e,Item:n,data:r,options:i,gap:o=16,perspectiveFactor:s=.2,width:a=720}=t,{title:l,desc:c,items:h=[]}=r,u=e,f=u?d(u,{title:l,desc:c}):null;if(h.length===0)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:0,y:0})})})]});const p=re(i),g=Q(d(q,{indexes:[0]})),y=Q(d(n,{indexes:[0],data:r,datum:h[0]||{},positionH:"center"})),m=12,b=Math.min(a*.1,100),v=Math.min(a*.45,Math.max(80,a-y.width-m-b)),x=Math.max(24,v*s*.35),w=56,_=w*.7,$=h.length>1?(w-_)/(h.length-1):0,P=Math.max(g.height+x+20,x+28),O=v/2,T=v+b+m,I=h.map((tt,et)=>w-$*et),S=h.map((tt,et)=>Math.max(x*(1-et*.05),x*.7)),H=[],C=[],A=h.length-1;H[A]=P,C[A]=0;for(let tt=A-1;tt>=0;tt-=1)C[tt]=C[tt+1]+S[tt]+o,H[tt]=H[tt+1]+S[tt]+I[tt+1]+o;const B=C[0]||S[0]||x,k=v*(.55+s*.1),D=v-k,z=h.map((tt,et)=>{const st=B===0?1:C[et]/B;return k+D*st}),N=z.map(tt=>{const et=O+tt/2;return Math.max(0,T-m-et)}),j=[],X=[],L=[],M=[],R=[],W=0,U=(H[0]||P)+(I[0]||w),V=U-W,G=35,K=(z[A]||k)*.8,nt=K*.65,at=(z[0]||v)*.9;R.push(d(Ne,{points:[{x:O,y:W},{x:O+K/2,y:W+G},{x:O+nt/2,y:W+G},{x:O+at/2,y:U},{x:O-at/2,y:U},{x:O-nt/2,y:W+G},{x:O-K/2,y:W+G}],fill:"rgba(0,0,0,0.12)",width:at,height:V,"data-element-type":"shape"}));let pt=H[A]+I[A]/2;h.forEach((tt,et)=>{const st=[et],vt=z[et],gt=S[et],dt=O-vt/2,ct=I[et],ut=H[et],mt=ut-gt,Pt=ut+ct/2,yt=Ct(i,st)||p;j.push(d(St,{x:dt,y:ut,width:vt,height:ct,fill:yt,"data-element-type":"shape"}),d(Ne,{points:[{x:dt,y:ut},{x:dt+vt,y:ut},{x:dt+vt-gt/2,y:mt},{x:dt+gt/2,y:mt}],fill:yt,opacity:"0.3",width:vt,height:gt,"data-element-type":"shape"}),d(Et,{x:dt,y:ut,width:vt,height:ct,fontSize:ct/2,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:"#ffffff",children:String(et+1).padStart(2,"0")}));const Mt=dt+vt,te=Pt,he=N[et],ye=Mt+he;M.push(d(ht,{d:`M ${Mt} ${te} L ${ye} ${te}`,stroke:yt,strokeWidth:2,fill:"none",width:he,height:2,"data-element-type":"shape"}),d(ht,{d:`M ${ye} ${te} L ${ye} ${te}`,stroke:yt,strokeWidth:6,strokeLinecap:"round",width:1,height:1,"data-element-type":"shape"}));const Ut=Pt-y.height/2;X.push(d(n,{indexes:st,datum:tt,data:r,x:T,y:Ut,positionV:"middle"})),L.push(d(Ft,{indexes:st,x:T+y.width+10,y:Ut+y.height/2-g.height/2})),et===0?L.push(d(q,{indexes:[0],x:T+(y.width-g.width)/2,y:Ut-g.height-12})):L.push(d(q,{indexes:st,x:T+(y.width-g.width)/2,y:(pt+Pt)/2-g.height/2})),pt=Pt});const rt=pt-y.height/2;return L.push(d(q,{indexes:[h.length],x:T+(y.width-g.width)/2,y:rt+y.height+12})),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,E(Y,{children:[d(Y,{children:R}),d(Y,{children:j}),d(Y,{children:M}),d(It,{children:X}),d(Ot,{children:L})]})]})};Tt("sequence-stairs-front",{component:Ey,composites:["title","item"]});const Iy=t=>{const{Title:e,Item:n,data:r,gap:i=40,options:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=re(o),u=Q(d(q,{indexes:[0]})),f=Q(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),p=[],g=[],y=[],m=25,b=25,v=Math.max(u.height+20,30);if(l.forEach((x,w)=>{const _=w*(f.width+i),$=[w];if(g.push(d(n,{indexes:$,datum:x,data:r,x:_,y:v,positionH:"center"})),p.push(d(Ft,{indexes:$,x:_+(f.width-u.width)/2,y:v+f.height+10})),w===0?p.push(d(q,{indexes:$,x:_+(f.width-u.width)/2,y:v-u.height-10})):p.push(d(q,{indexes:$,x:_-i/2-u.width/2,y:v-u.height-10})),w<l.length-1){const P=_+f.width+(i-m)/2,O=v+f.height/2-b/2;y.push(d(ch,{x:P,y:O,width:m,height:b,colorPrimary:h}))}}),l.length>0){const x=(l.length-1)*(f.width+i);p.push(d(q,{indexes:[l.length],x:x+f.width+(i-u.width)/2,y:v-u.height-10}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,E(Y,{children:[d(Y,{children:y}),d(It,{children:g}),d(Ot,{children:p})]})]})};Tt("sequence-steps",{component:Iy,composites:["title","item"]});const Ty=t=>{const{Title:e,Item:n,data:r,gap:i=10,options:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=re(o),u=fg(o),f=Q(d(q,{indexes:[0]})),p=Q(d(n,{indexes:[0],data:r,datum:l[0],positionH:"normal"})),g=[],y=[],m=[],b=10,v=b+70+10,x=v+30,w=6;if(l.length>1){const _=p.height/2+w,$=(l.length-1)*(p.height+i)+p.height/2-w,P=`M ${v} ${_} L ${v} ${$}`,O="gradient-timeline-line",T=$-_,I=l.map((S,H)=>{const A=(H*(p.height+i)+p.height/2-_)/T*100,B=Ct(o,[H]);return d("stop",{offset:`${A}%`,stopColor:B||h})});m.push(E(Rt,{children:[d(zt,{children:d("linearGradient",{id:O,x1:v,y1:_,x2:v,y2:$,gradientUnits:"userSpaceOnUse",children:I})}),d(ht,{d:P,stroke:`url(#${O})`,strokeWidth:2,width:1,height:$-_})]}))}if(l.forEach((_,$)=>{const P=$*(p.height+i),O=P+p.height/2,T=[$];m.push(d(Et,{x:b,y:O,width:70,fontSize:18,fontWeight:"bold",alignHorizontal:"left",alignVertical:"middle",fill:u[$%u.length],children:`STEP ${$+1}`})),y.push(d(n,{indexes:T,datum:_,data:r,x,y:P,positionH:"normal"})),m.push(d(Lt,{x:v-w,y:O-w,width:w*2,height:w*2,fill:u[$%u.length]})),g.push(d(Ft,{indexes:T,x:x-f.width-10,y:P+(p.height-f.height)/2})),$===0?g.push(d(q,{indexes:T,x:x+(p.width-f.width)/2,y:P-f.height-10})):g.push(d(q,{indexes:T,x:x+(p.width-f.width)/2,y:P-i/2-f.height/2}))}),l.length>0){const _=(l.length-1)*(p.height+i);g.push(d(q,{indexes:[l.length],x:x+(p.width-f.width)/2,y:_+p.height+10}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,E(Y,{children:[d(ne,{children:m}),d(It,{children:y}),d(Ot,{children:g})]})]})};Tt("sequence-timeline",{component:Ty,composites:["title","item"]});const fh=120,ph=108,Zs=30,zR="M4.49144e-05 34.4898C4.49144e-05 37.8786 0.848973 41.152 2.43571 44.2444C4.23516 47.7642 6.98514 51.0472 10.517 54.0009C21.331 63.047 39.4615 68.9814 59.9991 68.9814C80.5385 68.9814 98.6672 63.047 109.483 54.0009C113.013 51.0472 115.765 47.7642 117.564 44.2444C119.149 41.152 120 37.8786 120 34.4898C120 15.4407 93.1364 0 59.9991 0C26.8635 0 4.49144e-05 15.4407 4.49144e-05 34.4898Z",LR="M4.49145e-05 34.4898V53.9991C4.49145e-05 57.3879 0.848973 60.6613 2.43571 63.7556C9.75425 78.0545 32.7562 88.4907 59.999 88.4907C87.2438 88.4907 110.246 78.0545 117.564 63.7556C119.149 60.6613 120 57.3879 120 53.9991V34.4898C120 37.8786 119.149 41.152 117.564 44.2444C115.765 47.7642 113.013 51.0472 109.483 54.0009C98.6672 63.047 80.5385 68.9814 59.999 68.9814C39.4615 68.9814 21.3309 63.047 10.5169 54.0009C6.98509 51.0472 4.23516 47.7642 2.43567 44.2444C0.848928 41.152 4.49145e-05 37.8786 4.49145e-05 34.4898Z",RR="M0 53.9991V73.5102C0 92.5593 26.8634 108 59.999 108C93.1363 108 120 92.5593 120 73.5102V53.9991C120 57.3879 119.149 60.6613 117.564 63.7556C110.246 78.0545 87.2438 88.4907 59.999 88.4907C32.7562 88.4907 9.75425 78.0545 2.43571 63.7556C0.848973 60.6613 0 57.3879 0 53.9991Z",Ay=E("filter",{id:"sequence-zigzag-pucks-3d-shadow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[d("feOffset",{dx:"-7",dy:"7",in:"SourceAlpha",result:"offset"}),d("feGaussianBlur",{stdDeviation:"7.5",in:"offset",result:"blurred"}),d("feColorMatrix",{in:"blurred",type:"matrix",values:`0 0 0 0 0
133
+ `;return I(V,{children:[d(Lt,{children:I(Ht,{children:[I("linearGradient",{id:"basePlateTopGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#fafafa",stopOpacity:1}),d("stop",{offset:"50%",stopColor:"#ffffff",stopOpacity:.98}),d("stop",{offset:"100%",stopColor:"#ececec",stopOpacity:.95})]}),I("linearGradient",{id:"basePlateFrontGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#e0e0e0",stopOpacity:.95}),d("stop",{offset:"50%",stopColor:"#d2d2d2",stopOpacity:.93}),d("stop",{offset:"100%",stopColor:"#c5c5c5",stopOpacity:.9})]}),I("linearGradient",{id:"basePlateSideGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#b8b8b8",stopOpacity:.92}),d("stop",{offset:"50%",stopColor:"#c0c0c0",stopOpacity:.88}),d("stop",{offset:"100%",stopColor:"#adadad",stopOpacity:.85})]})]})}),d(ht,{id:"base-plate-front",d:v,fill:"url(#basePlateFrontGradient)",stroke:"#c5c5c5",strokeWidth:.3,opacity:.92}),d(ht,{id:"base-plate-side",d:x,fill:"url(#basePlateSideGradient)",stroke:"#aaaaaa",strokeWidth:.3,opacity:.88}),d(ht,{id:"base-plate-top",d:m,fill:"url(#basePlateTopGradient)",stroke:"#e5e5e5",strokeWidth:.5,opacity:.93})]})},My=t=>{const{Title:e,Item:n,data:r,options:i,cylinderRx:o=28,cylinderRy:s=18,baseHeight:a=120,heightIncrement:l=40,depthSpacing:c=60,itemVerticalAlign:h="top",itemVerticalOffset:u=-12,firstDecorationWidth:f=90}=t,{title:p,desc:g,items:y=[]}=r,m=e?d(e,{title:p,desc:g}):null,x=Q(d(n,{indexes:[0],data:r,datum:y[0],positionH:"center"})),v=Q(d(q,{indexes:[0]})),b=re(i),w=10,_=Math.max(6,c*.15),$=xH(y.length,x,o,a,l,c,f,w),{startY:P,leftItemAlignedX:C,rightItemAlignedX:T,cylinderAreaStartX:E}=$,S=[],R=[];y.forEach((z,M)=>{const H=Mt(i,[M])||b;S.push(..._H(M,H));const W=bH(M,o,a,l,_,P,E),U=$H(M,W,o,s),{itemPos:Y,lineStartX:G,lineEndX:Z,lineY:K}=wH(M,W,x,o,C,T,h,u,w),et=PH(M,G,Z,K,H);U.push(...et);const st=d(n,{indexes:[M],datum:z,data:r,x:Y.x,y:Y.y,positionH:M%2===0?"flipped":"normal"}),pt=[d(Dt,{indexes:[M],x:Y.x+x.width/2-v.width/2,y:Y.y+x.height+10}),d(q,{indexes:[M],x:Y.x+x.width/2-v.width/2,y:Y.y-v.height-10})];R[M]={cylinderNodes:U,itemNode:st,btnNodes:pt,itemX:Y.x,itemY:Y.y}});let O=1/0,A=1/0,B=-1/0,L=-1/0;R.forEach(z=>{const{itemX:M,itemY:H}=z;O=Math.min(O,M),A=Math.min(A,H),B=Math.max(B,M+x.width),L=Math.max(L,H+x.height)});const D=B-O,k=L-A,N=[d(Lt,{children:S})],j=[],X=CH(y.length,o,E,P,_);X&&N.push(X);for(let z=y.length-1;z>=0;z--){const M=R[z];M&&(N.push(I(V,{children:[d(V,{children:M.cylinderNodes}),M.itemNode]})),j.push(...M.btnNodes))}if(y.length>0){const z=y.length%2===0,M=Math.floor(y.length/2),H=Ws(M,o),W=Vs(z,M,o),U=E+W+H,Y=P-y.length*_;j.push(d(q,{indexes:[y.length],x:U,y:Y-100}))}return I(lt,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[m,I(V,{width:D,height:k,children:[d(Ct,{children:N}),d($t,{children:j})]})]})};It("sequence-cylinders-3d",{component:My,composites:["title","item"]});const Nt={WIDTH:160,HEIGHT:260,ARROW_HEIGHT:148,ARROW_WIDTH:100,LINE_X:100,RECT_X:0,RECT_Y:80,RECT_WIDTH:100,RECT_HEIGHT:130},ln={SIZE:8,MAX_COUNT:40,MIN_COUNT:5,ARROW_RATIO:.6,MIN_ARROW_COUNT:3};function OH(t,e,n){return(t+e*7+n*13)%100}function MH(t){const e=Math.ceil(Math.sqrt(t*1.5)),n=Math.ceil(t/e);return{cols:e,rows:n}}function SH(t,e,n,r,i,o,s,a){const l=Math.max(i,Math.min(t+n,o)),c=Math.max(s,Math.min(e+r,a));return{x:l,y:c}}function Sy({count:t,rectX:e,rectY:n,rectWidth:r,rectHeight:i,seed:o}){const s=[],a=ln.SIZE/2,{cols:l,rows:c}=MH(t),h=(r-a*2)/(l+1),u=(i-a*2)/(c+1);let f=0;for(let p=0;p<c&&f<t;p++)for(let g=0;g<l&&f<t;g++){const y=OH(o,p,g),m=y%16-8,x=y*3%12-6,v=p%2===1?h/2:0,b=e+a+(g+1)*h+v,w=n+a+(p+1)*u,{x:_,y:$}=SH(b,w,m,x,e+a,e+r-a,n+a,n+i-a);s.push({x:_,y:$,colorIndex:f}),f++}return s}function EH(t,e){if(e<=1)return ln.MAX_COUNT;const n=t/(e-1),r=ln.MAX_COUNT-ln.MIN_COUNT;return Math.round(ln.MAX_COUNT-r*n)}function IH(){const s={topLeft:{x:40,y:25},topRight:{x:160,y:75},bottomLeft:{x:40,y:205},bottomRight:{x:160,y:255}},a=[];for(let l=0;l<=12;l++){const c=l/12,h={x:s.topLeft.x+(s.bottomLeft.x-s.topLeft.x)*c,y:s.topLeft.y+(s.bottomLeft.y-s.topLeft.y)*c},u={x:s.topRight.x+(s.bottomRight.x-s.topRight.x)*c,y:s.topRight.y+(s.bottomRight.y-s.topRight.y)*c};a.push(`M${h.x} ${h.y}L${u.x} ${u.y}`);const f={x:s.topLeft.x+(s.topRight.x-s.topLeft.x)*c,y:s.topLeft.y+(s.topRight.y-s.topLeft.y)*c},p={x:s.bottomLeft.x+(s.bottomRight.x-s.bottomLeft.x)*c,y:s.bottomLeft.y+(s.bottomRight.y-s.bottomLeft.y)*c};a.push(`M${f.x} ${f.y}L${p.x} ${p.y}`)}return a.join("")}function Ey(t,e){return t.map(n=>{const r=Mt(e,[n.colorIndex]);return d(ht,{d:"M4 0L8 4L4 8L0 4Z",fill:r,x:n.x,y:n.y,width:ln.SIZE,height:ln.SIZE,"data-element-type":"shape"})})}function TH(t,e,n,r,i){return I(V,{x:e,y:0,width:Nt.WIDTH,height:Nt.HEIGHT,children:[I(ne,{children:[d(ht,{d:IH(),stroke:"#D9D9D9",strokeWidth:2}),d(ht,{d:`M${Nt.LINE_X} 25V260`,stroke:"#BFBFBF",strokeWidth:2,strokeLinecap:"round"}),d(Et,{x:Nt.RECT_X,y:Nt.RECT_Y,width:Nt.RECT_WIDTH,height:Nt.RECT_HEIGHT,fill:"#FFCB0E",fillOpacity:.2})]}),d(Ht,{children:Ey(r,i)}),d(Tt,{x:Nt.LINE_X-25,y:0,width:50,height:20,fontSize:20,fontWeight:"bold",alignHorizontal:"center",alignVertical:"top",fill:n,children:String(t+1).padStart(2,"0")})]})}function AH(t,e){const n=Nt.RECT_Y+Nt.RECT_HEIGHT/2-Nt.ARROW_HEIGHT/2,r=Math.max(Math.round(ln.MIN_COUNT*ln.ARROW_RATIO),ln.MIN_ARROW_COUNT),i=Sy({count:r,rectX:0,rectY:14,rectWidth:57,rectHeight:120,seed:999});return I(V,{x:t+Nt.WIDTH,y:n,children:[d(ht,{d:"M0 13.9679H57.1429V0L100 74L57.1429 148V134.032H0V13.9679Z",width:Nt.ARROW_WIDTH,height:Nt.ARROW_HEIGHT,fill:"#FFCB0E",fillOpacity:.2,"data-element-type":"shape"}),d(Ht,{children:Ey(i,e)})]})}const Iy=t=>{const{Title:e,Item:n,data:r,gap:i=20,options:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=Q(d(q,{indexes:[0]})),u=Q(d(n,{indexes:[0],data:r,datum:l[0],width:Nt.WIDTH,positionH:"center"})),f=[],p=[],g=[],y=Nt.HEIGHT+i,m=y+u.height+10;if(l.forEach((x,v)=>{const b=v*Nt.WIDTH,w=[v],_=Mt(o,w),$=EH(v,l.length),P=Sy({count:$,rectX:Nt.RECT_X,rectY:Nt.RECT_Y,rectWidth:Nt.RECT_WIDTH,rectHeight:Nt.RECT_HEIGHT,seed:v*100});f.push(TH(v,b,_,P,o)),v===l.length-1&&f.push(AH(b,o)),p.push(d(n,{indexes:w,datum:x,data:r,width:Nt.WIDTH,x:b+Nt.LINE_X-Nt.WIDTH/2,y,positionH:"center"})),g.push(d(Dt,{indexes:w,x:b+Nt.LINE_X-h.width/2,y:m})),v<l.length-1&&g.push(d(q,{indexes:[v+1],x:b+Nt.WIDTH-h.width/2,y:m}))}),l.length>0){g.unshift(d(q,{indexes:[0],x:-h.width/2,y:m}));const x=(l.length-1)*Nt.WIDTH;g.push(d(q,{indexes:[l.length],x:x+Nt.WIDTH-h.width/2,y:m}))}return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(V,{width:Nt.WIDTH*l.length+Nt.ARROW_WIDTH,height:Nt.HEIGHT+i+u.height,children:[d(V,{children:f}),d(Ct,{children:p}),d($t,{children:g})]})]})};It("sequence-filter-mesh",{component:Iy,composites:["title","item"]});const Ty=t=>{const{Title:e,Item:n,data:r,gap:i=30,cardPadding:o=10,options:s}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=re(s),f=ye({colorPrimary:u},s),p=Q(d(q,{indexes:[0]})),g=Q(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),y=[],m=[],x=[],v=g.width+o*2,b=g.height+o*2+30,w=8,_=6,$=Math.max(p.height+20,40),P=40;if(c.forEach((C,T)=>{const E=T%2===0,S=T*(v+i);let R;E?T%4===2?R=$:R=$+P:R=$+P+60;const O=[T],A=Mt(s,O)||u;if(E){const k=A===u?f.colorPrimaryBg||"#E8F3FF":`${A}20`,N=d(Et,{x:S,y:R,width:v,height:b,fill:k,rx:20,ry:20});x.push(N)}m.push(d(n,{indexes:O,datum:C,data:r,x:S+o,y:R+o,positionH:"center",positionV:"normal"}));const B=c.length*w+(c.length-1)*_,L=S+(v-B)/2,D=R+g.height+20;for(let k=0;k<c.length;k++){const N=L+k*(w+_),j=k===T;x.push(d(zt,{x:N,y:D,width:w,height:w,fill:j?A:"transparent",stroke:A,strokeWidth:2}))}y.push(d(Dt,{indexes:O,x:S+(v-p.width)/2,y:R+b+10})),T===0?y.push(d(q,{indexes:O,x:S+(v-p.width)/2,y:R-p.height-10})):y.push(d(q,{indexes:O,x:S-i/2-p.width/2,y:$-p.height-10}))}),c.length>0){const C=[],E=i/2,S=6,R=$+P,O=0-E,A=R+b/2;C.push(`M ${O} ${A-S}`),c.forEach((U,Y)=>{const G=Y%2===0,Z=Y*(v+i);let K;G?Y%4===2?K=$:K=$+P:K=$+P+60;const et=Z-E,st=Z+v+E,pt=K-E,ft=K+b+E,it=K+b/2;G?(C.push(`L ${et} ${pt+35}`),C.push(`Q ${et} ${pt} ${et+35} ${pt}`),C.push(`L ${st-35} ${pt}`),C.push(`Q ${st} ${pt} ${st} ${pt+35}`),C.push(`L ${st} ${it-S}`)):(C.push(`L ${et} ${it}`),C.push(`L ${et} ${ft-35}`),C.push(`Q ${et} ${ft} ${et+35} ${ft}`),C.push(`L ${st-35} ${ft}`),C.push(`Q ${st} ${ft} ${st} ${ft-35}`),C.push(`L ${st} ${it+S}`))});const B=c.length-1,L=B%2===0,D=B*(v+i);let k;L?B%4===2?k=$:k=$+P:k=$+P+60;const N=D+v+E,j=k+b/2,X=C.join(" "),z="gradient-zigzag-path",M=Mt(s,[0])||u,H=Mt(s,[c.length-1])||u,W=c.map((U,Y)=>{const G=Y/(c.length-1)*100,Z=Mt(s,[Y])||u;return d("stop",{offset:`${G}%`,stopColor:Z})});x.unshift(I(Ht,{children:[d(Lt,{children:d("linearGradient",{id:z,x1:O,y1:A,x2:N,y2:j,gradientUnits:"userSpaceOnUse",children:W})}),d(ht,{d:X,stroke:`url(#${z})`,strokeWidth:2,fill:"none",width:(c.length-1)*(v+i)+v+E*2,height:b+120})]})),x.unshift(d(zt,{x:O-S,y:A-S,width:S*2,height:S*2,fill:"transparent",stroke:M,strokeWidth:2})),x.unshift(d(zt,{x:N-S,y:j-S,width:S*2,height:S*2,fill:"transparent",stroke:H,strokeWidth:2}))}if(c.length>0){const T=(c.length-1)*(v+i);y.push(d(q,{indexes:[c.length],x:T+v+(i-p.width)/2,y:$-p.height-10}))}return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,I(V,{children:[d(ne,{children:x}),d(Ct,{children:m}),d($t,{children:y})]})]})};It("sequence-horizontal-zigzag",{component:Ty,composites:["title","item"]});var kH=Object.defineProperty,LH=Object.defineProperties,zH=Object.getOwnPropertyDescriptors,Ay=Object.getOwnPropertySymbols,HH=Object.prototype.hasOwnProperty,RH=Object.prototype.propertyIsEnumerable,ky=(t,e,n)=>e in t?kH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ys=(t,e)=>{for(var n in e||(e={}))HH.call(e,n)&&ky(t,n,e[n]);if(Ay)for(var n of Ay(e))RH.call(e,n)&&ky(t,n,e[n]);return t},Xs=(t,e)=>LH(t,zH(e));function DH(t){const{width:e,height:n,colorPrimary:r}=t,i=r,o=rt.mix(r,"#000",20).toHexString(),s=rt.mix(r,"#fff",50).toHexString(),a=rt.mix(s,"#000",15).toHexString();function l(P,C){const E=[{position:.25,offset:.1},{position:.45,offset:-.02},{position:.6,offset:.04},{position:.75,offset:-.1}],S={x:0,y:C},R={x:P,y:C},O={x:P/2,y:0},A={x:P/2,y:C},B=C*.35,L=B/C,D={x:O.x*(1-L)+S.x*L,y:B},k={x:O.x,y:B},N={x:O.x*(1-L)+R.x*L,y:B},j=E.map(M=>{const H=D.x+(N.x-D.x)*M.position,W=B,U=C*M.offset;return{x:H,y:W+U,position:M.position,offset:M.offset}});j.sort((M,H)=>M.position-H.position);const X=j.filter(M=>M.x<=k.x),z=j.filter(M=>M.x>k.x);return{leftBottom:S,rightBottom:R,peak:O,centerBottom:A,snowLineY:B,leftEdge:D,centerSnow:k,rightEdge:N,leftRipples:X,rightRipples:z}}const{leftRipples:c,rightRipples:h,leftBottom:u,rightBottom:f,peak:p,centerBottom:g,leftEdge:y,centerSnow:m,rightEdge:x}=l(e,n),v=[p,y,...c,m],b=[p,m,...h,x],w=[y,...c,m,g,u],_=[m,...h,x,f,g],$=P=>P.map(C=>`${C.x},${C.y}`).join(" ");return I(ne,Xs(Ys({},t),{children:[d("polygon",{points:$(v),fill:s}),d("polygon",{points:$(b),fill:a}),d("polygon",{points:$(w),fill:i}),d("polygon",{points:$(_),fill:o})]}))}function NH(t){const n={tiny:27,small:48,medium:54,large:72}[t]||54,r="#17C76F",i="#139B57",o="#737373",s=n*.7,a=n-s,l=s*.8,c=l,h=c/6,u=(c-h)/2,f=s;return I(ne,{width:c,height:n,children:[d("ellipse",{cx:l/2,cy:s/2,rx:l/2,ry:s/2,fill:r,clipPath:"inset(0 50% 0 0)"}),d("ellipse",{cx:l/2,cy:s/2,rx:l/2,ry:s/2,fill:i,clipPath:"inset(0 0 0 50%)"}),d("rect",{x:u,y:f,width:h,height:a,fill:o})]})}function jH(t){const{width:e,height:n}=t,r=e/2,i=n/2,o=Math.min(e,n)*.28,s=Math.min(e,n)*.14,a=Math.min(e,n)*.07,l=0,c=i-a/2,h=a*.4,u=8,f=Array.from({length:u},(p,g)=>{const y=360/u*g;return d("rect",{x:l,y:c,width:s,height:a,rx:h,ry:h,fill:"#FFCB0E",transform:`rotate(${y}, ${r}, ${i})`})});return I(ne,Xs(Ys({},t),{children:[d("circle",{cx:r,cy:i,r:o,fill:"#FFCB0E"}),...f]}))}function FH(t){return t.type==="single"?d(ne,Xs(Ys({},t),{width:54,height:36,children:d("path",{d:"M10.2635 13.3806C11.0019 9.99045 12.7381 6.91002 15.2405 4.55004C17.743 2.19007 20.8929 0.662716 24.2701 0.171643C27.6473 -0.31943 31.0914 0.24912 34.143 1.80148C37.1946 3.35385 39.7087 5.81625 41.3501 8.86031C44.8835 9.0468 48.1994 10.6544 50.5684 13.3294C52.9373 16.0044 54.1653 19.5277 53.9821 23.1242C53.7989 26.7207 52.2195 30.0959 49.5914 32.5071C46.9634 34.9184 43.5019 36.1683 39.9684 35.9818H11.1517C4.93436 35.9818 0 30.9593 0 24.6309C0.0598447 21.8016 1.13799 19.093 3.02989 17.0192C4.9218 14.9454 7.49584 13.6506 10.2635 13.3806Z",fill:"#70CAF8"})})):I(ne,Xs(Ys({},t),{width:73,height:40,children:[d("path",{d:"M61.6461 14.9716C60.8681 11.1875 58.9581 7.73823 56.1763 5.09315C53.3944 2.44806 49.8758 0.735682 46.0992 0.189041C42.3226 -0.357601 38.4714 0.288046 35.0699 2.03812C31.6683 3.7882 28.8815 6.5577 27.0889 9.96971C23.161 10.1687 19.4719 11.9405 16.8333 14.8953C14.1947 17.8502 12.8227 21.746 13.0191 25.7258C13.2155 29.7055 14.9642 33.4433 17.8806 36.1167C20.7969 38.7901 24.642 40.1802 28.5699 39.9812H60.6588C67.5702 39.9812 73.0006 34.4791 73.0006 27.4764C73.0006 20.9739 67.8664 15.4718 61.6461 14.9716Z",fill:"#70CAF8"}),d("path",{d:"M21.9691 6.47136e-09C25.9369 6.47136e-09 29.5264 1.62125 32.0003 4.21094C30.0604 5.7917 28.4423 7.75571 27.2581 10C23.3149 10.1989 19.6111 11.9702 16.9622 14.9238C14.3136 17.8774 12.936 21.772 13.1331 25.75C13.2057 27.2131 13.4902 28.6432 13.9652 30H10.7689C7.96116 29.8907 5.29664 28.7203 3.30402 26.7217C1.31144 24.7231 0.135825 22.0419 0.0110544 19.21C-0.113702 16.378 0.821178 13.6017 2.63019 11.4326C4.43921 9.26356 6.99065 7.8602 9.77766 7.5C11.9582 3.00012 16.6168 8.76701e-05 21.9691 6.47136e-09Z",fill:"#5BA2C6"})]}))}const Ly=t=>{const{Title:e,Item:n,data:r,gap:i=20,minHeight:o=100,maxHeight:s=200,minWidth:a=260,maxWidth:l=300,options:c}=t,{title:h,desc:u,items:f=[]}=r,p=e?d(e,{title:h,desc:u}):null,g=[],y=[],m=[],x=[],v=f.length,b=ye(c.themeConfig),w=60,_={single:{width:54,height:36},double:{width:73,height:40}},$=[],P=[];let C=0,T=0;f.forEach((j,X)=>{const z=v>1?X/(v-1):0,H=(o+(s-o)*z)*1.6,W=Math.max(a,Math.min(l,H));$.push(W);const U=T;P.push(U),T+=W/2,X===v-1&&(C=U+W)});const E=P[0],S=P[v-1]+$[v-1],R=S-E,O=v>1?(R-i*(v-1))/v:R,A=Q(d(n,{indexes:[0],data:r,datum:f[0],width:O})),B=32,L=s+i,D=L+B+10;f.forEach((j,X)=>{const z=[X],M=o+(s-o)*(v>1?X/(v-1):0),H=$[X],W=P[X],U=s-M,Y=Mt(c,[X])||b.colorPrimary;m.push(d(DH,{colorPrimary:Y,x:W,y:U,width:H,height:M}));const G=E+X*(O+i);x.push(d(Tt,{x:G,y:L,width:O,height:B,fontSize:16,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:Y,backgroundColor:Y,backgroundOpacity:.5,backgroundRadius:4,children:String(X+1).padStart(2,"0")})),g.push(d(n,{indexes:z,datum:j,data:r,x:G,y:D,width:O}))});const k=Q(d(q,{indexes:[0]})),N=D+A.height+10;if(f.forEach((j,X)=>{const z=[X],M=E+X*(O+i);y.push(d(Dt,{indexes:z,x:M+O/2-k.width/2,y:N})),X<f.length-1&&y.push(d(q,{indexes:[X+1],x:M+O+i/2-k.width/2,y:N}))}),v>0){const j=E;y.unshift(d(q,{indexes:[0],x:j-i/2-k.width/2,y:N}));const X=E+(v-1)*(O+i);y.push(d(q,{indexes:[v],x:X+O+i/2-k.width/2,y:N})),m.push(d(jH,{x:C-w-20,y:-35,width:w,height:w}));const z=["tiny","small","medium","large"],M={tiny:27,small:48,medium:54,large:72},H={tiny:14.85,small:26.4,medium:29.7,large:39.6},W=[],U=(G,Z,K=5)=>W.some(et=>!(G+Z+K<et.x||G>et.x+et.width+K));f.forEach((G,Z)=>{const K=P[Z],et=$[Z],pt=Z===v-1?3:Z===0?1:2;for(let ft=0;ft<pt;ft++){const it=Z*100+ft*37,tt=it*17%z.length,nt=z[tt],at=M[nt],vt=H[nt];let gt=0,dt=0,ct=!1;for(;gt<20&&!ct;){const ut=(it*13+gt*19)%100/100,mt=K+et*.15,Ot=K+et*.85-vt;dt=mt+(Ot-mt)*ut,U(dt,vt)||(ct=!0),gt++}if(ct){W.push({x:dt,width:vt});const ut=s-at;m.push(d(V,{x:dt,y:ut,children:NH(nt)}))}}});const Y=Math.max(1,Math.floor(v/1.5));for(let G=0;G<Y;G++){const Z=G*11+v*5+1,K=Z%2===0?"single":"double",et=_[K],st=S-E-et.width,pt=E+Z*7%100/100*st,ft=Z*13%40;m.push(d(FH,{type:K,x:pt,y:ft,width:et.width,height:et.height}))}}return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,I(V,{children:[d(V,{children:m}),d(V,{children:x}),d(Ct,{children:g}),d($t,{children:y})]})]})};It("sequence-mountain",{component:Ly,composites:["title","item"]});const Gs=t=>Math.round(t*1e10)/1e10,ph=(t,e)=>Gs(Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))),qs=Math.PI,BH=qs*2,WH=(t,e)=>{const n=e-t;return n>qs&&n<BH||n<0&&n>-qs?-1:1},VH=(t,e,n,r,i,o)=>{const s=Math.atan2(t.y-e.y,t.x-e.x),a=Math.atan2(n.y-e.y,n.x-e.x),l=Math.acos((r*r+o*o-i*i)/(2*r*o)),c=1/Math.tan(l/2),h=WH(s,a),u=s+h*l/2;return{prev:s,next:a,main:l,vel:c,dir:h,bis:u}},gh=Math.PI,YH=(t,e,n)=>t.reduce((r,i)=>{const{x:o,y:s,angle:{prev:a,next:l},arc:{x:c,y:h,radius:u}}=i,f=i.angle.dir*-1,p=a+f*gh/2,g=(f*gh+l-a)%gh,y=n-1,m=g/y,x=[];if(!m)return r.concat({x:o,y:s});for(let v=0;v<=y;v++)x.push({x:c+Math.cos(p+m*v)*u,y:h+Math.sin(p+m*v)*u});return r.concat(x)},[]),XH=(t,e=0)=>{const n=t.length,r=[],i=[],o=[];t.forEach((l,c)=>{const h=t[(c-1+n)%n],u=t[(c+1)%n],f=ph(h,l),p=ph(h,u),g=ph(l,u),y=VH(h,l,u,f,p,g);y.main===0&&(y.main=Number.EPSILON,y.vel=Number.MAX_SAFE_INTEGER),y.main===qs&&(y.vel=0);const m={x:l.x,y:l.y,angle:y,offset:0,arc:{radius:e,hit:e,lim:Math.min(g/y.vel,f/y.vel,l.r||0)},in:{length:f,rest:f},out:{length:g,rest:g},locked:!1,id:c,get prev(){return r[(c-1+n)%n]},get next(){return r[(c+1)%n]}};isNaN(y.main)&&(y.main=0,y.bis=y.prev||y.next,o.push(m)),typeof l.r=="number"&&(l.r===0?o.push(m):i.push(m)),r.push(m)}),o.forEach(l=>{l.angle.vel=0,l.arc.radius=0,mh(l)}),r.forEach(l=>{l.arc.hit=Math.min(l.out.rest/(l.angle.vel+l.next.angle.vel),l.in.rest/(l.angle.vel+l.prev.angle.vel))});let s=Us(i);for(;s;)GH(s),s=Us(i);for(s=Us(r);s;)qH(s,e),s=Us(r);const a=r.map(l=>{const c=l.arc.radius/Math.sin(l.angle.main/2);return{id:l.id,x:l.x,y:l.y,angle:{main:Gs(l.angle.main),prev:l.angle.prev,next:l.angle.next,bis:l.angle.bis,dir:l.angle.dir},offset:Gs(l.offset),arc:{radius:Gs(l.arc.radius),x:l.x+(Math.cos(l.angle.bis)*c||0),y:l.y+(Math.sin(l.angle.bis)*c||0)},in:{length:l.in.length,x:l.x+Math.cos(l.angle.prev)*l.offset,y:l.y+Math.sin(l.angle.prev)*l.offset},out:{length:l.out.length,x:l.x+Math.cos(l.angle.next)*l.offset,y:l.y+Math.sin(l.angle.next)*l.offset},get prev(){return a[(l.id-1+n)%n]},get next(){return a[(l.id+1)%n]}}});return a},GH=t=>{const{prev:e,next:n}=t;e.locked&&!n.locked?t.arc.radius=Math.min(Math.max((t.out.length-n.arc.lim*n.angle.vel)/t.angle.vel,t.out.length/(t.angle.vel+n.angle.vel)),t.in.rest/t.angle.vel,t.arc.lim):n.locked&&!e.locked?t.arc.radius=Math.min(Math.max((t.in.length-e.arc.lim*e.angle.vel)/t.angle.vel,t.in.length/(t.angle.vel+e.angle.vel)),t.out.rest/t.angle.vel,t.arc.lim):n.locked&&e.locked?t.arc.radius=Math.min(t.in.rest/t.angle.vel,t.out.rest/t.angle.vel,t.arc.lim):t.arc.radius=Math.min(Math.max((t.in.length-e.arc.lim*e.angle.vel)/t.angle.vel,t.in.length/(t.angle.vel+e.angle.vel)),Math.max((t.out.length-n.arc.lim*n.angle.vel)/t.angle.vel,t.out.length/(t.angle.vel+n.angle.vel)),t.arc.lim),mh(t)},qH=(t,e)=>{if(e>t.arc.hit){const{prev:n,next:r}=t;n.locked&&!r.locked?t.arc.radius=Math.max(Math.min(t.in.rest/t.angle.vel,t.out.length/(t.angle.vel+r.angle.vel),t.arc.radius),0):r.locked&&!n.locked?t.arc.radius=Math.max(Math.min(t.out.rest/t.angle.vel,t.in.length/(t.angle.vel+n.angle.vel),t.arc.radius),0):r.locked&&n.locked?t.arc.radius=Math.max(Math.min(t.in.rest/t.angle.vel,t.out.rest/t.angle.vel,t.arc.radius),0):t.arc.radius=t.arc.hit}mh(t)},mh=t=>{const{prev:e,next:n}=t;t.offset=t.arc.radius*t.angle.vel,e.out.rest-=t.offset,t.in.rest-=t.offset,t.out.rest-=t.offset,n.in.rest-=t.offset,t.locked=!0,e.arc.hit=Math.min(e.in.length/(e.angle.vel+e.prev.angle.vel),e.in.rest/e.angle.vel,e.out.rest/e.angle.vel),n.arc.hit=Math.min(n.out.length/(n.angle.vel+n.next.angle.vel),n.out.rest/n.angle.vel,n.in.rest/n.angle.vel)},Us=t=>t.reduce((e,n)=>n.locked?e:e?n.arc.hit<e.arc.hit?n:e:n,null),zy=t=>{const{Title:e,Item:n,data:r,gap:i=10,width:o=700,pyramidWidth:s,itemHeight:a=60,options:l}=t,{title:c,desc:h,items:u=[]}=r,f=e?d(e,{title:c,desc:h}):null;if(u.length===0)return d(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:f});const p=5,g=ye(l.themeConfig),y=30,m=[],x=[],v=[],b=[],w=s!=null?s:o*.6,_=o-w,$=a*1.2,P=u.length*$+(u.length-1)*i;return u.forEach((C,T)=>{const E=[T],S=T===0,R=Mt(l,[T])||g.colorPrimary,{points:O,topWidth:A,bottomWidth:B}=UH(w,$,i,u.length,T),L=XH(O,p),D=YH(L,"AMOUNT",10),k=w/2,N=T*($+i),j=($-a)/2,X=N+j,z=k+A/2,M=k+B/2,W=z-p,U=_+p,Y=a,G=W+U,Z=k-y/2,K=N+$/2-y/2+(S?8:0),et=M,st=G-M,pt=X;v.push(d(Et,{x:W,y:X,width:U,height:Y,ry:"10",fill:g.colorPrimaryBg,"data-element-type":"shape"}));const ft=`${R}-pyramid-${T}`;x.push(d(Lt,{children:I("linearGradient",{id:ft,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0","stop-color":R}),d("stop",{offset:"100%","stop-color":rt.mix(R,"#fff",40).toHexString()})]})}),d(Ne,{points:D,fill:`url(#${ft})`,y:N,"data-element-type":"shape"})),b.push(d(be,{indexes:E,x:Z,y:K,size:y,fill:"#fff"})),m.push(d(n,{indexes:E,datum:C,data:r,x:et,y:pt,width:st,height:a,positionV:"middle"}))}),I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,I(V,{width:o,height:P,children:[d(V,{children:v}),d(V,{children:x}),d(V,{children:b}),d(Ct,{children:m}),d($t,{})]})]})};function UH(t,e,n,r,i){const o=t/2,s=r*e+(r-1)*n,a=i*(e+n),l=a+e,c=a/s*t,h=l/s*t;let u;if(i===0){const f={x:o,y:0},p={x:o+h/2,y:e},g={x:o-h/2,y:e};u=[f,p,g]}else{const f={x:o+c/2,y:0},p={x:o+h/2,y:e},g={x:o-h/2,y:e},y={x:o-c/2,y:0};u=[f,p,g,y]}return{points:u,topWidth:c,bottomWidth:h}}It("sequence-pyramid",{component:zy,composites:["title","item"]});const Fi={iconSize:50,roadWidth:24,outerRadius:60,rowWidth:400,spacing:30,colorDefault:"#666666"},Hy=(t,e)=>`M ${t} ${e}`,Qt=(t,e)=>`L ${t} ${e}`,Nr=(t,e,n,r)=>`A ${t} ${t} 0 0 ${e} ${n} ${r}`,ZH=(t,{roadWidth:e,innerRadius:n,outerRadius:r})=>{const i=(e+n*2)*t;return{y1:i,y2:i+e,y3:i+e+n,y4:i+e+n*2,y5:i+r*2}};function KH({i:t,direction:e,x:n,y:r,color:i,data:o,itemBounds:s,item:a,Item:l,flipped:c}){const{iconSize:h}=Fi,u=e==="left",f=u?n.x4-h/2:n.x3-h/2,p=r.y3-h/2,g=u?n.x6+Fi.spacing:n.x1-Fi.spacing-s.width,y=r.y3-s.height/2,m=u?c?"flipped":"normal":c?"normal":"flipped";return{icon:d(nr,{indexes:[t],x:f,y:p,size:h,fill:i}),label:d(Tt,{width:40,x:u?f-50:f+h+10,y:p+h/2-15,fontSize:30,fill:i,alignHorizontal:u?"right":"left",children:String(t+1).padStart(2,"0")}),item:d(l,{indexes:[t],data:o,datum:a,x:g,y,positionH:m})}}function QH({direction:t,x:e,y:n,color:r,elements:i}){const o=t==="left";i.push(d(aH,{x:o?e.x6+10:e.x1-20,y:n.y3-5,width:10,height:8,rotation:o?90:-90,colorPrimary:r,"data-element-type":"shape"}))}const Ry=t=>{const{Title:e,Item:n,data:r,spacing:i=Fi.spacing,options:o,flipped:s=!1}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=Q(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),{roadWidth:f,outerRadius:p,rowWidth:g,colorDefault:y}=Fi,m=f/2,x=p-f,v=(u.width+i)*2+g,b=u.width+i,w=b+p,_=b+g-p,P=_+x+f,C=b+g/2,T=[],E=[],S=[],R=[],O=[],A=[],B=[];for(let k=0;k<c.length;k++){const N=Mt(o,[k])||y,j=k%2===0?"right":"left",X=k===0,z=k===c.length-1,M=ZH(k,{roadWidth:f,innerRadius:x,outerRadius:p});if(j==="right"){const Y=X?[P,M.y1]:[_,M.y1],G=[w,M.y1],Z=[w,M.y5],K=X?[P,M.y2]:[_,M.y2],et=[w,M.y2];if(T.push(X?Hy(P,M.y1+m):Qt(_,M.y1+m),Qt(w,M.y1+m),Nr(p-m,0,w,M.y4+m)),E.push(X?Hy(...Y):Qt(...Y),Qt(...G),Nr(p,0,...Z)),S.push(Qt(...K),Qt(...et),Nr(x,1,...et)),z){const st=f/2;E.push(Qt(C,M.y5),Qt(C,M.y5+st),Qt(C+f,M.y5-st),Qt(C,M.y4-st),Qt(C,M.y4),Qt(w,M.y4)),T.push(Qt(C,M.y4+m))}}else{const Y=[w,M.y2],G=[_,M.y2],Z=[_,M.y4],K=[w,M.y1],et=[_,M.y1];if(T.push(Qt(_,M.y1+m),Nr(p-m,1,_,M.y4+m)),E.push(Qt(...Y),Qt(...G),Nr(x,1,...Z)),S.push(Qt(...K),Qt(...et),Nr(p,0,...et)),z){const st=f/2;E.push(Qt(C,M.y4),Qt(C,M.y4-st),Qt(C-f,M.y4+st),Qt(C,M.y5+st),Qt(C,M.y5),Qt(_,M.y5)),T.push(Qt(C,M.y4+m))}}QH({direction:j,x:{x1:b,x6:P},y:M,color:N,elements:B});const{icon:H,label:W,item:U}=KH({i:k,direction:j,x:{x1:b,x3:w,x4:_,x6:P},y:M,color:N,data:r,itemBounds:u,item:c[k],Item:n,flipped:s});R.push(H),O.push(W),A.push(U)}const L=[...E,...S.reverse(),"Z"],D=c.length*(f+x*2)+f*1.5;return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,I(V,{width:v,height:u.height<=p*2?D:D+u.height-p*2,children:[d(ht,{width:g,height:D,d:L.join(" "),fill:y,stroke:y,strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"}),d(ht,{d:T.join(" "),stroke:"white",fill:"none",strokeWidth:"3",strokeDasharray:"8 8",strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"}),I(Ht,{children:[R,O,A,B]})]})]})};It("sequence-roadmap-vertical",{component:Ry,composites:["title","item"]});const Dy=t=>{const{Title:e,Item:n,data:r,gap:i=40,itemsPerRow:o=3,rowGap:s=80,options:a}=t,{title:l,desc:c,items:h=[]}=r,u=e?d(e,{title:l,desc:c}):null,f=re(a),p=Q(d(q,{indexes:[0]})),g=Q(d(n,{indexes:[0],data:r,datum:h[0],positionH:"center"})),y=[],m=[],x=[],v=25,b=25;if(h.forEach((w,_)=>{const $=Math.floor(_/o),P=_%o,C=$%2===1,E=(C?o-1-P:P)*(g.width+i),S=$*(g.height+s),R=[_];if(m.push(d(n,{indexes:R,datum:w,data:r,x:E,y:S,positionH:"center"})),y.push(d(Dt,{indexes:R,x:E+(g.width-p.width)/2,y:S+g.height+10})),_===0&&y.push(d(q,{indexes:R,x:E+(g.width-p.width)/2,y:S-p.height-10})),_<h.length-1){const O=Math.floor((_+1)/o),A=(_+1)%o,D=(O%2===1?o-1-A:A)*(g.width+i);if($===O){const N=C,j=N?D+g.width+(i-v)/2:E+g.width+(i-v)/2,X=S+g.height/2-b/2;x.push(d(fh,{x:j,y:X,width:v,height:b,colorPrimary:f,rotation:N?180:0})),y.push(d(q,{indexes:[_+1],x:j+(v-p.width)/2,y:S-p.height-10}))}else{const N=E+g.width/2-v/2,j=S+g.height+(s-b)/2;x.push(d(fh,{x:N,y:j,width:v,height:b,colorPrimary:f,rotation:90})),y.push(d(q,{indexes:[_+1],x:N+(v-p.width)/2,y:j+(b-p.height)/2}))}}}),h.length>0){const w=h.length-1,_=Math.floor(w/o),$=w%o,T=(_%2===1?o-1-$:$)*(g.width+i),E=_*(g.height+s);y.push(d(q,{indexes:[h.length],x:T+(g.width-p.width)/2,y:E+g.height+p.height+20}))}return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,I(V,{children:[d(V,{children:x}),d(Ct,{children:m}),d($t,{children:y})]})]})};It("sequence-snake-steps",{component:Dy,composites:["title","item"]});const Ny=t=>{const{Title:e,Item:n,data:r,options:i,gap:o=16,perspectiveFactor:s=.2,width:a=720}=t,{title:l,desc:c,items:h=[]}=r,u=e,f=u?d(u,{title:l,desc:c}):null;if(h.length===0)return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,d(V,{children:d($t,{children:d(q,{indexes:[0],x:0,y:0})})})]});const p=re(i),g=Q(d(q,{indexes:[0]})),y=Q(d(n,{indexes:[0],data:r,datum:h[0]||{},positionH:"center"})),m=12,x=Math.min(a*.1,100),v=Math.min(a*.45,Math.max(80,a-y.width-m-x)),b=Math.max(24,v*s*.35),w=56,_=w*.7,$=h.length>1?(w-_)/(h.length-1):0,P=Math.max(g.height+b+20,b+28),C=v/2,T=v+x+m,E=h.map((tt,nt)=>w-$*nt),S=h.map((tt,nt)=>Math.max(b*(1-nt*.05),b*.7)),R=[],O=[],A=h.length-1;R[A]=P,O[A]=0;for(let tt=A-1;tt>=0;tt-=1)O[tt]=O[tt+1]+S[tt]+o,R[tt]=R[tt+1]+S[tt]+E[tt+1]+o;const B=O[0]||S[0]||b,L=v*(.55+s*.1),D=v-L,k=h.map((tt,nt)=>{const at=B===0?1:O[nt]/B;return L+D*at}),N=k.map(tt=>{const nt=C+tt/2;return Math.max(0,T-m-nt)}),j=[],X=[],z=[],M=[],H=[],W=0,U=(R[0]||P)+(E[0]||w),Y=U-W,G=35,K=(k[A]||L)*.8,et=K*.65,st=(k[0]||v)*.9;H.push(d(Ne,{points:[{x:C,y:W},{x:C+K/2,y:W+G},{x:C+et/2,y:W+G},{x:C+st/2,y:U},{x:C-st/2,y:U},{x:C-et/2,y:W+G},{x:C-K/2,y:W+G}],fill:"rgba(0,0,0,0.12)",width:st,height:Y,"data-element-type":"shape"}));let pt=R[A]+E[A]/2;h.forEach((tt,nt)=>{const at=[nt],vt=k[nt],gt=S[nt],dt=C-vt/2,ct=E[nt],ut=R[nt],mt=ut-gt,Ot=ut+ct/2,yt=Mt(i,at)||p;j.push(d(Et,{x:dt,y:ut,width:vt,height:ct,fill:yt,"data-element-type":"shape"}),d(Ne,{points:[{x:dt,y:ut},{x:dt+vt,y:ut},{x:dt+vt-gt/2,y:mt},{x:dt+gt/2,y:mt}],fill:yt,opacity:"0.3",width:vt,height:gt,"data-element-type":"shape"}),d(Tt,{x:dt,y:ut,width:vt,height:ct,fontSize:ct/2,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:"#ffffff",children:String(nt+1).padStart(2,"0")}));const St=dt+vt,te=Ot,he=N[nt],ve=St+he;M.push(d(ht,{d:`M ${St} ${te} L ${ve} ${te}`,stroke:yt,strokeWidth:2,fill:"none",width:he,height:2,"data-element-type":"shape"}),d(ht,{d:`M ${ve} ${te} L ${ve} ${te}`,stroke:yt,strokeWidth:6,strokeLinecap:"round",width:1,height:1,"data-element-type":"shape"}));const Ut=Ot-y.height/2;X.push(d(n,{indexes:at,datum:tt,data:r,x:T,y:Ut,positionV:"middle"})),z.push(d(Dt,{indexes:at,x:T+y.width+10,y:Ut+y.height/2-g.height/2})),nt===0?z.push(d(q,{indexes:[0],x:T+(y.width-g.width)/2,y:Ut-g.height-12})):z.push(d(q,{indexes:at,x:T+(y.width-g.width)/2,y:(pt+Ot)/2-g.height/2})),pt=Ot});const it=pt-y.height/2;return z.push(d(q,{indexes:[h.length],x:T+(y.width-g.width)/2,y:it+y.height+12})),I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,I(V,{children:[d(V,{children:H}),d(V,{children:j}),d(V,{children:M}),d(Ct,{children:X}),d($t,{children:z})]})]})};It("sequence-stairs-front",{component:Ny,composites:["title","item"]});const jy=t=>{const{Title:e,Item:n,data:r,gap:i=40,options:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=re(o),u=Q(d(q,{indexes:[0]})),f=Q(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),p=[],g=[],y=[],m=25,x=25,v=Math.max(u.height+20,30);if(l.forEach((b,w)=>{const _=w*(f.width+i),$=[w];if(g.push(d(n,{indexes:$,datum:b,data:r,x:_,y:v,positionH:"center"})),p.push(d(Dt,{indexes:$,x:_+(f.width-u.width)/2,y:v+f.height+10})),w===0?p.push(d(q,{indexes:$,x:_+(f.width-u.width)/2,y:v-u.height-10})):p.push(d(q,{indexes:$,x:_-i/2-u.width/2,y:v-u.height-10})),w<l.length-1){const P=_+f.width+(i-m)/2,C=v+f.height/2-x/2;y.push(d(fh,{x:P,y:C,width:m,height:x,colorPrimary:h}))}}),l.length>0){const b=(l.length-1)*(f.width+i);p.push(d(q,{indexes:[l.length],x:b+f.width+(i-u.width)/2,y:v-u.height-10}))}return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(V,{children:[d(V,{children:y}),d(Ct,{children:g}),d($t,{children:p})]})]})};It("sequence-steps",{component:jy,composites:["title","item"]});const Fy=t=>{const{Title:e,Item:n,data:r,gap:i=10,options:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=re(o),u=y1(o),f=Q(d(q,{indexes:[0]})),p=Q(d(n,{indexes:[0],data:r,datum:l[0],positionH:"normal"})),g=[],y=[],m=[],x=10,v=x+70+10,b=v+30,w=6;if(l.length>1){const _=p.height/2+w,$=(l.length-1)*(p.height+i)+p.height/2-w,P=`M ${v} ${_} L ${v} ${$}`,C="gradient-timeline-line",T=$-_,E=l.map((S,R)=>{const A=(R*(p.height+i)+p.height/2-_)/T*100,B=Mt(o,[R]);return d("stop",{offset:`${A}%`,stopColor:B||h})});m.push(I(Ht,{children:[d(Lt,{children:d("linearGradient",{id:C,x1:v,y1:_,x2:v,y2:$,gradientUnits:"userSpaceOnUse",children:E})}),d(ht,{d:P,stroke:`url(#${C})`,strokeWidth:2,width:1,height:$-_})]}))}if(l.forEach((_,$)=>{const P=$*(p.height+i),C=P+p.height/2,T=[$];m.push(d(Tt,{x,y:C,width:70,fontSize:18,fontWeight:"bold",alignHorizontal:"left",alignVertical:"middle",fill:u[$%u.length],children:`STEP ${$+1}`})),y.push(d(n,{indexes:T,datum:_,data:r,x:b,y:P,positionH:"normal"})),m.push(d(zt,{x:v-w,y:C-w,width:w*2,height:w*2,fill:u[$%u.length]})),g.push(d(Dt,{indexes:T,x:b-f.width-10,y:P+(p.height-f.height)/2})),$===0?g.push(d(q,{indexes:T,x:b+(p.width-f.width)/2,y:P-f.height-10})):g.push(d(q,{indexes:T,x:b+(p.width-f.width)/2,y:P-i/2-f.height/2}))}),l.length>0){const _=(l.length-1)*(p.height+i);g.push(d(q,{indexes:[l.length],x:b+(p.width-f.width)/2,y:_+p.height+10}))}return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(V,{children:[d(ne,{children:m}),d(Ct,{children:y}),d($t,{children:g})]})]})};It("sequence-timeline",{component:Fy,composites:["title","item"]});const yh=120,vh=108,Zs=30,JH="M4.49144e-05 34.4898C4.49144e-05 37.8786 0.848973 41.152 2.43571 44.2444C4.23516 47.7642 6.98514 51.0472 10.517 54.0009C21.331 63.047 39.4615 68.9814 59.9991 68.9814C80.5385 68.9814 98.6672 63.047 109.483 54.0009C113.013 51.0472 115.765 47.7642 117.564 44.2444C119.149 41.152 120 37.8786 120 34.4898C120 15.4407 93.1364 0 59.9991 0C26.8635 0 4.49144e-05 15.4407 4.49144e-05 34.4898Z",tR="M4.49145e-05 34.4898V53.9991C4.49145e-05 57.3879 0.848973 60.6613 2.43571 63.7556C9.75425 78.0545 32.7562 88.4907 59.999 88.4907C87.2438 88.4907 110.246 78.0545 117.564 63.7556C119.149 60.6613 120 57.3879 120 53.9991V34.4898C120 37.8786 119.149 41.152 117.564 44.2444C115.765 47.7642 113.013 51.0472 109.483 54.0009C98.6672 63.047 80.5385 68.9814 59.999 68.9814C39.4615 68.9814 21.3309 63.047 10.5169 54.0009C6.98509 51.0472 4.23516 47.7642 2.43567 44.2444C0.848928 41.152 4.49145e-05 37.8786 4.49145e-05 34.4898Z",eR="M0 53.9991V73.5102C0 92.5593 26.8634 108 59.999 108C93.1363 108 120 92.5593 120 73.5102V53.9991C120 57.3879 119.149 60.6613 117.564 63.7556C110.246 78.0545 87.2438 88.4907 59.999 88.4907C32.7562 88.4907 9.75425 78.0545 2.43571 63.7556C0.848973 60.6613 0 57.3879 0 53.9991Z",By=I("filter",{id:"sequence-zigzag-pucks-3d-shadow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[d("feOffset",{dx:"-7",dy:"7",in:"SourceAlpha",result:"offset"}),d("feGaussianBlur",{stdDeviation:"7.5",in:"offset",result:"blurred"}),d("feColorMatrix",{in:"blurred",type:"matrix",values:`0 0 0 0 0
134
134
  0 0 0 0 0
135
135
  0 0 0 0 0
136
- 0 0 0 0.3 0`,result:"shadow"}),d("feBlend",{mode:"normal",in:"SourceGraphic",in2:"shadow"})]}),ky=t=>{const{Title:e,Item:n,data:r,options:i,gap:o=80}=t,s=fh,a=ph,{title:l,desc:c,items:h=[]}=r,u=e?d(e,{title:l,desc:c}):null,f=re(i);if(h.length===0)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d(zt,{children:Ay}),u,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:0,y:0})})})]});const p=Q(d(n,{indexes:[0],data:r,datum:h[0],positionH:"center"})),g=Q(d(q,{indexes:[0]})),y=[],m=[],b=[];let v=-1/0;const x=p.height+Zs+a;return h.forEach((w,_)=>{const $=[_],P=Ct(i,$),O=_%2===0,T=_*(s+o),I=O?0:p.height+Zs,S=`puck-gradient-middle-${_}`,H=`puck-gradient-bottom-${_}`;b.push(E(Y,{x:T,y:I,id:`puck-${_}`,width:s,height:a,filter:"url(#sequence-zigzag-pucks-3d-shadow-filter)",children:[E(zt,{children:[E("linearGradient",{id:S,x1:"115",y1:"55.9991",x2:"15.0002",y2:"55.9991",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:P||f}),d("stop",{offset:"1",stopColor:P||f,stopOpacity:"0.6"})]}),E("linearGradient",{id:H,x1:"115",y1:"72.1803",x2:"15.0002",y2:"72.1803",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:"#F4F4FB"}),d("stop",{offset:"1",stopColor:"#8E8C90"})]})]}),E(ne,{width:fh,height:ph,children:[d(ht,{d:zR,fill:P||f}),d(ht,{d:LR,fill:`url(#${S})`}),d(ht,{d:RR,fill:`url(#${H})`}),d("rect",{fill:"transparent",y:ph,width:fh,height:20})]}),d("text",{x:65,y:40,width:50,height:50,fontSize:40,fontWeight:"bold",fill:"#FFFFFF",textAnchor:"middle",dominantBaseline:"middle",transform:"rotate(-15 65 40) scale(1, 0.8)",children:_+1})]}));const C=T+(s-p.width)/2,A=O?I+a+Zs:I-Zs-p.height;if(v=Math.max(v,A+p.height),m.push(d(n,{indexes:$,datum:w,data:r,x:C,y:A,positionH:"center"})),y.push(d(Ft,{indexes:$,x:C+p.width-g.width/2,y:A+p.height-g.height/2})),_===0&&y.push(d(q,{indexes:[0],x:T+s/2-g.width/2-(o+s)/2,y:I+a/2-g.height/2})),_<h.length-1){const k=(_+1)%2===0?0:x,D=T+s+o/2-g.width/2,z=(I+a/2+k+a/2)/2-g.height/2;y.push(d(q,{indexes:[_+1],x:D,y:z}))}else y.push(d(q,{indexes:[h.length],x:T+s+o/2-g.width/2,y:I+a/2-g.height/2}))}),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[d(zt,{children:Ay}),u,E(Y,{x:0,y:0,children:[d(Y,{children:b}),d(It,{children:m}),d(Ot,{children:y})]})]})};Tt("sequence-zigzag-pucks-3d",{component:ky,composites:["title","item"]});const HR=240,DR=130,NR=105,dr=12,jR=120,zy=50,FR=.6,BR="M132.821 50.6599L87.6795 76.8925C78.0629 82.4807 62.4238 82.4807 52.7445 76.8925L7.30824 50.6599C2.43719 47.8482 0.00459679 44.1562 0.0152907 40.472L3.17695e-05 45.6925C-0.0101404 49.378 2.42245 53.0686 7.29298 55.8803L52.7289 82.1129C62.4094 87.7011 78.0485 87.7011 87.6652 82.1129L132.806 55.8803C137.583 53.1038 139.975 49.4705 139.986 45.832L140 40.6116C139.989 44.2501 137.598 47.8834 132.821 50.6599Z",Ly="M132.707 30.4224C142.386 36.0119 142.437 45.0704 132.821 50.6599L87.6795 76.8925C78.0629 82.4807 62.4238 82.4807 52.7445 76.8925L7.30825 50.6599C-2.37126 45.0717 -2.42225 36.0132 7.19414 30.4237L52.335 4.19115C61.9517 -1.39705 77.5908 -1.39705 87.2713 4.19115L132.707 30.4224Z",Ry=70+dr/2,Hy=40+dr/2,Dy=d("filter",{id:"sequence-zigzag-glow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",children:d("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"15",result:"blur"})}),Ny=t=>{var e;const{Title:n,Item:r,data:i,options:o,dx:s=HR,dy:a=DR,iconSize:l=30}=t,{title:c,desc:h,items:u=[]}=i,f=n?d(n,{title:c,desc:h}):null,p=re(o);if(u.length===0)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d(zt,{children:Dy}),f,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:0,y:0})})})]});const g=Q(d(r,{indexes:[0],data:i,datum:u[0]})),y=Q(d(q,{indexes:[0]})),m=[],b=[],v=[],x=[],w=[];let _=0,$=0,P="",O=1/0,T=-1/0,I=1/0,S=1/0;const H=[];u.forEach((B,k)=>{const D=_,z=$;H.push({x:D,y:z}),O=Math.min(O,z);const N=D-Ry,j=z-Hy;I=Math.min(I,N),S=Math.min(S,j);const X=k%2===0;k<u.length-1&&(_+=s,$=X?$+a:$-a)});const C=Math.max(0,-I),A=Math.max(0,-S);if(_=0,$=0,u.forEach((B,k)=>{const D=[k],z=H[k],N=z.x+C,j=z.y+A,X=Ct(o,D),L=Math.max(0,N-Ry),M=Math.max(0,j-Hy),R=10,W=zy+10,{colorPrimaryBg:U}=xe({colorPrimary:X});if(x.push(E(ne,{x:L,y:M,width:140,height:110,children:[d(Lt,{x:R,y:W,width:jR,height:zy,fill:X||p,filter:"url(#sequence-zigzag-glow-filter)",opacity:FR}),d(ht,{d:BR,fill:X||p}),d(ht,{d:Ly,fill:"#fff"}),d(ht,{d:Ly,fill:U||U})]})),B.icon){const Z=Math.max(0,N-l/2-dr/2),K=Math.max(0,j-l/2-dr/2);w.push(d(be,{x:Z,y:K,size:l,indexes:D,fill:X}))}const V=N-g.width/2-dr/2,G=Math.max(0,j+NR-dr/2);if(T=Math.max(T,G+g.height),k===0?P=`M ${N} ${j}`:P+=` L ${N} ${j}`,b.push(d(r,{indexes:D,datum:B,data:i,x:V,y:G})),m.push(d(Ft,{indexes:D,x:Math.max(0,V+g.width-y.width/2),y:Math.max(0,G+g.height-y.height/2)})),k<u.length-1){const Z=H[k+1],K=Z.x+C,nt=Z.y+A,at=Math.max(0,N+(K-N)/2-y.width/2),pt=Math.max(0,j+(nt-j)/2-y.height/2);m.push(d(q,{indexes:[k+1],x:at,y:pt}))}else m.push(d(q,{indexes:[u.length],x:Math.max(0,V+g.width+s/4),y:Math.max(0,G+g.height/2-y.height/2)}))}),P){const B=(((e=H[H.length-1])==null?void 0:e.x)||0)+C;v.push(d(ht,{d:P,stroke:"#f3f2f1",strokeWidth:dr,fill:"none",width:B,height:T-Math.min(O+A,0)}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[d(zt,{children:Dy}),f,E(Y,{x:0,y:0,children:[d(Y,{children:[...v,...x,...w]}),d(It,{children:b}),d(Ot,{children:m})]})]})};Tt("sequence-zigzag-steps",{component:Ny,composites:["title","item"]});class Rn{init(e){Object.assign(this,e)}}class jy{constructor(e,n={}){this.clickTimer=null,this.singleClickCallback=null,this.doubleClickCallback=null,this.pointerId=null,this.startX=0,this.startY=0,this.skipClick=!1,this.dragged=!1,this.handlePointerDown=i=>{this.pointerId=i.pointerId,this.startX=i.clientX,this.startY=i.clientY,this.dragged=!1,this.skipClick=!1,window.addEventListener("pointermove",this.handlePointerMove,{passive:!0}),window.addEventListener("pointerup",this.handlePointerUp,{passive:!0}),window.addEventListener("pointercancel",this.handlePointerUp,{passive:!0})},this.handlePointerMove=i=>{if(this.pointerId===null||i.pointerId!==this.pointerId)return;const o=i.clientX-this.startX,s=i.clientY-this.startY;Math.hypot(o,s)>this.dragThreshold&&(this.skipClick=!0,this.dragged=!0)},this.handlePointerUp=i=>{this.pointerId!==null&&i.pointerId===this.pointerId&&(this.pointerId=null,window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp),this.dragged||(this.skipClick=!1),this.dragged=!1)};var r;this.element=e,this.delay=n.delay||300,this.dragThreshold=(r=n.dragThreshold)!=null?r:4,this.init()}init(){this.element.addEventListener("click",this.handleClick.bind(this)),this.element.addEventListener("dblclick",this.handleDoubleClick.bind(this)),this.element.addEventListener("pointerdown",this.handlePointerDown)}handleClick(e){if(this.skipClick){this.skipClick=!1;return}this.clickTimer&&clearTimeout(this.clickTimer),this.clickTimer=window.setTimeout(()=>{var n;(n=this.singleClickCallback)==null||n.call(this,e)},this.delay)}handleDoubleClick(e){var n;if(this.skipClick){this.skipClick=!1;return}this.clickTimer&&clearTimeout(this.clickTimer),(n=this.doubleClickCallback)==null||n.call(this,e)}onClick(e){return this.singleClickCallback=e,this}onDoubleClick(e){return this.doubleClickCallback=e,this}destroy(){this.clickTimer&&clearTimeout(this.clickTimer),this.element.removeEventListener("click",this.handleClick),this.element.removeEventListener("dblclick",this.handleDoubleClick),this.element.removeEventListener("pointerdown",this.handlePointerDown),window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp)}}function WR(t){return t.getScreenCTM()||new DOMMatrix}function VR(t){var e;return((e=t.getScreenCTM())==null?void 0:e.inverse())||new DOMMatrix}function ur(t,e,n){return new DOMPoint(e,n).matrixTransform(VR(t))}function cn(t,e){const n=e.getBoundingClientRect(),i=[{x:n.x,y:n.y},{x:n.x+n.width,y:n.y},{x:n.x,y:n.y+n.height},{x:n.x+n.width,y:n.y+n.height}].map(c=>ur(t,c.x,c.y)),o=Math.min(...i.map(c=>c.x)),s=Math.max(...i.map(c=>c.x)),a=Math.min(...i.map(c=>c.y)),l=Math.max(...i.map(c=>c.y));return new DOMRect(o,a,s-o,l-a)}function Fy(t,e){if(e.length===0)return t.data;const n=Pr(t,e);return n.children||(n.children=[]),n.children}function YR(t,e="data.items"){return t.reduce((n,r,i)=>i===0?`${n}[${r}]`:`${n}.children[${r}]`,e)}function By(t){var e,n;return((n=(e=XR(t))==null?void 0:e.dataset.indexes)==null?void 0:n.split(",").map(Number))||[]}function XR(t){return Tn(t)?$o(t):t}function Ks(t){if(!t)return null;const e=[GR];let n=t;for(const r of e){const i=r(n);if(i){n=i;break}}return Wy(n)}function Wy(t){if(!t)return null;const e=[qR,UR];for(const n of e){const r=n(t);if(r)return r}return I4(t)||mn(t)||Tn(t)?t:null}const GR=t=>{var e;const n=r=>r?A4(r)||k4(r):!1;return n(t)?t.parentElement:n(t.parentElement)?(e=t.parentElement)==null?void 0:e.parentElement:null},qR=t=>z4(t)&&qu(t.parentElement)?t.parentElement:null,UR=t=>{const e=t.parentElement;return Gu(e)?e:pl(t)?t:null};class Vy{constructor(){this.extensions=new Map}register(e,n,r){if(!(r!=null&&r.override)&&this.extensions.has(e))throw new Error(`Extension "${e}" already registered`);this.extensions.set(e,n)}get(e){return this.extensions.get(e)}has(e){return this.extensions.has(e)}getAll(){return this.extensions}forEach(e){this.extensions.forEach((n,r)=>{e(n,r)})}[Symbol.iterator](){return this.extensions.entries()}unregister(e){return this.extensions.delete(e)}destroy(){this.extensions.forEach(e=>{e&&typeof e.dispose=="function"&&e.dispose()}),this.extensions.clear()}}const ZR=t=>{if(!t||!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName.toLowerCase();return e==="input"||e==="textarea"||e==="select"},KR=t=>{const e=t.toLowerCase().split("+").map(r=>r.trim()).filter(Boolean),n={key:""};if(e.forEach(r=>{r==="shift"?n.shift=!0:r==="alt"||r==="option"?n.alt=!0:r==="ctrl"||r==="control"?n.ctrl=!0:r==="meta"||r==="cmd"||r==="command"?n.meta=!0:r==="mod"?n.mod=!0:n.key=r}),!n.key)throw new Error(`Invalid hotkey combo: "${t}"`);return n},QR=(t,e)=>{var n;if(t.key.toLowerCase()!==e.key)return!1;const i=(n=e.mod)!=null?n:!1,o=t.metaKey,s=t.ctrlKey,a=o||s,l=(c,h)=>c===void 0?!h:c===h;return i&&!a?!1:i?!(!l(e.shift,t.shiftKey)||!l(e.alt,t.altKey)||e.meta!==void 0&&!l(e.meta,o)||e.ctrl!==void 0&&!l(e.ctrl,s)):!(!l(e.meta,o)||!l(e.ctrl,s)||!l(e.shift,t.shiftKey)||!l(e.alt,t.altKey))};class JR{constructor(e={}){this.bindings=[],this.handleKeydown=i=>{if(i instanceof KeyboardEvent&&!i.defaultPrevented&&!ZR(i.target)&&!(this.filter&&!this.filter(i))){for(const o of this.bindings)if(o.combos.some(s=>QR(i,s))){o.handler(i);break}}};const{target:n=document,filter:r}=e;this.target=n,this.filter=r,this.target.addEventListener("keydown",this.handleKeydown)}bind(e,n){const i={combos:(Array.isArray(e)?e:[e]).map(o=>KR(o)),handler:n};return this.bindings.push(i),()=>this.unbind(i)}destroy(){this.target.removeEventListener("keydown",this.handleKeydown),this.bindings=[]}unbind(e){this.bindings=this.bindings.filter(n=>n!==e)}}var tH=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class Yy extends Rn{constructor(){super(...arguments),this.name="brush-select",this.shiftKey=!1,this.dragging=!1,this.dragThreshold=4,this.handleStart=e=>{this.interaction.isActive()&&e.button===0&&(this.isTextSelectionTarget(e.target)||this.hasElementAtStart(e.target)||this.interaction.executeExclusiveInteraction(this,()=>tH(this,null,function*(){return new Promise(n=>{this.completeInteraction=n;const r=this.editor.getDocument();this.startPoint=ur(r,e.clientX,e.clientY),this.pointerId=e.pointerId,this.shiftKey=e.shiftKey,this.dragging=!1,window.addEventListener("pointermove",this.handleMove),window.addEventListener("pointerup",this.handleEnd)})})))},this.handleMove=e=>{if(e.pointerId!==this.pointerId||!this.startPoint)return;const n=this.editor.getDocument(),r=ur(n,e.clientX,e.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if(!this.dragging){if(Math.hypot(i,o)<this.dragThreshold)return;this.dragging=!0,this.ensureBrush(),this.updateBrush(this.startPoint,r)}e.preventDefault(),e.stopPropagation(),this.updateBrush(this.startPoint,r)},this.handleEnd=e=>{var n,r;if(e.pointerId!==this.pointerId||!this.startPoint)return;window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd);let i=null;if(this.dragging){e.preventDefault(),e.stopPropagation();const l=this.editor.getDocument(),c=ur(l,e.clientX,e.clientY);i=this.updateBrush(this.startPoint,c),this.clearBrush()}this.pointerId=void 0,this.startPoint=void 0,this.dragging=!1;const o=this.shiftKey;if(this.shiftKey=!1,!i){(n=this.completeInteraction)==null||n.call(this),this.completeInteraction=void 0;return}const s=this.collectSelection(i);if((r=this.completeInteraction)==null||r.call(this),this.completeInteraction=void 0,s.length===0){o||this.interaction.clearSelection();return}const a=o?"add":"replace";this.interaction.select(s,a)}}init(e){super.init(e),this.editor.getDocument().addEventListener("pointerdown",this.handleStart)}destroy(){this.clearBrush(),this.editor.getDocument().removeEventListener("pointerdown",this.handleStart),window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd)}ensureBrush(){return this.brush?this.brush:(this.brush=this.interaction.appendTransientElement(wt("rect",{fill:"rgba(51, 132, 245, 0.08)",stroke:"#3384F5","stroke-dasharray":"4 2","stroke-width":1,"pointer-events":"none"})),this.brush)}updateBrush(e,n){if(!this.brush)return null;const r=Math.min(e.x,n.x),i=Math.min(e.y,n.y),o=Math.abs(e.x-n.x),s=Math.abs(e.y-n.y);return Yt(this.brush,{x:r,y:i,width:o,height:s}),{x:r,y:i,width:o,height:s}}clearBrush(){var e;(e=this.brush)==null||e.remove(),this.brush=void 0}collectSelection(e){const n=this.editor.getDocument(),r=Array.from(n.querySelectorAll("[data-element-type]")),i=(s,a)=>{const l=s.x+s.width,c=s.y+s.height,h=a.x+a.width,u=a.y+a.height;return!(l<a.x||h<s.x||c<a.y||u<s.y)},o=new Set;return r.reduce((s,a)=>{const l=Wy(a);if(!l||o.has(l))return s;const c=cn(n,l),h={x:c.x,y:c.y,width:c.width,height:c.height};return i(e,h)&&(s.push(l),o.add(l)),s},[])}hasElementAtStart(e){var n;return e instanceof Element?Ks(e)?!0:!!((n=e.closest)!=null&&n.call(e,"[data-element-type]")):!1}isTextSelectionTarget(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const n=e.tagName.toLowerCase();return n==="input"||n==="textarea"}}var eH=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class Xy extends Rn{constructor(){super(...arguments),this.name="click-select",this.shiftKey=!1,this.onShiftKeyDown=e=>{e.key==="Shift"&&(this.shiftKey=!0)},this.onShiftKeyUp=e=>{e.key==="Shift"&&(this.shiftKey=!1)},this.onEscKeyDown=e=>{e.key==="Escape"&&this.interaction.clearSelection()}}init(e){super.init(e);const{editor:n,interaction:r}=this;this.clickHandler=new jy(n.getDocument(),{delay:0});const i=o=>{r.isActive()&&r.executeExclusiveInteraction(this,()=>eH(this,null,function*(){const s=Ks(o.target);Uu(s)||(this.shiftKey?s&&(r.isSelected(s)?r.select([s],"remove"):r.select([s],"add")):s?r.select([s],"replace"):r.clearSelection())}))};this.clickHandler.onClick(i),document.addEventListener("keydown",this.onShiftKeyDown),document.addEventListener("keyup",this.onShiftKeyUp),document.addEventListener("keydown",this.onEscKeyDown)}destroy(){var e;(e=this.clickHandler)==null||e.destroy(),document.removeEventListener("keydown",this.onShiftKeyDown),document.removeEventListener("keyup",this.onShiftKeyUp),document.removeEventListener("keydown",this.onEscKeyDown)}}var Gy=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class nH{constructor(e){this.commands=e}apply(e){return Gy(this,null,function*(){for(const n of this.commands)yield n.apply(e)})}undo(e){return Gy(this,null,function*(){for(let n=this.commands.length-1;n>=0;n--)yield this.commands[n].undo(e)})}serialize(){return{type:"batch",commands:this.commands.map(e=>e.serialize())}}}var rH=Object.defineProperty,iH=Object.defineProperties,oH=Object.getOwnPropertyDescriptors,qy=Object.getOwnPropertySymbols,sH=Object.prototype.hasOwnProperty,aH=Object.prototype.propertyIsEnumerable,Uy=(t,e,n)=>e in t?rH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fi=(t,e)=>{for(var n in e||(e={}))sH.call(e,n)&&Uy(t,n,e[n]);if(qy)for(var n of qy(e))aH.call(e,n)&&Uy(t,n,e[n]);return t},Zy=(t,e)=>iH(t,oH(e)),Ky=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class hn{constructor(e,n,r){this.element=e,this.modified=n;const i=lH(e,n);this.original=cH(i,r)}apply(e){return Ky(this,null,function*(){Qy(this.element,this.modified),e.updateElement(this.element,this.modified)})}undo(e){return Ky(this,null,function*(){this.original&&(Qy(this.element,this.original),e.updateElement(this.element,this.original))})}serialize(){return{type:"update-element",elementId:this.element.id,modified:this.modified,original:this.original}}}function Qy(t,e){mn(t)?Xu(t,e):Tn(t)?m5(t,void 0,e.attributes):e.attributes&&Yt(t,e.attributes)}function lH(t,e){const n=Object.keys(e.attributes||{}),r=ke(t,n,!1),i=s=>{s&&n.forEach(a=>{a in s&&(r[a]=s[a])})},o=Zy(Fi({},e),{attributes:r});if(mn(t)){const{attributes:s}=fl(t);i(s)}else if(Tn(t)){if(!$o(t))return;i(xl(t))}return o}function cH(t,e){if(!t)return e;if(!e)return t;const n=Fi(Fi({},t.attributes||{}),e.attributes||{});return Zy(Fi(Fi({},t),e),{attributes:Object.keys(n).length?n:void 0})}var hH=Object.defineProperty,Jy=Object.getOwnPropertySymbols,dH=Object.prototype.hasOwnProperty,uH=Object.prototype.propertyIsEnumerable,t3=(t,e,n)=>e in t?hH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,e3=(t,e)=>{for(var n in e||(e={}))dH.call(e,n)&&t3(t,n,e[n]);if(Jy)for(var n of Jy(e))uH.call(e,n)&&t3(t,n,e[n]);return t},n3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class fH{constructor(e,n){this.options=e,this.original=n}apply(e){return n3(this,null,function*(){const n=e.getOptions();this.original||(this.original=n),e.updateOptions(e3(e3({},n),this.options))})}undo(e){return n3(this,null,function*(){this.original&&e.updateOptions(this.original)})}serialize(){return{type:"update-options",options:this.options,original:this.original}}}var r3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class pH{constructor(e,n,r){this.element=e,this.originalText=r!=null?r:dl(e),this.modifiedText=n}apply(e){return r3(this,null,function*(){this.originalText!==this.modifiedText&&(ul(this.element,this.modifiedText),i3(e,this.element,this.modifiedText))})}undo(e){return r3(this,null,function*(){this.originalText!==this.modifiedText&&(ul(this.element,this.originalText),i3(e,this.element,this.originalText))})}serialize(){return{type:"update-text",elementId:this.element.id,original:this.originalText,modified:this.modifiedText}}}function i3(t,e,n){const r=gl(e);if(r.startsWith("item-")){const i=r.replace("item-",""),o=By(e);t.updateItemDatum(o,{[i]:n})}else t.updateData(r,n)}var gH=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class o3 extends Rn{constructor(){super(...arguments),this.name="dblclick-edit-text"}init(e){super.init(e);const{editor:n,commander:r,interaction:i}=e;this.clickHandler=new jy(n.getDocument()).onDoubleClick(o=>{i.isActive()&&i.executeExclusiveInteraction(this,()=>gH(this,null,function*(){const s=Ks(o.target);if(s&&mn(s)){i.select([s],"replace");const a=dl(s),l=yield new Promise(c=>{const h=this.listenSelectionChange(s);yH(s,{cursorPosition:{clientX:o.clientX,clientY:o.clientY},onBlur:c,onCancel:c}),this.detachSelectionListener=h});r.execute(new pH(s,l,a))}}))})}destroy(){var e,n;(e=this.clickHandler)==null||e.destroy(),(n=this.detachSelectionListener)==null||n.call(this)}listenSelectionChange(e){const n=({next:r})=>{var i;if(!r.includes(e)){(i=this.detachSelectionListener)==null||i.call(this),this.detachSelectionListener=void 0;const o=Zn(e);o&&o.blur()}};return this.emitter.on("selection:change",n),()=>this.emitter.off("selection:change",n)}}const mH="infographic-inline-text-editor-style",Qs="infographic-inline-text-editor";function yH(t,e){const n=Zn(t);n&&(bH(),new vH(n,e).start())}class vH{constructor(e,n){this.entity=e,this.options=n,this.handlePaste=r=>{r.clipboardData&&(r.preventDefault(),this.insertPlainText(r.clipboardData.getData("text/plain")))},this.handleKeydown=r=>{r.key==="Enter"&&!r.shiftKey&&(r.preventDefault(),this.insertPlainText(`
137
- `))},this.handleInput=()=>{var r,i;this.normalizeSpanContent(),(i=(r=this.options)==null?void 0:r.onInput)==null||i.call(r,this.getText())},this.handleBlur=()=>{var r,i;this.entity.removeAttribute("contenteditable"),this.entity.classList.remove(Qs),this.normalizeSpanContent(),(i=(r=this.options)==null?void 0:r.onBlur)==null||i.call(r,this.getText()),this.detachListeners()}}start(){this.entity.setAttribute("contenteditable","true"),this.entity.classList.add(Qs),this.entity.focus(),this.placeCaretAtClickPosition(),this.attachListeners()}attachListeners(){this.entity.addEventListener("paste",this.handlePaste),this.entity.addEventListener("keydown",this.handleKeydown),this.entity.addEventListener("input",this.handleInput),this.entity.addEventListener("blur",this.handleBlur,{once:!0})}detachListeners(){this.entity.removeEventListener("paste",this.handlePaste),this.entity.removeEventListener("keydown",this.handleKeydown),this.entity.removeEventListener("input",this.handleInput)}insertPlainText(e){var n,r;const i=window.getSelection();if(!i)return;i.rangeCount||this.placeCaretAtEnd();const o=i.rangeCount?i.getRangeAt(0):document.createRange();o.deleteContents();const s=document.createTextNode(e);o.insertNode(s),o.setStartAfter(s),o.setEndAfter(s),i.removeAllRanges(),i.addRange(o),this.normalizeSpanContent(),(r=(n=this.options)==null?void 0:n.onInput)==null||r.call(n,this.getText())}normalizeSpanContent(){var e;if(this.entity.childNodes.length===1&&((e=this.entity.firstChild)==null?void 0:e.nodeType)===Node.TEXT_NODE)return;const n=this.getText();this.entity.textContent=n}placeCaretAtClickPosition(){const e=window.getSelection();if(!e)return;const n=this.getRangeFromPoint();if(n){e.removeAllRanges(),e.addRange(n);return}this.placeCaretAtEnd()}getRangeFromPoint(){var e,n;const{cursorPosition:r}=this.options||{};if(!r)return null;const{clientX:i,clientY:o}=r,s=document,a=(n=(e=s.caretRangeFromPoint)==null?void 0:e.call(s,i,o))!=null?n:(()=>{var l;const c=(l=s.caretPositionFromPoint)==null?void 0:l.call(s,i,o);if(!c)return null;const h=document.createRange();return h.setStart(c.offsetNode,c.offset),h.collapse(!0),h})();return!a||!this.entity.contains(a.startContainer)?null:a}placeCaretAtEnd(){const e=window.getSelection();if(!e)return;const n=document.createRange();n.selectNodeContents(this.entity),n.collapse(!1),e.removeAllRanges(),e.addRange(n)}getText(){return this.entity.textContent||""}}function bH(){rn(mH,`
136
+ 0 0 0 0.3 0`,result:"shadow"}),d("feBlend",{mode:"normal",in:"SourceGraphic",in2:"shadow"})]}),Wy=t=>{const{Title:e,Item:n,data:r,options:i,gap:o=80}=t,s=yh,a=vh,{title:l,desc:c,items:h=[]}=r,u=e?d(e,{title:l,desc:c}):null,f=re(i);if(h.length===0)return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d(Lt,{children:By}),u,d(V,{children:d($t,{children:d(q,{indexes:[0],x:0,y:0})})})]});const p=Q(d(n,{indexes:[0],data:r,datum:h[0],positionH:"center"})),g=Q(d(q,{indexes:[0]})),y=[],m=[],x=[];let v=-1/0;const b=p.height+Zs+a;return h.forEach((w,_)=>{const $=[_],P=Mt(i,$),C=_%2===0,T=_*(s+o),E=C?0:p.height+Zs,S=`puck-gradient-middle-${_}`,R=`puck-gradient-bottom-${_}`;x.push(I(V,{x:T,y:E,id:`puck-${_}`,width:s,height:a,filter:"url(#sequence-zigzag-pucks-3d-shadow-filter)",children:[I(Lt,{children:[I("linearGradient",{id:S,x1:"115",y1:"55.9991",x2:"15.0002",y2:"55.9991",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:P||f}),d("stop",{offset:"1",stopColor:P||f,stopOpacity:"0.6"})]}),I("linearGradient",{id:R,x1:"115",y1:"72.1803",x2:"15.0002",y2:"72.1803",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:"#F4F4FB"}),d("stop",{offset:"1",stopColor:"#8E8C90"})]})]}),I(ne,{width:yh,height:vh,children:[d(ht,{d:JH,fill:P||f}),d(ht,{d:tR,fill:`url(#${S})`}),d(ht,{d:eR,fill:`url(#${R})`}),d("rect",{fill:"transparent",y:vh,width:yh,height:20})]}),d("text",{x:65,y:40,width:50,height:50,fontSize:40,fontWeight:"bold",fill:"#FFFFFF",textAnchor:"middle",dominantBaseline:"middle",transform:"rotate(-15 65 40) scale(1, 0.8)",children:_+1})]}));const O=T+(s-p.width)/2,A=C?E+a+Zs:E-Zs-p.height;if(v=Math.max(v,A+p.height),m.push(d(n,{indexes:$,datum:w,data:r,x:O,y:A,positionH:"center"})),y.push(d(Dt,{indexes:$,x:O+p.width-g.width/2,y:A+p.height-g.height/2})),_===0&&y.push(d(q,{indexes:[0],x:T+s/2-g.width/2-(o+s)/2,y:E+a/2-g.height/2})),_<h.length-1){const L=(_+1)%2===0?0:b,D=T+s+o/2-g.width/2,k=(E+a/2+L+a/2)/2-g.height/2;y.push(d(q,{indexes:[_+1],x:D,y:k}))}else y.push(d(q,{indexes:[h.length],x:T+s+o/2-g.width/2,y:E+a/2-g.height/2}))}),I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[d(Lt,{children:By}),u,I(V,{x:0,y:0,children:[d(V,{children:x}),d(Ct,{children:m}),d($t,{children:y})]})]})};It("sequence-zigzag-pucks-3d",{component:Wy,composites:["title","item"]});const nR=240,rR=130,iR=105,dr=12,oR=120,Vy=50,sR=.6,aR="M132.821 50.6599L87.6795 76.8925C78.0629 82.4807 62.4238 82.4807 52.7445 76.8925L7.30824 50.6599C2.43719 47.8482 0.00459679 44.1562 0.0152907 40.472L3.17695e-05 45.6925C-0.0101404 49.378 2.42245 53.0686 7.29298 55.8803L52.7289 82.1129C62.4094 87.7011 78.0485 87.7011 87.6652 82.1129L132.806 55.8803C137.583 53.1038 139.975 49.4705 139.986 45.832L140 40.6116C139.989 44.2501 137.598 47.8834 132.821 50.6599Z",Yy="M132.707 30.4224C142.386 36.0119 142.437 45.0704 132.821 50.6599L87.6795 76.8925C78.0629 82.4807 62.4238 82.4807 52.7445 76.8925L7.30825 50.6599C-2.37126 45.0717 -2.42225 36.0132 7.19414 30.4237L52.335 4.19115C61.9517 -1.39705 77.5908 -1.39705 87.2713 4.19115L132.707 30.4224Z",Xy=70+dr/2,Gy=40+dr/2,qy=d("filter",{id:"sequence-zigzag-glow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",children:d("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"15",result:"blur"})}),Uy=t=>{var e;const{Title:n,Item:r,data:i,options:o,dx:s=nR,dy:a=rR,iconSize:l=30}=t,{title:c,desc:h,items:u=[]}=i,f=n?d(n,{title:c,desc:h}):null,p=re(o);if(u.length===0)return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d(Lt,{children:qy}),f,d(V,{children:d($t,{children:d(q,{indexes:[0],x:0,y:0})})})]});const g=Q(d(r,{indexes:[0],data:i,datum:u[0]})),y=Q(d(q,{indexes:[0]})),m=[],x=[],v=[],b=[],w=[];let _=0,$=0,P="",C=1/0,T=-1/0,E=1/0,S=1/0;const R=[];u.forEach((B,L)=>{const D=_,k=$;R.push({x:D,y:k}),C=Math.min(C,k);const N=D-Xy,j=k-Gy;E=Math.min(E,N),S=Math.min(S,j);const X=L%2===0;L<u.length-1&&(_+=s,$=X?$+a:$-a)});const O=Math.max(0,-E),A=Math.max(0,-S);if(_=0,$=0,u.forEach((B,L)=>{const D=[L],k=R[L],N=k.x+O,j=k.y+A,X=Mt(o,D),z=Math.max(0,N-Xy),M=Math.max(0,j-Gy),H=10,W=Vy+10,{colorPrimaryBg:U}=ye({colorPrimary:X});if(b.push(I(ne,{x:z,y:M,width:140,height:110,children:[d(zt,{x:H,y:W,width:oR,height:Vy,fill:X||p,filter:"url(#sequence-zigzag-glow-filter)",opacity:sR}),d(ht,{d:aR,fill:X||p}),d(ht,{d:Yy,fill:"#fff"}),d(ht,{d:Yy,fill:U||U})]})),B.icon){const Z=Math.max(0,N-l/2-dr/2),K=Math.max(0,j-l/2-dr/2);w.push(d(be,{x:Z,y:K,size:l,indexes:D,fill:X}))}const Y=N-g.width/2-dr/2,G=Math.max(0,j+iR-dr/2);if(T=Math.max(T,G+g.height),L===0?P=`M ${N} ${j}`:P+=` L ${N} ${j}`,x.push(d(r,{indexes:D,datum:B,data:i,x:Y,y:G})),m.push(d(Dt,{indexes:D,x:Math.max(0,Y+g.width-y.width/2),y:Math.max(0,G+g.height-y.height/2)})),L<u.length-1){const Z=R[L+1],K=Z.x+O,et=Z.y+A,st=Math.max(0,N+(K-N)/2-y.width/2),pt=Math.max(0,j+(et-j)/2-y.height/2);m.push(d(q,{indexes:[L+1],x:st,y:pt}))}else m.push(d(q,{indexes:[u.length],x:Math.max(0,Y+g.width+s/4),y:Math.max(0,G+g.height/2-y.height/2)}))}),P){const B=(((e=R[R.length-1])==null?void 0:e.x)||0)+O;v.push(d(ht,{d:P,stroke:"#f3f2f1",strokeWidth:dr,fill:"none",width:B,height:T-Math.min(C+A,0)}))}return I(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[d(Lt,{children:qy}),f,I(V,{x:0,y:0,children:[d(V,{children:[...v,...b,...w]}),d(Ct,{children:x}),d($t,{children:m})]})]})};It("sequence-zigzag-steps",{component:Uy,composites:["title","item"]});class Hn{init(e){Object.assign(this,e)}}class Zy{constructor(e,n={}){this.clickTimer=null,this.singleClickCallback=null,this.doubleClickCallback=null,this.pointerId=null,this.startX=0,this.startY=0,this.skipClick=!1,this.dragged=!1,this.handlePointerDown=i=>{this.pointerId=i.pointerId,this.startX=i.clientX,this.startY=i.clientY,this.dragged=!1,this.skipClick=!1,window.addEventListener("pointermove",this.handlePointerMove,{passive:!0}),window.addEventListener("pointerup",this.handlePointerUp,{passive:!0}),window.addEventListener("pointercancel",this.handlePointerUp,{passive:!0})},this.handlePointerMove=i=>{if(this.pointerId===null||i.pointerId!==this.pointerId)return;const o=i.clientX-this.startX,s=i.clientY-this.startY;Math.hypot(o,s)>this.dragThreshold&&(this.skipClick=!0,this.dragged=!0)},this.handlePointerUp=i=>{this.pointerId!==null&&i.pointerId===this.pointerId&&(this.pointerId=null,window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp),this.dragged||(this.skipClick=!1),this.dragged=!1)};var r;this.element=e,this.delay=n.delay||300,this.dragThreshold=(r=n.dragThreshold)!=null?r:4,this.init()}init(){this.element.addEventListener("click",this.handleClick.bind(this)),this.element.addEventListener("dblclick",this.handleDoubleClick.bind(this)),this.element.addEventListener("pointerdown",this.handlePointerDown)}handleClick(e){if(this.skipClick){this.skipClick=!1;return}this.clickTimer&&clearTimeout(this.clickTimer),this.clickTimer=window.setTimeout(()=>{var n;(n=this.singleClickCallback)==null||n.call(this,e)},this.delay)}handleDoubleClick(e){var n;if(this.skipClick){this.skipClick=!1;return}this.clickTimer&&clearTimeout(this.clickTimer),(n=this.doubleClickCallback)==null||n.call(this,e)}onClick(e){return this.singleClickCallback=e,this}onDoubleClick(e){return this.doubleClickCallback=e,this}destroy(){this.clickTimer&&clearTimeout(this.clickTimer),this.element.removeEventListener("click",this.handleClick),this.element.removeEventListener("dblclick",this.handleDoubleClick),this.element.removeEventListener("pointerdown",this.handlePointerDown),window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp)}}function lR(t){return t.getScreenCTM()||new DOMMatrix}function cR(t){var e;return((e=t.getScreenCTM())==null?void 0:e.inverse())||new DOMMatrix}function ur(t,e,n){return new DOMPoint(e,n).matrixTransform(cR(t))}function cn(t,e){const n=e.getBoundingClientRect(),i=[{x:n.x,y:n.y},{x:n.x+n.width,y:n.y},{x:n.x,y:n.y+n.height},{x:n.x+n.width,y:n.y+n.height}].map(c=>ur(t,c.x,c.y)),o=Math.min(...i.map(c=>c.x)),s=Math.max(...i.map(c=>c.x)),a=Math.min(...i.map(c=>c.y)),l=Math.max(...i.map(c=>c.y));return new DOMRect(o,a,s-o,l-a)}function Ky(t,e){if(e.length===0)return t.data;const n=oi(t,e);return n.children||(n.children=[]),n.children}function hR(t,e="data.items"){return t.reduce((n,r,i)=>i===0?`${n}[${r}]`:`${n}.children[${r}]`,e)}function Qy(t){var e,n;return((n=(e=dR(t))==null?void 0:e.dataset.indexes)==null?void 0:n.split(",").map(Number))||[]}function dR(t){return Tn(t)?$o(t):t}function Ks(t){if(!t)return null;const e=[uR];let n=t;for(const r of e){const i=r(n);if(i){n=i;break}}return Jy(n)}function Jy(t){if(!t)return null;const e=[fR,pR];for(const n of e){const r=n(t);if(r)return r}return F6(t)||mn(t)||Tn(t)?t:null}const uR=t=>{var e;const n=r=>r?W6(r)||V6(r):!1;return n(t)?t.parentElement:n(t.parentElement)?(e=t.parentElement)==null?void 0:e.parentElement:null},fR=t=>Y6(t)&&Qu(t.parentElement)?t.parentElement:null,pR=t=>{const e=t.parentElement;return Ku(e)?e:pl(t)?t:null};class t3{constructor(){this.extensions=new Map}register(e,n,r){if(!(r!=null&&r.override)&&this.extensions.has(e))throw new Error(`Extension "${e}" already registered`);this.extensions.set(e,n)}get(e){return this.extensions.get(e)}has(e){return this.extensions.has(e)}getAll(){return this.extensions}forEach(e){this.extensions.forEach((n,r)=>{e(n,r)})}[Symbol.iterator](){return this.extensions.entries()}unregister(e){return this.extensions.delete(e)}destroy(){this.extensions.forEach(e=>{e&&typeof e.dispose=="function"&&e.dispose()}),this.extensions.clear()}}const gR=t=>{if(!t||!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName.toLowerCase();return e==="input"||e==="textarea"||e==="select"},mR=t=>{const e=t.toLowerCase().split("+").map(r=>r.trim()).filter(Boolean),n={key:""};if(e.forEach(r=>{r==="shift"?n.shift=!0:r==="alt"||r==="option"?n.alt=!0:r==="ctrl"||r==="control"?n.ctrl=!0:r==="meta"||r==="cmd"||r==="command"?n.meta=!0:r==="mod"?n.mod=!0:n.key=r}),!n.key)throw new Error(`Invalid hotkey combo: "${t}"`);return n},yR=(t,e)=>{var n;if(t.key.toLowerCase()!==e.key)return!1;const i=(n=e.mod)!=null?n:!1,o=t.metaKey,s=t.ctrlKey,a=o||s,l=(c,h)=>c===void 0?!h:c===h;return i&&!a?!1:i?!(!l(e.shift,t.shiftKey)||!l(e.alt,t.altKey)||e.meta!==void 0&&!l(e.meta,o)||e.ctrl!==void 0&&!l(e.ctrl,s)):!(!l(e.meta,o)||!l(e.ctrl,s)||!l(e.shift,t.shiftKey)||!l(e.alt,t.altKey))};class vR{constructor(e={}){this.bindings=[],this.handleKeydown=i=>{if(i instanceof KeyboardEvent&&!i.defaultPrevented&&!gR(i.target)&&!(this.filter&&!this.filter(i))){for(const o of this.bindings)if(o.combos.some(s=>yR(i,s))){o.handler(i);break}}};const{target:n=document,filter:r}=e;this.target=n,this.filter=r,this.target.addEventListener("keydown",this.handleKeydown)}bind(e,n){const i={combos:(Array.isArray(e)?e:[e]).map(o=>mR(o)),handler:n};return this.bindings.push(i),()=>this.unbind(i)}destroy(){this.target.removeEventListener("keydown",this.handleKeydown),this.bindings=[]}unbind(e){this.bindings=this.bindings.filter(n=>n!==e)}}var xR=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class e3 extends Hn{constructor(){super(...arguments),this.name="brush-select",this.shiftKey=!1,this.dragging=!1,this.dragThreshold=4,this.handleStart=e=>{this.interaction.isActive()&&e.button===0&&(this.isTextSelectionTarget(e.target)||this.hasElementAtStart(e.target)||this.interaction.executeExclusiveInteraction(this,()=>xR(this,null,function*(){return new Promise(n=>{this.completeInteraction=n;const r=this.editor.getDocument();this.startPoint=ur(r,e.clientX,e.clientY),this.pointerId=e.pointerId,this.shiftKey=e.shiftKey,this.dragging=!1,window.addEventListener("pointermove",this.handleMove),window.addEventListener("pointerup",this.handleEnd)})})))},this.handleMove=e=>{if(e.pointerId!==this.pointerId||!this.startPoint)return;const n=this.editor.getDocument(),r=ur(n,e.clientX,e.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if(!this.dragging){if(Math.hypot(i,o)<this.dragThreshold)return;this.dragging=!0,this.ensureBrush(),this.updateBrush(this.startPoint,r)}e.preventDefault(),e.stopPropagation(),this.updateBrush(this.startPoint,r)},this.handleEnd=e=>{var n,r;if(e.pointerId!==this.pointerId||!this.startPoint)return;window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd);let i=null;if(this.dragging){e.preventDefault(),e.stopPropagation();const l=this.editor.getDocument(),c=ur(l,e.clientX,e.clientY);i=this.updateBrush(this.startPoint,c),this.clearBrush()}this.pointerId=void 0,this.startPoint=void 0,this.dragging=!1;const o=this.shiftKey;if(this.shiftKey=!1,!i){(n=this.completeInteraction)==null||n.call(this),this.completeInteraction=void 0;return}const s=this.collectSelection(i);if((r=this.completeInteraction)==null||r.call(this),this.completeInteraction=void 0,s.length===0){o||this.interaction.clearSelection();return}const a=o?"add":"replace";this.interaction.select(s,a)}}init(e){super.init(e),this.editor.getDocument().addEventListener("pointerdown",this.handleStart)}destroy(){this.clearBrush(),this.editor.getDocument().removeEventListener("pointerdown",this.handleStart),window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd)}ensureBrush(){return this.brush?this.brush:(this.brush=this.interaction.appendTransientElement(wt("rect",{fill:"rgba(51, 132, 245, 0.08)",stroke:"#3384F5","stroke-dasharray":"4 2","stroke-width":1,"pointer-events":"none"})),this.brush)}updateBrush(e,n){if(!this.brush)return null;const r=Math.min(e.x,n.x),i=Math.min(e.y,n.y),o=Math.abs(e.x-n.x),s=Math.abs(e.y-n.y);return Yt(this.brush,{x:r,y:i,width:o,height:s}),{x:r,y:i,width:o,height:s}}clearBrush(){var e;(e=this.brush)==null||e.remove(),this.brush=void 0}collectSelection(e){const n=this.editor.getDocument(),r=Array.from(n.querySelectorAll("[data-element-type]")),i=(s,a)=>{const l=s.x+s.width,c=s.y+s.height,h=a.x+a.width,u=a.y+a.height;return!(l<a.x||h<s.x||c<a.y||u<s.y)},o=new Set;return r.reduce((s,a)=>{const l=Jy(a);if(!l||o.has(l))return s;const c=cn(n,l),h={x:c.x,y:c.y,width:c.width,height:c.height};return i(e,h)&&(s.push(l),o.add(l)),s},[])}hasElementAtStart(e){var n;return e instanceof Element?Ks(e)?!0:!!((n=e.closest)!=null&&n.call(e,"[data-element-type]")):!1}isTextSelectionTarget(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const n=e.tagName.toLowerCase();return n==="input"||n==="textarea"}}var bR=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class n3 extends Hn{constructor(){super(...arguments),this.name="click-select",this.shiftKey=!1,this.onShiftKeyDown=e=>{e.key==="Shift"&&(this.shiftKey=!0)},this.onShiftKeyUp=e=>{e.key==="Shift"&&(this.shiftKey=!1)},this.onEscKeyDown=e=>{e.key==="Escape"&&this.interaction.clearSelection()}}init(e){super.init(e);const{editor:n,interaction:r}=this;this.clickHandler=new Zy(n.getDocument(),{delay:0});const i=o=>{r.isActive()&&r.executeExclusiveInteraction(this,()=>bR(this,null,function*(){const s=Ks(o.target);Ju(s)||(this.shiftKey?s&&(r.isSelected(s)?r.select([s],"remove"):r.select([s],"add")):s?r.select([s],"replace"):r.clearSelection())}))};this.clickHandler.onClick(i),document.addEventListener("keydown",this.onShiftKeyDown),document.addEventListener("keyup",this.onShiftKeyUp),document.addEventListener("keydown",this.onEscKeyDown)}destroy(){var e;(e=this.clickHandler)==null||e.destroy(),document.removeEventListener("keydown",this.onShiftKeyDown),document.removeEventListener("keyup",this.onShiftKeyUp),document.removeEventListener("keydown",this.onEscKeyDown)}}var r3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class wR{constructor(e){this.commands=e}apply(e){return r3(this,null,function*(){for(const n of this.commands)yield n.apply(e)})}undo(e){return r3(this,null,function*(){for(let n=this.commands.length-1;n>=0;n--)yield this.commands[n].undo(e)})}serialize(){return{type:"batch",commands:this.commands.map(e=>e.serialize())}}}var _R=Object.defineProperty,$R=Object.defineProperties,PR=Object.getOwnPropertyDescriptors,i3=Object.getOwnPropertySymbols,CR=Object.prototype.hasOwnProperty,OR=Object.prototype.propertyIsEnumerable,o3=(t,e,n)=>e in t?_R(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bi=(t,e)=>{for(var n in e||(e={}))CR.call(e,n)&&o3(t,n,e[n]);if(i3)for(var n of i3(e))OR.call(e,n)&&o3(t,n,e[n]);return t},s3=(t,e)=>$R(t,PR(e)),a3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class hn{constructor(e,n,r){this.element=e,this.modified=n;const i=MR(e,n);this.original=SR(i,r)}apply(e){return a3(this,null,function*(){l3(this.element,this.modified),e.updateElement(this.element,this.modified)})}undo(e){return a3(this,null,function*(){this.original&&(l3(this.element,this.original),e.updateElement(this.element,this.original))})}serialize(){return{type:"update-element",elementId:this.element.id,modified:this.modified,original:this.original}}}function l3(t,e){mn(t)?Zu(t,e):Tn(t)?Mw(t,void 0,e.attributes):e.attributes&&Yt(t,e.attributes)}function MR(t,e){const n=Object.keys(e.attributes||{}),r=ke(t,n,!1),i=s=>{s&&n.forEach(a=>{a in s&&(r[a]=s[a])})},o=s3(Bi({},e),{attributes:r});if(mn(t)){const{attributes:s}=fl(t);i(s)}else if(Tn(t)){if(!$o(t))return;i(wl(t))}return o}function SR(t,e){if(!t)return e;if(!e)return t;const n=Bi(Bi({},t.attributes||{}),e.attributes||{});return s3(Bi(Bi({},t),e),{attributes:Object.keys(n).length?n:void 0})}var ER=Object.defineProperty,c3=Object.getOwnPropertySymbols,IR=Object.prototype.hasOwnProperty,TR=Object.prototype.propertyIsEnumerable,h3=(t,e,n)=>e in t?ER(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,d3=(t,e)=>{for(var n in e||(e={}))IR.call(e,n)&&h3(t,n,e[n]);if(c3)for(var n of c3(e))TR.call(e,n)&&h3(t,n,e[n]);return t},u3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class AR{constructor(e,n){this.options=e,this.original=n}apply(e){return u3(this,null,function*(){const n=e.getOptions();this.original||(this.original=n),e.updateOptions(d3(d3({},n),this.options))})}undo(e){return u3(this,null,function*(){this.original&&e.updateOptions(this.original)})}serialize(){return{type:"update-options",options:this.options,original:this.original}}}var f3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class kR{constructor(e,n,r){this.element=e,this.originalText=r!=null?r:dl(e),this.modifiedText=n}apply(e){return f3(this,null,function*(){this.originalText!==this.modifiedText&&(ul(this.element,this.modifiedText),p3(e,this.element,this.modifiedText))})}undo(e){return f3(this,null,function*(){this.originalText!==this.modifiedText&&(ul(this.element,this.originalText),p3(e,this.element,this.originalText))})}serialize(){return{type:"update-text",elementId:this.element.id,original:this.originalText,modified:this.modifiedText}}}function p3(t,e,n){const r=gl(e);if(r.startsWith("item-")){const i=r.replace("item-",""),o=Qy(e);t.updateItemDatum(o,{[i]:n})}else t.updateData(r,n)}var LR=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class g3 extends Hn{constructor(){super(...arguments),this.name="dblclick-edit-text"}init(e){super.init(e);const{editor:n,commander:r,interaction:i}=e;this.clickHandler=new Zy(n.getDocument()).onDoubleClick(o=>{i.isActive()&&i.executeExclusiveInteraction(this,()=>LR(this,null,function*(){const s=Ks(o.target);if(s&&mn(s)){i.select([s],"replace");const a=dl(s),l=yield new Promise(c=>{const h=this.listenSelectionChange(s);HR(s,{cursorPosition:{clientX:o.clientX,clientY:o.clientY},onBlur:c,onCancel:c}),this.detachSelectionListener=h});r.execute(new kR(s,l,a))}}))})}destroy(){var e,n;(e=this.clickHandler)==null||e.destroy(),(n=this.detachSelectionListener)==null||n.call(this)}listenSelectionChange(e){const n=({next:r})=>{var i;if(!r.includes(e)){(i=this.detachSelectionListener)==null||i.call(this),this.detachSelectionListener=void 0;const o=Zn(e);o&&o.blur()}};return this.emitter.on("selection:change",n),()=>this.emitter.off("selection:change",n)}}const zR="infographic-inline-text-editor-style",Qs="infographic-inline-text-editor";function HR(t,e){const n=Zn(t);n&&(DR(),new RR(n,e).start())}class RR{constructor(e,n){this.entity=e,this.options=n,this.handlePaste=r=>{r.clipboardData&&(r.preventDefault(),this.insertPlainText(r.clipboardData.getData("text/plain")))},this.handleKeydown=r=>{r.key==="Enter"&&!r.shiftKey&&(r.preventDefault(),this.insertPlainText(`
137
+ `))},this.handleInput=()=>{var r,i;this.normalizeSpanContent(),(i=(r=this.options)==null?void 0:r.onInput)==null||i.call(r,this.getText())},this.handleBlur=()=>{var r,i;this.entity.removeAttribute("contenteditable"),this.entity.classList.remove(Qs),this.normalizeSpanContent(),(i=(r=this.options)==null?void 0:r.onBlur)==null||i.call(r,this.getText()),this.detachListeners()}}start(){this.entity.setAttribute("contenteditable","true"),this.entity.classList.add(Qs),this.entity.focus(),this.placeCaretAtClickPosition(),this.attachListeners()}attachListeners(){this.entity.addEventListener("paste",this.handlePaste),this.entity.addEventListener("keydown",this.handleKeydown),this.entity.addEventListener("input",this.handleInput),this.entity.addEventListener("blur",this.handleBlur,{once:!0})}detachListeners(){this.entity.removeEventListener("paste",this.handlePaste),this.entity.removeEventListener("keydown",this.handleKeydown),this.entity.removeEventListener("input",this.handleInput)}insertPlainText(e){var n,r;const i=window.getSelection();if(!i)return;i.rangeCount||this.placeCaretAtEnd();const o=i.rangeCount?i.getRangeAt(0):document.createRange();o.deleteContents();const s=document.createTextNode(e);o.insertNode(s),o.setStartAfter(s),o.setEndAfter(s),i.removeAllRanges(),i.addRange(o),this.normalizeSpanContent(),(r=(n=this.options)==null?void 0:n.onInput)==null||r.call(n,this.getText())}normalizeSpanContent(){var e;if(this.entity.childNodes.length===1&&((e=this.entity.firstChild)==null?void 0:e.nodeType)===Node.TEXT_NODE)return;const n=this.getText();this.entity.textContent=n}placeCaretAtClickPosition(){const e=window.getSelection();if(!e)return;const n=this.getRangeFromPoint();if(n){e.removeAllRanges(),e.addRange(n);return}this.placeCaretAtEnd()}getRangeFromPoint(){var e,n;const{cursorPosition:r}=this.options||{};if(!r)return null;const{clientX:i,clientY:o}=r,s=document,a=(n=(e=s.caretRangeFromPoint)==null?void 0:e.call(s,i,o))!=null?n:(()=>{var l;const c=(l=s.caretPositionFromPoint)==null?void 0:l.call(s,i,o);if(!c)return null;const h=document.createRange();return h.setStart(c.offsetNode,c.offset),h.collapse(!0),h})();return!a||!this.entity.contains(a.startContainer)?null:a}placeCaretAtEnd(){const e=window.getSelection();if(!e)return;const n=document.createRange();n.selectNodeContents(this.entity),n.collapse(!1),e.removeAllRanges(),e.addRange(n)}getText(){return this.entity.textContent||""}}function DR(){rn(zR,`
138
138
  .${Qs} {
139
139
  margin: 0;
140
140
  padding: 0;
@@ -146,8 +146,8 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
146
146
  .${Qs}::selection {
147
147
  background-color: #b3d4fc;
148
148
  }
149
- `)}var xH=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class s3 extends Rn{constructor(){super(...arguments),this.name="drag-element",this.selectionForDrag=[],this.willReplaceSelection=!1,this.exclusiveStarted=!1,this.dragItems=[],this.dragging=!1,this.dragThreshold=4,this.handleStart=e=>{if(!this.interaction.isActive()||e.pointerType==="mouse"&&e.button!==0)return;const n=Ks(e.target);if(!n||Uu(n))return;const r=this.editor.getDocument();this.pointerId=e.pointerId,this.startPoint=ur(r,e.clientX,e.clientY),this.dragging=!1,this.startTarget=n;const i=this.interaction.isSelected(n);this.selectionForDrag=i?this.interaction.getSelection():[n],this.willReplaceSelection=!i,this.exclusiveStarted=!1,this.startBounds=this.getSelectionBounds(this.selectionForDrag),this.guideCandidates=this.collectGuideCandidates(this.selectionForDrag),window.addEventListener("pointermove",this.handleMove),window.addEventListener("pointerup",this.handleEnd),window.addEventListener("pointercancel",this.handleEnd)},this.handleMove=e=>{if(e.pointerId!==this.pointerId||!this.startPoint)return;const n=this.editor.getDocument(),r=ur(n,e.clientX,e.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if(!this.dragging){if(Math.hypot(i,o)<this.dragThreshold)return;if(!this.startDrag()){this.reset();return}this.dragging=!0}const a=e.altKey?{dx:i,dy:o}:this.getSnappedDelta(i,o);e.preventDefault(),e.stopPropagation(),this.updateGuides(a),this.applyTranslation(a.dx,a.dy),this.emitGeometryChange()},this.handleEnd=e=>{if(e.pointerId!==this.pointerId||!this.startPoint)return;this.detachPointerListeners();const n=this.editor.getDocument(),r=ur(n,e.clientX,e.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if((this.dragging||Math.hypot(i,o)>=this.dragThreshold)&&this.dragItems.length&&this.exclusiveStarted){e.preventDefault(),e.stopPropagation();const a=e.altKey?{dx:i,dy:o}:this.getSnappedDelta(i,o);this.updateGuides(a),this.applyTranslation(a.dx,a.dy),this.commitTranslation(a.dx,a.dy),this.emitGeometryChange()}this.reset()}}init(e){super.init(e),this.editor.getDocument().addEventListener("pointerdown",this.handleStart)}destroy(){this.detachPointerListeners(),this.editor.getDocument().removeEventListener("pointerdown",this.handleStart)}startDrag(){if(this.exclusiveStarted)return!0;if(!this.startTarget||(this.willReplaceSelection&&this.interaction.select([this.startTarget],"replace"),this.dragItems=this.selectionForDrag.filter(n=>mn(n)).map(n=>this.createDragItem(n)).filter(Boolean),this.dragItems.length===0))return!1;let e=!1;return this.interaction.executeExclusiveInteraction(this,()=>xH(this,null,function*(){return new Promise(n=>{this.completeInteraction=n,e=!0})})),this.exclusiveStarted=e,e}applyTranslation(e,n){this.dragItems.forEach(r=>{if(r.mode==="attr"){const i=r.startX+e,o=r.startY+n,s={x:i,y:o};r.hasDataX&&(s["data-x"]=i),r.hasDataY&&(s["data-y"]=o),Yt(r.element,s)}else{const i=this.composeTransform(r.startX+e,r.startY+n,r.restTransform);Yt(r.element,{transform:i})}})}commitTranslation(e,n){if(Math.abs(e)<1e-6&&Math.abs(n)<1e-6)return;const r=this.dragItems.map(i=>{if(i.mode==="attr"){const a=i.startX+e,l=i.startY+n,c={x:a,y:l},h={};return i.hasX?h.x=i.startX:h.x=null,i.hasY?h.y=i.startY:h.y=null,i.hasDataX&&(c["data-x"]=a,h["data-x"]=i.startX),i.hasDataY&&(c["data-y"]=l,h["data-y"]=i.startY),new hn(i.element,{attributes:c},{attributes:h})}const o=this.composeTransform(i.startX+e,i.startY+n,i.restTransform),s=i.originalTransform!==void 0?i.originalTransform:null;return new hn(i.element,{attributes:{transform:o}},{attributes:{transform:s}})});r.length&&this.commander.executeBatch(r)}createDragItem(e){const n=this.getTransformInfo(e);if(n)return{element:e,mode:"transform",startX:n.x,startY:n.y,hasX:!1,hasY:!1,hasDataX:!1,hasDataY:!1,restTransform:n.rest,originalTransform:n.original};const{x:r,y:i,hasX:o,hasY:s,hasDataX:a,hasDataY:l}=this.getAttrInfo(e);return{element:e,mode:"attr",startX:r,startY:i,hasX:o,hasY:s,hasDataX:a,hasDataY:l}}getAttrInfo(e){const n=this.editor.getDocument(),{x:r,y:i}=cn(n,e),o=ke(e,["x","y","data-x","data-y"],!1),s=o.x!==null&&o.x!==void 0,a=o.y!==null&&o.y!==void 0,l=o["data-x"]!==null&&o["data-x"]!==void 0,c=o["data-y"]!==null&&o["data-y"]!==void 0,h=(b,v)=>{const x=b!=null?Number(b):NaN;return Number.isFinite(x)?x:v},u=h(o.x,NaN),f=h(o.y,NaN),p=h(o["data-x"],NaN),g=h(o["data-y"],NaN),y=Number.isFinite(u)?u:Number.isFinite(p)?p:r,m=Number.isFinite(f)?f:Number.isFinite(g)?g:i;return{x:y,y:m,hasX:s,hasY:a,hasDataX:l,hasDataY:c}}getTransformInfo(e){const n=e.getAttribute("transform");if(n===null)return null;const r=n.match(/translate\(\s*([-\d.]+)(?:[ ,]\s*([-\d.]+))?\s*\)/i);if(!r)return{x:0,y:0,rest:n,original:n};const i=Number(r[1])||0,o=r[2]!==void 0&&Number(r[2])||0,s=n.replace(r[0],"").trim();return{x:i,y:o,rest:s,original:n}}composeTransform(e,n,r){const i=`translate(${e}, ${n})`;return r&&r.length?`${i} ${r}`:i}emitGeometryChange(){var e;const n=(e=this.dragItems[0])==null?void 0:e.element;if(!n)return;const r=cn(this.editor.getDocument(),n);this.emitter.emit("selection:geometrychange",{type:"selection:geometrychange",target:n,rect:r})}detachPointerListeners(){window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd),window.removeEventListener("pointercancel",this.handleEnd)}reset(){var e;this.detachPointerListeners(),this.clearGuides(),this.pointerId=void 0,this.startPoint=void 0,this.dragItems=[],this.startTarget=void 0,this.selectionForDrag=[],this.willReplaceSelection=!1,this.exclusiveStarted=!1,this.dragging=!1,this.startBounds=void 0,this.guideCandidates=void 0,(e=this.completeInteraction)==null||e.call(this),this.completeInteraction=void 0}getSelectionBounds(e){if(!e.length)return;const n=this.editor.getDocument(),r=e.map(i=>cn(n,i));return kr(r)}collectGuideCandidates(e){const n=this.editor.getDocument(),r=new Set(e),i=Array.from(n.querySelectorAll("[data-element-type]")).filter(a=>!r.has(a)),o=[],s=[];return i.forEach(a=>{const{x:l,y:c,width:h,height:u}=cn(n,a);o.push(l,l+h/2,l+h),s.push(c,c+u/2,c+u)}),{vertical:o,horizontal:s}}getSnappedDelta(e,n){if(!this.startBounds||!this.guideCandidates)return{dx:e,dy:n};const r={x:this.startBounds.x+e,y:this.startBounds.y+n,width:this.startBounds.width,height:this.startBounds.height},i=this.getSnapOffset([r.x,r.x+r.width/2,r.x+r.width],this.guideCandidates.vertical),o=this.getSnapOffset([r.y,r.y+r.height/2,r.y+r.height],this.guideCandidates.horizontal);return{dx:e+((i==null?void 0:i.offset)||0),dy:n+((o==null?void 0:o.offset)||0),snapX:i,snapY:o}}getSnapOffset(e,n,r=5){let i=null;return e.forEach(o=>{n.forEach(s=>{const a=s-o;Math.abs(a)<=r&&(!i||Math.abs(a)<Math.abs(i.offset))&&(i={offset:a,at:s})})}),i||void 0}ensureGuideLine(e){const n=e==="vertical"?this.guideVertical:this.guideHorizontal;if(n)return n;const r=this.interaction.appendTransientElement(wt("line",{stroke:"#FF7A45","stroke-width":1,"stroke-dasharray":"4 4","pointer-events":"none",visibility:"hidden"}));return e==="vertical"?this.guideVertical=r:this.guideHorizontal=r,r}updateGuides(e){const n=this.editor.getDocument(),{width:r,height:i}=n.viewBox.baseVal;if(e.snapX){const o=this.ensureGuideLine("vertical");Yt(o,{x1:e.snapX.at,y1:0,x2:e.snapX.at,y2:i,visibility:"visible"})}else this.guideVertical&&this.guideVertical.setAttribute("visibility","hidden");if(e.snapY){const o=this.ensureGuideLine("horizontal");Yt(o,{x1:0,y1:e.snapY.at,x2:r,y2:e.snapY.at,visibility:"visible"})}else this.guideHorizontal&&this.guideHorizontal.setAttribute("visibility","hidden")}clearGuides(){var e,n;(e=this.guideVertical)==null||e.remove(),(n=this.guideHorizontal)==null||n.remove(),this.guideVertical=void 0,this.guideHorizontal=void 0}}var a3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class l3 extends Rn{constructor(){super(...arguments),this.name="hotkey-history",this.handleUndo=e=>a3(this,null,function*(){e.preventDefault(),yield this.commander.undo()}),this.handleRedo=e=>a3(this,null,function*(){e.preventDefault(),yield this.commander.redo()})}init(e){super.init(e),this.hotkey=new JR({filter:()=>this.interaction.isActive()}),this.hotkey.bind("mod+z",this.handleUndo),this.hotkey.bind(["mod+shift+z","mod+y"],this.handleRedo)}destroy(){var e;(e=this.hotkey)==null||e.destroy()}}var wH=Object.defineProperty,_H=Object.defineProperties,$H=Object.getOwnPropertyDescriptors,c3=Object.getOwnPropertySymbols,PH=Object.prototype.hasOwnProperty,OH=Object.prototype.propertyIsEnumerable,h3=(t,e,n)=>e in t?wH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,CH=(t,e)=>{for(var n in e||(e={}))PH.call(e,n)&&h3(t,n,e[n]);if(c3)for(var n of c3(e))OH.call(e,n)&&h3(t,n,e[n]);return t},MH=(t,e)=>_H(t,$H(e));class d3 extends Rn{constructor(){super(...arguments),this.name="select-highlight",this.highlightMasks=[],this.handleSelectionChanged=({next:e})=>{this.highlightSelection(e)},this.handleGeometryChanged=({target:e})=>{this.interaction.isSelected(e)&&this.highlightSelection(this.interaction.getSelection())},this.handleHistoryChanged=()=>{this.highlightSelection(this.interaction.getSelection())}}init(e){super.init(e);const{emitter:n}=e;n.on("selection:change",this.handleSelectionChanged),n.on("selection:geometrychange",this.handleGeometryChanged),n.on("history:change",this.handleHistoryChanged),this.highlightSelection(this.interaction.getSelection())}destroy(){this.clearMasks();const{emitter:e}=this;e.off("selection:change",this.handleSelectionChanged),e.off("selection:geometrychange",this.handleGeometryChanged),e.off("history:change",this.handleHistoryChanged)}highlightSelection(e){if(e.length===1&&mn(e[0])){this.clearMasks();return}this.drawElementMasks(e),this.drawCombinedBoundsMask(e)}drawElementMasks(e){let n=0;for(;n<e.length;n++){const{x:r,y:i,width:o,height:s}=cn(this.editor.getDocument(),e[n]),a={x:r,y:i,width:o,height:s,fill:"none",stroke:"#3384F5","stroke-width":1,"pointer-events":"none"},l=this.highlightMasks[n];l?Yt(l,a):this.highlightMasks[n]=this.interaction.appendTransientElement(wt("rect",a))}for(;n<this.highlightMasks.length;n++)this.highlightMasks[n].remove();this.highlightMasks=this.highlightMasks.slice(0,e.length)}drawCombinedBoundsMask(e){var n;if(e.length<2){(n=this.combinedBoundsMask)==null||n.remove(),this.combinedBoundsMask=void 0;return}const r=kr(e.map(o=>cn(this.editor.getDocument(),o))),i=MH(CH({},r),{fill:"none",stroke:"#3384F5","stroke-width":2,"pointer-events":"none"});this.combinedBoundsMask?Yt(this.combinedBoundsMask,i):this.combinedBoundsMask=this.interaction.appendTransientElement(wt("rect",i))}clearMasks(){var e;this.highlightMasks.forEach(n=>n.remove()),this.highlightMasks=[],(e=this.combinedBoundsMask)==null||e.remove(),this.combinedBoundsMask=void 0}}const u3=1,SH=-5e3,EH=5e3;class f3 extends Rn{constructor(){super(...arguments),this.name="zoom-wheel",this.wheelListener=e=>{var n;if(!this.interaction.isActive()||!e.ctrlKey&&!e.metaKey)return;e.preventDefault();const r=e.deltaY>0?1.1:.9,o=(n=this.state.getOptions().padding)!=null?n:0,s=tr(o),l=this.editor.getDocument().getBBox(),c=s.map(b=>N9((b===0?1:b)*r,SH,EH)),[h,u,f,p]=c,g=l.width+p+u,y=l.height+h+f;if(g<=u3||y<=u3)return;const m=new fH({padding:c});this.commander.execute(m)}}init(e){super.init(e),document.addEventListener("wheel",this.wheelListener,{passive:!1})}destroy(){document.removeEventListener("wheel",this.wheelListener)}}class gh{init(e){Object.assign(this,e)}}const fr=({icon:t,onClick:e,activate:n=!1})=>{TH();const r=document.createElement("button");r.type="button",r.classList.add(Bi),n&&r.setAttribute("data-activate","true"),e&&r.addEventListener("click",e);const i=t();return r.appendChild(i),Object.assign(r,{setActivate:(s=>{s?r.setAttribute("data-activate","true"):r.removeAttribute("data-activate")}).bind(r),activate:n})},Bi="infographic-edit-bar-icon-btn",IH="infographic-edit-bar-icon-btn-style";function TH(){rn(IH,`
150
- .${Bi} {
149
+ `)}var NR=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class m3 extends Hn{constructor(){super(...arguments),this.name="drag-element",this.selectionForDrag=[],this.willReplaceSelection=!1,this.exclusiveStarted=!1,this.dragItems=[],this.dragging=!1,this.dragThreshold=4,this.handleStart=e=>{if(!this.interaction.isActive()||e.pointerType==="mouse"&&e.button!==0)return;const n=Ks(e.target);if(!n||Ju(n))return;const r=this.editor.getDocument();this.pointerId=e.pointerId,this.startPoint=ur(r,e.clientX,e.clientY),this.dragging=!1,this.startTarget=n;const i=this.interaction.isSelected(n);this.selectionForDrag=i?this.interaction.getSelection():[n],this.willReplaceSelection=!i,this.exclusiveStarted=!1,this.startBounds=this.getSelectionBounds(this.selectionForDrag),this.guideCandidates=this.collectGuideCandidates(this.selectionForDrag),window.addEventListener("pointermove",this.handleMove),window.addEventListener("pointerup",this.handleEnd),window.addEventListener("pointercancel",this.handleEnd)},this.handleMove=e=>{if(e.pointerId!==this.pointerId||!this.startPoint)return;const n=this.editor.getDocument(),r=ur(n,e.clientX,e.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if(!this.dragging){if(Math.hypot(i,o)<this.dragThreshold)return;if(!this.startDrag()){this.reset();return}this.dragging=!0}const a=e.altKey?{dx:i,dy:o}:this.getSnappedDelta(i,o);e.preventDefault(),e.stopPropagation(),this.updateGuides(a),this.applyTranslation(a.dx,a.dy),this.emitGeometryChange()},this.handleEnd=e=>{if(e.pointerId!==this.pointerId||!this.startPoint)return;this.detachPointerListeners();const n=this.editor.getDocument(),r=ur(n,e.clientX,e.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if((this.dragging||Math.hypot(i,o)>=this.dragThreshold)&&this.dragItems.length&&this.exclusiveStarted){e.preventDefault(),e.stopPropagation();const a=e.altKey?{dx:i,dy:o}:this.getSnappedDelta(i,o);this.updateGuides(a),this.applyTranslation(a.dx,a.dy),this.commitTranslation(a.dx,a.dy),this.emitGeometryChange()}this.reset()}}init(e){super.init(e),this.editor.getDocument().addEventListener("pointerdown",this.handleStart)}destroy(){this.detachPointerListeners(),this.editor.getDocument().removeEventListener("pointerdown",this.handleStart)}startDrag(){if(this.exclusiveStarted)return!0;if(!this.startTarget||(this.willReplaceSelection&&this.interaction.select([this.startTarget],"replace"),this.dragItems=this.selectionForDrag.filter(n=>mn(n)).map(n=>this.createDragItem(n)).filter(Boolean),this.dragItems.length===0))return!1;let e=!1;return this.interaction.executeExclusiveInteraction(this,()=>NR(this,null,function*(){return new Promise(n=>{this.completeInteraction=n,e=!0})})),this.exclusiveStarted=e,e}applyTranslation(e,n){this.dragItems.forEach(r=>{if(r.mode==="attr"){const i=r.startX+e,o=r.startY+n,s={x:i,y:o};r.hasDataX&&(s["data-x"]=i),r.hasDataY&&(s["data-y"]=o),Yt(r.element,s)}else{const i=this.composeTransform(r.startX+e,r.startY+n,r.restTransform);Yt(r.element,{transform:i})}})}commitTranslation(e,n){if(Math.abs(e)<1e-6&&Math.abs(n)<1e-6)return;const r=this.dragItems.map(i=>{if(i.mode==="attr"){const a=i.startX+e,l=i.startY+n,c={x:a,y:l},h={};return i.hasX?h.x=i.startX:h.x=null,i.hasY?h.y=i.startY:h.y=null,i.hasDataX&&(c["data-x"]=a,h["data-x"]=i.startX),i.hasDataY&&(c["data-y"]=l,h["data-y"]=i.startY),new hn(i.element,{attributes:c},{attributes:h})}const o=this.composeTransform(i.startX+e,i.startY+n,i.restTransform),s=i.originalTransform!==void 0?i.originalTransform:null;return new hn(i.element,{attributes:{transform:o}},{attributes:{transform:s}})});r.length&&this.commander.executeBatch(r)}createDragItem(e){const n=this.getTransformInfo(e);if(n)return{element:e,mode:"transform",startX:n.x,startY:n.y,hasX:!1,hasY:!1,hasDataX:!1,hasDataY:!1,restTransform:n.rest,originalTransform:n.original};const{x:r,y:i,hasX:o,hasY:s,hasDataX:a,hasDataY:l}=this.getAttrInfo(e);return{element:e,mode:"attr",startX:r,startY:i,hasX:o,hasY:s,hasDataX:a,hasDataY:l}}getAttrInfo(e){const n=this.editor.getDocument(),{x:r,y:i}=cn(n,e),o=ke(e,["x","y","data-x","data-y"],!1),s=o.x!==null&&o.x!==void 0,a=o.y!==null&&o.y!==void 0,l=o["data-x"]!==null&&o["data-x"]!==void 0,c=o["data-y"]!==null&&o["data-y"]!==void 0,h=(x,v)=>{const b=x!=null?Number(x):NaN;return Number.isFinite(b)?b:v},u=h(o.x,NaN),f=h(o.y,NaN),p=h(o["data-x"],NaN),g=h(o["data-y"],NaN),y=Number.isFinite(u)?u:Number.isFinite(p)?p:r,m=Number.isFinite(f)?f:Number.isFinite(g)?g:i;return{x:y,y:m,hasX:s,hasY:a,hasDataX:l,hasDataY:c}}getTransformInfo(e){const n=e.getAttribute("transform");if(n===null)return null;const r=n.match(/translate\(\s*([-\d.]+)(?:[ ,]\s*([-\d.]+))?\s*\)/i);if(!r)return{x:0,y:0,rest:n,original:n};const i=Number(r[1])||0,o=r[2]!==void 0&&Number(r[2])||0,s=n.replace(r[0],"").trim();return{x:i,y:o,rest:s,original:n}}composeTransform(e,n,r){const i=`translate(${e}, ${n})`;return r&&r.length?`${i} ${r}`:i}emitGeometryChange(){var e;const n=(e=this.dragItems[0])==null?void 0:e.element;if(!n)return;const r=cn(this.editor.getDocument(),n);this.emitter.emit("selection:geometrychange",{type:"selection:geometrychange",target:n,rect:r})}detachPointerListeners(){window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd),window.removeEventListener("pointercancel",this.handleEnd)}reset(){var e;this.detachPointerListeners(),this.clearGuides(),this.pointerId=void 0,this.startPoint=void 0,this.dragItems=[],this.startTarget=void 0,this.selectionForDrag=[],this.willReplaceSelection=!1,this.exclusiveStarted=!1,this.dragging=!1,this.startBounds=void 0,this.guideCandidates=void 0,(e=this.completeInteraction)==null||e.call(this),this.completeInteraction=void 0}getSelectionBounds(e){if(!e.length)return;const n=this.editor.getDocument(),r=e.map(i=>cn(n,i));return Ar(r)}collectGuideCandidates(e){const n=this.editor.getDocument(),r=new Set(e),i=Array.from(n.querySelectorAll("[data-element-type]")).filter(a=>!r.has(a)),o=[],s=[];return i.forEach(a=>{const{x:l,y:c,width:h,height:u}=cn(n,a);o.push(l,l+h/2,l+h),s.push(c,c+u/2,c+u)}),{vertical:o,horizontal:s}}getSnappedDelta(e,n){if(!this.startBounds||!this.guideCandidates)return{dx:e,dy:n};const r={x:this.startBounds.x+e,y:this.startBounds.y+n,width:this.startBounds.width,height:this.startBounds.height},i=this.getSnapOffset([r.x,r.x+r.width/2,r.x+r.width],this.guideCandidates.vertical),o=this.getSnapOffset([r.y,r.y+r.height/2,r.y+r.height],this.guideCandidates.horizontal);return{dx:e+((i==null?void 0:i.offset)||0),dy:n+((o==null?void 0:o.offset)||0),snapX:i,snapY:o}}getSnapOffset(e,n,r=5){let i=null;return e.forEach(o=>{n.forEach(s=>{const a=s-o;Math.abs(a)<=r&&(!i||Math.abs(a)<Math.abs(i.offset))&&(i={offset:a,at:s})})}),i||void 0}ensureGuideLine(e){const n=e==="vertical"?this.guideVertical:this.guideHorizontal;if(n)return n;const r=this.interaction.appendTransientElement(wt("line",{stroke:"#FF7A45","stroke-width":1,"stroke-dasharray":"4 4","pointer-events":"none",visibility:"hidden"}));return e==="vertical"?this.guideVertical=r:this.guideHorizontal=r,r}updateGuides(e){const n=this.editor.getDocument(),{width:r,height:i}=n.viewBox.baseVal;if(e.snapX){const o=this.ensureGuideLine("vertical");Yt(o,{x1:e.snapX.at,y1:0,x2:e.snapX.at,y2:i,visibility:"visible"})}else this.guideVertical&&this.guideVertical.setAttribute("visibility","hidden");if(e.snapY){const o=this.ensureGuideLine("horizontal");Yt(o,{x1:0,y1:e.snapY.at,x2:r,y2:e.snapY.at,visibility:"visible"})}else this.guideHorizontal&&this.guideHorizontal.setAttribute("visibility","hidden")}clearGuides(){var e,n;(e=this.guideVertical)==null||e.remove(),(n=this.guideHorizontal)==null||n.remove(),this.guideVertical=void 0,this.guideHorizontal=void 0}}var y3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class v3 extends Hn{constructor(){super(...arguments),this.name="hotkey-history",this.handleUndo=e=>y3(this,null,function*(){e.preventDefault(),yield this.commander.undo()}),this.handleRedo=e=>y3(this,null,function*(){e.preventDefault(),yield this.commander.redo()})}init(e){super.init(e),this.hotkey=new vR({filter:()=>this.interaction.isActive()}),this.hotkey.bind("mod+z",this.handleUndo),this.hotkey.bind(["mod+shift+z","mod+y"],this.handleRedo)}destroy(){var e;(e=this.hotkey)==null||e.destroy()}}var jR=Object.defineProperty,FR=Object.defineProperties,BR=Object.getOwnPropertyDescriptors,x3=Object.getOwnPropertySymbols,WR=Object.prototype.hasOwnProperty,VR=Object.prototype.propertyIsEnumerable,b3=(t,e,n)=>e in t?jR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,YR=(t,e)=>{for(var n in e||(e={}))WR.call(e,n)&&b3(t,n,e[n]);if(x3)for(var n of x3(e))VR.call(e,n)&&b3(t,n,e[n]);return t},XR=(t,e)=>FR(t,BR(e));class w3 extends Hn{constructor(){super(...arguments),this.name="select-highlight",this.highlightMasks=[],this.handleSelectionChanged=({next:e})=>{this.highlightSelection(e)},this.handleGeometryChanged=({target:e})=>{this.interaction.isSelected(e)&&this.highlightSelection(this.interaction.getSelection())},this.handleHistoryChanged=()=>{this.highlightSelection(this.interaction.getSelection())}}init(e){super.init(e);const{emitter:n}=e;n.on("selection:change",this.handleSelectionChanged),n.on("selection:geometrychange",this.handleGeometryChanged),n.on("history:change",this.handleHistoryChanged),this.highlightSelection(this.interaction.getSelection())}destroy(){this.clearMasks();const{emitter:e}=this;e.off("selection:change",this.handleSelectionChanged),e.off("selection:geometrychange",this.handleGeometryChanged),e.off("history:change",this.handleHistoryChanged)}highlightSelection(e){if(e.length===1&&mn(e[0])){this.clearMasks();return}this.drawElementMasks(e),this.drawCombinedBoundsMask(e)}drawElementMasks(e){let n=0;for(;n<e.length;n++){const{x:r,y:i,width:o,height:s}=cn(this.editor.getDocument(),e[n]),a={x:r,y:i,width:o,height:s,fill:"none",stroke:"#3384F5","stroke-width":1,"pointer-events":"none"},l=this.highlightMasks[n];l?Yt(l,a):this.highlightMasks[n]=this.interaction.appendTransientElement(wt("rect",a))}for(;n<this.highlightMasks.length;n++)this.highlightMasks[n].remove();this.highlightMasks=this.highlightMasks.slice(0,e.length)}drawCombinedBoundsMask(e){var n;if(e.length<2){(n=this.combinedBoundsMask)==null||n.remove(),this.combinedBoundsMask=void 0;return}const r=Ar(e.map(o=>cn(this.editor.getDocument(),o))),i=XR(YR({},r),{fill:"none",stroke:"#3384F5","stroke-width":2,"pointer-events":"none"});this.combinedBoundsMask?Yt(this.combinedBoundsMask,i):this.combinedBoundsMask=this.interaction.appendTransientElement(wt("rect",i))}clearMasks(){var e;this.highlightMasks.forEach(n=>n.remove()),this.highlightMasks=[],(e=this.combinedBoundsMask)==null||e.remove(),this.combinedBoundsMask=void 0}}const _3=1,GR=-5e3,qR=5e3;class $3 extends Hn{constructor(){super(...arguments),this.name="zoom-wheel",this.wheelListener=e=>{var n;if(!this.interaction.isActive()||!e.ctrlKey&&!e.metaKey)return;e.preventDefault();const r=e.deltaY>0?1.1:.9,o=(n=this.state.getOptions().padding)!=null?n:0,s=tr(o),l=this.editor.getDocument().getBBox(),c=s.map(x=>Q9((x===0?1:x)*r,GR,qR)),[h,u,f,p]=c,g=l.width+p+u,y=l.height+h+f;if(g<=_3||y<=_3)return;const m=new AR({padding:c});this.commander.execute(m)}}init(e){super.init(e),document.addEventListener("wheel",this.wheelListener,{passive:!1})}destroy(){document.removeEventListener("wheel",this.wheelListener)}}class xh{init(e){Object.assign(this,e)}}const fr=({icon:t,onClick:e,activate:n=!1})=>{ZR();const r=document.createElement("button");r.type="button",r.classList.add(Wi),n&&r.setAttribute("data-activate","true"),e&&r.addEventListener("click",e);const i=t();return r.appendChild(i),Object.assign(r,{setActivate:(s=>{s?r.setAttribute("data-activate","true"):r.removeAttribute("data-activate")}).bind(r),activate:n})},Wi="infographic-edit-bar-icon-btn",UR="infographic-edit-bar-icon-btn-style";function ZR(){rn(UR,`
150
+ .${Wi} {
151
151
  padding: 0;
152
152
  display: flex;
153
153
  align-items: center;
@@ -162,22 +162,22 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
162
162
  cursor: pointer;
163
163
  transition: color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
164
164
  }
165
- .${Bi}:hover {
165
+ .${Wi}:hover {
166
166
  background-color: #f5f5f5;
167
167
  }
168
- .${Bi}:active {
168
+ .${Wi}:active {
169
169
  background-color: #d9d9d9;
170
170
  }
171
- .${Bi}[data-activate="true"] {
171
+ .${Wi}[data-activate="true"] {
172
172
  background-color: #d9d9d9;
173
173
  }
174
- `)}const dn="infographic-color-picker",p3=`${dn}__swatches`,Js=`${dn}__swatch`,g3=`${dn}__controls`,ta=`${dn}__input`,m3=`${dn}__format`,pr=`${dn}__format-switch`,mh=`${dn}__format-switch-knob`,ea=`${dn}__format-switch-label`,AH="infographic-color-picker-style",kH="#1f1f1f",zH=["#000000","#1f1f1f","#434343","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#ffffff","#1677ff","#2f54eb","#91caff","#13c2c2","#36cfc9","#52c41a","#73d13d","#fadb14","#ffd666","#fa8c16","#fa541c","#f5222d","#ff7875","#eb2f96","#ffadd2","#722ed1","#9254de","rgba(0, 0, 0, 0.65)","rgba(255, 255, 255, 0.85)"];function y3(t){var e,n,r;if(typeof document=="undefined")throw new Error("ColorPicker can only be used in the browser.");DH();const i=document.createElement("div");i.classList.add(dn);const o=document.createElement("div");o.classList.add(p3),i.appendChild(o);const s=document.createElement("div");s.classList.add(g3),i.appendChild(s);const a=document.createElement("input");a.type="text",a.spellcheck=!1,a.classList.add(ta),s.appendChild(a);const l=document.createElement("div");l.classList.add(m3),s.appendChild(l);const c=document.createElement("button");c.type="button",c.classList.add(pr),c.appendChild(w3("HEXA"));const h=document.createElement("span");h.classList.add(mh),c.appendChild(h),c.appendChild(w3("RGBA")),l.appendChild(c);let u="hexa",f=(n=(e=Wi(t.value))!=null?e:Wi(kH))!=null?n:{r:31,g:31,b:31,a:1};const p=[];return((r=t.swatches)!=null&&r.length?t.swatches:zH).forEach($=>{const P=Wi($);if(!P)return;const O=document.createElement("button");O.type="button",O.classList.add(Js),O.style.setProperty("--swatch-color",na(P,"rgba")),O.dataset.colorKey=b3(P),O.addEventListener("click",()=>{v(P)}),o.appendChild(O),p.push(O)}),c.addEventListener("click",()=>b(u==="hexa"?"rgba":"hexa")),a.addEventListener("change",m),a.addEventListener("keydown",$=>{$.key==="Enter"&&m()}),x(),Object.assign(i,{setValue:$=>{const P=Wi($);if(!P){a.setAttribute("data-invalid","true");return}a.removeAttribute("data-invalid"),v(P,!1)},destroy:()=>{i.remove()}});function m(){const $=Wi(a.value);if(!$){a.setAttribute("data-invalid","true");return}a.removeAttribute("data-invalid"),v($)}function b($,P){var O;u!==$&&(u=$,x(),(O=t.onChange)==null||O.call(t,na(f,u)))}function v($,P=!0){var O;if(RH(f,$)){x();return}f=$,x(),P&&((O=t.onChange)==null||O.call(t,na(f,u)))}function x(){a.value=na(f,u),w(),_()}function w(){const $=b3(f);p.forEach(P=>{P.dataset.colorKey===$?P.setAttribute("data-active","true"):P.removeAttribute("data-active")})}function _(){u==="rgba"?c.setAttribute("data-format","rgba"):c.setAttribute("data-format","hexa")}}function Wi(t){var e;if(!t)return;const n=tn(t);if(!n||typeof n.r!="number")return;const r=n;return{r:yh(r.r),g:yh(r.g),b:yh(r.b),a:x3((e=r.alpha)!=null?e:1)}}function na(t,e){return e==="rgba"?LH(t):v3(t)}function v3(t){const e=ra(t.r),n=ra(t.g),r=ra(t.b),i=t.a<1?ra(Math.round(t.a*255)):"";return`#${e}${n}${r}${i}`}function LH(t){const e=HH(t.a);return`rgba(${t.r}, ${t.g}, ${t.b}, ${e})`}function b3(t){return v3(t).toLowerCase()}function RH(t,e){return t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a}function x3(t){return Number.isNaN(t)?0:Math.min(1,Math.max(0,t))}function yh(t){if(Number.isNaN(t))return 0;const e=t<=1?t*255:t;return Math.round(Math.min(255,Math.max(0,e)))}function ra(t){return t.toString(16).padStart(2,"0")}function HH(t){const e=Math.round(x3(t)*100)/100;return e===1?"1":e===0?"0":e.toString()}function w3(t){const e=document.createElement("span");return e.textContent=t,e.classList.add(ea),e}function DH(){rn(AH,`
174
+ `)}const dn="infographic-color-picker",P3=`${dn}__swatches`,Js=`${dn}__swatch`,C3=`${dn}__controls`,ta=`${dn}__input`,O3=`${dn}__format`,pr=`${dn}__format-switch`,bh=`${dn}__format-switch-knob`,ea=`${dn}__format-switch-label`,KR="infographic-color-picker-style",QR="#1f1f1f",JR=["#000000","#1f1f1f","#434343","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#ffffff","#1677ff","#2f54eb","#91caff","#13c2c2","#36cfc9","#52c41a","#73d13d","#fadb14","#ffd666","#fa8c16","#fa541c","#f5222d","#ff7875","#eb2f96","#ffadd2","#722ed1","#9254de","rgba(0, 0, 0, 0.65)","rgba(255, 255, 255, 0.85)"];function M3(t){var e,n,r;if(typeof document=="undefined")throw new Error("ColorPicker can only be used in the browser.");rD();const i=document.createElement("div");i.classList.add(dn);const o=document.createElement("div");o.classList.add(P3),i.appendChild(o);const s=document.createElement("div");s.classList.add(C3),i.appendChild(s);const a=document.createElement("input");a.type="text",a.spellcheck=!1,a.classList.add(ta),s.appendChild(a);const l=document.createElement("div");l.classList.add(O3),s.appendChild(l);const c=document.createElement("button");c.type="button",c.classList.add(pr),c.appendChild(T3("HEXA"));const h=document.createElement("span");h.classList.add(bh),c.appendChild(h),c.appendChild(T3("RGBA")),l.appendChild(c);let u="hexa",f=(n=(e=Vi(t.value))!=null?e:Vi(QR))!=null?n:{r:31,g:31,b:31,a:1};const p=[];return((r=t.swatches)!=null&&r.length?t.swatches:JR).forEach($=>{const P=Vi($);if(!P)return;const C=document.createElement("button");C.type="button",C.classList.add(Js),C.style.setProperty("--swatch-color",na(P,"rgba")),C.dataset.colorKey=E3(P),C.addEventListener("click",()=>{v(P)}),o.appendChild(C),p.push(C)}),c.addEventListener("click",()=>x(u==="hexa"?"rgba":"hexa")),a.addEventListener("change",m),a.addEventListener("keydown",$=>{$.key==="Enter"&&m()}),b(),Object.assign(i,{setValue:$=>{const P=Vi($);if(!P){a.setAttribute("data-invalid","true");return}a.removeAttribute("data-invalid"),v(P,!1)},destroy:()=>{i.remove()}});function m(){const $=Vi(a.value);if(!$){a.setAttribute("data-invalid","true");return}a.removeAttribute("data-invalid"),v($)}function x($,P){var C;u!==$&&(u=$,b(),(C=t.onChange)==null||C.call(t,na(f,u)))}function v($,P=!0){var C;if(eD(f,$)){b();return}f=$,b(),P&&((C=t.onChange)==null||C.call(t,na(f,u)))}function b(){a.value=na(f,u),w(),_()}function w(){const $=E3(f);p.forEach(P=>{P.dataset.colorKey===$?P.setAttribute("data-active","true"):P.removeAttribute("data-active")})}function _(){u==="rgba"?c.setAttribute("data-format","rgba"):c.setAttribute("data-format","hexa")}}function Vi(t){var e;if(!t)return;const n=tn(t);if(!n||typeof n.r!="number")return;const r=n;return{r:wh(r.r),g:wh(r.g),b:wh(r.b),a:I3((e=r.alpha)!=null?e:1)}}function na(t,e){return e==="rgba"?tD(t):S3(t)}function S3(t){const e=ra(t.r),n=ra(t.g),r=ra(t.b),i=t.a<1?ra(Math.round(t.a*255)):"";return`#${e}${n}${r}${i}`}function tD(t){const e=nD(t.a);return`rgba(${t.r}, ${t.g}, ${t.b}, ${e})`}function E3(t){return S3(t).toLowerCase()}function eD(t,e){return t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a}function I3(t){return Number.isNaN(t)?0:Math.min(1,Math.max(0,t))}function wh(t){if(Number.isNaN(t))return 0;const e=t<=1?t*255:t;return Math.round(Math.min(255,Math.max(0,e)))}function ra(t){return t.toString(16).padStart(2,"0")}function nD(t){const e=Math.round(I3(t)*100)/100;return e===1?"1":e===0?"0":e.toString()}function T3(t){const e=document.createElement("span");return e.textContent=t,e.classList.add(ea),e}function rD(){rn(KR,`
175
175
  .${dn} {
176
176
  width: 240px;
177
177
  padding: 10px;
178
178
  box-sizing: border-box;
179
179
  }
180
- .${p3} {
180
+ .${P3} {
181
181
  display: grid;
182
182
  grid-template-columns: repeat(auto-fit, 26px);
183
183
  gap: 6px;
@@ -201,7 +201,7 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
201
201
  .${Js}:hover {
202
202
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
203
203
  }
204
- .${g3} {
204
+ .${C3} {
205
205
  display: flex;
206
206
  align-items: center;
207
207
  gap: 6px;
@@ -231,7 +231,7 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
231
231
  border-color: #ff4d4f;
232
232
  box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.12);
233
233
  }
234
- .${m3} {
234
+ .${O3} {
235
235
  display: inline-flex;
236
236
  }
237
237
  .${pr} {
@@ -257,7 +257,7 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
257
257
  border-color: #1677ff;
258
258
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
259
259
  }
260
- .${mh} {
260
+ .${bh} {
261
261
  position: absolute;
262
262
  inset: 0;
263
263
  width: 50%;
@@ -266,7 +266,7 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
266
266
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
267
267
  transition: transform 0.2s ease;
268
268
  }
269
- .${pr}[data-format="rgba"] .${mh} {
269
+ .${pr}[data-format="rgba"] .${bh} {
270
270
  transform: translateX(100%);
271
271
  }
272
272
  .${ea} {
@@ -284,7 +284,7 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
284
284
  `)}const ue=(t,{viewBox:e="0 0 1024 1024",size:n="1.5em"}={})=>({fill:r="currentColor"}={})=>{const i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${e}" width="${n}" height="${n}" fill="${r}">
285
285
  ${t.trim()}
286
286
  </svg>`;return document.createRange().createContextualFragment(i).firstElementChild},wn={fontFamily:ue('<path d="M236.992 938.688H145.088L469.312 128h85.376l324.224 810.688h-91.904l-102.4-256H339.392l-102.4 256z m136.512-341.376h276.992L512 251.072l-138.496 346.24z"></path>',{size:"1.2em"}),fontSize:ue('<path d="M479.829333 640H202.837333l-85.333333 213.333333H25.6L298.666667 170.666667h85.333333l273.066667 682.666666h-91.904l-85.333334-213.333333z m-34.133333-85.333333L341.333333 293.76 236.970667 554.666667h208.725333zM896 534.826667V512h85.333333v341.333333h-85.333333v-22.826666a170.666667 170.666667 0 1 1 0-295.68zM810.666667 768a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z"></path>',{size:"1.2em"}),align:ue('<path d="M832 96c53.02 0 96 42.98 96 96v640c0 53.02-42.98 96-96 96H192c-53.02 0-96-42.98-96-96V192c0-53.02 42.98-96 96-96z m0 64H192c-17.673 0-32 14.327-32 32v640c0 17.673 14.327 32 32 32h640c17.673 0 32-14.327 32-32V192c0-17.673-14.327-32-32-32zM725.333 672c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H298.667c-17.673 0-32-14.327-32-32 0-17.496 14.041-31.713 31.47-31.996l0.53-0.004h426.666z m0-192c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H298.667c-17.673 0-32-14.327-32-32 0-17.496 14.041-31.713 31.47-31.996l0.53-0.004h426.666z m0-192c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H298.667c-17.673 0-32-14.327-32-32 0-17.496 14.041-31.713 31.47-31.996l0.53-0.004h426.666z"></path>'),alignTop:ue('<path d="M896 859.329c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768z m0-121.533c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM512.45 91.003L512 91a32.632 32.632 0 0 1 1.653 0.042l0.134 0.008c3.447 0.189 6.75 0.924 9.82 2.12l0.198 0.078a16.118 16.118 0 0 1 0.485 0.197l0.11 0.046a31.82 31.82 0 0 1 8.546 5.315l0.12 0.105a31.066 31.066 0 0 1 1.189 1.095l0.08 0.078 0.235 0.23 0.062 0.063 128 128.055c12.494 12.5 12.49 32.761-0.01 45.255-12.374 12.37-32.356 12.489-44.877 0.362l-0.377-0.372L544 200.28v413.598c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.996-31.471l-0.004-0.53V200.278l-73.368 73.4c-12.369 12.375-32.35 12.503-44.877 0.381l-0.378-0.37c-12.374-12.37-12.502-32.352-0.38-44.878l0.37-0.378 128-128.055 0.181-0.178a31.875 31.875 0 0 1 9.5-6.47l0.105-0.046c0.116-0.051 0.233-0.101 0.35-0.15 0.054-0.024 0.11-0.047 0.165-0.07a28.198 28.198 0 0 1 0.536-0.219l0.157-0.061a31.816 31.816 0 0 1 9.356-2.103l0.113-0.007c0.147-0.01 0.294-0.02 0.442-0.027l0.028-0.001 0.39-0.019 0.144-0.005a23.911 23.911 0 0 1 0.712-0.018c0.3-0.004 0.602-0.004 0.904 0z"></path>'),alignRight:ue('<path d="M896 800.339c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H298.667c-17.673 0-32-14.327-32-32 0-17.497 14.041-31.713 31.47-31.996l0.53-0.004H896z m0-213.226c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h768z m0-213.226c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H298.667c-17.673 0-32-14.327-32-32 0-17.496 14.041-31.713 31.47-31.996l0.53-0.004H896z m0-213.226c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z"></path>'),alignBottom:ue('<path d="M896 859.329c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768z m0-121.533c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM490.505 637.584l-0.127-0.117a32.174 32.174 0 0 1-0.633-0.596l-0.098-0.096-0.217-0.213-0.062-0.063-128-128.055c-12.494-12.499-12.49-32.76 0.01-45.254 12.374-12.37 32.356-12.489 44.877-0.362l0.377 0.371L480 536.598V123c0-17.673 14.327-32 32-32 17.496 0 31.713 14.042 31.996 31.47l0.004 0.53v413.597l73.368-73.398c12.494-12.5 32.755-12.503 45.255-0.01 12.374 12.37 12.502 32.352 0.38 44.878l-0.37 0.377-128 128.055c-0.121 0.12-0.238 0.236-0.356 0.35l0.355-0.35a31.922 31.922 0 0 1-9.68 6.649l-0.09 0.039a29.917 29.917 0 0 1-1.241 0.514 31.816 31.816 0 0 1-9.338 2.095l-0.113 0.008c-0.147 0.01-0.294 0.019-0.442 0.027h-0.028c-0.13 0.008-0.26 0.014-0.39 0.02l-0.144 0.005a23.92 23.92 0 0 1-0.796 0.019 33.927 33.927 0 0 1-0.37 0.002h-0.13l-0.236-0.002 0.366 0.002a32.633 32.633 0 0 1-1.153-0.02l-0.129-0.006a31.108 31.108 0 0 1-0.876-0.046l-0.105-0.008a31.811 31.811 0 0 1-8.926-1.931l-0.089-0.034a21.022 21.022 0 0 1-0.362-0.138l-0.098-0.04a22.132 22.132 0 0 1-0.746-0.304l-0.219-0.093-0.209-0.092a31.812 31.812 0 0 1-8.034-5.094l-0.12-0.105-0.173-0.153-0.151-0.136-0.105-0.093z"></path>'),alignLeft:ue('<path d="M725.333 800.339c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h597.333zM896 587.113c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h768zM725.333 373.887c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h597.333zM896 160.661c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z"></path>'),alignCenter:ue('<path d="M768 800.339c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H256c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h512z m128-213.226c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h768zM768 373.887c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H256c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h512z m128-213.226c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z"></path>'),alignMiddle:ue('<path d="M534.246 617.448l0.377 0.371 128 127.952c12.5 12.494 12.503 32.755 0.009 45.255-12.37 12.374-32.352 12.501-44.878 0.38l-0.377-0.372-73.38-73.352V939c0 17.673-14.326 32-32 32-17.496 0-31.712-14.042-31.995-31.47l-0.004-0.53-0.001-221.314-73.374 73.348c-12.374 12.37-32.356 12.49-44.878 0.363l-0.377-0.371c-12.37-12.375-12.49-32.356-0.362-44.878l0.37-0.377 128-127.952c12.372-12.366 32.347-12.49 44.87-0.37zM896 480.508c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM511.998 54c17.496 0 31.713 14.042 31.996 31.47l0.004 0.53-0.001 221.314 73.38-73.349c12.499-12.494 32.76-12.49 45.255 0.009 12.37 12.374 12.49 32.356 0.362 44.878l-0.37 0.377-128 127.951c-12.372 12.366-32.347 12.49-44.87 0.371l-0.377-0.37-128-127.952c-12.5-12.495-12.503-32.756-0.009-45.255 12.37-12.374 32.352-12.502 44.878-0.38l0.377 0.371 73.374 73.346V86c0-17.673 14.328-32 32-32z"></path>')},_n={align:ue('<path d="M555.188 715.059c17.673 0 32 14.327 32 32V875c0 17.673-14.327 32-32 32H171c-17.673 0-32-14.327-32-32V747.059c0-17.673 14.327-32 32-32z m-32.001 63.999H203V843h320.187v-63.942zM854 416.529c17.673 0 32 14.327 32 32v127.942c0 17.673-14.327 32-32 32H171c-17.673 0-32-14.327-32-32V448.529c0-17.673 14.327-32 32-32z m-32 64H203v63.941h619v-63.941zM683.25 118c17.673 0 32 14.327 32 32v127.941c0 17.673-14.327 32-32 32H171c-17.673 0-32-14.327-32-32V150c0-17.673 14.327-32 32-32z m-32 64H203v63.941h448.25V182z"></path>'),alignTop:ue(`
287
- <path d="M661.333 272.411c17.673 0 32 14.327 32 32V902c0 17.673-14.327 32-32 32H362.667c-17.673 0-32-14.327-32-32V304.411c0-17.673 14.327-32 32-32z m-32 63.999H394.666V870h234.667V336.41zM896 101.671c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z" />`),alignRight:ue('<path d="M891.329 96c17.496 0 31.713 14.042 31.995 31.47l0.005 0.53v768c0 17.673-14.327 32-32 32-17.497 0-31.713-14.042-31.996-31.47l-0.004-0.53V128c0-17.673 14.327-32 32-32z m-170.74 234.667c17.673 0 32 14.327 32 32v298.666c0 17.673-14.327 32-32 32H123c-17.673 0-32-14.327-32-32V362.667c0-17.673 14.327-32 32-32z m-32 63.999H155v234.667h533.589V394.666z" />'),alignBottom:ue('<path d="M896 859.329c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768zM661.333 91c17.673 0 32 14.327 32 32v597.589c0 17.673-14.327 32-32 32H362.667c-17.673 0-32-14.327-32-32V123c0-17.673 14.327-32 32-32z m-32 64H394.666v533.589h234.667V155z" />'),alignLeft:ue('<path d="M133.671 96c17.497 0 31.713 14.042 31.996 31.47l0.004 0.53v768c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.995-31.47l-0.005-0.53V128c0-17.673 14.327-32 32-32zM902 330.667c17.673 0 32 14.327 32 32v298.666c0 17.673-14.327 32-32 32H304.411c-17.673 0-32-14.327-32-32V362.667c0-17.673 14.327-32 32-32z m-32.001 63.999H336.41v234.667h533.589V394.666z" />'),alignH:ue('<path d="M512.5 96c17.496 0 31.713 14.042 31.996 31.47l0.004 0.53v202.666H875c17.496 0 31.713 14.042 31.996 31.471l0.004 0.53v298.666c0 17.673-14.327 32-32 32H544.5V896c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.996-31.47l-0.004-0.53V693.333H150c-17.496 0-31.713-14.041-31.996-31.47l-0.004-0.53V362.667c0-17.673 14.327-32 32-32l330.5-0.001V128c0-17.673 14.327-32 32-32z m-32 298.666H182v234.667h298.5V394.666z m362.5 0H544.5v234.667H843V394.666z" />'),alignV:ue('<path d="M661.333 118c17.673 0 32 14.327 32 32v330.5H896c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H693.333V875c0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H362.667c-17.673 0-32-14.327-32-32l-0.001-330.5H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h202.666V150c0-17.496 14.042-31.713 31.471-31.996l0.53-0.004z m-32.001 426.5H394.665l0.001 298.5h234.667l-0.001-298.5z m0.001-362.5H394.666l-0.001 298.5h234.667l0.001-298.5z" />'),distributeH:ue('<path d="M853.333 96c17.497 0 31.713 14.042 31.996 31.47l0.004 0.53v768c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.995-31.47l-0.005-0.53V128c0-17.673 14.327-32 32-32z m-682.666 0c17.496 0 31.713 14.042 31.995 31.47l0.005 0.53v768c0 17.673-14.327 32-32 32-17.497 0-31.713-14.042-31.996-31.47l-0.004-0.53V128c0-17.673 14.327-32 32-32zM640 181.333c17.673 0 32 14.327 32 32v597.334c0 17.673-14.327 32-32 32H384c-17.673 0-32-14.327-32-32V213.333c0-17.673 14.327-32 32-32z m-32 64H416v533.333h192V245.333z" />'),distributeV:ue('<path d="M896 821.333c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM810.667 352c17.673 0 32 14.327 32 32v256c0 17.673-14.327 32-32 32H213.333c-17.673 0-32-14.327-32-32V384c0-17.673 14.327-32 32-32z m-32 64H245.334v192h533.333V416zM896 138.667c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768z" />')},ia="infographic-edit-popover",oe=`${ia}__content`,Ge=`${ia}__arrow`,NH="infographic-edit-popover-style";function Fr(t){var e,n,r,i,o,s,a,l;jH();const c=(e=t.placement)!=null?e:"top",h=(n=t.closeOnOutsideClick)!=null?n:!0,u=Array.isArray(t.trigger)?t.trigger:[t.trigger||"hover"],f=(r=t.mouseEnterDelay)!=null?r:50,p=(i=t.mouseLeaveDelay)!=null?i:150,g=(o=t.offset)!=null?o:8,y=8,m=7,b=typeof t.padding=="number"?`${t.padding}px`:(s=t.padding)!=null?s:"4px",v=document.createElement("div");v.classList.add(ia);const x=(a=t.target)!=null?a:document.createElement("div");v.appendChild(x);const w=()=>{const V=typeof t.getContainer=="function"?t.getContainer():t.getContainer;return V!=null?V:document.body},_=document.createElement("div");_.classList.add(oe),oi(_,ya),_.dataset.placement=Array.isArray(c)?c[0]:c,_.setAttribute("data-open",String(!!t.open)),_.style.setProperty("--popover-gap",`${g}px`),_.style.setProperty("--popover-arrow-size",`${y}px`),_.style.setProperty("--popover-arrow-inner-size",`${m}px`);const $=w(),P=$!==v,O=document.createElement("div");O.classList.add(Ge),_.appendChild(O);const T=document.createElement("div");T.classList.add(`${oe}-body`),T.style.padding=b,_.appendChild(T),$.appendChild(_);let I=!!t.open,S=Array.isArray(c)?c:[c],H=(l=S[0])!=null?l:"top";const C=()=>{var V;const G=x.getBoundingClientRect(),Z=_.getBoundingClientRect(),K=window.scrollX||document.documentElement.scrollLeft,nt=window.scrollY||document.documentElement.scrollTop,at=document.documentElement.clientWidth,pt=document.documentElement.clientHeight;let ft=0,rt=0;const tt=gt=>{switch(gt){case"top":return{left:K+G.left+G.width/2-Z.width/2,top:nt+G.top-Z.height-g};case"bottom":return{left:K+G.left+G.width/2-Z.width/2,top:nt+G.bottom+g};case"left":return{left:K+G.left-Z.width-g,top:nt+G.top+G.height/2-Z.height/2};case"right":default:return{left:K+G.right+g,top:nt+G.top+G.height/2-Z.height/2}}},et=(gt,dt)=>gt>=K&&dt>=nt&&gt+Z.width<=K+at&&dt+Z.height<=nt+pt;let st=(V=S[0])!=null?V:"top",vt=tt(st);for(const gt of S){const dt=tt(gt);if(vt=dt,et(dt.left,dt.top)){st=gt;break}}H=st,_.dataset.placement=H,P&&({left:ft,top:rt}=vt,_.style.left=`${ft}px`,_.style.top=`${rt}px`,_.style.right="auto",_.style.bottom="auto",_.style.transform="translate(0, 0)")};P&&(_.style.position="absolute",window.addEventListener("resize",C),window.addEventListener("scroll",C,!0));const A=V=>{let G=V;typeof G=="function"&&(G=G()),T.innerHTML="",G instanceof HTMLElement?T.appendChild(G):T.textContent=G!=null?G:"",C()},B=V=>{var G;S=Array.isArray(V)?V:[V],H=(G=S[0])!=null?G:"top",C()},k=V=>{I=V,_.setAttribute("data-open",String(I)),I&&C(),I&&h?document.addEventListener("click",z,!0):document.removeEventListener("click",z,!0)},D=()=>k(!I),z=V=>{const G=V.target;!v.contains(G)&&(!P||!_.contains(G))&&k(!1)};let N,j;const X=u.includes("hover"),L=u.includes("click"),M=()=>{N!==void 0&&(clearTimeout(N),N=void 0),j!==void 0&&(clearTimeout(j),j=void 0)},R=()=>{X&&(M(),N=window.setTimeout(()=>k(!0),f))},W=()=>{X&&(M(),j=window.setTimeout(()=>k(!1),p))};return L&&x.addEventListener("click",D),X&&(v.addEventListener("mouseenter",R),v.addEventListener("mouseleave",W),_.addEventListener("mouseenter",R),_.addEventListener("mouseleave",W)),A(t.content),B(c),k(I),Object.assign(v,{setOpen:k,toggle:D,setContent:A,setPlacement:B,destroy:()=>{document.removeEventListener("click",z,!0),L&&x.removeEventListener("click",D),X&&(v.removeEventListener("mouseenter",R),v.removeEventListener("mouseleave",W),_.removeEventListener("mouseenter",R),_.removeEventListener("mouseleave",W),M()),P&&(window.removeEventListener("resize",C),window.removeEventListener("scroll",C,!0),_.remove()),v.remove()}})}function jH(){rn(NH,`
287
+ <path d="M661.333 272.411c17.673 0 32 14.327 32 32V902c0 17.673-14.327 32-32 32H362.667c-17.673 0-32-14.327-32-32V304.411c0-17.673 14.327-32 32-32z m-32 63.999H394.666V870h234.667V336.41zM896 101.671c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z" />`),alignRight:ue('<path d="M891.329 96c17.496 0 31.713 14.042 31.995 31.47l0.005 0.53v768c0 17.673-14.327 32-32 32-17.497 0-31.713-14.042-31.996-31.47l-0.004-0.53V128c0-17.673 14.327-32 32-32z m-170.74 234.667c17.673 0 32 14.327 32 32v298.666c0 17.673-14.327 32-32 32H123c-17.673 0-32-14.327-32-32V362.667c0-17.673 14.327-32 32-32z m-32 63.999H155v234.667h533.589V394.666z" />'),alignBottom:ue('<path d="M896 859.329c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768zM661.333 91c17.673 0 32 14.327 32 32v597.589c0 17.673-14.327 32-32 32H362.667c-17.673 0-32-14.327-32-32V123c0-17.673 14.327-32 32-32z m-32 64H394.666v533.589h234.667V155z" />'),alignLeft:ue('<path d="M133.671 96c17.497 0 31.713 14.042 31.996 31.47l0.004 0.53v768c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.995-31.47l-0.005-0.53V128c0-17.673 14.327-32 32-32zM902 330.667c17.673 0 32 14.327 32 32v298.666c0 17.673-14.327 32-32 32H304.411c-17.673 0-32-14.327-32-32V362.667c0-17.673 14.327-32 32-32z m-32.001 63.999H336.41v234.667h533.589V394.666z" />'),alignH:ue('<path d="M512.5 96c17.496 0 31.713 14.042 31.996 31.47l0.004 0.53v202.666H875c17.496 0 31.713 14.042 31.996 31.471l0.004 0.53v298.666c0 17.673-14.327 32-32 32H544.5V896c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.996-31.47l-0.004-0.53V693.333H150c-17.496 0-31.713-14.041-31.996-31.47l-0.004-0.53V362.667c0-17.673 14.327-32 32-32l330.5-0.001V128c0-17.673 14.327-32 32-32z m-32 298.666H182v234.667h298.5V394.666z m362.5 0H544.5v234.667H843V394.666z" />'),alignV:ue('<path d="M661.333 118c17.673 0 32 14.327 32 32v330.5H896c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H693.333V875c0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H362.667c-17.673 0-32-14.327-32-32l-0.001-330.5H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h202.666V150c0-17.496 14.042-31.713 31.471-31.996l0.53-0.004z m-32.001 426.5H394.665l0.001 298.5h234.667l-0.001-298.5z m0.001-362.5H394.666l-0.001 298.5h234.667l0.001-298.5z" />'),distributeH:ue('<path d="M853.333 96c17.497 0 31.713 14.042 31.996 31.47l0.004 0.53v768c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.995-31.47l-0.005-0.53V128c0-17.673 14.327-32 32-32z m-682.666 0c17.496 0 31.713 14.042 31.995 31.47l0.005 0.53v768c0 17.673-14.327 32-32 32-17.497 0-31.713-14.042-31.996-31.47l-0.004-0.53V128c0-17.673 14.327-32 32-32zM640 181.333c17.673 0 32 14.327 32 32v597.334c0 17.673-14.327 32-32 32H384c-17.673 0-32-14.327-32-32V213.333c0-17.673 14.327-32 32-32z m-32 64H416v533.333h192V245.333z" />'),distributeV:ue('<path d="M896 821.333c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM810.667 352c17.673 0 32 14.327 32 32v256c0 17.673-14.327 32-32 32H213.333c-17.673 0-32-14.327-32-32V384c0-17.673 14.327-32 32-32z m-32 64H245.334v192h533.333V416zM896 138.667c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768z" />')},ia="infographic-edit-popover",oe=`${ia}__content`,Ge=`${ia}__arrow`,iD="infographic-edit-popover-style";function jr(t){var e,n,r,i,o,s,a,l;oD();const c=(e=t.placement)!=null?e:"top",h=(n=t.closeOnOutsideClick)!=null?n:!0,u=Array.isArray(t.trigger)?t.trigger:[t.trigger||"hover"],f=(r=t.mouseEnterDelay)!=null?r:50,p=(i=t.mouseLeaveDelay)!=null?i:150,g=(o=t.offset)!=null?o:8,y=8,m=7,x=typeof t.padding=="number"?`${t.padding}px`:(s=t.padding)!=null?s:"4px",v=document.createElement("div");v.classList.add(ia);const b=(a=t.target)!=null?a:document.createElement("div");v.appendChild(b);const w=()=>{const Y=typeof t.getContainer=="function"?t.getContainer():t.getContainer;return Y!=null?Y:document.body},_=document.createElement("div");_.classList.add(oe),si(_,ya),_.dataset.placement=Array.isArray(c)?c[0]:c,_.setAttribute("data-open",String(!!t.open)),_.style.setProperty("--popover-gap",`${g}px`),_.style.setProperty("--popover-arrow-size",`${y}px`),_.style.setProperty("--popover-arrow-inner-size",`${m}px`);const $=w(),P=$!==v,C=document.createElement("div");C.classList.add(Ge),_.appendChild(C);const T=document.createElement("div");T.classList.add(`${oe}-body`),T.style.padding=x,_.appendChild(T),$.appendChild(_);let E=!!t.open,S=Array.isArray(c)?c:[c],R=(l=S[0])!=null?l:"top";const O=()=>{var Y;const G=b.getBoundingClientRect(),Z=_.getBoundingClientRect(),K=window.scrollX||document.documentElement.scrollLeft,et=window.scrollY||document.documentElement.scrollTop,st=document.documentElement.clientWidth,pt=document.documentElement.clientHeight;let ft=0,it=0;const tt=gt=>{switch(gt){case"top":return{left:K+G.left+G.width/2-Z.width/2,top:et+G.top-Z.height-g};case"bottom":return{left:K+G.left+G.width/2-Z.width/2,top:et+G.bottom+g};case"left":return{left:K+G.left-Z.width-g,top:et+G.top+G.height/2-Z.height/2};case"right":default:return{left:K+G.right+g,top:et+G.top+G.height/2-Z.height/2}}},nt=(gt,dt)=>gt>=K&&dt>=et&&gt+Z.width<=K+st&&dt+Z.height<=et+pt;let at=(Y=S[0])!=null?Y:"top",vt=tt(at);for(const gt of S){const dt=tt(gt);if(vt=dt,nt(dt.left,dt.top)){at=gt;break}}R=at,_.dataset.placement=R,P&&({left:ft,top:it}=vt,_.style.left=`${ft}px`,_.style.top=`${it}px`,_.style.right="auto",_.style.bottom="auto",_.style.transform="translate(0, 0)")};P&&(_.style.position="absolute",window.addEventListener("resize",O),window.addEventListener("scroll",O,!0));const A=Y=>{let G=Y;typeof G=="function"&&(G=G()),T.innerHTML="",G instanceof HTMLElement?T.appendChild(G):T.textContent=G!=null?G:"",O()},B=Y=>{var G;S=Array.isArray(Y)?Y:[Y],R=(G=S[0])!=null?G:"top",O()},L=Y=>{E=Y,_.setAttribute("data-open",String(E)),E&&O(),E&&h?document.addEventListener("click",k,!0):document.removeEventListener("click",k,!0)},D=()=>L(!E),k=Y=>{const G=Y.target;!v.contains(G)&&(!P||!_.contains(G))&&L(!1)};let N,j;const X=u.includes("hover"),z=u.includes("click"),M=()=>{N!==void 0&&(clearTimeout(N),N=void 0),j!==void 0&&(clearTimeout(j),j=void 0)},H=()=>{X&&(M(),N=window.setTimeout(()=>L(!0),f))},W=()=>{X&&(M(),j=window.setTimeout(()=>L(!1),p))};return z&&b.addEventListener("click",D),X&&(v.addEventListener("mouseenter",H),v.addEventListener("mouseleave",W),_.addEventListener("mouseenter",H),_.addEventListener("mouseleave",W)),A(t.content),B(c),L(E),Object.assign(v,{setOpen:L,toggle:D,setContent:A,setPlacement:B,destroy:()=>{document.removeEventListener("click",k,!0),z&&b.removeEventListener("click",D),X&&(v.removeEventListener("mouseenter",H),v.removeEventListener("mouseleave",W),_.removeEventListener("mouseenter",H),_.removeEventListener("mouseleave",W),M()),P&&(window.removeEventListener("resize",O),window.removeEventListener("scroll",O,!0),_.remove()),v.remove()}})}function oD(){rn(iD,`
288
288
  .${ia} {
289
289
  position: relative;
290
290
  display: inline-flex;
@@ -426,24 +426,24 @@ ${t.trim()}
426
426
  .${oe}[data-placement="right"][data-open="true"] {
427
427
  transform: translate(0, -50%);
428
428
  }
429
- `)}const vh="infographic-align-grid",_3=`${vh}--compact`,FH="infographic-align-grid-style",BH=`
430
- .${vh} {
429
+ `)}const _h="infographic-align-grid",A3=`${_h}--compact`,sD="infographic-align-grid-style",aD=`
430
+ .${_h} {
431
431
  display: grid;
432
432
  grid-template-columns: repeat(4, 32px);
433
433
  grid-auto-rows: 32px;
434
434
  gap: 2px;
435
435
  }
436
- .${_3} {
436
+ .${A3} {
437
437
  grid-template-columns: repeat(3, 32px);
438
438
  }
439
- `,$3=[{icon:_n.alignLeft,action:"LEFT"},{icon:_n.alignH,action:"H_CENTER"},{icon:_n.alignRight,action:"RIGHT"},{icon:_n.distributeH,action:"H_DISTRIBUTE"},{icon:_n.alignTop,action:"TOP"},{icon:_n.alignV,action:"V_CENTER"},{icon:_n.alignBottom,action:"BOTTOM"},{icon:_n.distributeV,action:"V_DISTRIBUTE"}],WH=(t,e,n,r)=>{var i;rn(FH,BH);const o=(i=r==null?void 0:r.enableDistribution)!=null?i:!0,s=VH(a=>YH(t,a,n),o);return Fr({target:fr({icon:_n.align}),content:s,placement:"top",offset:12})};function VH(t,e){const n=document.createElement("div");return n.classList.add(vh),e||n.classList.add(_3),(e?$3:$3.filter(({action:i})=>i!=="H_DISTRIBUTE"&&i!=="V_DISTRIBUTE")).forEach(({icon:i,action:o})=>{const s=fr({icon:i,onClick:()=>t(o)});n.appendChild(s)}),n}function YH(t,e,n){if(!t.length)return;const r=t[0].ownerSVGElement;if(!r)return;const i=t.map(h=>qH(h,r)).filter(Boolean);if(!i.length)return;const o=i.filter(h=>h.movable);if(!o.length)return;const s=i.filter(h=>!h.movable),a=s.length?s:i,l=kr(a.map(h=>h.bounds)),c=[];switch(e){case"LEFT":{const h=l.x;o.forEach(u=>{const f=h-u.bounds.x;Hn(c,u,f,0)});break}case"H_CENTER":{const h=l.x+l.width/2;o.forEach(u=>{const f=h-(u.bounds.x+u.bounds.width/2);Hn(c,u,f,0)});break}case"RIGHT":{const h=l.x+l.width;o.forEach(u=>{const f=h-(u.bounds.x+u.bounds.width);Hn(c,u,f,0)});break}case"TOP":{const h=l.y;o.forEach(u=>{const f=h-u.bounds.y;Hn(c,u,0,f)});break}case"V_CENTER":{const h=l.y+l.height/2;o.forEach(u=>{const f=h-(u.bounds.y+u.bounds.height/2);Hn(c,u,0,f)});break}case"BOTTOM":{const h=l.y+l.height;o.forEach(u=>{const f=h-(u.bounds.y+u.bounds.height);Hn(c,u,0,f)});break}case"H_DISTRIBUTE":{XH(i,c);break}case"V_DISTRIBUTE":{GH(i,c);break}}c.length&&n.executeBatch(c)}function XH(t,e){if(t.length<=2)return;const n=[...t].sort((i,o)=>i.bounds.x-o.bounds.x||i.bounds.y-o.bounds.y),r=P3(n);for(let i=0;i<r.length-1;i++){const o=r[i],s=r[i+1],a=n[o],l=n[s],c=n.slice(o+1,s);if(!c.length)continue;const h=l.bounds.x-(a.bounds.x+a.bounds.width),u=c.reduce((g,y)=>g+y.bounds.width,0),f=(h-u)/(c.length+1);let p=a.bounds.x+a.bounds.width+f;c.forEach(g=>{const y=p-g.bounds.x;Hn(e,g,y,0),p+=g.bounds.width+f})}}function GH(t,e){if(t.length<=2)return;const n=[...t].sort((i,o)=>i.bounds.y-o.bounds.y||i.bounds.x-o.bounds.x),r=P3(n);for(let i=0;i<r.length-1;i++){const o=r[i],s=r[i+1],a=n[o],l=n[s],c=n.slice(o+1,s);if(!c.length)continue;const h=l.bounds.y-(a.bounds.y+a.bounds.height),u=c.reduce((g,y)=>g+y.bounds.height,0),f=(h-u)/(c.length+1);let p=a.bounds.y+a.bounds.height+f;c.forEach(g=>{const y=p-g.bounds.y;Hn(e,g,0,y),p+=g.bounds.height+f})}}function P3(t){const e=new Set;return e.add(0),e.add(t.length-1),t.forEach((n,r)=>{n.movable||e.add(r)}),Array.from(e).sort((n,r)=>n-r)}function Hn(t,e,n,r){const i=UH(e,n,r);i&&t.push(i)}function qH(t,e){const n=cn(e,t),r=!Tn(t),i=KH(t);if(i)return{element:t,bounds:n,mode:"transform",startX:i.x,startY:i.y,hasX:!1,hasY:!1,hasDataX:!1,hasDataY:!1,restTransform:i.rest,originalTransform:i.original,movable:r};const{x:o,y:s,hasX:a,hasY:l,hasDataX:c,hasDataY:h}=ZH(t,n);return{element:t,bounds:n,mode:"attr",startX:o,startY:s,hasX:a,hasY:l,hasDataX:c,hasDataY:h,movable:r}}function UH(t,e,n){if(!t.movable||Math.abs(e)<1e-6&&Math.abs(n)<1e-6)return null;if(t.mode==="attr"){const o=t.startX+e,s=t.startY+n,a={x:o,y:s},l={};return l.x=t.hasX?t.startX:null,l.y=t.hasY?t.startY:null,t.hasDataX&&(a["data-x"]=o,l["data-x"]=t.startX),t.hasDataY&&(a["data-y"]=s,l["data-y"]=t.startY),new hn(t.element,{attributes:a},{attributes:l})}const r=QH(t.startX+e,t.startY+n,t.restTransform),i=t.originalTransform!==void 0?t.originalTransform:null;return new hn(t.element,{attributes:{transform:r}},{attributes:{transform:i}})}function ZH(t,e){const n=ke(t,["x","y","data-x","data-y"],!1),r=n.x!==null&&n.x!==void 0,i=n.y!==null&&n.y!==void 0,o=n["data-x"]!==null&&n["data-x"]!==void 0,s=n["data-y"]!==null&&n["data-y"]!==void 0,a=(g,y)=>{const m=g!=null?Number(g):NaN;return Number.isFinite(m)?m:y},l=a(n.x,NaN),c=a(n.y,NaN),h=a(n["data-x"],NaN),u=a(n["data-y"],NaN),f=Number.isFinite(l)?l:Number.isFinite(h)?h:e.x,p=Number.isFinite(c)?c:Number.isFinite(u)?u:e.y;return{x:f,y:p,hasX:r,hasY:i,hasDataX:o,hasDataY:s}}function KH(t){var e;const n=t.getAttribute("transform");if(n===null)return null;const r=n.match(/translate\(\s*([-\d.]+)(?:[ ,]\s*([-\d.]+))?\s*\)/i);if(!r)return{x:0,y:0,rest:{before:n.trim(),after:""},original:n};const i=Number(r[1])||0,o=r[2]!==void 0&&Number(r[2])||0,s=(e=r.index)!=null?e:0,a=n.slice(0,s).trim(),l=n.slice(s+r[0].length).trim();return{x:i,y:o,rest:{before:a,after:l},original:n}}function QH(t,e,n){const r=`translate(${t}, ${e})`;return[n==null?void 0:n.before,r,n==null?void 0:n.after].filter(o=>o&&o.length).join(" ")}var JH=Object.defineProperty,O3=Object.getOwnPropertySymbols,tD=Object.prototype.hasOwnProperty,eD=Object.prototype.propertyIsEnumerable,C3=(t,e,n)=>e in t?JH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nD=(t,e)=>{for(var n in e||(e={}))tD.call(e,n)&&C3(t,n,e[n]);if(O3)for(var n of O3(e))eD.call(e,n)&&C3(t,n,e[n]);return t};const M3="infographic-font-align-grid",rD="infographic-font-align-grid-style",iD=[{icon:wn.alignLeft,align:"LEFT"},{icon:wn.alignCenter,align:"CENTER"},{icon:wn.alignRight,align:"RIGHT"}],oD=[{icon:wn.alignTop,align:"TOP"},{icon:wn.alignMiddle,align:"MIDDLE"},{icon:wn.alignBottom,align:"BOTTOM"}],sD=`
440
- .${M3} {
439
+ `,k3=[{icon:_n.alignLeft,action:"LEFT"},{icon:_n.alignH,action:"H_CENTER"},{icon:_n.alignRight,action:"RIGHT"},{icon:_n.distributeH,action:"H_DISTRIBUTE"},{icon:_n.alignTop,action:"TOP"},{icon:_n.alignV,action:"V_CENTER"},{icon:_n.alignBottom,action:"BOTTOM"},{icon:_n.distributeV,action:"V_DISTRIBUTE"}],lD=(t,e,n,r)=>{var i;rn(sD,aD);const o=(i=r==null?void 0:r.enableDistribution)!=null?i:!0,s=cD(a=>hD(t,a,n),o);return jr({target:fr({icon:_n.align}),content:s,placement:"top",offset:12})};function cD(t,e){const n=document.createElement("div");return n.classList.add(_h),e||n.classList.add(A3),(e?k3:k3.filter(({action:i})=>i!=="H_DISTRIBUTE"&&i!=="V_DISTRIBUTE")).forEach(({icon:i,action:o})=>{const s=fr({icon:i,onClick:()=>t(o)});n.appendChild(s)}),n}function hD(t,e,n){if(!t.length)return;const r=t[0].ownerSVGElement;if(!r)return;const i=t.map(h=>fD(h,r)).filter(Boolean);if(!i.length)return;const o=i.filter(h=>h.movable);if(!o.length)return;const s=i.filter(h=>!h.movable),a=s.length?s:i,l=Ar(a.map(h=>h.bounds)),c=[];switch(e){case"LEFT":{const h=l.x;o.forEach(u=>{const f=h-u.bounds.x;Rn(c,u,f,0)});break}case"H_CENTER":{const h=l.x+l.width/2;o.forEach(u=>{const f=h-(u.bounds.x+u.bounds.width/2);Rn(c,u,f,0)});break}case"RIGHT":{const h=l.x+l.width;o.forEach(u=>{const f=h-(u.bounds.x+u.bounds.width);Rn(c,u,f,0)});break}case"TOP":{const h=l.y;o.forEach(u=>{const f=h-u.bounds.y;Rn(c,u,0,f)});break}case"V_CENTER":{const h=l.y+l.height/2;o.forEach(u=>{const f=h-(u.bounds.y+u.bounds.height/2);Rn(c,u,0,f)});break}case"BOTTOM":{const h=l.y+l.height;o.forEach(u=>{const f=h-(u.bounds.y+u.bounds.height);Rn(c,u,0,f)});break}case"H_DISTRIBUTE":{dD(i,c);break}case"V_DISTRIBUTE":{uD(i,c);break}}c.length&&n.executeBatch(c)}function dD(t,e){if(t.length<=2)return;const n=[...t].sort((i,o)=>i.bounds.x-o.bounds.x||i.bounds.y-o.bounds.y),r=L3(n);for(let i=0;i<r.length-1;i++){const o=r[i],s=r[i+1],a=n[o],l=n[s],c=n.slice(o+1,s);if(!c.length)continue;const h=l.bounds.x-(a.bounds.x+a.bounds.width),u=c.reduce((g,y)=>g+y.bounds.width,0),f=(h-u)/(c.length+1);let p=a.bounds.x+a.bounds.width+f;c.forEach(g=>{const y=p-g.bounds.x;Rn(e,g,y,0),p+=g.bounds.width+f})}}function uD(t,e){if(t.length<=2)return;const n=[...t].sort((i,o)=>i.bounds.y-o.bounds.y||i.bounds.x-o.bounds.x),r=L3(n);for(let i=0;i<r.length-1;i++){const o=r[i],s=r[i+1],a=n[o],l=n[s],c=n.slice(o+1,s);if(!c.length)continue;const h=l.bounds.y-(a.bounds.y+a.bounds.height),u=c.reduce((g,y)=>g+y.bounds.height,0),f=(h-u)/(c.length+1);let p=a.bounds.y+a.bounds.height+f;c.forEach(g=>{const y=p-g.bounds.y;Rn(e,g,0,y),p+=g.bounds.height+f})}}function L3(t){const e=new Set;return e.add(0),e.add(t.length-1),t.forEach((n,r)=>{n.movable||e.add(r)}),Array.from(e).sort((n,r)=>n-r)}function Rn(t,e,n,r){const i=pD(e,n,r);i&&t.push(i)}function fD(t,e){const n=cn(e,t),r=!Tn(t),i=mD(t);if(i)return{element:t,bounds:n,mode:"transform",startX:i.x,startY:i.y,hasX:!1,hasY:!1,hasDataX:!1,hasDataY:!1,restTransform:i.rest,originalTransform:i.original,movable:r};const{x:o,y:s,hasX:a,hasY:l,hasDataX:c,hasDataY:h}=gD(t,n);return{element:t,bounds:n,mode:"attr",startX:o,startY:s,hasX:a,hasY:l,hasDataX:c,hasDataY:h,movable:r}}function pD(t,e,n){if(!t.movable||Math.abs(e)<1e-6&&Math.abs(n)<1e-6)return null;if(t.mode==="attr"){const o=t.startX+e,s=t.startY+n,a={x:o,y:s},l={};return l.x=t.hasX?t.startX:null,l.y=t.hasY?t.startY:null,t.hasDataX&&(a["data-x"]=o,l["data-x"]=t.startX),t.hasDataY&&(a["data-y"]=s,l["data-y"]=t.startY),new hn(t.element,{attributes:a},{attributes:l})}const r=yD(t.startX+e,t.startY+n,t.restTransform),i=t.originalTransform!==void 0?t.originalTransform:null;return new hn(t.element,{attributes:{transform:r}},{attributes:{transform:i}})}function gD(t,e){const n=ke(t,["x","y","data-x","data-y"],!1),r=n.x!==null&&n.x!==void 0,i=n.y!==null&&n.y!==void 0,o=n["data-x"]!==null&&n["data-x"]!==void 0,s=n["data-y"]!==null&&n["data-y"]!==void 0,a=(g,y)=>{const m=g!=null?Number(g):NaN;return Number.isFinite(m)?m:y},l=a(n.x,NaN),c=a(n.y,NaN),h=a(n["data-x"],NaN),u=a(n["data-y"],NaN),f=Number.isFinite(l)?l:Number.isFinite(h)?h:e.x,p=Number.isFinite(c)?c:Number.isFinite(u)?u:e.y;return{x:f,y:p,hasX:r,hasY:i,hasDataX:o,hasDataY:s}}function mD(t){var e;const n=t.getAttribute("transform");if(n===null)return null;const r=n.match(/translate\(\s*([-\d.]+)(?:[ ,]\s*([-\d.]+))?\s*\)/i);if(!r)return{x:0,y:0,rest:{before:n.trim(),after:""},original:n};const i=Number(r[1])||0,o=r[2]!==void 0&&Number(r[2])||0,s=(e=r.index)!=null?e:0,a=n.slice(0,s).trim(),l=n.slice(s+r[0].length).trim();return{x:i,y:o,rest:{before:a,after:l},original:n}}function yD(t,e,n){const r=`translate(${t}, ${e})`;return[n==null?void 0:n.before,r,n==null?void 0:n.after].filter(o=>o&&o.length).join(" ")}var vD=Object.defineProperty,z3=Object.getOwnPropertySymbols,xD=Object.prototype.hasOwnProperty,bD=Object.prototype.propertyIsEnumerable,H3=(t,e,n)=>e in t?vD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wD=(t,e)=>{for(var n in e||(e={}))xD.call(e,n)&&H3(t,n,e[n]);if(z3)for(var n of z3(e))bD.call(e,n)&&H3(t,n,e[n]);return t};const R3="infographic-font-align-grid",_D="infographic-font-align-grid-style",$D=[{icon:wn.alignLeft,align:"LEFT"},{icon:wn.alignCenter,align:"CENTER"},{icon:wn.alignRight,align:"RIGHT"}],PD=[{icon:wn.alignTop,align:"TOP"},{icon:wn.alignMiddle,align:"MIDDLE"},{icon:wn.alignBottom,align:"BOTTOM"}],CD=`
440
+ .${R3} {
441
441
  display: grid;
442
442
  grid-template-columns: repeat(3, 32px);
443
443
  grid-auto-rows: 32px;
444
444
  gap: 2px;
445
445
  }
446
- `,S3=(t,e,n)=>{rn(rD,sD);const r={horizontal:e["data-horizontal-align"],vertical:e["data-vertical-align"]},i=fr({icon:wn.align}),o=aD(r,s=>{const a={};s.horizontal&&(a["data-horizontal-align"]=s.horizontal),s.vertical&&(a["data-vertical-align"]=s.vertical),Object.keys(a).length&&n.executeBatch(t.map(l=>new hn(l,{attributes:a})))});return Fr({target:i,content:o,placement:"top",offset:12})};function aD(t,e){const n=document.createElement("div");n.classList.add(M3);const r={},i=()=>{Object.entries(r).forEach(([s,a])=>{const l=s===t.horizontal||s===t.vertical;a.setActivate(l)})},o=(s,a)=>{s.forEach(({icon:l,align:c})=>{const h=fr({icon:l,onClick:()=>{t[a]!==c&&(Object.assign(t,{[a]:c}),i(),e(nD({},t)))},activate:c===t[a]});r[c]=h,n.appendChild(h)})};return o(iD,"horizontal"),o(oD,"vertical"),n}const oa="infographic-font-color-btn",lD="infographic-font-color-style",bh="#1f1f1f",E3=(t,e,n)=>{hD();const r=cD(e.fill),i=e.fill===void 0&&t.length>1,o=document.createElement("button");o.type="button",o.classList.add(oa),I3(o,r!=null?r:bh,i);const s=y3({value:r!=null?r:bh,onChange:a=>{I3(o,a,!1),n.executeBatch(t.map(l=>new hn(l,{attributes:{fill:a}})))}});return Fr({target:o,content:s,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function cD(t){if(t)return Wn(t)?t:void 0}function I3(t,e,n){t.style.setProperty("--infographic-font-color",e),n?t.setAttribute("data-mixed","true"):t.removeAttribute("data-mixed")}function hD(){rn(lD,`
446
+ `,D3=(t,e,n)=>{rn(_D,CD);const r={horizontal:e["data-horizontal-align"],vertical:e["data-vertical-align"]},i=fr({icon:wn.align}),o=OD(r,s=>{const a={};s.horizontal&&(a["data-horizontal-align"]=s.horizontal),s.vertical&&(a["data-vertical-align"]=s.vertical),Object.keys(a).length&&n.executeBatch(t.map(l=>new hn(l,{attributes:a})))});return jr({target:i,content:o,placement:"top",offset:12})};function OD(t,e){const n=document.createElement("div");n.classList.add(R3);const r={},i=()=>{Object.entries(r).forEach(([s,a])=>{const l=s===t.horizontal||s===t.vertical;a.setActivate(l)})},o=(s,a)=>{s.forEach(({icon:l,align:c})=>{const h=fr({icon:l,onClick:()=>{t[a]!==c&&(Object.assign(t,{[a]:c}),i(),e(wD({},t)))},activate:c===t[a]});r[c]=h,n.appendChild(h)})};return o($D,"horizontal"),o(PD,"vertical"),n}const oa="infographic-font-color-btn",MD="infographic-font-color-style",$h="#1f1f1f",N3=(t,e,n)=>{ED();const r=SD(e.fill),i=e.fill===void 0&&t.length>1,o=document.createElement("button");o.type="button",o.classList.add(oa),j3(o,r!=null?r:$h,i);const s=M3({value:r!=null?r:$h,onChange:a=>{j3(o,a,!1),n.executeBatch(t.map(l=>new hn(l,{attributes:{fill:a}})))}});return jr({target:o,content:s,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function SD(t){if(t)return Wn(t)?t:void 0}function j3(t,e,n){t.style.setProperty("--infographic-font-color",e),n?t.setAttribute("data-mixed","true"):t.removeAttribute("data-mixed")}function ED(){rn(MD,`
447
447
  .${oa} {
448
448
  position: relative;
449
449
  width: 32px;
@@ -459,7 +459,7 @@ ${t.trim()}
459
459
  position: absolute;
460
460
  inset: 6px;
461
461
  border-radius: 50%;
462
- background: var(--infographic-font-color, ${bh});
462
+ background: var(--infographic-font-color, ${$h});
463
463
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
464
464
  }
465
465
  .${oa}[data-mixed="true"]::after {
@@ -471,8 +471,8 @@ ${t.trim()}
471
471
  #f5f5f5 12px
472
472
  );
473
473
  }
474
- `)}const xh="infographic-font-family-list",sa=`${xh}__option`,dD="infographic-font-family-list-style",uD="默认",T3=(t,e,n)=>{pD();const r=Ol(),i=A3(e["font-family"]),o=r.map(h=>({label:h.name||h.fontFamily,value:h.fontFamily}));o.some(h=>A3(h.value)===i)||o.unshift({label:uD,value:i});let s=i;const a=fD(o,s,h=>{s!==h&&(s=h,n.executeBatch(t.map(u=>new hn(u,{attributes:{"font-family":Cr(h)}}))))}),l=fr({icon:wn.fontFamily});return Fr({target:l,content:a,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function fD(t,e,n){const r=document.createElement("div");r.classList.add(xh);const i={},o=s=>{Object.entries(i).forEach(([a,l])=>{a===s?l.setAttribute("data-activate","true"):l.removeAttribute("data-activate")})};return t.forEach(({label:s,value:a})=>{const l=document.createElement("button");l.type="button",l.classList.add(sa),l.textContent=s,l.style.fontFamily=a,a===e&&l.setAttribute("data-activate","true"),l.addEventListener("click",()=>{e!==a&&(e=a,o(e),n(a))}),i[a]=l,r.appendChild(l)}),r}function A3(t){return t?Array.isArray(t)?Un(t.join(", ")):Un(String(t)):""}function pD(){rn(dD,`
475
- .${xh} {
474
+ `)}const Ph="infographic-font-family-list",sa=`${Ph}__option`,ID="infographic-font-family-list-style",TD="默认",F3=(t,e,n)=>{kD();const r=Ol(),i=B3(e["font-family"]),o=r.map(h=>({label:h.name||h.fontFamily,value:h.fontFamily}));o.some(h=>B3(h.value)===i)||o.unshift({label:TD,value:i});let s=i;const a=AD(o,s,h=>{s!==h&&(s=h,n.executeBatch(t.map(u=>new hn(u,{attributes:{"font-family":Cr(h)}}))))}),l=fr({icon:wn.fontFamily});return jr({target:l,content:a,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function AD(t,e,n){const r=document.createElement("div");r.classList.add(Ph);const i={},o=s=>{Object.entries(i).forEach(([a,l])=>{a===s?l.setAttribute("data-activate","true"):l.removeAttribute("data-activate")})};return t.forEach(({label:s,value:a})=>{const l=document.createElement("button");l.type="button",l.classList.add(sa),l.textContent=s,l.style.fontFamily=a,a===e&&l.setAttribute("data-activate","true"),l.addEventListener("click",()=>{e!==a&&(e=a,o(e),n(a))}),i[a]=l,r.appendChild(l)}),r}function B3(t){return t?Array.isArray(t)?Un(t.join(", ")):Un(String(t)):""}function kD(){rn(ID,`
475
+ .${Ph} {
476
476
  display: flex;
477
477
  flex-direction: column;
478
478
  gap: 2px;
@@ -500,14 +500,14 @@ ${t.trim()}
500
500
  background: #e6f4ff;
501
501
  color: #0958d9;
502
502
  }
503
- `)}const k3="infographic-font-size-grid",gD="infographic-font-size-grid-style",mD=[{label:"XS",value:12},{label:"S",value:14},{label:"M",value:16},{label:"L",value:20},{label:"XL",value:24}],yD=`
504
- .${k3} {
503
+ `)}const W3="infographic-font-size-grid",LD="infographic-font-size-grid-style",zD=[{label:"XS",value:12},{label:"S",value:14},{label:"M",value:16},{label:"L",value:20},{label:"XL",value:24}],HD=`
504
+ .${W3} {
505
505
  display: grid;
506
506
  grid-template-columns: repeat(5, 32px);
507
507
  grid-auto-rows: 32px;
508
508
  gap: 2px;
509
509
  }
510
- `,z3=(t,e,n)=>{rn(gD,yD);const r=fr({icon:wn.fontSize}),i=xD(e["font-size"]),o=vD(i,s=>{n.executeBatch(t.map(a=>new hn(a,{attributes:{"font-size":s}})))});return Fr({target:r,content:o,placement:"top",offset:12})};function vD(t,e){const n=document.createElement("div");n.classList.add(k3);let r=t;const i={},o=()=>{Object.entries(i).forEach(([s,a])=>{const l=Number(s)===r;a.setActivate(l)})};return mD.forEach(({label:s,value:a})=>{const l=fr({icon:bD(s),onClick:()=>{r!==a&&(r=a,o(),e(a))},activate:a===r});i[String(a)]=l,n.appendChild(l)}),n}function bD(t){return()=>{const e="1.2em",n=document.createElement("span");return n.textContent=t,n.style.display="inline-flex",n.style.alignItems="center",n.style.justifyContent="center",n.style.width=e,n.style.height=e,n.style.fontSize="12px",n}}function xD(t){if(typeof t=="number")return t;if(typeof t=="string"){const n=parseFloat(t);return Number.isFinite(n)?n:12}return 12}const aa="infographic-icon-color-btn",wD="infographic-icon-color-style",wh="#1f1f1f",L3=(t,e,n)=>{$D();const r=_D(e.fill),i=e.fill===void 0&&t.length>1,o=document.createElement("button");o.type="button",o.classList.add(aa),R3(o,r!=null?r:wh,i);const s=y3({value:r!=null?r:wh,onChange:a=>{R3(o,a,!1),n.executeBatch(t.map(l=>new hn(l,{attributes:{fill:a}})))}});return Fr({target:o,content:s,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function _D(t){if(t)return Wn(t)?t:void 0}function R3(t,e,n){t.style.setProperty("--infographic-icon-color",e),n?t.setAttribute("data-mixed","true"):t.removeAttribute("data-mixed")}function $D(){rn(wD,`
510
+ `,V3=(t,e,n)=>{rn(LD,HD);const r=fr({icon:wn.fontSize}),i=ND(e["font-size"]),o=RD(i,s=>{n.executeBatch(t.map(a=>new hn(a,{attributes:{"font-size":s}})))});return jr({target:r,content:o,placement:"top",offset:12})};function RD(t,e){const n=document.createElement("div");n.classList.add(W3);let r=t;const i={},o=()=>{Object.entries(i).forEach(([s,a])=>{const l=Number(s)===r;a.setActivate(l)})};return zD.forEach(({label:s,value:a})=>{const l=fr({icon:DD(s),onClick:()=>{r!==a&&(r=a,o(),e(a))},activate:a===r});i[String(a)]=l,n.appendChild(l)}),n}function DD(t){return()=>{const e="1.2em",n=document.createElement("span");return n.textContent=t,n.style.display="inline-flex",n.style.alignItems="center",n.style.justifyContent="center",n.style.width=e,n.style.height=e,n.style.fontSize="12px",n}}function ND(t){if(typeof t=="number")return t;if(typeof t=="string"){const n=parseFloat(t);return Number.isFinite(n)?n:12}return 12}const aa="infographic-icon-color-btn",jD="infographic-icon-color-style",Ch="#1f1f1f",Y3=(t,e,n)=>{BD();const r=FD(e.fill),i=e.fill===void 0&&t.length>1,o=document.createElement("button");o.type="button",o.classList.add(aa),X3(o,r!=null?r:Ch,i);const s=M3({value:r!=null?r:Ch,onChange:a=>{X3(o,a,!1),n.executeBatch(t.map(l=>new hn(l,{attributes:{fill:a}})))}});return jr({target:o,content:s,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function FD(t){if(t)return Wn(t)?t:void 0}function X3(t,e,n){t.style.setProperty("--infographic-icon-color",e),n?t.setAttribute("data-mixed","true"):t.removeAttribute("data-mixed")}function BD(){rn(jD,`
511
511
  .${aa} {
512
512
  position: relative;
513
513
  width: 32px;
@@ -523,7 +523,7 @@ ${t.trim()}
523
523
  position: absolute;
524
524
  inset: 6px;
525
525
  border-radius: 50%;
526
- background: var(--infographic-icon-color, ${wh});
526
+ background: var(--infographic-icon-color, ${Ch});
527
527
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
528
528
  }
529
529
  .${aa}[data-mixed="true"]::after {
@@ -535,8 +535,8 @@ ${t.trim()}
535
535
  #f5f5f5 12px
536
536
  );
537
537
  }
538
- `)}var PD=Object.defineProperty,H3=Object.getOwnPropertySymbols,OD=Object.prototype.hasOwnProperty,CD=Object.prototype.propertyIsEnumerable,D3=(t,e,n)=>e in t?PD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,MD=(t,e)=>{for(var n in e||(e={}))OD.call(e,n)&&D3(t,n,e[n]);if(H3)for(var n of H3(e))CD.call(e,n)&&D3(t,n,e[n]);return t};class N3 extends gh{constructor(e){super(),this.options=e,this.name="edit-bar",this.selection=[],this.handleSelectionChanged=({next:n})=>{if(this.selection=n,n.length===0){this.container&&j3(this.container);return}const r=this.getOrCreateEditBar(),i=this.getEditItems(n);if(i.length===0){j3(r);return}SD(r,i),this.placeEditBar(r,n),_h(r)},this.handleGeometryChanged=({target:n})=>{!this.selection.includes(n)||!this.container||(this.placeEditBar(this.container,this.selection),_h(this.container))},this.handleHistoryChanged=()=>{!this.container||this.selection.length===0||(this.placeEditBar(this.container,this.selection),_h(this.container))}}init(e){super.init(e);const{emitter:n}=e;n.on("selection:change",this.handleSelectionChanged),n.on("selection:geometrychange",this.handleGeometryChanged),n.on("history:change",this.handleHistoryChanged)}destroy(){var e;const{emitter:n}=this;n.off("selection:change",this.handleSelectionChanged),n.off("selection:geometrychange",this.handleGeometryChanged),n.off("history:change",this.handleHistoryChanged),(e=this.container)==null||e.remove()}getEditItems(e){let n=!1,r=!1,i=!1;for(const o of e)if(mn(o)?n=!0:Tn(o)?r=!0:L4(o)&&(i=!0),n&&r&&i)break;return n&&!r&&!i?e.length===1?this.getTextEditItems(e[0]):this.getTextCollectionEditItems(e):!n&&r&&!i?e.length===1?this.getIconEditItems(e):this.getIconCollectionEditItems(e):!n&&!r&&i?e.length===1?this.getGeometryEditItems(e):this.getGeometryCollectionEditItems(e):this.getElementCollectionEditItems(e)}getOrCreateEditBar(){if(this.container)return this.container;const{style:e,className:n}=this.options||{},r=document.createElement("div");Object.assign(r.style,MD({visibility:"hidden",position:"absolute",left:"0",top:"0",display:"flex",flexFlow:"row",justifyContent:"center",alignItems:"center",height:"40px",minWidth:"40px",minHeight:"40px",borderRadius:"8px",padding:"0 4px",backgroundColor:"#fff",border:"1px solid rgba(239, 240, 240, 0.9)",zIndex:"9999",boxShadow:"rgba(0, 0, 0, 0.08) 0px 1px 2px -2px, rgba(0, 0, 0, 0.04) 0px 2px 6px, rgba(0, 0, 0, 0.02) 0px 4px 8px 1px"},e)),n&&r.classList.add(n),oi(r,ya),this.container=r;const{getContainer:i}=this.options||{},o=typeof i=="function"?i():i,s=o!=null?o:document.body;return s==null||s.appendChild(r),r}getTextEditItems(e){const{attributes:n={}}=fl(e);return[E3,z3,S3,T3].map(r=>r([e],n,this.commander))}getTextCollectionEditItems(e){const n=id(e.map(o=>fl(o).attributes||{})),r=[E3,z3,S3,T3].map(o=>o(e,n,this.commander)),i=this.getElementCollectionEditItems(e);return[...r,...i]}getIconEditItems(e){const n=xl(e[0]);return[L3].map(r=>r(e,n,this.commander))}getIconCollectionEditItems(e){const n=id(e.map(r=>xl(r)));return[L3].map(r=>r(e,n,this.commander))}getGeometryEditItems(e){return[]}getGeometryCollectionEditItems(e){return[...this.getElementCollectionEditItems(e)]}getElementCollectionEditItems(e){return e.length<=1?[]:[WH(e,{},this.commander,{enableDistribution:e.length>2})]}placeEditBar(e,n){var r;if(n.length===0)return;const i=this.editor.getDocument(),o=kr(n.map(w=>cn(i,w))),a=((r=e.offsetParent)!=null?r:document.documentElement).getBoundingClientRect(),l=document.documentElement.clientHeight,c=e.getBoundingClientRect(),h=8,u=WR(i),f=new DOMPoint(o.x+o.width/2,o.y).matrixTransform(u),p=new DOMPoint(o.x+o.width/2,o.y+o.height).matrixTransform(u),g=(w,_,$)=>Math.min(Math.max(w,_),$);let y=f.x-a.left-c.width/2;y=g(y,0,Math.max(a.width-c.width,0));const m=f.y-h,b=l-p.y-h;let x=m>=c.height||m>=b?f.y-a.top-c.height-h:p.y-a.top+h;x=g(x,0,Math.max(a.height-c.height,0)),e.style.left=`${y}px`,e.style.top=`${x}px`}}function _h(t){t.style.visibility="visible"}function j3(t){t.style.visibility="hidden"}function SD(t,e){t.innerHTML="",e.forEach(n=>{t.appendChild(n)})}var ED=Object.defineProperty,F3=Object.getOwnPropertySymbols,ID=Object.prototype.hasOwnProperty,TD=Object.prototype.propertyIsEnumerable,B3=(t,e,n)=>e in t?ED(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AD=(t,e)=>{for(var n in e||(e={}))ID.call(e,n)&&B3(t,n,e[n]);if(F3)for(var n of F3(e))TD.call(e,n)&&B3(t,n,e[n]);return t};const Vi=class Ke extends gh{constructor(){super(...arguments),this.name="resize-element",this.target=null,this.handles=[],this.activeHandle=null,this.activePointerId=null,this.handleSelectionChange=({next:e})=>{const n=e.length===1?e[0]:null;n&&mn(n)?(this.target=n,this.updateHandles()):(this.target=null,this.hideHandles(),this.cancelDrag())},this.handleDeactivate=()=>{this.target=null,this.hideHandles(),this.cancelDrag()},this.handleGeometryChange=({target:e})=>{if(!this.target||e!==this.target)return;const n=this.getViewportRect(this.target);this.lastViewportRect=n,this.updateHandles(n)},this.handleHistoryChange=()=>{if(!this.target)return;const e=this.getViewportRect(this.target);this.lastViewportRect=e,this.updateHandles(e)},this.handlePointerMove=e=>{if(!this.target||!this.startPointer||!this.startRect||!this.activeHandle||this.activePointerId!==null&&e.pointerId!==this.activePointerId)return;const n=this.clientToElement(this.target,e.clientX,e.clientY),r=n.x-this.startPointer.x,i=n.y-this.startPointer.y,o=this.clampRect(this.applyDelta(this.startRect,r,i,this.activeHandle),this.activeHandle);this.lastRect=o,this.applyRect(this.target,o),this.lastViewportRect=this.getViewportRect(this.target),this.updateHandles(this.lastViewportRect),this.emitSelectionGeometryChange()},this.handlePointerUp=e=>{if(this.activePointerId!==null&&e.pointerId!==this.activePointerId)return;const n=this.lastRect,r=this.startAttrs,i=n&&this.startRect&&this.hasRectChanged(this.startRect,n);if(this.cancelDrag(),i&&this.target&&n&&r)this.commander.execute(new hn(this.target,{attributes:n},{attributes:r})),this.lastViewportRect=this.getViewportRect(this.target),this.updateHandles(this.lastViewportRect),this.emitSelectionGeometryChange();else if(this.target){const o=this.lastViewportRect||this.getViewportRect(this.target);this.updateHandles(o)}}}init(e){super.init(e);const{emitter:n}=e;n.on("selection:change",this.handleSelectionChange),n.on("selection:geometrychange",this.handleGeometryChange),n.on("history:change",this.handleHistoryChange),n.on("deactivated",this.handleDeactivate)}destroy(){this.cancelDrag(),this.removeContainer();const{emitter:e}=this;e.off("selection:change",this.handleSelectionChange),e.off("selection:geometrychange",this.handleGeometryChange),e.off("history:change",this.handleHistoryChange),e.off("deactivated",this.handleDeactivate)}ensureContainer(){if(this.container)return this.container;const e=wt("g",{"pointer-events":"none"});this.overlay=wt("rect",{fill:"rgba(51, 132, 245, 0.06)",stroke:"none","pointer-events":"none"});const n=wt("rect",{fill:"none",stroke:"#3384F5","stroke-width":1,"stroke-dasharray":"4 2","pointer-events":"none"});e.appendChild(this.overlay),e.appendChild(n),this.outline=n;const r=Ke.HANDLE_POSITIONS,i={"top-left":"nwse-resize",top:"ns-resize","top-right":"nesw-resize",right:"ew-resize","bottom-right":"nwse-resize",bottom:"ns-resize","bottom-left":"nesw-resize",left:"ew-resize"};return r.forEach((o,s)=>{const l=o==="top"||o==="right"||o==="bottom"||o==="left"?wt("line",{stroke:"transparent","stroke-width":Ke.LINE_STROKE_WIDTH}):wt("circle",{r:Ke.HANDLE_SIZE/2,fill:"#3384F5",stroke:"#fff","stroke-width":1.5});l.style.cursor=i[o],l.style.pointerEvents="all",l.addEventListener("pointerdown",c=>this.handlePointerDown(c,o)),l.addEventListener("click",c=>{c.stopPropagation(),c.preventDefault()}),e.appendChild(l),this.handles[s]=l}),this.editor.getDocument().appendChild(e),this.container=e,e}updateHandles(e){if(!this.target){this.hideHandles();return}const n=e||this.getViewportRect(this.target)||this.lastViewportRect||null;if(!n){this.hideHandles();return}this.lastViewportRect=n;const r=this.ensureContainer();r.style.display="block",this.outline.style.display="block",Yt(this.outline,n),this.overlay&&(this.overlay.style.display="block",Yt(this.overlay,n));const i=this.getHandlePoints(n);this.handles.forEach((o,s)=>{const[a,l]=i[s];if(o.tagName==="circle")Yt(o,{cx:a,cy:l});else{const c=Ke.HANDLE_POSITIONS[s],h=this.getHandleLine(n,c);Yt(o,h)}o.style.display="block"})}hideHandles(){this.container&&(this.container.style.display="none"),this.outline&&(this.outline.style.display="none"),this.overlay&&(this.overlay.style.display="none"),this.handles.forEach(e=>e.style.display="none")}removeContainer(){var e;(e=this.container)==null||e.remove(),this.container=void 0,this.outline=void 0,this.overlay=void 0,this.handles=[]}handlePointerDown(e,n){if(!this.target||e.button!==0&&e.pointerType==="mouse")return;e.stopPropagation(),e.preventDefault();const r=this.clientToElement(this.target,e.clientX,e.clientY);this.activeHandle=n,this.activePointerId=e.pointerId,this.startPointer=r;const i=this.getCurrentAttributes(this.target);this.startRect=i,this.startAttrs=AD({},i),this.lastRect=i,this.lastViewportRect=this.getViewportRect(this.target),window.addEventListener("pointermove",this.handlePointerMove),window.addEventListener("pointerup",this.handlePointerUp),window.addEventListener("pointercancel",this.handlePointerUp)}cancelDrag(){this.activeHandle=null,this.activePointerId=null,this.startPointer=void 0,this.startRect=void 0,this.startAttrs=void 0,this.lastRect=void 0,this.lastViewportRect=void 0,window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp)}applyRect(e,n){Yt(e,{x:n.x,y:n.y,width:n.width,height:n.height})}getViewportRect(e){const{x:n,y:r,width:i,height:o}=cn(this.editor.getDocument(),e);return{x:n,y:r,width:i,height:o}}clientToElement(e,n,r){var i,o;const s=((i=e.getScreenCTM())==null?void 0:i.inverse())||((o=this.editor.getDocument().getScreenCTM())==null?void 0:o.inverse())||new DOMMatrix;return new DOMPoint(n,r).matrixTransform(s)}getCurrentAttributes(e){const n=ke(e,["x","y","width","height"],!1),r=this.getViewportRect(e),i=(o,s)=>{const a=o!==null?Number(o):NaN;return Number.isFinite(a)?a:s};return{x:i(n.x,r.x),y:i(n.y,r.y),width:i(n.width,r.width),height:i(n.height,r.height)}}getHandlePoints(e){const{x:n,y:r,width:i,height:o}=e,s=n+i/2,a=r+o/2;return[[n,r],[s,r],[n+i,r],[n+i,a],[n+i,r+o],[s,r+o],[n,r+o],[n,a]]}applyDelta(e,n,r,i){let{x:o,y:s,width:a,height:l}=e;switch(i){case"top-left":o+=n,s+=r,a-=n,l-=r;break;case"top":s+=r,l-=r;break;case"top-right":s+=r,a+=n,l-=r;break;case"right":a+=n;break;case"bottom-right":a+=n,l+=r;break;case"bottom":l+=r;break;case"bottom-left":o+=n,a-=n,l+=r;break;case"left":o+=n,a-=n;break}return{x:o,y:s,width:a,height:l}}clampRect(e,n){let{x:r,y:i,width:o,height:s}=e;if(o<Ke.MIN_SIZE){const a=Ke.MIN_SIZE-o;(n==="top-left"||n==="bottom-left"||n==="left")&&(r-=a),o=Ke.MIN_SIZE}if(s<Ke.MIN_SIZE){const a=Ke.MIN_SIZE-s;(n==="top-left"||n==="top-right"||n==="top")&&(i-=a),s=Ke.MIN_SIZE}return{x:r,y:i,width:o,height:s}}hasRectChanged(e,n){return Math.abs(e.x-n.x)>.5||Math.abs(e.y-n.y)>.5||Math.abs(e.width-n.width)>.5||Math.abs(e.height-n.height)>.5}emitSelectionGeometryChange(){this.target&&this.lastViewportRect&&this.emitter.emit("selection:geometrychange",{type:"selection:geometrychange",target:this.target,rect:this.lastViewportRect})}getHandleLine(e,n){const{x:r,y:i,width:o,height:s}=e;switch(n){case"top":return{x1:r,y1:i,x2:r+o,y2:i};case"right":return{x1:r+o,y1:i,x2:r+o,y2:i+s};case"bottom":return{x1:r,y1:i+s,x2:r+o,y2:i+s};case"left":default:return{x1:r,y1:i,x2:r,y2:i+s}}}};Vi.HANDLE_SIZE=10,Vi.LINE_STROKE_WIDTH=8,Vi.MIN_SIZE=1,Vi.HANDLE_POSITIONS=["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"];let W3=Vi;function V3(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $h={exports:{}},Y3;function kD(){return Y3||(Y3=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,h){this.fn=l,this.context=c,this.once=h||!1}function o(l,c,h,u,f){if(typeof h!="function")throw new TypeError("The listener must be a function");var p=new i(h,u||l,f),g=n?n+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],p]:l._events[g].push(p):(l._events[g]=p,l._eventsCount++),l}function s(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],h,u;if(this._eventsCount===0)return c;for(u in h=this._events)e.call(h,u)&&c.push(n?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(h)):c},a.prototype.listeners=function(c){var h=n?n+c:c,u=this._events[h];if(!u)return[];if(u.fn)return[u.fn];for(var f=0,p=u.length,g=new Array(p);f<p;f++)g[f]=u[f].fn;return g},a.prototype.listenerCount=function(c){var h=n?n+c:c,u=this._events[h];return u?u.fn?1:u.length:0},a.prototype.emit=function(c,h,u,f,p,g){var y=n?n+c:c;if(!this._events[y])return!1;var m=this._events[y],b=arguments.length,v,x;if(m.fn){switch(m.once&&this.removeListener(c,m.fn,void 0,!0),b){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,h),!0;case 3:return m.fn.call(m.context,h,u),!0;case 4:return m.fn.call(m.context,h,u,f),!0;case 5:return m.fn.call(m.context,h,u,f,p),!0;case 6:return m.fn.call(m.context,h,u,f,p,g),!0}for(x=1,v=new Array(b-1);x<b;x++)v[x-1]=arguments[x];m.fn.apply(m.context,v)}else{var w=m.length,_;for(x=0;x<w;x++)switch(m[x].once&&this.removeListener(c,m[x].fn,void 0,!0),b){case 1:m[x].fn.call(m[x].context);break;case 2:m[x].fn.call(m[x].context,h);break;case 3:m[x].fn.call(m[x].context,h,u);break;case 4:m[x].fn.call(m[x].context,h,u,f);break;default:if(!v)for(_=1,v=new Array(b-1);_<b;_++)v[_-1]=arguments[_];m[x].fn.apply(m[x].context,v)}}return!0},a.prototype.on=function(c,h,u){return o(this,c,h,u,!1)},a.prototype.once=function(c,h,u){return o(this,c,h,u,!0)},a.prototype.removeListener=function(c,h,u,f){var p=n?n+c:c;if(!this._events[p])return this;if(!h)return s(this,p),this;var g=this._events[p];if(g.fn)g.fn===h&&(!f||g.once)&&(!u||g.context===u)&&s(this,p);else{for(var y=0,m=[],b=g.length;y<b;y++)(g[y].fn!==h||f&&!g[y].once||u&&g[y].context!==u)&&m.push(g[y]);m.length?this._events[p]=m.length===1?m[0]:m:s(this,p)}return this},a.prototype.removeAllListeners=function(c){var h;return c?(h=n?n+c:c,this._events[h]&&s(this,h)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})($h)),$h.exports}var zD=kD();const LD=V3(zD);var la=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class RD{constructor(){this.undoStack=[],this.redoStack=[]}init(e){Object.assign(this,e)}execute(e){return la(this,null,function*(){yield e.apply(this.state),this.undoStack.push(e),this.redoStack=[],this.emitHistoryChange("execute")})}executeBatch(e){return la(this,null,function*(){if(e.length===0)return;const n=new nH(e);yield this.execute(n)})}undo(){return la(this,null,function*(){const e=this.undoStack.pop();e&&(yield e.undo(this.state),this.redoStack.push(e),this.emitHistoryChange("undo"))})}redo(){return la(this,null,function*(){const e=this.redoStack.pop();e&&(yield e.apply(this.state),this.undoStack.push(e),this.emitHistoryChange("redo"))})}serialize(){return this.undoStack.map(e=>e.serialize())}clear(){this.undoStack=[],this.redoStack=[]}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}getHistorySize(){return this.undoStack.length}destroy(){this.clear()}emitHistoryChange(e){var n;(n=this.emitter)==null||n.emit("history:change",{type:"history:change",action:e})}}var X3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class HD{constructor(){this.extensions=new Vy,this.interactions=[],this.active=!1,this.running=null,this.concurrentInteractions=new Set,this.selection=new Set,this.handleClick=e=>{const n=this.editor.getDocument(),r=e.target;if(!r){this.deactivate();return}n.contains(r)||R4(r)?this.activate():this.deactivate()}}init(e){Object.assign(this,e),document.addEventListener("click",this.handleClick),this.interactions.forEach(n=>{this.extensions.register(n.name,n),n.init({emitter:this.emitter,editor:this.editor,commander:this.commander,state:this.state,interaction:this}),this.emitter.emit("interaction:registered",n)})}isActive(){return this.active}select(e,n){const r=this.getSelection(),i=[],o=[];if(n==="replace"){const l=new Set(e);r.forEach(c=>{l.has(c)||o.push(c)}),e.forEach(c=>{this.selection.has(c)||i.push(c)}),this.selection=l}else n==="add"?e.forEach(l=>{this.selection.has(l)||(this.selection.add(l),i.push(l))}):n==="remove"?e.forEach(l=>{this.selection.delete(l)&&o.push(l)}):n==="toggle"&&e.forEach(l=>{this.selection.has(l)?(this.selection.delete(l),o.push(l)):(this.selection.add(l),i.push(l))});const s=this.getSelection(),a={type:"selection:change",previous:r,next:s,added:i,removed:o,mode:n};this.emitter.emit("selection:change",a)}getSelection(){return[...this.selection]}isSelected(e){return this.selection.has(e)}clearSelection(){const e=this.getSelection();this.selection.clear();const n={type:"selection:change",previous:e,next:[],added:[],removed:e,mode:"replace"};this.emitter.emit("selection:change",n)}activate(){this.active=!0,this.emitter.emit("activated")}deactivate(){this.active=!1,this.running=null,this.clearSelection(),this.emitter.emit("deactivated")}executeExclusiveInteraction(e,n){return X3(this,null,function*(){if(!(!this.active||this.running)){this.running=e;try{this.emitter.emit("interaction:started",e),yield n(),this.emitter.emit("interaction:ended",e)}catch(r){console.error(`Error occurred during exclusive interaction "${e.name}":`,r),this.emitter.emit("interaction:error",e,r)}finally{this.running=null}}})}executeConcurrentInteraction(e,n){return X3(this,null,function*(){if(this.active){this.concurrentInteractions.add(e);try{this.emitter.emit("interaction:started",e),yield n(),this.emitter.emit("interaction:ended",e)}catch(r){console.error(`Error occurred during concurrent interaction "${e.name}":`,r),this.emitter.emit("interaction:error",e,r)}finally{this.concurrentInteractions.delete(e)}}})}getOrCreateTransientContainer(){const e="transient-container",n=this.editor.getDocument(),r=Sr(n,e);if(r&&r.isConnected)return r;const i=wt("g");return oi(i,e),n.appendChild(i),i}appendTransientElement(e){return this.getOrCreateTransientContainer().appendChild(e),e}destroy(){this.extensions.forEach(e=>{e.destroy(),this.emitter.emit("interaction:destroyed",e)}),this.extensions.destroy(),this.active=!1,this.running=null,this.clearSelection(),document.removeEventListener("click",this.handleClick),this.getOrCreateTransientContainer().remove()}}class DD{constructor(){this.extensions=new Vy}init(e,n=[]){Object.assign(this,e),n.forEach(r=>{this.registerPlugin(r)})}getPlugin(e){return this.extensions.get(e)}getPlugins(){return this.extensions.getAll()}registerPlugin(e){this.extensions.register(e.name,e);const n={emitter:this.emitter,editor:this.editor,commander:this.commander,plugin:this,state:this.state};e.init(n),this.emitter.emit("plugin:registered",e)}unregisterPlugin(e){const n=this.extensions.get(e);n&&(n.destroy(),this.extensions.unregister(e),this.emitter.emit("plugin:unregistered",n))}destroy(){this.extensions.getAll().forEach(e=>{this.unregisterPlugin(e.name),this.emitter.emit("plugin:destroyed",e)}),this.extensions.destroy()}}var ND=Object.defineProperty,G3=Object.getOwnPropertySymbols,jD=Object.prototype.hasOwnProperty,FD=Object.prototype.propertyIsEnumerable,q3=(t,e,n)=>e in t?ND(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,U3=(t,e)=>{for(var n in e||(e={}))jD.call(e,n)&&q3(t,n,e[n]);if(G3)for(var n of G3(e))FD.call(e,n)&&q3(t,n,e[n]);return t};class BD{init(e){Object.assign(this,e)}addItemDatum(e,n){const r=e.slice(0,-1),i=e[e.length-1],o=Array.isArray(n)?n:[n];Fy(this.options.data,r).splice(i,0,...o),this.emitter.emit("options:data:item:add",{indexes:e,datum:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"add",path:"data.items",indexes:e,value:o}]})}updateItemDatum(e,n){const r=Pr(this.options.data,e);Object.assign(r,n),this.emitter.emit("options:data:item:update",{indexes:e,datum:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:"data.items",indexes:e,value:n}]})}removeItemDatum(e,n=1){const r=e.slice(0,-1),i=e[e.length-1],s=Fy(this.options.data,r).splice(i,n);this.emitter.emit("options:data:item:remove",{indexes:e,datum:s}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"remove",path:"data.items",indexes:e,value:s}]})}updateData(e,n){this.options.data[e]=n,this.emitter.emit("options:data:update",{key:e,value:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:`data.${e}`,value:n}]})}updateElement(e,n){this.updateBuiltInElement(e,n)}updateOptions(e){this.options=U3(U3({},this.options),e),this.options.padding!==void 0&&np(this.editor.getDocument(),tr(this.options.padding)),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:"",value:e}]})}getOptions(){return this.options}updateBuiltInElement(e,n){var r,i;const{data:o}=this.options,{attributes:s={}}=n,a=gl(e),l=Tn(e)||kt.ItemLabel===a||kt.ItemDesc===a||kt.ItemValue===a||kt.ItemIllus===a,c=l?By(e):void 0;if(l){const h=Pr(o,c),u=a.replace("item-","");h.attributes||(h.attributes={}),(r=h.attributes)[u]||(r[u]={}),Object.assign(h.attributes[u],s)}else(kt.Title===a||kt.Desc===a||kt.Illus===a)&&(o.attributes||(o.attributes={}),(i=o.attributes)[a]||(i[a]={}),Object.assign(o.attributes[a],s));this.emitter.emit("options:element:update",{element:e,props:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",role:a,indexes:c,path:l?`${YR(c)}.attributes.${a.replace("item-","")}`:`data.attributes.${a}`,value:n}]})}destroy(){}}class WD{constructor(e,n,r){if(this.emitter=e,this.document=n,this.options=r,!n.isConnected)throw new Error("The provided document is not connected to the DOM.");n.style.userSelect="none";const i=new RD,o=new BD,s=new DD,a=new HD;i.init({state:o,emitter:e}),o.init({emitter:e,editor:this,commander:i,options:r}),s.init({emitter:e,editor:this,commander:i,state:o},r.plugins),a.init({emitter:e,editor:this,commander:i,state:o,interactions:r.interactions}),this.commander=i,this.state=o,this.plugin=s,this.interaction=a}getDocument(){return this.document}destroy(){this.document.style.userSelect="",this.interaction.destroy(),this.plugin.destroy(),this.commander.destroy(),this.state.destroy()}}var Ph,Z3;function VD(){if(Z3)return Ph;Z3=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;Ph=function(r,i){i=i||{};var o=1,s=1;function a(L){var M=L.match(/\n/g);M&&(o+=M.length);var R=L.lastIndexOf(`
539
- `);s=~R?L.length-R:s+L.length}function l(){var L={line:o,column:s};return function(M){return M.position=new c(L),b(),M}}function c(L){this.start=L,this.end={line:o,column:s},this.source=i.source}c.prototype.content=r;var h=[];function u(L){var M=new Error(i.source+":"+o+":"+s+": "+L);if(M.reason=L,M.filename=i.source,M.line=o,M.column=s,M.source=r,i.silent)h.push(M);else throw M}function f(){var L=y();return{type:"stylesheet",stylesheet:{source:i.source,rules:L,parsingErrors:h}}}function p(){return m(/^{\s*/)}function g(){return m(/^}/)}function y(){var L,M=[];for(b(),v(M);r.length&&r.charAt(0)!="}"&&(L=j()||X());)L!==!1&&(M.push(L),v(M));return M}function m(L){var M=L.exec(r);if(M){var R=M[0];return a(R),r=r.slice(R.length),M}}function b(){m(/^\s*/)}function v(L){var M;for(L=L||[];M=x();)M!==!1&&L.push(M);return L}function x(){var L=l();if(!(r.charAt(0)!="/"||r.charAt(1)!="*")){for(var M=2;r.charAt(M)!=""&&(r.charAt(M)!="*"||r.charAt(M+1)!="/");)++M;if(M+=2,r.charAt(M-1)==="")return u("End of comment missing");var R=r.slice(2,M-2);return s+=2,a(R),r=r.slice(M),s+=2,L({type:"comment",comment:R})}}function w(){var L=m(/^([^{]+)/);if(L)return e(L[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(M){return M.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(M){return M.replace(/\u200C/g,",")})}function _(){var L=l(),M=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(M){if(M=e(M[0]),!m(/^:\s*/))return u("property missing ':'");var R=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),W=L({type:"declaration",property:M.replace(t,""),value:R?e(R[0]).replace(t,""):""});return m(/^[;\s]*/),W}}function $(){var L=[];if(!p())return u("missing '{'");v(L);for(var M;M=_();)M!==!1&&(L.push(M),v(L));return g()?L:u("missing '}'")}function P(){for(var L,M=[],R=l();L=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)M.push(L[1]),m(/^,\s*/);if(M.length)return R({type:"keyframe",values:M,declarations:$()})}function O(){var L=l(),R=m(/^@([-\w]+)?keyframes\s*/);if(R){var M=R[1],R=m(/^([-\w]+)\s*/);if(!R)return u("@keyframes missing name");var W=R[1];if(!p())return u("@keyframes missing '{'");for(var U,V=v();U=P();)V.push(U),V=V.concat(v());return g()?L({type:"keyframes",name:W,vendor:M,keyframes:V}):u("@keyframes missing '}'")}}function T(){var L=l(),M=m(/^@supports *([^{]+)/);if(M){var R=e(M[1]);if(!p())return u("@supports missing '{'");var W=v().concat(y());return g()?L({type:"supports",supports:R,rules:W}):u("@supports missing '}'")}}function I(){var L=l(),M=m(/^@host\s*/);if(M){if(!p())return u("@host missing '{'");var R=v().concat(y());return g()?L({type:"host",rules:R}):u("@host missing '}'")}}function S(){var L=l(),M=m(/^@media *([^{]+)/);if(M){var R=e(M[1]);if(!p())return u("@media missing '{'");var W=v().concat(y());return g()?L({type:"media",media:R,rules:W}):u("@media missing '}'")}}function H(){var L=l(),M=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(M)return L({type:"custom-media",name:e(M[1]),media:e(M[2])})}function C(){var L=l(),M=m(/^@page */);if(M){var R=w()||[];if(!p())return u("@page missing '{'");for(var W=v(),U;U=_();)W.push(U),W=W.concat(v());return g()?L({type:"page",selectors:R,declarations:W}):u("@page missing '}'")}}function A(){var L=l(),M=m(/^@([-\w]+)?document *([^{]+)/);if(M){var R=e(M[1]),W=e(M[2]);if(!p())return u("@document missing '{'");var U=v().concat(y());return g()?L({type:"document",document:W,vendor:R,rules:U}):u("@document missing '}'")}}function B(){var L=l(),M=m(/^@font-face\s*/);if(M){if(!p())return u("@font-face missing '{'");for(var R=v(),W;W=_();)R.push(W),R=R.concat(v());return g()?L({type:"font-face",declarations:R}):u("@font-face missing '}'")}}var k=N("import"),D=N("charset"),z=N("namespace");function N(L){var M=new RegExp("^@"+L+"\\s*([^;]+);");return function(){var R=l(),W=m(M);if(W){var U={type:L};return U[L]=W[1].trim(),R(U)}}}function j(){if(r[0]=="@")return O()||S()||H()||T()||k()||D()||z()||A()||C()||I()||B()}function X(){var L=l(),M=w();return M?(v(),L({type:"rule",selectors:M,declarations:$()})):u("selector missing")}return n(f())};function e(r){return r?r.replace(/^\s+|\s+$/g,""):""}function n(r,i){var o=r&&typeof r.type=="string",s=o?r:i;for(var a in r){var l=r[a];Array.isArray(l)?l.forEach(function(c){n(c,s)}):l&&typeof l=="object"&&n(l,s)}return o&&Object.defineProperty(r,"parent",{configurable:!0,writable:!0,enumerable:!1,value:i||null}),r}return Ph}var YD=VD();const XD=V3(YD);var Br=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function GD(t,e=!0){return Br(this,null,function*(){const n=qD(t);if(n.size===0)return;const r=[];yield Promise.all(Array.from(n).map(i=>Br(null,null,function*(){const o=ZD(i);if(!o.length)return;const s=yield UD(i);if(!s.length)return;const a=yield Promise.all(s.map(l=>Br(null,null,function*(){const c=QD(l),h=c["unicode-range"].replace(/\s/g,"");if(!o.find(y=>y.unicodeRange&&y.unicodeRange.replace(/\s/g,"")===h))return null;const f=A5(c["font-family"],Vu(c["font-weight"]));if(!f)return null;const p=c.src.match(/url\(["']?(.*?\.woff2)[^"']*["']?\)/);if(!(p!=null&&p[1]))return null;const g=wl(f,p[1]);if(e){const y=yield tN(g);c.src=`url(${y}) format('woff2')`}else c.src=`url(${g}) format('woff2')`;return c})));r.push(...a.filter(Boolean)||[])}))),r.length>0&&JD(t,r)})}function qD(t){const e=new Set,n=i=>{i&&qn(i).forEach(o=>{const s=Cr(o);s&&e.add(s)})};n(t.getAttribute("font-family"));const r=t.querySelectorAll("foreignObject span");for(const i of r)n(i.style.fontFamily);return e}function UD(t){return Br(this,null,function*(){const e=vf(t),n=[];return yield Promise.allSettled(e.map(r=>Br(null,null,function*(){var i;const o=yield wo(r).then(s=>s.text()).then(s=>XD(s)).catch(()=>(console.error(`Failed to fetch or parse font CSS: ${r}`),null));(i=o==null?void 0:o.stylesheet)==null||i.rules.forEach(s=>{if(s.type==="font-face"){const a=KD(s);n.push(a)}})}))),n})}function ZD(t){const e=[],n=qn(t).map(r=>Cr(r));return document.fonts.forEach(r=>{n.includes(Cr(r.family))&&r.status==="loaded"&&e.push(r)}),e}function KD(t){const e=t.declarations||[],n={};return e.forEach(r=>{const{property:i,value:o}=r;i&&o&&(n[i]=o)}),n}function QD(t){var e,n,r,i,o,s;return{"font-family":(e=t["font-family"])!=null?e:"",src:(n=t.src)!=null?n:"","font-style":(r=t["font-style"])!=null?r:"normal","font-display":(i=t["font-display"])!=null?i:"swap","font-weight":(o=t["font-weight"])!=null?o:"400","unicode-range":(s=t["unicode-range"])!=null?s:"U+0-FFFF"}}function JD(t,e){const n=[],r=new Set;for(const s of e){const a=[s["font-family"],s["font-weight"],s["font-style"],s["unicode-range"],s.src].join("|");r.has(a)||(r.add(a),n.push(s))}if(n.length===0)return;const i=wt("style",{type:"text/css"});i.innerHTML=n.map(s=>`
538
+ `)}var WD=Object.defineProperty,G3=Object.getOwnPropertySymbols,VD=Object.prototype.hasOwnProperty,YD=Object.prototype.propertyIsEnumerable,q3=(t,e,n)=>e in t?WD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,XD=(t,e)=>{for(var n in e||(e={}))VD.call(e,n)&&q3(t,n,e[n]);if(G3)for(var n of G3(e))YD.call(e,n)&&q3(t,n,e[n]);return t};class U3 extends xh{constructor(e){super(),this.options=e,this.name="edit-bar",this.selection=[],this.handleSelectionChanged=({next:n})=>{if(this.selection=n,n.length===0){this.container&&Z3(this.container);return}const r=this.getOrCreateEditBar(),i=this.getEditItems(n);if(i.length===0){Z3(r);return}GD(r,i),this.placeEditBar(r,n),Oh(r)},this.handleGeometryChanged=({target:n})=>{!this.selection.includes(n)||!this.container||(this.placeEditBar(this.container,this.selection),Oh(this.container))},this.handleHistoryChanged=()=>{!this.container||this.selection.length===0||(this.placeEditBar(this.container,this.selection),Oh(this.container))}}init(e){super.init(e);const{emitter:n}=e;n.on("selection:change",this.handleSelectionChanged),n.on("selection:geometrychange",this.handleGeometryChanged),n.on("history:change",this.handleHistoryChanged)}destroy(){var e;const{emitter:n}=this;n.off("selection:change",this.handleSelectionChanged),n.off("selection:geometrychange",this.handleGeometryChanged),n.off("history:change",this.handleHistoryChanged),(e=this.container)==null||e.remove()}getEditItems(e){let n=!1,r=!1,i=!1;for(const o of e)if(mn(o)?n=!0:Tn(o)?r=!0:X6(o)&&(i=!0),n&&r&&i)break;return n&&!r&&!i?e.length===1?this.getTextEditItems(e[0]):this.getTextCollectionEditItems(e):!n&&r&&!i?e.length===1?this.getIconEditItems(e):this.getIconCollectionEditItems(e):!n&&!r&&i?e.length===1?this.getGeometryEditItems(e):this.getGeometryCollectionEditItems(e):this.getElementCollectionEditItems(e)}getOrCreateEditBar(){if(this.container)return this.container;const{style:e,className:n}=this.options||{},r=document.createElement("div");Object.assign(r.style,XD({visibility:"hidden",position:"absolute",left:"0",top:"0",display:"flex",flexFlow:"row",justifyContent:"center",alignItems:"center",height:"40px",minWidth:"40px",minHeight:"40px",borderRadius:"8px",padding:"0 4px",backgroundColor:"#fff",border:"1px solid rgba(239, 240, 240, 0.9)",zIndex:"9999",boxShadow:"rgba(0, 0, 0, 0.08) 0px 1px 2px -2px, rgba(0, 0, 0, 0.04) 0px 2px 6px, rgba(0, 0, 0, 0.02) 0px 4px 8px 1px"},e)),n&&r.classList.add(n),si(r,ya),this.container=r;const{getContainer:i}=this.options||{},o=typeof i=="function"?i():i,s=o!=null?o:document.body;return s==null||s.appendChild(r),r}getTextEditItems(e){const{attributes:n={}}=fl(e);return[N3,V3,D3,F3].map(r=>r([e],n,this.commander))}getTextCollectionEditItems(e){const n=ld(e.map(o=>fl(o).attributes||{})),r=[N3,V3,D3,F3].map(o=>o(e,n,this.commander)),i=this.getElementCollectionEditItems(e);return[...r,...i]}getIconEditItems(e){const n=wl(e[0]);return[Y3].map(r=>r(e,n,this.commander))}getIconCollectionEditItems(e){const n=ld(e.map(r=>wl(r)));return[Y3].map(r=>r(e,n,this.commander))}getGeometryEditItems(e){return[]}getGeometryCollectionEditItems(e){return[...this.getElementCollectionEditItems(e)]}getElementCollectionEditItems(e){return e.length<=1?[]:[lD(e,{},this.commander,{enableDistribution:e.length>2})]}placeEditBar(e,n){var r;if(n.length===0)return;const i=this.editor.getDocument(),o=Ar(n.map(w=>cn(i,w))),a=((r=e.offsetParent)!=null?r:document.documentElement).getBoundingClientRect(),l=document.documentElement.clientHeight,c=e.getBoundingClientRect(),h=8,u=lR(i),f=new DOMPoint(o.x+o.width/2,o.y).matrixTransform(u),p=new DOMPoint(o.x+o.width/2,o.y+o.height).matrixTransform(u),g=(w,_,$)=>Math.min(Math.max(w,_),$);let y=f.x-a.left-c.width/2;y=g(y,0,Math.max(a.width-c.width,0));const m=f.y-h,x=l-p.y-h;let b=m>=c.height||m>=x?f.y-a.top-c.height-h:p.y-a.top+h;b=g(b,0,Math.max(a.height-c.height,0)),e.style.left=`${y}px`,e.style.top=`${b}px`}}function Oh(t){t.style.visibility="visible"}function Z3(t){t.style.visibility="hidden"}function GD(t,e){t.innerHTML="",e.forEach(n=>{t.appendChild(n)})}var qD=Object.defineProperty,K3=Object.getOwnPropertySymbols,UD=Object.prototype.hasOwnProperty,ZD=Object.prototype.propertyIsEnumerable,Q3=(t,e,n)=>e in t?qD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,KD=(t,e)=>{for(var n in e||(e={}))UD.call(e,n)&&Q3(t,n,e[n]);if(K3)for(var n of K3(e))ZD.call(e,n)&&Q3(t,n,e[n]);return t};const Yi=class Ke extends xh{constructor(){super(...arguments),this.name="resize-element",this.target=null,this.handles=[],this.activeHandle=null,this.activePointerId=null,this.handleSelectionChange=({next:e})=>{const n=e.length===1?e[0]:null;n&&mn(n)?(this.target=n,this.updateHandles()):(this.target=null,this.hideHandles(),this.cancelDrag())},this.handleDeactivate=()=>{this.target=null,this.hideHandles(),this.cancelDrag()},this.handleGeometryChange=({target:e})=>{if(!this.target||e!==this.target)return;const n=this.getViewportRect(this.target);this.lastViewportRect=n,this.updateHandles(n)},this.handleHistoryChange=()=>{if(!this.target)return;const e=this.getViewportRect(this.target);this.lastViewportRect=e,this.updateHandles(e)},this.handlePointerMove=e=>{if(!this.target||!this.startPointer||!this.startRect||!this.activeHandle||this.activePointerId!==null&&e.pointerId!==this.activePointerId)return;const n=this.clientToElement(this.target,e.clientX,e.clientY),r=n.x-this.startPointer.x,i=n.y-this.startPointer.y,o=this.clampRect(this.applyDelta(this.startRect,r,i,this.activeHandle),this.activeHandle);this.lastRect=o,this.applyRect(this.target,o),this.lastViewportRect=this.getViewportRect(this.target),this.updateHandles(this.lastViewportRect),this.emitSelectionGeometryChange()},this.handlePointerUp=e=>{if(this.activePointerId!==null&&e.pointerId!==this.activePointerId)return;const n=this.lastRect,r=this.startAttrs,i=n&&this.startRect&&this.hasRectChanged(this.startRect,n);if(this.cancelDrag(),i&&this.target&&n&&r)this.commander.execute(new hn(this.target,{attributes:n},{attributes:r})),this.lastViewportRect=this.getViewportRect(this.target),this.updateHandles(this.lastViewportRect),this.emitSelectionGeometryChange();else if(this.target){const o=this.lastViewportRect||this.getViewportRect(this.target);this.updateHandles(o)}}}init(e){super.init(e);const{emitter:n}=e;n.on("selection:change",this.handleSelectionChange),n.on("selection:geometrychange",this.handleGeometryChange),n.on("history:change",this.handleHistoryChange),n.on("deactivated",this.handleDeactivate)}destroy(){this.cancelDrag(),this.removeContainer();const{emitter:e}=this;e.off("selection:change",this.handleSelectionChange),e.off("selection:geometrychange",this.handleGeometryChange),e.off("history:change",this.handleHistoryChange),e.off("deactivated",this.handleDeactivate)}ensureContainer(){if(this.container)return this.container;const e=wt("g",{"pointer-events":"none"});this.overlay=wt("rect",{fill:"rgba(51, 132, 245, 0.06)",stroke:"none","pointer-events":"none"});const n=wt("rect",{fill:"none",stroke:"#3384F5","stroke-width":1,"stroke-dasharray":"4 2","pointer-events":"none"});e.appendChild(this.overlay),e.appendChild(n),this.outline=n;const r=Ke.HANDLE_POSITIONS,i={"top-left":"nwse-resize",top:"ns-resize","top-right":"nesw-resize",right:"ew-resize","bottom-right":"nwse-resize",bottom:"ns-resize","bottom-left":"nesw-resize",left:"ew-resize"};return r.forEach((o,s)=>{const l=o==="top"||o==="right"||o==="bottom"||o==="left"?wt("line",{stroke:"transparent","stroke-width":Ke.LINE_STROKE_WIDTH}):wt("circle",{r:Ke.HANDLE_SIZE/2,fill:"#3384F5",stroke:"#fff","stroke-width":1.5});l.style.cursor=i[o],l.style.pointerEvents="all",l.addEventListener("pointerdown",c=>this.handlePointerDown(c,o)),l.addEventListener("click",c=>{c.stopPropagation(),c.preventDefault()}),e.appendChild(l),this.handles[s]=l}),this.editor.getDocument().appendChild(e),this.container=e,e}updateHandles(e){if(!this.target){this.hideHandles();return}const n=e||this.getViewportRect(this.target)||this.lastViewportRect||null;if(!n){this.hideHandles();return}this.lastViewportRect=n;const r=this.ensureContainer();r.style.display="block",this.outline.style.display="block",Yt(this.outline,n),this.overlay&&(this.overlay.style.display="block",Yt(this.overlay,n));const i=this.getHandlePoints(n);this.handles.forEach((o,s)=>{const[a,l]=i[s];if(o.tagName==="circle")Yt(o,{cx:a,cy:l});else{const c=Ke.HANDLE_POSITIONS[s],h=this.getHandleLine(n,c);Yt(o,h)}o.style.display="block"})}hideHandles(){this.container&&(this.container.style.display="none"),this.outline&&(this.outline.style.display="none"),this.overlay&&(this.overlay.style.display="none"),this.handles.forEach(e=>e.style.display="none")}removeContainer(){var e;(e=this.container)==null||e.remove(),this.container=void 0,this.outline=void 0,this.overlay=void 0,this.handles=[]}handlePointerDown(e,n){if(!this.target||e.button!==0&&e.pointerType==="mouse")return;e.stopPropagation(),e.preventDefault();const r=this.clientToElement(this.target,e.clientX,e.clientY);this.activeHandle=n,this.activePointerId=e.pointerId,this.startPointer=r;const i=this.getCurrentAttributes(this.target);this.startRect=i,this.startAttrs=KD({},i),this.lastRect=i,this.lastViewportRect=this.getViewportRect(this.target),window.addEventListener("pointermove",this.handlePointerMove),window.addEventListener("pointerup",this.handlePointerUp),window.addEventListener("pointercancel",this.handlePointerUp)}cancelDrag(){this.activeHandle=null,this.activePointerId=null,this.startPointer=void 0,this.startRect=void 0,this.startAttrs=void 0,this.lastRect=void 0,this.lastViewportRect=void 0,window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp)}applyRect(e,n){Yt(e,{x:n.x,y:n.y,width:n.width,height:n.height})}getViewportRect(e){const{x:n,y:r,width:i,height:o}=cn(this.editor.getDocument(),e);return{x:n,y:r,width:i,height:o}}clientToElement(e,n,r){var i,o;const s=((i=e.getScreenCTM())==null?void 0:i.inverse())||((o=this.editor.getDocument().getScreenCTM())==null?void 0:o.inverse())||new DOMMatrix;return new DOMPoint(n,r).matrixTransform(s)}getCurrentAttributes(e){const n=ke(e,["x","y","width","height"],!1),r=this.getViewportRect(e),i=(o,s)=>{const a=o!==null?Number(o):NaN;return Number.isFinite(a)?a:s};return{x:i(n.x,r.x),y:i(n.y,r.y),width:i(n.width,r.width),height:i(n.height,r.height)}}getHandlePoints(e){const{x:n,y:r,width:i,height:o}=e,s=n+i/2,a=r+o/2;return[[n,r],[s,r],[n+i,r],[n+i,a],[n+i,r+o],[s,r+o],[n,r+o],[n,a]]}applyDelta(e,n,r,i){let{x:o,y:s,width:a,height:l}=e;switch(i){case"top-left":o+=n,s+=r,a-=n,l-=r;break;case"top":s+=r,l-=r;break;case"top-right":s+=r,a+=n,l-=r;break;case"right":a+=n;break;case"bottom-right":a+=n,l+=r;break;case"bottom":l+=r;break;case"bottom-left":o+=n,a-=n,l+=r;break;case"left":o+=n,a-=n;break}return{x:o,y:s,width:a,height:l}}clampRect(e,n){let{x:r,y:i,width:o,height:s}=e;if(o<Ke.MIN_SIZE){const a=Ke.MIN_SIZE-o;(n==="top-left"||n==="bottom-left"||n==="left")&&(r-=a),o=Ke.MIN_SIZE}if(s<Ke.MIN_SIZE){const a=Ke.MIN_SIZE-s;(n==="top-left"||n==="top-right"||n==="top")&&(i-=a),s=Ke.MIN_SIZE}return{x:r,y:i,width:o,height:s}}hasRectChanged(e,n){return Math.abs(e.x-n.x)>.5||Math.abs(e.y-n.y)>.5||Math.abs(e.width-n.width)>.5||Math.abs(e.height-n.height)>.5}emitSelectionGeometryChange(){this.target&&this.lastViewportRect&&this.emitter.emit("selection:geometrychange",{type:"selection:geometrychange",target:this.target,rect:this.lastViewportRect})}getHandleLine(e,n){const{x:r,y:i,width:o,height:s}=e;switch(n){case"top":return{x1:r,y1:i,x2:r+o,y2:i};case"right":return{x1:r+o,y1:i,x2:r+o,y2:i+s};case"bottom":return{x1:r,y1:i+s,x2:r+o,y2:i+s};case"left":default:return{x1:r,y1:i,x2:r,y2:i+s}}}};Yi.HANDLE_SIZE=10,Yi.LINE_STROKE_WIDTH=8,Yi.MIN_SIZE=1,Yi.HANDLE_POSITIONS=["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"];let J3=Yi;function tv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Mh={exports:{}},ev;function QD(){return ev||(ev=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,h){this.fn=l,this.context=c,this.once=h||!1}function o(l,c,h,u,f){if(typeof h!="function")throw new TypeError("The listener must be a function");var p=new i(h,u||l,f),g=n?n+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],p]:l._events[g].push(p):(l._events[g]=p,l._eventsCount++),l}function s(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],h,u;if(this._eventsCount===0)return c;for(u in h=this._events)e.call(h,u)&&c.push(n?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(h)):c},a.prototype.listeners=function(c){var h=n?n+c:c,u=this._events[h];if(!u)return[];if(u.fn)return[u.fn];for(var f=0,p=u.length,g=new Array(p);f<p;f++)g[f]=u[f].fn;return g},a.prototype.listenerCount=function(c){var h=n?n+c:c,u=this._events[h];return u?u.fn?1:u.length:0},a.prototype.emit=function(c,h,u,f,p,g){var y=n?n+c:c;if(!this._events[y])return!1;var m=this._events[y],x=arguments.length,v,b;if(m.fn){switch(m.once&&this.removeListener(c,m.fn,void 0,!0),x){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,h),!0;case 3:return m.fn.call(m.context,h,u),!0;case 4:return m.fn.call(m.context,h,u,f),!0;case 5:return m.fn.call(m.context,h,u,f,p),!0;case 6:return m.fn.call(m.context,h,u,f,p,g),!0}for(b=1,v=new Array(x-1);b<x;b++)v[b-1]=arguments[b];m.fn.apply(m.context,v)}else{var w=m.length,_;for(b=0;b<w;b++)switch(m[b].once&&this.removeListener(c,m[b].fn,void 0,!0),x){case 1:m[b].fn.call(m[b].context);break;case 2:m[b].fn.call(m[b].context,h);break;case 3:m[b].fn.call(m[b].context,h,u);break;case 4:m[b].fn.call(m[b].context,h,u,f);break;default:if(!v)for(_=1,v=new Array(x-1);_<x;_++)v[_-1]=arguments[_];m[b].fn.apply(m[b].context,v)}}return!0},a.prototype.on=function(c,h,u){return o(this,c,h,u,!1)},a.prototype.once=function(c,h,u){return o(this,c,h,u,!0)},a.prototype.removeListener=function(c,h,u,f){var p=n?n+c:c;if(!this._events[p])return this;if(!h)return s(this,p),this;var g=this._events[p];if(g.fn)g.fn===h&&(!f||g.once)&&(!u||g.context===u)&&s(this,p);else{for(var y=0,m=[],x=g.length;y<x;y++)(g[y].fn!==h||f&&!g[y].once||u&&g[y].context!==u)&&m.push(g[y]);m.length?this._events[p]=m.length===1?m[0]:m:s(this,p)}return this},a.prototype.removeAllListeners=function(c){var h;return c?(h=n?n+c:c,this._events[h]&&s(this,h)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})(Mh)),Mh.exports}var JD=QD();const tN=tv(JD);var la=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class eN{constructor(){this.undoStack=[],this.redoStack=[]}init(e){Object.assign(this,e)}execute(e){return la(this,null,function*(){yield e.apply(this.state),this.undoStack.push(e),this.redoStack=[],this.emitHistoryChange("execute")})}executeBatch(e){return la(this,null,function*(){if(e.length===0)return;const n=new wR(e);yield this.execute(n)})}undo(){return la(this,null,function*(){const e=this.undoStack.pop();e&&(yield e.undo(this.state),this.redoStack.push(e),this.emitHistoryChange("undo"))})}redo(){return la(this,null,function*(){const e=this.redoStack.pop();e&&(yield e.apply(this.state),this.undoStack.push(e),this.emitHistoryChange("redo"))})}serialize(){return this.undoStack.map(e=>e.serialize())}clear(){this.undoStack=[],this.redoStack=[]}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}getHistorySize(){return this.undoStack.length}destroy(){this.clear()}emitHistoryChange(e){var n;(n=this.emitter)==null||n.emit("history:change",{type:"history:change",action:e})}}var nv=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class nN{constructor(){this.extensions=new t3,this.interactions=[],this.active=!1,this.running=null,this.concurrentInteractions=new Set,this.selection=new Set,this.handleClick=e=>{const n=this.editor.getDocument(),r=e.target;if(!r){this.deactivate();return}n.contains(r)||G6(r)?this.activate():this.deactivate()}}init(e){Object.assign(this,e),document.addEventListener("click",this.handleClick),this.interactions.forEach(n=>{this.extensions.register(n.name,n),n.init({emitter:this.emitter,editor:this.editor,commander:this.commander,state:this.state,interaction:this}),this.emitter.emit("interaction:registered",n)})}isActive(){return this.active}select(e,n){const r=this.getSelection(),i=[],o=[];if(n==="replace"){const l=new Set(e);r.forEach(c=>{l.has(c)||o.push(c)}),e.forEach(c=>{this.selection.has(c)||i.push(c)}),this.selection=l}else n==="add"?e.forEach(l=>{this.selection.has(l)||(this.selection.add(l),i.push(l))}):n==="remove"?e.forEach(l=>{this.selection.delete(l)&&o.push(l)}):n==="toggle"&&e.forEach(l=>{this.selection.has(l)?(this.selection.delete(l),o.push(l)):(this.selection.add(l),i.push(l))});const s=this.getSelection(),a={type:"selection:change",previous:r,next:s,added:i,removed:o,mode:n};this.emitter.emit("selection:change",a)}getSelection(){return[...this.selection]}isSelected(e){return this.selection.has(e)}clearSelection(){const e=this.getSelection();this.selection.clear();const n={type:"selection:change",previous:e,next:[],added:[],removed:e,mode:"replace"};this.emitter.emit("selection:change",n)}activate(){this.active=!0,this.emitter.emit("activated")}deactivate(){this.active=!1,this.running=null,this.clearSelection(),this.emitter.emit("deactivated")}executeExclusiveInteraction(e,n){return nv(this,null,function*(){if(!(!this.active||this.running)){this.running=e;try{this.emitter.emit("interaction:started",e),yield n(),this.emitter.emit("interaction:ended",e)}catch(r){console.error(`Error occurred during exclusive interaction "${e.name}":`,r),this.emitter.emit("interaction:error",e,r)}finally{this.running=null}}})}executeConcurrentInteraction(e,n){return nv(this,null,function*(){if(this.active){this.concurrentInteractions.add(e);try{this.emitter.emit("interaction:started",e),yield n(),this.emitter.emit("interaction:ended",e)}catch(r){console.error(`Error occurred during concurrent interaction "${e.name}":`,r),this.emitter.emit("interaction:error",e,r)}finally{this.concurrentInteractions.delete(e)}}})}getOrCreateTransientContainer(){const e="transient-container",n=this.editor.getDocument(),r=Mr(n,e);if(r&&r.isConnected)return r;const i=wt("g");return si(i,e),n.appendChild(i),i}appendTransientElement(e){return this.getOrCreateTransientContainer().appendChild(e),e}destroy(){this.extensions.forEach(e=>{e.destroy(),this.emitter.emit("interaction:destroyed",e)}),this.extensions.destroy(),this.active=!1,this.running=null,this.clearSelection(),document.removeEventListener("click",this.handleClick),this.getOrCreateTransientContainer().remove()}}class rN{constructor(){this.extensions=new t3}init(e,n=[]){Object.assign(this,e),n.forEach(r=>{this.registerPlugin(r)})}getPlugin(e){return this.extensions.get(e)}getPlugins(){return this.extensions.getAll()}registerPlugin(e){this.extensions.register(e.name,e);const n={emitter:this.emitter,editor:this.editor,commander:this.commander,plugin:this,state:this.state};e.init(n),this.emitter.emit("plugin:registered",e)}unregisterPlugin(e){const n=this.extensions.get(e);n&&(n.destroy(),this.extensions.unregister(e),this.emitter.emit("plugin:unregistered",n))}destroy(){this.extensions.getAll().forEach(e=>{this.unregisterPlugin(e.name),this.emitter.emit("plugin:destroyed",e)}),this.extensions.destroy()}}var iN=Object.defineProperty,rv=Object.getOwnPropertySymbols,oN=Object.prototype.hasOwnProperty,sN=Object.prototype.propertyIsEnumerable,iv=(t,e,n)=>e in t?iN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ov=(t,e)=>{for(var n in e||(e={}))oN.call(e,n)&&iv(t,n,e[n]);if(rv)for(var n of rv(e))sN.call(e,n)&&iv(t,n,e[n]);return t};class aN{init(e){Object.assign(this,e)}addItemDatum(e,n){const r=e.slice(0,-1),i=e[e.length-1],o=Array.isArray(n)?n:[n];Ky(this.options.data,r).splice(i,0,...o),this.emitter.emit("options:data:item:add",{indexes:e,datum:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"add",path:"data.items",indexes:e,value:o}]})}updateItemDatum(e,n){const r=oi(this.options.data,e);Object.assign(r,n),this.emitter.emit("options:data:item:update",{indexes:e,datum:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:"data.items",indexes:e,value:n}]})}removeItemDatum(e,n=1){const r=e.slice(0,-1),i=e[e.length-1],s=Ky(this.options.data,r).splice(i,n);this.emitter.emit("options:data:item:remove",{indexes:e,datum:s}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"remove",path:"data.items",indexes:e,value:s}]})}updateData(e,n){this.options.data[e]=n,this.emitter.emit("options:data:update",{key:e,value:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:`data.${e}`,value:n}]})}updateElement(e,n){this.updateBuiltInElement(e,n)}updateOptions(e){this.options=ov(ov({},this.options),e),this.options.padding!==void 0&&sp(this.editor.getDocument(),tr(this.options.padding)),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:"",value:e}]})}getOptions(){return this.options}updateBuiltInElement(e,n){var r,i;const{data:o}=this.options,{attributes:s={}}=n,a=gl(e),l=Tn(e)||kt.ItemLabel===a||kt.ItemDesc===a||kt.ItemValue===a||kt.ItemIllus===a,c=l?Qy(e):void 0;if(l){const h=oi(o,c),u=a.replace("item-","");h.attributes||(h.attributes={}),(r=h.attributes)[u]||(r[u]={}),Object.assign(h.attributes[u],s)}else(kt.Title===a||kt.Desc===a||kt.Illus===a)&&(o.attributes||(o.attributes={}),(i=o.attributes)[a]||(i[a]={}),Object.assign(o.attributes[a],s));this.emitter.emit("options:element:update",{element:e,props:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",role:a,indexes:c,path:l?`${hR(c)}.attributes.${a.replace("item-","")}`:`data.attributes.${a}`,value:n}]})}destroy(){}}class lN{constructor(e,n,r){if(this.emitter=e,this.document=n,this.options=r,!n.isConnected)throw new Error("The provided document is not connected to the DOM.");n.style.userSelect="none";const i=new eN,o=new aN,s=new rN,a=new nN;i.init({state:o,emitter:e}),o.init({emitter:e,editor:this,commander:i,options:r}),s.init({emitter:e,editor:this,commander:i,state:o},r.plugins),a.init({emitter:e,editor:this,commander:i,state:o,interactions:r.interactions}),this.commander=i,this.state=o,this.plugin=s,this.interaction=a}getDocument(){return this.document}destroy(){this.document.style.userSelect="",this.interaction.destroy(),this.plugin.destroy(),this.commander.destroy(),this.state.destroy()}}var Sh,sv;function cN(){if(sv)return Sh;sv=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;Sh=function(r,i){i=i||{};var o=1,s=1;function a(z){var M=z.match(/\n/g);M&&(o+=M.length);var H=z.lastIndexOf(`
539
+ `);s=~H?z.length-H:s+z.length}function l(){var z={line:o,column:s};return function(M){return M.position=new c(z),x(),M}}function c(z){this.start=z,this.end={line:o,column:s},this.source=i.source}c.prototype.content=r;var h=[];function u(z){var M=new Error(i.source+":"+o+":"+s+": "+z);if(M.reason=z,M.filename=i.source,M.line=o,M.column=s,M.source=r,i.silent)h.push(M);else throw M}function f(){var z=y();return{type:"stylesheet",stylesheet:{source:i.source,rules:z,parsingErrors:h}}}function p(){return m(/^{\s*/)}function g(){return m(/^}/)}function y(){var z,M=[];for(x(),v(M);r.length&&r.charAt(0)!="}"&&(z=j()||X());)z!==!1&&(M.push(z),v(M));return M}function m(z){var M=z.exec(r);if(M){var H=M[0];return a(H),r=r.slice(H.length),M}}function x(){m(/^\s*/)}function v(z){var M;for(z=z||[];M=b();)M!==!1&&z.push(M);return z}function b(){var z=l();if(!(r.charAt(0)!="/"||r.charAt(1)!="*")){for(var M=2;r.charAt(M)!=""&&(r.charAt(M)!="*"||r.charAt(M+1)!="/");)++M;if(M+=2,r.charAt(M-1)==="")return u("End of comment missing");var H=r.slice(2,M-2);return s+=2,a(H),r=r.slice(M),s+=2,z({type:"comment",comment:H})}}function w(){var z=m(/^([^{]+)/);if(z)return e(z[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(M){return M.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(M){return M.replace(/\u200C/g,",")})}function _(){var z=l(),M=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(M){if(M=e(M[0]),!m(/^:\s*/))return u("property missing ':'");var H=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),W=z({type:"declaration",property:M.replace(t,""),value:H?e(H[0]).replace(t,""):""});return m(/^[;\s]*/),W}}function $(){var z=[];if(!p())return u("missing '{'");v(z);for(var M;M=_();)M!==!1&&(z.push(M),v(z));return g()?z:u("missing '}'")}function P(){for(var z,M=[],H=l();z=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)M.push(z[1]),m(/^,\s*/);if(M.length)return H({type:"keyframe",values:M,declarations:$()})}function C(){var z=l(),H=m(/^@([-\w]+)?keyframes\s*/);if(H){var M=H[1],H=m(/^([-\w]+)\s*/);if(!H)return u("@keyframes missing name");var W=H[1];if(!p())return u("@keyframes missing '{'");for(var U,Y=v();U=P();)Y.push(U),Y=Y.concat(v());return g()?z({type:"keyframes",name:W,vendor:M,keyframes:Y}):u("@keyframes missing '}'")}}function T(){var z=l(),M=m(/^@supports *([^{]+)/);if(M){var H=e(M[1]);if(!p())return u("@supports missing '{'");var W=v().concat(y());return g()?z({type:"supports",supports:H,rules:W}):u("@supports missing '}'")}}function E(){var z=l(),M=m(/^@host\s*/);if(M){if(!p())return u("@host missing '{'");var H=v().concat(y());return g()?z({type:"host",rules:H}):u("@host missing '}'")}}function S(){var z=l(),M=m(/^@media *([^{]+)/);if(M){var H=e(M[1]);if(!p())return u("@media missing '{'");var W=v().concat(y());return g()?z({type:"media",media:H,rules:W}):u("@media missing '}'")}}function R(){var z=l(),M=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(M)return z({type:"custom-media",name:e(M[1]),media:e(M[2])})}function O(){var z=l(),M=m(/^@page */);if(M){var H=w()||[];if(!p())return u("@page missing '{'");for(var W=v(),U;U=_();)W.push(U),W=W.concat(v());return g()?z({type:"page",selectors:H,declarations:W}):u("@page missing '}'")}}function A(){var z=l(),M=m(/^@([-\w]+)?document *([^{]+)/);if(M){var H=e(M[1]),W=e(M[2]);if(!p())return u("@document missing '{'");var U=v().concat(y());return g()?z({type:"document",document:W,vendor:H,rules:U}):u("@document missing '}'")}}function B(){var z=l(),M=m(/^@font-face\s*/);if(M){if(!p())return u("@font-face missing '{'");for(var H=v(),W;W=_();)H.push(W),H=H.concat(v());return g()?z({type:"font-face",declarations:H}):u("@font-face missing '}'")}}var L=N("import"),D=N("charset"),k=N("namespace");function N(z){var M=new RegExp("^@"+z+"\\s*([^;]+);");return function(){var H=l(),W=m(M);if(W){var U={type:z};return U[z]=W[1].trim(),H(U)}}}function j(){if(r[0]=="@")return C()||S()||R()||T()||L()||D()||k()||A()||O()||E()||B()}function X(){var z=l(),M=w();return M?(v(),z({type:"rule",selectors:M,declarations:$()})):u("selector missing")}return n(f())};function e(r){return r?r.replace(/^\s+|\s+$/g,""):""}function n(r,i){var o=r&&typeof r.type=="string",s=o?r:i;for(var a in r){var l=r[a];Array.isArray(l)?l.forEach(function(c){n(c,s)}):l&&typeof l=="object"&&n(l,s)}return o&&Object.defineProperty(r,"parent",{configurable:!0,writable:!0,enumerable:!1,value:i||null}),r}return Sh}var hN=cN();const dN=tv(hN);var Fr=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function uN(t,e=!0){return Fr(this,null,function*(){const n=fN(t);if(n.size===0)return;const r=[];yield Promise.all(Array.from(n).map(i=>Fr(null,null,function*(){const o=gN(i);if(!o.length)return;const s=yield pN(i);if(!s.length)return;const a=yield Promise.all(s.map(l=>Fr(null,null,function*(){const c=yN(l),h=c["unicode-range"].replace(/\s/g,"");if(!o.find(y=>y.unicodeRange&&y.unicodeRange.replace(/\s/g,"")===h))return null;const f=Ww(c["font-family"],qu(c["font-weight"]));if(!f)return null;const p=c.src.match(/url\(["']?(.*?\.woff2)[^"']*["']?\)/);if(!(p!=null&&p[1]))return null;const g=_l(f,p[1]);if(e){const y=yield xN(g);c.src=`url(${y}) format('woff2')`}else c.src=`url(${g}) format('woff2')`;return c})));r.push(...a.filter(Boolean)||[])}))),r.length>0&&vN(t,r)})}function fN(t){const e=new Set,n=i=>{i&&qn(i).forEach(o=>{const s=Cr(o);s&&e.add(s)})};n(t.getAttribute("font-family"));const r=t.querySelectorAll("foreignObject span");for(const i of r)n(i.style.fontFamily);return e}function pN(t){return Fr(this,null,function*(){const e=$f(t),n=[];return yield Promise.allSettled(e.map(r=>Fr(null,null,function*(){var i;const o=yield wo(r).then(s=>s.text()).then(s=>dN(s)).catch(()=>(console.error(`Failed to fetch or parse font CSS: ${r}`),null));(i=o==null?void 0:o.stylesheet)==null||i.rules.forEach(s=>{if(s.type==="font-face"){const a=mN(s);n.push(a)}})}))),n})}function gN(t){const e=[],n=qn(t).map(r=>Cr(r));return document.fonts.forEach(r=>{n.includes(Cr(r.family))&&r.status==="loaded"&&e.push(r)}),e}function mN(t){const e=t.declarations||[],n={};return e.forEach(r=>{const{property:i,value:o}=r;i&&o&&(n[i]=o)}),n}function yN(t){var e,n,r,i,o,s;return{"font-family":(e=t["font-family"])!=null?e:"",src:(n=t.src)!=null?n:"","font-style":(r=t["font-style"])!=null?r:"normal","font-display":(i=t["font-display"])!=null?i:"swap","font-weight":(o=t["font-weight"])!=null?o:"400","unicode-range":(s=t["unicode-range"])!=null?s:"U+0-FFFF"}}function vN(t,e){const n=[],r=new Set;for(const s of e){const a=[s["font-family"],s["font-weight"],s["font-style"],s["unicode-range"],s.src].join("|");r.has(a)||(r.add(a),n.push(s))}if(n.length===0)return;const i=wt("style",{type:"text/css"});i.innerHTML=n.map(s=>`
540
540
  @font-face {
541
541
  font-family: ${s["font-family"]};
542
542
  src: ${s.src};
@@ -546,5 +546,5 @@ ${t.trim()}
546
546
  unicode-range: ${s["unicode-range"]};
547
547
  }
548
548
  `.trim()).join(`
549
- `);const o=t.querySelector("defs");o&&o.parentNode?o.parentNode.insertBefore(i,o.nextSibling):t.insertBefore(i,t.firstChild)}function tN(t){return Br(this,null,function*(){const e=yield wo(t);if(!e.ok)throw new Error(`Failed to load font: ${t}`);const n=yield e.blob();return yield new Promise((i,o)=>{const s=new FileReader;s.onloadend=()=>{i(s.result)},s.onerror=o,s.readAsDataURL(n)})})}var Oh=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function eN(t){return Oh(this,arguments,function*(e,n={}){const r=yield K3(e,n),i=new XMLSerializer().serializeToString(r);return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i)})}function K3(t){return Oh(this,arguments,function*(e,n={}){const{embedResources:r=!0}=n,i=e.cloneNode(!0),{width:o,height:s}=oc(e);return Yt(i,{width:o,height:s}),yield nN(i),yield GD(i,r),iN(i),i})}function nN(t){return Oh(this,null,function*(){const e=t.querySelectorAll("use"),n=rN(t);e.forEach(r=>{const i=r.getAttribute("href");if(!i)return;if(!t.querySelector(i)){const s=document.querySelector(i);s&&n.appendChild(s.cloneNode(!0))}})})}const Q3="icon-defs";function rN(t){const e=Sr(t,Q3);if(e)return e;const n=wt("defs");return oi(n,Q3),t.prepend(n),n}function iN(t){oN(t),sN(t),aN(t),lN(t)}function oN(t){const e=Sr(t,kt.BtnsGroup);e==null||e.remove();const n=Sr(t,"btn-icon-defs");n==null||n.remove()}function sN(t){const e=t.querySelector("[data-element-type=transient-container]");e==null||e.remove()}function aN(t){t.querySelectorAll("g").forEach(n=>{n.removeAttribute("x"),n.removeAttribute("y"),n.removeAttribute("width"),n.removeAttribute("height")})}function lN(t){hl(t,e=>{for(const n in e.dataset)delete e.dataset[n]})}var cN=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function hN(t){return cN(this,arguments,function*(e,n={}){var r;const{dpr:i=(r=globalThis.devicePixelRatio)!=null?r:2}=n,o=yield K3(e),{width:s,height:a}=oc(o);return new Promise((l,c)=>{try{const h=document.createElement("canvas");h.width=s*i,h.height=a*i;const u=h.getContext("2d");if(!u){c(new Error("Failed to get canvas context"));return}u.scale(i,i),u.imageSmoothingEnabled=!0,u.imageSmoothingQuality="high",o.setAttribute("width",String(s)),o.setAttribute("height",String(a));const f=new XMLSerializer().serializeToString(o),p="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(f),g=new Image;g.onload=function(){u.clearRect(0,0,s,a),u.drawImage(g,0,0,s,a);const y=h.toDataURL("image/png");l(y)},g.onerror=function(y){c(new Error("Image load failed: "+y))},g.src=p}catch(h){c(h)}})})}var dN=Object.defineProperty,uN=Object.defineProperties,fN=Object.getOwnPropertyDescriptors,ca=Object.getOwnPropertySymbols,J3=Object.prototype.hasOwnProperty,tv=Object.prototype.propertyIsEnumerable,ev=(t,e,n)=>e in t?dN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qe=(t,e)=>{for(var n in e||(e={}))J3.call(e,n)&&ev(t,n,e[n]);if(ca)for(var n of ca(e))tv.call(e,n)&&ev(t,n,e[n]);return t},ha=(t,e)=>uN(t,fN(e)),Wr=(t,e)=>{var n={};for(var r in t)J3.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ca)for(var r of ca(t))e.indexOf(r)<0&&tv.call(t,r)&&(n[r]=t[r]);return n};function pN(t){const e=t,{container:n="#container",padding:r=0,template:i,design:o,theme:s,themeConfig:a}=e,l=Wr(e,["container","padding","template","design","theme","themeConfig"]),c=typeof n=="string"?document.querySelector(n)||document.createElement("div"):n,h=i?Hh(i):void 0,u=ep({},h==null?void 0:h.themeConfig,a),f=s||a||h!=null&&h.themeConfig?vN(s,u):void 0,p={container:c,padding:tr(r)};if(h){const g=h,{design:y}=g,m=Wr(g,["design"]);Object.assign(p,m)}if(Object.assign(p,l),i&&(p.template=i),h!=null&&h.design||o){const g=gN(qe(qe({},h==null?void 0:h.design),o),f?ha(qe({},t),{themeConfig:f}):t);yu(g)&&(p.design=g)}return s&&(p.theme=s),f&&(p.themeConfig=f),p}function Ch(t){if(typeof t=="string")return{type:t};if(!("type"in t))throw new Error("Type is required");return t}function gN(t,e){const{structure:n,title:r,item:i,items:o}=t||{},s=nv(i||(o==null?void 0:o[0]),e);return{structure:mN(n),title:yN(r,e),item:s,items:o?o.map(a=>nv(a,e)):[s]}}function mN(t){if(!t)return null;const e=Ch(t),{type:n}=e,r=Wr(e,["type"]),i=r2(n);if(!i)return null;const{component:o}=i;return ha(qe({},i),{component:s=>o(qe(qe({},s),r))})}function yN(t,e){if(!t)return{component:null};const n=Ch(t),{type:r}=n,i=Wr(n,["type"]),{themeConfig:o}=e,s=(o==null?void 0:o.colorBg)||"#fff",a=rv(s,s);return{component:l=>lg(qe(ha(qe({},l),{themeColors:a}),i))}}function nv(t,e){if(!t)return null;const n=Ch(t),{type:r}=n,i=Wr(n,["type"]),o=mg(r);if(!o)return null;const{component:s,options:a}=o;return ha(qe({},o),{component:l=>{var c;const{indexes:h}=l,{data:u,themeConfig:f}=e,p=(f==null?void 0:f.colorBg)||"#fff",g=l,{themeColors:y=rv(Oo(f==null?void 0:f.palette,h,(c=u==null?void 0:u.items)==null?void 0:c.length)||(f==null?void 0:f.colorPrimary)||"#FF356A",p)}=g,m=Wr(g,["themeColors"]);return s(qe(qe({themeColors:y},m),i))},options:a})}function vN(t,e={}){var n;const r=t?cg(t)||{}:{},i=ep({},r,e);return i.palette=e.palette||r.palette,i.stylize=(n=e.stylize)!=null?n:r.stylize,i.colorPrimary||(i.colorPrimary="#FF356A"),i.palette||(i.palette=[i.colorPrimary]),i}function rv(t,e="#fff"){return ug({colorPrimary:t,isDarkMode:lu(e),colorBg:e})}function bN(t){return t===" "||t===" "}function xN(t){let e=0,n=0;for(;n<t.length;){const r=t[n];if(r===" "){e+=1,n+=1;continue}if(r===" "){e+=2,n+=1;continue}break}return{indent:e,content:t.slice(n)}}function wN(t){return t.trimEnd()}function iv(t){const e=t.trim();if(!e)return null;const n=e.match(/^([^:\s=]+)\s*[:=]\s*(.*)$/);if(n)return{key:n[1],value:n[2].trim()};const r=e.match(/^([^\s]+)\s+(.*)$/);return r?{key:r[1],value:r[2].trim()}:{key:e,value:void 0}}function Mh(t,e){return{kind:"object",line:t,value:e,entries:{}}}function _N(t){return{kind:"array",line:t,items:[]}}function $N(t){const e=[],n=Mh(0),r=[{indent:-1,node:n,parent:null,key:null}];return t.split(/\r?\n/).forEach((o,s)=>{const a=s+1;if(!o.trim())return;const{indent:l,content:c}=xN(o),h=wN(c);if(!h.trim())return;for(;r.length>1&&l<=r[r.length-1].indent;)r.pop();const u=r[r.length-1];let f=u.node;const p=h.trim();if(p.startsWith("-")&&(p.length===1||bN(p[1]))){if(f.kind!=="array")if(f.kind==="object"&&Object.keys(f.entries).length===0&&f.value===void 0&&u.parent&&u.key){const v=_N(f.line);if(u.parent.kind==="object")u.parent.entries[u.key]=v;else if(u.parent.kind==="array"){const x=u.parent.items.indexOf(f);x>=0&&(u.parent.items[x]=v)}u.node=v,f=v}else{e.push({path:"",line:a,code:"bad_list",message:"List item is not under an array container.",raw:p});return}const m=p.slice(1).trim(),b=Mh(a,m||void 0);f.items.push(b),r.push({indent:l,node:b,parent:f});return}const g=iv(p);if(!g){e.push({path:"",line:a,code:"bad_syntax",message:"Invalid syntax line.",raw:p});return}if(f.kind!=="object"){e.push({path:"",line:a,code:"bad_syntax",message:"Key-value pair is not under an object container.",raw:p});return}const y=Mh(a,g.value);f.entries[g.key]=y,r.push({indent:l,node:y,parent:f,key:g.key})}),{ast:n,errors:e}}function ov(t){return iv(t)}function da(t,e){return{kind:"value",line:e,value:t}}const PN=/^(#[0-9a-f]{8}|#[0-9a-f]{6}|#[0-9a-f]{4}|#[0-9a-f]{3})/i,ON=/^((?:rgb|rgba|hsl|hsla)\([^)]*\))/i;function gr(t){const e=t.trim();return e==="true"?!0:e==="false"?!1:/^-?\d+(\.\d+)?$/.test(e)?parseFloat(e):e}function mr(t){if(t.kind==="value"||t.kind==="object")return t.value}function fe(t,e,n,r,i,o){t.push({path:n,line:e.line,code:r,message:i,raw:o})}function sv(t,e="any"){let n=t.trim();if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1).trim()),!n)return[];let r;e==="comma"?r=n.split(","):e==="space"?r=n.split(/\s+/):r=n.split(/[,\s]+/);const i=[];for(const o of r){const s=o.trim();if(s){if(s==="#"||s==="//")break;i.push(s)}}return i}function CN(t){let e=t.trim();const n=e.search(/\s+#(?![0-9a-f])/i);n>=0&&(e=e.slice(0,n).trimEnd());const r=e.indexOf("//");return r>=0&&(e=e.slice(0,r).trimEnd()),e}function Sh(t){const e=CN(t);if(!e)return;const n=e.match(PN);if(n&&n[0].length===e.length)return e;const r=e.match(ON);if(r&&r[1].length===e.length||ot(e).isValid())return e}function av(t,e,n,r={}){const i=mr(t);if(i===void 0){fe(n,t,e,"schema_mismatch","Expected color value.");return}const o=Sh(i);if(!o){r.soft||fe(n,t,e,"invalid_value","Invalid color value.",i);return}return o}function MN(t,e){return e.length>1||t.startsWith("[")&&t.endsWith("]")?!0:Sh(t)!==void 0}function Eh(t){if(t.kind==="array")return t.items.map(r=>Eh(r));if(t.kind==="value"||!(Object.keys(t.entries).length>0)&&t.value!==void 0)return gr(t.value);const n={};return t.value!==void 0&&(n.value=gr(t.value)),Object.entries(t.entries).forEach(([r,i])=>{n[r]=Eh(i)}),n}function SN(t,e,n,r){let i,o=null;for(const s of e.variants){const a=[],l=Re(t,s,n,a);(o===null||a.length<o.length)&&(o=a,i=l)}return o&&r.push(...o),i}function Re(t,e,n,r){switch(e.kind){case"union":return SN(t,e,n,r);case"string":{const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected string value.");return}return i}case"number":{const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected number value.");return}const s=i.trim().match(/^(-?\d+(\.\d+)?)(?:\s*(#|\/\/).*)?$/);if(!s){fe(r,t,n,"invalid_value","Invalid number value.",i);return}return parseFloat(s[1])}case"boolean":{const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected boolean value.");return}if(i!=="true"&&i!=="false"){fe(r,t,n,"invalid_value","Invalid boolean value.",i);return}return i==="true"}case"enum":{const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected enum value.");return}if(!e.values.includes(i)){fe(r,t,n,"invalid_value","Invalid enum value.",i);return}return i}case"array":{if(t.kind==="array")return t.items.map((a,l)=>Re(a,e.item,`${n}[${l}]`,r)).filter(a=>a!==void 0);if(t.kind==="object"&&Object.keys(t.entries).length>0){fe(r,t,n,"schema_mismatch","Expected array value.");return}const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected array value.");return}const o=i.trim();return o.startsWith("[")&&!o.endsWith("]")?void 0:sv(i,e.split).map((a,l)=>Re(da(a,t.line),e.item,`${n}[${l}]`,r)).filter(a=>a!==void 0)}case"palette":{if(t.kind==="array"){const l=Re(t,{kind:"array",item:{kind:"color"},split:"any"},n,r);return Array.isArray(l)&&l.length>0?l:void 0}if(t.kind==="object"&&Object.keys(t.entries).length>0){fe(r,t,n,"schema_mismatch","Expected palette value.");return}const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected palette value.");return}const o=i.trim();if(o.startsWith("[")&&!o.endsWith("]"))return;const s=Sh(o);if(s)return[s];const a=sv(i,"any");if(MN(o,a)){const l=a.map((c,h)=>av(da(c,t.line),`${n}[${h}]`,r)).filter(c=>c!==void 0);return l.length>0?l:void 0}return i}case"color":return av(t,n,r,{soft:e.soft});case"object":{if(t.kind==="array"){fe(r,t,n,"schema_mismatch","Expected object value.");return}const i={};if(t.kind==="value"){if(e.shorthandKey)return i[e.shorthandKey]=t.value,i;const o=ov(t.value);if((o==null?void 0:o.value)!==void 0){if(e.fields[o.key]){const s=Re(da(o.value,t.line),e.fields[o.key],`${n}.${o.key}`,r);return s!==void 0&&(i[o.key]=s),i}return e.allowUnknown?(i[o.key]=gr(o.value),i):(fe(r,t,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key),i)}if(e.allowUnknown)return i.value=gr(t.value),i;fe(r,t,n,"invalid_value","Expected object value.");return}if(t.value!==void 0)if(e.shorthandKey&&i[e.shorthandKey]===void 0)i[e.shorthandKey]=t.value;else{const o=ov(t.value);if((o==null?void 0:o.value)!==void 0)if(e.fields[o.key]){const s=Re(da(o.value,t.line),e.fields[o.key],`${n}.${o.key}`,r);s!==void 0&&i[o.key]===void 0&&(i[o.key]=s)}else e.allowUnknown?i[o.key]=gr(o.value):fe(r,t,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key);else e.allowUnknown&&(i.value=gr(t.value))}return Object.entries(t.entries).forEach(([o,s])=>{const a=e.fields[o];if(!a){if(e.allowUnknown){i[o]=Eh(s);return}fe(r,s,`${n}.${o}`,"unknown_key","Unknown key in object.",o);return}const l=Re(s,a,`${n}.${o}`,r);l!==void 0&&(i[o]=l)}),i}default:return}}const Ue=()=>({kind:"string"}),Dn=()=>({kind:"number"}),EN=t=>({kind:"enum",values:t}),Vr=(t={})=>({kind:"color",soft:t.soft}),Ih=(t,e="any")=>({kind:"array",item:t,split:e}),Ce=(t,e={})=>({kind:"object",fields:t,allowUnknown:e.allowUnknown,shorthandKey:e.shorthandKey}),Th=(...t)=>({kind:"union",variants:t}),IN=()=>({kind:"palette"}),lv={fill:Vr({soft:!0}),stroke:Vr({soft:!0})},Yr=Ce(lv,{allowUnknown:!0}),Ah=Ce(lv,{allowUnknown:!0}),kh=Ce({},{allowUnknown:!0});kh.fields={label:Ue(),value:Th(Dn(),Ue()),desc:Ue(),icon:Ue(),children:Ih(kh)};const cv=Ce({type:Ue(),colorBg:Vr(),colorPrimary:Vr(),palette:IN(),title:Yr,desc:Yr,shape:Ah,base:Ce({global:Ce({},{allowUnknown:!0}),shape:Ah,text:Yr}),item:Ce({icon:Ce({},{allowUnknown:!0}),label:Yr,desc:Yr,value:Yr,shape:Ah}),stylize:Ce({type:EN(["rough","pattern"]),roughness:Dn(),bowing:Dn(),fillWeight:Dn(),hachureGap:Dn(),pattern:Ue(),backgroundColor:Vr(),foregroundColor:Vr(),scale:Dn()},{shorthandKey:"type"}),elements:Ce({},{allowUnknown:!0})},{shorthandKey:"type"}),ua=Ce({},{allowUnknown:!0,shorthandKey:"type"}),hv=Ce({structure:ua,item:ua,items:Ih(ua),title:ua}),dv=Ce({title:Ue(),desc:Ue(),items:Ih(kh)}),uv=Ce({type:Ue()},{shorthandKey:"type"}),fv=Ce({template:uv,design:hv,data:dv,theme:cv,width:Th(Dn(),Ue()),height:Th(Dn(),Ue())});var TN=Object.defineProperty,fa=Object.getOwnPropertySymbols,pv=Object.prototype.hasOwnProperty,gv=Object.prototype.propertyIsEnumerable,mv=(t,e,n)=>e in t?TN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AN=(t,e)=>{for(var n in e||(e={}))pv.call(e,n)&&mv(t,n,e[n]);if(fa)for(var n of fa(e))gv.call(e,n)&&mv(t,n,e[n]);return t},kN=(t,e)=>{var n={};for(var r in t)pv.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&fa)for(var r of fa(t))e.indexOf(r)<0&&gv.call(t,r)&&(n[r]=t[r]);return n};function zN(t,e){if(!t)return;const n=Re(t,uv,"template",e);if(n){if(typeof n=="string")return n;if(typeof n=="object"&&typeof n.type=="string")return n.type}}function yv(t){const{ast:e,errors:n}=$N(t),r=[],i={},o=AN({},e.entries),s=e.entries.infographic;let a;s&&s.kind==="object"&&(s.value&&(a=s.value),Object.entries(s.entries).forEach(([m,b])=>{m in o||(o[m]=b)}));const l=new Set(["infographic","template","design","data","theme","width","height"]);Object.keys(o).forEach(m=>{l.has(m)||n.push({path:m,line:o[m].line,code:"unknown_key",message:"Unknown top-level key.",raw:m})});const c=o.template,h=zN(c,n);h&&(i.template=h),!i.template&&a&&(i.template=a);const u=o.design;if(u){const m=Re(u,hv,"design",n);m&&(i.design=m)}const f=o.data;if(f){const m=Re(f,dv,"data",n);m&&(i.data=m)}const p=o.theme;if(p){const m=Re(p,cv,"theme",n);if(m&&typeof m=="object"){const b=m,{type:v}=b,x=kN(b,["type"]);typeof v=="string"&&v&&(i.theme=v),Object.keys(x).length>0&&(i.themeConfig=x)}}const g=o.width;if(g){const m=Re(g,fv.fields.width,"width",n);m!==void 0&&(i.width=m)}const y=o.height;if(y){const m=Re(y,fv.fields.height,"height",n);m!==void 0&&(i.height=m)}return{options:i,errors:n,warnings:r,ast:e}}const LN=()=>[new N3,new W3],RN=()=>[new o3,new Yy,new Xy,new s3,new l3,new f3,new d3],HN={padding:20,theme:"light",themeConfig:{palette:"antv"},get plugins(){return LN()},get interactions(){return RN()}};var DN=Object.defineProperty,vv=Object.getOwnPropertySymbols,NN=Object.prototype.hasOwnProperty,jN=Object.prototype.propertyIsEnumerable,bv=(t,e,n)=>e in t?DN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$n=(t,e)=>{for(var n in e||(e={}))NN.call(e,n)&&bv(t,n,e[n]);if(vv)for(var n of vv(e))jN.call(e,n)&&bv(t,n,e[n]);return t};function zh(t,e){const n=$n($n({},t),e);return(t.design||e.design)&&(n.design=$n($n({},t.design),e.design)),(t.themeConfig||e.themeConfig)&&(n.themeConfig=$n($n({},t.themeConfig),e.themeConfig)),(t.svg||e.svg)&&(n.svg=$n($n({},t.svg),e.svg)),n}function pa(t){const e=$n({},t);return e.data&&(e.data=J0(e.data)),e.elements&&(e.elements=J0(e.elements)),e}function xv(t){const{design:e,data:n}=t;return!(!e||!yu(e)||!n||!Array.isArray(n.items)||n.items.length<1)}var FN=Object.defineProperty,wv=Object.getOwnPropertySymbols,BN=Object.prototype.hasOwnProperty,WN=Object.prototype.propertyIsEnumerable,_v=(t,e,n)=>e in t?FN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,VN=(t,e)=>{for(var n in e||(e={}))BN.call(e,n)&&_v(t,n,e[n]);if(wv)for(var n of wv(e))WN.call(e,n)&&_v(t,n,e[n]);return t},YN=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class XN{constructor(e){this.rendered=!1,this.emitter=new LD,this.node=null,this.initialOptions={},this.setOptions(e,"replace",!0)}getOptions(){return this.options}setOptions(e,n="replace",r=!1){const{options:i,errors:o,warnings:s}=GN(e);r&&(this.initialOptions=pa(i));const a=zh(n==="replace"?pa(this.initialOptions||{}):this.options||pa(this.initialOptions||{}),i);this.options=a,this.parsedOptions=pN(zh(HN,this.options)),s.length&&this.emitter.emit("warning",s),o.length&&this.emitter.emit("error",o)}render(e){e?this.setOptions(e,"replace"):!this.options&&this.initialOptions&&this.setOptions(this.initialOptions,"replace"),this.performRender()}update(e){this.setOptions(e,"merge"),this.performRender()}performRender(){var e;const n=this.parsedOptions;if(!xv(n)){this.emitter.emit("error",new Error("Incomplete options"));return}const{container:r}=this.parsedOptions,i=this.compose(n),o=new w$(n,i);this.node=o.render(),r==null||r.replaceChildren(this.node),(e=this.editor)==null||e.destroy(),this.editor=void 0,this.options.editable&&(this.editor=new WD(this.emitter,this.node,n)),this.rendered=!0,this.emitter.emit("rendered",{node:this.node,options:this.options})}compose(e){const{design:n,data:r}=e,{title:i,item:o,items:s,structure:a}=n,{component:l,props:c}=a,h=i.component,u=o.component,f=s.map(y=>y.component),p=bp(d(l,VN({data:r,Title:h,Item:u,Items:f,options:e},c))),g=Mr(p);if(!g)throw new Error("Failed to parse SVG template");return g}getTypes(){const e=this.parsedOptions;if(!xv(e)){this.emitter.emit("error",new Error("Incomplete options"));return}const n=e.design,r=n.structure.composites||[],i=n.items.map(o=>o.composites||[]);return F4({structure:r,items:i})}toDataURL(e){return YN(this,null,function*(){if(!this.node)throw new Error("Infographic is not rendered yet.");return(e==null?void 0:e.type)==="svg"?yield eN(this.node,e):yield hN(this.node,e)})}on(e,n){this.emitter.on(e,n)}off(e,n){this.emitter.off(e,n)}destroy(){var e,n;(e=this.editor)==null||e.destroy(),(n=this.node)==null||n.remove(),this.node=null,this.rendered=!1,this.emitter.emit("destroyed"),this.emitter.removeAllListeners()}}function GN(t){if(typeof t=="string"){const{options:e,errors:n,warnings:r}=yv(t);return{options:e,errors:n,warnings:r}}return{options:pa(t),errors:[],warnings:[]}}const qN=De.version;F.AlignLayout=wi,F.BadgeCard=bg,F.BrushSelect=Yy,F.BtnAdd=q,F.BtnRemove=Ft,F.BtnsGroup=Ot,F.CandyCardLite=_g,F.CapsuleItem=Ig,F.ChartBar=i2,F.ChartColumn=o2,F.ChartLine=c2,F.ChartPie=h2,F.ChartWordCloud=m2,F.CircleNode=kg,F.CircularProgress=Rg,F.ClickSelect=Xy,F.CompactCard=jg,F.CompareBinaryHorizontal=C2,F.CompareHierarchyLeftRight=I2,F.CompareHierarchyRow=T2,F.DblClickEditText=o3,F.Defs=zt,F.DoneList=Wg,F.DragElement=s3,F.EditBar=N3,F.Ellipse=Lt,F.FlexLayout=lt,F.Fragment=pi,F.Gap=Kt,F.Group=Y,F.HierarchyMindmap=j2,F.HierarchyTree=V2,F.HorizontalIconArrow=Xg,F.HorizontalIconLine=Kg,F.HotkeyHistory=l3,F.IconBadge=t1,F.Illus=Ip,F.IndexedCard=r1,F.Infographic=XN,F.Interaction=Rn,F.ItemDesc=Xt,F.ItemIcon=be,F.ItemIconCircle=nr,F.ItemLabel=$t,F.ItemValue=xi,F.ItemsGroup=It,F.LCornerCard=s1,F.LabelText=v1,F.LetterCard=c1,F.LinedText=u1,F.ListColumn=Y2,F.ListGrid=X2,F.ListPyramid=G2,F.ListRow=q2,F.ListSector=K2,F.ListWaterfall=Q2,F.Path=ht,F.PillBadge=g1,F.Plugin=gh,F.Polygon=Ne,F.ProgressCard=Cm,F.Quadrant=J2,F.QuarterCircular=Em,F.QuarterSimpleCard=Am,F.Rect=St,F.RelationCircle=ty,F.RelationNetwork=ey,F.ResizeElement=W3,F.RibbonCard=Lm,F.RoundedRectNode=Dm,F.SelectHighlight=d3,F.SequenceAscendingStairs3d=dy,F.SequenceAscendingSteps=uy,F.SequenceCircleArrows=py,F.SequenceCircular=gy,F.SequenceColorSnakeSteps=my,F.SequenceFilterMesh=xy,F.SequenceHorizontalZigzag=wy,F.SequenceMountain=Py,F.SequencePyramid=Oy,F.SequenceRoadmapVertical=My,F.SequenceSnakeSteps=Sy,F.SequenceStairsFront=Ey,F.SequenceSteps=Iy,F.SequenceTimeline=Ty,F.SequenceZigzagPucks3d=ky,F.SequenceZigzagSteps=Ny,F.ShapesGroup=ne,F.SimpleHorizontalArrow=Fm,F.SimpleIllusItem=Vm,F.SimpleItem=Gm,F.SimpleVerticalArrow=Zm,F.Text=Et,F.Title=lg,F.UnderlineText=Jm,F.VERSION=qN,F.VerticalIconArrow=n2,F.ZoomWheel=f3,F.cloneElement=kn,F.createFragment=D$,F.createLayout=dc,F.getCombinedBounds=kr,F.getElementBounds=Q,F.getElementsBounds=er,F.getFont=Pl,F.getFonts=Ol,F.getItem=mg,F.getItemProps=Wt,F.getItems=hO,F.getPalette=xf,F.getPaletteColor=Oo,F.getStructure=r2,F.getStructures=uz,F.getTemplate=Hh,F.getTemplates=Cv,F.getTheme=cg,F.getThemeColors=xe,F.getThemes=GP,F.jsx=Go,F.jsxDEV=j$,F.jsxs=N$,F.loadSVGResource=Er,F.parseSVG=Mr,F.parseSyntax=yv,F.registerFont=yf,F.registerItem=Vt,F.registerPalette=Ml,F.registerPattern=Gf,F.registerResourceLoader=J4,F.registerStructure=Tt,F.registerTemplate=Rh,F.registerTheme=gc,F.renderSVG=bp,F.sequenceCylinders3d=yy,F.setDefaultFont=T5,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})}));
549
+ `);const o=t.querySelector("defs");o&&o.parentNode?o.parentNode.insertBefore(i,o.nextSibling):t.insertBefore(i,t.firstChild)}function xN(t){return Fr(this,null,function*(){const e=yield wo(t);if(!e.ok)throw new Error(`Failed to load font: ${t}`);const n=yield e.blob();return yield new Promise((i,o)=>{const s=new FileReader;s.onloadend=()=>{i(s.result)},s.onerror=o,s.readAsDataURL(n)})})}var Eh=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function bN(t){return Eh(this,arguments,function*(e,n={}){const r=yield av(e,n),i=new XMLSerializer().serializeToString(r);return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i)})}function av(t){return Eh(this,arguments,function*(e,n={}){const{embedResources:r=!0}=n,i=e.cloneNode(!0),{width:o,height:s}=ac(e);return Yt(i,{width:o,height:s}),yield wN(i),yield uN(i,r),$N(i),i})}function wN(t){return Eh(this,null,function*(){const e=t.querySelectorAll("use"),n=_N(t);e.forEach(r=>{const i=r.getAttribute("href");if(!i)return;if(!t.querySelector(i)){const s=document.querySelector(i);s&&n.appendChild(s.cloneNode(!0))}})})}const lv="icon-defs";function _N(t){const e=Mr(t,lv);if(e)return e;const n=wt("defs");return si(n,lv),t.prepend(n),n}function $N(t){PN(t),CN(t),ON(t),MN(t)}function PN(t){const e=Mr(t,kt.BtnsGroup);e==null||e.remove();const n=Mr(t,"btn-icon-defs");n==null||n.remove()}function CN(t){const e=t.querySelector("[data-element-type=transient-container]");e==null||e.remove()}function ON(t){t.querySelectorAll("g").forEach(n=>{n.removeAttribute("x"),n.removeAttribute("y"),n.removeAttribute("width"),n.removeAttribute("height")})}function MN(t){hl(t,e=>{for(const n in e.dataset)delete e.dataset[n]})}var SN=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function EN(t){return SN(this,arguments,function*(e,n={}){var r;const{dpr:i=(r=globalThis.devicePixelRatio)!=null?r:2}=n,o=yield av(e),{width:s,height:a}=ac(o);return new Promise((l,c)=>{try{const h=document.createElement("canvas");h.width=s*i,h.height=a*i;const u=h.getContext("2d");if(!u){c(new Error("Failed to get canvas context"));return}u.scale(i,i),u.imageSmoothingEnabled=!0,u.imageSmoothingQuality="high",o.setAttribute("width",String(s)),o.setAttribute("height",String(a));const f=new XMLSerializer().serializeToString(o),p="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(f),g=new Image;g.onload=function(){u.clearRect(0,0,s,a),u.drawImage(g,0,0,s,a);const y=h.toDataURL("image/png");l(y)},g.onerror=function(y){c(new Error("Image load failed: "+y))},g.src=p}catch(h){c(h)}})})}var IN=Object.defineProperty,TN=Object.defineProperties,AN=Object.getOwnPropertyDescriptors,ca=Object.getOwnPropertySymbols,cv=Object.prototype.hasOwnProperty,hv=Object.prototype.propertyIsEnumerable,dv=(t,e,n)=>e in t?IN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qe=(t,e)=>{for(var n in e||(e={}))cv.call(e,n)&&dv(t,n,e[n]);if(ca)for(var n of ca(e))hv.call(e,n)&&dv(t,n,e[n]);return t},ha=(t,e)=>TN(t,AN(e)),Br=(t,e)=>{var n={};for(var r in t)cv.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ca)for(var r of ca(t))e.indexOf(r)<0&&hv.call(t,r)&&(n[r]=t[r]);return n};function kN(t){const e=t,{container:n="#container",padding:r=0,template:i,design:o,theme:s,themeConfig:a}=e,l=Br(e,["container","padding","template","design","theme","themeConfig"]),c=typeof n=="string"?document.querySelector(n)||document.createElement("div"):n,h=i?Fh(i):void 0,u=op({},h==null?void 0:h.themeConfig,a),f=s||a||h!=null&&h.themeConfig?RN(s,u):void 0,p={container:c,padding:tr(r)};if(h){const g=h,{design:y}=g,m=Br(g,["design"]);Object.assign(p,m)}if(Object.assign(p,l),i&&(p.template=i),h!=null&&h.design||o){const g=LN(qe(qe({},h==null?void 0:h.design),o),f?ha(qe({},t),{themeConfig:f}):t);wu(g)&&(p.design=g)}return s&&(p.theme=s),f&&(p.themeConfig=f),p}function Ih(t){if(typeof t=="string")return{type:t};if(!("type"in t))throw new Error("Type is required");return t}function LN(t,e){const{structure:n,title:r,item:i,items:o}=t||{},s=uv(i||(o==null?void 0:o[0]),e);return{structure:zN(n),title:HN(r,e),item:s,items:o?o.map(a=>uv(a,e)):[s]}}function zN(t){if(!t)return null;const e=Ih(t),{type:n}=e,r=Br(e,["type"]),i=a2(n);if(!i)return null;const{component:o}=i;return ha(qe({},i),{component:s=>o(qe(qe({},s),r))})}function HN(t,e){if(!t)return{component:null};const n=Ih(t),{type:r}=n,i=Br(n,["type"]),{themeConfig:o}=e,s=(o==null?void 0:o.colorBg)||"#fff",a=fv(s,s);return{component:l=>u1(qe(ha(qe({},l),{themeColors:a}),i))}}function uv(t,e){if(!t)return null;const n=Ih(t),{type:r}=n,i=Br(n,["type"]),o=b1(r);if(!o)return null;const{component:s,options:a}=o;return ha(qe({},o),{component:l=>{var c;const{indexes:h}=l,{data:u,themeConfig:f}=e,p=(f==null?void 0:f.colorBg)||"#fff",g=l,{themeColors:y=fv(Co(f==null?void 0:f.palette,h,(c=u==null?void 0:u.items)==null?void 0:c.length)||(f==null?void 0:f.colorPrimary)||"#FF356A",p)}=g,m=Br(g,["themeColors"]);return s(qe(qe({themeColors:y},m),i))},options:a})}function RN(t,e={}){var n;const r=t?f1(t)||{}:{},i=op({},r,e);return i.palette=e.palette||r.palette,i.stylize=(n=e.stylize)!=null?n:r.stylize,i.colorPrimary||(i.colorPrimary="#FF356A"),i.palette||(i.palette=[i.colorPrimary]),i}function fv(t,e="#fff"){return m1({colorPrimary:t,isDarkMode:uu(e),colorBg:e})}function DN(t){return t===" "||t===" "}function NN(t){let e=0,n=0;for(;n<t.length;){const r=t[n];if(r===" "){e+=1,n+=1;continue}if(r===" "){e+=2,n+=1;continue}break}return{indent:e,content:t.slice(n)}}function jN(t){return t.trimEnd()}function pv(t){const e=t.trim();if(!e)return null;const n=e.match(/^([^:\s=]+)\s*[:=]\s*(.*)$/);if(n)return{key:n[1],value:n[2].trim()};const r=e.match(/^([^\s]+)\s+(.*)$/);return r?{key:r[1],value:r[2].trim()}:{key:e,value:void 0}}function Th(t,e){return{kind:"object",line:t,value:e,entries:{}}}function FN(t){return{kind:"array",line:t,items:[]}}function BN(t){const e=[],n=Th(0),r=[{indent:-1,node:n,parent:null,key:null}];return t.split(/\r?\n/).forEach((o,s)=>{const a=s+1;if(!o.trim())return;const{indent:l,content:c}=NN(o),h=jN(c);if(!h.trim())return;for(;r.length>1&&l<=r[r.length-1].indent;)r.pop();const u=r[r.length-1];let f=u.node;const p=h.trim();if(p.startsWith("-")&&(p.length===1||DN(p[1]))){if(f.kind!=="array")if(f.kind==="object"&&Object.keys(f.entries).length===0&&f.value===void 0&&u.parent&&u.key){const v=FN(f.line);if(u.parent.kind==="object")u.parent.entries[u.key]=v;else if(u.parent.kind==="array"){const b=u.parent.items.indexOf(f);b>=0&&(u.parent.items[b]=v)}u.node=v,f=v}else{e.push({path:"",line:a,code:"bad_list",message:"List item is not under an array container.",raw:p});return}const m=p.slice(1).trim(),x=Th(a,m||void 0);f.items.push(x),r.push({indent:l,node:x,parent:f});return}const g=pv(p);if(!g){e.push({path:"",line:a,code:"bad_syntax",message:"Invalid syntax line.",raw:p});return}if(f.kind!=="object"){e.push({path:"",line:a,code:"bad_syntax",message:"Key-value pair is not under an object container.",raw:p});return}const y=Th(a,g.value);f.entries[g.key]=y,r.push({indent:l,node:y,parent:f,key:g.key})}),{ast:n,errors:e}}function gv(t){return pv(t)}function da(t,e){return{kind:"value",line:e,value:t}}const WN=/^(#[0-9a-f]{8}|#[0-9a-f]{6}|#[0-9a-f]{4}|#[0-9a-f]{3})/i,VN=/^((?:rgb|rgba|hsl|hsla)\([^)]*\))/i;function gr(t){const e=t.trim();return e==="true"?!0:e==="false"?!1:/^-?\d+(\.\d+)?$/.test(e)?parseFloat(e):e}function mr(t){if(t.kind==="value"||t.kind==="object")return t.value}function fe(t,e,n,r,i,o){t.push({path:n,line:e.line,code:r,message:i,raw:o})}function mv(t,e="any"){let n=t.trim();if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1).trim()),!n)return[];let r;e==="comma"?r=n.split(","):e==="space"?r=n.split(/\s+/):r=n.split(/[,\s]+/);const i=[];for(const o of r){const s=o.trim();if(s){if(s==="#"||s==="//")break;i.push(s)}}return i}function YN(t){let e=t.trim();const n=e.search(/\s+#(?![0-9a-f])/i);n>=0&&(e=e.slice(0,n).trimEnd());const r=e.indexOf("//");return r>=0&&(e=e.slice(0,r).trimEnd()),e}function Ah(t){const e=YN(t);if(!e)return;const n=e.match(WN);if(n&&n[0].length===e.length)return e;const r=e.match(VN);if(r&&r[1].length===e.length||rt(e).isValid())return e}function yv(t,e,n,r={}){const i=mr(t);if(i===void 0){fe(n,t,e,"schema_mismatch","Expected color value.");return}const o=Ah(i);if(!o){r.soft||fe(n,t,e,"invalid_value","Invalid color value.",i);return}return o}function XN(t,e){return e.length>1||t.startsWith("[")&&t.endsWith("]")?!0:Ah(t)!==void 0}function kh(t){if(t.kind==="array")return t.items.map(r=>kh(r));if(t.kind==="value"||!(Object.keys(t.entries).length>0)&&t.value!==void 0)return gr(t.value);const n={};return t.value!==void 0&&(n.value=gr(t.value)),Object.entries(t.entries).forEach(([r,i])=>{n[r]=kh(i)}),n}function GN(t,e,n,r){let i,o=null;for(const s of e.variants){const a=[],l=He(t,s,n,a);(o===null||a.length<o.length)&&(o=a,i=l)}return o&&r.push(...o),i}function He(t,e,n,r){switch(e.kind){case"union":return GN(t,e,n,r);case"string":{const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected string value.");return}return i}case"number":{const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected number value.");return}const s=i.trim().match(/^(-?\d+(\.\d+)?)(?:\s*(#|\/\/).*)?$/);if(!s){fe(r,t,n,"invalid_value","Invalid number value.",i);return}return parseFloat(s[1])}case"boolean":{const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected boolean value.");return}if(i!=="true"&&i!=="false"){fe(r,t,n,"invalid_value","Invalid boolean value.",i);return}return i==="true"}case"enum":{const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected enum value.");return}if(!e.values.includes(i)){fe(r,t,n,"invalid_value","Invalid enum value.",i);return}return i}case"array":{if(t.kind==="array")return t.items.map((a,l)=>He(a,e.item,`${n}[${l}]`,r)).filter(a=>a!==void 0);if(t.kind==="object"&&Object.keys(t.entries).length>0){fe(r,t,n,"schema_mismatch","Expected array value.");return}const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected array value.");return}const o=i.trim();return o.startsWith("[")&&!o.endsWith("]")?void 0:mv(i,e.split).map((a,l)=>He(da(a,t.line),e.item,`${n}[${l}]`,r)).filter(a=>a!==void 0)}case"palette":{if(t.kind==="array"){const l=He(t,{kind:"array",item:{kind:"color"},split:"any"},n,r);return Array.isArray(l)&&l.length>0?l:void 0}if(t.kind==="object"&&Object.keys(t.entries).length>0){fe(r,t,n,"schema_mismatch","Expected palette value.");return}const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected palette value.");return}const o=i.trim();if(o.startsWith("[")&&!o.endsWith("]"))return;const s=Ah(o);if(s)return[s];const a=mv(i,"any");if(XN(o,a)){const l=a.map((c,h)=>yv(da(c,t.line),`${n}[${h}]`,r)).filter(c=>c!==void 0);return l.length>0?l:void 0}return i}case"color":return yv(t,n,r,{soft:e.soft});case"object":{if(t.kind==="array"){fe(r,t,n,"schema_mismatch","Expected object value.");return}const i={};if(t.kind==="value"){if(e.shorthandKey)return i[e.shorthandKey]=t.value,i;const o=gv(t.value);if((o==null?void 0:o.value)!==void 0){if(e.fields[o.key]){const s=He(da(o.value,t.line),e.fields[o.key],`${n}.${o.key}`,r);return s!==void 0&&(i[o.key]=s),i}return e.allowUnknown?(i[o.key]=gr(o.value),i):(fe(r,t,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key),i)}if(e.allowUnknown)return i.value=gr(t.value),i;fe(r,t,n,"invalid_value","Expected object value.");return}if(t.value!==void 0)if(e.shorthandKey&&i[e.shorthandKey]===void 0)i[e.shorthandKey]=t.value;else{const o=gv(t.value);if((o==null?void 0:o.value)!==void 0)if(e.fields[o.key]){const s=He(da(o.value,t.line),e.fields[o.key],`${n}.${o.key}`,r);s!==void 0&&i[o.key]===void 0&&(i[o.key]=s)}else e.allowUnknown?i[o.key]=gr(o.value):fe(r,t,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key);else e.allowUnknown&&(i.value=gr(t.value))}return Object.entries(t.entries).forEach(([o,s])=>{const a=e.fields[o];if(!a){if(e.allowUnknown){i[o]=kh(s);return}fe(r,s,`${n}.${o}`,"unknown_key","Unknown key in object.",o);return}const l=He(s,a,`${n}.${o}`,r);l!==void 0&&(i[o]=l)}),i}default:return}}const Ue=()=>({kind:"string"}),Dn=()=>({kind:"number"}),qN=t=>({kind:"enum",values:t}),Wr=(t={})=>({kind:"color",soft:t.soft}),Lh=(t,e="any")=>({kind:"array",item:t,split:e}),Oe=(t,e={})=>({kind:"object",fields:t,allowUnknown:e.allowUnknown,shorthandKey:e.shorthandKey}),zh=(...t)=>({kind:"union",variants:t}),UN=()=>({kind:"palette"}),vv={fill:Wr({soft:!0}),stroke:Wr({soft:!0})},Vr=Oe(vv,{allowUnknown:!0}),Hh=Oe(vv,{allowUnknown:!0}),Rh=Oe({},{allowUnknown:!0});Rh.fields={label:Ue(),value:zh(Dn(),Ue()),desc:Ue(),icon:Ue(),children:Lh(Rh)};const xv=Oe({type:Ue(),colorBg:Wr(),colorPrimary:Wr(),palette:UN(),title:Vr,desc:Vr,shape:Hh,base:Oe({global:Oe({},{allowUnknown:!0}),shape:Hh,text:Vr}),item:Oe({icon:Oe({},{allowUnknown:!0}),label:Vr,desc:Vr,value:Vr,shape:Hh}),stylize:Oe({type:qN(["rough","pattern"]),roughness:Dn(),bowing:Dn(),fillWeight:Dn(),hachureGap:Dn(),pattern:Ue(),backgroundColor:Wr(),foregroundColor:Wr(),scale:Dn()},{shorthandKey:"type"}),elements:Oe({},{allowUnknown:!0})},{shorthandKey:"type"}),ua=Oe({},{allowUnknown:!0,shorthandKey:"type"}),bv=Oe({structure:ua,item:ua,items:Lh(ua),title:ua}),wv=Oe({title:Ue(),desc:Ue(),items:Lh(Rh)}),_v=Oe({type:Ue()},{shorthandKey:"type"}),$v=Oe({template:_v,design:bv,data:wv,theme:xv,width:zh(Dn(),Ue()),height:zh(Dn(),Ue())});var ZN=Object.defineProperty,fa=Object.getOwnPropertySymbols,Pv=Object.prototype.hasOwnProperty,Cv=Object.prototype.propertyIsEnumerable,Ov=(t,e,n)=>e in t?ZN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,KN=(t,e)=>{for(var n in e||(e={}))Pv.call(e,n)&&Ov(t,n,e[n]);if(fa)for(var n of fa(e))Cv.call(e,n)&&Ov(t,n,e[n]);return t},QN=(t,e)=>{var n={};for(var r in t)Pv.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&fa)for(var r of fa(t))e.indexOf(r)<0&&Cv.call(t,r)&&(n[r]=t[r]);return n};function JN(t,e){if(!t)return;const n=He(t,_v,"template",e);if(n){if(typeof n=="string")return n;if(typeof n=="object"&&typeof n.type=="string")return n.type}}function Mv(t){const{ast:e,errors:n}=BN(t),r=[],i={},o=KN({},e.entries),s=e.entries.infographic;let a;s&&s.kind==="object"&&(s.value&&(a=s.value),Object.entries(s.entries).forEach(([m,x])=>{m in o||(o[m]=x)}));const l=new Set(["infographic","template","design","data","theme","width","height"]);Object.keys(o).forEach(m=>{l.has(m)||n.push({path:m,line:o[m].line,code:"unknown_key",message:"Unknown top-level key.",raw:m})});const c=o.template,h=JN(c,n);h&&(i.template=h),!i.template&&a&&(i.template=a);const u=o.design;if(u){const m=He(u,bv,"design",n);m&&(i.design=m)}const f=o.data;if(f){const m=He(f,wv,"data",n);m&&(i.data=m)}const p=o.theme;if(p){const m=He(p,xv,"theme",n);if(m&&typeof m=="object"){const x=m,{type:v}=x,b=QN(x,["type"]);typeof v=="string"&&v&&(i.theme=v),Object.keys(b).length>0&&(i.themeConfig=b)}}const g=o.width;if(g){const m=He(g,$v.fields.width,"width",n);m!==void 0&&(i.width=m)}const y=o.height;if(y){const m=He(y,$v.fields.height,"height",n);m!==void 0&&(i.height=m)}return{options:i,errors:n,warnings:r,ast:e}}const tj=()=>[new U3,new J3],ej=()=>[new g3,new e3,new n3,new m3,new v3,new $3,new w3],nj={padding:20,theme:"light",themeConfig:{palette:"antv"},get plugins(){return tj()},get interactions(){return ej()}};var rj=Object.defineProperty,Sv=Object.getOwnPropertySymbols,ij=Object.prototype.hasOwnProperty,oj=Object.prototype.propertyIsEnumerable,Ev=(t,e,n)=>e in t?rj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$n=(t,e)=>{for(var n in e||(e={}))ij.call(e,n)&&Ev(t,n,e[n]);if(Sv)for(var n of Sv(e))oj.call(e,n)&&Ev(t,n,e[n]);return t};function Dh(t,e){const n=$n($n({},t),e);return(t.design||e.design)&&(n.design=$n($n({},t.design),e.design)),(t.themeConfig||e.themeConfig)&&(n.themeConfig=$n($n({},t.themeConfig),e.themeConfig)),(t.svg||e.svg)&&(n.svg=$n($n({},t.svg),e.svg)),n}function pa(t){const e=$n({},t);return e.data&&(e.data=rp(e.data)),e.elements&&(e.elements=rp(e.elements)),e}function Iv(t){const{design:e,data:n}=t;return!(!e||!wu(e)||!n||!Array.isArray(n.items)||n.items.length<1)}var sj=Object.defineProperty,Tv=Object.getOwnPropertySymbols,aj=Object.prototype.hasOwnProperty,lj=Object.prototype.propertyIsEnumerable,Av=(t,e,n)=>e in t?sj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cj=(t,e)=>{for(var n in e||(e={}))aj.call(e,n)&&Av(t,n,e[n]);if(Tv)for(var n of Tv(e))lj.call(e,n)&&Av(t,n,e[n]);return t},hj=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class dj{constructor(e){this.rendered=!1,this.emitter=new tN,this.node=null,this.initialOptions={},this.setOptions(e,"replace",!0)}getOptions(){return this.options}setOptions(e,n="replace",r=!1){const{options:i,errors:o,warnings:s}=uj(e);r&&(this.initialOptions=pa(i));const a=Dh(n==="replace"?pa(this.initialOptions||{}):this.options||pa(this.initialOptions||{}),i);this.options=a,this.parsedOptions=kN(Dh(nj,this.options)),s.length&&this.emitter.emit("warning",s),o.length&&this.emitter.emit("error",o)}render(e){e?this.setOptions(e,"replace"):!this.options&&this.initialOptions&&this.setOptions(this.initialOptions,"replace"),this.performRender()}update(e){this.setOptions(e,"merge"),this.performRender()}performRender(){var e;const n=this.parsedOptions;if(!Iv(n)){this.emitter.emit("error",new Error("Incomplete options"));return}const{container:r}=this.parsedOptions,i=this.compose(n),o=new L$(n,i);this.node=o.render(),r==null||r.replaceChildren(this.node),(e=this.editor)==null||e.destroy(),this.editor=void 0,this.options.editable&&(this.editor=new lN(this.emitter,this.node,n)),this.rendered=!0,this.emitter.emit("rendered",{node:this.node,options:this.options})}compose(e){const{design:n,data:r}=e,{title:i,item:o,items:s,structure:a}=n,{component:l,props:c}=a,h=i.component,u=o.component,f=s.map(y=>y.component),p=$p(d(l,cj({data:r,Title:h,Item:u,Items:f,options:e},c))),g=Or(p);if(!g)throw new Error("Failed to parse SVG template");return g}getTypes(){const e=this.parsedOptions;if(!Iv(e)){this.emitter.emit("error",new Error("Incomplete options"));return}const n=e.design,r=n.structure.composites||[],i=n.items.map(o=>o.composites||[]);return Q6({structure:r,items:i})}toDataURL(e){return hj(this,null,function*(){if(!this.node)throw new Error("Infographic is not rendered yet.");return(e==null?void 0:e.type)==="svg"?yield bN(this.node,e):yield EN(this.node,e)})}on(e,n){this.emitter.on(e,n)}off(e,n){this.emitter.off(e,n)}destroy(){var e,n;(e=this.editor)==null||e.destroy(),(n=this.node)==null||n.remove(),this.node=null,this.rendered=!1,this.emitter.emit("destroyed"),this.emitter.removeAllListeners()}}function uj(t){if(typeof t=="string"){const{options:e,errors:n,warnings:r}=Mv(t);return{options:e,errors:n,warnings:r}}return{options:pa(t),errors:[],warnings:[]}}const fj=De.version;F.AlignLayout=_i,F.BadgeCard=$1,F.BrushSelect=e3,F.BtnAdd=q,F.BtnRemove=Dt,F.BtnsGroup=$t,F.CandyCardLite=O1,F.CapsuleItem=L1,F.ChartBar=l2,F.ChartColumn=c2,F.ChartLine=f2,F.ChartPie=p2,F.ChartWordCloud=b2,F.CircleNode=R1,F.CircularProgress=j1,F.ClickSelect=n3,F.CompactCard=V1,F.CompareBinaryHorizontal=I2,F.CompareHierarchyLeftRight=L2,F.CompareHierarchyRow=z2,F.DblClickEditText=g3,F.Defs=Lt,F.DoneList=G1,F.DragElement=m3,F.EditBar=U3,F.Ellipse=zt,F.FlexLayout=lt,F.Fragment=gi,F.Gap=Kt,F.Group=V,F.HierarchyMindmap=V2,F.HierarchyTree=q2,F.HorizontalIconArrow=Z1,F.HorizontalIconLine=eg,F.HotkeyHistory=v3,F.IconBadge=ig,F.Illus=Lp,F.IndexedCard=ag,F.Infographic=dj,F.Interaction=Hn,F.ItemDesc=Xt,F.ItemIcon=be,F.ItemIconCircle=nr,F.ItemLabel=Pt,F.ItemValue=wi,F.ItemsGroup=Ct,F.LCornerCard=hg,F.LabelText=_g,F.LetterCard=fg,F.LinedText=mg,F.ListColumn=U2,F.ListGrid=Z2,F.ListPyramid=K2,F.ListRow=Q2,F.ListSector=ey,F.ListWaterfall=ny,F.ListZigzagDown=ay,F.ListZigzagUp=ly,F.Path=ht,F.PillBadge=xg,F.Plugin=xh,F.Polygon=Ne,F.ProgressCard=Im,F.Quadrant=cy,F.QuarterCircular=km,F.QuarterSimpleCard=Hm,F.Rect=Et,F.RelationCircle=hy,F.RelationNetwork=dy,F.ResizeElement=J3,F.RibbonCard=Nm,F.RoundedRectNode=Bm,F.SelectHighlight=w3,F.SequenceAscendingStairs3d=wy,F.SequenceAscendingSteps=_y,F.SequenceCircleArrows=Py,F.SequenceCircular=Cy,F.SequenceColorSnakeSteps=Oy,F.SequenceFilterMesh=Iy,F.SequenceHorizontalZigzag=Ty,F.SequenceMountain=Ly,F.SequencePyramid=zy,F.SequenceRoadmapVertical=Ry,F.SequenceSnakeSteps=Dy,F.SequenceStairsFront=Ny,F.SequenceSteps=jy,F.SequenceTimeline=Fy,F.SequenceZigzagPucks3d=Wy,F.SequenceZigzagSteps=Uy,F.ShapesGroup=ne,F.SimpleHorizontalArrow=Ym,F.SimpleIllusItem=qm,F.SimpleItem=Km,F.SimpleVerticalArrow=t2,F.Text=Tt,F.Title=u1,F.UnderlineText=r2,F.VERSION=fj,F.VerticalIconArrow=s2,F.ZoomWheel=$3,F.cloneElement=kn,F.createFragment=K$,F.createLayout=fc,F.getCombinedBounds=Ar,F.getElementBounds=Q,F.getElementsBounds=er,F.getFont=Cl,F.getFonts=Ol,F.getItem=b1,F.getItemProps=Wt,F.getItems=$C,F.getPalette=Pf,F.getPaletteColor=Co,F.getPalettes=Xw,F.getStructure=a2,F.getStructures=CL,F.getTemplate=Fh,F.getTemplates=Hv,F.getTheme=f1,F.getThemeColors=ye,F.getThemes=sC,F.jsx=Go,F.jsxDEV=J$,F.jsxs=Q$,F.loadSVGResource=Sr,F.parseSVG=Or,F.parseSyntax=Mv,F.registerFont=_f,F.registerItem=Vt,F.registerPalette=El,F.registerPattern=Kf,F.registerResourceLoader=cw,F.registerStructure=It,F.registerTemplate=jh,F.registerTheme=yc,F.renderSVG=$p,F.sequenceCylinders3d=My,F.setDefaultFont=Bw,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})}));
550
550
  //# sourceMappingURL=infographic.min.js.map